@happyvertical/smrt-ui 0.57.3 → 0.57.5
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.
|
@@ -365,6 +365,22 @@ const placementClass = $derived(`modal--${placement}`);
|
|
|
365
365
|
color: var(--smrt-color-on-surface);
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
+
/* A form's action bar in the body (a dialog that is one form, such as a
|
|
369
|
+
widget's options) stays in view at the foot of the scrolling body, as a
|
|
370
|
+
footer does, however long the form. Phones already pin it to the screen. */
|
|
371
|
+
@media (width > 48rem) {
|
|
372
|
+
.modal__body :global([data-form-action-bar]) {
|
|
373
|
+
position: sticky;
|
|
374
|
+
inset-block-end: calc(-1 * var(--smrt-spacing-5, 1.25rem));
|
|
375
|
+
z-index: 1;
|
|
376
|
+
margin-inline: calc(-1 * var(--smrt-spacing-5, 1.25rem));
|
|
377
|
+
margin-block-end: calc(-1 * var(--smrt-spacing-5, 1.25rem));
|
|
378
|
+
padding: var(--smrt-spacing-4, 1rem) var(--smrt-spacing-5, 1.25rem);
|
|
379
|
+
background: var(--smrt-glass-surface-strong);
|
|
380
|
+
backdrop-filter: blur(var(--smrt-glass-blur)) saturate(var(--smrt-glass-saturation));
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
368
384
|
/* Footer */
|
|
369
385
|
.modal__footer {
|
|
370
386
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-theme.d.ts","sourceRoot":"","sources":["../../src/themes/create-theme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,YAAY,EACZ,KAAK,EACL,WAAW,EACX,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,E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AyBG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,KAAK,CA8E9D;AAkBD;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG1D;AAgBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAEhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAIjE;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,GAC1D,KAAK,CAWP;AAID;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,OAAO,GAAG,MAAM,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCxB"}
|
|
@@ -76,34 +76,27 @@ function normalizeHex(color) {
|
|
|
76
76
|
return rgbToHex(r, g, b);
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Generate dark mode colors from light mode colors
|
|
80
|
-
*
|
|
79
|
+
* Generate dark mode colors from light mode colors: tonal pairs for primary
|
|
80
|
+
* and secondary, fixed dark neutrals for the surfaces. For production use,
|
|
81
|
+
* define dark colors by hand.
|
|
81
82
|
*/
|
|
82
83
|
function generateDarkColors(light) {
|
|
83
|
-
// Adjust color brightness by a multiplicative factor. Normalizes the input to
|
|
84
|
-
// RGB first (via the shared parser), so 3-digit hex and rgb()/rgba() inputs no
|
|
85
|
-
// longer NaN-poison the output into `#NaNNaNNaN` (#1586).
|
|
86
|
-
const adjustBrightness = (color, factor) => {
|
|
87
|
-
const { r, g, b } = hexToRgb(color);
|
|
88
|
-
if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {
|
|
89
|
-
throw new Error(`createTheme: unsupported color "${color}". Use 6-digit hex (#rrggbb), ` +
|
|
90
|
-
'3-digit hex (#rgb), or rgb()/rgba() notation.');
|
|
91
|
-
}
|
|
92
|
-
return rgbToHex(r * factor, g * factor, b * factor);
|
|
93
|
-
};
|
|
94
84
|
// Multiplying a very dark brand seed stays dark. Use tonal primary pairs so
|
|
95
85
|
// icons and labels keep contrast against their containers in dark mode.
|
|
96
86
|
const primary = generateTheme(light.primary, 'dark');
|
|
87
|
+
// The same for the secondary pair: scaling a light container down and its
|
|
88
|
+
// dark label up left both dark (an active nav item read about 1.6:1).
|
|
89
|
+
const secondary = generateTheme(normalizeHex(light.secondary), 'dark');
|
|
97
90
|
return {
|
|
98
91
|
...light,
|
|
99
92
|
primary: primary.primary,
|
|
100
93
|
onPrimary: primary.onPrimary,
|
|
101
94
|
primaryContainer: primary.primaryContainer,
|
|
102
95
|
onPrimaryContainer: primary.onPrimaryContainer,
|
|
103
|
-
secondary:
|
|
104
|
-
onSecondary:
|
|
105
|
-
secondaryContainer:
|
|
106
|
-
onSecondaryContainer:
|
|
96
|
+
secondary: secondary.secondary,
|
|
97
|
+
onSecondary: secondary.onSecondary,
|
|
98
|
+
secondaryContainer: secondary.secondaryContainer,
|
|
99
|
+
onSecondaryContainer: secondary.onSecondaryContainer,
|
|
107
100
|
surface: '#111827',
|
|
108
101
|
onSurface: '#f9fafb',
|
|
109
102
|
surfaceVariant: '#1f2937',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-ui",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.5",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Domain-agnostic Svelte 5 UI runtime for SMRT: primitives, i18n client, theme system, and module UI registry",
|
|
6
6
|
"type": "module",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"access": "public"
|
|
165
165
|
},
|
|
166
166
|
"dependencies": {
|
|
167
|
-
"@happyvertical/smrt-types": "0.57.
|
|
167
|
+
"@happyvertical/smrt-types": "0.57.5",
|
|
168
168
|
"esm-env": "^1.2.2"
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
182
|
"devDependencies": {
|
|
183
|
-
"@happyvertical/speech": "^0.
|
|
183
|
+
"@happyvertical/speech": "^0.105.2",
|
|
184
184
|
"@sveltejs/package": "^2.5.8",
|
|
185
185
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
186
186
|
"@testing-library/jest-dom": "^7.0.1",
|