@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
|
@@ -5,12 +5,26 @@ exports.NavigationTransition = void 0;
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
require("./NavigationTransition.css");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const DURATION_FALLBACK = 300;
|
|
9
|
+
const EASING_FALLBACK = 'cubic-bezier(0.16, 1, 0.3, 1)';
|
|
10
|
+
function getResolvedDuration(durationProp, el) {
|
|
11
|
+
if (durationProp !== undefined)
|
|
12
|
+
return durationProp;
|
|
13
|
+
if (typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches)
|
|
14
|
+
return 0;
|
|
15
|
+
if (el) {
|
|
16
|
+
const raw = getComputedStyle(el).getPropertyValue('--motion-duration-view').trim();
|
|
17
|
+
if (raw)
|
|
18
|
+
return parseInt(raw, 10);
|
|
19
|
+
}
|
|
20
|
+
return DURATION_FALLBACK;
|
|
21
|
+
}
|
|
22
|
+
const NavigationTransition = ({ activeView, activeKey, direction, duration, easing, className = '', }) => {
|
|
10
23
|
const [transition, setTransition] = (0, react_1.useState)(null);
|
|
11
24
|
const prevViewRef = (0, react_1.useRef)(activeView);
|
|
12
25
|
const prevKeyRef = (0, react_1.useRef)(activeKey);
|
|
13
26
|
const timerRef = (0, react_1.useRef)();
|
|
27
|
+
const containerRef = (0, react_1.useRef)(null);
|
|
14
28
|
const topRef = (0, react_1.useRef)(null);
|
|
15
29
|
const bottomRef = (0, react_1.useRef)(null);
|
|
16
30
|
// Detect key change synchronously during render (React's "store previous value" pattern)
|
|
@@ -25,9 +39,11 @@ const NavigationTransition = ({ activeView, activeKey, direction, duration = TRA
|
|
|
25
39
|
(0, react_1.useLayoutEffect)(() => {
|
|
26
40
|
if (!transition || !topRef.current || !bottomRef.current)
|
|
27
41
|
return;
|
|
42
|
+
const resolvedDuration = getResolvedDuration(duration, containerRef.current);
|
|
43
|
+
const resolvedEasing = easing ?? EASING_FALLBACK;
|
|
28
44
|
const options = {
|
|
29
|
-
duration,
|
|
30
|
-
easing:
|
|
45
|
+
duration: resolvedDuration,
|
|
46
|
+
easing: resolvedEasing,
|
|
31
47
|
fill: 'forwards',
|
|
32
48
|
};
|
|
33
49
|
if (transition.direction === 'forward') {
|
|
@@ -38,7 +54,7 @@ const NavigationTransition = ({ activeView, activeKey, direction, duration = TRA
|
|
|
38
54
|
topRef.current.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(100%)' }], options);
|
|
39
55
|
bottomRef.current.animate([{ transform: 'translateX(-30%)' }, { transform: 'translateX(0)' }], options);
|
|
40
56
|
}
|
|
41
|
-
}, [transition, duration]);
|
|
57
|
+
}, [transition, duration, easing]);
|
|
42
58
|
// Keep the previous view ref up-to-date when not transitioning
|
|
43
59
|
(0, react_1.useEffect)(() => {
|
|
44
60
|
if (!transition) {
|
|
@@ -49,9 +65,10 @@ const NavigationTransition = ({ activeView, activeKey, direction, duration = TRA
|
|
|
49
65
|
// End the transition after the animation duration
|
|
50
66
|
(0, react_1.useEffect)(() => {
|
|
51
67
|
if (transition) {
|
|
68
|
+
const resolvedDuration = getResolvedDuration(duration, containerRef.current);
|
|
52
69
|
timerRef.current = window.setTimeout(() => {
|
|
53
70
|
setTransition(null);
|
|
54
|
-
},
|
|
71
|
+
}, resolvedDuration);
|
|
55
72
|
return () => clearTimeout(timerRef.current);
|
|
56
73
|
}
|
|
57
74
|
}, [transition, duration]);
|
|
@@ -60,7 +77,7 @@ const NavigationTransition = ({ activeView, activeKey, direction, duration = TRA
|
|
|
60
77
|
return () => clearTimeout(timerRef.current);
|
|
61
78
|
}, []);
|
|
62
79
|
if (!transition) {
|
|
63
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: `muka-nav-transition ${className}`.trim(), children: activeView }));
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, className: `muka-nav-transition ${className}`.trim(), children: activeView }));
|
|
64
81
|
}
|
|
65
82
|
const isForward = transition.direction === 'forward';
|
|
66
83
|
const enteringView = activeView;
|
|
@@ -69,7 +86,7 @@ const NavigationTransition = ({ activeView, activeKey, direction, duration = TRA
|
|
|
69
86
|
// Back: exiting view on top (slides away), entering below
|
|
70
87
|
const topView = isForward ? enteringView : exitingView;
|
|
71
88
|
const bottomView = isForward ? exitingView : enteringView;
|
|
72
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `muka-nav-transition muka-nav-transition--active ${className}`.trim(), children: [(0, jsx_runtime_1.jsx)("div", { ref: bottomRef, className: "muka-nav-transition__view muka-nav-transition__view--bottom", children: bottomView }), (0, jsx_runtime_1.jsx)("div", { ref: topRef, className: "muka-nav-transition__view muka-nav-transition__view--top", children: topView })] }));
|
|
89
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: containerRef, className: `muka-nav-transition muka-nav-transition--active ${className}`.trim(), children: [(0, jsx_runtime_1.jsx)("div", { ref: bottomRef, className: "muka-nav-transition__view muka-nav-transition__view--bottom", children: bottomView }), (0, jsx_runtime_1.jsx)("div", { ref: topRef, className: "muka-nav-transition__view muka-nav-transition__view--top", children: topView })] }));
|
|
73
90
|
};
|
|
74
91
|
exports.NavigationTransition = NavigationTransition;
|
|
75
92
|
exports.default = exports.NavigationTransition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationTransition.js","sourceRoot":"","sources":["../../../../components/NavigationTransition/NavigationTransition.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,iCAA4E;AAC5E,sCAAoC;AAEpC,MAAM,mBAAmB,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"NavigationTransition.js","sourceRoot":"","sources":["../../../../components/NavigationTransition/NavigationTransition.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,iCAA4E;AAC5E,sCAAoC;AAEpC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,eAAe,GAAG,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vD,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC;IAE1D,OAAO,CACL,iCAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,mDAAmD,SAAS,EAAE,CAAC,IAAI,EAAE,aACtG,gCAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAC,6DAA6D,YACzF,UAAU,GACP,EACN,gCAAK,GAAG,EAAE,MAAM,EAAE,SAAS,EAAC,0DAA0D,YACnF,OAAO,GACJ,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AA9GW,QAAA,oBAAoB,wBA8G/B;AAEF,kBAAe,4BAAoB,CAAC"}
|
|
@@ -3,55 +3,48 @@
|
|
|
3
3
|
.muka-spec-list {
|
|
4
4
|
margin: 0;
|
|
5
5
|
padding: 0;
|
|
6
|
-
background-color: var(--color-surface-level1);
|
|
7
|
-
border-radius: var(--radius-md);
|
|
8
|
-
overflow: hidden;
|
|
9
6
|
}
|
|
10
7
|
|
|
11
8
|
/* ─── Row ─────────────────────────────────────────────── */
|
|
12
9
|
|
|
13
10
|
.muka-spec-row {
|
|
14
11
|
display: flex;
|
|
15
|
-
align-items:
|
|
12
|
+
align-items: flex-start;
|
|
16
13
|
gap: var(--spacing-3);
|
|
17
|
-
padding: var(--spacing-3)
|
|
18
|
-
border-top: var(--border-width-regular) solid var(--color-border-default);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.muka-spec-row:first-child {
|
|
22
|
-
border-top: none;
|
|
14
|
+
padding-bottom: var(--spacing-3);
|
|
23
15
|
}
|
|
24
16
|
|
|
25
17
|
/* ─── Label ───────────────────────────────────────────── */
|
|
26
18
|
|
|
27
19
|
.muka-spec-row__label {
|
|
28
20
|
flex: 0 0 auto;
|
|
29
|
-
min-width: 40%;
|
|
30
21
|
margin: 0;
|
|
31
22
|
color: var(--color-text-subtle-default);
|
|
32
23
|
font-family: var(--text-body-md-regular-fontFamily);
|
|
33
24
|
font-weight: var(--text-body-md-regular-fontWeight);
|
|
34
25
|
font-size: var(--text-body-md-regular-fontSize);
|
|
35
26
|
line-height: var(--text-body-md-regular-lineHeight);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
white-space: nowrap;
|
|
36
30
|
}
|
|
37
31
|
|
|
38
32
|
/* ─── Value ───────────────────────────────────────────── */
|
|
39
33
|
|
|
40
34
|
.muka-spec-row__value {
|
|
41
|
-
flex: 1 1
|
|
35
|
+
flex: 1 1 0;
|
|
36
|
+
min-width: 0;
|
|
42
37
|
margin: 0;
|
|
43
38
|
display: flex;
|
|
44
39
|
flex-direction: column;
|
|
45
|
-
align-items: flex-end;
|
|
46
|
-
text-align: right;
|
|
47
40
|
color: var(--color-text-default-default);
|
|
48
41
|
}
|
|
49
42
|
|
|
50
43
|
.muka-spec-row__value-text {
|
|
51
|
-
font-family: var(--text-body-md-
|
|
52
|
-
font-weight: var(--text-body-md-
|
|
53
|
-
font-size: var(--text-body-md-
|
|
54
|
-
line-height: var(--text-body-md-
|
|
44
|
+
font-family: var(--text-body-md-regular-fontFamily);
|
|
45
|
+
font-weight: var(--text-body-md-regular-fontWeight);
|
|
46
|
+
font-size: var(--text-body-md-regular-fontSize);
|
|
47
|
+
line-height: var(--text-body-md-regular-lineHeight);
|
|
55
48
|
}
|
|
56
49
|
|
|
57
50
|
.muka-spec-row__hint {
|
|
@@ -62,8 +55,28 @@
|
|
|
62
55
|
line-height: var(--text-body-sm-regular-lineHeight);
|
|
63
56
|
}
|
|
64
57
|
|
|
65
|
-
/* ───
|
|
58
|
+
/* ─── Label width (horizontal stacking) ───────────────── */
|
|
59
|
+
|
|
60
|
+
.muka-spec-list--label-small .muka-spec-row__label {
|
|
61
|
+
width: 80px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.muka-spec-list--label-medium .muka-spec-row__label {
|
|
65
|
+
width: 120px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.muka-spec-list--label-large .muka-spec-row__label {
|
|
69
|
+
width: 160px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* ─── Vertical stacking ───────────────────────────────── */
|
|
73
|
+
|
|
74
|
+
.muka-spec-list--vertical .muka-spec-row {
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
gap: var(--spacing-1);
|
|
77
|
+
}
|
|
66
78
|
|
|
67
|
-
.muka-spec-list--
|
|
68
|
-
|
|
79
|
+
.muka-spec-list--vertical .muka-spec-row__label {
|
|
80
|
+
width: 100%;
|
|
81
|
+
white-space: normal;
|
|
69
82
|
}
|
|
@@ -18,10 +18,16 @@ exports.SpecRow = SpecRow;
|
|
|
18
18
|
*
|
|
19
19
|
* Mobile-friendly alternative to `Table` when displaying flat key/value data
|
|
20
20
|
* (e.g. motorcycle specs, vehicle details). Each row is a `<dt>/<dd>` pair
|
|
21
|
-
* inside a `<dl>` for semantic accessibility.
|
|
21
|
+
* inside a `<dl>` for semantic accessibility. Renders flat — no background,
|
|
22
|
+
* radius, or dividers — so it sits directly on the page surface.
|
|
22
23
|
*/
|
|
23
|
-
const SpecList = ({ children,
|
|
24
|
-
const classes = [
|
|
24
|
+
const SpecList = ({ children, stacking = 'horizontal', labelWidth = 'small', className = '', }) => {
|
|
25
|
+
const classes = [
|
|
26
|
+
'muka-spec-list',
|
|
27
|
+
`muka-spec-list--${stacking}`,
|
|
28
|
+
`muka-spec-list--label-${labelWidth}`,
|
|
29
|
+
className,
|
|
30
|
+
]
|
|
25
31
|
.filter(Boolean)
|
|
26
32
|
.join(' ');
|
|
27
33
|
return (0, jsx_runtime_1.jsx)("dl", { className: classes, children: children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpecList.js","sourceRoot":"","sources":["../../../../components/SpecList/SpecList.tsx"],"names":[],"mappings":";;;;AACA,0BAAwB;AAkBxB;;;;GAIG;AACI,MAAM,OAAO,GAA2B,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAA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GAAG,OAAO,EACpB,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,gBAAgB;QAChB,mBAAmB,QAAQ,EAAE;QAC7B,yBAAyB,UAAU,EAAE;QACrC,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,+BAAI,SAAS,EAAE,OAAO,YAAG,QAAQ,GAAM,CAAC;AACjD,CAAC,CAAC;AAfW,QAAA,QAAQ,YAenB;AAEF,kBAAe,gBAAQ,CAAC"}
|
|
@@ -2,12 +2,26 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useLayoutEffect, useRef } from 'react';
|
|
4
4
|
import './NavigationTransition.css';
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const DURATION_FALLBACK = 300;
|
|
6
|
+
const EASING_FALLBACK = 'cubic-bezier(0.16, 1, 0.3, 1)';
|
|
7
|
+
function getResolvedDuration(durationProp, el) {
|
|
8
|
+
if (durationProp !== undefined)
|
|
9
|
+
return durationProp;
|
|
10
|
+
if (typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches)
|
|
11
|
+
return 0;
|
|
12
|
+
if (el) {
|
|
13
|
+
const raw = getComputedStyle(el).getPropertyValue('--motion-duration-view').trim();
|
|
14
|
+
if (raw)
|
|
15
|
+
return parseInt(raw, 10);
|
|
16
|
+
}
|
|
17
|
+
return DURATION_FALLBACK;
|
|
18
|
+
}
|
|
19
|
+
export const NavigationTransition = ({ activeView, activeKey, direction, duration, easing, className = '', }) => {
|
|
7
20
|
const [transition, setTransition] = useState(null);
|
|
8
21
|
const prevViewRef = useRef(activeView);
|
|
9
22
|
const prevKeyRef = useRef(activeKey);
|
|
10
23
|
const timerRef = useRef();
|
|
24
|
+
const containerRef = useRef(null);
|
|
11
25
|
const topRef = useRef(null);
|
|
12
26
|
const bottomRef = useRef(null);
|
|
13
27
|
// Detect key change synchronously during render (React's "store previous value" pattern)
|
|
@@ -22,9 +36,11 @@ export const NavigationTransition = ({ activeView, activeKey, direction, duratio
|
|
|
22
36
|
useLayoutEffect(() => {
|
|
23
37
|
if (!transition || !topRef.current || !bottomRef.current)
|
|
24
38
|
return;
|
|
39
|
+
const resolvedDuration = getResolvedDuration(duration, containerRef.current);
|
|
40
|
+
const resolvedEasing = easing ?? EASING_FALLBACK;
|
|
25
41
|
const options = {
|
|
26
|
-
duration,
|
|
27
|
-
easing:
|
|
42
|
+
duration: resolvedDuration,
|
|
43
|
+
easing: resolvedEasing,
|
|
28
44
|
fill: 'forwards',
|
|
29
45
|
};
|
|
30
46
|
if (transition.direction === 'forward') {
|
|
@@ -35,7 +51,7 @@ export const NavigationTransition = ({ activeView, activeKey, direction, duratio
|
|
|
35
51
|
topRef.current.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(100%)' }], options);
|
|
36
52
|
bottomRef.current.animate([{ transform: 'translateX(-30%)' }, { transform: 'translateX(0)' }], options);
|
|
37
53
|
}
|
|
38
|
-
}, [transition, duration]);
|
|
54
|
+
}, [transition, duration, easing]);
|
|
39
55
|
// Keep the previous view ref up-to-date when not transitioning
|
|
40
56
|
useEffect(() => {
|
|
41
57
|
if (!transition) {
|
|
@@ -46,9 +62,10 @@ export const NavigationTransition = ({ activeView, activeKey, direction, duratio
|
|
|
46
62
|
// End the transition after the animation duration
|
|
47
63
|
useEffect(() => {
|
|
48
64
|
if (transition) {
|
|
65
|
+
const resolvedDuration = getResolvedDuration(duration, containerRef.current);
|
|
49
66
|
timerRef.current = window.setTimeout(() => {
|
|
50
67
|
setTransition(null);
|
|
51
|
-
},
|
|
68
|
+
}, resolvedDuration);
|
|
52
69
|
return () => clearTimeout(timerRef.current);
|
|
53
70
|
}
|
|
54
71
|
}, [transition, duration]);
|
|
@@ -57,7 +74,7 @@ export const NavigationTransition = ({ activeView, activeKey, direction, duratio
|
|
|
57
74
|
return () => clearTimeout(timerRef.current);
|
|
58
75
|
}, []);
|
|
59
76
|
if (!transition) {
|
|
60
|
-
return (_jsx("div", { className: `muka-nav-transition ${className}`.trim(), children: activeView }));
|
|
77
|
+
return (_jsx("div", { ref: containerRef, className: `muka-nav-transition ${className}`.trim(), children: activeView }));
|
|
61
78
|
}
|
|
62
79
|
const isForward = transition.direction === 'forward';
|
|
63
80
|
const enteringView = activeView;
|
|
@@ -66,7 +83,7 @@ export const NavigationTransition = ({ activeView, activeKey, direction, duratio
|
|
|
66
83
|
// Back: exiting view on top (slides away), entering below
|
|
67
84
|
const topView = isForward ? enteringView : exitingView;
|
|
68
85
|
const bottomView = isForward ? exitingView : enteringView;
|
|
69
|
-
return (_jsxs("div", { className: `muka-nav-transition muka-nav-transition--active ${className}`.trim(), children: [_jsx("div", { ref: bottomRef, className: "muka-nav-transition__view muka-nav-transition__view--bottom", children: bottomView }), _jsx("div", { ref: topRef, className: "muka-nav-transition__view muka-nav-transition__view--top", children: topView })] }));
|
|
86
|
+
return (_jsxs("div", { ref: containerRef, className: `muka-nav-transition muka-nav-transition--active ${className}`.trim(), children: [_jsx("div", { ref: bottomRef, className: "muka-nav-transition__view muka-nav-transition__view--bottom", children: bottomView }), _jsx("div", { ref: topRef, className: "muka-nav-transition__view muka-nav-transition__view--top", children: topView })] }));
|
|
70
87
|
};
|
|
71
88
|
export default NavigationTransition;
|
|
72
89
|
//# sourceMappingURL=NavigationTransition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationTransition.js","sourceRoot":"","sources":["../../../../components/NavigationTransition/NavigationTransition.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,4BAA4B,CAAC;AAEpC,MAAM,mBAAmB,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"NavigationTransition.js","sour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M,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;IAE3C,6DAA6D;IAC7D,0DAA0D;IAC1D,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;IACvD,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC;IAE1D,OAAO,CACL,eAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,mDAAmD,SAAS,EAAE,CAAC,IAAI,EAAE,aACtG,cAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAC,6DAA6D,YACzF,UAAU,GACP,EACN,cAAK,GAAG,EAAE,MAAM,EAAE,SAAS,EAAC,0DAA0D,YACnF,OAAO,GACJ,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -3,55 +3,48 @@
|
|
|
3
3
|
.muka-spec-list {
|
|
4
4
|
margin: 0;
|
|
5
5
|
padding: 0;
|
|
6
|
-
background-color: var(--color-surface-level1);
|
|
7
|
-
border-radius: var(--radius-md);
|
|
8
|
-
overflow: hidden;
|
|
9
6
|
}
|
|
10
7
|
|
|
11
8
|
/* ─── Row ─────────────────────────────────────────────── */
|
|
12
9
|
|
|
13
10
|
.muka-spec-row {
|
|
14
11
|
display: flex;
|
|
15
|
-
align-items:
|
|
12
|
+
align-items: flex-start;
|
|
16
13
|
gap: var(--spacing-3);
|
|
17
|
-
padding: var(--spacing-3)
|
|
18
|
-
border-top: var(--border-width-regular) solid var(--color-border-default);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.muka-spec-row:first-child {
|
|
22
|
-
border-top: none;
|
|
14
|
+
padding-bottom: var(--spacing-3);
|
|
23
15
|
}
|
|
24
16
|
|
|
25
17
|
/* ─── Label ───────────────────────────────────────────── */
|
|
26
18
|
|
|
27
19
|
.muka-spec-row__label {
|
|
28
20
|
flex: 0 0 auto;
|
|
29
|
-
min-width: 40%;
|
|
30
21
|
margin: 0;
|
|
31
22
|
color: var(--color-text-subtle-default);
|
|
32
23
|
font-family: var(--text-body-md-regular-fontFamily);
|
|
33
24
|
font-weight: var(--text-body-md-regular-fontWeight);
|
|
34
25
|
font-size: var(--text-body-md-regular-fontSize);
|
|
35
26
|
line-height: var(--text-body-md-regular-lineHeight);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
white-space: nowrap;
|
|
36
30
|
}
|
|
37
31
|
|
|
38
32
|
/* ─── Value ───────────────────────────────────────────── */
|
|
39
33
|
|
|
40
34
|
.muka-spec-row__value {
|
|
41
|
-
flex: 1 1
|
|
35
|
+
flex: 1 1 0;
|
|
36
|
+
min-width: 0;
|
|
42
37
|
margin: 0;
|
|
43
38
|
display: flex;
|
|
44
39
|
flex-direction: column;
|
|
45
|
-
align-items: flex-end;
|
|
46
|
-
text-align: right;
|
|
47
40
|
color: var(--color-text-default-default);
|
|
48
41
|
}
|
|
49
42
|
|
|
50
43
|
.muka-spec-row__value-text {
|
|
51
|
-
font-family: var(--text-body-md-
|
|
52
|
-
font-weight: var(--text-body-md-
|
|
53
|
-
font-size: var(--text-body-md-
|
|
54
|
-
line-height: var(--text-body-md-
|
|
44
|
+
font-family: var(--text-body-md-regular-fontFamily);
|
|
45
|
+
font-weight: var(--text-body-md-regular-fontWeight);
|
|
46
|
+
font-size: var(--text-body-md-regular-fontSize);
|
|
47
|
+
line-height: var(--text-body-md-regular-lineHeight);
|
|
55
48
|
}
|
|
56
49
|
|
|
57
50
|
.muka-spec-row__hint {
|
|
@@ -62,8 +55,28 @@
|
|
|
62
55
|
line-height: var(--text-body-sm-regular-lineHeight);
|
|
63
56
|
}
|
|
64
57
|
|
|
65
|
-
/* ───
|
|
58
|
+
/* ─── Label width (horizontal stacking) ───────────────── */
|
|
59
|
+
|
|
60
|
+
.muka-spec-list--label-small .muka-spec-row__label {
|
|
61
|
+
width: 80px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.muka-spec-list--label-medium .muka-spec-row__label {
|
|
65
|
+
width: 120px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.muka-spec-list--label-large .muka-spec-row__label {
|
|
69
|
+
width: 160px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* ─── Vertical stacking ───────────────────────────────── */
|
|
73
|
+
|
|
74
|
+
.muka-spec-list--vertical .muka-spec-row {
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
gap: var(--spacing-1);
|
|
77
|
+
}
|
|
66
78
|
|
|
67
|
-
.muka-spec-list--
|
|
68
|
-
|
|
79
|
+
.muka-spec-list--vertical .muka-spec-row__label {
|
|
80
|
+
width: 100%;
|
|
81
|
+
white-space: normal;
|
|
69
82
|
}
|
|
@@ -14,10 +14,16 @@ export const SpecRow = ({ label, value, hint, className = '' }) => {
|
|
|
14
14
|
*
|
|
15
15
|
* Mobile-friendly alternative to `Table` when displaying flat key/value data
|
|
16
16
|
* (e.g. motorcycle specs, vehicle details). Each row is a `<dt>/<dd>` pair
|
|
17
|
-
* inside a `<dl>` for semantic accessibility.
|
|
17
|
+
* inside a `<dl>` for semantic accessibility. Renders flat — no background,
|
|
18
|
+
* radius, or dividers — so it sits directly on the page surface.
|
|
18
19
|
*/
|
|
19
|
-
export const SpecList = ({ children,
|
|
20
|
-
const classes = [
|
|
20
|
+
export const SpecList = ({ children, stacking = 'horizontal', labelWidth = 'small', className = '', }) => {
|
|
21
|
+
const classes = [
|
|
22
|
+
'muka-spec-list',
|
|
23
|
+
`muka-spec-list--${stacking}`,
|
|
24
|
+
`muka-spec-list--label-${labelWidth}`,
|
|
25
|
+
className,
|
|
26
|
+
]
|
|
21
27
|
.filter(Boolean)
|
|
22
28
|
.join(' ');
|
|
23
29
|
return _jsx("dl", { className: classes, children: children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpecList.js","sourceRoot":"","sources":["../../../../components/SpecList/SpecList.tsx"],"names":[],"mappings":";AACA,OAAO,gBAAgB,CAAC;AAkBxB;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE;IACxF,MAAM,OAAO,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvE,OAAO,CACL,eAAK,SAAS,EAAE,OAAO,aACrB,aAAI,SAAS,EAAC,sBAAsB,YAAE,KAAK,GAAM,EACjD,cAAI,SAAS,EAAC,sBAAsB,aAClC,eAAM,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAQ,EACzD,IAAI,IAAI,eAAM,SAAS,EAAC,qBAAqB,YAAE,IAAI,GAAQ,IACzD,IACD,CACP,CAAC;AACJ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SpecList.js","sourceRoot":"","sources":["../../../../components/SpecList/SpecList.tsx"],"names":[],"mappings":";AACA,OAAO,gBAAgB,CAAC;AAkBxB;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE;IACxF,MAAM,OAAO,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvE,OAAO,CACL,eAAK,SAAS,EAAE,OAAO,aACrB,aAAI,SAAS,EAAC,sBAAsB,YAAE,KAAK,GAAM,EACjD,cAAI,SAAS,EAAC,sBAAsB,aAClC,eAAM,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAQ,EACzD,IAAI,IAAI,eAAM,SAAS,EAAC,qBAAqB,YAAE,IAAI,GAAQ,IACzD,IACD,CACP,CAAC;AACJ,CAAC,CAAC;AA2BF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,QAAQ,GAAG,YAAY,EACvB,UAAU,GAAG,OAAO,EACpB,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,gBAAgB;QAChB,mBAAmB,QAAQ,EAAE;QAC7B,yBAAyB,UAAU,EAAE;QACrC,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,aAAI,SAAS,EAAE,OAAO,YAAG,QAAQ,GAAM,CAAC;AACjD,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -3,55 +3,48 @@
|
|
|
3
3
|
.muka-spec-list {
|
|
4
4
|
margin: 0;
|
|
5
5
|
padding: 0;
|
|
6
|
-
background-color: var(--color-surface-level1);
|
|
7
|
-
border-radius: var(--radius-md);
|
|
8
|
-
overflow: hidden;
|
|
9
6
|
}
|
|
10
7
|
|
|
11
8
|
/* ─── Row ─────────────────────────────────────────────── */
|
|
12
9
|
|
|
13
10
|
.muka-spec-row {
|
|
14
11
|
display: flex;
|
|
15
|
-
align-items:
|
|
12
|
+
align-items: flex-start;
|
|
16
13
|
gap: var(--spacing-3);
|
|
17
|
-
padding: var(--spacing-3)
|
|
18
|
-
border-top: var(--border-width-regular) solid var(--color-border-default);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.muka-spec-row:first-child {
|
|
22
|
-
border-top: none;
|
|
14
|
+
padding-bottom: var(--spacing-3);
|
|
23
15
|
}
|
|
24
16
|
|
|
25
17
|
/* ─── Label ───────────────────────────────────────────── */
|
|
26
18
|
|
|
27
19
|
.muka-spec-row__label {
|
|
28
20
|
flex: 0 0 auto;
|
|
29
|
-
min-width: 40%;
|
|
30
21
|
margin: 0;
|
|
31
22
|
color: var(--color-text-subtle-default);
|
|
32
23
|
font-family: var(--text-body-md-regular-fontFamily);
|
|
33
24
|
font-weight: var(--text-body-md-regular-fontWeight);
|
|
34
25
|
font-size: var(--text-body-md-regular-fontSize);
|
|
35
26
|
line-height: var(--text-body-md-regular-lineHeight);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
white-space: nowrap;
|
|
36
30
|
}
|
|
37
31
|
|
|
38
32
|
/* ─── Value ───────────────────────────────────────────── */
|
|
39
33
|
|
|
40
34
|
.muka-spec-row__value {
|
|
41
|
-
flex: 1 1
|
|
35
|
+
flex: 1 1 0;
|
|
36
|
+
min-width: 0;
|
|
42
37
|
margin: 0;
|
|
43
38
|
display: flex;
|
|
44
39
|
flex-direction: column;
|
|
45
|
-
align-items: flex-end;
|
|
46
|
-
text-align: right;
|
|
47
40
|
color: var(--color-text-default-default);
|
|
48
41
|
}
|
|
49
42
|
|
|
50
43
|
.muka-spec-row__value-text {
|
|
51
|
-
font-family: var(--text-body-md-
|
|
52
|
-
font-weight: var(--text-body-md-
|
|
53
|
-
font-size: var(--text-body-md-
|
|
54
|
-
line-height: var(--text-body-md-
|
|
44
|
+
font-family: var(--text-body-md-regular-fontFamily);
|
|
45
|
+
font-weight: var(--text-body-md-regular-fontWeight);
|
|
46
|
+
font-size: var(--text-body-md-regular-fontSize);
|
|
47
|
+
line-height: var(--text-body-md-regular-lineHeight);
|
|
55
48
|
}
|
|
56
49
|
|
|
57
50
|
.muka-spec-row__hint {
|
|
@@ -62,8 +55,28 @@
|
|
|
62
55
|
line-height: var(--text-body-sm-regular-lineHeight);
|
|
63
56
|
}
|
|
64
57
|
|
|
65
|
-
/* ───
|
|
58
|
+
/* ─── Label width (horizontal stacking) ───────────────── */
|
|
59
|
+
|
|
60
|
+
.muka-spec-list--label-small .muka-spec-row__label {
|
|
61
|
+
width: 80px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.muka-spec-list--label-medium .muka-spec-row__label {
|
|
65
|
+
width: 120px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.muka-spec-list--label-large .muka-spec-row__label {
|
|
69
|
+
width: 160px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* ─── Vertical stacking ───────────────────────────────── */
|
|
73
|
+
|
|
74
|
+
.muka-spec-list--vertical .muka-spec-row {
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
gap: var(--spacing-1);
|
|
77
|
+
}
|
|
66
78
|
|
|
67
|
-
.muka-spec-list--
|
|
68
|
-
|
|
79
|
+
.muka-spec-list--vertical .muka-spec-row__label {
|
|
80
|
+
width: 100%;
|
|
81
|
+
white-space: normal;
|
|
69
82
|
}
|