asma-ui-core 3.41.0 → 3.42.1

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 (201) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/data-display/badge/StyledBadge.js +24 -29
  3. package/dist/components/data-display/chip/StyledChip.js +60 -45
  4. package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +38 -32
  5. package/dist/components/data-display/tooltip/StyledTooltip.js +33 -50
  6. package/dist/components/data-display/typography/StyledTypography.js +4 -62
  7. package/dist/components/feedback/dialog/StyledDialog.js +50 -70
  8. package/dist/components/feedback/dialog/StyledDialog.module.js +9 -2
  9. package/dist/components/feedback/dialog/StyledDialogActions.js +16 -16
  10. package/dist/components/feedback/dialog/StyledDialogActions.module.js +8 -0
  11. package/dist/components/feedback/dialog/StyledDialogContent.js +14 -17
  12. package/dist/components/feedback/dialog/StyledDialogContent.module.js +4 -0
  13. package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -18
  14. package/dist/components/feedback/dialog/StyledDialogTitle.module.js +4 -0
  15. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +57 -56
  16. package/dist/components/feedback/snack-bar/StyledAlert.js +14 -72
  17. package/dist/components/feedback/snack-bar/StyledSnackbar.js +8 -34
  18. package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.js +34 -33
  19. package/dist/components/inputs/checkbox/StyledCheckbox.js +20 -0
  20. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +58 -55
  21. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -12
  22. package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +1 -1
  23. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +1 -1
  24. package/dist/components/inputs/input-field/StyledInputField.js +81 -104
  25. package/dist/components/inputs/radio-button/StyledRadio.js +17 -0
  26. package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +29 -40
  27. package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
  28. package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +23 -35
  29. package/dist/components/inputs/select/StyledSelect.js +45 -124
  30. package/dist/components/inputs/select/StyledSelectItem.js +23 -19
  31. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +151 -181
  32. package/dist/components/inputs/slider/StyledSlider.js +52 -78
  33. package/dist/components/inputs/switch/base-ui/StyledSwitch.js +39 -44
  34. package/dist/components/miscellaneous/StyledFormControl.js +21 -39
  35. package/dist/components/miscellaneous/StyledFormControlLabel.js +16 -27
  36. package/dist/components/miscellaneous/StyledFormGroup.js +4 -16
  37. package/dist/components/miscellaneous/StyledFormHelperText.js +4 -12
  38. package/dist/components/miscellaneous/StyledInputLabel.js +4 -20
  39. package/dist/components/navigation/drawer/StyledDrawer.js +4 -42
  40. package/dist/components/navigation/listbox/Listbox.js +7 -7
  41. package/dist/components/navigation/menu/StyledMenu.js +11 -28
  42. package/dist/components/navigation/menu/StyledMenuItem.js +18 -16
  43. package/dist/components/navigation/menu/StyledMenuList.js +4 -32
  44. package/dist/components/navigation/tabs/StyledTab.js +13 -25
  45. package/dist/components/navigation/tabs/StyledTabs.js +64 -112
  46. package/dist/components/utils/accordion/base-ui/StyledAccordion.js +21 -28
  47. package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +7 -7
  48. package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +14 -28
  49. package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +27 -31
  50. package/dist/components/utils/popover/StyledPopover.js +15 -44
  51. package/dist/datetime/components/date-picker/StyledDatePicker.js +6 -6
  52. package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +1 -1
  53. package/dist/datetime/components/date-picker/components/HelperTextWithTooltip.js +6 -6
  54. package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +11 -11
  55. package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +14 -13
  56. package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +14 -14
  57. package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +6 -6
  58. package/dist/datetime/components/date-picker/components/StyledDayPicker.js +5 -4
  59. package/dist/datetime/components/date-picker/hooks/useDatePickerMask.js +4 -4
  60. package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
  61. package/dist/datetime/components/time-picker/TimePickerInput.js +16 -15
  62. package/dist/datetime/components/time-picker/TimePickerPopper.js +19 -21
  63. package/dist/datetime/helpers/cn.js +5 -4
  64. package/dist/datetime/shared-components/ExpandIcon.js +18 -0
  65. package/dist/datetime/shared-components/StyledFormControl.js +23 -0
  66. package/dist/datetime/shared-components/StyledInputField.js +47 -0
  67. package/dist/datetime/shared-components/StyledSelect.js +47 -0
  68. package/dist/datetime/shared-components/StyledSelectItem.js +13 -0
  69. package/dist/datetime/shared-components/StyledTooltip.js +32 -0
  70. package/dist/helpers/cn.js +5 -4
  71. package/dist/index.js +175 -185
  72. package/dist/src/components/data-display/badge/StyledBadge.d.ts +2 -26
  73. package/dist/src/components/data-display/chip/StyledChip.d.ts +5 -39
  74. package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +4 -11
  75. package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +2 -36
  76. package/dist/src/components/data-display/typography/StyledTypography.d.ts +1 -19
  77. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +4 -50
  78. package/dist/src/components/feedback/dialog/StyledDialogActions.d.ts +2 -12
  79. package/dist/src/components/feedback/dialog/StyledDialogContent.d.ts +2 -12
  80. package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +2 -10
  81. package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
  82. package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +2 -24
  83. package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
  84. package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +2 -21
  85. package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +1 -1
  86. package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +1 -1
  87. package/dist/src/components/feedback/snack-bar/components/types.d.ts +1 -1
  88. package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +4 -0
  89. package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +4 -9
  90. package/dist/src/components/inputs/dynamic-select/types.d.ts +2 -2
  91. package/dist/src/components/inputs/input-field/StyledInputField.d.ts +11 -67
  92. package/dist/src/components/inputs/input-field/index.d.ts +1 -1
  93. package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +4 -0
  94. package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +4 -0
  95. package/dist/src/components/inputs/radio-button/base-ui/StyledRadio.d.ts +5 -20
  96. package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +7 -24
  97. package/dist/src/components/inputs/select/StyledSelect.d.ts +16 -39
  98. package/dist/src/components/inputs/select/StyledSelectItem.d.ts +2 -14
  99. package/dist/src/components/inputs/select/index.d.ts +1 -0
  100. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +17 -88
  101. package/dist/src/components/inputs/slider/StyledSlider.d.ts +3 -55
  102. package/dist/src/components/inputs/switch/StyledSwitch.d.ts +5 -0
  103. package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +4 -20
  104. package/dist/src/components/miscellaneous/StyledFormControl.d.ts +2 -22
  105. package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +2 -21
  106. package/dist/src/components/miscellaneous/StyledFormGroup.d.ts +2 -11
  107. package/dist/src/components/miscellaneous/StyledFormHelperText.d.ts +2 -12
  108. package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +2 -20
  109. package/dist/src/components/navigation/drawer/StyledDrawer.d.ts +2 -28
  110. package/dist/src/components/navigation/menu/StyledMenu.d.ts +2 -33
  111. package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +2 -23
  112. package/dist/src/components/navigation/menu/StyledMenuList.d.ts +2 -16
  113. package/dist/src/components/navigation/menu/index.d.ts +1 -0
  114. package/dist/src/components/navigation/tabs/StyledTab.d.ts +3 -17
  115. package/dist/src/components/navigation/tabs/StyledTabs.d.ts +7 -16
  116. package/dist/src/components/utils/accordion/StyledAccordion.d.ts +2 -0
  117. package/dist/src/components/utils/accordion/StyledAccordionDetails.d.ts +2 -0
  118. package/dist/src/components/utils/accordion/StyledAccordionSummary.d.ts +8 -0
  119. package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +3 -9
  120. package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +0 -5
  121. package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +4 -8
  122. package/dist/src/components/utils/copy-wrapper/CopyWrapper.d.ts +1 -1
  123. package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -2
  124. package/dist/src/components/utils/popover/StyledPopover.d.ts +2 -32
  125. package/dist/src/datetime/components/date-picker/components/StyledCalendarPicker.d.ts +1 -1
  126. package/dist/src/datetime/components/date-picker/components/StyledDayPicker.d.ts +1 -1
  127. package/dist/src/datetime/components/date-picker/hooks/useDatePickerMask.d.ts +2 -1
  128. package/dist/src/datetime/components/time-picker/TimePickerInput.d.ts +1 -1
  129. package/dist/src/datetime/components/time-picker/TimePickerPopper.d.ts +1 -1
  130. package/dist/src/datetime/components/time-picker/types.d.ts +2 -1
  131. package/dist/src/datetime/shared-components/StyledFormControl.d.ts +2 -1
  132. package/dist/src/datetime/shared-components/StyledInputField.d.ts +12 -1
  133. package/dist/src/datetime/shared-components/StyledSelect.d.ts +16 -1
  134. package/dist/src/datetime/shared-components/StyledSelectItem.d.ts +2 -1
  135. package/dist/src/datetime/shared-components/StyledTooltip.d.ts +2 -1
  136. package/dist/src/index.d.ts +1 -2
  137. package/dist/src/table/shared-components/StyledCheckbox.d.ts +4 -7
  138. package/dist/src/table/shared-components/StyledMenuItem.d.ts +2 -18
  139. package/dist/src/table/shared-components/menu-item/index.d.ts +2 -13
  140. package/dist/src/table/shared-components/tooltip/index.d.ts +1 -5
  141. package/dist/src/table/types.d.ts +1 -1
  142. package/dist/table/components/Fetching.js +4 -4
  143. package/dist/table/components/TableRow.js +7 -7
  144. package/dist/table/components/TableSkeleton.js +6 -6
  145. package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +24 -24
  146. package/dist/table/components/columns/action-column/components/RowActionMenu.js +25 -26
  147. package/dist/table/components/table-footer/TablePagination.js +24 -27
  148. package/dist/table/components/table-footer/TableRowCountSelect.js +27 -30
  149. package/dist/table/helpers/cn.js +5 -4
  150. package/dist/table/shared-components/StyledCheckbox.js +55 -54
  151. package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
  152. package/dist/table/shared-components/StyledMenuItem.js +18 -12
  153. package/dist/table/shared-components/menu-item/index.js +17 -13
  154. package/dist/table/shared-components/tooltip/index.js +23 -4
  155. package/package.json +16 -9
  156. package/dist/components/inputs/field-styles.js +0 -6
  157. package/dist/components/inputs/input-field/StyledInputField.module.js +0 -4
  158. package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +0 -6
  159. package/dist/components/inputs/slider/StyledSlider.module.js +0 -10
  160. package/dist/components/miscellaneous/FormControlContext.js +0 -6
  161. package/dist/components/mui-compat/Avatar.js +0 -29
  162. package/dist/components/mui-compat/ClickAwayListener.js +0 -29
  163. package/dist/components/mui-compat/Container.js +0 -24
  164. package/dist/components/mui-compat/Fade.js +0 -29
  165. package/dist/components/mui-compat/Fade.module.js +0 -9
  166. package/dist/components/mui-compat/FormLabel.js +0 -22
  167. package/dist/components/mui-compat/Paper.js +0 -44
  168. package/dist/components/mui-compat/Popper.js +0 -35
  169. package/dist/components/mui-compat/Skeleton.js +0 -26
  170. package/dist/components/mui-compat/Stack.js +0 -24
  171. package/dist/components/navigation/tabs/TabsContext.js +0 -6
  172. package/dist/components/utils/accordion/base-ui/AccordionContext.js +0 -10
  173. package/dist/components/utils/virtual-list/VirtualList.js +0 -45
  174. package/dist/helpers/arrays.js +0 -4
  175. package/dist/helpers/inputMask.js +0 -45
  176. package/dist/helpers/sx.js +0 -46
  177. package/dist/src/api-surface.test.d.ts +0 -1
  178. package/dist/src/components/inputs/field-styles.d.ts +0 -22
  179. package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +0 -10
  180. package/dist/src/components/miscellaneous/FormControlContext.d.ts +0 -14
  181. package/dist/src/components/mui-compat/Avatar.d.ts +0 -6
  182. package/dist/src/components/mui-compat/ClickAwayListener.d.ts +0 -19
  183. package/dist/src/components/mui-compat/Container.d.ts +0 -6
  184. package/dist/src/components/mui-compat/Fade.d.ts +0 -21
  185. package/dist/src/components/mui-compat/FormLabel.d.ts +0 -6
  186. package/dist/src/components/mui-compat/Paper.d.ts +0 -6
  187. package/dist/src/components/mui-compat/Popper.d.ts +0 -29
  188. package/dist/src/components/mui-compat/Skeleton.d.ts +0 -7
  189. package/dist/src/components/mui-compat/Stack.d.ts +0 -7
  190. package/dist/src/components/mui-compat/index.d.ts +0 -9
  191. package/dist/src/components/mui-compat/types.d.ts +0 -46
  192. package/dist/src/components/navigation/tabs/TabsContext.d.ts +0 -11
  193. package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +0 -10
  194. package/dist/src/components/utils/virtual-list/VirtualList.d.ts +0 -28
  195. package/dist/src/components/utils/virtual-list/index.d.ts +0 -1
  196. package/dist/src/helpers/arrays.d.ts +0 -2
  197. package/dist/src/helpers/arrays.test.d.ts +0 -1
  198. package/dist/src/helpers/inputMask.d.ts +0 -29
  199. package/dist/src/helpers/inputMask.test.d.ts +0 -1
  200. package/dist/src/helpers/sx.d.ts +0 -2
  201. package/dist/src/helpers/sx.test.d.ts +0 -1
@@ -1,82 +1,56 @@
1
- import { cn as e } from "../../../helpers/cn.js";
2
- import { ErrorOutlineIcon as J } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
3
- import { StyledFormHelperText as Q } from "../../miscellaneous/StyledFormHelperText.js";
4
- import d from "./StyledSlider.module.js";
5
- import { jsx as m, jsxs as b } from "react/jsx-runtime";
6
- var A = (s, a, u) => u === a ? 0 : Math.min(100, Math.max(0, (s - a) / (u - a) * 100)), W = (s) => Array.isArray(s) ? [s[0] ?? 0, s[1] ?? 0] : null, I = ({ dataTest: s, min: a = 0, max: u = 100, step: R = 1, value: U, defaultValue: _, disabled: p, size: q = "medium", orientation: M = "horizontal", marks: T, name: B, className: E, classes: c, slotProps: y, error: v, errorText: F, helperText: L, onChange: K, onChangeCommitted: P }) => {
7
- const o = M === "vertical", g = U ?? _ ?? a, n = W(g), f = n !== null, O = (v ?? !1) || !!L, k = v ? F ?? "Required" : L, N = Array.isArray(T) ? T : [], H = f ? Math.min(n[0], n[1]) : a, w = f ? Math.max(n[0], n[1]) : g, j = (t) => f ? t >= H && t <= w : t <= w, x = f ? A(H, a, u) : 0, z = A(w, a, u) - x, G = o ? {
8
- bottom: `${x}%`,
9
- height: `${z}%`
10
- } : {
11
- left: `${x}%`,
12
- width: `${z}%`
13
- }, D = (t) => {
14
- const i = A(t, a, u);
15
- return o ? { bottom: `${i}%` } : { left: `${i}%` };
16
- }, S = (t, i, l, h) => {
17
- if (!t) return;
18
- if (!f) {
19
- t(i, l, 0);
20
- return;
1
+ import { ErrorOutlineIcon as c } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
2
+ import { StyledFormHelperText as b } from "../../miscellaneous/StyledFormHelperText.js";
3
+ import e from "clsx";
4
+ import { Slider as n } from "@mui/material";
5
+ import { Fragment as g, jsx as t, jsxs as l } from "react/jsx-runtime";
6
+ var k = ({ dataTest: i, error: a, errorText: d, helperText: o, ...r }) => {
7
+ const s = (a ?? !1) || (o ?? !1), m = a ? d ?? "Required" : o;
8
+ return /* @__PURE__ */ l(g, { children: [/* @__PURE__ */ t(n, {
9
+ ...r,
10
+ "data-testid": i,
11
+ slotProps: {
12
+ ...r.slotProps,
13
+ thumb: {
14
+ className: e("h-4 w-4", "before:shadow-none", 'after:h-8 after:w-8 after:content-[""]', r.orientation === "vertical" ? "mb-1 ml-0" : "ml-1", r.disabled ? "bg-delta-200" : "bg-gama-500"),
15
+ ...r.slotProps?.thumb
16
+ },
17
+ rail: {
18
+ className: "bg-delta-200",
19
+ ...r.slotProps?.rail
20
+ },
21
+ markLabel: {
22
+ className: e("ml-1 text-sm font-semibold text-delta-600", r.orientation === "vertical" && "mb-1"),
23
+ ...r.slotProps?.markLabel
24
+ }
25
+ },
26
+ sx: {
27
+ ...r.sx,
28
+ "& .MuiSlider-track": {
29
+ backgroundColor: r.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)",
30
+ borderColor: r.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)"
31
+ },
32
+ "& .MuiSlider-mark": {
33
+ backgroundColor: "white",
34
+ border: "1px solid var(--colors-delta-300)",
35
+ borderRadius: "50%",
36
+ height: "8px",
37
+ width: "8px",
38
+ "&.MuiSlider-markActive": {
39
+ backgroundColor: r.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)",
40
+ border: "1px solid",
41
+ borderColor: r.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)",
42
+ opacity: 1
43
+ }
44
+ }
21
45
  }
22
- const r = [n?.[0] ?? 0, n?.[1] ?? 0];
23
- r[h] = l, h === 0 && r[0] > r[1] && (r[0] = r[1]), h === 1 && r[1] < r[0] && (r[1] = r[0]), t(i, r, h);
24
- }, $ = (t, i) => /* @__PURE__ */ m("input", {
25
- type: "range",
26
- "data-testid": f ? `${s}-thumb-${t}` : s,
27
- name: B,
28
- min: a,
29
- max: u,
30
- step: R,
31
- value: i,
32
- disabled: p,
33
- "aria-orientation": M,
34
- className: e(d.SliderInput, o ? d.Vertical : d.Horizontal, q === "small" && d.Small, p && d.Disabled, c?.thumb, y?.thumb?.className),
35
- onChange: (l) => S(K, l, Number(l.currentTarget.value), t),
36
- onPointerUp: (l) => S(P, l, Number(l.currentTarget.value), t),
37
- onKeyUp: (l) => S(P, l, Number(l.currentTarget.value), t)
38
- }, t);
39
- return /* @__PURE__ */ b("div", {
40
- className: e("flex", o ? "h-full w-8 flex-col items-center" : "w-full flex-col", c?.root, E),
41
- children: [
42
- /* @__PURE__ */ b("div", {
43
- className: e("relative", o ? "h-full w-8" : "h-4 w-full"),
44
- children: [/* @__PURE__ */ b("div", {
45
- className: e("absolute", o ? "inset-y-2 left-1/2 w-1 -translate-x-1/2" : "inset-x-2 top-1/2 h-1 -translate-y-1/2"),
46
- children: [
47
- /* @__PURE__ */ m("div", { className: e("absolute inset-0 rounded-full bg-delta-200", c?.rail, y?.rail?.className) }),
48
- /* @__PURE__ */ m("div", {
49
- className: e("absolute rounded-full", o ? "left-0 w-full" : "top-0 h-full", p ? "bg-delta-200" : "bg-gama-500", c?.track),
50
- style: G
51
- }),
52
- N.map((t) => {
53
- const i = j(t.value);
54
- return /* @__PURE__ */ m("span", {
55
- className: e("absolute h-2 w-2 -translate-x-1/2 rounded-full border", o ? "left-1/2 translate-y-1/2" : "top-1/2 -translate-y-1/2", i ? e("border-gama-500", p ? "bg-delta-200" : "bg-gama-500", c?.markActive) : e("border-delta-300 bg-white", c?.mark)),
56
- style: D(t.value)
57
- }, t.value);
58
- })
59
- ]
60
- }), f ? [$(0, n[0]), $(1, n[1])] : $(0, g)]
61
- }),
62
- N.some((t) => t.label != null) && /* @__PURE__ */ m("div", {
63
- className: e("relative", o ? "h-full w-full" : "mt-1 h-5 w-full"),
64
- children: N.map((t) => t.label == null ? null : /* @__PURE__ */ m("span", {
65
- className: e("absolute -translate-x-1/2 text-sm font-semibold", j(t.value) ? e("text-delta-800", c?.markLabelActive) : "text-delta-600", c?.markLabel, y?.markLabel?.className),
66
- style: D(t.value),
67
- children: t.label
68
- }, t.value))
69
- }),
70
- O && /* @__PURE__ */ b(Q, {
71
- className: e("m-0 flex items-center gap-1 pt-1 text-sm", v ? "text-error-500" : "text-delta-600"),
72
- children: [v && /* @__PURE__ */ m(J, {
73
- width: 20,
74
- height: 20
75
- }), k]
76
- })
77
- ]
78
- });
46
+ }), s && /* @__PURE__ */ l(b, {
47
+ className: e("m-0 flex items-center gap-1 pt-1 text-sm", a ? "text-error-500" : "text-delta-600"),
48
+ children: [a && /* @__PURE__ */ t(c, {
49
+ width: 20,
50
+ height: 20
51
+ }), m]
52
+ })] });
79
53
  };
80
54
  export {
81
- I as StyledSlider
55
+ k as StyledSlider
82
56
  };
@@ -1,13 +1,13 @@
1
- import { cn as x } from "../../../../helpers/cn.js";
2
1
  import { getSvgIconStyle as C } from "../../../icons/iconStyle.js";
3
- import a from "./StyledSwitch.module.js";
4
- import { forwardRef as S, useState as y } from "react";
5
- import { jsx as e } from "react/jsx-runtime";
6
- var N = ({ className: t }) => /* @__PURE__ */ e("svg", {
2
+ import r from "./StyledSwitch.module.js";
3
+ import { forwardRef as y, useState as N } from "react";
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ import { Switch as d } from "@base-ui/react/switch";
6
+ var b = ({ className: e }) => /* @__PURE__ */ t("svg", {
7
7
  viewBox: "0 0 24 24",
8
- className: t,
8
+ className: e,
9
9
  fill: "none",
10
- children: /* @__PURE__ */ e("rect", {
10
+ children: /* @__PURE__ */ t("rect", {
11
11
  x: "6",
12
12
  y: "10.5",
13
13
  width: "11",
@@ -15,55 +15,50 @@ var N = ({ className: t }) => /* @__PURE__ */ e("svg", {
15
15
  fill: "currentColor",
16
16
  rx: "0.75"
17
17
  })
18
- }), I = ({ width: t = 11, height: n = 11, className: i = "", onClick: c, color: r }) => /* @__PURE__ */ e("svg", {
18
+ }), I = ({ width: e = 11, height: o = 11, className: c = "", onClick: n, color: s }) => /* @__PURE__ */ t("svg", {
19
19
  xmlns: "http://www.w3.org/2000/svg",
20
- width: t,
21
- height: n,
20
+ width: e,
21
+ height: o,
22
22
  viewBox: "0 0 448 512",
23
- className: i,
24
- onClick: c,
25
- style: C(r),
23
+ className: c,
24
+ onClick: n,
25
+ style: C(s),
26
26
  "aria-hidden": "true",
27
27
  focusable: "false",
28
- children: /* @__PURE__ */ e("path", {
28
+ children: /* @__PURE__ */ t("path", {
29
29
  fill: "currentColor",
30
30
  d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7L393.4 105.4c12.5-12.5 32.8-12.5 45.2 0"
31
31
  })
32
- }), q = S(({ checked: t, defaultChecked: n = !1, onChange: i, disabled: c, readOnly: r, required: m, id: l, dataTest: f, className: u, ...v }, w) => {
33
- const [p, g] = y(n), d = t !== void 0, o = d ? t : p, k = () => {
34
- if (r || c) return;
35
- const s = !o;
36
- d || g(s), i?.({ target: {
37
- checked: s,
38
- name: l
39
- } }, s);
40
- }, h = a.iconContent;
41
- return /* @__PURE__ */ e("button", {
32
+ }), M = y(({ checked: e, defaultChecked: o = !1, onChange: c, disabled: n, readOnly: s, required: f, id: a, dataTest: u, ...v }, w) => {
33
+ const [g, p] = N(o), l = e !== void 0, h = l ? e : g, S = (i) => {
34
+ l || p(i), c?.({ target: {
35
+ checked: i,
36
+ name: a
37
+ } }, i);
38
+ }, x = l ? { checked: h } : { defaultChecked: o }, m = r.iconContent;
39
+ return /* @__PURE__ */ t(d.Root, {
42
40
  ...v,
41
+ ...x,
42
+ nativeButton: !0,
43
+ render: /* @__PURE__ */ t("button", {}),
43
44
  ref: w,
44
- type: "button",
45
- role: "switch",
46
- "aria-checked": o,
47
- "aria-readonly": r,
48
- "aria-required": m,
49
- className: x(a.switch, u),
50
- onClick: k,
51
- disabled: c,
52
- id: l,
53
- name: l,
54
- "data-testid": f,
55
- "data-checked": o ? "" : void 0,
56
- "data-unchecked": o ? void 0 : "",
57
- "data-disabled": c ? "" : void 0,
58
- children: /* @__PURE__ */ e("span", {
59
- className: a.thumb,
60
- children: /* @__PURE__ */ e("span", {
61
- className: a.icon,
62
- children: o ? /* @__PURE__ */ e(I, { className: h }) : /* @__PURE__ */ e(N, { className: h })
45
+ className: r.switch,
46
+ onCheckedChange: S,
47
+ disabled: n,
48
+ readOnly: s,
49
+ required: f,
50
+ id: a,
51
+ name: a,
52
+ "data-testid": u,
53
+ children: /* @__PURE__ */ t(d.Thumb, {
54
+ className: r.thumb,
55
+ children: /* @__PURE__ */ t("span", {
56
+ className: r.icon,
57
+ children: h ? /* @__PURE__ */ t(I, { className: m }) : /* @__PURE__ */ t(b, { className: m })
63
58
  })
64
59
  })
65
60
  });
66
61
  });
67
62
  export {
68
- q as StyledSwitch
63
+ M as StyledSwitch
69
64
  };
@@ -1,41 +1,23 @@
1
- import { cn as C } from "../../helpers/cn.js";
2
- import { resolveSx as I } from "../../helpers/sx.js";
3
- import { FormControlContext as S } from "./FormControlContext.js";
4
- import { useId as y, useMemo as g, useState as n } from "react";
5
- import { jsx as a } from "react/jsx-runtime";
6
- var P = ({ children: c, error: e = !1, disabled: o = !1, required: l = !1, size: t = "medium", fullWidth: i, className: d, style: u, sx: x, id: r }) => {
7
- const s = y(), [m, p] = n(!1), [f, v] = n(!1), F = g(() => ({
8
- focused: m,
9
- filled: f,
10
- error: e,
11
- disabled: o,
12
- required: l,
13
- size: t,
14
- labelId: r ?? s,
15
- setFocused: p,
16
- setFilled: v
17
- }), [
18
- m,
19
- f,
20
- e,
21
- o,
22
- l,
23
- t,
24
- r,
25
- s
26
- ]);
27
- return /* @__PURE__ */ a(S.Provider, {
28
- value: F,
29
- children: /* @__PURE__ */ a("div", {
30
- className: C("relative inline-flex flex-col", i && "w-full", d),
31
- style: {
32
- ...I(x),
33
- ...u
34
- },
35
- children: c
36
- })
37
- });
38
- };
1
+ import { FormControl as r } from "@mui/material";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ var l = (o) => /* @__PURE__ */ t(r, {
4
+ ...o,
5
+ sx: {
6
+ ...o.sx,
7
+ "& label.MuiInputLabel-shrink": {
8
+ background: "white !important",
9
+ color: "var(--colors-delta-800) !important"
10
+ },
11
+ "& label.MuiInputLabel-shrink.Mui-focused": {
12
+ background: "white !important",
13
+ color: "var(--colors-gama-500) !important"
14
+ },
15
+ "& label.MuiInputLabel-shrink.Mui-error.Mui-focused": {
16
+ background: "white !important",
17
+ color: "var(--colors-red-500) !important"
18
+ }
19
+ }
20
+ });
39
21
  export {
40
- P as StyledFormControl
22
+ l as StyledFormControl
41
23
  };
@@ -1,29 +1,18 @@
1
- import { cn as s } from "../../helpers/cn.js";
2
- import { resolveSx as u } from "../../helpers/sx.js";
3
- import { cloneElement as v, isValidElement as a } from "react";
4
- import { jsx as h, jsxs as b } from "react/jsx-runtime";
5
- var g = {
6
- end: "flex-row",
7
- start: "flex-row-reverse",
8
- top: "flex-col-reverse",
9
- bottom: "flex-col"
10
- }, L = ({ control: e, label: t, checked: n, disabled: o, name: d, value: i, labelPlacement: m = "end", className: c, sx: p, onChange: x }) => {
11
- const l = a(e) ? e.props : {}, r = o ?? l.disabled ?? !1, f = a(e) ? v(e, {
12
- checked: l.checked ?? n,
13
- onChange: l.onChange ?? x,
14
- disabled: r,
15
- name: l.name ?? d,
16
- value: l.value ?? i
17
- }) : e;
18
- return /* @__PURE__ */ b("label", {
19
- className: s("m-0 inline-flex items-center gap-2 align-middle text-delta-800", r ? "cursor-default" : "cursor-pointer", g[m], c),
20
- style: u(p),
21
- children: [f, t != null && /* @__PURE__ */ h("span", {
22
- className: s("text-sm leading-5", r && "text-delta-300"),
23
- children: t
24
- })]
25
- });
26
- };
1
+ import { FormControlLabel as r } from "@mui/material";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ var i = ({ sx: o, ...l }) => /* @__PURE__ */ e(r, {
4
+ ...l,
5
+ sx: {
6
+ color: "var(--colors-delta-800)",
7
+ margin: 0,
8
+ "& .MuiFormControlLabel-label": {
9
+ fontSize: "14px",
10
+ lineHeight: "20px"
11
+ },
12
+ "&.Mui-disabled .MuiFormControlLabel-label": { color: "var(--colors-delta-300)" },
13
+ ...o
14
+ }
15
+ });
27
16
  export {
28
- L as StyledFormControlLabel
17
+ i as StyledFormControlLabel
29
18
  };
@@ -1,18 +1,6 @@
1
- import { resolveSx as x } from "../../helpers/sx.js";
2
- import f from "clsx";
3
- import { jsx as a } from "react/jsx-runtime";
4
- var v = ({ row: e, className: r, sx: l, style: o, children: s, classes: c, ...m }) => {
5
- const t = {
6
- ...x(l),
7
- ...o
8
- };
9
- return /* @__PURE__ */ a("div", {
10
- className: f("flex flex-wrap", e ? "flex-row" : "flex-col", r),
11
- style: t,
12
- ...m,
13
- children: s
14
- });
15
- };
1
+ import { FormGroup as o } from "@mui/material";
2
+ import { jsx as m } from "react/jsx-runtime";
3
+ var e = (r) => /* @__PURE__ */ m(o, { ...r });
16
4
  export {
17
- v as StyledFormGroup
5
+ e as StyledFormGroup
18
6
  };
@@ -1,14 +1,6 @@
1
- import { cn as i } from "../../helpers/cn.js";
2
- import { useFormControlContext as n } from "./FormControlContext.js";
3
- import { jsx as x } from "react/jsx-runtime";
4
- var f = ({ children: t, error: e, disabled: o, className: s, ...m }) => {
5
- const r = n(), a = e ?? r?.error ?? !1, l = o ?? r?.disabled ?? !1;
6
- return /* @__PURE__ */ x("p", {
7
- className: i("m-0 min-h-6 text-sm leading-6", a ? "text-error-500" : l ? "text-gray-300" : "text-delta-600", s),
8
- ...m,
9
- children: t
10
- });
11
- };
1
+ import { FormHelperText as e } from "@mui/material";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ var p = (r) => /* @__PURE__ */ o(e, { ...r });
12
4
  export {
13
- f as StyledFormHelperText
5
+ p as StyledFormHelperText
14
6
  };
@@ -1,22 +1,6 @@
1
- import { cn as m } from "../../helpers/cn.js";
2
- import { floatingLabelClass as u } from "../inputs/field-styles.js";
3
- import { useFormControlContext as b } from "./FormControlContext.js";
4
- import { jsxs as p } from "react/jsx-runtime";
5
- var q = ({ children: r, htmlFor: o, id: s, required: l, disabled: i, error: t, size: d, shrink: a, className: n }) => {
6
- const e = b(), f = a ?? (e ? e.focused || e.filled : !1), c = l ?? e?.required ?? !1;
7
- return /* @__PURE__ */ p("label", {
8
- htmlFor: o,
9
- id: s ?? e?.labelId,
10
- className: m(u({
11
- shrink: f,
12
- focused: e?.focused,
13
- error: t ?? e?.error,
14
- disabled: i ?? e?.disabled,
15
- size: d ?? e?.size
16
- }), n),
17
- children: [r, c && " *"]
18
- });
19
- };
1
+ import { InputLabel as t } from "@mui/material";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ var m = (r) => /* @__PURE__ */ o(t, { ...r });
20
4
  export {
21
- q as StyledInputLabel
5
+ m as StyledInputLabel
22
6
  };
@@ -1,44 +1,6 @@
1
- import { cn as s } from "../../../helpers/cn.js";
2
- import { resolveSx as n } from "../../../helpers/sx.js";
3
- import { useEffect as v } from "react";
4
- import { jsx as f, jsxs as x } from "react/jsx-runtime";
5
- import { FloatingPortal as p } from "@floating-ui/react";
6
- var w = {
7
- left: "inset-y-0 left-0 h-full",
8
- right: "inset-y-0 right-0 h-full",
9
- top: "inset-x-0 top-0 w-full",
10
- bottom: "inset-x-0 bottom-0 w-full"
11
- }, g = {
12
- left: "-translate-x-full",
13
- right: "translate-x-full",
14
- top: "-translate-y-full",
15
- bottom: "translate-y-full"
16
- }, D = ({ open: t = !1, onClose: l, anchor: o = "left", variant: m = "temporary", hideBackdrop: d, className: u, sx: c, PaperProps: a, children: y }) => {
17
- const e = m === "temporary";
18
- return v(() => {
19
- if (!t || !e) return;
20
- const r = (i) => {
21
- i.key === "Escape" && l?.(i, "escapeKeyDown");
22
- };
23
- return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
24
- }, [
25
- t,
26
- e,
27
- l
28
- ]), /* @__PURE__ */ x(p, { children: [e && !d && t && /* @__PURE__ */ f("div", {
29
- className: "fixed inset-0 z-[1200] bg-black/50",
30
- onClick: (r) => l?.(r, "backdropClick")
31
- }), /* @__PURE__ */ f("div", {
32
- role: e ? "dialog" : void 0,
33
- "aria-hidden": !t,
34
- className: s("fixed z-[1200] overflow-auto bg-white shadow-lg transition-transform duration-300", w[o], !t && s(g[o], "pointer-events-none"), u, a?.className),
35
- style: {
36
- ...n(c),
37
- ...n(a?.sx)
38
- },
39
- children: y
40
- })] });
41
- };
1
+ import { Drawer as o } from "@mui/material";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ var a = (r) => /* @__PURE__ */ e(o, { ...r });
42
4
  export {
43
- D as StyledDrawer
5
+ a as StyledDrawer
44
6
  };
@@ -1,13 +1,13 @@
1
- import { ClickAwayListener as p } from "../../mui-compat/ClickAwayListener.js";
2
- import { createContext as x, useContext as d, useEffect as b, useMemo as v, useState as m } from "react";
1
+ import { createContext as p, useContext as x, useEffect as d, useMemo as b, useState as v } from "react";
2
+ import { ClickAwayListener as m } from "@mui/material";
3
3
  import { jsx as s } from "react/jsx-runtime";
4
- var a = x(null), l = () => {
5
- const t = d(a);
4
+ var a = p(null), l = () => {
5
+ const t = x(a);
6
6
  if (!t) throw new Error("Listbox.Button/Options/Option must be rendered inside <Listbox>");
7
7
  return t;
8
8
  }, f = (t, e) => typeof t == "function" ? t(e) : t;
9
9
  function L({ value: t, onChange: e, children: r }) {
10
- const [o, n] = m(!1), u = v(() => ({
10
+ const [o, n] = v(!1), u = b(() => ({
11
11
  open: o,
12
12
  select: (i) => {
13
13
  e(i), n(!1);
@@ -19,7 +19,7 @@ function L({ value: t, onChange: e, children: r }) {
19
19
  t,
20
20
  e
21
21
  ]);
22
- return b(() => {
22
+ return d(() => {
23
23
  if (!o) return;
24
24
  const i = (c) => {
25
25
  c.key === "Escape" && n(!1);
@@ -27,7 +27,7 @@ function L({ value: t, onChange: e, children: r }) {
27
27
  return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
28
28
  }, [o]), /* @__PURE__ */ s(a.Provider, {
29
29
  value: u,
30
- children: /* @__PURE__ */ s(p, {
30
+ children: /* @__PURE__ */ s(m, {
31
31
  onClickAway: () => n(!1),
32
32
  children: /* @__PURE__ */ s("div", {
33
33
  className: "relative w-full",
@@ -1,31 +1,14 @@
1
- import { cn as y } from "../../../helpers/cn.js";
2
- import { StyledPopover as S } from "../../utils/popover/StyledPopover.js";
3
- import { StyledMenuList as f } from "./StyledMenuList.js";
4
- import { jsx as p } from "react/jsx-runtime";
5
- var u = {
6
- border: "1px solid var(--colors-delta-300)",
7
- boxShadow: "0px 2px 4px 0px rgba(34, 33, 51, 0.15)"
8
- }, M = ({ open: a, anchorEl: o, onClose: t, anchorOrigin: l, transformOrigin: m, id: d, className: s, sx: x, classes: e, slotProps: r, autoFocus: i = !0, onClick: c, children: n }) => /* @__PURE__ */ p(S, {
9
- open: a,
10
- anchorEl: o,
11
- onClose: t,
12
- anchorOrigin: l,
13
- transformOrigin: m,
14
- id: d,
15
- className: s,
16
- sx: x,
17
- slotProps: { paper: {
18
- className: y("rounded", e?.paper, r?.paper?.className),
19
- sx: [u, r?.paper?.sx],
20
- style: r?.paper?.style
21
- } },
22
- children: /* @__PURE__ */ p(f, {
23
- autoFocus: i,
24
- className: e?.list,
25
- onClick: c,
26
- children: n
27
- })
1
+ import e from "clsx";
2
+ import { Menu as r } from "@mui/material";
3
+ import { jsx as a } from "react/jsx-runtime";
4
+ var d = (s) => /* @__PURE__ */ a(r, {
5
+ ...s,
6
+ classes: {
7
+ paper: e("border border-solid border-delta-300 shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]", s.classes?.paper),
8
+ list: e("py-1", s.classes?.list),
9
+ ...s.classes
10
+ }
28
11
  });
29
12
  export {
30
- M as StyledMenu
13
+ d as StyledMenu
31
14
  };
@@ -1,20 +1,22 @@
1
- import { cn as a } from "../../../helpers/cn.js";
2
- import { resolveSx as s } from "../../../helpers/sx.js";
3
- import { jsx as y } from "react/jsx-runtime";
4
- var D = ({ children: n, onClick: o, disabled: e, selected: l, dense: i, className: m, classes: r, sx: d, "data-test": u, "data-testid": p, value: f }) => /* @__PURE__ */ y("li", {
5
- role: "menuitem",
6
- "aria-disabled": e ? !0 : void 0,
7
- tabIndex: -1,
8
- "data-test": u,
9
- "data-testid": p,
10
- onClick: e ? void 0 : o,
11
- onKeyDown: (t) => {
12
- e || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), o?.(t));
1
+ import o from "clsx";
2
+ import { MenuItem as t } from "@mui/material";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ var m = (e) => /* @__PURE__ */ r(t, {
5
+ ...e,
6
+ classes: {
7
+ selected: "bg-gama-50",
8
+ root: o("px-3 py-2.5 hover:bg-delta-50", e.classes?.root),
9
+ ...e.classes
13
10
  },
14
- className: a("flex items-center px-3 outline-none", i ? "py-1.5" : "py-2.5", e ? "cursor-not-allowed" : "cursor-pointer hover:bg-delta-50", l && a("bg-gama-50", r?.selected), r?.root, m),
15
- style: s(d),
16
- children: n
11
+ sx: {
12
+ "&.Mui-disabled": {
13
+ pointerEvents: "auto",
14
+ cursor: "not-allowed",
15
+ "&:hover": { backgroundColor: "transparent !important" }
16
+ },
17
+ ...e.sx
18
+ }
17
19
  });
18
20
  export {
19
- D as StyledMenuItem
21
+ m as StyledMenuItem
20
22
  };
@@ -1,34 +1,6 @@
1
- import { cn as y } from "../../../helpers/cn.js";
2
- import { useEffect as p, useRef as w } from "react";
3
- import { jsx as h } from "react/jsx-runtime";
4
- var i = (o) => o ? Array.from(o.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) : [], k = ({ children: o, className: s, autoFocus: f, disablePadding: u, onClick: m, onKeyDown: c }) => {
5
- const t = w(null);
6
- p(() => {
7
- f && i(t.current)[0]?.focus();
8
- }, [f]);
9
- const a = (e) => {
10
- if (c?.(e), ![
11
- "ArrowDown",
12
- "ArrowUp",
13
- "Home",
14
- "End"
15
- ].includes(e.key)) return;
16
- e.preventDefault();
17
- const r = i(t.current);
18
- if (r.length === 0) return;
19
- const l = r.findIndex((d) => d === document.activeElement);
20
- let n = l;
21
- e.key === "ArrowDown" ? n = (l + 1) % r.length : e.key === "ArrowUp" ? n = (l - 1 + r.length) % r.length : e.key === "Home" ? n = 0 : e.key === "End" && (n = r.length - 1), r[n]?.focus();
22
- };
23
- return /* @__PURE__ */ h("ul", {
24
- ref: t,
25
- role: "menu",
26
- className: y("m-0 list-none outline-none", u ? "py-0" : "py-1", s),
27
- onClick: m,
28
- onKeyDown: a,
29
- children: o
30
- });
31
- };
1
+ import { MenuList as t } from "@mui/material";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ var m = (r) => /* @__PURE__ */ o(t, { ...r });
32
4
  export {
33
- k as StyledMenuList
5
+ m as StyledMenuList
34
6
  };