Skip to content

Commit 64440f3

Browse files
docs(demo): Update demo with lastest version
1 parent ce7d998 commit 64440f3

File tree

6 files changed

+82
-68
lines changed

6 files changed

+82
-68
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@angular/forms": "^20.0.0",
2727
"@angular/platform-browser": "^20.0.0",
2828
"@angular/router": "^20.0.0",
29-
"@angularui/theme": "^0.0.2",
29+
"@angularui/theme": "^0.0.3",
3030
"rxjs": "~7.8.0",
3131
"tslib": "^2.3.0"
3232
},

projects/demo/src/app/app.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { provideUiTheme } from '@angularui/theme';
66

77
export const appConfig: ApplicationConfig = {
88
providers: [
9-
provideUiTheme({
10-
strategy: 'attribute',
11-
defaultTheme: 'system',
12-
enableColorScheme: true
13-
}),
9+
provideUiTheme(),
1410
provideBrowserGlobalErrorListeners(),
1511
provideZonelessChangeDetection(),
1612
provideRouter(routes)

projects/demo/src/app/app.css

Lines changed: 67 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -179,99 +179,114 @@ section h3 {
179179
text-transform: capitalize;
180180
}
181181

182-
/* Enhanced Buttons */
182+
/* Enhanced Buttons - shadcn/ui style */
183183
.btn {
184184
display: inline-flex;
185185
align-items: center;
186186
justify-content: center;
187-
padding: 0.75rem 1.5rem;
188-
border: 2px solid transparent;
189-
border-radius: 0.75rem;
187+
border-radius: 0.5rem;
190188
font-size: 0.875rem;
191-
font-weight: 600;
189+
font-weight: 500;
192190
text-decoration: none;
193191
cursor: pointer;
194192
transition: all 0.2s ease;
195-
background-color: var(--bg-tertiary);
196-
color: var(--text-primary);
197-
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
198193
position: relative;
199194
overflow: hidden;
195+
border: 1px solid transparent;
196+
background-color: transparent;
197+
color: var(--text-primary);
198+
padding: 0.5rem 1rem;
199+
line-height: 1.25rem;
200+
white-space: nowrap;
200201
}
201202

202-
.btn::before {
203-
content: '';
204-
position: absolute;
205-
top: 0;
206-
left: -100%;
207-
width: 100%;
208-
height: 100%;
209-
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
210-
transition: left 0.5s;
203+
.btn:hover {
204+
background-color: var(--bg-secondary);
205+
color: var(--text-primary);
211206
}
212207

213-
.btn:hover::before {
214-
left: 100%;
208+
.btn:focus-visible {
209+
outline: 2px solid var(--accent-color);
210+
outline-offset: 2px;
215211
}
216212

217-
.btn:hover {
218-
background-color: var(--bg-secondary);
219-
transform: translateY(-1px);
220-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
213+
.btn:disabled {
214+
opacity: 0.5;
215+
cursor: not-allowed;
221216
}
222217

223-
.btn:active {
224-
transform: translateY(0);
225-
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
218+
.btn-sm {
219+
height: 2rem;
220+
padding: 0 0.75rem;
221+
font-size: 0.75rem;
226222
}
227223

228-
.btn-primary {
224+
.btn-theme {
229225
background-color: var(--accent-color);
230226
color: white;
231-
border-color: var(--accent-color);
227+
font-weight: 600;
228+
padding: 0.5rem 1rem;
229+
border-radius: 0.5rem;
230+
border: 1px solid var(--accent-color);
231+
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
232232
}
233233

234-
.btn-primary:hover {
234+
.btn-theme:hover {
235235
background-color: var(--accent-hover);
236236
border-color: var(--accent-hover);
237+
color: white;
237238
}
238239

240+
.btn-theme:focus-visible {
241+
outline: 2px solid var(--accent-color);
242+
outline-offset: 2px;
243+
}
244+
245+
/* Black button variant */
246+
.btn-black {
247+
background-color: var(--text-primary);
248+
color: var(--bg-primary);
249+
border: 1px solid var(--text-primary);
250+
font-weight: 600;
251+
}
252+
253+
.btn-black:hover {
254+
background-color: var(--text-secondary);
255+
border-color: var(--text-secondary);
256+
color: var(--bg-primary);
257+
}
258+
259+
.btn-black:focus-visible {
260+
outline: 2px solid var(--text-primary);
261+
outline-offset: 2px;
262+
}
263+
264+
/* Secondary button variant */
239265
.btn-secondary {
240266
background-color: var(--bg-secondary);
241-
border-color: var(--border-color);
242267
color: var(--text-primary);
268+
border: 1px solid var(--border-color);
269+
font-weight: 500;
243270
}
244271

245272
.btn-secondary:hover {
246273
background-color: var(--bg-tertiary);
247-
border-color: var(--accent-color);
248-
}
249-
250-
.btn-sm {
251-
padding: 0.5rem 1rem;
252-
font-size: 0.75rem;
253-
border-radius: 0.5rem;
274+
border-color: var(--text-secondary);
275+
color: var(--text-primary);
254276
}
255277

256-
.btn-theme {
257-
background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
258-
color: white;
259-
font-weight: 700;
260-
font-size: 1rem;
261-
padding: 0.875rem 2rem;
262-
border-radius: 1rem;
263-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
264-
border: none;
278+
.btn-secondary:focus-visible {
279+
outline: 2px solid var(--text-secondary);
280+
outline-offset: 2px;
265281
}
266282

267-
.btn-theme:hover {
268-
background: linear-gradient(135deg, var(--accent-hover), var(--accent-color));
269-
transform: translateY(-2px);
270-
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
283+
/* Remove old button styles */
284+
.btn::before {
285+
display: none;
271286
}
272287

273-
.btn-theme:active {
274-
transform: translateY(0);
288+
.btn:hover::before {
289+
display: none;
275290
}
276291

277292
/* Footer */

projects/demo/src/app/app.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ <h1>&#64;angularui/theme</h1>
1616
<section class="hero">
1717
<!-- Theme Controls -->
1818
<div class="theme-controls">
19-
<button class="btn btn-theme" (click)="toggleTheme()">Toggle Theme</button>
19+
<button class="btn btn-black" (click)="toggleTheme()">Toggle Theme</button>
2020
<div class="theme-buttons">
21-
<button class="btn btn-sm" (click)="setTheme('light')">Light</button>
22-
<button class="btn btn-sm" (click)="setTheme('dark')">Dark</button>
23-
<button class="btn btn-sm" (click)="setTheme('system')">System</button>
21+
<button class="btn btn-secondary btn-sm" (click)="setTheme('light')">Light</button>
22+
<button class="btn btn-secondary btn-sm" (click)="setTheme('dark')">Dark</button>
23+
<button class="btn btn-secondary btn-sm" (click)="setTheme('system')">System</button>
2424
</div>
2525
</div>
2626

projects/demo/src/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
<!doctype html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="utf-8">
5-
<title>Demo</title>
6+
<title>Angular UI Theme: Modern Theme Management for Angular</title>
67
<base href="/">
78
<meta name="viewport" content="width=device-width, initial-scale=1">
89
<link rel="icon" type="image/x-icon" href="favicon.ico">
910
</head>
11+
1012
<body>
1113
<app-root></app-root>
1214
</body>
13-
</html>
15+
16+
</html>

0 commit comments

Comments
 (0)