@12-apps/ui 6.39.4 → 6.39.6

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 (31) hide show
  1. package/dist/_internal/components/data-display/LazyImage/LazyImage.js +1 -1
  2. package/dist/_internal/components/data-display/index.js +1 -1
  3. package/dist/_internal/components/index.js +5 -5
  4. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +3 -1
  5. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +4 -4
  6. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +2 -2
  7. package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +3 -3
  8. package/dist/_internal/components/utility/index.js +4 -4
  9. package/dist/{chunk-WDVNRW3Q.js → chunk-7OO3BELX.js} +2 -2
  10. package/dist/{chunk-GFQ4U6WZ.js → chunk-KJID4PRD.js} +3 -3
  11. package/dist/chunk-KJID4PRD.js.map +1 -0
  12. package/dist/{chunk-SDK5LPPC.js → chunk-LW2LQHIM.js} +6 -5
  13. package/dist/chunk-LW2LQHIM.js.map +1 -0
  14. package/dist/{chunk-VXQOSADY.js → chunk-RXNIOPOA.js} +8 -2
  15. package/dist/{chunk-VXQOSADY.js.map → chunk-RXNIOPOA.js.map} +1 -1
  16. package/dist/{chunk-VLOUXTEM.js → chunk-Y2C2S4R7.js} +5 -4
  17. package/dist/chunk-Y2C2S4R7.js.map +1 -0
  18. package/dist/data-display/LazyImage.js +1 -1
  19. package/dist/types/components/data-display/LazyImage/LazyImage.d.ts.map +1 -1
  20. package/dist/types/components/utility/WorkflowStep/WorkflowStep.helpers.d.ts +7 -0
  21. package/dist/types/components/utility/WorkflowStep/WorkflowStep.helpers.d.ts.map +1 -1
  22. package/dist/utility/WorkflowStep.js +4 -4
  23. package/package.json +1 -1
  24. package/src/components/data-display/LazyImage/LazyImage.tsx +11 -4
  25. package/src/components/utility/WorkflowStep/WorkflowStep.helpers.ts +15 -0
  26. package/src/components/utility/WorkflowStep/WorkflowStep.parts.tsx +1 -1
  27. package/src/components/utility/WorkflowStep/WorkflowStep.tsx +2 -2
  28. package/dist/chunk-GFQ4U6WZ.js.map +0 -1
  29. package/dist/chunk-SDK5LPPC.js.map +0 -1
  30. package/dist/chunk-VLOUXTEM.js.map +0 -1
  31. /package/dist/{chunk-WDVNRW3Q.js.map → chunk-7OO3BELX.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LazyImage
3
- } from "../../../../chunk-SDK5LPPC.js";
3
+ } from "../../../../chunk-LW2LQHIM.js";
4
4
  import "../../../../chunk-HCT5ELST.js";
5
5
  import "../../../../chunk-724ZONOL.js";
6
6
  import "../../../../chunk-BEGTLELZ.js";
@@ -91,7 +91,7 @@ import "../../../chunk-S5UY5U73.js";
91
91
  import "../../../chunk-5ZFO7ROE.js";
92
92
  import {
93
93
  LazyImage
94
- } from "../../../chunk-SDK5LPPC.js";
94
+ } from "../../../chunk-LW2LQHIM.js";
95
95
  import "../../../chunk-HCT5ELST.js";
96
96
  import "../../../chunk-724ZONOL.js";
97
97
  import "../../../chunk-UM35GGCS.js";
@@ -13,10 +13,10 @@ import "../../chunk-SS4MHTGU.js";
13
13
  import "../../chunk-IO36MEBD.js";
14
14
  import {
15
15
  WorkflowStep
16
- } from "../../chunk-VLOUXTEM.js";
17
- import "../../chunk-WDVNRW3Q.js";
18
- import "../../chunk-GFQ4U6WZ.js";
19
- import "../../chunk-VXQOSADY.js";
16
+ } from "../../chunk-Y2C2S4R7.js";
17
+ import "../../chunk-7OO3BELX.js";
18
+ import "../../chunk-KJID4PRD.js";
19
+ import "../../chunk-RXNIOPOA.js";
20
20
  import "../../chunk-H2PTB6FD.js";
21
21
  import {
22
22
  AnimatedIcon
@@ -477,7 +477,7 @@ import "../../chunk-S5UY5U73.js";
477
477
  import "../../chunk-5ZFO7ROE.js";
478
478
  import {
479
479
  LazyImage
480
- } from "../../chunk-SDK5LPPC.js";
480
+ } from "../../chunk-LW2LQHIM.js";
481
481
  import "../../chunk-HCT5ELST.js";
482
482
  import "../../chunk-724ZONOL.js";
483
483
  import "../../chunk-UM35GGCS.js";
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  indicatorSizeFor,
3
+ progressValueText,
3
4
  resolveWorkflowStepProps,
4
5
  stepColors,
5
6
  stepPalette,
6
7
  withDerivedStatus
7
- } from "../../../../chunk-VXQOSADY.js";
8
+ } from "../../../../chunk-RXNIOPOA.js";
8
9
  import "../../../../chunk-TCAQOUIB.js";
9
10
  import "../../../../chunk-7ZPUN7TV.js";
10
11
  import "../../../../chunk-PT6TCWIW.js";
@@ -25,6 +26,7 @@ import "../../../../chunk-YKCAJ2TN.js";
25
26
  import "../../../../chunk-PZ5AY32C.js";
26
27
  export {
27
28
  indicatorSizeFor,
29
+ progressValueText,
28
30
  resolveWorkflowStepProps,
29
31
  stepColors,
30
32
  stepPalette,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  WorkflowStep,
3
3
  WorkflowStep_default
4
- } from "../../../../chunk-VLOUXTEM.js";
5
- import "../../../../chunk-WDVNRW3Q.js";
6
- import "../../../../chunk-GFQ4U6WZ.js";
7
- import "../../../../chunk-VXQOSADY.js";
4
+ } from "../../../../chunk-Y2C2S4R7.js";
5
+ import "../../../../chunk-7OO3BELX.js";
6
+ import "../../../../chunk-KJID4PRD.js";
7
+ import "../../../../chunk-RXNIOPOA.js";
8
8
  import "../../../../chunk-TCAQOUIB.js";
9
9
  import "../../../../chunk-7ZPUN7TV.js";
10
10
  import "../../../../chunk-PT6TCWIW.js";
@@ -3,8 +3,8 @@ import {
3
3
  StepContentComponent,
4
4
  StepIndicatorComponent,
5
5
  StepItemRow
6
- } from "../../../../chunk-GFQ4U6WZ.js";
7
- import "../../../../chunk-VXQOSADY.js";
6
+ } from "../../../../chunk-KJID4PRD.js";
7
+ import "../../../../chunk-RXNIOPOA.js";
8
8
  import "../../../../chunk-TCAQOUIB.js";
9
9
  import "../../../../chunk-7ZPUN7TV.js";
10
10
  import "../../../../chunk-PT6TCWIW.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  StepRow
3
- } from "../../../../chunk-WDVNRW3Q.js";
4
- import "../../../../chunk-GFQ4U6WZ.js";
5
- import "../../../../chunk-VXQOSADY.js";
3
+ } from "../../../../chunk-7OO3BELX.js";
4
+ import "../../../../chunk-KJID4PRD.js";
5
+ import "../../../../chunk-RXNIOPOA.js";
6
6
  import "../../../../chunk-TCAQOUIB.js";
7
7
  import "../../../../chunk-7ZPUN7TV.js";
8
8
  import "../../../../chunk-PT6TCWIW.js";
@@ -2,10 +2,10 @@ import "../../../chunk-SS4MHTGU.js";
2
2
  import "../../../chunk-IO36MEBD.js";
3
3
  import {
4
4
  WorkflowStep
5
- } from "../../../chunk-VLOUXTEM.js";
6
- import "../../../chunk-WDVNRW3Q.js";
7
- import "../../../chunk-GFQ4U6WZ.js";
8
- import "../../../chunk-VXQOSADY.js";
5
+ } from "../../../chunk-Y2C2S4R7.js";
6
+ import "../../../chunk-7OO3BELX.js";
7
+ import "../../../chunk-KJID4PRD.js";
8
+ import "../../../chunk-RXNIOPOA.js";
9
9
  import "../../../chunk-H2PTB6FD.js";
10
10
  import {
11
11
  AnimatedIcon
@@ -3,7 +3,7 @@ import {
3
3
  StepContentComponent,
4
4
  StepIndicatorComponent,
5
5
  StepItemRow
6
- } from "./chunk-GFQ4U6WZ.js";
6
+ } from "./chunk-KJID4PRD.js";
7
7
 
8
8
  // src/components/utility/WorkflowStep/WorkflowStepRow.tsx
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -78,4 +78,4 @@ var StepRow = ({
78
78
  export {
79
79
  StepRow
80
80
  };
81
- //# sourceMappingURL=chunk-WDVNRW3Q.js.map
81
+ //# sourceMappingURL=chunk-7OO3BELX.js.map
@@ -2,7 +2,7 @@ import {
2
2
  indicatorSizeFor,
3
3
  stepColors,
4
4
  stepPalette
5
- } from "./chunk-VXQOSADY.js";
5
+ } from "./chunk-RXNIOPOA.js";
6
6
  import {
7
7
  neutralTones
8
8
  } from "./chunk-FQ6UW7IY.js";
@@ -46,7 +46,7 @@ var StepItem = styled(Box, {
46
46
  // Allow content to shrink
47
47
  }));
48
48
  var StepIndicator = styled(Box, {
49
- shouldForwardProp: (prop) => !["size", "variant", "color", "isActive", "isCompleted", "isError", "interactive", "disabled"].includes(prop)
49
+ shouldForwardProp: (prop) => !["size", "variant", "color", "isActive", "isCompleted", "isError", "interactive", "animated", "disabled"].includes(prop)
50
50
  })(({ theme, size, variant, color, isActive, isCompleted, isError, interactive, animated, disabled }) => {
51
51
  const indicatorSize = indicatorSizeFor(size);
52
52
  const palette = stepPalette(theme, color);
@@ -294,4 +294,4 @@ export {
294
294
  StepContentComponent,
295
295
  StepItemRow
296
296
  };
297
- //# sourceMappingURL=chunk-GFQ4U6WZ.js.map
297
+ //# sourceMappingURL=chunk-KJID4PRD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/utility/WorkflowStep/WorkflowStep.parts.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React, { forwardRef, useCallback } from 'react';\n\nimport type { StepColors } from './WorkflowStep.helpers';\nimport { indicatorSizeFor, stepColors, stepPalette } from './WorkflowStep.helpers';\nimport type {\n StepConnectorProps,\n StepContentProps,\n StepIndicatorProps,\n WorkflowStepProps,\n} from './WorkflowStep.types';\nimport { neutralTones } from '../../../tokens/ink';\nimport { rem } from '../../../tokens/relative';\n\n// `outlined` shows the surface through a coloured rim; the other three fill it and\n// differ only in what border they keep.\nconst indicatorVariantStyles = (\n theme: Theme,\n variant: WorkflowStepProps['variant'],\n { backgroundColor, borderColor, textColor }: StepColors,\n): CSSObject => {\n if (variant === 'outlined') {\n return {\n border: `${rem(theme, 2)} solid ${borderColor}`,\n backgroundColor: theme.palette.background.paper,\n };\n }\n\n const filled = { backgroundColor, color: textColor };\n\n switch (variant) {\n case 'filled':\n return filled;\n case 'minimal':\n return { ...filled, border: 'none' };\n case 'default':\n return { ...filled, border: `1px solid ${borderColor}` };\n default:\n return {};\n }\n};\n\nconst StepItem = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'isLast'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n isLast: boolean;\n}>(({ orientation, isLast }) => ({\n display: 'flex',\n flexDirection: orientation === 'vertical' ? 'column' : 'row',\n alignItems: orientation === 'vertical' ? 'flex-start' : 'center',\n flex: orientation === 'horizontal' && !isLast ? 1 : 'none',\n position: 'relative',\n minWidth: 0, // Allow content to shrink\n}));\n\nconst StepIndicator = styled(Box, {\n shouldForwardProp: (prop) => !['size', 'variant', 'color', 'isActive', 'isCompleted', 'isError', 'interactive', 'animated', 'disabled'].includes(prop as string),\n})<{\n size: WorkflowStepProps['size'];\n variant: WorkflowStepProps['variant'];\n color: WorkflowStepProps['color'];\n isActive: boolean;\n isCompleted: boolean;\n isError: boolean;\n interactive: boolean;\n animated: boolean;\n disabled: boolean;\n}>(({ theme, size, variant, color, isActive, isCompleted, isError, interactive, animated, disabled }) => {\n const indicatorSize = indicatorSizeFor(size);\n const palette = stepPalette(theme, color);\n const { backgroundColor, borderColor, textColor } = stepColors(theme, palette, {\n isActive,\n isCompleted,\n isError,\n variant,\n });\n\n return {\n width: rem(theme, indicatorSize),\n height: rem(theme, indicatorSize),\n borderRadius: '50%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: rem(theme, 12),\n fontWeight: theme.typography.fontWeightMedium,\n cursor: interactive && !disabled ? 'pointer' : 'default',\n transition: animated\n ? theme.transitions.create(['background-color', 'border-color', 'transform'], {\n duration: theme.transitions.duration.short,\n })\n : 'none',\n flexShrink: 0,\n\n ...indicatorVariantStyles(theme, variant, { backgroundColor, borderColor, textColor }),\n\n // Interactive states\n ...(interactive && !disabled && {\n '&:hover': {\n transform: 'scale(1.1)',\n boxShadow: theme.shadows[2],\n },\n '&:focus-visible': {\n outline: `${rem(theme, 2)} solid ${palette.main}`,\n outlineOffset: rem(theme, 2),\n },\n }),\n\n // Disabled state\n ...(disabled && {\n opacity: 0.5,\n cursor: 'not-allowed',\n }),\n };\n});\n\nconst StepContent = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'interactive', 'disabled'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n interactive: boolean;\n disabled: boolean;\n}>(({ theme, orientation, interactive, disabled }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: orientation === 'vertical' ? 'flex-start' : 'center',\n textAlign: orientation === 'vertical' ? 'left' : 'center',\n marginTop: orientation === 'vertical' ? theme.spacing(1) : theme.spacing(0.5),\n marginLeft: orientation === 'horizontal' ? theme.spacing(1) : 0,\n cursor: interactive && !disabled ? 'pointer' : 'default',\n minWidth: 0,\n flex: 1,\n\n '& .step-title': {\n fontSize: rem(theme, 14),\n fontWeight: theme.typography.fontWeightMedium,\n color: theme.palette.text.primary,\n marginBottom: theme.spacing(0.5),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n maxWidth: '100%',\n },\n\n '& .step-description': {\n fontSize: rem(theme, 12),\n color: theme.palette.text.secondary,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n maxWidth: '100%',\n },\n\n ...(disabled && {\n opacity: 0.5,\n }),\n}));\n\nconst StepConnector = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'isCompleted', 'color', 'variant'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n isCompleted: boolean;\n color: WorkflowStepProps['color'];\n variant: WorkflowStepProps['variant'];\n}>(({ theme, orientation, isCompleted, color, variant }) => {\n const connectorColor = isCompleted ? stepPalette(theme, color).main : neutralTones(theme).track;\n\n return {\n flex: 1,\n position: 'relative',\n \n ...(orientation === 'horizontal' && {\n height: rem(theme, 2),\n backgroundColor: connectorColor,\n margin: `0 ${theme.spacing(1)}`,\n minWidth: theme.spacing(2),\n }),\n \n ...(orientation === 'vertical' && {\n width: rem(theme, 2),\n backgroundColor: connectorColor,\n minHeight: theme.spacing(3),\n marginLeft: theme.spacing(2),\n position: 'absolute',\n left: '50%',\n transform: 'translateX(-50%)',\n top: '100%',\n }),\n\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.short,\n }),\n\n ...(variant === 'minimal' && {\n opacity: 0.6,\n }),\n };\n});\n\n/**\n * Individual step indicator component\n */\nconst StepIndicatorComponent = forwardRef<HTMLDivElement, StepIndicatorProps>(({\n step,\n index,\n isActive,\n isCompleted,\n isError,\n variant,\n color,\n size,\n showNumbers,\n showIcons,\n completedIcon,\n errorIcon,\n interactive,\n animated,\n disabled,\n onClick,\n 'data-testid': dataTestId,\n}, ref) => {\n const handleClick = useCallback(() => {\n if (interactive && !disabled && onClick) {\n onClick(index, step);\n }\n }, [interactive, disabled, onClick, index, step]);\n\n const handleKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (interactive && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n if (onClick) {\n onClick(index, step);\n }\n }\n }, [interactive, disabled, onClick, index, step]);\n\n const renderIndicatorContent = () => {\n if (isError && errorIcon) {\n return errorIcon;\n }\n if (isCompleted && completedIcon) {\n return completedIcon;\n }\n if (showIcons && step.icon) {\n return step.icon;\n }\n if (showNumbers) {\n return index + 1;\n }\n return null;\n };\n\n return (\n <StepIndicator\n ref={ref}\n size={size}\n variant={variant}\n color={color}\n isActive={isActive}\n isCompleted={isCompleted}\n isError={isError}\n interactive={interactive}\n animated={animated}\n disabled={Boolean(disabled || step.disabled)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role={interactive ? 'button' : undefined}\n tabIndex={interactive && !disabled && !step.disabled ? 0 : -1}\n aria-label={`Step ${index + 1}: ${step.title}`}\n aria-current={isActive ? 'step' : undefined}\n data-testid={dataTestId}\n >\n {renderIndicatorContent()}\n </StepIndicator>\n );\n});\n\nStepIndicatorComponent.displayName = 'StepIndicator';\n\n/**\n * Step connector component\n */\nconst StepConnectorComponent = forwardRef<HTMLDivElement, StepConnectorProps>(({\n isCompleted,\n orientation,\n variant,\n color,\n 'data-testid': dataTestId,\n}, ref) => (\n <StepConnector\n ref={ref}\n orientation={orientation}\n isCompleted={isCompleted}\n color={color}\n variant={variant}\n data-testid={dataTestId}\n />\n));\n\nStepConnectorComponent.displayName = 'StepConnector';\n\n/**\n * Step content component\n */\nconst StepContentComponent = forwardRef<HTMLDivElement, StepContentProps>(({\n step,\n index,\n orientation,\n interactive,\n disabled,\n onClick,\n 'data-testid': dataTestId,\n}, ref) => {\n const handleClick = useCallback(() => {\n if (interactive && !disabled && onClick) {\n onClick(index, step);\n }\n }, [interactive, disabled, onClick, index, step]);\n\n const handleKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (interactive && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n if (onClick) {\n onClick(index, step);\n }\n }\n }, [interactive, disabled, onClick, index, step]);\n\n return (\n <StepContent\n ref={ref}\n orientation={orientation}\n interactive={interactive}\n disabled={Boolean(disabled || step.disabled)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role={interactive ? 'button' : undefined}\n tabIndex={interactive && !disabled && !step.disabled ? 0 : -1}\n data-testid={dataTestId}\n >\n <div className=\"step-title\">{step.title}</div>\n {step.description && (\n <div className=\"step-description\">{step.description}</div>\n )}\n </StepContent>\n );\n});\n\nStepContentComponent.displayName = 'StepContent';\n\n/**\n * A plain wrapper around the styled row. Exporting the styled component itself\n * trips TS2742 — its inferred type names a pnpm-internal @mui/system path.\n */\nexport const StepItemRow: React.FC<{\n orientation: WorkflowStepProps['orientation'];\n isLast: boolean;\n children: React.ReactNode;\n}> = ({ orientation, isLast, children }) => (\n <StepItem orientation={orientation} isLast={isLast}>\n {children}\n </StepItem>\n);\n\nexport { StepConnectorComponent, StepContentComponent, StepIndicatorComponent };\n"],"mappings":";;;;;;;;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Ae,CAAC,aAAa,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;AAC5E,YAAM,eAAe;AACrB,UAAI,SAAS;AACX,gBAAQ,OAAO,IAAI;AAAA,MACrB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,aAAa,UAAU,SAAS,OAAO,IAAI,CAAC;AAEhD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,QAAQ,YAAY,KAAK,QAAQ;AAAA,MAC3C,SAAS;AAAA,MACT,WAAW;AAAA,MACX,MAAM,cAAc,WAAW;AAAA,MAC/B,UAAU,eAAe,CAAC,YAAY,CAAC,KAAK,WAAW,IAAI;AAAA,MAC3D,eAAa;AAAA,MAEb;AAAA,4BAAC,SAAI,WAAU,cAAc,eAAK,OAAM;AAAA,QACvC,KAAK,eACJ,oBAAC,SAAI,WAAU,oBAAoB,eAAK,aAAY;AAAA;AAAA;AAAA,EAExD;AAEJ,CAAC;AAED,qBAAqB,cAAc;AAM5B,IAAM,cAIR,CAAC,EAAE,aAAa,QAAQ,SAAS,MACpC,oBAAC,YAAS,aAA0B,QACjC,UACH;","names":[]}
@@ -59,14 +59,15 @@ var styleLength = (theme, value) => typeof value === "number" ? rem(theme, value
59
59
  var isFraction = (value) => typeof value === "number" && value > 0 && value <= 1;
60
60
  var sxLength = (theme, value) => isFraction(value) ? `${value * 100}%` : styleLength(theme, value);
61
61
  var innerLength = (theme, value) => isFraction(value) ? "100%" : styleLength(theme, value);
62
+ var orDefault = (value, fallback) => value === void 0 || value === "" ? fallback : value;
62
63
  var SkeletonIndicator = ({ props }) => {
63
64
  const theme = useTheme();
64
65
  return /* @__PURE__ */ jsx(
65
66
  Skeleton,
66
67
  {
67
68
  variant: "rectangular",
68
- width: innerLength(theme, props.width || "100%"),
69
- height: innerLength(theme, props.height || 200),
69
+ width: innerLength(theme, orDefault(props.width, "100%")),
70
+ height: innerLength(theme, orDefault(props.height, "auto")),
70
71
  animation: props.skeletonProps.animation || "pulse",
71
72
  intensity: props.skeletonProps.intensity,
72
73
  borderRadius: styleLength(theme, props.borderRadius),
@@ -173,8 +174,8 @@ var LazyImage = React.memo(function LazyImage2(rawProps) {
173
174
  ref: containerRef,
174
175
  className: props.className,
175
176
  sx: {
176
- width: sxLength(theme, width || "auto"),
177
- height: sxLength(theme, height || "auto"),
177
+ width: sxLength(theme, orDefault(width, "auto")),
178
+ height: sxLength(theme, orDefault(height, "auto")),
178
179
  // The same px length the image gets (`metrics`): in `sx` a bare number
179
180
  // would be a multiple of `shape.borderRadius`, and this box clips (FUT-2656).
180
181
  borderRadius: metrics.borderRadius
@@ -220,4 +221,4 @@ LazyImage.displayName = "LazyImage";
220
221
  export {
221
222
  LazyImage
222
223
  };
223
- //# sourceMappingURL=chunk-SDK5LPPC.js.map
224
+ //# sourceMappingURL=chunk-LW2LQHIM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/LazyImage/LazyImage.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport { styled, useTheme, type Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\nimport { Skeleton } from '../../layout/Skeleton';\nimport type { ResolvedLazyImageProps } from './LazyImage.hooks';\nimport { imgPassThrough, resolveLazyImageProps, useLazyImage } from './LazyImage.hooks';\nimport type { LazyImageProps } from './LazyImage.types';\nimport { sheen } from '../../../tokens/ink';\nimport { rem } from '../../../tokens/relative';\n\nconst ImageContainer = styled(Box)(() => ({\n position: 'relative',\n display: 'inline-block',\n overflow: 'hidden',\n}));\n\nconst StyledImage = styled('img')<{\n fadeIn?: boolean;\n fadeInDuration?: number;\n isLoaded?: boolean;\n}>(({ fadeIn, fadeInDuration = 300, isLoaded }) => ({\n display: 'block',\n maxWidth: '100%',\n height: 'auto',\n opacity: fadeIn ? (isLoaded ? 1 : 0) : 1,\n transition: fadeIn ? `opacity ${fadeInDuration}ms ease-in-out` : 'none',\n}));\n\nconst SpinnerOverlay = styled(Box)(({ theme }) => ({\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: sheen(theme, 0.8),\n borderRadius: '50%',\n padding: theme.spacing(1),\n}));\n\nconst FallbackContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.palette.action.disabledBackground,\n color: theme.palette.text.secondary,\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: 0,\n left: 0,\n}));\n\ntype Length = number | string | undefined;\n\n/** A length prop as React `style` and MUI's `Skeleton` read it: a number is design px. */\nconst styleLength = (theme: Theme, value: Length): string | undefined =>\n typeof value === 'number' ? rem(theme, value) : value;\n\n/**\n * A width or height above 0 and up to 1 is a fraction of the container's parent, as in `sx`.\n * A negative number is no fraction: it stays a (negative, so invalid) length.\n */\nconst isFraction = (value: Length): value is number =>\n typeof value === 'number' && value > 0 && value <= 1;\n\n/**\n * A length prop as `sx` reads it on a width or height: a number of 1 or less is\n * a fraction of the parent, and that stays so; any other number is design px.\n */\nconst sxLength = (theme: Theme, value: Length): string | undefined =>\n isFraction(value) ? `${value * 100}%` : styleLength(theme, value);\n\n/**\n * A width or height for what is drawn inside the container. The container alone\n * takes a fraction, so everything in it fills it: a percentage here is measured\n * against the container and would stack (FUT-2666). Otherwise the same as `styleLength`.\n */\nconst innerLength = (theme: Theme, value: Length): string | undefined =>\n isFraction(value) ? '100%' : styleLength(theme, value);\n\n/**\n * A width or height with its default. Only an unset or empty size takes it: `0`\n * is a size, which `||` read as unset (FUT-2669), and `sx` reads `''` as `0%`.\n */\nconst orDefault = (value: Length, fallback: number | string): number | string =>\n value === undefined || value === '' ? fallback : value;\n\n/** The box the image occupies, as CSS, shared by the real image and every stand-in for it. */\ninterface BoxMetrics {\n width?: string;\n height?: string;\n objectFit: NonNullable<LazyImageProps['objectFit']>;\n objectPosition: string;\n borderRadius?: string;\n}\n\ninterface IndicatorProps {\n props: ResolvedLazyImageProps;\n metrics: BoxMetrics;\n}\n\nconst SkeletonIndicator: React.FC<IndicatorProps> = ({ props }) => {\n const theme = useTheme();\n return (\n <Skeleton\n variant=\"rectangular\"\n width={innerLength(theme, orDefault(props.width, '100%'))}\n height={innerLength(theme, orDefault(props.height, 'auto'))}\n animation={props.skeletonProps.animation || 'pulse'}\n intensity={props.skeletonProps.intensity}\n borderRadius={styleLength(theme, props.borderRadius)}\n data-testid={`${props['data-testid']}-skeleton`}\n />\n );\n};\n\nconst SpinnerIndicator: React.FC<IndicatorProps> = ({ props }) => {\n const theme = useTheme();\n const { spinnerProps } = props;\n\n return (\n <SpinnerOverlay>\n <CircularProgress\n size={styleLength(theme, spinnerProps.size || 40)}\n thickness={spinnerProps.thickness || 4}\n sx={{ color: spinnerProps.color || theme.palette.primary.main }}\n data-testid={`${props['data-testid']}-spinner`}\n />\n </SpinnerOverlay>\n );\n};\n\nconst PlaceholderIndicator: React.FC<IndicatorProps & { hasSrc: boolean }> = ({\n props,\n metrics,\n hasSrc,\n}) => {\n // Once a src has been chosen the real <img> is on screen, so the placeholder\n // would only stack behind it.\n if (!props.placeholder || hasSrc) return null;\n\n return (\n <StyledImage\n src={props.placeholder}\n alt={`${props.alt} (loading)`}\n style={metrics}\n data-testid={`${props['data-testid']}-placeholder`}\n />\n );\n};\n\nconst LoadingIndicator: React.FC<\n IndicatorProps & { kind: NonNullable<LazyImageProps['loadingState']>; hasSrc: boolean }\n> = ({ kind, hasSrc, ...rest }) => {\n switch (kind) {\n case 'skeleton':\n return <SkeletonIndicator {...rest} />;\n case 'spinner':\n return <SpinnerIndicator {...rest} />;\n case 'placeholder':\n return <PlaceholderIndicator {...rest} hasSrc={hasSrc} />;\n default:\n return null;\n }\n};\n\nconst ErrorFallback: React.FC<IndicatorProps> = ({ props, metrics }) => {\n const theme = useTheme();\n const { alt, fallback, width, height, borderRadius } = props;\n const testId = props['data-testid'];\n\n if (!fallback) return null;\n\n if (typeof fallback === 'string') {\n return (\n <StyledImage\n src={fallback}\n alt={`${alt} (fallback)`}\n style={metrics}\n fadeIn={false}\n isLoaded={true}\n data-testid={`${testId}-fallback`}\n />\n );\n }\n\n return (\n <FallbackContainer\n sx={{\n width: innerLength(theme, width),\n height: innerLength(theme, height),\n borderRadius: styleLength(theme, borderRadius),\n }}\n data-testid={`${testId}-fallback`}\n >\n {fallback}\n </FallbackContainer>\n );\n};\n\n/**\n * LazyImage component with enhanced features for optimized image loading\n * Supports lazy loading, placeholders, error handling, and various loading states\n */\nexport const LazyImage = React.memo<LazyImageProps>(function LazyImage(rawProps) {\n const props = resolveLazyImageProps(rawProps);\n const theme = useTheme();\n const {\n state,\n containerRef,\n effectiveLoadingState,\n handleImageLoad,\n handleImageError,\n showImage,\n showLoading,\n } = useLazyImage(props);\n\n const { width, height, borderRadius, alt } = props;\n const testId = props['data-testid'];\n const metrics: BoxMetrics = {\n width: innerLength(theme, width),\n height: innerLength(theme, height),\n objectFit: props.objectFit,\n objectPosition: props.objectPosition,\n borderRadius: styleLength(theme, borderRadius),\n };\n\n return (\n <ImageContainer\n ref={containerRef}\n className={props.className}\n sx={{\n width: sxLength(theme, orDefault(width, 'auto')),\n height: sxLength(theme, orDefault(height, 'auto')),\n // The same px length the image gets (`metrics`): in `sx` a bare number\n // would be a multiple of `shape.borderRadius`, and this box clips (FUT-2656).\n borderRadius: metrics.borderRadius,\n }}\n data-testid={testId}\n >\n {showLoading && (\n <LoadingIndicator\n kind={effectiveLoadingState}\n props={props}\n metrics={metrics}\n hasSrc={Boolean(state.currentSrc)}\n />\n )}\n\n {showImage && (\n <StyledImage\n src={state.currentSrc || undefined}\n alt={alt}\n onLoad={handleImageLoad}\n onError={handleImageError}\n fadeIn={props.fadeIn}\n fadeInDuration={props.fadeInDuration}\n isLoaded={!state.isLoading}\n decoding={props.decoding}\n loading={props.lazy ? 'lazy' : props.loading}\n style={{ ...metrics, ...props.sx }}\n aria-label={props['aria-label'] || alt}\n aria-describedby={props['aria-describedby']}\n role={props.role}\n data-testid={`${testId}-img`}\n {...imgPassThrough(props)}\n />\n )}\n\n {state.hasError && <ErrorFallback props={props} metrics={metrics} />}\n </ImageContainer>\n );\n});\n\nLazyImage.displayName = 'LazyImage';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,SAAS;AAChB,OAAO,sBAAsB;AAC7B,SAAS,QAAQ,gBAA4B;AAC7C,OAAO,WAAW;AAwGd,cA4HA,YA5HA;AAhGJ,IAAM,iBAAiB,OAAO,GAAG,EAAE,OAAO;AAAA,EACxC,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AACZ,EAAE;AAEF,IAAM,cAAc,OAAO,KAAK,EAI7B,CAAC,EAAE,QAAQ,iBAAiB,KAAK,SAAS,OAAO;AAAA,EAClD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS,SAAU,WAAW,IAAI,IAAK;AAAA,EACvC,YAAY,SAAS,WAAW,cAAc,mBAAmB;AACnE,EAAE;AAEF,IAAM,iBAAiB,OAAO,GAAG,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EACjD,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,iBAAiB,MAAM,OAAO,GAAG;AAAA,EACjC,cAAc;AAAA,EACd,SAAS,MAAM,QAAQ,CAAC;AAC1B,EAAE;AAEF,IAAM,oBAAoB,OAAO,GAAG,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EACpD,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,iBAAiB,MAAM,QAAQ,OAAO;AAAA,EACtC,OAAO,MAAM,QAAQ,KAAK;AAAA,EAC1B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAA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AAM,kBAAkB;AAAA,YAC1C,MAAM,MAAM;AAAA,YACZ,eAAa,GAAG,MAAM;AAAA,YACrB,GAAG,eAAe,KAAK;AAAA;AAAA,QAC1B;AAAA,QAGD,MAAM,YAAY,oBAAC,iBAAc,OAAc,SAAkB;AAAA;AAAA;AAAA,EACpE;AAEJ,CAAC;AAED,UAAU,cAAc;","names":["LazyImage"]}
@@ -78,12 +78,18 @@ var definedProps = (props) => Object.fromEntries(
78
78
  Object.entries(props).filter(([, value]) => value !== void 0)
79
79
  );
80
80
  var resolveWorkflowStepProps = (props) => ({ ...WORKFLOW_DEFAULTS, ...definedProps(props) });
81
+ var progressValueText = (steps, currentStep) => {
82
+ const position = `Step ${currentStep + 1} of ${steps.length}`;
83
+ const step = steps[currentStep];
84
+ return step === void 0 ? position : `${position}: ${step.title}`;
85
+ };
81
86
 
82
87
  export {
83
88
  indicatorSizeFor,
84
89
  stepPalette,
85
90
  stepColors,
86
91
  withDerivedStatus,
87
- resolveWorkflowStepProps
92
+ resolveWorkflowStepProps,
93
+ progressValueText
88
94
  };
89
- //# sourceMappingURL=chunk-VXQOSADY.js.map
95
+ //# sourceMappingURL=chunk-RXNIOPOA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/utility/WorkflowStep/WorkflowStep.helpers.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles/index.js';\n\nimport type { WorkflowStepItem, WorkflowStepProps } from './WorkflowStep.types';\nimport { neutralTones } from '../../../tokens/ink';\nimport { paletteKey } from '../../../tokens/scales';\n\ntype StepColor = NonNullable<WorkflowStepProps['color']>;\ntype StepSize = NonNullable<WorkflowStepProps['size']>;\n\nconst INDICATOR_SIZE: Record<StepSize, number> = {\n xs: 20,\n sm: 24,\n md: 32,\n lg: 40,\n xl: 48,\n};\n\nexport const indicatorSizeFor = (size?: StepSize): number =>\n INDICATOR_SIZE[size as StepSize] ?? INDICATOR_SIZE.md;\n\ninterface StepPalette {\n main: string;\n contrastText: string;\n}\n\n/**\n * The step's colour pair, keyed through `paletteKey` so `danger` reads MUI's\n * `error` (the palette has no `danger`). `neutral` lands on `grey`, a ramp with\n * no `main`, so its pair is derived from the ramp — with the contrast computed,\n * not assumed.\n */\nexport const stepPalette = (theme: Theme, color?: StepColor): StepPalette => {\n const key = paletteKey(color || 'primary');\n if (key === 'grey') {\n const main = neutralTones(theme).emphasis;\n return {\n main,\n contrastText: theme.palette.getContrastText(main),\n };\n }\n\n return theme.palette[key];\n};\n\nexport interface StepColors {\n backgroundColor: string;\n borderColor: string;\n textColor: string;\n}\n\ninterface StepState {\n isActive: boolean;\n isCompleted: boolean;\n isError: boolean;\n variant?: WorkflowStepProps['variant'];\n}\n\n/**\n * An indicator is one of four things, in priority order: failed, done, the step\n * you are on, or still ahead. Only the active one respects `variant` — an active\n * outlined step stays hollow with a coloured rim.\n */\nexport const stepColors = (\n theme: Theme,\n palette: StepPalette,\n { isActive, isCompleted, isError, variant }: StepState,\n): StepColors => {\n if (isError) {\n return {\n backgroundColor: theme.palette.error.main,\n borderColor: theme.palette.error.main,\n textColor: theme.palette.error.contrastText,\n };\n }\n\n if (isCompleted) {\n return {\n backgroundColor: palette.main,\n borderColor: palette.main,\n textColor: palette.contrastText,\n };\n }\n\n if (isActive) {\n const filled = variant === 'filled';\n return {\n backgroundColor: filled ? palette.main : theme.palette.background.paper,\n borderColor: palette.main,\n textColor: filled ? palette.contrastText : palette.main,\n };\n }\n\n return {\n backgroundColor: neutralTones(theme).track,\n borderColor: neutralTones(theme).track,\n textColor: theme.palette.text.secondary,\n };\n};\n\n/**\n * A step that declares `error` keeps it; the rest are positioned against\n * `currentStep`, so a caller only has to move one number to advance the workflow.\n */\nexport const withDerivedStatus = (\n steps: WorkflowStepItem[],\n currentStep: number,\n): WorkflowStepItem[] =>\n steps.map((step, index) => {\n const derivable =\n step.status === 'pending' || step.status === 'current' || step.status === 'completed';\n\n if (!derivable) return { ...step, status: step.status };\n\n if (index < currentStep) return { ...step, status: 'completed' as const };\n if (index === currentStep) return { ...step, status: 'current' as const };\n return { ...step, status: 'pending' as const };\n });\n\ntype WorkflowDefaultedKeys =\n | 'currentStep'\n | 'variant'\n | 'orientation'\n | 'color'\n | 'size'\n | 'showProgress'\n | 'animated'\n | 'interactive'\n | 'showNumbers'\n | 'showIcons'\n | 'disabled';\n\ntype ResolvedWorkflowStepProps = WorkflowStepProps &\n Required<Pick<WorkflowStepProps, WorkflowDefaultedKeys>>;\n\nconst WORKFLOW_DEFAULTS: Pick<WorkflowStepProps, WorkflowDefaultedKeys> = {\n currentStep: 0,\n variant: 'default',\n orientation: 'horizontal',\n color: 'primary',\n size: 'md',\n showProgress: true,\n animated: true,\n interactive: false,\n showNumbers: true,\n showIcons: false,\n disabled: false,\n};\n\n// Strips explicitly-undefined props before the merge, so `size={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = (props: WorkflowStepProps): Partial<WorkflowStepProps> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<WorkflowStepProps>;\n\nexport const resolveWorkflowStepProps = (\n props: WorkflowStepProps,\n): ResolvedWorkflowStepProps =>\n ({ ...WORKFLOW_DEFAULTS, ...definedProps(props) }) as ResolvedWorkflowStepProps;\n"],"mappings":";;;;;;;;AASA,IAAM,iBAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,mBAAmB,CAAC,SAC/B,eAAe,IAAgB,KAAK,eAAe;AAa9C,IAAM,cAAc,CAAC,OAAc,UAAmC;AAC3E,QAAM,MAAM,WAAW,SAAS,SAAS;AACzC,MAAI,QAAQ,QAAQ;AAClB,UAAM,OAAO,aAAa,KAAK,EAAE;AACjC,WAAO;AAAA,MACL;AAAA,MACA,cAAc,MAAM,QAAQ,gBAAgB,IAAI;AAAA,IAClD;AAAA,EACF;AAEA,SAAO,MAAM,QAAQ,GAAG;AAC1B;AAoBO,IA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AAAA,EACV,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AACZ;AAIA,IAAM,eAAe,CAAC,UACpB,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAEK,IAAM,2BAA2B,CACtC,WAEC,EAAE,GAAG,mBAAmB,GAAG,aAAa,KAAK,EAAE;","names":[]}
1
+ {"version":3,"sources":["../src/components/utility/WorkflowStep/WorkflowStep.helpers.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles/index.js';\n\nimport type { WorkflowStepItem, WorkflowStepProps } from './WorkflowStep.types';\nimport { neutralTones } from '../../../tokens/ink';\nimport { paletteKey } from '../../../tokens/scales';\n\ntype StepColor = NonNullable<WorkflowStepProps['color']>;\ntype StepSize = NonNullable<WorkflowStepProps['size']>;\n\nconst INDICATOR_SIZE: Record<StepSize, number> = {\n xs: 20,\n sm: 24,\n md: 32,\n lg: 40,\n xl: 48,\n};\n\nexport const indicatorSizeFor = (size?: StepSize): number =>\n INDICATOR_SIZE[size as StepSize] ?? INDICATOR_SIZE.md;\n\ninterface StepPalette {\n main: string;\n contrastText: string;\n}\n\n/**\n * The step's colour pair, keyed through `paletteKey` so `danger` reads MUI's\n * `error` (the palette has no `danger`). `neutral` lands on `grey`, a ramp with\n * no `main`, so its pair is derived from the ramp — with the contrast computed,\n * not assumed.\n */\nexport const stepPalette = (theme: Theme, color?: StepColor): StepPalette => {\n const key = paletteKey(color || 'primary');\n if (key === 'grey') {\n const main = neutralTones(theme).emphasis;\n return {\n main,\n contrastText: theme.palette.getContrastText(main),\n };\n }\n\n return theme.palette[key];\n};\n\nexport interface StepColors {\n backgroundColor: string;\n borderColor: string;\n textColor: string;\n}\n\ninterface StepState {\n isActive: boolean;\n isCompleted: boolean;\n isError: boolean;\n variant?: WorkflowStepProps['variant'];\n}\n\n/**\n * An indicator is one of four things, in priority order: failed, done, the step\n * you are on, or still ahead. Only the active one respects `variant` — an active\n * outlined step stays hollow with a coloured rim.\n */\nexport const stepColors = (\n theme: Theme,\n palette: StepPalette,\n { isActive, isCompleted, isError, variant }: StepState,\n): StepColors => {\n if (isError) {\n return {\n backgroundColor: theme.palette.error.main,\n borderColor: theme.palette.error.main,\n textColor: theme.palette.error.contrastText,\n };\n }\n\n if (isCompleted) {\n return {\n backgroundColor: palette.main,\n borderColor: palette.main,\n textColor: palette.contrastText,\n };\n }\n\n if (isActive) {\n const filled = variant === 'filled';\n return {\n backgroundColor: filled ? palette.main : theme.palette.background.paper,\n borderColor: palette.main,\n textColor: filled ? palette.contrastText : palette.main,\n };\n }\n\n return {\n backgroundColor: neutralTones(theme).track,\n borderColor: neutralTones(theme).track,\n textColor: theme.palette.text.secondary,\n };\n};\n\n/**\n * A step that declares `error` keeps it; the rest are positioned against\n * `currentStep`, so a caller only has to move one number to advance the workflow.\n */\nexport const withDerivedStatus = (\n steps: WorkflowStepItem[],\n currentStep: number,\n): WorkflowStepItem[] =>\n steps.map((step, index) => {\n const derivable =\n step.status === 'pending' || step.status === 'current' || step.status === 'completed';\n\n if (!derivable) return { ...step, status: step.status };\n\n if (index < currentStep) return { ...step, status: 'completed' as const };\n if (index === currentStep) return { ...step, status: 'current' as const };\n return { ...step, status: 'pending' as const };\n });\n\ntype WorkflowDefaultedKeys =\n | 'currentStep'\n | 'variant'\n | 'orientation'\n | 'color'\n | 'size'\n | 'showProgress'\n | 'animated'\n | 'interactive'\n | 'showNumbers'\n | 'showIcons'\n | 'disabled';\n\ntype ResolvedWorkflowStepProps = WorkflowStepProps &\n Required<Pick<WorkflowStepProps, WorkflowDefaultedKeys>>;\n\nconst WORKFLOW_DEFAULTS: Pick<WorkflowStepProps, WorkflowDefaultedKeys> = {\n currentStep: 0,\n variant: 'default',\n orientation: 'horizontal',\n color: 'primary',\n size: 'md',\n showProgress: true,\n animated: true,\n interactive: false,\n showNumbers: true,\n showIcons: false,\n disabled: false,\n};\n\n// Strips explicitly-undefined props before the merge, so `size={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = (props: WorkflowStepProps): Partial<WorkflowStepProps> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<WorkflowStepProps>;\n\nexport const resolveWorkflowStepProps = (\n props: WorkflowStepProps,\n): ResolvedWorkflowStepProps =>\n ({ ...WORKFLOW_DEFAULTS, ...definedProps(props) }) as ResolvedWorkflowStepProps;\n\n/**\n * The progressbar's `aria-valuetext`: `Step N of M: <title>` while `currentStep`\n * names a step, and `Step N of M` when it does not (past the end, below zero, or\n * no steps at all), so a screen reader never reads a missing title as\n * \"undefined\". The index itself is not clamped (FUT-2671).\n */\nexport const progressValueText = (\n steps: readonly WorkflowStepItem[],\n currentStep: number,\n): string => {\n const position = `Step ${currentStep + 1} of ${steps.length}`;\n const step = steps[currentStep];\n return step === undefined ? position : `${position}: ${step.title}`;\n};\n"],"mappings":";;;;;;;;AASA,IAAM,iBAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,mBAAmB,CAAC,SAC/B,eAAe,IAAgB,KAAK,eAAe;AAa9C,IAAM,cAAc,CAAC,OAAc,UAAmC;AAC3E,QAAM,MAAM,WAAW,SAAS,SAAS;AACzC,MAAI,QAAQ,QAAQ;AAClB,UAAM,OAAO,aAAa,KAAK,EAAE;AACjC,WAAO;AAAA,MACL;AAAA,MACA,cAAc,MAAM,QAAQ,gBAAgB,IAAI;AAAA,IAClD;AAAA,EACF;AAEA,SAAO,MAAM,QAAQ,GAAG;AAC1B;AAoBO,IAAM,aAAa,CACxB,OACA,SACA,EAAE,UAAU,aAAa,SAAS,QAAQ,MAC3B;AACf,MAAI,SAAS;AACX,WAAO;AAAA,MACL,iBAAiB,MAAM,QAAQ,MAAM;AAAA,MACrC,aAAa,MAAM,QAAQ,MAAM;AAAA,MACj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AAM,UAAU,MAAS;AACjE;AAEK,IAAM,2BAA2B,CACtC,WAEC,EAAE,GAAG,mBAAmB,GAAG,aAAa,KAAK,EAAE;AAQ3C,IAAM,oBAAoB,CAC/B,OACA,gBACW;AACX,QAAM,WAAW,QAAQ,cAAc,CAAC,OAAO,MAAM,MAAM;AAC3D,QAAM,OAAO,MAAM,WAAW;AAC9B,SAAO,SAAS,SAAY,WAAW,GAAG,QAAQ,KAAK,KAAK,KAAK;AACnE;","names":[]}
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  StepRow
3
- } from "./chunk-WDVNRW3Q.js";
3
+ } from "./chunk-7OO3BELX.js";
4
4
  import {
5
+ progressValueText,
5
6
  resolveWorkflowStepProps,
6
7
  withDerivedStatus
7
- } from "./chunk-VXQOSADY.js";
8
+ } from "./chunk-RXNIOPOA.js";
8
9
 
9
10
  // src/components/utility/WorkflowStep/WorkflowStep.tsx
10
11
  import Box from "@mui/material/Box/index.js";
@@ -68,7 +69,7 @@ var WorkflowStep = forwardRef((rawProps, ref) => {
68
69
  "aria-valuemin": 0,
69
70
  "aria-valuemax": steps.length - 1,
70
71
  "aria-valuenow": currentStep,
71
- "aria-valuetext": `Step ${currentStep + 1} of ${steps.length}: ${steps[currentStep]?.title}`,
72
+ "aria-valuetext": progressValueText(steps, currentStep),
72
73
  "data-testid": dataTestId,
73
74
  ...other,
74
75
  children: stepsWithStatus.map((step, index) => /* @__PURE__ */ jsx(
@@ -104,4 +105,4 @@ export {
104
105
  WorkflowStep,
105
106
  WorkflowStep_default
106
107
  };
107
- //# sourceMappingURL=chunk-VLOUXTEM.js.map
108
+ //# sourceMappingURL=chunk-Y2C2S4R7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/utility/WorkflowStep/WorkflowStep.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React, { forwardRef, useCallback, useMemo } from 'react';\n\nimport { progressValueText, resolveWorkflowStepProps, withDerivedStatus } from './WorkflowStep.helpers';\nimport { StepRow } from './WorkflowStepRow';\nimport type { WorkflowStepItem, WorkflowStepProps } from './WorkflowStep.types';\n\n// Styled Components\nconst StepContainer = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'variant'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n variant: WorkflowStepProps['variant'];\n}>(({ theme, orientation, variant }) => ({\n display: 'flex',\n flexDirection: orientation === 'vertical' ? 'column' : 'row',\n alignItems: orientation === 'vertical' ? 'flex-start' : 'center',\n gap: orientation === 'vertical' ? theme.spacing(2) : theme.spacing(1),\n width: '100%',\n position: 'relative',\n \n // Variant-specific styles\n ...(variant === 'minimal' && {\n gap: orientation === 'vertical' ? theme.spacing(1) : theme.spacing(0.5),\n }),\n}));\n\n/**\n * WorkflowStep component for displaying multi-step workflows with visual progression\n */\nexport const WorkflowStep = forwardRef<HTMLDivElement, WorkflowStepProps>((rawProps, ref) => {\n const {\n steps,\n currentStep,\n variant,\n orientation,\n color,\n size,\n showProgress,\n animated,\n interactive,\n showNumbers,\n showIcons,\n completedIcon,\n errorIcon,\n onStepClick,\n disabled,\n className,\n style,\n 'data-testid': dataTestId,\n ...other\n } = resolveWorkflowStepProps(rawProps);\n const handleStepClick = useCallback((stepIndex: number, step: WorkflowStepItem) => {\n if (onStepClick && !disabled && !step.disabled) {\n onStepClick(stepIndex, step);\n }\n }, [onStepClick, disabled]);\n\n const stepsWithStatus = useMemo(\n () => withDerivedStatus(steps, currentStep),\n [steps, currentStep],\n );\n\n return (\n <StepContainer\n ref={ref}\n orientation={orientation}\n variant={variant}\n className={className}\n style={style}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={steps.length - 1}\n aria-valuenow={currentStep}\n aria-valuetext={progressValueText(steps, currentStep)}\n data-testid={dataTestId}\n {...other}\n >\n {stepsWithStatus.map((step, index) => (\n <StepRow\n key={index}\n step={step}\n index={index}\n isLast={index === steps.length - 1}\n orientation={orientation}\n variant={variant}\n color={color}\n size={size}\n showNumbers={showNumbers}\n showIcons={showIcons}\n showProgress={showProgress}\n completedIcon={completedIcon}\n errorIcon={errorIcon}\n interactive={interactive}\n animated={animated}\n disabled={disabled}\n onClick={handleStepClick}\n dataTestId={dataTestId}\n />\n ))}\n </StepContainer>\n );\n});\n\nWorkflowStep.displayName = 'WorkflowStep';\n\nexport default WorkflowStep;"],"mappings":";;;;;;;;;;AAAA,OAAO,SAAS;AAChB,SAAS,cAAc;AACvB,SAAgB,YAAY,aAAa,eAAe;AA8EhD;AAvER,IAAM,gBAAgB,OAAO,KAAK;AAAA,EAChC,mBAAmB,CAAC,SAAS,CAAC,CAAC,eAAe,SAAS,EAAE,SAAS,IAAc;AAClF,CAAC,EAGE,CAAC,EAAE,OAAO,aAAa,QAAQ,OAAO;AAAA,EACvC,SAAS;AAAA,EACT,eAAe,gBAAgB,aAAa,WAAW;AAAA,EACvD,YAAY,gBAAgB,aAAa,eAAe;AAAA,EACxD,KAAK,gBAAgB,aAAa,MAAM,QAAQ,CAAC,IAAI,MAAM,QAAQ,CAAC;AAAA,EACpE,OAAO;AAAA,EACP,UAAU;AAAA;AAAA,EAGV,GAAI,YAAY,aAAa;AAAA,IAC3B,KAAK,gBAAgB,aAAa,MAAM,QAAQ,CAAC,IAAI,MAAM,QAAQ,GAAG;AAAA,EACxE;AACF,EAAE;AAKK,IAAM,eAAe,WAA8C,CAAC,UAAU,QAAQ;AAC3F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,GAAG;AAAA,EACL,IAAI,yBAAyB,QAAQ;AACrC,QAAM,kBAAkB,YAAY,CAAC,WAAmB,SAA2B;AACjF,QAAI,eAAe,CAAC,YAAY,CAAC,KAAK,UAAU;AAC9C,kBAAY,WAAW,IAAI;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,aAAa,QAAQ,CAAC;AAE1B,QAAM,kBAAkB;AAAA,IACtB,MAAM,kBAAkB,OAAO,WAAW;AAAA,IAC1C,CAAC,OAAO,WAAW;AAAA,EACrB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,iBAAe,MAAM,SAAS;AAAA,MAC9B,iBAAe;AAAA,MACf,kBAAgB,kBAAkB,OAAO,WAAW;AAAA,MACpD,eAAa;AAAA,MACZ,GAAG;AAAA,MAEH,0BAAgB,IAAI,CAAC,MAAM,UAC1B;AAAA,QAAC;AAAA;AAAA,UAEC;AAAA,UACA;AAAA,UACA,QAAQ,UAAU,MAAM,SAAS;AAAA,UACjC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,SAAS;AAAA,UACT;AAAA;AAAA,QAjBK;AAAA,MAkBP,CACD;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,aAAa,cAAc;AAE3B,IAAO,uBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import "../chunk-5ZFO7ROE.js";
2
2
  import {
3
3
  LazyImage
4
- } from "../chunk-SDK5LPPC.js";
4
+ } from "../chunk-LW2LQHIM.js";
5
5
  import "../chunk-HCT5ELST.js";
6
6
  import "../chunk-724ZONOL.js";
7
7
  import "../chunk-BEGTLELZ.js";
@@ -1 +1 @@
1
- {"version":3,"file":"LazyImage.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/LazyImage/LazyImage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA6LxD;;;GAGG;AACH,eAAO,MAAM,SAAS,4CAoEpB,CAAC"}
1
+ {"version":3,"file":"LazyImage.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/LazyImage/LazyImage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAoMxD;;;GAGG;AACH,eAAO,MAAM,SAAS,4CAoEpB,CAAC"}
@@ -39,5 +39,12 @@ export declare const withDerivedStatus: (steps: WorkflowStepItem[], currentStep:
39
39
  type WorkflowDefaultedKeys = 'currentStep' | 'variant' | 'orientation' | 'color' | 'size' | 'showProgress' | 'animated' | 'interactive' | 'showNumbers' | 'showIcons' | 'disabled';
40
40
  type ResolvedWorkflowStepProps = WorkflowStepProps & Required<Pick<WorkflowStepProps, WorkflowDefaultedKeys>>;
41
41
  export declare const resolveWorkflowStepProps: (props: WorkflowStepProps) => ResolvedWorkflowStepProps;
42
+ /**
43
+ * The progressbar's `aria-valuetext`: `Step N of M: <title>` while `currentStep`
44
+ * names a step, and `Step N of M` when it does not (past the end, below zero, or
45
+ * no steps at all), so a screen reader never reads a missing title as
46
+ * "undefined". The index itself is not clamped (FUT-2671).
47
+ */
48
+ export declare const progressValueText: (steps: readonly WorkflowStepItem[], currentStep: number) => string;
42
49
  export {};
43
50
  //# sourceMappingURL=WorkflowStep.helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowStep.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/utility/WorkflowStep/WorkflowStep.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAIhF,KAAK,SAAS,GAAG,WAAW,CAAC,iBAAiB,CAAC,OAAO,CAAC,C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AC;AAEf,KAAK,yBAAyB,GAAG,iBAAiB,GAChD,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAC,CAAC;AAuB3D,eAAO,MAAM,wBAAwB,GACnC,OAAO,iBAAiB,KACvB,yBAC8E,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,SAAS,gBAAgB,EAAE,EAClC,aAAa,MAAM,KAClB,MAIF,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import "../chunk-IO36MEBD.js";
2
2
  import {
3
3
  WorkflowStep
4
- } from "../chunk-VLOUXTEM.js";
5
- import "../chunk-WDVNRW3Q.js";
6
- import "../chunk-GFQ4U6WZ.js";
7
- import "../chunk-VXQOSADY.js";
4
+ } from "../chunk-Y2C2S4R7.js";
5
+ import "../chunk-7OO3BELX.js";
6
+ import "../chunk-KJID4PRD.js";
7
+ import "../chunk-RXNIOPOA.js";
8
8
  import "../chunk-TCAQOUIB.js";
9
9
  import "../chunk-7ZPUN7TV.js";
10
10
  import "../chunk-PT6TCWIW.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/ui",
3
- "version": "6.39.4",
3
+ "version": "6.39.6",
4
4
  "license": "MIT",
5
5
  "packageManager": "pnpm@10.34.5",
6
6
  "type": "module",
@@ -81,6 +81,13 @@ const sxLength = (theme: Theme, value: Length): string | undefined =>
81
81
  const innerLength = (theme: Theme, value: Length): string | undefined =>
82
82
  isFraction(value) ? '100%' : styleLength(theme, value);
83
83
 
84
+ /**
85
+ * A width or height with its default. Only an unset or empty size takes it: `0`
86
+ * is a size, which `||` read as unset (FUT-2669), and `sx` reads `''` as `0%`.
87
+ */
88
+ const orDefault = (value: Length, fallback: number | string): number | string =>
89
+ value === undefined || value === '' ? fallback : value;
90
+
84
91
  /** The box the image occupies, as CSS, shared by the real image and every stand-in for it. */
85
92
  interface BoxMetrics {
86
93
  width?: string;
@@ -100,8 +107,8 @@ const SkeletonIndicator: React.FC<IndicatorProps> = ({ props }) => {
100
107
  return (
101
108
  <Skeleton
102
109
  variant="rectangular"
103
- width={innerLength(theme, props.width || '100%')}
104
- height={innerLength(theme, props.height || 200)}
110
+ width={innerLength(theme, orDefault(props.width, '100%'))}
111
+ height={innerLength(theme, orDefault(props.height, 'auto'))}
105
112
  animation={props.skeletonProps.animation || 'pulse'}
106
113
  intensity={props.skeletonProps.intensity}
107
114
  borderRadius={styleLength(theme, props.borderRadius)}
@@ -226,8 +233,8 @@ export const LazyImage = React.memo<LazyImageProps>(function LazyImage(rawProps)
226
233
  ref={containerRef}
227
234
  className={props.className}
228
235
  sx={{
229
- width: sxLength(theme, width || 'auto'),
230
- height: sxLength(theme, height || 'auto'),
236
+ width: sxLength(theme, orDefault(width, 'auto')),
237
+ height: sxLength(theme, orDefault(height, 'auto')),
231
238
  // The same px length the image gets (`metrics`): in `sx` a bare number
232
239
  // would be a multiple of `shape.borderRadius`, and this box clips (FUT-2656).
233
240
  borderRadius: metrics.borderRadius,
@@ -157,3 +157,18 @@ export const resolveWorkflowStepProps = (
157
157
  props: WorkflowStepProps,
158
158
  ): ResolvedWorkflowStepProps =>
159
159
  ({ ...WORKFLOW_DEFAULTS, ...definedProps(props) }) as ResolvedWorkflowStepProps;
160
+
161
+ /**
162
+ * The progressbar's `aria-valuetext`: `Step N of M: <title>` while `currentStep`
163
+ * names a step, and `Step N of M` when it does not (past the end, below zero, or
164
+ * no steps at all), so a screen reader never reads a missing title as
165
+ * "undefined". The index itself is not clamped (FUT-2671).
166
+ */
167
+ export const progressValueText = (
168
+ steps: readonly WorkflowStepItem[],
169
+ currentStep: number,
170
+ ): string => {
171
+ const position = `Step ${currentStep + 1} of ${steps.length}`;
172
+ const step = steps[currentStep];
173
+ return step === undefined ? position : `${position}: ${step.title}`;
174
+ };
@@ -57,7 +57,7 @@ const StepItem = styled(Box, {
57
57
  }));
58
58
 
59
59
  const StepIndicator = styled(Box, {
60
- shouldForwardProp: (prop) => !['size', 'variant', 'color', 'isActive', 'isCompleted', 'isError', 'interactive', 'disabled'].includes(prop as string),
60
+ shouldForwardProp: (prop) => !['size', 'variant', 'color', 'isActive', 'isCompleted', 'isError', 'interactive', 'animated', 'disabled'].includes(prop as string),
61
61
  })<{
62
62
  size: WorkflowStepProps['size'];
63
63
  variant: WorkflowStepProps['variant'];
@@ -2,7 +2,7 @@ import Box from '@mui/material/Box/index.js';
2
2
  import { styled } from '@mui/material/styles/index.js';
3
3
  import React, { forwardRef, useCallback, useMemo } from 'react';
4
4
 
5
- import { resolveWorkflowStepProps, withDerivedStatus } from './WorkflowStep.helpers';
5
+ import { progressValueText, resolveWorkflowStepProps, withDerivedStatus } from './WorkflowStep.helpers';
6
6
  import { StepRow } from './WorkflowStepRow';
7
7
  import type { WorkflowStepItem, WorkflowStepProps } from './WorkflowStep.types';
8
8
 
@@ -73,7 +73,7 @@ export const WorkflowStep = forwardRef<HTMLDivElement, WorkflowStepProps>((rawPr
73
73
  aria-valuemin={0}
74
74
  aria-valuemax={steps.length - 1}
75
75
  aria-valuenow={currentStep}
76
- aria-valuetext={`Step ${currentStep + 1} of ${steps.length}: ${steps[currentStep]?.title}`}
76
+ aria-valuetext={progressValueText(steps, currentStep)}
77
77
  data-testid={dataTestId}
78
78
  {...other}
79
79
  >
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/utility/WorkflowStep/WorkflowStep.parts.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React, { forwardRef, useCallback } from 'react';\n\nimport type { StepColors } from './WorkflowStep.helpers';\nimport { indicatorSizeFor, stepColors, stepPalette } from './WorkflowStep.helpers';\nimport type {\n StepConnectorProps,\n StepContentProps,\n StepIndicatorProps,\n WorkflowStepProps,\n} from './WorkflowStep.types';\nimport { neutralTones } from '../../../tokens/ink';\nimport { rem } from '../../../tokens/relative';\n\n// `outlined` shows the surface through a coloured rim; the other three fill it and\n// differ only in what border they keep.\nconst indicatorVariantStyles = (\n theme: Theme,\n variant: WorkflowStepProps['variant'],\n { backgroundColor, borderColor, textColor }: StepColors,\n): CSSObject => {\n if (variant === 'outlined') {\n return {\n border: `${rem(theme, 2)} solid ${borderColor}`,\n backgroundColor: theme.palette.background.paper,\n };\n }\n\n const filled = { backgroundColor, color: textColor };\n\n switch (variant) {\n case 'filled':\n return filled;\n case 'minimal':\n return { ...filled, border: 'none' };\n case 'default':\n return { ...filled, border: `1px solid ${borderColor}` };\n default:\n return {};\n }\n};\n\nconst StepItem = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'isLast'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n isLast: boolean;\n}>(({ orientation, isLast }) => ({\n display: 'flex',\n flexDirection: orientation === 'vertical' ? 'column' : 'row',\n alignItems: orientation === 'vertical' ? 'flex-start' : 'center',\n flex: orientation === 'horizontal' && !isLast ? 1 : 'none',\n position: 'relative',\n minWidth: 0, // Allow content to shrink\n}));\n\nconst StepIndicator = styled(Box, {\n shouldForwardProp: (prop) => !['size', 'variant', 'color', 'isActive', 'isCompleted', 'isError', 'interactive', 'disabled'].includes(prop as string),\n})<{\n size: WorkflowStepProps['size'];\n variant: WorkflowStepProps['variant'];\n color: WorkflowStepProps['color'];\n isActive: boolean;\n isCompleted: boolean;\n isError: boolean;\n interactive: boolean;\n animated: boolean;\n disabled: boolean;\n}>(({ theme, size, variant, color, isActive, isCompleted, isError, interactive, animated, disabled }) => {\n const indicatorSize = indicatorSizeFor(size);\n const palette = stepPalette(theme, color);\n const { backgroundColor, borderColor, textColor } = stepColors(theme, palette, {\n isActive,\n isCompleted,\n isError,\n variant,\n });\n\n return {\n width: rem(theme, indicatorSize),\n height: rem(theme, indicatorSize),\n borderRadius: '50%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: rem(theme, 12),\n fontWeight: theme.typography.fontWeightMedium,\n cursor: interactive && !disabled ? 'pointer' : 'default',\n transition: animated\n ? theme.transitions.create(['background-color', 'border-color', 'transform'], {\n duration: theme.transitions.duration.short,\n })\n : 'none',\n flexShrink: 0,\n\n ...indicatorVariantStyles(theme, variant, { backgroundColor, borderColor, textColor }),\n\n // Interactive states\n ...(interactive && !disabled && {\n '&:hover': {\n transform: 'scale(1.1)',\n boxShadow: theme.shadows[2],\n },\n '&:focus-visible': {\n outline: `${rem(theme, 2)} solid ${palette.main}`,\n outlineOffset: rem(theme, 2),\n },\n }),\n\n // Disabled state\n ...(disabled && {\n opacity: 0.5,\n cursor: 'not-allowed',\n }),\n };\n});\n\nconst StepContent = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'interactive', 'disabled'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n interactive: boolean;\n disabled: boolean;\n}>(({ theme, orientation, interactive, disabled }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: orientation === 'vertical' ? 'flex-start' : 'center',\n textAlign: orientation === 'vertical' ? 'left' : 'center',\n marginTop: orientation === 'vertical' ? theme.spacing(1) : theme.spacing(0.5),\n marginLeft: orientation === 'horizontal' ? theme.spacing(1) : 0,\n cursor: interactive && !disabled ? 'pointer' : 'default',\n minWidth: 0,\n flex: 1,\n\n '& .step-title': {\n fontSize: rem(theme, 14),\n fontWeight: theme.typography.fontWeightMedium,\n color: theme.palette.text.primary,\n marginBottom: theme.spacing(0.5),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n maxWidth: '100%',\n },\n\n '& .step-description': {\n fontSize: rem(theme, 12),\n color: theme.palette.text.secondary,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n maxWidth: '100%',\n },\n\n ...(disabled && {\n opacity: 0.5,\n }),\n}));\n\nconst StepConnector = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'isCompleted', 'color', 'variant'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n isCompleted: boolean;\n color: WorkflowStepProps['color'];\n variant: WorkflowStepProps['variant'];\n}>(({ theme, orientation, isCompleted, color, variant }) => {\n const connectorColor = isCompleted ? stepPalette(theme, color).main : neutralTones(theme).track;\n\n return {\n flex: 1,\n position: 'relative',\n \n ...(orientation === 'horizontal' && {\n height: rem(theme, 2),\n backgroundColor: connectorColor,\n margin: `0 ${theme.spacing(1)}`,\n minWidth: theme.spacing(2),\n }),\n \n ...(orientation === 'vertical' && {\n width: rem(theme, 2),\n backgroundColor: connectorColor,\n minHeight: theme.spacing(3),\n marginLeft: theme.spacing(2),\n position: 'absolute',\n left: '50%',\n transform: 'translateX(-50%)',\n top: '100%',\n }),\n\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.short,\n }),\n\n ...(variant === 'minimal' && {\n opacity: 0.6,\n }),\n };\n});\n\n/**\n * Individual step indicator component\n */\nconst StepIndicatorComponent = forwardRef<HTMLDivElement, StepIndicatorProps>(({\n step,\n index,\n isActive,\n isCompleted,\n isError,\n variant,\n color,\n size,\n showNumbers,\n showIcons,\n completedIcon,\n errorIcon,\n interactive,\n animated,\n disabled,\n onClick,\n 'data-testid': dataTestId,\n}, ref) => {\n const handleClick = useCallback(() => {\n if (interactive && !disabled && onClick) {\n onClick(index, step);\n }\n }, [interactive, disabled, onClick, index, step]);\n\n const handleKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (interactive && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n if (onClick) {\n onClick(index, step);\n }\n }\n }, [interactive, disabled, onClick, index, step]);\n\n const renderIndicatorContent = () => {\n if (isError && errorIcon) {\n return errorIcon;\n }\n if (isCompleted && completedIcon) {\n return completedIcon;\n }\n if (showIcons && step.icon) {\n return step.icon;\n }\n if (showNumbers) {\n return index + 1;\n }\n return null;\n };\n\n return (\n <StepIndicator\n ref={ref}\n size={size}\n variant={variant}\n color={color}\n isActive={isActive}\n isCompleted={isCompleted}\n isError={isError}\n interactive={interactive}\n animated={animated}\n disabled={Boolean(disabled || step.disabled)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role={interactive ? 'button' : undefined}\n tabIndex={interactive && !disabled && !step.disabled ? 0 : -1}\n aria-label={`Step ${index + 1}: ${step.title}`}\n aria-current={isActive ? 'step' : undefined}\n data-testid={dataTestId}\n >\n {renderIndicatorContent()}\n </StepIndicator>\n );\n});\n\nStepIndicatorComponent.displayName = 'StepIndicator';\n\n/**\n * Step connector component\n */\nconst StepConnectorComponent = forwardRef<HTMLDivElement, StepConnectorProps>(({\n isCompleted,\n orientation,\n variant,\n color,\n 'data-testid': dataTestId,\n}, ref) => (\n <StepConnector\n ref={ref}\n orientation={orientation}\n isCompleted={isCompleted}\n color={color}\n variant={variant}\n data-testid={dataTestId}\n />\n));\n\nStepConnectorComponent.displayName = 'StepConnector';\n\n/**\n * Step content component\n */\nconst StepContentComponent = forwardRef<HTMLDivElement, StepContentProps>(({\n step,\n index,\n orientation,\n interactive,\n disabled,\n onClick,\n 'data-testid': dataTestId,\n}, ref) => {\n const handleClick = useCallback(() => {\n if (interactive && !disabled && onClick) {\n onClick(index, step);\n }\n }, [interactive, disabled, onClick, index, step]);\n\n const handleKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (interactive && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n if (onClick) {\n onClick(index, step);\n }\n }\n }, [interactive, disabled, onClick, index, step]);\n\n return (\n <StepContent\n ref={ref}\n orientation={orientation}\n interactive={interactive}\n disabled={Boolean(disabled || step.disabled)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role={interactive ? 'button' : undefined}\n tabIndex={interactive && !disabled && !step.disabled ? 0 : -1}\n data-testid={dataTestId}\n >\n <div className=\"step-title\">{step.title}</div>\n {step.description && (\n <div className=\"step-description\">{step.description}</div>\n )}\n </StepContent>\n );\n});\n\nStepContentComponent.displayName = 'StepContent';\n\n/**\n * A plain wrapper around the styled row. Exporting the styled component itself\n * trips TS2742 — its inferred type names a pnpm-internal @mui/system path.\n */\nexport const StepItemRow: React.FC<{\n orientation: WorkflowStepProps['orientation'];\n isLast: boolean;\n children: React.ReactNode;\n}> = ({ orientation, isLast, children }) => (\n <StepItem orientation={orientation} isLast={isLast}>\n {children}\n </StepItem>\n);\n\nexport { StepConnectorComponent, StepContentComponent, StepIndicatorComponent };\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,SAAS;AAEhB,SAAS,cAAc;AACvB,SAAgB,YAAY,mBAAmB;AA8P3C,cA4EA,YA5EA;AA/OJ,IAAM,yBAAyB,CAC7B,OACA,SACA,EAAE,iBAAiB,aAAa,UAAU,MAC5B;AACd,MAAI,YAAY,YAAY;AAC1B,WAAO;AAAA,MACL,QAAQ,GAAG,IAAI,OAAO,CAAC,CAAC,UAAU,WAAW;AAAA,MAC7C,iBAAiB,MAAM,QAAQ,WAAW;AAAA,IAC5C;AAAA,EACF;AAEA,QAAM,SAAS,EAAE,iBAAiB,OAAO,UAAU;AAEnD,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO,EAAE,GAAG,QAAQ,QAAQ,OAAO;AAAA,IACrC,KAAK;AACH,aAAO,EAAE,GAAG,QAAQ,QAAQ,aAAa,WAAW,GAAG;AAAA,IACzD;AACE,aAAO,CAAC;AAAA,EACZ;AACF;AAEA,IAAM,WAAW,OAAO,KAAK;AAAA,EAC3B,mBAAmB,CAAC,SAAS,CAAC,CAAC,eAAe,QAAQ,EAAE,SAAS,IAAc;AACjF,CAAC,EAGE,CAAC,EAAE,aAAa,OAAO,OAAO;AAAA,EAC/B,SAAS;AAAA,EACT,eAAe,gBAAgB,aAAa,WAAW;AAAA,EACvD,YAAY,gBAAgB,aAAa,eAAe;AAAA,EACxD,MAAM,gBAAgB,gBAAgB,CAAC,SAAS,IAAI;AAAA,EACpD,UAAU;AAAA,EACV,UAAU;AAAA;AACZ,EAAE;AAEF,IAAM,gBAAgB,OAAO,KAA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AAe;AACjB,GAAG,QAAQ;AACT,QAAM,cAAc,YAAY,MAAM;AACpC,QAAI,eAAe,CAAC,YAAY,SAAS;AACvC,cAAQ,OAAO,IAAI;AAAA,IACrB;AAAA,EACF,GAAG,CAAC,aAAa,UAAU,SAAS,OAAO,IAAI,CAAC;AAEhD,QAAM,gBAAgB,YAAY,CAAC,UAA+B;AAChE,QAAI,eAAe,CAAC,aAAa,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;AAC5E,YAAM,eAAe;AACrB,UAAI,SAAS;AACX,gBAAQ,OAAO,IAAI;AAAA,MACrB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,aAAa,UAAU,SAAS,OAAO,IAAI,CAAC;AAEhD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,QAAQ,YAAY,KAAK,QAAQ;AAAA,MAC3C,SAAS;AAAA,MACT,WAAW;AAAA,MACX,MAAM,cAAc,WAAW;AAAA,MAC/B,UAAU,eAAe,CAAC,YAAY,CAAC,KAAK,WAAW,IAAI;AAAA,MAC3D,eAAa;AAAA,MAEb;AAAA,4BAAC,SAAI,WAAU,cAAc,eAAK,OAAM;AAAA,QACvC,KAAK,eACJ,oBAAC,SAAI,WAAU,oBAAoB,eAAK,aAAY;AAAA;AAAA;AAAA,EAExD;AAEJ,CAAC;AAED,qBAAqB,cAAc;AAM5B,IAAM,cAIR,CAAC,EAAE,aAAa,QAAQ,SAAS,MACpC,oBAAC,YAAS,aAA0B,QACjC,UACH;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/LazyImage/LazyImage.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport { styled, useTheme, type Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\nimport { Skeleton } from '../../layout/Skeleton';\nimport type { ResolvedLazyImageProps } from './LazyImage.hooks';\nimport { imgPassThrough, resolveLazyImageProps, useLazyImage } from './LazyImage.hooks';\nimport type { LazyImageProps } from './LazyImage.types';\nimport { sheen } from '../../../tokens/ink';\nimport { rem } from '../../../tokens/relative';\n\nconst ImageContainer = styled(Box)(() => ({\n position: 'relative',\n display: 'inline-block',\n overflow: 'hidden',\n}));\n\nconst StyledImage = styled('img')<{\n fadeIn?: boolean;\n fadeInDuration?: number;\n isLoaded?: boolean;\n}>(({ fadeIn, fadeInDuration = 300, isLoaded }) => ({\n display: 'block',\n maxWidth: '100%',\n height: 'auto',\n opacity: fadeIn ? (isLoaded ? 1 : 0) : 1,\n transition: fadeIn ? `opacity ${fadeInDuration}ms ease-in-out` : 'none',\n}));\n\nconst SpinnerOverlay = styled(Box)(({ theme }) => ({\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: sheen(theme, 0.8),\n borderRadius: '50%',\n padding: theme.spacing(1),\n}));\n\nconst FallbackContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.palette.action.disabledBackground,\n color: theme.palette.text.secondary,\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: 0,\n left: 0,\n}));\n\ntype Length = number | string | undefined;\n\n/** A length prop as React `style` and MUI's `Skeleton` read it: a number is design px. */\nconst styleLength = (theme: Theme, value: Length): string | undefined =>\n typeof value === 'number' ? rem(theme, value) : value;\n\n/**\n * A width or height above 0 and up to 1 is a fraction of the container's parent, as in `sx`.\n * A negative number is no fraction: it stays a (negative, so invalid) length.\n */\nconst isFraction = (value: Length): value is number =>\n typeof value === 'number' && value > 0 && value <= 1;\n\n/**\n * A length prop as `sx` reads it on a width or height: a number of 1 or less is\n * a fraction of the parent, and that stays so; any other number is design px.\n */\nconst sxLength = (theme: Theme, value: Length): string | undefined =>\n isFraction(value) ? `${value * 100}%` : styleLength(theme, value);\n\n/**\n * A width or height for what is drawn inside the container. The container alone\n * takes a fraction, so everything in it fills it: a percentage here is measured\n * against the container and would stack (FUT-2666). Otherwise the same as `styleLength`.\n */\nconst innerLength = (theme: Theme, value: Length): string | undefined =>\n isFraction(value) ? '100%' : styleLength(theme, value);\n\n/** The box the image occupies, as CSS, shared by the real image and every stand-in for it. */\ninterface BoxMetrics {\n width?: string;\n height?: string;\n objectFit: NonNullable<LazyImageProps['objectFit']>;\n objectPosition: string;\n borderRadius?: string;\n}\n\ninterface IndicatorProps {\n props: ResolvedLazyImageProps;\n metrics: BoxMetrics;\n}\n\nconst SkeletonIndicator: React.FC<IndicatorProps> = ({ props }) => {\n const theme = useTheme();\n return (\n <Skeleton\n variant=\"rectangular\"\n width={innerLength(theme, props.width || '100%')}\n height={innerLength(theme, props.height || 200)}\n animation={props.skeletonProps.animation || 'pulse'}\n intensity={props.skeletonProps.intensity}\n borderRadius={styleLength(theme, props.borderRadius)}\n data-testid={`${props['data-testid']}-skeleton`}\n />\n );\n};\n\nconst SpinnerIndicator: React.FC<IndicatorProps> = ({ props }) => {\n const theme = useTheme();\n const { spinnerProps } = props;\n\n return (\n <SpinnerOverlay>\n <CircularProgress\n size={styleLength(theme, spinnerProps.size || 40)}\n thickness={spinnerProps.thickness || 4}\n sx={{ color: spinnerProps.color || theme.palette.primary.main }}\n data-testid={`${props['data-testid']}-spinner`}\n />\n </SpinnerOverlay>\n );\n};\n\nconst PlaceholderIndicator: React.FC<IndicatorProps & { hasSrc: boolean }> = ({\n props,\n metrics,\n hasSrc,\n}) => {\n // Once a src has been chosen the real <img> is on screen, so the placeholder\n // would only stack behind it.\n if (!props.placeholder || hasSrc) return null;\n\n return (\n <StyledImage\n src={props.placeholder}\n alt={`${props.alt} (loading)`}\n style={metrics}\n data-testid={`${props['data-testid']}-placeholder`}\n />\n );\n};\n\nconst LoadingIndicator: React.FC<\n IndicatorProps & { kind: NonNullable<LazyImageProps['loadingState']>; hasSrc: boolean }\n> = ({ kind, hasSrc, ...rest }) => {\n switch (kind) {\n case 'skeleton':\n return <SkeletonIndicator {...rest} />;\n case 'spinner':\n return <SpinnerIndicator {...rest} />;\n case 'placeholder':\n return <PlaceholderIndicator {...rest} hasSrc={hasSrc} />;\n default:\n return null;\n }\n};\n\nconst ErrorFallback: React.FC<IndicatorProps> = ({ props, metrics }) => {\n const theme = useTheme();\n const { alt, fallback, width, height, borderRadius } = props;\n const testId = props['data-testid'];\n\n if (!fallback) return null;\n\n if (typeof fallback === 'string') {\n return (\n <StyledImage\n src={fallback}\n alt={`${alt} (fallback)`}\n style={metrics}\n fadeIn={false}\n isLoaded={true}\n data-testid={`${testId}-fallback`}\n />\n );\n }\n\n return (\n <FallbackContainer\n sx={{\n width: innerLength(theme, width),\n height: innerLength(theme, height),\n borderRadius: styleLength(theme, borderRadius),\n }}\n data-testid={`${testId}-fallback`}\n >\n {fallback}\n </FallbackContainer>\n );\n};\n\n/**\n * LazyImage component with enhanced features for optimized image loading\n * Supports lazy loading, placeholders, error handling, and various loading states\n */\nexport const LazyImage = React.memo<LazyImageProps>(function LazyImage(rawProps) {\n const props = resolveLazyImageProps(rawProps);\n const theme = useTheme();\n const {\n state,\n containerRef,\n effectiveLoadingState,\n handleImageLoad,\n handleImageError,\n showImage,\n showLoading,\n } = useLazyImage(props);\n\n const { width, height, borderRadius, alt } = props;\n const testId = props['data-testid'];\n const metrics: BoxMetrics = {\n width: innerLength(theme, width),\n height: innerLength(theme, height),\n objectFit: props.objectFit,\n objectPosition: props.objectPosition,\n borderRadius: styleLength(theme, borderRadius),\n };\n\n return (\n <ImageContainer\n ref={containerRef}\n className={props.className}\n sx={{\n width: sxLength(theme, width || 'auto'),\n height: sxLength(theme, height || 'auto'),\n // The same px length the image gets (`metrics`): in `sx` a bare number\n // would be a multiple of `shape.borderRadius`, and this box clips (FUT-2656).\n borderRadius: metrics.borderRadius,\n }}\n data-testid={testId}\n >\n {showLoading && (\n <LoadingIndicator\n kind={effectiveLoadingState}\n props={props}\n metrics={metrics}\n hasSrc={Boolean(state.currentSrc)}\n />\n )}\n\n {showImage && (\n <StyledImage\n src={state.currentSrc || undefined}\n alt={alt}\n onLoad={handleImageLoad}\n onError={handleImageError}\n fadeIn={props.fadeIn}\n fadeInDuration={props.fadeInDuration}\n isLoaded={!state.isLoading}\n decoding={props.decoding}\n loading={props.lazy ? 'lazy' : props.loading}\n style={{ ...metrics, ...props.sx }}\n aria-label={props['aria-label'] || alt}\n aria-describedby={props['aria-describedby']}\n role={props.role}\n data-testid={`${testId}-img`}\n {...imgPassThrough(props)}\n />\n )}\n\n {state.hasError && <ErrorFallback props={props} metrics={metrics} />}\n </ImageContainer>\n );\n});\n\nLazyImage.displayName = 'LazyImage';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,SAAS;AAChB,OAAO,sBAAsB;AAC7B,SAAS,QAAQ,gBAA4B;AAC7C,OAAO,WAAW;AAiGd,cA4HA,YA5HA;AAzFJ,IAAM,iBAAiB,OAAO,GAAG,EAAE,OAAO;AAAA,EACxC,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AACZ,EAAE;AAEF,IAAM,cAAc,OAAO,KAAK,EAI7B,CAAC,EAAE,QAAQ,iBAAiB,KAAK,SAAS,OAAO;AAAA,EAClD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS,SAAU,WAAW,IAAI,IAAK;AAAA,EACvC,YAAY,SAAS,WAAW,cAAc,mBAAmB;AACnE,EAAE;AAEF,IAAM,iBAAiB,OAAO,GAAG,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EACjD,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,iBAAiB,MAAM,OAAO,GAAG;AAAA,EACjC,cAAc;AAAA,EACd,SAAS,MAAM,QAAQ,CAAC;AAC1B,EAAE;AAEF,IAAM,oBAAoB,OAAO,GAAG,EAAE,C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AAS,MAAM;AAAA,YACrC,OAAO,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG;AAAA,YACjC,cAAY,MAAM,YAAY,KAAK;AAAA,YACnC,oBAAkB,MAAM,kBAAkB;AAAA,YAC1C,MAAM,MAAM;AAAA,YACZ,eAAa,GAAG,MAAM;AAAA,YACrB,GAAG,eAAe,KAAK;AAAA;AAAA,QAC1B;AAAA,QAGD,MAAM,YAAY,oBAAC,iBAAc,OAAc,SAAkB;AAAA;AAAA;AAAA,EACpE;AAEJ,CAAC;AAED,UAAU,cAAc;","names":["LazyImage"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/utility/WorkflowStep/WorkflowStep.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React, { forwardRef, useCallback, useMemo } from 'react';\n\nimport { resolveWorkflowStepProps, withDerivedStatus } from './WorkflowStep.helpers';\nimport { StepRow } from './WorkflowStepRow';\nimport type { WorkflowStepItem, WorkflowStepProps } from './WorkflowStep.types';\n\n// Styled Components\nconst StepContainer = styled(Box, {\n shouldForwardProp: (prop) => !['orientation', 'variant'].includes(prop as string),\n})<{\n orientation: WorkflowStepProps['orientation'];\n variant: WorkflowStepProps['variant'];\n}>(({ theme, orientation, variant }) => ({\n display: 'flex',\n flexDirection: orientation === 'vertical' ? 'column' : 'row',\n alignItems: orientation === 'vertical' ? 'flex-start' : 'center',\n gap: orientation === 'vertical' ? theme.spacing(2) : theme.spacing(1),\n width: '100%',\n position: 'relative',\n \n // Variant-specific styles\n ...(variant === 'minimal' && {\n gap: orientation === 'vertical' ? theme.spacing(1) : theme.spacing(0.5),\n }),\n}));\n\n/**\n * WorkflowStep component for displaying multi-step workflows with visual progression\n */\nexport const WorkflowStep = forwardRef<HTMLDivElement, WorkflowStepProps>((rawProps, ref) => {\n const {\n steps,\n currentStep,\n variant,\n orientation,\n color,\n size,\n showProgress,\n animated,\n interactive,\n showNumbers,\n showIcons,\n completedIcon,\n errorIcon,\n onStepClick,\n disabled,\n className,\n style,\n 'data-testid': dataTestId,\n ...other\n } = resolveWorkflowStepProps(rawProps);\n const handleStepClick = useCallback((stepIndex: number, step: WorkflowStepItem) => {\n if (onStepClick && !disabled && !step.disabled) {\n onStepClick(stepIndex, step);\n }\n }, [onStepClick, disabled]);\n\n const stepsWithStatus = useMemo(\n () => withDerivedStatus(steps, currentStep),\n [steps, currentStep],\n );\n\n return (\n <StepContainer\n ref={ref}\n orientation={orientation}\n variant={variant}\n className={className}\n style={style}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={steps.length - 1}\n aria-valuenow={currentStep}\n aria-valuetext={`Step ${currentStep + 1} of ${steps.length}: ${steps[currentStep]?.title}`}\n data-testid={dataTestId}\n {...other}\n >\n {stepsWithStatus.map((step, index) => (\n <StepRow\n key={index}\n step={step}\n index={index}\n isLast={index === steps.length - 1}\n orientation={orientation}\n variant={variant}\n color={color}\n size={size}\n showNumbers={showNumbers}\n showIcons={showIcons}\n showProgress={showProgress}\n completedIcon={completedIcon}\n errorIcon={errorIcon}\n interactive={interactive}\n animated={animated}\n disabled={disabled}\n onClick={handleStepClick}\n dataTestId={dataTestId}\n />\n ))}\n </StepContainer>\n );\n});\n\nWorkflowStep.displayName = 'WorkflowStep';\n\nexport default WorkflowStep;"],"mappings":";;;;;;;;;AAAA,OAAO,SAAS;AAChB,SAAS,cAAc;AACvB,SAAgB,YAAY,aAAa,eAAe;AA8EhD;AAvER,IAAM,gBAAgB,OAAO,KAAK;AAAA,EAChC,mBAAmB,CAAC,SAAS,CAAC,CAAC,eAAe,SAAS,EAAE,SAAS,IAAc;AAClF,CAAC,EAGE,CAAC,EAAE,OAAO,aAAa,QAAQ,OAAO;AAAA,EACvC,SAAS;AAAA,EACT,eAAe,gBAAgB,aAAa,WAAW;AAAA,EACvD,YAAY,gBAAgB,aAAa,eAAe;AAAA,EACxD,KAAK,gBAAgB,aAAa,MAAM,QAAQ,CAAC,IAAI,MAAM,Q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