@m4l/components 9.5.7-beta-bug-5-fix-formattoinitalsorts-sort-operator-inversion.0 → 9.5.7

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 (36) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/DynamicSort/helpers/formatToInitialSorts.js +3 -3
  3. package/components/extended/mui/Switch/Switch.d.ts +13 -0
  4. package/components/extended/mui/Switch/Switch.d.ts.map +1 -0
  5. package/components/extended/mui/Switch/Switch.js +82 -0
  6. package/components/extended/mui/Switch/Switch.styles.d.ts +3 -0
  7. package/components/extended/mui/Switch/Switch.styles.d.ts.map +1 -0
  8. package/components/extended/mui/Switch/Switch.styles.js +139 -0
  9. package/components/extended/mui/Switch/constants.d.ts +3 -0
  10. package/components/extended/mui/Switch/constants.d.ts.map +1 -0
  11. package/components/extended/mui/Switch/constants.js +7 -0
  12. package/components/extended/mui/Switch/index.d.ts +2 -0
  13. package/components/extended/mui/Switch/index.d.ts.map +1 -0
  14. package/components/extended/mui/Switch/slots/SwitchEnum.d.ts +7 -0
  15. package/components/extended/mui/Switch/slots/SwitchEnum.d.ts.map +1 -0
  16. package/components/extended/mui/Switch/slots/SwitchEnum.js +4 -0
  17. package/components/extended/mui/Switch/slots/SwitchSlots.d.ts +13 -0
  18. package/components/extended/mui/Switch/slots/SwitchSlots.d.ts.map +1 -0
  19. package/components/extended/mui/Switch/slots/SwitchSlots.js +25 -0
  20. package/components/extended/mui/Switch/slots/index.d.ts +3 -0
  21. package/components/extended/mui/Switch/slots/index.d.ts.map +1 -0
  22. package/components/extended/mui/Switch/types.d.ts +36 -0
  23. package/components/extended/mui/Switch/types.d.ts.map +1 -0
  24. package/components/extended/mui/index.d.ts +1 -0
  25. package/components/extended/mui/index.d.ts.map +1 -1
  26. package/components/hook-form/RHFSwitch/RHFSwitch.d.ts +2 -0
  27. package/components/hook-form/RHFSwitch/RHFSwitch.d.ts.map +1 -0
  28. package/components/hook-form/RHFSwitch/RHFSwitch.js +14 -0
  29. package/components/hook-form/RHFSwitch/index.d.ts +2 -0
  30. package/components/hook-form/RHFSwitch/index.d.ts.map +1 -0
  31. package/components/hook-form/index.d.ts +1 -0
  32. package/components/hook-form/index.d.ts.map +1 -1
  33. package/index.js +410 -406
  34. package/package.json +7 -7
  35. package/components/hook-form/RHFSwitch.d.ts +0 -11
  36. package/components/hook-form/RHFSwitch.d.ts.map +0 -1
package/@types/types.d.ts CHANGED
@@ -337,6 +337,7 @@ import {
337
337
  DaysOfMonthPickerSlotsType,
338
338
  } from '../components/DaysOfMonthPicker/types';
339
339
  import { DateRangePickerSlotsType, DateRangePickerOwnerState } from '../components/extended/rsuite/DateRangePicker/types';
340
+ import { SwitchOwnerState, SwitchSlotsType } from '../components/extended/mui/Switch/types';
340
341
  import {
341
342
  DynamicFormOwnerState,
342
343
  DynamicFormSlotsType,
@@ -464,6 +465,7 @@ declare module '@mui/material/styles' {
464
465
  M4LDaysOfWeekPicker: DaysOfWeekPickerSlotsType;
465
466
  M4LDaysOfMonthPicker: DaysOfMonthPickerSlotsType;
466
467
  M4LDateRangePicker: DateRangePickerSlotsType;
468
+ M4LSwitch: SwitchSlotsType;
467
469
  M4LFixedSizeList: FixedSizeListSlotsType;
468
470
  M4LVariableSizeList: VariableSizeListSlotsType;
469
471
  M4LReactJsonViewer: ReactJsonViewerSlotsType;
@@ -571,6 +573,7 @@ declare module '@mui/material/styles' {
571
573
  M4LDaysOfWeekPicker: Partial<DaysOfWeekPickerOwnerState>;
572
574
  M4LDaysOfMonthPicker: Partial<DaysOfMonthPickerOwnerState>;
573
575
  M4LDateRangePicker: Partial<DateRangePickerOwnerState>;
576
+ M4LSwitch: Partial<SwitchOwnerState>;
574
577
  M4LFixedSizeList: Partial<FixedSizeListOwnerState>;
575
578
  M4LVariableSizeList: Partial<VariableSizeListOwnerState>;
576
579
  M4LReactJsonViewer: Partial<ReactJsonViewerOwnerState>;
@@ -1077,6 +1080,11 @@ declare module '@mui/material/styles' {
1077
1080
  styleOverrides?: ComponentsOverrides<Theme>['M4LDateRangePicker'];
1078
1081
  variants?: ComponentsVariants['M4LDateRangePicker'];
1079
1082
  };
1083
+ M4LSwitch?: {
1084
+ defaultProps?: ComponentsPropsList['M4LSwitch'];
1085
+ styleOverrides?: ComponentsOverrides<Theme>['M4LSwitch'];
1086
+ variants?: ComponentsVariants['M4LSwitch'];
1087
+ };
1080
1088
  M4LFixedSizeList?: {
1081
1089
  defaultProps?: ComponentsPropsList['M4LFixedSizeList'];
1082
1090
  styleOverrides?: ComponentsOverrides<Theme>['M4LFixedSizeList'];
@@ -1,7 +1,7 @@
1
- const a = (o) => o.map((t) => ({
1
+ const e = (o) => o.map((t) => ({
2
2
  name: t.field.name,
3
- operator: t.operator || "asc"
3
+ operator: t.operator ? "asc" : "desc"
4
4
  }));
5
5
  export {
6
- a as formatToInitialSorts
6
+ e as formatToInitialSorts
7
7
  };
@@ -0,0 +1,13 @@
1
+ import { SwitchProps } from './types';
2
+ /**
3
+ * Extended Switch component built on top of MUI Switch.
4
+ * Supports an optional inline label with configurable placement, error state, skeleton mode,
5
+ * and ownerState-driven styling.
6
+ * @example
7
+ * ```tsx
8
+ * <Switch size="medium" label="Enable notifications" checked={true} />
9
+ * <Switch size="medium" label="Left label" labelPlacement="start" checked={true} />
10
+ * ```
11
+ */
12
+ export declare const Switch: import('react').ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
13
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Switch/Switch.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoB,WAAW,EAAE,MAAM,SAAS,CAAC;AAOxD;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,wHAsFlB,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { jsx as e, jsxs as c, Fragment as m } from "@emotion/react/jsx-runtime";
2
+ import { forwardRef as g, useId as z } from "react";
3
+ import { useModuleSkeleton as R } from "@m4l/core";
4
+ import { getComponentSlotRoot as x } from "../../../../utils/getComponentSlotRoot.js";
5
+ import { SWITCH_CLASSES as E, SWITCH_KEY_COMPONENT as L } from "./constants.js";
6
+ import M from "clsx";
7
+ import { getOptionLabelColor as O } from "../../../../utils/getOptionLabelColor.js";
8
+ import { useComponentSize as P } from "../../../../hooks/useComponentSize/useComponentSize.js";
9
+ import { SwitchRootStyled as T, MUISwitchStyled as _, SkeletonStyled as S, LabelStyled as j } from "./slots/SwitchSlots.js";
10
+ const B = g(
11
+ (p, u) => {
12
+ const {
13
+ className: b,
14
+ size: h = "medium",
15
+ disabled: t,
16
+ color: f = "default",
17
+ error: n,
18
+ checked: r = !1,
19
+ label: o,
20
+ labelPlacement: i = "end",
21
+ onChange: w,
22
+ value: k,
23
+ id: C,
24
+ ...v
25
+ } = p, { currentSize: s } = P(h), y = R(), I = x(L), N = z(), l = C || N, a = {
26
+ disabled: t,
27
+ color: f,
28
+ error: n,
29
+ size: s,
30
+ checked: r
31
+ }, d = o ? /* @__PURE__ */ e(
32
+ j,
33
+ {
34
+ id: `${l}-label`,
35
+ component: "label",
36
+ htmlFor: l,
37
+ variant: "body",
38
+ color: O(r, t),
39
+ ownerState: { ...a },
40
+ size: s,
41
+ disabled: t,
42
+ ellipsis: !0,
43
+ children: o
44
+ }
45
+ ) : null;
46
+ return /* @__PURE__ */ e(
47
+ T,
48
+ {
49
+ ownerState: { ...a },
50
+ className: M(b, I),
51
+ children: y ? /* @__PURE__ */ c(m, { children: [
52
+ /* @__PURE__ */ e(S, { "data-testid": "switch-skeleton", variant: "rounded", className: E.skeleton }),
53
+ o && /* @__PURE__ */ e(S, { "data-testid": "switch-skeleton-label", variant: "rectangular", className: "switchSkeletonLabel" })
54
+ ] }) : /* @__PURE__ */ c(m, { children: [
55
+ i === "start" && d,
56
+ /* @__PURE__ */ e(
57
+ _,
58
+ {
59
+ ref: u,
60
+ id: l,
61
+ ownerState: { ...a },
62
+ disableRipple: !0,
63
+ checked: r,
64
+ disabled: t,
65
+ inputProps: {
66
+ "aria-invalid": n ? "true" : void 0,
67
+ ...o && { "aria-labelledby": `${l}-label` }
68
+ },
69
+ value: k,
70
+ onChange: w,
71
+ ...v
72
+ }
73
+ ),
74
+ i === "end" && d
75
+ ] })
76
+ }
77
+ );
78
+ }
79
+ );
80
+ export {
81
+ B as Switch
82
+ };
@@ -0,0 +1,3 @@
1
+ import { SwitchStyles } from './types';
2
+ export declare const switchStyles: SwitchStyles;
3
+ //# sourceMappingURL=Switch.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.styles.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Switch/Switch.styles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,eAAO,MAAM,YAAY,EAAE,YA6J1B,CAAC"}
@@ -0,0 +1,139 @@
1
+ import { SWITCH_CLASSES as o } from "./constants.js";
2
+ import { getSizeStyles as p } from "../../../../utils/getSizeStyles/getSizeStyles.js";
3
+ const s = {
4
+ /** Root container styles: flex row, centered, with gap between thumb and label. */
5
+ root: ({ theme: a }) => ({
6
+ display: "flex",
7
+ alignItems: "center",
8
+ outline: "none",
9
+ overflow: "visible",
10
+ boxSizing: "border-box",
11
+ gap: a.vars.size.baseSpacings["sp2-5"],
12
+ width: "fit-content",
13
+ cursor: "pointer"
14
+ }),
15
+ /** MUI Switch element styles: track, thumb, hover/active/focus rings, and checked/disabled states. */
16
+ muiSwitch: ({ theme: a, ownerState: e }) => {
17
+ const r = e?.error, t = e?.size || "medium", { height: i } = p(a, t, "action");
18
+ return {
19
+ overflow: "visible",
20
+ padding: 0,
21
+ // Root = track: w = action × 1.133 (27.2/24), h = action × 0.667 (16/24)
22
+ width: `calc(${i} * 1.133)`,
23
+ height: `calc(${i} * 0.667)`,
24
+ // Track — pill completa, llena el root
25
+ "& .MuiSwitch-track": {
26
+ width: "100%",
27
+ height: "100%",
28
+ borderRadius: "80px",
29
+ backgroundColor: a.vars.palette.default.enabled,
30
+ opacity: 1,
31
+ boxSizing: "border-box",
32
+ boxShadow: "inset 0px 0px 3.2px 0px rgba(0, 0, 0, 0.08)"
33
+ },
34
+ // SwitchBase — action×action, centrado sobre track (overflow -0.167 × action = -4px)
35
+ "& .MuiSwitch-switchBase": {
36
+ padding: 0,
37
+ width: i,
38
+ height: i,
39
+ top: `calc(${i} * -0.167)`,
40
+ left: `calc(${i} * -0.167)`,
41
+ backgroundColor: "transparent",
42
+ // Hover — ring via box-shadow en el thumb (unchecked)
43
+ "&:hover .MuiSwitch-thumb": {
44
+ boxShadow: `0px 0px 0px 6px ${r ? a.vars.palette.error.hoverOpacity : a.vars.palette.default.hoverOpacity}, 0px 1px 4px 0px rgba(0, 0, 0, 0.15)`
45
+ },
46
+ // Active — ring más pronunciado (unchecked)
47
+ "&:active .MuiSwitch-thumb": {
48
+ boxShadow: `0px 0px 0px 6px ${r ? a.vars.palette.error.activeOpacity : a.vars.palette.default.activeOpacity}, 0px 1px 4px 0px rgba(0, 0, 0, 0.15)`
49
+ },
50
+ // Focus visible — outline en el thumb
51
+ "&.Mui-focusVisible .MuiSwitch-thumb": {
52
+ boxShadow: `0px 0px 0px 2px ${a.vars.palette.primary.focusVisible}, 0px 1px 4px 0px rgba(0, 0, 0, 0.15)`
53
+ },
54
+ // Checked: translateX 0.471 × action (11.3/24)
55
+ "&.Mui-checked": {
56
+ transform: `translateX(calc(${i} * 0.471))`,
57
+ // Track — (primary/error)ownerstate/palettecolor/selectedopacity
58
+ "& + .MuiSwitch-track": {
59
+ backgroundColor: r ? a.vars.palette.error.selectedOpacity : a.vars.palette.primary.selectedOpacity,
60
+ opacity: 1,
61
+ boxShadow: "inset 0px 0px 4px 0px rgba(0, 0, 0, 0.08)"
62
+ },
63
+ // Thumb checked — var(--primary-owner-state-palette-color-enabled, #0064FF)
64
+ "& .MuiSwitch-thumb": {
65
+ backgroundColor: r ? a.vars.palette.error.enabled : a.vars.palette.primary.enabled,
66
+ boxShadow: "inset 0px 2.4px 3.2px 0px rgba(255, 255, 255, 0.16)",
67
+ filter: "drop-shadow(0px 1.6px 3.2px rgba(0, 0, 0, 0.16))"
68
+ },
69
+ // Hover checked
70
+ "&:hover .MuiSwitch-thumb": {
71
+ boxShadow: `0px 0px 0px 6px ${r ? a.vars.palette.error.hoverOpacity : a.vars.palette.primary.hoverOpacity}, 0px 1px 4px 0px rgba(0, 0, 0, 0.15)`
72
+ },
73
+ // Active checked
74
+ "&:active .MuiSwitch-thumb": {
75
+ boxShadow: `0px 0px 0px 6px ${r ? a.vars.palette.error.activeOpacity : a.vars.palette.primary.activeOpacity}, 0px 1px 4px 0px rgba(0, 0, 0, 0.15)`
76
+ },
77
+ // Disabled unchecked — track: default.enabledOpacity, thumb faded
78
+ "&.Mui-disabled + .MuiSwitch-track": {
79
+ backgroundColor: r ? a.vars.palette.error.enabledOpacity : a.vars.palette.default.enabledOpacity,
80
+ opacity: 1
81
+ },
82
+ "&.Mui-disabled .MuiSwitch-thumb": {
83
+ opacity: 0.38
84
+ },
85
+ // Disabled checked — track: primary.enabledOpacity (rgba(0,100,255,0.08))
86
+ "&.Mui-disabled.Mui-checked + .MuiSwitch-track": {
87
+ backgroundColor: r ? a.vars.palette.error.enabledOpacity : a.vars.palette.primary.enabledOpacity,
88
+ opacity: 1
89
+ },
90
+ "&.Mui-disabled.Mui-checked .MuiSwitch-thumb": {
91
+ backgroundColor: r ? a.vars.palette.error.enabled : a.vars.palette.primary.enabled,
92
+ opacity: 0.38
93
+ }
94
+ }
95
+ },
96
+ // Thumb — Ellipse 3: 12.8px (action × 0.533), margin 5.6px (action × 0.233)
97
+ // unchecked: text.secondary token | checked: palette.primary.enabled (#0064FF)
98
+ // Posición unchecked: 1.6px desde borde track | checked: ~13px desde borde izq
99
+ "& .MuiSwitch-thumb": {
100
+ width: `calc(${i} * 0.533)`,
101
+ height: `calc(${i} * 0.533)`,
102
+ margin: `calc(${i} * 0.233)`,
103
+ backgroundColor: a.vars.palette.text.secondary,
104
+ borderRadius: "50%",
105
+ boxShadow: "inset 0px 2.4px 3.2px 0px rgba(255, 255, 255, 0.16)",
106
+ filter: "drop-shadow(0px 1.6px 3.2px rgba(0, 0, 0, 0.16))"
107
+ },
108
+ ...e?.disabled && {
109
+ pointerEvents: "none"
110
+ }
111
+ };
112
+ },
113
+ label: () => ({
114
+ cursor: "inherit"
115
+ }),
116
+ /** Skeleton loading state styles for the switch track and optional label. */
117
+ skeleton: ({ theme: a, ownerState: e }) => {
118
+ const r = e?.size || "medium", { height: t } = p(a, r, "action");
119
+ return {
120
+ borderRadius: a.vars.size.borderRadius.r1,
121
+ backgroundColor: a.vars.palette?.skeleton.default,
122
+ // Label skeleton: ancho fijo aproximado al texto, alto = body typography
123
+ "&.switchSkeletonLabel": {
124
+ width: `calc(${t} * 2.5)`,
125
+ height: `calc(${t} * 0.467)`,
126
+ borderRadius: a.vars.size.borderRadius.r1
127
+ },
128
+ // Switch skeleton: mismas proporciones que el track real (action × 1.133 × 0.667)
129
+ [`&.${o.skeleton}`]: {
130
+ width: `calc(${t} * 1.133)`,
131
+ height: `calc(${t} * 0.667)`,
132
+ borderRadius: "80px"
133
+ }
134
+ };
135
+ }
136
+ };
137
+ export {
138
+ s as switchStyles
139
+ };
@@ -0,0 +1,3 @@
1
+ export declare const SWITCH_KEY_COMPONENT = "M4LSwitch";
2
+ export declare const SWITCH_CLASSES: Record<"skeleton" | "label" | "root" | "muiSwitch", string>;
3
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Switch/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,eAAO,MAAM,cAAc,6DAAyD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { getComponentClasses as o } from "../../../../utils/getComponentSlotRoot.js";
2
+ import { SwitchSlots as t } from "./slots/SwitchEnum.js";
3
+ const S = "M4LSwitch", m = o(S, t);
4
+ export {
5
+ m as SWITCH_CLASSES,
6
+ S as SWITCH_KEY_COMPONENT
7
+ };
@@ -0,0 +1,2 @@
1
+ export { Switch } from './Switch';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare enum SwitchSlots {
2
+ root = "root",
3
+ muiSwitch = "muiSwitch",
4
+ label = "label",
5
+ skeleton = "skeleton"
6
+ }
7
+ //# sourceMappingURL=SwitchEnum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchEnum.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/extended/mui/Switch/slots/SwitchEnum.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,4 @@
1
+ var r = /* @__PURE__ */ ((e) => (e.root = "root", e.muiSwitch = "muiSwitch", e.label = "label", e.skeleton = "skeleton", e))(r || {});
2
+ export {
3
+ r as SwitchSlots
4
+ };
@@ -0,0 +1,13 @@
1
+ export declare const SwitchRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
2
+ ownerState?: (Partial<import('../types').SwitchOwnerState> & Record<string, unknown>) | undefined;
3
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
+ export declare const MUISwitchStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').SwitchProps, keyof import('@mui/material').SwitchProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
5
+ ownerState?: (Partial<import('../types').SwitchOwnerState> & Record<string, unknown>) | undefined;
6
+ }, {}, {}>;
7
+ export declare const LabelStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../..').TypographyProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "title" | "component" | "zIndex" | "size" | "variant" | "color" | "dataTestid" | "paragraph" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "className" | "style" | "classes" | "children" | "sx" | "p" | "slot" | "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" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "disabled" | "align" | "gutterBottom" | "noWrap" | "variantMapping" | "skeletonWidth" | "skeletonRows" | "htmlFor" | "ellipsis" | keyof import('react').RefAttributes<HTMLSpanElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
8
+ ownerState?: (Partial<import('../types').SwitchOwnerState> & Record<string, unknown>) | undefined;
9
+ }, {}, {}>;
10
+ export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "variant" | "height" | "width" | "animation" | "className" | "style" | "classes" | "children" | "sx">, "title" | "variant" | "color" | "content" | "height" | "translate" | "width" | "animation" | "className" | "style" | "classes" | "children" | "sx" | "slot" | "ref" | "key" | "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"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
11
+ ownerState?: (Partial<import('../types').SwitchOwnerState> & Record<string, unknown>) | undefined;
12
+ }, {}, {}>;
13
+ //# sourceMappingURL=SwitchSlots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchSlots.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/extended/mui/Switch/slots/SwitchSlots.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;6NAGR,CAAC;AAEtB,eAAO,MAAM,eAAe;;UAGF,CAAC;AAE3B,eAAO,MAAM,WAAW;;UAGF,CAAC;AAEvB,eAAO,MAAM,cAAc;;UAGF,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { styled as t } from "@mui/material/styles";
2
+ import { Switch as m, Skeleton as i } from "@mui/material";
3
+ import { SwitchSlots as o } from "./SwitchEnum.js";
4
+ import { SWITCH_KEY_COMPONENT as e } from "../constants.js";
5
+ import { switchStyles as l } from "../Switch.styles.js";
6
+ import { Typography as r } from "../../Typography/Typography.js";
7
+ const h = t("div", {
8
+ name: e,
9
+ slot: o.root
10
+ })(l.root), y = t(m, {
11
+ name: e,
12
+ slot: o.muiSwitch
13
+ })(l.muiSwitch), w = t(r, {
14
+ name: e,
15
+ slot: o.label
16
+ })(l.label), d = t(i, {
17
+ name: e,
18
+ slot: o.skeleton
19
+ })(l.skeleton);
20
+ export {
21
+ w as LabelStyled,
22
+ y as MUISwitchStyled,
23
+ d as SkeletonStyled,
24
+ h as SwitchRootStyled
25
+ };
@@ -0,0 +1,3 @@
1
+ export * from './SwitchEnum';
2
+ export * from './SwitchSlots';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/extended/mui/Switch/slots/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { SwitchProps as MUISwitchProps, Theme } from '@mui/material';
2
+ import { ComponentPalletColor, Sizes } from '@m4l/styles';
3
+ import { M4LOverridesStyleRules } from '../../../../@types/augmentations';
4
+ import { SwitchSlots } from './slots/SwitchEnum';
5
+ import { SWITCH_KEY_COMPONENT } from './constants';
6
+ /** Props for the Switch component. */
7
+ export interface SwitchProps extends MUISwitchProps {
8
+ /** Optional label displayed inline next to the switch. */
9
+ label?: string;
10
+ /** Position of the label relative to the switch. Defaults to 'end' (right). */
11
+ labelPlacement?: 'start' | 'end';
12
+ /** Size of the switch. */
13
+ size?: Extract<Sizes, 'small' | 'medium'>;
14
+ /** Color variant. */
15
+ color?: Extract<ComponentPalletColor, 'default'>;
16
+ /** Indicates an error state. */
17
+ error?: boolean;
18
+ }
19
+ /** Internal owner state used by styled slots. */
20
+ export interface SwitchOwnerState {
21
+ /** Whether the switch is checked. */
22
+ checked?: boolean;
23
+ /** Whether the switch is disabled. */
24
+ disabled?: boolean;
25
+ /** Size of the switch. */
26
+ size: Extract<Sizes, 'small' | 'medium'>;
27
+ /** Color variant. */
28
+ color: Extract<ComponentPalletColor, 'default'>;
29
+ /** Whether the switch is in an error state. */
30
+ error?: boolean;
31
+ }
32
+ /** Union of slot keys for the Switch component. */
33
+ export type SwitchSlotsType = keyof typeof SwitchSlots;
34
+ /** Style rules type for the Switch component. */
35
+ export type SwitchStyles = M4LOverridesStyleRules<SwitchSlotsType, typeof SWITCH_KEY_COMPONENT, Theme>;
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Switch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,sCAAsC;AACtC,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACjC,0BAA0B;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C,qBAAqB;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IACjD,gCAAgC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IACzC,qBAAqB;IACrB,KAAK,EAAE,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAChD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,mDAAmD;AACnD,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,WAAW,CAAC;AAEvD,iDAAiD;AACjD,MAAM,MAAM,YAAY,GAAG,sBAAsB,CAC/C,eAAe,EACf,OAAO,oBAAoB,EAC3B,KAAK,CACN,CAAC"}
@@ -10,6 +10,7 @@ export * from './Button/Button';
10
10
  export type { ButtonProps } from './Button/types';
11
11
  export * from './CheckBox';
12
12
  export * from './Radio';
13
+ export * from './Switch';
13
14
  export { CircularProgress } from './CircularProgress';
14
15
  export { Badge } from './Badge';
15
16
  export * from './ImageButton/ImageButton';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/mui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/mui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const RHFSwitch: import('react').ForwardRefExoticComponent<Omit<any, "ref"> & import('react').RefAttributes<any>>;
2
+ //# sourceMappingURL=RHFSwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RHFSwitch.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFSwitch/RHFSwitch.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,SAAS,kGAAmC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as c } from "@emotion/react/jsx-runtime";
2
+ import { withRHFController as i } from "../../../hocs/withRHFController/index.js";
3
+ import { Switch as h } from "../../extended/mui/Switch/Switch.js";
4
+ const m = ({ value: t, onChange: e, field: f, fieldState: a, formState: d, ...o }) => /* @__PURE__ */ c(
5
+ h,
6
+ {
7
+ checked: !!t,
8
+ onChange: (r) => e?.(r.target.checked),
9
+ ...o
10
+ }
11
+ ), l = i(m);
12
+ export {
13
+ l as RHFSwitch
14
+ };
@@ -0,0 +1,2 @@
1
+ export { RHFSwitch } from './RHFSwitch';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFSwitch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -24,4 +24,5 @@ export * from './RHFUpload';
24
24
  export * from './RHFormProvider';
25
25
  export * from './RHFActionsGroup';
26
26
  export * from './RHFDateRangePicker';
27
+ export * from './RHFSwitch';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/hook-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,sCAAsC,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,2CAA2C,EAAE,MAAM,mCAAmC,CAAC;AAChG,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/hook-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,sCAAsC,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,2CAA2C,EAAE,MAAM,mCAAmC,CAAC;AAChG,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC"}