@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.
Files changed (35) hide show
  1. package/dist/cjs/components/NavigationTransition/NavigationTransition.js +25 -8
  2. package/dist/cjs/components/NavigationTransition/NavigationTransition.js.map +1 -1
  3. package/dist/cjs/components/SpecList/SpecList.css +34 -21
  4. package/dist/cjs/components/SpecList/SpecList.js +9 -3
  5. package/dist/cjs/components/SpecList/SpecList.js.map +1 -1
  6. package/dist/esm/components/NavigationTransition/NavigationTransition.js +25 -8
  7. package/dist/esm/components/NavigationTransition/NavigationTransition.js.map +1 -1
  8. package/dist/esm/components/SpecList/SpecList.css +34 -21
  9. package/dist/esm/components/SpecList/SpecList.js +9 -3
  10. package/dist/esm/components/SpecList/SpecList.js.map +1 -1
  11. package/dist/styles/components/SpecList.css +34 -21
  12. package/dist/styles/index.css +2641 -2591
  13. package/dist/styles/muka-dark.css +2641 -2591
  14. package/dist/styles/muka-light.css +2641 -2591
  15. package/dist/styles/tokens-bouwplan-dark.css +37 -0
  16. package/dist/styles/tokens-bouwplan-light.css +37 -0
  17. package/dist/styles/tokens-fscl-dark.css +37 -0
  18. package/dist/styles/tokens-fscl-light.css +37 -0
  19. package/dist/styles/tokens-grip-dark.css +37 -0
  20. package/dist/styles/tokens-grip-light.css +37 -0
  21. package/dist/styles/tokens-muka-dark.css +37 -0
  22. package/dist/styles/tokens-muka-light.css +37 -0
  23. package/dist/styles/tokens-wireframe-dark.css +37 -0
  24. package/dist/styles/tokens-wireframe-light.css +37 -0
  25. package/dist/styles/wireframe-dark.css +2641 -2591
  26. package/dist/styles/wireframe-light.css +2641 -2591
  27. package/dist/types/components/NavigationTransition/NavigationTransition.d.ts +3 -1
  28. package/dist/types/components/NavigationTransition/NavigationTransition.d.ts.map +1 -1
  29. package/dist/types/components/SpecList/SpecList.d.ts +13 -5
  30. package/dist/types/components/SpecList/SpecList.d.ts.map +1 -1
  31. package/package.json +1 -1
  32. package/scripts/build-tokens.js +12 -1
  33. package/tokens/t1-primitives/motion.json +21 -0
  34. package/tokens/t2-alias/base.json +17 -0
  35. 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 (default: 300) */
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;AAIpC,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,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAwGpE,CAAC;AAEF,eAAe,oBAAoB,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
- * Visual density.
24
- * - `default` — comfortable spacing for scanning specs at a glance
25
- * - `compact` — denser for long lists
23
+ * Row layout.
24
+ * - `horizontal` — label and value side by side
25
+ * - `vertical` — label stacked above the value
26
26
  */
27
- density?: 'default' | 'compact';
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,MA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C,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revikornmann/muka-ui",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Muka Design System - Multi-brand design tokens and React components",
5
5
  "main": "dist/cjs/components/index.js",
6
6
  "module": "dist/esm/components/index.js",
@@ -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
  }