asma-ui-core 3.34.0 → 3.36.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 (198) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/data-display/badge/StyledBadge.js +29 -24
  3. package/dist/components/data-display/chip/StyledChip.js +45 -60
  4. package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +32 -38
  5. package/dist/components/data-display/tooltip/StyledTooltip.js +50 -33
  6. package/dist/components/data-display/typography/StyledTypography.js +62 -4
  7. package/dist/components/feedback/dialog/StyledDialog.js +70 -50
  8. package/dist/components/feedback/dialog/StyledDialog.module.js +2 -9
  9. package/dist/components/feedback/dialog/StyledDialogActions.js +16 -16
  10. package/dist/components/feedback/dialog/StyledDialogContent.js +17 -14
  11. package/dist/components/feedback/dialog/StyledDialogTitle.js +18 -13
  12. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +56 -57
  13. package/dist/components/feedback/snack-bar/StyledAlert.js +72 -14
  14. package/dist/components/feedback/snack-bar/StyledSnackbar.js +34 -8
  15. package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.js +33 -34
  16. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +55 -58
  17. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -12
  18. package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +1 -1
  19. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +1 -1
  20. package/dist/components/inputs/field-styles.js +6 -0
  21. package/dist/components/inputs/input-field/StyledInputField.js +104 -81
  22. package/dist/components/inputs/input-field/StyledInputField.module.js +4 -0
  23. package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +6 -0
  24. package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +40 -29
  25. package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
  26. package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +35 -23
  27. package/dist/components/inputs/select/StyledSelect.js +124 -45
  28. package/dist/components/inputs/select/StyledSelectItem.js +19 -23
  29. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +181 -151
  30. package/dist/components/inputs/slider/StyledSlider.js +78 -52
  31. package/dist/components/inputs/slider/StyledSlider.module.js +10 -0
  32. package/dist/components/inputs/switch/base-ui/StyledSwitch.js +44 -39
  33. package/dist/components/miscellaneous/FormControlContext.js +6 -0
  34. package/dist/components/miscellaneous/StyledFormControl.js +39 -21
  35. package/dist/components/miscellaneous/StyledFormControlLabel.js +27 -16
  36. package/dist/components/miscellaneous/StyledFormGroup.js +16 -4
  37. package/dist/components/miscellaneous/StyledFormHelperText.js +12 -4
  38. package/dist/components/miscellaneous/StyledInputLabel.js +20 -4
  39. package/dist/components/mui-compat/Avatar.js +29 -0
  40. package/dist/components/mui-compat/ClickAwayListener.js +29 -0
  41. package/dist/components/mui-compat/Container.js +24 -0
  42. package/dist/components/mui-compat/Fade.js +29 -0
  43. package/dist/components/mui-compat/Fade.module.js +9 -0
  44. package/dist/components/mui-compat/FormLabel.js +22 -0
  45. package/dist/components/mui-compat/Paper.js +44 -0
  46. package/dist/components/mui-compat/Popper.js +35 -0
  47. package/dist/components/mui-compat/Skeleton.js +26 -0
  48. package/dist/components/mui-compat/Stack.js +24 -0
  49. package/dist/components/navigation/drawer/StyledDrawer.js +42 -4
  50. package/dist/components/navigation/listbox/Listbox.js +7 -7
  51. package/dist/components/navigation/menu/StyledMenu.js +28 -11
  52. package/dist/components/navigation/menu/StyledMenuItem.js +16 -18
  53. package/dist/components/navigation/menu/StyledMenuList.js +32 -4
  54. package/dist/components/navigation/tabs/StyledTab.js +25 -13
  55. package/dist/components/navigation/tabs/StyledTabs.js +112 -64
  56. package/dist/components/navigation/tabs/TabsContext.js +6 -0
  57. package/dist/components/utils/accordion/base-ui/AccordionContext.js +10 -0
  58. package/dist/components/utils/accordion/base-ui/StyledAccordion.js +28 -21
  59. package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +7 -7
  60. package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +28 -14
  61. package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +31 -27
  62. package/dist/components/utils/popover/StyledPopover.js +44 -15
  63. package/dist/datetime/components/date-picker/StyledDatePicker.js +6 -6
  64. package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +1 -1
  65. package/dist/datetime/components/date-picker/components/HelperTextWithTooltip.js +6 -6
  66. package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +11 -11
  67. package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +13 -14
  68. package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +14 -14
  69. package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +6 -6
  70. package/dist/datetime/components/date-picker/components/StyledDayPicker.js +4 -5
  71. package/dist/datetime/components/date-picker/hooks/useDatePickerMask.js +4 -4
  72. package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
  73. package/dist/datetime/components/time-picker/TimePickerInput.js +15 -16
  74. package/dist/datetime/components/time-picker/TimePickerPopper.js +21 -19
  75. package/dist/datetime/helpers/cn.js +4 -5
  76. package/dist/helpers/arrays.js +4 -0
  77. package/dist/helpers/cn.js +4 -5
  78. package/dist/helpers/inputMask.js +45 -0
  79. package/dist/helpers/sx.js +46 -0
  80. package/dist/index.js +183 -175
  81. package/dist/src/api-surface.test.d.ts +1 -0
  82. package/dist/src/components/data-display/badge/StyledBadge.d.ts +26 -2
  83. package/dist/src/components/data-display/chip/StyledChip.d.ts +39 -5
  84. package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +11 -4
  85. package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +36 -2
  86. package/dist/src/components/data-display/typography/StyledTypography.d.ts +19 -1
  87. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +50 -4
  88. package/dist/src/components/feedback/dialog/StyledDialogActions.d.ts +12 -2
  89. package/dist/src/components/feedback/dialog/StyledDialogContent.d.ts +12 -2
  90. package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +10 -2
  91. package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
  92. package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +24 -2
  93. package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
  94. package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +21 -2
  95. package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +1 -1
  96. package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +1 -1
  97. package/dist/src/components/feedback/snack-bar/components/types.d.ts +1 -1
  98. package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +9 -4
  99. package/dist/src/components/inputs/dynamic-select/types.d.ts +2 -2
  100. package/dist/src/components/inputs/field-styles.d.ts +22 -0
  101. package/dist/src/components/inputs/input-field/StyledInputField.d.ts +67 -11
  102. package/dist/src/components/inputs/input-field/index.d.ts +1 -1
  103. package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +10 -0
  104. package/dist/src/components/inputs/radio-button/base-ui/StyledRadio.d.ts +20 -5
  105. package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +24 -7
  106. package/dist/src/components/inputs/select/StyledSelect.d.ts +39 -16
  107. package/dist/src/components/inputs/select/StyledSelectItem.d.ts +14 -2
  108. package/dist/src/components/inputs/select/index.d.ts +0 -1
  109. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +88 -17
  110. package/dist/src/components/inputs/slider/StyledSlider.d.ts +55 -3
  111. package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +20 -4
  112. package/dist/src/components/miscellaneous/FormControlContext.d.ts +14 -0
  113. package/dist/src/components/miscellaneous/StyledFormControl.d.ts +22 -2
  114. package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +21 -2
  115. package/dist/src/components/miscellaneous/StyledFormGroup.d.ts +11 -2
  116. package/dist/src/components/miscellaneous/StyledFormHelperText.d.ts +12 -2
  117. package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +20 -2
  118. package/dist/src/components/mui-compat/Avatar.d.ts +6 -0
  119. package/dist/src/components/mui-compat/ClickAwayListener.d.ts +19 -0
  120. package/dist/src/components/mui-compat/Container.d.ts +6 -0
  121. package/dist/src/components/mui-compat/Fade.d.ts +21 -0
  122. package/dist/src/components/mui-compat/FormLabel.d.ts +6 -0
  123. package/dist/src/components/mui-compat/Paper.d.ts +6 -0
  124. package/dist/src/components/mui-compat/Popper.d.ts +29 -0
  125. package/dist/src/components/mui-compat/Skeleton.d.ts +7 -0
  126. package/dist/src/components/mui-compat/Stack.d.ts +7 -0
  127. package/dist/src/components/mui-compat/index.d.ts +9 -0
  128. package/dist/src/components/mui-compat/types.d.ts +46 -0
  129. package/dist/src/components/navigation/drawer/StyledDrawer.d.ts +28 -2
  130. package/dist/src/components/navigation/menu/StyledMenu.d.ts +33 -2
  131. package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +23 -2
  132. package/dist/src/components/navigation/menu/StyledMenuList.d.ts +16 -2
  133. package/dist/src/components/navigation/menu/index.d.ts +0 -1
  134. package/dist/src/components/navigation/tabs/StyledTab.d.ts +17 -3
  135. package/dist/src/components/navigation/tabs/StyledTabs.d.ts +16 -7
  136. package/dist/src/components/navigation/tabs/TabsContext.d.ts +11 -0
  137. package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +10 -0
  138. package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +9 -3
  139. package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +5 -0
  140. package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +8 -4
  141. package/dist/src/components/utils/copy-wrapper/CopyWrapper.d.ts +1 -1
  142. package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -2
  143. package/dist/src/components/utils/popover/StyledPopover.d.ts +32 -2
  144. package/dist/src/datetime/components/date-picker/components/StyledCalendarPicker.d.ts +1 -1
  145. package/dist/src/datetime/components/date-picker/components/StyledDayPicker.d.ts +1 -1
  146. package/dist/src/datetime/components/date-picker/hooks/useDatePickerMask.d.ts +1 -2
  147. package/dist/src/datetime/components/time-picker/TimePickerInput.d.ts +1 -1
  148. package/dist/src/datetime/components/time-picker/TimePickerPopper.d.ts +1 -1
  149. package/dist/src/datetime/components/time-picker/types.d.ts +1 -2
  150. package/dist/src/datetime/shared-components/StyledFormControl.d.ts +1 -2
  151. package/dist/src/datetime/shared-components/StyledInputField.d.ts +1 -12
  152. package/dist/src/datetime/shared-components/StyledSelect.d.ts +1 -16
  153. package/dist/src/datetime/shared-components/StyledSelectItem.d.ts +1 -2
  154. package/dist/src/datetime/shared-components/StyledTooltip.d.ts +1 -2
  155. package/dist/src/helpers/arrays.d.ts +2 -0
  156. package/dist/src/helpers/arrays.test.d.ts +1 -0
  157. package/dist/src/helpers/inputMask.d.ts +29 -0
  158. package/dist/src/helpers/inputMask.test.d.ts +1 -0
  159. package/dist/src/helpers/sx.d.ts +2 -0
  160. package/dist/src/helpers/sx.test.d.ts +1 -0
  161. package/dist/src/index.d.ts +1 -1
  162. package/dist/src/table/shared-components/StyledCheckbox.d.ts +7 -4
  163. package/dist/src/table/shared-components/StyledMenuItem.d.ts +18 -2
  164. package/dist/src/table/shared-components/menu-item/index.d.ts +13 -2
  165. package/dist/src/table/shared-components/tooltip/index.d.ts +5 -1
  166. package/dist/src/table/types.d.ts +1 -1
  167. package/dist/table/components/Fetching.js +4 -4
  168. package/dist/table/components/TableRow.js +7 -7
  169. package/dist/table/components/TableSkeleton.js +6 -6
  170. package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +24 -24
  171. package/dist/table/components/columns/action-column/components/RowActionMenu.js +26 -25
  172. package/dist/table/components/table-footer/TablePagination.js +27 -24
  173. package/dist/table/components/table-footer/TableRowCountSelect.js +30 -27
  174. package/dist/table/helpers/cn.js +4 -5
  175. package/dist/table/shared-components/StyledCheckbox.js +54 -55
  176. package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
  177. package/dist/table/shared-components/StyledMenuItem.js +12 -18
  178. package/dist/table/shared-components/menu-item/index.js +13 -17
  179. package/dist/table/shared-components/tooltip/index.js +4 -23
  180. package/package.json +9 -16
  181. package/dist/components/feedback/dialog/StyledDialogActions.module.js +0 -8
  182. package/dist/components/feedback/dialog/StyledDialogContent.module.js +0 -4
  183. package/dist/components/feedback/dialog/StyledDialogTitle.module.js +0 -4
  184. package/dist/components/inputs/checkbox/StyledCheckbox.js +0 -20
  185. package/dist/components/inputs/radio-button/StyledRadio.js +0 -17
  186. package/dist/datetime/shared-components/ExpandIcon.js +0 -18
  187. package/dist/datetime/shared-components/StyledFormControl.js +0 -23
  188. package/dist/datetime/shared-components/StyledInputField.js +0 -47
  189. package/dist/datetime/shared-components/StyledSelect.js +0 -47
  190. package/dist/datetime/shared-components/StyledSelectItem.js +0 -13
  191. package/dist/datetime/shared-components/StyledTooltip.js +0 -32
  192. package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +0 -4
  193. package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +0 -4
  194. package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +0 -4
  195. package/dist/src/components/inputs/switch/StyledSwitch.d.ts +0 -5
  196. package/dist/src/components/utils/accordion/StyledAccordion.d.ts +0 -2
  197. package/dist/src/components/utils/accordion/StyledAccordionDetails.d.ts +0 -2
  198. package/dist/src/components/utils/accordion/StyledAccordionSummary.d.ts +0 -8
@@ -1,21 +1,20 @@
1
1
  import { cn as C } from "../../../../helpers/cn.js";
2
2
  import e from "./StyledCheckbox.module.js";
3
- import p, { useEffect as L } from "react";
4
- import { jsx as t, jsxs as k } from "react/jsx-runtime";
5
- import { Checkbox as f } from "@base-ui/react/checkbox";
6
- var H = (n) => /* @__PURE__ */ k("svg", {
3
+ import E, { useEffect as m, useRef as f } from "react";
4
+ import { jsx as o, jsxs as k } from "react/jsx-runtime";
5
+ var H = (t) => /* @__PURE__ */ k("svg", {
7
6
  viewBox: "0 0 24 24",
8
7
  width: "100%",
9
8
  height: "100%",
10
9
  fill: "none",
11
- ...n,
12
- children: [/* @__PURE__ */ t("title", { children: "Indeterminate icon" }), /* @__PURE__ */ t("path", {
10
+ ...t,
11
+ children: [/* @__PURE__ */ o("title", { children: "Indeterminate icon" }), /* @__PURE__ */ o("path", {
13
12
  d: "M6 12H18",
14
13
  stroke: "currentColor",
15
- strokeWidth: n.strokeWidth ?? 3,
14
+ strokeWidth: t.strokeWidth ?? 3,
16
15
  strokeLinecap: "round"
17
16
  })]
18
- }), j = (n) => /* @__PURE__ */ k("svg", {
17
+ }), j = (t) => /* @__PURE__ */ k("svg", {
19
18
  viewBox: "0 0 24 24",
20
19
  width: "100%",
21
20
  height: "100%",
@@ -24,58 +23,56 @@ var H = (n) => /* @__PURE__ */ k("svg", {
24
23
  strokeWidth: 2,
25
24
  strokeLinecap: "round",
26
25
  strokeLinejoin: "round",
27
- ...n,
28
- children: [/* @__PURE__ */ t("title", { children: "Check icon" }), /* @__PURE__ */ t("path", { d: "M4 12l5 5L20 6" })]
29
- }), _ = ({ dataTest: n, size: h = "medium", disabled: m, readOnly: c, indeterminate: a = !1, checked: x, disableRipple: b, hideWrapper: v, className: I, checkboxClassName: R, onChange: u, ...i }) => {
30
- const s = !!v, l = !b && !s && !m && !c, g = C(e.CheckboxWrapper, !s && e[`size-${h}`], s && e.HideWrapper, a && e.Indeterminate, c && e.ReadOnly, l && e.CheckboxHover, I), w = C(e.Checkbox, e[`size-${h}`], a && e.Indeterminate, R), W = a ? H : j, d = p.useRef(null), N = p.useCallback((o) => {
31
- if (o.stopPropagation(), !l) return;
32
- const r = document.createElement("span");
33
- e.CheckboxRipple && (r.className = e.CheckboxRipple), r.addEventListener("animationend", () => {
34
- r.remove();
35
- }, { once: !0 }), d.current?.appendChild(r);
36
- }, [l]);
37
- L(() => {
38
- const o = d.current;
39
- return () => {
40
- o?.replaceChildren();
41
- };
42
- }, []);
43
- const E = p.useCallback((o) => {
44
- if (c) return;
45
- const r = { target: {
46
- name: i.name,
47
- value: i.value,
48
- checked: o
49
- } };
50
- u?.(r, o);
51
- }, [
52
- u,
53
- i.name,
54
- i.value,
55
- c
56
- ]);
57
- return /* @__PURE__ */ k(f.Root, {
58
- className: g,
59
- "data-testid": n,
60
- checked: x,
61
- disabled: m,
62
- readOnly: c,
63
- indeterminate: a,
64
- onPointerDown: N,
65
- onCheckedChange: E,
66
- ...i,
67
- children: [!s && l && /* @__PURE__ */ t("span", {
68
- ref: d,
69
- className: e.CheckboxRippleContainer
70
- }), /* @__PURE__ */ t("span", {
71
- className: w,
72
- children: /* @__PURE__ */ t(f.Indicator, {
73
- className: e.Indicator,
74
- children: /* @__PURE__ */ t(W, { strokeWidth: h === "small" ? 3 : 2 })
26
+ ...t,
27
+ children: [/* @__PURE__ */ o("title", { children: "Check icon" }), /* @__PURE__ */ o("path", { d: "M4 12l5 5L20 6" })]
28
+ }), S = ({ dataTest: t, size: l = "medium", disabled: d, readOnly: c, indeterminate: n = !1, checked: h, disableRipple: x, hideWrapper: b, className: v, checkboxClassName: g, onChange: R, ...I }) => {
29
+ const a = !!b, i = !x && !a && !d && !c, p = f(null), u = f(null);
30
+ m(() => {
31
+ p.current && (p.current.indeterminate = n);
32
+ }, [n]);
33
+ const w = C(e.CheckboxWrapper, !a && e[`size-${l}`], a && e.HideWrapper, n && e.Indeterminate, c && e.ReadOnly, i && e.CheckboxHover, v), N = C(e.Checkbox, e[`size-${l}`], n && e.Indeterminate, g), W = n ? H : j, L = E.useCallback((r) => {
34
+ if (r.stopPropagation(), !i) return;
35
+ const s = document.createElement("span");
36
+ e.CheckboxRipple && (s.className = e.CheckboxRipple), s.addEventListener("animationend", () => s.remove(), { once: !0 }), u.current?.appendChild(s);
37
+ }, [i]);
38
+ return m(() => {
39
+ const r = u.current;
40
+ return () => r?.replaceChildren();
41
+ }, []), /* @__PURE__ */ k("label", {
42
+ className: w,
43
+ "data-testid": t,
44
+ onPointerDown: L,
45
+ "data-checked": h && !n ? "" : void 0,
46
+ "data-unchecked": !h && !n ? "" : void 0,
47
+ "data-indeterminate": n ? "" : void 0,
48
+ "data-disabled": d ? "" : void 0,
49
+ children: [
50
+ /* @__PURE__ */ o("input", {
51
+ ref: p,
52
+ type: "checkbox",
53
+ className: "sr-only",
54
+ checked: h,
55
+ disabled: d,
56
+ readOnly: c,
57
+ onChange: (r) => {
58
+ c || R?.(r, r.target.checked);
59
+ },
60
+ ...I
61
+ }),
62
+ !a && i && /* @__PURE__ */ o("span", {
63
+ ref: u,
64
+ className: e.CheckboxRippleContainer
65
+ }),
66
+ /* @__PURE__ */ o("span", {
67
+ className: N,
68
+ children: /* @__PURE__ */ o("span", {
69
+ className: e.Indicator,
70
+ children: /* @__PURE__ */ o(W, { strokeWidth: l === "small" ? 3 : 2 })
71
+ })
75
72
  })
76
- })]
73
+ ]
77
74
  });
78
75
  };
79
76
  export {
80
- _ as StyledCheckbox
77
+ S as StyledCheckbox
81
78
  };
@@ -1,17 +1,17 @@
1
- var e = "_CheckboxWrapper_g6yr1_1", r = "_Checkbox_g6yr1_1", _ = "_Indeterminate_g6yr1_28", a = "_ReadOnly_g6yr1_55", p = "_Indicator_g6yr1_64", i = "_HideWrapper_g6yr1_68", o = "_CheckboxHover_g6yr1_75", l = "_CheckboxRippleContainer_g6yr1_75", y = "_CheckboxRipple_g6yr1_75", d = "_ripple_g6yr1_1", c = {
1
+ var e = "_CheckboxWrapper_18wnv_1", _ = "_Checkbox_18wnv_1", r = "_Indeterminate_18wnv_28", a = "_ReadOnly_18wnv_55", v = "_Indicator_18wnv_64", n = "_HideWrapper_18wnv_68", p = "_CheckboxHover_18wnv_75", i = "_CheckboxRippleContainer_18wnv_75", o = "_CheckboxRipple_18wnv_75", l = "_ripple_18wnv_1", d = {
2
2
  CheckboxWrapper: e,
3
- "size-small": "_size-small_g6yr1_11",
4
- "size-medium": "_size-medium_g6yr1_15",
5
- Checkbox: r,
6
- Indeterminate: _,
3
+ "size-small": "_size-small_18wnv_11",
4
+ "size-medium": "_size-medium_18wnv_15",
5
+ Checkbox: _,
6
+ Indeterminate: r,
7
7
  ReadOnly: a,
8
- Indicator: p,
9
- HideWrapper: i,
10
- CheckboxHover: o,
11
- CheckboxRippleContainer: l,
12
- CheckboxRipple: y,
13
- ripple: d
8
+ Indicator: v,
9
+ HideWrapper: n,
10
+ CheckboxHover: p,
11
+ CheckboxRippleContainer: i,
12
+ CheckboxRipple: o,
13
+ ripple: l
14
14
  };
15
15
  export {
16
- c as default
16
+ d as default
17
17
  };
@@ -6,7 +6,7 @@ import { StyledInteractiveChip as O } from "../../../data-display/interactive-ch
6
6
  import { StyledTooltip as J } from "../../../data-display/tooltip/StyledTooltip.js";
7
7
  import { StyledButton as M } from "../../button/StyledButton.js";
8
8
  import { useWrap as P } from "../helpers/useWrap.js";
9
- import { Skeleton as y } from "../../../../index.js";
9
+ import { Skeleton as y } from "../../../mui-compat/Skeleton.js";
10
10
  import { forwardRef as Q } from "react";
11
11
  import { jsx as t, jsxs as v } from "react/jsx-runtime";
12
12
  var ie = Q((S, I) => {
@@ -3,8 +3,8 @@ import { LoadingIcon as Q } from "../../../icons/loading-icon/LoadingIcon.js";
3
3
  import { CheckIcon as U } from "../../../icons/check-icon/CheckIcon.js";
4
4
  import { PlusIconCircle as X } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
5
5
  import { StyledChip as D } from "../../../data-display/chip/StyledChip.js";
6
- import { StyledTooltip as j } from "../../../data-display/tooltip/StyledTooltip.js";
7
6
  import { StyledCheckbox as Y } from "../../checkbox/base-ui/StyledCheckbox.js";
7
+ import { StyledTooltip as j } from "../../../data-display/tooltip/StyledTooltip.js";
8
8
  import { StyledInputField as Z } from "../../input-field/StyledInputField.js";
9
9
  import { StyledSelectAutocomplete as ee } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
10
  import { DynamicInteractiveChipGroup as te } from "./DynamicInteractiveChipGroup.js";
@@ -0,0 +1,6 @@
1
+ import { cn as a } from "../../helpers/cn.js";
2
+ var n = ({ focused: e, error: t, disabled: r, readOnly: o }) => a("pointer-events-none absolute inset-0 rounded-lg border transition-colors", r ? "border-delta-300" : o ? "border-delta-200" : t ? "border-2 border-error-500" : e ? "border-2 border-gama-400" : "border-delta-500 group-hover:border-2 group-hover:border-delta-300"), s = ({ shrink: e, focused: t, error: r, disabled: o, size: l = "medium" }) => a("pointer-events-none absolute left-3 z-10 max-w-[calc(100%-1.5rem)] truncate transition-all duration-150", o ? "text-gray-300" : r ? "text-error-500" : t ? "text-gama-500" : e ? "text-delta-800" : "text-delta-500", e ? "top-0 -translate-y-1/2 bg-white px-1 text-xs" : a("top-1/2 -translate-y-1/2", l === "small" ? "text-sm" : "text-base"));
3
+ export {
4
+ s as floatingLabelClass,
5
+ n as outlineClass
6
+ };
@@ -1,90 +1,113 @@
1
- import { CloseIcon as m } from "../../icons/close-icon/CloseIcon.js";
2
- import { ErrorOutlineIcon as b } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
3
- import { TextField as M } from "@mui/material";
4
- import { jsx as r, jsxs as f } from "react/jsx-runtime";
5
- var x = ({ allowClear: u, onClear: s, readOnly: t, disabled: d, error: e, helperText: a, dataTest: p, slotProps: i, ...o }) => {
6
- const c = (d ?? !1) || (t ?? !1), l = i?.input;
7
- return /* @__PURE__ */ r(M, {
8
- ...o,
9
- "data-testid": p,
10
- disabled: c,
11
- error: e,
12
- helperText: t ? null : e ? /* @__PURE__ */ f("span", {
13
- className: "flex items-start gap-1",
14
- children: [/* @__PURE__ */ r(b, {
15
- width: 20,
16
- height: 20,
17
- className: "min-w-5 shrink-0 translate-y-[2px]"
18
- }), /* @__PURE__ */ r("span", {
19
- className: "min-w-0 flex-1",
20
- children: a ?? "Required"
21
- })]
22
- }) : a,
23
- type: o.type ?? "mui-input",
24
- slotProps: {
25
- ...i,
26
- input: {
27
- ...l,
28
- endAdornment: u && o.value ? /* @__PURE__ */ r("div", {
1
+ import { cn as i } from "../../../helpers/cn.js";
2
+ import { resolveSx as g } from "../../../helpers/sx.js";
3
+ import { CloseIcon as se } from "../../icons/close-icon/CloseIcon.js";
4
+ import { ErrorOutlineIcon as oe } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
5
+ import { floatingLabelClass as ie, outlineClass as re } from "../field-styles.js";
6
+ import de from "./StyledInputField.module.js";
7
+ import { useId as ce, useState as L } from "react";
8
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
9
+ var ye = ({ dataTest: d, label: N, value: s, defaultValue: c, onChange: E, onBlur: U, onFocus: D, error: l, helperText: m, disabled: u, readOnly: a, required: v, allowClear: V, onClear: $, type: q = "text", placeholder: b, name: z, id: G, autoComplete: J, autoFocus: K, multiline: C, rows: M, minRows: Q, maxRows: me, size: f = "medium", fullWidth: W, className: X, style: Y, sx: Z, inputRef: T, slotProps: n, InputProps: w, onKeyDown: O, variant: ue }) => {
10
+ const P = ce(), I = G ?? P, [h, y] = L(!1), [ee, B] = L(c != null && c !== ""), p = s !== void 0, R = p ? s !== "" && s != null : ee, S = !!u || !!a, o = n?.input?.startAdornment ?? w?.startAdornment, x = n?.input?.endAdornment ?? w?.endAdornment, F = !!(V && R && !S), { ref: te, ...ne } = n?.htmlInput ?? {}, A = T ?? te, { className: le, style: _, ref: ae } = n?.input ?? {}, j = h || R || !!b || !!o, k = {
11
+ ...ne,
12
+ id: I,
13
+ name: z,
14
+ placeholder: j ? b : void 0,
15
+ disabled: S,
16
+ readOnly: a,
17
+ required: v,
18
+ autoComplete: J,
19
+ autoFocus: K,
20
+ value: s,
21
+ defaultValue: c,
22
+ "aria-invalid": l ? !0 : void 0,
23
+ onChange: (e) => {
24
+ a || (p || B(e.target.value !== ""), E?.(e));
25
+ },
26
+ onFocus: (e) => {
27
+ y(!0), D?.(e);
28
+ },
29
+ onBlur: (e) => {
30
+ y(!1), U?.(e);
31
+ },
32
+ onKeyDown: O
33
+ }, H = i(de.Input, "peer w-full rounded-lg bg-transparent text-delta-800 outline-none placeholder:text-delta-500", "disabled:text-delta-300", a && "bg-delta-10 text-delta-800", f === "small" ? "text-sm" : "text-base", C ? "resize-none px-3 py-2" : f === "small" ? "h-9 px-3" : "h-12 px-3", o && "pl-10", (F || !!x) && "pr-10", le);
34
+ return /* @__PURE__ */ r("div", {
35
+ className: i("group relative inline-flex flex-col", W && "w-full", X),
36
+ style: {
37
+ ...g(Z),
38
+ ...Y
39
+ },
40
+ children: [/* @__PURE__ */ r("div", {
41
+ className: "relative flex items-center",
42
+ ref: ae,
43
+ children: [
44
+ C ? /* @__PURE__ */ t("textarea", {
45
+ ...k,
46
+ ref: A,
47
+ "data-testid": d,
48
+ rows: M ?? Q ?? 3,
49
+ className: H,
50
+ style: _
51
+ }) : /* @__PURE__ */ t("input", {
52
+ ...k,
53
+ ref: A,
54
+ "data-testid": d,
55
+ type: q,
56
+ className: H,
57
+ style: _
58
+ }),
59
+ N && /* @__PURE__ */ r("label", {
60
+ htmlFor: I,
61
+ className: i(ie({
62
+ shrink: j,
63
+ focused: h,
64
+ error: l,
65
+ disabled: u,
66
+ size: f
67
+ }), n?.inputLabel?.className),
68
+ style: g(n?.inputLabel?.sx),
69
+ children: [N, v && " *"]
70
+ }),
71
+ o && /* @__PURE__ */ t("span", {
72
+ className: "absolute left-3 flex items-center text-delta-500",
73
+ children: o
74
+ }),
75
+ F ? /* @__PURE__ */ t("div", {
29
76
  role: "button",
30
- className: "absolute right-4 z-40 flex items-center justify-center rounded-full p-[2px] duration-300 hover:bg-gama-100",
31
- onClick: (n) => {
32
- n.stopPropagation(), n.preventDefault(), s?.();
77
+ "data-testid": `${d}-clear`,
78
+ className: "absolute right-3 z-40 flex items-center justify-center rounded-full p-[2px] duration-300 hover:bg-gama-100",
79
+ onClick: (e) => {
80
+ e.stopPropagation(), e.preventDefault(), p || B(!1), $?.();
33
81
  },
34
- children: /* @__PURE__ */ r(m, {
82
+ children: /* @__PURE__ */ t(se, {
35
83
  width: 18,
36
84
  height: 18
37
85
  })
38
- }) : l?.endAdornment
39
- }
40
- },
41
- sx: {
42
- "& input:-webkit-autofill, & .MuiInputBase-root:has(> input:-webkit-autofill)": { backgroundColor: "#e8f0fe !important" },
43
- "& input": { backgroundColor: "transparent" },
44
- "& .MuiInputBase-root": { backgroundColor: "transparent" },
45
- "& .MuiInputBase-colorPrimary fieldset": { borderColor: "var(--colors-delta-500) !important" },
46
- "& .MuiInputBase-colorPrimary.Mui-focused fieldset": { borderColor: "var(--colors-gama-400) !important" },
47
- "& .MuiInputBase-colorPrimary.Mui-focused::after": { borderColor: "var(--colors-gama-400) !important" },
48
- "& .MuiInputBase-colorPrimary.Mui-focused:hover fieldset": { borderColor: "var(--colors-gama-400) !important" },
49
- "& .MuiInputBase-colorPrimary:hover fieldset": {
50
- borderColor: "var(--colors-gama-300) !important",
51
- borderWidth: "2px !important"
52
- },
53
- "& .MuiInputBase-colorPrimary.Mui-disabled:hover fieldset": { borderWidth: "1px !important" },
54
- "& .MuiInputBase-colorPrimary.Mui-error fieldset": { borderColor: "var(--colors-error-500) !important" },
55
- "& .MuiInputBase-colorPrimary.Mui-error:hover fieldset": { borderColor: "var(--colors-error-500) !important" },
56
- "& .MuiFormHelperText-root": {
57
- fontSize: "14px",
58
- lineHeight: "24px",
59
- minHeight: "24px",
60
- marginLeft: 0,
61
- whiteSpace: "normal",
62
- wordBreak: "break-word"
63
- },
64
- "& .MuiFormHelperText-root.Mui-error": { color: "var(--colors-error-500) !important" },
65
- "& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-300) !important" },
66
- "& label.Mui-focused": { color: "var(--colors-gama-500) !important" },
67
- "& label.Mui-error": { color: "var(--colors-error-500) !important" },
68
- "& label.Mui-focused.MuiInputLabel-shrink": { color: "var(--colors-gama-500) !important" },
69
- "& label.Mui-error.MuiInputLabel-shrink": { color: "var(--colors-error-500) !important" },
70
- "& label": { color: "var(--colors-delta-500) !important" },
71
- "& label.MuiInputLabel-shrink": { color: "var(--colors-delta-800) !important" },
72
- "& label.Mui-disabled": { color: "var(--colors-gray-300) !important" },
73
- "& .MuiOutlinedInput-input::placeholder": {
74
- color: "var(--colors-delta-500) !important",
75
- opacity: "1 !important"
76
- },
77
- "& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-300) !important" },
78
- ...t && {
79
- "& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-800) !important" },
80
- "& .MuiInputBase-colorPrimary.Mui-disabled": { backgroundColor: "var(--colors-delta-10) !important" },
81
- "& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-200) !important" },
82
- "& label.Mui-disabled": { color: "var(--colors-gray-800) !important" }
83
- },
84
- ...o.sx
85
- }
86
+ }) : x && /* @__PURE__ */ t("span", {
87
+ className: "absolute right-3 flex items-center",
88
+ children: x
89
+ }),
90
+ /* @__PURE__ */ t("div", { className: re({
91
+ focused: h,
92
+ error: l,
93
+ disabled: u,
94
+ readOnly: a
95
+ }) })
96
+ ]
97
+ }), !a && m != null && /* @__PURE__ */ r("p", {
98
+ className: i("m-0 min-h-6 text-sm leading-6", l ? "flex items-start gap-1 text-error-500" : "text-delta-600", n?.formHelperText?.className),
99
+ style: g(n?.formHelperText?.sx),
100
+ children: [l && /* @__PURE__ */ t(oe, {
101
+ width: 20,
102
+ height: 20,
103
+ className: "min-w-5 shrink-0 translate-y-[2px]"
104
+ }), /* @__PURE__ */ t("span", {
105
+ className: "min-w-0 flex-1",
106
+ children: l ? m || "Required" : m
107
+ })]
108
+ })]
86
109
  });
87
110
  };
88
111
  export {
89
- x as StyledInputField
112
+ ye as StyledInputField
90
113
  };
@@ -0,0 +1,4 @@
1
+ var t = "_Input_pr4mt_1", e = { Input: t };
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,6 @@
1
+ import { createContext as o, useContext as t } from "react";
2
+ var e = o(null), a = () => t(e);
3
+ export {
4
+ e as RadioGroupContext,
5
+ a as useRadioGroupContext
6
+ };
@@ -1,35 +1,46 @@
1
- import { cn as n } from "../../../../helpers/cn.js";
1
+ import { cn as p } from "../../../../helpers/cn.js";
2
2
  import e from "./StyledRadio.module.js";
3
- import { forwardRef as N, useCallback as h, useRef as w } from "react";
4
- import { jsx as o, jsxs as x } from "react/jsx-runtime";
5
- import { Radio as i } from "@base-ui/react/radio";
6
- var I = N(({ value: s, dataTest: l, className: d, size: t = "medium", error: p, disabled: m, ...c }, R) => {
7
- const u = n(e.RadioWrapper, e.RadioHover, t === "small" && e["size-small"], d, p && e.Error), f = n(e.Radio, t === "small" && e["size-small"]), r = w(null), v = h((C) => {
8
- if (C.stopPropagation(), !r.current) return;
9
- const a = document.createElement("span");
10
- e.RadioRipple && (a.className = e.RadioRipple), a.addEventListener("animationend", () => {
11
- a.remove();
12
- }, { once: !0 }), r.current.appendChild(a);
13
- }, []);
14
- return /* @__PURE__ */ x(i.Root, {
15
- ...c,
16
- nativeButton: !0,
17
- render: /* @__PURE__ */ o("button", {}),
18
- ref: R,
19
- value: s,
20
- "data-testid": l,
21
- className: u,
22
- disabled: m,
3
+ import { useRadioGroupContext as w } from "./RadioGroupContext.js";
4
+ import { forwardRef as x, useCallback as y, useRef as S } from "react";
5
+ import { jsx as i, jsxs as D } from "react/jsx-runtime";
6
+ var H = x(({ value: o, dataTest: m, className: u, size: t = "medium", error: R, disabled: f, checked: h, onChange: C, ...l }, b) => {
7
+ const a = w(), d = a ? a.value === o : !!h, c = f ?? a?.disabled ?? !1, g = p(e.RadioWrapper, e.RadioHover, t === "small" && e["size-small"], u, R && e.Error), k = p(e.Radio, t === "small" && e["size-small"]), r = S(null), v = y((n) => {
8
+ if (n.stopPropagation(), !r.current) return;
9
+ const s = document.createElement("span");
10
+ e.RadioRipple && (s.className = e.RadioRipple), s.addEventListener("animationend", () => s.remove(), { once: !0 }), r.current.appendChild(s);
11
+ }, []), N = (n) => {
12
+ a && a.onSelect(o ?? null), C?.(n, n.target.checked);
13
+ };
14
+ return /* @__PURE__ */ D("label", {
15
+ className: g,
16
+ "data-testid": m,
23
17
  onPointerDown: v,
24
- children: [/* @__PURE__ */ o("span", {
25
- className: e.RadioRippleContainer,
26
- ref: r
27
- }), /* @__PURE__ */ o("span", {
28
- className: f,
29
- children: /* @__PURE__ */ o(i.Indicator, { className: e.Indicator })
30
- })]
18
+ "data-checked": d ? "" : void 0,
19
+ "data-unchecked": d ? void 0 : "",
20
+ "data-disabled": c ? "" : void 0,
21
+ children: [
22
+ /* @__PURE__ */ i("input", {
23
+ ...l,
24
+ ref: b,
25
+ type: "radio",
26
+ className: "sr-only",
27
+ name: a?.name ?? l.name,
28
+ value: o == null ? void 0 : String(o),
29
+ checked: d,
30
+ disabled: c,
31
+ onChange: N
32
+ }),
33
+ /* @__PURE__ */ i("span", {
34
+ className: e.RadioRippleContainer,
35
+ ref: r
36
+ }),
37
+ /* @__PURE__ */ i("span", {
38
+ className: k,
39
+ children: /* @__PURE__ */ i("span", { className: e.Indicator })
40
+ })
41
+ ]
31
42
  });
32
43
  });
33
44
  export {
34
- I as StyledRadio
45
+ H as StyledRadio
35
46
  };
@@ -1,13 +1,13 @@
1
- var a = "_RadioWrapper_1qjtx_1", _ = "_Radio_1qjtx_1", r = "_RadioRippleContainer_1qjtx_34", i = "_RadioRipple_1qjtx_34", o = "_ripple_1qjtx_1", e = "_RadioHover_1qjtx_68", d = "_Indicator_1qjtx_120", p = {
2
- RadioWrapper: a,
3
- "size-small": "_size-small_1qjtx_14",
4
- Radio: _,
5
- RadioRippleContainer: r,
6
- RadioRipple: i,
7
- ripple: o,
8
- RadioHover: e,
9
- Indicator: d,
10
- Error: "_Error_1qjtx_141"
1
+ var r = "_RadioWrapper_17rdx_1", a = "_Radio_17rdx_1", _ = "_RadioRippleContainer_17rdx_34", d = "_RadioRipple_17rdx_34", i = "_ripple_17rdx_1", o = "_RadioHover_17rdx_68", e = "_Indicator_17rdx_120", p = {
2
+ RadioWrapper: r,
3
+ "size-small": "_size-small_17rdx_14",
4
+ Radio: a,
5
+ RadioRippleContainer: _,
6
+ RadioRipple: d,
7
+ ripple: i,
8
+ RadioHover: o,
9
+ Indicator: e,
10
+ Error: "_Error_17rdx_141"
11
11
  };
12
12
  export {
13
13
  p as default
@@ -1,31 +1,43 @@
1
- import { ErrorOutlineIcon as u } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
2
- import { StyledFormHelperText as y } from "../../../miscellaneous/StyledFormHelperText.js";
3
- import I from "clsx";
4
- import { forwardRef as R, useId as s } from "react";
5
- import { jsx as b, jsxs as r } from "react/jsx-runtime";
6
- import { RadioGroup as v } from "@base-ui/react/radio-group";
7
- var q = R(({ value: a, defaultValue: l, onValueChange: m, dataTest: c, error: t, errorText: p, helperText: e, children: n, ...f }, x) => {
8
- const d = s(), i = s(), o = (t ?? !1) || (e ?? !1), h = t ? p ?? "Required" : e;
9
- return /* @__PURE__ */ r(v, {
10
- ...f,
11
- "data-testid": c,
12
- "aria-describedby": o ? t ? i : d : void 0,
13
- "aria-invalid": t,
14
- ref: x,
1
+ import { ErrorOutlineIcon as B } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
2
+ import { RadioGroupContext as C } from "./RadioGroupContext.js";
3
+ import { StyledFormHelperText as G } from "../../../miscellaneous/StyledFormHelperText.js";
4
+ import H from "clsx";
5
+ import { forwardRef as q, useId as t, useMemo as D, useState as E } from "react";
6
+ import { jsx as p, jsxs as u } from "react/jsx-runtime";
7
+ var z = q(({ value: o, defaultValue: f, onValueChange: x, disabled: s, dataTest: h, error: e, errorText: v, helperText: d, children: y, name: I, ...g }, R) => {
8
+ const r = t(), i = t(), S = t(), l = I ?? S, n = o !== void 0, [b, w] = E(f ?? null), a = n ? o : b, N = (m) => {
9
+ n || w(m), x?.(m);
10
+ }, T = D(() => ({
11
+ name: l,
15
12
  value: a,
16
- defaultValue: l,
17
- onValueChange: m,
18
- children: [n, o && /* @__PURE__ */ r(y, {
19
- id: t ? i : d,
20
- role: t ? "alert" : "status",
21
- className: I("m-0 flex items-center gap-1 pt-1 text-sm", t ? "text-error-500" : "text-delta-600"),
22
- children: [t && /* @__PURE__ */ b(u, {
13
+ disabled: s,
14
+ onSelect: N
15
+ }), [
16
+ l,
17
+ a,
18
+ s
19
+ ]), c = (e ?? !1) || (d ?? !1), j = e ? v ?? "Required" : d;
20
+ return /* @__PURE__ */ u("div", {
21
+ ...g,
22
+ ref: R,
23
+ role: "radiogroup",
24
+ "data-testid": h,
25
+ "aria-describedby": c ? e ? i : r : void 0,
26
+ "aria-invalid": e,
27
+ children: [/* @__PURE__ */ p(C.Provider, {
28
+ value: T,
29
+ children: y
30
+ }), c && /* @__PURE__ */ u(G, {
31
+ id: e ? i : r,
32
+ role: e ? "alert" : "status",
33
+ className: H("m-0 flex items-center gap-1 pt-1 text-sm", e ? "text-error-500" : "text-delta-600"),
34
+ children: [e && /* @__PURE__ */ p(B, {
23
35
  width: 20,
24
36
  height: 20
25
- }), h]
37
+ }), j]
26
38
  })]
27
39
  });
28
40
  });
29
41
  export {
30
- q as StyledRadioGroup
42
+ z as StyledRadioGroup
31
43
  };