@revikornmann/muka-ui 0.6.0 → 0.7.0
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/dist/cjs/components/NavigationTransition/NavigationTransition.js +25 -8
- package/dist/cjs/components/NavigationTransition/NavigationTransition.js.map +1 -1
- package/dist/cjs/components/SpecList/SpecList.css +34 -21
- package/dist/cjs/components/SpecList/SpecList.js +9 -3
- package/dist/cjs/components/SpecList/SpecList.js.map +1 -1
- package/dist/esm/components/NavigationTransition/NavigationTransition.js +25 -8
- package/dist/esm/components/NavigationTransition/NavigationTransition.js.map +1 -1
- package/dist/esm/components/SpecList/SpecList.css +34 -21
- package/dist/esm/components/SpecList/SpecList.js +9 -3
- package/dist/esm/components/SpecList/SpecList.js.map +1 -1
- package/dist/styles/components/SpecList.css +34 -21
- package/dist/styles/index.css +2641 -2591
- package/dist/styles/muka-dark.css +2641 -2591
- package/dist/styles/muka-light.css +2641 -2591
- package/dist/styles/tokens-bouwplan-dark.css +37 -0
- package/dist/styles/tokens-bouwplan-light.css +37 -0
- package/dist/styles/tokens-fscl-dark.css +37 -0
- package/dist/styles/tokens-fscl-light.css +37 -0
- package/dist/styles/tokens-grip-dark.css +37 -0
- package/dist/styles/tokens-grip-light.css +37 -0
- package/dist/styles/tokens-muka-dark.css +37 -0
- package/dist/styles/tokens-muka-light.css +37 -0
- package/dist/styles/tokens-wireframe-dark.css +37 -0
- package/dist/styles/tokens-wireframe-light.css +37 -0
- package/dist/styles/wireframe-dark.css +2641 -2591
- package/dist/styles/wireframe-light.css +2641 -2591
- package/dist/types/components/NavigationTransition/NavigationTransition.d.ts +3 -1
- package/dist/types/components/NavigationTransition/NavigationTransition.d.ts.map +1 -1
- package/dist/types/components/SpecList/SpecList.d.ts +13 -5
- package/dist/types/components/SpecList/SpecList.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/build-tokens.js +12 -1
- package/tokens/t1-primitives/motion.json +21 -0
- package/tokens/t2-alias/base.json +17 -0
- package/tokens/t3-semantics/ui.json +12 -0
|
@@ -7,8 +7,10 @@ export interface NavigationTransitionProps {
|
|
|
7
7
|
activeKey: string;
|
|
8
8
|
/** Direction of the navigation transition */
|
|
9
9
|
direction: 'forward' | 'back';
|
|
10
|
-
/** Animation duration in ms
|
|
10
|
+
/** Animation duration in ms. Defaults to the --motion-duration-view token value. */
|
|
11
11
|
duration?: number;
|
|
12
|
+
/** CSS easing string. Defaults to the spring easing (--motion-easing-enter token value). */
|
|
13
|
+
easing?: string;
|
|
12
14
|
/** Additional CSS classes */
|
|
13
15
|
className?: string;
|
|
14
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationTransition.d.ts","sourceRoot":"","sources":["../../../../components/NavigationTransition/NavigationTransition.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAC5E,OAAO,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"NavigationTransition.d.ts","sourceRoot":"","sources":["../../../../components/NavigationTransition/NavigationTransition.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAC5E,OAAO,4BAA4B,CAAC;AAKpC,MAAM,WAAW,yBAAyB;IACxC,2CAA2C;IAC3C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAElB,6CAA6C;IAC7C,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC;IAE9B,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiBD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA8GpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -20,11 +20,18 @@ export interface SpecListProps {
|
|
|
20
20
|
/** SpecRow children */
|
|
21
21
|
children: React.ReactNode;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* - `
|
|
25
|
-
* - `
|
|
23
|
+
* Row layout.
|
|
24
|
+
* - `horizontal` — label and value side by side
|
|
25
|
+
* - `vertical` — label stacked above the value
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
stacking?: 'horizontal' | 'vertical';
|
|
28
|
+
/**
|
|
29
|
+
* Fixed label column width (horizontal stacking only).
|
|
30
|
+
* - `small` — 80px
|
|
31
|
+
* - `medium` — 120px
|
|
32
|
+
* - `large` — 160px
|
|
33
|
+
*/
|
|
34
|
+
labelWidth?: 'small' | 'medium' | 'large';
|
|
28
35
|
/** Additional CSS classes */
|
|
29
36
|
className?: string;
|
|
30
37
|
}
|
|
@@ -33,7 +40,8 @@ export interface SpecListProps {
|
|
|
33
40
|
*
|
|
34
41
|
* Mobile-friendly alternative to `Table` when displaying flat key/value data
|
|
35
42
|
* (e.g. motorcycle specs, vehicle details). Each row is a `<dt>/<dd>` pair
|
|
36
|
-
* inside a `<dl>` for semantic accessibility.
|
|
43
|
+
* inside a `<dl>` for semantic accessibility. Renders flat — no background,
|
|
44
|
+
* radius, or dividers — so it sits directly on the page surface.
|
|
37
45
|
*/
|
|
38
46
|
export declare const SpecList: React.FC<SpecListProps>;
|
|
39
47
|
export default SpecList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpecList.d.ts","sourceRoot":"","sources":["../../../../components/SpecList/SpecList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AAIxB,MAAM,WAAW,YAAY;IAC3B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IAEd,kCAAkC;IAClC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAW1C,CAAC;AAIF,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"SpecList.d.ts","sourceRoot":"","sources":["../../../../components/SpecList/SpecList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AAIxB,MAAM,WAAW,YAAY;IAC3B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IAEd,kCAAkC;IAClC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAW1C,CAAC;AAIF,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAErC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAE1C,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAe5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/package.json
CHANGED
package/scripts/build-tokens.js
CHANGED
|
@@ -239,7 +239,10 @@ class TokenBuilder {
|
|
|
239
239
|
|
|
240
240
|
// Layout mode forcing (for Storybook / design tools)
|
|
241
241
|
css += this.generateLayoutModeCSS(tokens);
|
|
242
|
-
|
|
242
|
+
|
|
243
|
+
// Accessibility: zero out motion durations when user prefers reduced motion
|
|
244
|
+
css += this.generateReducedMotionCSS(selector);
|
|
245
|
+
|
|
243
246
|
// Add root fallback for default theme
|
|
244
247
|
if (brand === 'muka' && theme === 'light') {
|
|
245
248
|
css += '\n/* Default theme fallback */\n:root {\n';
|
|
@@ -255,6 +258,9 @@ class TokenBuilder {
|
|
|
255
258
|
|
|
256
259
|
// Layout mode forcing for :root fallback
|
|
257
260
|
css += this.generateLayoutModeCSS(tokens);
|
|
261
|
+
|
|
262
|
+
// Accessibility: reduced motion for :root fallback
|
|
263
|
+
css += this.generateReducedMotionCSS(':root');
|
|
258
264
|
}
|
|
259
265
|
|
|
260
266
|
return css;
|
|
@@ -386,6 +392,11 @@ class TokenBuilder {
|
|
|
386
392
|
return css;
|
|
387
393
|
}
|
|
388
394
|
|
|
395
|
+
// Generate @media (prefers-reduced-motion: reduce) block that zeros out motion durations
|
|
396
|
+
generateReducedMotionCSS(selector) {
|
|
397
|
+
return `\n/* Accessibility: disable motion for users who prefer reduced motion */\n@media (prefers-reduced-motion: reduce) {\n ${selector} {\n --motion-duration-micro: 0ms;\n --motion-duration-component: 0ms;\n --motion-duration-view: 0ms;\n }\n}\n`;
|
|
398
|
+
}
|
|
399
|
+
|
|
389
400
|
// Build tokens for Storybook
|
|
390
401
|
async build() {
|
|
391
402
|
console.log('🚀 Building design tokens for Storybook...\n');
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": {
|
|
3
|
+
"$type": "other",
|
|
4
|
+
"$value": "https://design-tokens.org/schemas/1.0/schema.json"
|
|
5
|
+
},
|
|
6
|
+
"duration": {
|
|
7
|
+
"none": { "$type": "duration", "$value": "0ms" },
|
|
8
|
+
"instant": { "$type": "duration", "$value": "100ms" },
|
|
9
|
+
"fast": { "$type": "duration", "$value": "150ms" },
|
|
10
|
+
"normal": { "$type": "duration", "$value": "200ms" },
|
|
11
|
+
"slow": { "$type": "duration", "$value": "300ms" },
|
|
12
|
+
"slower": { "$type": "duration", "$value": "500ms" }
|
|
13
|
+
},
|
|
14
|
+
"easing": {
|
|
15
|
+
"standard": { "$type": "other", "$value": "cubic-bezier(0.4, 0, 0.2, 1)" },
|
|
16
|
+
"enter": { "$type": "other", "$value": "cubic-bezier(0, 0, 0.2, 1)" },
|
|
17
|
+
"exit": { "$type": "other", "$value": "cubic-bezier(0.4, 0, 1, 1)" },
|
|
18
|
+
"spring": { "$type": "other", "$value": "cubic-bezier(0.16, 1, 0.3, 1)" },
|
|
19
|
+
"linear": { "$type": "other", "$value": "linear" }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -439,6 +439,23 @@
|
|
|
439
439
|
"$type": "borderRadius",
|
|
440
440
|
"$value": "{radius.full}"
|
|
441
441
|
}
|
|
442
|
+
},
|
|
443
|
+
"motion": {
|
|
444
|
+
"duration": {
|
|
445
|
+
"none": { "$type": "duration", "$value": "{duration.none}" },
|
|
446
|
+
"instant": { "$type": "duration", "$value": "{duration.instant}" },
|
|
447
|
+
"fast": { "$type": "duration", "$value": "{duration.fast}" },
|
|
448
|
+
"normal": { "$type": "duration", "$value": "{duration.normal}" },
|
|
449
|
+
"slow": { "$type": "duration", "$value": "{duration.slow}" },
|
|
450
|
+
"slower": { "$type": "duration", "$value": "{duration.slower}" }
|
|
451
|
+
},
|
|
452
|
+
"easing": {
|
|
453
|
+
"standard": { "$type": "other", "$value": "{easing.standard}" },
|
|
454
|
+
"enter": { "$type": "other", "$value": "{easing.enter}" },
|
|
455
|
+
"exit": { "$type": "other", "$value": "{easing.exit}" },
|
|
456
|
+
"spring": { "$type": "other", "$value": "{easing.spring}" },
|
|
457
|
+
"linear": { "$type": "other", "$value": "{easing.linear}" }
|
|
458
|
+
}
|
|
442
459
|
}
|
|
443
460
|
}
|
|
444
461
|
}
|
|
@@ -1358,5 +1358,17 @@
|
|
|
1358
1358
|
}
|
|
1359
1359
|
]
|
|
1360
1360
|
}
|
|
1361
|
+
},
|
|
1362
|
+
"motion": {
|
|
1363
|
+
"duration": {
|
|
1364
|
+
"micro": { "$type": "duration", "$value": "{alias.motion.duration.fast}" },
|
|
1365
|
+
"component": { "$type": "duration", "$value": "{alias.motion.duration.normal}" },
|
|
1366
|
+
"view": { "$type": "duration", "$value": "{alias.motion.duration.slow}" }
|
|
1367
|
+
},
|
|
1368
|
+
"easing": {
|
|
1369
|
+
"default": { "$type": "other", "$value": "{alias.motion.easing.standard}" },
|
|
1370
|
+
"enter": { "$type": "other", "$value": "{alias.motion.easing.spring}" },
|
|
1371
|
+
"exit": { "$type": "other", "$value": "{alias.motion.easing.exit}" }
|
|
1372
|
+
}
|
|
1361
1373
|
}
|
|
1362
1374
|
}
|