@akcelik/strct 0.7.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -14
- package/fesm2022/akcelik-strct.mjs +81 -38
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_base.scss +8 -0
- package/styles/_tokens.scss +34 -12
- package/types/akcelik-strct.d.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
|
|
5
5
|
"author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
package/styles/_base.scss
CHANGED
|
@@ -62,6 +62,14 @@ kbd,
|
|
|
62
62
|
outline-offset: 2px;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
// Stronger, fully-opaque focus ring when the OS asks for more contrast.
|
|
66
|
+
@media (prefers-contrast: more) {
|
|
67
|
+
:focus-visible {
|
|
68
|
+
outline: 3px solid var(--acc);
|
|
69
|
+
outline-offset: 2px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
65
73
|
@media (prefers-reduced-motion: reduce) {
|
|
66
74
|
*,
|
|
67
75
|
*::before,
|
package/styles/_tokens.scss
CHANGED
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
--shadow-rest: var(--sh);
|
|
62
62
|
--shadow-elevated: var(--shh);
|
|
63
63
|
--shadow-floating: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--b2);
|
|
64
|
-
--text-xs:
|
|
64
|
+
--text-xs: 12px;
|
|
65
65
|
--text-sm: 12px;
|
|
66
66
|
--text-md: 13px;
|
|
67
67
|
--text-lg: 14px;
|
|
68
68
|
--text-xl: 16px;
|
|
69
69
|
--leading-tight: 1.2;
|
|
70
|
-
--leading-normal: 1.
|
|
70
|
+
--leading-normal: 1.5;
|
|
71
71
|
--leading-loose: 1.6;
|
|
72
72
|
--disabled-opacity: 0.5;
|
|
73
73
|
}
|
|
@@ -117,13 +117,13 @@
|
|
|
117
117
|
--shadow-rest: var(--sh);
|
|
118
118
|
--shadow-elevated: var(--shh);
|
|
119
119
|
--shadow-floating: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--b2);
|
|
120
|
-
--text-xs:
|
|
120
|
+
--text-xs: 12px;
|
|
121
121
|
--text-sm: 12px;
|
|
122
122
|
--text-md: 13px;
|
|
123
123
|
--text-lg: 14px;
|
|
124
124
|
--text-xl: 16px;
|
|
125
125
|
--leading-tight: 1.2;
|
|
126
|
-
--leading-normal: 1.
|
|
126
|
+
--leading-normal: 1.5;
|
|
127
127
|
--leading-loose: 1.6;
|
|
128
128
|
--disabled-opacity: 0.5;
|
|
129
129
|
}
|
|
@@ -173,13 +173,13 @@
|
|
|
173
173
|
--shadow-rest: var(--sh);
|
|
174
174
|
--shadow-elevated: var(--shh);
|
|
175
175
|
--shadow-floating: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--b2);
|
|
176
|
-
--text-xs:
|
|
176
|
+
--text-xs: 12px;
|
|
177
177
|
--text-sm: 12px;
|
|
178
178
|
--text-md: 13px;
|
|
179
179
|
--text-lg: 14px;
|
|
180
180
|
--text-xl: 16px;
|
|
181
181
|
--leading-tight: 1.2;
|
|
182
|
-
--leading-normal: 1.
|
|
182
|
+
--leading-normal: 1.5;
|
|
183
183
|
--leading-loose: 1.6;
|
|
184
184
|
--disabled-opacity: 0.5;
|
|
185
185
|
}
|
|
@@ -229,13 +229,13 @@
|
|
|
229
229
|
--shadow-rest: var(--sh);
|
|
230
230
|
--shadow-elevated: var(--shh);
|
|
231
231
|
--shadow-floating: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--b2);
|
|
232
|
-
--text-xs:
|
|
232
|
+
--text-xs: 12px;
|
|
233
233
|
--text-sm: 12px;
|
|
234
234
|
--text-md: 13px;
|
|
235
235
|
--text-lg: 14px;
|
|
236
236
|
--text-xl: 16px;
|
|
237
237
|
--leading-tight: 1.2;
|
|
238
|
-
--leading-normal: 1.
|
|
238
|
+
--leading-normal: 1.5;
|
|
239
239
|
--leading-loose: 1.6;
|
|
240
240
|
--disabled-opacity: 0.5;
|
|
241
241
|
}
|
|
@@ -285,13 +285,13 @@
|
|
|
285
285
|
--shadow-rest: var(--sh);
|
|
286
286
|
--shadow-elevated: var(--shh);
|
|
287
287
|
--shadow-floating: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--b2);
|
|
288
|
-
--text-xs:
|
|
288
|
+
--text-xs: 12px;
|
|
289
289
|
--text-sm: 12px;
|
|
290
290
|
--text-md: 13px;
|
|
291
291
|
--text-lg: 14px;
|
|
292
292
|
--text-xl: 16px;
|
|
293
293
|
--leading-tight: 1.2;
|
|
294
|
-
--leading-normal: 1.
|
|
294
|
+
--leading-normal: 1.5;
|
|
295
295
|
--leading-loose: 1.6;
|
|
296
296
|
--disabled-opacity: 0.5;
|
|
297
297
|
}
|
|
@@ -341,13 +341,35 @@
|
|
|
341
341
|
--shadow-rest: var(--sh);
|
|
342
342
|
--shadow-elevated: var(--shh);
|
|
343
343
|
--shadow-floating: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--b2);
|
|
344
|
-
--text-xs:
|
|
344
|
+
--text-xs: 12px;
|
|
345
345
|
--text-sm: 12px;
|
|
346
346
|
--text-md: 13px;
|
|
347
347
|
--text-lg: 14px;
|
|
348
348
|
--text-xl: 16px;
|
|
349
349
|
--leading-tight: 1.2;
|
|
350
|
-
--leading-normal: 1.
|
|
350
|
+
--leading-normal: 1.5;
|
|
351
351
|
--leading-loose: 1.6;
|
|
352
352
|
--disabled-opacity: 0.5;
|
|
353
353
|
}
|
|
354
|
+
|
|
355
|
+
// Honour the OS "increase contrast" preference (low-vision users / bright ambient
|
|
356
|
+
// light): strengthen borders and lift secondary/tertiary text toward primary.
|
|
357
|
+
// Only active when the OS asks, so the default look is untouched. Scoped by
|
|
358
|
+
// [data-palette][data-theme] (equal specificity to the scheme blocks, later in
|
|
359
|
+
// source) so it wins the cascade for every palette.
|
|
360
|
+
@media (prefers-contrast: more) {
|
|
361
|
+
[data-palette][data-theme='dark'] {
|
|
362
|
+
--b1: rgba(255, 255, 255, 0.14);
|
|
363
|
+
--b2: rgba(255, 255, 255, 0.24);
|
|
364
|
+
--b3: rgba(255, 255, 255, 0.36);
|
|
365
|
+
--t2: rgba(255, 255, 255, 0.78);
|
|
366
|
+
--t3: rgba(255, 255, 255, 0.62);
|
|
367
|
+
}
|
|
368
|
+
[data-palette][data-theme='light'] {
|
|
369
|
+
--b1: rgba(0, 0, 0, 0.18);
|
|
370
|
+
--b2: rgba(0, 0, 0, 0.3);
|
|
371
|
+
--b3: rgba(0, 0, 0, 0.42);
|
|
372
|
+
--t2: rgba(0, 0, 0, 0.82);
|
|
373
|
+
--t3: rgba(0, 0, 0, 0.7);
|
|
374
|
+
}
|
|
375
|
+
}
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -34,6 +34,12 @@ declare class StrctThemeService {
|
|
|
34
34
|
constructor();
|
|
35
35
|
setPalette(palette: StrctPalette): void;
|
|
36
36
|
setMode(mode: StrctMode): void;
|
|
37
|
+
private applyPalette;
|
|
38
|
+
private applyMode;
|
|
39
|
+
/** The OS-level light/dark preference, or null when matchMedia is unavailable. */
|
|
40
|
+
private systemMode;
|
|
41
|
+
/** Track OS theme changes until the user makes an explicit choice. */
|
|
42
|
+
private watchSystemMode;
|
|
37
43
|
toggleMode(): void;
|
|
38
44
|
private read;
|
|
39
45
|
private write;
|
|
@@ -1847,7 +1853,7 @@ declare class StrctAlert {
|
|
|
1847
1853
|
readonly closable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1848
1854
|
/** Emitted when the alert is dismissed. */
|
|
1849
1855
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1850
|
-
protected readonly icon: _angular_core.Signal<"
|
|
1856
|
+
protected readonly icon: _angular_core.Signal<"info" | "success" | "warning" | "critical">;
|
|
1851
1857
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctAlert, never>;
|
|
1852
1858
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctAlert, "strct-alert", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
|
|
1853
1859
|
}
|