@m4l/components 9.65.2-beta-m4lcom-783-rediseno-de-steps-del-componente-stepper.0 → 9.65.2-beta-update-switch-component-variable.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts +1 -1
  2. package/components/Stepper/Stepper.styles.d.ts.map +1 -1
  3. package/components/Stepper/Stepper.styles.js +113 -176
  4. package/components/Stepper/subcomponents/StepArea/index.d.ts.map +1 -1
  5. package/components/Stepper/subcomponents/StepArea/index.js +37 -39
  6. package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.d.ts.map +1 -1
  7. package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.js +48 -64
  8. package/components/extended/mui/Switch/Switch.d.ts +1 -1
  9. package/components/extended/mui/Switch/Switch.d.ts.map +1 -1
  10. package/components/extended/mui/Switch/Switch.js +144 -61
  11. package/components/extended/mui/Switch/Switch.styles.d.ts.map +1 -1
  12. package/components/extended/mui/Switch/Switch.styles.js +124 -52
  13. package/components/extended/mui/Switch/constants.d.ts +1 -1
  14. package/components/extended/mui/Switch/constants.d.ts.map +1 -1
  15. package/components/extended/mui/Switch/slots/SwitchEnum.d.ts +5 -0
  16. package/components/extended/mui/Switch/slots/SwitchEnum.d.ts.map +1 -1
  17. package/components/extended/mui/Switch/slots/SwitchEnum.js +2 -2
  18. package/components/extended/mui/Switch/slots/SwitchSlots.d.ts +15 -0
  19. package/components/extended/mui/Switch/slots/SwitchSlots.d.ts.map +1 -1
  20. package/components/extended/mui/Switch/slots/SwitchSlots.js +32 -11
  21. package/components/extended/mui/Switch/types.d.ts +33 -0
  22. package/components/extended/mui/Switch/types.d.ts.map +1 -1
  23. package/package.json +5 -5
@@ -58,7 +58,7 @@ export declare const PanelStyled: import('@emotion/styled').StyledComponent<impo
58
58
  export declare const PanelHeaderStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
59
59
  ownerState?: (Partial<import('..').DevicesPickerOwnerState> & Record<string, unknown>) | undefined;
60
60
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
61
- export declare const PanelSwitchStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../extended/mui/Switch/types').SwitchProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "color" | "content" | "translate" | "error" | "action" | "classes" | "className" | "sx" | "form" | "label" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "component" | "name" | "size" | "type" | "value" | "icon" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "checked" | keyof import('react').RefAttributes<HTMLButtonElement> | "readOnly" | "required" | "inputProps" | "inputRef" | "checkedIcon" | "labelPlacement"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
61
+ export declare const PanelSwitchStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../extended/mui/Switch/types').SwitchProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "color" | "content" | "translate" | "error" | "action" | "classes" | "className" | "sx" | "form" | "label" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "component" | "name" | "size" | "type" | "variant" | "value" | "icon" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "checked" | keyof import('react').RefAttributes<HTMLButtonElement> | "readOnly" | "showIcon" | "required" | "inputProps" | "inputRef" | "checkedIcon" | "labelPlacement" | "showStartText" | "startText" | "showDescription" | "descriptionText" | "showEndText" | "endText"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
62
62
  ownerState?: (Partial<import('..').DevicesPickerOwnerState> & Record<string, unknown>) | undefined;
63
63
  }, {}, {}>;
64
64
  export declare const PanelListStyled: import('@emotion/styled').StyledComponent<Pick<import('../..').CheckableListProps, keyof import('../..').CheckableListProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Stepper/Stepper.styles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,eAAO,MAAM,aAAa,EAAE,aA+hB3B,CAAC"}
1
+ {"version":3,"file":"Stepper.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Stepper/Stepper.styles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,eAAO,MAAM,aAAa,EAAE,aAmb3B,CAAC"}
@@ -1,62 +1,52 @@
1
- import { getSizeStyles as f } from "../../utils/getSizeStyles/getSizeStyles.js";
2
- const S = {
1
+ import { getSizeStyles as o } from "../../utils/getSizeStyles/getSizeStyles.js";
2
+ const c = {
3
3
  /**
4
4
  *
5
5
  * Estilos para el contenedor principal del Stepper.
6
6
  */
7
- stepperRoot: ({ theme: e }) => ({
7
+ stepperRoot: ({ theme: i }) => ({
8
8
  display: "flex",
9
9
  flexDirection: "column",
10
10
  justifyContent: "flex-start",
11
- background: e.vars.palette.background.default,
11
+ background: i.vars.palette.background.default,
12
12
  width: "100%",
13
13
  height: "100%",
14
- borderRadius: e.vars.size.borderRadius.r1
14
+ borderRadius: i.vars.size.borderRadius.r1
15
15
  }),
16
16
  /**
17
17
  * Estilos para la sección que contiene los pasos del Stepper.
18
18
  */
19
- contentSection: ({ theme: e, ownerState: i }) => ({
19
+ contentSection: ({ theme: i, ownerState: e }) => ({
20
20
  display: "flex",
21
21
  flex: 1,
22
22
  height: "100%",
23
23
  overflow: "hidden",
24
- ...i?.orientation === "vertical" || e.generalSettings.isMobile ? {
25
- gap: e.vars.size.baseSpacings.sp6,
24
+ gap: i.vars.size.baseSpacings.sp6,
25
+ ...e?.orientation === "vertical" || i.generalSettings.isMobile ? {
26
26
  flexDirection: "column"
27
27
  } : {
28
- gap: e.vars.size.baseSpacings.sp5,
29
28
  flexDirection: "row"
30
29
  }
31
30
  }),
32
31
  /**
33
32
  * Estilos para el contenido del paso dentro del Stepper.
34
33
  */
35
- stepContent: ({ ownerState: e }) => ({
34
+ stepContent: ({ ownerState: i }) => ({
36
35
  height: "100%",
37
- display: e?.isStepVisible ? "flex" : "none",
36
+ display: i?.isStepVisible ? "flex" : "none",
38
37
  flexDirection: "column"
39
38
  }),
40
39
  /**
41
40
  * Estilos para la sección que contiene los botones de acción del Stepper.
42
41
  */
43
- stepArea: ({ theme: e, ownerState: i }) => ({
44
- ...i?.orientation === "vertical" || e.generalSettings.isMobile ? {
42
+ stepArea: ({ theme: i, ownerState: e }) => ({
43
+ ...e?.orientation === "vertical" || i.generalSettings.isMobile ? {
45
44
  display: "flex",
46
45
  alignItems: "start",
47
46
  width: "100%",
48
47
  overflowX: "auto",
49
48
  overflowY: "hidden"
50
49
  } : {
51
- display: "flex",
52
- flexDirection: "column",
53
- gap: e.vars.size.baseSpacings["sp0-5"],
54
- padding: e.vars.size.baseSpacings.sp3,
55
- boxSizing: "border-box",
56
- borderRadius: e.vars.size.borderRadius.r2,
57
- background: e.vars.palette.background.base,
58
- alignSelf: "flex-start",
59
- maxHeight: "100%",
60
50
  maxWidth: "116px",
61
51
  overflowY: "auto"
62
52
  }
@@ -64,79 +54,48 @@ const S = {
64
54
  /**
65
55
  * Estilos para el área de contenido del Stepper.
66
56
  */
67
- contentArea: ({ theme: e, ownerState: i }) => ({
57
+ contentArea: ({ theme: i, ownerState: e }) => ({
68
58
  flex: 1,
69
59
  display: "flex",
70
60
  flexDirection: "column",
71
61
  overflowY: "auto",
72
- ...i?.orientation === "vertical" || e.generalSettings.isMobile ? {
62
+ ...e?.orientation === "vertical" || i.generalSettings.isMobile ? {
73
63
  // borderTop: '1px solid',
74
- gap: e.vars.size.baseSpacings.sp4
64
+ gap: i.vars.size.baseSpacings.sp4
75
65
  // paddingTop: theme.vars.size.baseSpacings.sp8,
76
66
  } : {
77
- gap: e.vars.size.baseSpacings.sp6
78
- }
67
+ gap: i.vars.size.baseSpacings.sp6,
68
+ borderLeft: "1px solid",
69
+ paddingLeft: i.vars.size.baseSpacings.sp8
70
+ },
71
+ borderColor: i.vars.palette?.border.disabled
79
72
  }),
80
73
  /**
81
74
  * Estilos para cada paso del Stepper.
82
75
  */
83
- step: ({ theme: e, ownerState: i }) => {
84
- const s = i?.currentStep ?? 0, t = i?.step ?? 0, a = i?.totalSteps ?? 0, r = s > t, o = t === a - 1, d = typeof i?.originalStepIndex == "number" ? i.originalStepIndex : t, n = i?.orientation === "vertical" && !e.generalSettings.isMobile, l = `calc(${e.vars.size.desktop[i?.size || "medium"].base} / 2)`, p = `calc(${e.vars.size.baseSpacings["sp0-5"]} + ${l})`;
76
+ step: ({ theme: i, ownerState: e }) => {
77
+ const t = e?.currentStep ?? 0, r = e?.step ?? 0, s = e?.totalSteps ?? 0, a = t > r, n = r === s - 1;
85
78
  return {
86
79
  cursor: "pointer",
87
- display: i?.isStepVisible ? "flex" : "none",
88
- flexDirection: i?.orientation === "vertical" || e.generalSettings.isMobile ? "column" : "row",
89
- alignItems: "center",
90
- justifyContent: i?.visibleTitle ? i?.orientation === "vertical" || e.generalSettings.isMobile ? "space-between" : "flex-start" : "center",
91
- gap: n ? 0 : i?.orientation === "vertical" || e.generalSettings.isMobile ? e.vars.size.baseSpacings.sp1 : e.vars.size.baseSpacings.sp2,
80
+ display: e?.isStepVisible ? "flex" : "none",
81
+ flexDirection: e?.orientation === "vertical" || i.generalSettings.isMobile ? "column" : "row",
82
+ alignItems: e?.orientation === "vertical" || i.generalSettings.isMobile ? "center" : "start",
83
+ justifyContent: e?.visibleTitle ? "space-between" : "center",
84
+ gap: e?.orientation === "vertical" || i.generalSettings.isMobile ? i.vars.size.baseSpacings.sp1 : i.vars.size.baseSpacings.sp4,
92
85
  width: "100%",
93
- ...(i?.orientation === "vertical" || e.generalSettings.isMobile) && {
94
- minWidth: e.vars.size.baseSpacings.sp10
95
- },
96
- height: "auto",
97
- ...n && {
98
- paddingBlock: e.vars.size.baseSpacings["sp0-5"]
99
- },
100
- ...!(i?.orientation === "vertical" || e.generalSettings.isMobile) && {
101
- paddingBottom: `calc(${e.vars.size.baseSpacings["sp0-5"]} + ${e.vars.size.baseSpacings.sp3})`
86
+ ...(e?.orientation === "vertical" || i.generalSettings.isMobile) && {
87
+ minWidth: i.vars.size.baseSpacings.sp10
102
88
  },
89
+ height: e?.orientation === "vertical" || i.generalSettings.isMobile ? "auto" : i.vars.size.baseSpacings.sp13,
103
90
  position: "relative",
104
- ...n && {
105
- ...t > 0 && {
106
- "&::before": {
107
- content: '""',
108
- position: "absolute",
109
- top: p,
110
- left: 0,
111
- right: `calc(50% + ${l})`,
112
- // Width from the stroke token; only the style and the color change.
113
- borderTop: e.vars.size.borderStroke.container,
114
- borderTopStyle: s >= d ? "solid" : "dashed",
115
- borderTopColor: s >= d ? e.vars.palette.primary.enabled : e.vars.palette.border.secondary
116
- }
117
- },
118
- ...!o && {
119
- "&::after": {
120
- content: '""',
121
- position: "absolute",
122
- top: p,
123
- right: 0,
124
- left: `calc(50% + ${l})`,
125
- // Right half: solid once the current step is past this one.
126
- borderTop: e.vars.size.borderStroke.container,
127
- borderTopStyle: s > d ? "solid" : "dashed",
128
- borderTopColor: s > d ? e.vars.palette.primary.enabled : e.vars.palette.border.secondary
129
- }
130
- }
131
- },
132
- ...!o && e.generalSettings.isMobile && {
91
+ ...!n && (e?.orientation === "vertical" || i.generalSettings.isMobile) && {
133
92
  "&::after": {
134
93
  content: '""',
135
94
  position: "absolute",
136
- top: i?.orientation === "horizontal" && e.generalSettings.isMobile ? "16px" : "10px",
95
+ top: e?.orientation === "horizontal" && i.generalSettings.isMobile ? "16px" : "10px",
137
96
  // Ajustado para coincidir con el centro del indicador cuando alignItems es start
138
97
  height: "1px",
139
- borderTop: `1px ${r ? "solid" : "dashed"} ${r ? e.vars.palette.primary.enabled : e.vars.palette.border.default}`,
98
+ borderTop: `1px ${a ? "solid" : "dashed"} ${a ? i.vars.palette.primary.enabled : i.vars.palette.border.default}`,
140
99
  left: "50%",
141
100
  width: "100%"
142
101
  }
@@ -146,44 +105,36 @@ const S = {
146
105
  /**
147
106
  * Estilos para el nombre del paso dentro del Stepper.
148
107
  */
149
- stepName: ({ theme: e, ownerState: i }) => {
150
- const s = i?.orientation === "vertical" && !e.generalSettings.isMobile, t = i?.currentStep ?? 0, a = i?.originalStepIndex, r = typeof a == "number" && t > a, o = typeof a == "number" && t === a;
151
- return {
152
- ...i?.orientation !== "vertical" && !e.generalSettings.isMobile && {
153
- maxWidth: "120px",
154
- width: "100%"
155
- },
156
- ...s && {
157
- maxWidth: `calc(${e.vars.size.baseSpacings.sp10} * 3)`,
158
- // 120px = 3 × sp10
159
- width: "100%",
160
- minHeight: e.vars.size.baseSpacings.sp5
161
- },
162
- ...e.generalSettings.isMobile && {
163
- maxWidth: "120px",
164
- width: "100%",
165
- marginTop: e.vars.size.baseSpacings.sp1
166
- },
167
- alignContent: "center",
168
- cursor: "pointer",
169
- ...e.generalSettings.isMobile ? {
170
- display: "none"
171
- } : {
172
- display: i?.visibleTitle ? "block" : "none"
173
- },
174
- flex: 1,
175
- minWidth: 0,
176
- order: 1,
177
- "&.M4LTypography-root": {
178
- color: r || o ? e.vars.palette.text.primary : e.vars.palette.text.secondary,
179
- textAlign: i?.orientation === "vertical" || e.generalSettings.isMobile ? "center" : "left"
180
- }
181
- };
182
- },
108
+ stepName: ({ theme: i, ownerState: e }) => ({
109
+ ...e?.orientation === "horizontal" && !i.generalSettings.isMobile && {
110
+ minHeight: i.vars.size.desktop.medium.action,
111
+ maxWidth: "120px",
112
+ width: "100%"
113
+ },
114
+ ...(e?.orientation === "vertical" || i.generalSettings.isMobile) && {
115
+ maxWidth: "120px",
116
+ width: "100%",
117
+ marginTop: i.vars.size.baseSpacings.sp1
118
+ },
119
+ alignContent: "center",
120
+ cursor: "pointer",
121
+ ...i.generalSettings.isMobile ? {
122
+ display: "none"
123
+ } : {
124
+ display: e?.visibleTitle ? "block" : "none"
125
+ },
126
+ flex: 1,
127
+ minWidth: 0,
128
+ order: e?.orientation === "vertical" || i.generalSettings.isMobile ? 1 : 0,
129
+ "&.M4LTypography-root": {
130
+ color: e?.originalStepIndex !== void 0 && typeof e.originalStepIndex == "number" ? (e.currentStep ?? 0) > e.originalStepIndex ? i.vars.palette.primary.semanticText : (e.currentStep ?? 0) === e.originalStepIndex ? i.vars.palette.text.primary : i.vars.palette.text.secondary : i.vars.palette.text.secondary,
131
+ textAlign: e?.orientation === "vertical" || i.generalSettings.isMobile ? "center" : "right"
132
+ }
133
+ }),
183
134
  /**
184
135
  * Styles for the step name text with line clamp truncation.
185
136
  */
186
- stepNameText: ({ theme: e, ownerState: i }) => ({
137
+ stepNameText: ({ theme: i, ownerState: e }) => ({
187
138
  display: "-webkit-box",
188
139
  WebkitBoxOrient: "vertical",
189
140
  WebkitLineClamp: 2,
@@ -194,118 +145,104 @@ const S = {
194
145
  width: "100%",
195
146
  direction: "ltr",
196
147
  lineHeight: 1.2,
197
- textAlign: i?.orientation === "vertical" || e.generalSettings.isMobile ? "center" : "left"
148
+ textAlign: e?.orientation === "vertical" || i.generalSettings.isMobile ? "center" : "left"
198
149
  }),
199
150
  /**
200
151
  * Estilos para el indicador numérico de cada paso del Stepper.
201
152
  */
202
- indicator: ({ theme: e, ownerState: i }) => {
203
- const s = i?.step ?? 0, t = i?.totalSteps ?? 0, a = i?.isCompleted ?? !1, r = i?.isCurrent ?? !1, o = i?.isValidStep ?? !0, d = s === t - 1, n = !o && i?.hasBeenValidated, l = a && o, p = i?.indicatorType === "number" && !e.generalSettings.isMobile, g = p && l, b = p && !n && !l, v = b || g, u = i?.indicatorType === "dot" && i?.orientation !== "vertical" && !e.generalSettings.isMobile;
204
- let c = e.vars.palette.default.enabled;
205
- return n ? c = e.vars.palette.error.enabled : l ? c = g ? e.vars.palette.primary.enabledOpacity : e.vars.palette.background.default : b ? c = r ? e.vars.palette.primary.enabledOpacity : e.vars.palette.default.enabledOpacity : r ? c = i?.indicatorType === "dot" || e.generalSettings.isMobile ? e.vars.palette.background.default : e.vars.palette.primary.enabled : (i?.indicatorType === "dot" || e.generalSettings.isMobile) && (c = e.vars.palette.background.default), {
206
- ...i?.orientation === "horizontal" ? {
207
- marginTop: e.generalSettings.isMobile ? "6px" : e.vars.size.baseSpacings.sp1
153
+ indicator: ({ theme: i, ownerState: e }) => {
154
+ const t = e?.step ?? 0, r = e?.totalSteps ?? 0, s = e?.isCompleted ?? !1, a = e?.isCurrent ?? !1, n = e?.isValidStep ?? !0, p = t === r - 1;
155
+ return {
156
+ ...e?.orientation === "horizontal" ? {
157
+ marginTop: i.generalSettings.isMobile ? "6px" : i.vars.size.baseSpacings.sp1
208
158
  } : {},
209
159
  display: "flex",
210
160
  alignItems: "center",
211
161
  justifyContent: "center",
212
162
  flexShrink: 0,
213
163
  zIndex: 1,
214
- order: 0,
215
- background: u ? "transparent" : c,
216
- borderRadius: v ? e.vars.size.borderRadius["r1-5"] : e.vars.size.borderRadius.r2,
217
- ...v && {
218
- boxSizing: "border-box",
219
- border: e.vars.size.borderStroke.container,
220
- // Figma's default opacity (0.08) equals the theme's default.hoverOpacity;
221
- // default.opacity is 0.12.
222
- borderColor: g || r ? e.vars.palette.primary.selectedOpacity : e.vars.palette.default.hoverOpacity
223
- },
224
- ...p && {
225
- // Figma's 0.16 opacity maps to selectedOpacity because hoverOpacity is 0.12.
226
- boxShadow: b && r ? `0 2px 8px 0 ${e.vars.palette.primary.selectedOpacity}` : "none"
164
+ order: e?.orientation === "vertical" || i.generalSettings.isMobile ? 0 : 1,
165
+ background: !n && e?.hasBeenValidated ? i.vars.palette.error.enabled : s && n ? e?.indicatorType === "dot" || i.generalSettings.isMobile ? i.vars.palette.background.default : i.vars.palette.primary.toneOpacity : a ? e?.indicatorType === "dot" || i.generalSettings.isMobile ? i.vars.palette.background.default : i.vars.palette.primary.enabled : e?.indicatorType === "dot" || i.generalSettings.isMobile ? i.vars.palette.background.default : i.vars.palette.default.enabled,
166
+ borderRadius: i.vars.size.borderRadius.r2,
167
+ ...e?.indicatorType === "number" && !i.generalSettings.isMobile && {
168
+ boxShadow: a ? "0 2px 8px 0 rgb(0, 100, 255, 0.16)" : "none"
227
169
  },
228
170
  position: "relative",
229
- ...!d && i?.orientation !== "vertical" && !e.generalSettings.isMobile && {
171
+ ...!p && e?.orientation === "horizontal" && !i.generalSettings.isMobile && {
230
172
  "&::after": {
231
173
  content: '""',
232
174
  position: "absolute",
233
- top: v ? `calc(100% + ${e.vars.size.baseSpacings["sp0-5"]} + 1px)` : `calc(100% + ${e.vars.size.baseSpacings["sp0-5"]})`,
175
+ top: "100%",
234
176
  left: "50%",
235
177
  transform: "translateX(-50%)",
236
178
  width: "1px",
237
- height: e.vars.size.baseSpacings.sp3,
238
- borderLeft: `1px ${a ? "solid" : "dashed"} ${a ? e.vars.palette.primary.activeOpacity : e.vars.palette.default.activeOpacity}`
179
+ height: i.vars.size.baseSpacings.sp12,
180
+ borderLeft: `1px ${s ? "solid" : "dashed"} ${s ? i.vars.palette.primary.enabled : i.vars.palette.border.default}`
239
181
  }
240
182
  },
241
- ...f(
242
- e,
243
- i?.size || "medium",
244
- p && !n ? "base" : "case",
245
- (x) => ({
246
- width: x,
247
- height: x
248
- })
249
- )
183
+ ...o(i, e?.size || "medium", "case", (l) => ({
184
+ width: l,
185
+ height: l
186
+ }))
250
187
  };
251
188
  },
252
189
  /**
253
190
  * Estilos para el número de texto dentro del indicador numérico del Stepper.
254
191
  */
255
- textNumber: ({ theme: e, ownerState: i }) => {
256
- const s = i?.isCompleted ?? !1, t = i?.isCurrent ?? !1, a = i?.isValidStep ?? !0, r = i?.hasBeenValidated ?? !1, o = i?.indicatorType === "number" && !e.generalSettings.isMobile && !(r && !a) && !(s && a);
192
+ textNumber: ({ theme: i, ownerState: e }) => {
193
+ const t = e?.isCompleted ?? !1, r = e?.isCurrent ?? !1, s = e?.isValidStep ?? !0, a = e?.hasBeenValidated ?? !1;
257
194
  return {
258
195
  "&.M4LTypography-root": {
259
- color: !a && r ? e.vars.palette.error.contrastText : o ? t ? e.vars.palette.primary.semanticText : e.vars.palette.text.secondary : s || t ? e.vars.palette.primary.contrastText : e.vars.palette.text.primary
196
+ color: !s && a ? i.vars.palette.error.contrastText : t || r ? i.vars.palette.primary.contrastText : i.vars.palette.text.primary
260
197
  }
261
198
  };
262
199
  },
263
200
  /**
264
201
  * Estilos para el área de contenido del Stepper.
265
202
  */
266
- contentAreaHeader: ({ theme: e }) => ({
203
+ contentAreaHeader: ({ theme: i }) => ({
267
204
  display: "flex",
268
205
  alignItems: "center",
269
- gap: e.size.baseSpacings.sp3,
206
+ gap: i.size.baseSpacings.sp3,
270
207
  position: "sticky",
271
208
  top: 0,
272
- backgroundColor: e.vars.palette.background.default,
209
+ backgroundColor: i.vars.palette.background.default,
273
210
  zIndex: 10
274
211
  // paddingBottom: theme.vars.size.baseSpacings.sp2,
275
212
  }),
276
213
  /**
277
214
  * Estilos para el cuerpo del área de contenido del Stepper
278
215
  */
279
- contentAreaBody: ({ theme: e }) => ({
216
+ contentAreaBody: ({ theme: i }) => ({
280
217
  flex: 1,
281
218
  overflowY: "auto",
282
219
  display: "flex",
283
220
  flexDirection: "column",
284
- gap: e.vars.size.baseSpacings.sp6
221
+ gap: i.vars.size.baseSpacings.sp6
285
222
  }),
286
223
  /**
287
224
  * Estilos para el contenedor del icono del titulo del Stepper.
288
225
  */
289
- wrapperIcon: ({ theme: e, ownerState: i }) => ({
226
+ wrapperIcon: ({ theme: i, ownerState: e }) => ({
290
227
  display: "flex",
291
228
  alignItems: "center",
292
229
  justifyContent: "center",
293
230
  flexShrink: 0,
294
- background: e.vars.palette.primary.enabledOpacity,
295
- borderRadius: e.vars.size.borderRadius["r1-5"],
296
- ...f(e, i?.size || "medium", "box", (s) => ({
297
- width: s,
298
- height: s
231
+ background: i.vars.palette.primary.enabledOpacity,
232
+ borderRadius: i.vars.size.borderRadius["r1-5"],
233
+ ...o(i, e?.size || "medium", "box", (t) => ({
234
+ width: t,
235
+ height: t
299
236
  }))
300
237
  }),
301
238
  /**
302
239
  * Estilos para el título del Stepper.
303
240
  */
304
- wrapperTitle: ({ theme: e }) => ({
305
- color: e.vars.palette.text.primary,
241
+ wrapperTitle: ({ theme: i }) => ({
242
+ color: i.vars.palette.text.primary,
306
243
  display: "flex",
307
244
  flexDirection: "column",
308
- gap: e.vars.size.baseSpacings["sp0-5"],
245
+ gap: i.vars.size.baseSpacings["sp0-5"],
309
246
  flex: 1,
310
247
  minWidth: 0,
311
248
  overflow: "hidden"
@@ -313,10 +250,10 @@ const S = {
313
250
  /**
314
251
  * Estilos para el icono del Stepper.
315
252
  */
316
- icon: ({ theme: e, ownerState: i }) => ({
317
- ...f(e, i?.size || "medium", "case", (s) => ({
318
- width: s,
319
- height: s
253
+ icon: ({ theme: i, ownerState: e }) => ({
254
+ ...o(i, e?.size || "medium", "case", (t) => ({
255
+ width: t,
256
+ height: t
320
257
  }))
321
258
  }),
322
259
  /**
@@ -345,13 +282,13 @@ const S = {
345
282
  /**
346
283
  * Estilos para la descripción del Stepper.
347
284
  */
348
- description: ({ theme: e }) => ({
285
+ description: ({ theme: i }) => ({
349
286
  minWidth: 0,
350
287
  overflow: "hidden",
351
288
  width: "100%",
352
289
  maxWidth: "100%",
353
290
  "&.M4LTypography-root": {
354
- color: e.vars.palette.text.secondary,
291
+ color: i.vars.palette.text.secondary,
355
292
  overflow: "hidden",
356
293
  minWidth: 0,
357
294
  textOverflow: "ellipsis",
@@ -361,43 +298,43 @@ const S = {
361
298
  /**
362
299
  * Estilos para la sección de botones de acción del Stepper.
363
300
  */
364
- stepperFooterSection: ({ theme: e }) => ({
301
+ stepperFooterSection: ({ theme: i }) => ({
365
302
  display: "flex",
366
303
  alignItems: "center",
367
304
  justifyContent: "space-between",
368
305
  flexWrap: "wrap",
369
- gap: e.vars.size.baseSpacings.sp2,
370
- paddingTop: e.vars.size.baseSpacings.sp4,
306
+ gap: i.vars.size.baseSpacings.sp2,
307
+ paddingTop: i.vars.size.baseSpacings.sp4,
371
308
  position: "sticky",
372
309
  bottom: 0,
373
- backgroundColor: e.vars.palette.background.default,
310
+ backgroundColor: i.vars.palette.background.default,
374
311
  marginTop: "auto",
375
312
  zIndex: 10
376
313
  }),
377
314
  /**
378
315
  * Estilos para las acciones del lado izquierdo del StepperFooter.
379
316
  */
380
- stepperFooterLeftActions: ({ theme: e }) => ({
317
+ stepperFooterLeftActions: ({ theme: i }) => ({
381
318
  display: "flex",
382
319
  alignItems: "center",
383
- gap: e.vars.size.baseSpacings.sp3
320
+ gap: i.vars.size.baseSpacings.sp3
384
321
  }),
385
322
  /**
386
323
  * Estilos para las acciones del lado derecho del StepperFooter.
387
324
  */
388
- stepperFooterRightActions: ({ theme: e }) => ({
325
+ stepperFooterRightActions: ({ theme: i }) => ({
389
326
  display: "flex",
390
327
  alignItems: "center",
391
- gap: e.vars.size.baseSpacings.sp3
328
+ gap: i.vars.size.baseSpacings.sp3
392
329
  }),
393
330
  /**
394
331
  * Estilos para el contenedor de los botones del Stepper.
395
332
  */
396
- wrapperButtons: ({ theme: e }) => ({
333
+ wrapperButtons: ({ theme: i }) => ({
397
334
  display: "flex",
398
- gap: e.size.baseSpacings.sp3
335
+ gap: i.size.baseSpacings.sp3
399
336
  })
400
337
  };
401
338
  export {
402
- S as stepperStyles
339
+ c as stepperStyles
403
340
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/index.tsx"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,wBAAgB,QAAQ,qDA2EvB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/index.tsx"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,QAAQ,qDA8DvB"}