@revikornmann/muka-ui 0.28.0 → 0.29.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/Alert/Alert.css +4 -3
- package/dist/cjs/components/Alert/Alert.js +1 -1
- package/dist/cjs/components/Alert/Alert.js.map +1 -1
- package/dist/cjs/components/Badge/Badge.css +27 -0
- package/dist/cjs/components/Badge/Badge.js +14 -5
- package/dist/cjs/components/Badge/Badge.js.map +1 -1
- package/dist/cjs/components/MediaViewer/MediaViewer.css +4 -1
- package/dist/cjs/components/MediaViewer/MediaViewer.js +2 -0
- package/dist/cjs/components/MediaViewer/MediaViewer.js.map +1 -1
- package/dist/cjs/components/PhotoUploader/PhotoUploader.css +6 -18
- package/dist/cjs/components/PhotoUploader/PhotoUploader.js +15 -16
- package/dist/cjs/components/PhotoUploader/PhotoUploader.js.map +1 -1
- package/dist/cjs/components/ProgressAccordeon/ProgressAccordeon.css +26 -12
- package/dist/cjs/components/ProgressAccordeon/ProgressAccordeon.js +49 -40
- package/dist/cjs/components/ProgressAccordeon/ProgressAccordeon.js.map +1 -1
- package/dist/esm/components/Alert/Alert.css +4 -3
- package/dist/esm/components/Alert/Alert.js +1 -1
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/Badge/Badge.css +27 -0
- package/dist/esm/components/Badge/Badge.js +14 -5
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- package/dist/esm/components/MediaViewer/MediaViewer.css +4 -1
- package/dist/esm/components/MediaViewer/MediaViewer.js +2 -0
- package/dist/esm/components/MediaViewer/MediaViewer.js.map +1 -1
- package/dist/esm/components/PhotoUploader/PhotoUploader.css +6 -18
- package/dist/esm/components/PhotoUploader/PhotoUploader.js +15 -16
- package/dist/esm/components/PhotoUploader/PhotoUploader.js.map +1 -1
- package/dist/esm/components/ProgressAccordeon/ProgressAccordeon.css +26 -12
- package/dist/esm/components/ProgressAccordeon/ProgressAccordeon.js +49 -40
- package/dist/esm/components/ProgressAccordeon/ProgressAccordeon.js.map +1 -1
- package/dist/styles/components/Alert.css +4 -3
- package/dist/styles/components/Badge.css +27 -0
- package/dist/styles/components/MediaViewer.css +4 -1
- package/dist/styles/components/PhotoUploader.css +6 -18
- package/dist/styles/components/ProgressAccordeon.css +26 -12
- package/dist/styles/index.css +1549 -1516
- package/dist/styles/muka-dark.css +1549 -1516
- package/dist/styles/muka-light.css +1549 -1516
- package/dist/styles/wireframe-dark.css +1549 -1516
- package/dist/styles/wireframe-light.css +1549 -1516
- package/dist/types/components/Alert/Alert.d.ts +1 -1
- package/dist/types/components/Alert/Alert.d.ts.map +1 -1
- package/dist/types/components/Badge/Badge.d.ts +7 -5
- package/dist/types/components/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/MediaViewer/MediaViewer.d.ts +2 -0
- package/dist/types/components/MediaViewer/MediaViewer.d.ts.map +1 -1
- package/dist/types/components/PhotoUploader/PhotoUploader.d.ts +8 -8
- package/dist/types/components/PhotoUploader/PhotoUploader.d.ts.map +1 -1
- package/dist/types/components/ProgressAccordeon/ProgressAccordeon.d.ts +36 -29
- package/dist/types/components/ProgressAccordeon/ProgressAccordeon.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
/* Per-state gap: content-bearing steps are tighter, header-only steps looser */
|
|
15
15
|
.muka-progress-accordeon--current,
|
|
16
|
+
.muka-progress-accordeon--current.muka-progress-accordeon--expanded,
|
|
16
17
|
.muka-progress-accordeon--past.muka-progress-accordeon--expanded,
|
|
17
18
|
.muka-progress-accordeon--upcoming.muka-progress-accordeon--expanded {
|
|
18
19
|
gap: var(--spacing-6);
|
|
@@ -20,7 +21,8 @@
|
|
|
20
21
|
|
|
21
22
|
.muka-progress-accordeon--upcoming,
|
|
22
23
|
.muka-progress-accordeon--past.muka-progress-accordeon--collapsed,
|
|
23
|
-
.muka-progress-accordeon--upcoming.muka-progress-accordeon--collapsed
|
|
24
|
+
.muka-progress-accordeon--upcoming.muka-progress-accordeon--collapsed,
|
|
25
|
+
.muka-progress-accordeon--current.muka-progress-accordeon--collapsed {
|
|
24
26
|
gap: var(--spacing-8);
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -165,32 +167,44 @@
|
|
|
165
167
|
width: 100%;
|
|
166
168
|
}
|
|
167
169
|
|
|
168
|
-
/* ─── Collapse/expand animation (
|
|
169
|
-
|
|
170
|
-
intrinsic
|
|
171
|
-
--motion-duration-view
|
|
172
|
-
.muka-progress-
|
|
170
|
+
/* ─── Collapse/expand animation (any expandable step) ──────
|
|
171
|
+
Animates grid-template-rows 1fr ↔ 0fr so the panel (slot + actions) grows and
|
|
172
|
+
shrinks to its intrinsic height. Opacity fades with the same duration.
|
|
173
|
+
Under prefers-reduced-motion, --motion-duration-view is 0ms. */
|
|
174
|
+
.muka-progress-accordeon__panel-wrapper {
|
|
173
175
|
display: grid;
|
|
174
176
|
grid-template-rows: 1fr;
|
|
175
|
-
|
|
177
|
+
opacity: 1;
|
|
178
|
+
transition:
|
|
179
|
+
grid-template-rows var(--motion-duration-view) var(--motion-easing-enter),
|
|
180
|
+
opacity var(--motion-duration-view) var(--motion-easing-enter);
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
.muka-progress-
|
|
183
|
+
.muka-progress-accordeon__panel-wrapper--collapsed {
|
|
179
184
|
grid-template-rows: 0fr;
|
|
185
|
+
opacity: 0;
|
|
186
|
+
transition:
|
|
187
|
+
grid-template-rows var(--motion-duration-view) var(--motion-easing-exit),
|
|
188
|
+
opacity calc(var(--motion-duration-view) * 0.6) var(--motion-easing-exit);
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
/* The direct grid child clips and must have NO padding/border of its own —
|
|
183
192
|
min-height:0 lets it shrink, and with no padding the 0fr track reaches a true
|
|
184
193
|
0 height (padding on the item would leave a residual gap when collapsed). */
|
|
185
|
-
.muka-progress-
|
|
194
|
+
.muka-progress-accordeon__panel-clip {
|
|
186
195
|
overflow: hidden;
|
|
187
196
|
min-height: 0;
|
|
188
197
|
}
|
|
189
198
|
|
|
190
|
-
/*
|
|
191
|
-
|
|
192
|
-
.muka-progress-
|
|
199
|
+
/* Header↔content spacing + slot/actions gap live inside the clip so they
|
|
200
|
+
collapse together with the panel. */
|
|
201
|
+
.muka-progress-accordeon__panel {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
align-items: stretch;
|
|
205
|
+
gap: var(--spacing-6);
|
|
193
206
|
padding-top: var(--spacing-4);
|
|
207
|
+
width: 100%;
|
|
194
208
|
}
|
|
195
209
|
|
|
196
210
|
/* ─── Action buttons (current state) ─────────────────────── */
|
|
@@ -13,83 +13,92 @@ import './ProgressAccordeon.css';
|
|
|
13
13
|
* content slot — visualising both progress and the work for a step.
|
|
14
14
|
*
|
|
15
15
|
* States:
|
|
16
|
-
* - **past** — dark check indicator, heading,
|
|
17
|
-
* content slot collapses/expands via `collapsed` + `onToggle`
|
|
18
|
-
* - **current** — accent numbered indicator, heading, content slot,
|
|
16
|
+
* - **past** — dark check indicator, heading, optional header button + chevron;
|
|
17
|
+
* the content slot collapses/expands via `collapsed` + `onToggle`
|
|
18
|
+
* - **current** — accent numbered indicator, heading, content slot, optional
|
|
19
|
+
* actions; pass `onToggle` to make the active step expandable too
|
|
19
20
|
* - **upcoming** — muted numbered indicator, heading; optional collapsible
|
|
20
|
-
* content slot
|
|
21
|
-
* instructions or picking up a step out of order
|
|
21
|
+
* content slot for empty-state instructions or picking up a step out of order
|
|
22
22
|
*
|
|
23
23
|
* Content is passed as `children` (an optional slot) and rendered as-is — supply
|
|
24
24
|
* your own `Card` or `EmptyState` when you want those surfaces. Composes the
|
|
25
25
|
* Button, Icon and Divider primitives and is fully themed through the Muka
|
|
26
26
|
* design token system.
|
|
27
27
|
*
|
|
28
|
-
* Tokens used:
|
|
29
|
-
* - alias.color.accent.{default|contrast} — step indicator fills
|
|
30
|
-
* - color.surface.sunken — upcoming indicator fill
|
|
31
|
-
* - color.text.default.{default|inverse} — indicator glyphs
|
|
32
|
-
* - text.heading.{md|sm} — step heading (responsive)
|
|
33
|
-
* - text.body.base.regular — supporting description
|
|
34
|
-
* - text.label.md.{bold|semibold} — indicator number
|
|
35
|
-
* - spacing.{1|4|6|8} — vertical rhythm and gaps
|
|
36
|
-
*
|
|
37
28
|
* @accessibility
|
|
38
29
|
* - Renders each step as a labelled group with `aria-current="step"` on the
|
|
39
30
|
* active (current) step.
|
|
40
31
|
* - The chevron toggle exposes `aria-expanded`.
|
|
41
32
|
*/
|
|
42
|
-
export const ProgressAccordeon = ({ state, stepNumber, heading, description, children, divider = true, collapsed = false, onToggle, editLabel = 'Edit', onEdit, primaryAction, secondaryAction, className = '', }) => {
|
|
33
|
+
export const ProgressAccordeon = ({ state, stepNumber, heading, description, showDescription = false, children, divider = true, collapsed = false, onToggle, showHeaderButton, editLabel = 'Edit', onEdit, showActions = true, primaryAction, secondaryAction, className = '', }) => {
|
|
43
34
|
const isPast = state === 'past';
|
|
44
35
|
const isCurrent = state === 'current';
|
|
45
36
|
const isUpcoming = state === 'upcoming';
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
37
|
+
// Arrow button is opt-in for every state via `onToggle`.
|
|
38
|
+
const showToggle = Boolean(onToggle);
|
|
39
|
+
// Past/upcoming can honour `collapsed` without a toggle. Current also honours
|
|
40
|
+
// it so demos can animate open/close without showing a chevron.
|
|
41
|
+
const canCollapse = showToggle || isPast || isUpcoming || isCurrent;
|
|
42
|
+
const isEffectivelyCollapsed = canCollapse && collapsed;
|
|
43
|
+
// Header button (Edit) — Figma “Button header”: opt-in via `onEdit`, overridable
|
|
44
|
+
// with `showHeaderButton`, and only visible while expanded on past steps.
|
|
45
|
+
const headerButtonEnabled = showHeaderButton ?? Boolean(onEdit);
|
|
46
|
+
const showEdit = headerButtonEnabled &&
|
|
47
|
+
isPast &&
|
|
48
|
+
!isEffectivelyCollapsed &&
|
|
49
|
+
Boolean(onEdit);
|
|
50
|
+
const descriptionVisible = showDescription && Boolean(description);
|
|
51
|
+
// Keep slot/actions mounted regardless of `collapsed` so height can animate
|
|
52
|
+
// (you can't animate an unmounted node).
|
|
53
|
+
const hasSlot = Boolean(children);
|
|
54
|
+
// Keep action buttons mounted while collapsing so they animate with the panel
|
|
55
|
+
// (they're aria-hidden/inert via the wrapper when collapsed).
|
|
56
|
+
const hasActionButtons = isCurrent && showActions && Boolean(primaryAction || secondaryAction);
|
|
57
|
+
// Collapse modifiers when the step can actually collapse — keeps header-only
|
|
58
|
+
// upcoming spacing on the base `--upcoming` gap rule.
|
|
59
|
+
const showCollapseModifiers = isPast ||
|
|
60
|
+
(isUpcoming && (Boolean(children) || showToggle)) ||
|
|
61
|
+
(isCurrent && (showToggle || Boolean(children) || hasActionButtons));
|
|
59
62
|
const rootClasses = [
|
|
60
63
|
'muka-progress-accordeon',
|
|
61
64
|
`muka-progress-accordeon--${state}`,
|
|
62
65
|
showCollapseModifiers &&
|
|
63
|
-
`muka-progress-accordeon--${
|
|
66
|
+
`muka-progress-accordeon--${isEffectivelyCollapsed ? 'collapsed' : 'expanded'}`,
|
|
64
67
|
className,
|
|
65
68
|
].filter(Boolean).join(' ');
|
|
66
69
|
const indicatorClasses = [
|
|
67
70
|
'muka-progress-accordeon__indicator',
|
|
68
71
|
`muka-progress-accordeon__indicator--${state}`,
|
|
69
72
|
].join(' ');
|
|
70
|
-
const header = (_jsxs("div", { className: "muka-progress-accordeon__header", children: [_jsxs("div", { className: "muka-progress-accordeon__header-row", children: [_jsxs("div", { className: "muka-progress-accordeon__heading-group", children: [_jsx("div", { className: indicatorClasses, "aria-hidden": "true", children: isPast ? (_jsx(Icon, { name: "check", variant: "fill", size: "sm", className: "muka-progress-accordeon__check-icon" })) : (_jsx("span", { className: "muka-progress-accordeon__number", children: stepNumber })) }), _jsx("h3", { className: "muka-progress-accordeon__heading", children: heading })] }), (showEdit || showToggle) && (_jsxs("div", { className: "muka-progress-accordeon__controls", children: [showEdit && (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "
|
|
73
|
+
const header = (_jsxs("div", { className: "muka-progress-accordeon__header", children: [_jsxs("div", { className: "muka-progress-accordeon__header-row", children: [_jsxs("div", { className: "muka-progress-accordeon__heading-group", children: [_jsx("div", { className: indicatorClasses, "aria-hidden": "true", children: isPast ? (_jsx(Icon, { name: "check", variant: "fill", size: "sm", className: "muka-progress-accordeon__check-icon" })) : (_jsx("span", { className: "muka-progress-accordeon__number", children: stepNumber })) }), _jsx("h3", { className: "muka-progress-accordeon__heading", children: heading })] }), (showEdit || showToggle) && (_jsxs("div", { className: "muka-progress-accordeon__controls", children: [showEdit && (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "secondary", size: "md", onClick: onEdit, iconLeft: _jsx(Icon, { name: "pencil", variant: "line", size: "md" }), className: "muka-progress-accordeon__edit muka-progress-accordeon__edit--wide", children: editLabel }), _jsx(Button, { variant: "secondary", size: "md", iconOnly: true, onClick: onEdit, className: "muka-progress-accordeon__edit muka-progress-accordeon__edit--narrow", "aria-label": editLabel, children: _jsx(Icon, { name: "pencil", variant: "line", size: "md" }) })] })), showToggle && (_jsx(Button, { variant: "secondary", size: "md", iconOnly: true, onClick: onToggle, className: "muka-progress-accordeon__toggle", "aria-label": isEffectivelyCollapsed ? 'Expand' : 'Collapse', "aria-expanded": !isEffectivelyCollapsed, children: _jsx(Icon, { name: isEffectivelyCollapsed ? 'arrow-down-s' : 'arrow-up-s', variant: "line", size: "md" }) }))] }))] }), descriptionVisible && (_jsx("div", { className: "muka-progress-accordeon__description", children: description }))] }));
|
|
71
74
|
const slot = hasSlot ? (_jsx("div", { className: "muka-progress-accordeon__slot", children: children })) : null;
|
|
72
|
-
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
// assistive tech.
|
|
75
|
+
const actions = hasActionButtons ? (_jsxs("div", { className: "muka-progress-accordeon__actions", children: [secondaryAction && (_jsx(Button, { variant: "secondary", size: "md", onClick: secondaryAction.onClick, disabled: secondaryAction.disabled, className: "muka-progress-accordeon__action", children: secondaryAction.label })), primaryAction && (_jsx(Button, { variant: "primary", size: "md", onClick: primaryAction.onClick, disabled: primaryAction.disabled, className: "muka-progress-accordeon__action", children: primaryAction.label }))] })) : null;
|
|
76
|
+
// Collapsible steps wrap slot + actions in a grid animation container that
|
|
77
|
+
// collapses its height to zero. Marked inert + aria-hidden while collapsed so
|
|
78
|
+
// the still-mounted content is skipped by keyboard focus and assistive tech.
|
|
76
79
|
// `inert` is set imperatively on the DOM node rather than via a React prop:
|
|
77
80
|
// React 18 drops a boolean `inert` prop, while React 19 warns on the string
|
|
78
81
|
// form — toggling the attribute directly works correctly under both.
|
|
79
|
-
const
|
|
82
|
+
const panelWrapperRef = React.useRef(null);
|
|
80
83
|
React.useEffect(() => {
|
|
81
|
-
const node =
|
|
84
|
+
const node = panelWrapperRef.current;
|
|
82
85
|
if (!node)
|
|
83
86
|
return;
|
|
84
|
-
if (
|
|
87
|
+
if (isEffectivelyCollapsed) {
|
|
85
88
|
node.setAttribute('inert', '');
|
|
86
89
|
}
|
|
87
90
|
else {
|
|
88
91
|
node.removeAttribute('inert');
|
|
89
92
|
}
|
|
90
|
-
}, [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
}, [isEffectivelyCollapsed]);
|
|
94
|
+
// Always wrap content in the animated panel when present, including on the
|
|
95
|
+
// active step (no chevron), so Flow can animate collapse on “Next step”.
|
|
96
|
+
const hasCollapsiblePanel = hasSlot || hasActionButtons;
|
|
97
|
+
const collapsiblePanel = hasCollapsiblePanel ? (_jsx("div", { ref: panelWrapperRef, className: `muka-progress-accordeon__panel-wrapper${isEffectivelyCollapsed
|
|
98
|
+
? ' muka-progress-accordeon__panel-wrapper--collapsed'
|
|
99
|
+
: ''}`, "aria-hidden": isEffectivelyCollapsed || undefined, children: _jsx("div", { className: "muka-progress-accordeon__panel-clip", children: _jsxs("div", { className: "muka-progress-accordeon__panel", children: [slot, actions] }) }) })) : null;
|
|
100
|
+
const useCollapsibleBody = hasCollapsiblePanel || showToggle || isPast || isUpcoming;
|
|
101
|
+
return (_jsxs("div", { className: rootClasses, role: "group", "aria-label": `Step ${stepNumber}: ${heading}`, "aria-current": isCurrent ? 'step' : undefined, children: [useCollapsibleBody ? (_jsxs("div", { className: "muka-progress-accordeon__body", children: [header, collapsiblePanel] })) : (_jsxs(_Fragment, { children: [header, slot, actions] })), divider && _jsx(Divider, { className: "muka-progress-accordeon__divider" })] }));
|
|
93
102
|
};
|
|
94
103
|
export default ProgressAccordeon;
|
|
95
104
|
//# sourceMappingURL=ProgressAccordeon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressAccordeon.js","sourceRoot":"","sources":["../../../../components/ProgressAccordeon/ProgressAccordeon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressAccordeon.js","sourceRoot":"","sources":["../../../../components/ProgressAccordeon/ProgressAccordeon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,yBAAyB,CAAC;AA6FjC;;;;;;;;;;;;;;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CAAC,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,kBAAkB,GACtB,mBAAmB,IAAI,UAAU,IAAI,MAAM,IAAI,UAAU,CAAC;IAE5D,OAAO,CACL,eACE,SAAS,EAAE,WAAW,EACtB,IAAI,EAAC,OAAO,gBACA,QAAQ,UAAU,KAAK,OAAO,EAAE,kBAC9B,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,aAI3C,kBAAkB,CAAC,CAAC,CAAC,CACpB,eAAK,SAAS,EAAC,+BAA+B,aAC3C,MAAM,EACN,gBAAgB,IACb,CACP,CAAC,CAAC,CAAC,CACF,8BACG,MAAM,EACN,IAAI,EACJ,OAAO,IACP,CACJ,EAGA,OAAO,IAAI,KAAC,OAAO,IAAC,SAAS,EAAC,kCAAkC,GAAG,IAChE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -158,11 +158,12 @@
|
|
|
158
158
|
line-height: var(--text-body-base-regular-lineHeight);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
/* Action slot */
|
|
161
|
+
/* Action slot — TextLink (or similar) below the message, matching Figma */
|
|
162
162
|
.muka-alert__action {
|
|
163
163
|
display: flex;
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
flex-direction: column;
|
|
165
|
+
align-items: flex-start;
|
|
166
|
+
padding-top: var(--spacing-1);
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
/* Dismiss button - uses accent color per variant, aligned with icon row */
|
|
@@ -60,6 +60,33 @@
|
|
|
60
60
|
padding-left: var(--badge-padding-leading-lg);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
/* Icon-only — square, sized to the badge height (Figma: 24 / 32 / 40).
|
|
64
|
+
* Padding resets at size+icon-only specificity so `--has-icon` leading padding
|
|
65
|
+
* cannot win and shift the icon off-center. */
|
|
66
|
+
.muka-badge--icon-only {
|
|
67
|
+
justify-content: center;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.muka-badge--sm.muka-badge--icon-only,
|
|
73
|
+
.muka-badge--md.muka-badge--icon-only,
|
|
74
|
+
.muka-badge--lg.muka-badge--icon-only {
|
|
75
|
+
padding: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.muka-badge--sm.muka-badge--icon-only {
|
|
79
|
+
width: var(--badge-size-height-sm);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.muka-badge--md.muka-badge--icon-only {
|
|
83
|
+
width: var(--badge-size-height-md);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.muka-badge--lg.muka-badge--icon-only {
|
|
87
|
+
width: var(--badge-size-height-lg);
|
|
88
|
+
}
|
|
89
|
+
|
|
63
90
|
/* Leading icon slot — Figma icon sizes: sm 16, md 20, lg 24 (matches Chip) */
|
|
64
91
|
.muka-badge__icon {
|
|
65
92
|
display: inline-flex;
|
|
@@ -88,7 +88,10 @@
|
|
|
88
88
|
max-width: 100%;
|
|
89
89
|
max-height: 100%;
|
|
90
90
|
object-fit: contain;
|
|
91
|
-
|
|
91
|
+
/* The image takes touches, so a long press opens the OS menu (save, share,
|
|
92
|
+
copy). The swipe still works: pointer events bubble to the stage, and a
|
|
93
|
+
long press doesn't move far enough to start a drag. */
|
|
94
|
+
-webkit-touch-callout: default;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
/* ─── Previous / next: devices that can hover ─────────── */
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
padding: 0;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/* ─── Drop zone card
|
|
45
|
+
/* ─── Drop zone card (button + "or drop here") ────────── */
|
|
46
46
|
.muka-photo-uploader__dropzone {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
@@ -66,24 +66,12 @@
|
|
|
66
66
|
background-color: var(--color-surface-level1);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.muka-photo-uploader__dropzone:focus-visible {
|
|
70
|
-
outline: 2px solid var(--color-border-focus);
|
|
71
|
-
outline-offset: 2px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.muka-photo-uploader__dropzone-icon {
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
color: var(--color-icon-subtle-default);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
69
|
.muka-photo-uploader__dropzone-text {
|
|
82
|
-
font-family: var(--text-
|
|
83
|
-
font-size: var(--text-
|
|
84
|
-
font-weight: var(--text-
|
|
85
|
-
line-height: var(--text-
|
|
86
|
-
color: var(--color-text-
|
|
70
|
+
font-family: var(--text-subheading-sm-fontFamily);
|
|
71
|
+
font-size: var(--text-subheading-sm-fontSize);
|
|
72
|
+
font-weight: var(--text-subheading-sm-fontWeight);
|
|
73
|
+
line-height: var(--text-subheading-sm-lineHeight);
|
|
74
|
+
color: var(--color-text-default-default);
|
|
87
75
|
}
|
|
88
76
|
|
|
89
77
|
/* ─── Disabled ────────────────────────────────────────── */
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
/* Per-state gap: content-bearing steps are tighter, header-only steps looser */
|
|
15
15
|
.muka-progress-accordeon--current,
|
|
16
|
+
.muka-progress-accordeon--current.muka-progress-accordeon--expanded,
|
|
16
17
|
.muka-progress-accordeon--past.muka-progress-accordeon--expanded,
|
|
17
18
|
.muka-progress-accordeon--upcoming.muka-progress-accordeon--expanded {
|
|
18
19
|
gap: var(--spacing-6);
|
|
@@ -20,7 +21,8 @@
|
|
|
20
21
|
|
|
21
22
|
.muka-progress-accordeon--upcoming,
|
|
22
23
|
.muka-progress-accordeon--past.muka-progress-accordeon--collapsed,
|
|
23
|
-
.muka-progress-accordeon--upcoming.muka-progress-accordeon--collapsed
|
|
24
|
+
.muka-progress-accordeon--upcoming.muka-progress-accordeon--collapsed,
|
|
25
|
+
.muka-progress-accordeon--current.muka-progress-accordeon--collapsed {
|
|
24
26
|
gap: var(--spacing-8);
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -165,32 +167,44 @@
|
|
|
165
167
|
width: 100%;
|
|
166
168
|
}
|
|
167
169
|
|
|
168
|
-
/* ─── Collapse/expand animation (
|
|
169
|
-
|
|
170
|
-
intrinsic
|
|
171
|
-
--motion-duration-view
|
|
172
|
-
.muka-progress-
|
|
170
|
+
/* ─── Collapse/expand animation (any expandable step) ──────
|
|
171
|
+
Animates grid-template-rows 1fr ↔ 0fr so the panel (slot + actions) grows and
|
|
172
|
+
shrinks to its intrinsic height. Opacity fades with the same duration.
|
|
173
|
+
Under prefers-reduced-motion, --motion-duration-view is 0ms. */
|
|
174
|
+
.muka-progress-accordeon__panel-wrapper {
|
|
173
175
|
display: grid;
|
|
174
176
|
grid-template-rows: 1fr;
|
|
175
|
-
|
|
177
|
+
opacity: 1;
|
|
178
|
+
transition:
|
|
179
|
+
grid-template-rows var(--motion-duration-view) var(--motion-easing-enter),
|
|
180
|
+
opacity var(--motion-duration-view) var(--motion-easing-enter);
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
.muka-progress-
|
|
183
|
+
.muka-progress-accordeon__panel-wrapper--collapsed {
|
|
179
184
|
grid-template-rows: 0fr;
|
|
185
|
+
opacity: 0;
|
|
186
|
+
transition:
|
|
187
|
+
grid-template-rows var(--motion-duration-view) var(--motion-easing-exit),
|
|
188
|
+
opacity calc(var(--motion-duration-view) * 0.6) var(--motion-easing-exit);
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
/* The direct grid child clips and must have NO padding/border of its own —
|
|
183
192
|
min-height:0 lets it shrink, and with no padding the 0fr track reaches a true
|
|
184
193
|
0 height (padding on the item would leave a residual gap when collapsed). */
|
|
185
|
-
.muka-progress-
|
|
194
|
+
.muka-progress-accordeon__panel-clip {
|
|
186
195
|
overflow: hidden;
|
|
187
196
|
min-height: 0;
|
|
188
197
|
}
|
|
189
198
|
|
|
190
|
-
/*
|
|
191
|
-
|
|
192
|
-
.muka-progress-
|
|
199
|
+
/* Header↔content spacing + slot/actions gap live inside the clip so they
|
|
200
|
+
collapse together with the panel. */
|
|
201
|
+
.muka-progress-accordeon__panel {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
align-items: stretch;
|
|
205
|
+
gap: var(--spacing-6);
|
|
193
206
|
padding-top: var(--spacing-4);
|
|
207
|
+
width: 100%;
|
|
194
208
|
}
|
|
195
209
|
|
|
196
210
|
/* ─── Action buttons (current state) ─────────────────────── */
|