asma-ui-core 3.42.0 → 3.43.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 (208) 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/feedback/snack-bar/components/StyledDefaultSnackbar.module.js +8 -8
  20. package/dist/components/inputs/button/StyledButton.module.js +7 -7
  21. package/dist/components/inputs/checkbox/StyledCheckbox.js +20 -0
  22. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +58 -55
  23. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -12
  24. package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +1 -1
  25. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +19 -19
  26. package/dist/components/inputs/input-field/StyledInputField.js +81 -104
  27. package/dist/components/inputs/radio-button/StyledRadio.js +17 -0
  28. package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +29 -40
  29. package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
  30. package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +23 -35
  31. package/dist/components/inputs/search-field/StyledSearchField.js +19 -18
  32. package/dist/components/inputs/select/StyledSelect.js +45 -124
  33. package/dist/components/inputs/select/StyledSelectItem.js +23 -19
  34. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +151 -181
  35. package/dist/components/inputs/slider/StyledSlider.js +52 -78
  36. package/dist/components/inputs/switch/base-ui/StyledSwitch.js +39 -44
  37. package/dist/components/miscellaneous/StyledFormControl.js +21 -39
  38. package/dist/components/miscellaneous/StyledFormControlLabel.js +16 -27
  39. package/dist/components/miscellaneous/StyledFormGroup.js +4 -16
  40. package/dist/components/miscellaneous/StyledFormHelperText.js +4 -12
  41. package/dist/components/miscellaneous/StyledInputLabel.js +4 -20
  42. package/dist/components/navigation/drawer/StyledDrawer.js +4 -42
  43. package/dist/components/navigation/listbox/Listbox.js +7 -7
  44. package/dist/components/navigation/menu/StyledMenu.js +11 -28
  45. package/dist/components/navigation/menu/StyledMenuItem.js +19 -16
  46. package/dist/components/navigation/menu/StyledMenuList.js +4 -32
  47. package/dist/components/navigation/tabs/StyledTab.js +13 -25
  48. package/dist/components/navigation/tabs/StyledTabs.js +66 -112
  49. package/dist/components/utils/accordion/base-ui/StyledAccordion.js +21 -28
  50. package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +7 -7
  51. package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +14 -28
  52. package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +27 -31
  53. package/dist/components/utils/popover/StyledPopover.js +15 -44
  54. package/dist/datetime/components/date-picker/StyledDatePicker.js +6 -6
  55. package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +1 -1
  56. package/dist/datetime/components/date-picker/components/HelperTextWithTooltip.js +6 -6
  57. package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +11 -11
  58. package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +14 -13
  59. package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +14 -14
  60. package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +6 -6
  61. package/dist/datetime/components/date-picker/components/StyledDayPicker.js +5 -4
  62. package/dist/datetime/components/date-picker/hooks/useDatePickerMask.js +4 -4
  63. package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
  64. package/dist/datetime/components/time-picker/TimePickerInput.js +16 -15
  65. package/dist/datetime/components/time-picker/TimePickerPopper.js +19 -21
  66. package/dist/datetime/helpers/cn.js +5 -4
  67. package/dist/datetime/shared-components/ExpandIcon.js +18 -0
  68. package/dist/datetime/shared-components/StyledFormControl.js +23 -0
  69. package/dist/datetime/shared-components/StyledInputField.js +47 -0
  70. package/dist/datetime/shared-components/StyledSelect.js +47 -0
  71. package/dist/datetime/shared-components/StyledSelectItem.js +13 -0
  72. package/dist/datetime/shared-components/StyledTooltip.js +32 -0
  73. package/dist/helpers/cn.js +5 -4
  74. package/dist/index.js +175 -185
  75. package/dist/src/components/data-display/badge/StyledBadge.d.ts +2 -26
  76. package/dist/src/components/data-display/chip/StyledChip.d.ts +5 -39
  77. package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +4 -11
  78. package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +2 -36
  79. package/dist/src/components/data-display/typography/StyledTypography.d.ts +1 -19
  80. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +4 -50
  81. package/dist/src/components/feedback/dialog/StyledDialogActions.d.ts +2 -12
  82. package/dist/src/components/feedback/dialog/StyledDialogContent.d.ts +2 -12
  83. package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +2 -10
  84. package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
  85. package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +2 -24
  86. package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
  87. package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +2 -21
  88. package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +1 -1
  89. package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +1 -1
  90. package/dist/src/components/feedback/snack-bar/components/types.d.ts +1 -1
  91. package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +4 -0
  92. package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +4 -9
  93. package/dist/src/components/inputs/dynamic-select/types.d.ts +2 -2
  94. package/dist/src/components/inputs/input-field/StyledInputField.d.ts +11 -67
  95. package/dist/src/components/inputs/input-field/index.d.ts +1 -1
  96. package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +4 -0
  97. package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +4 -0
  98. package/dist/src/components/inputs/radio-button/base-ui/StyledRadio.d.ts +5 -20
  99. package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +7 -24
  100. package/dist/src/components/inputs/select/StyledSelect.d.ts +16 -39
  101. package/dist/src/components/inputs/select/StyledSelectItem.d.ts +2 -14
  102. package/dist/src/components/inputs/select/index.d.ts +1 -0
  103. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +17 -88
  104. package/dist/src/components/inputs/slider/StyledSlider.d.ts +3 -55
  105. package/dist/src/components/inputs/switch/StyledSwitch.d.ts +5 -0
  106. package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +4 -20
  107. package/dist/src/components/miscellaneous/StyledFormControl.d.ts +2 -22
  108. package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +2 -21
  109. package/dist/src/components/miscellaneous/StyledFormGroup.d.ts +2 -11
  110. package/dist/src/components/miscellaneous/StyledFormHelperText.d.ts +2 -12
  111. package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +2 -20
  112. package/dist/src/components/navigation/drawer/StyledDrawer.d.ts +2 -28
  113. package/dist/src/components/navigation/menu/StyledMenu.d.ts +2 -33
  114. package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +2 -23
  115. package/dist/src/components/navigation/menu/StyledMenuList.d.ts +2 -16
  116. package/dist/src/components/navigation/menu/index.d.ts +1 -0
  117. package/dist/src/components/navigation/tabs/StyledTab.d.ts +3 -17
  118. package/dist/src/components/navigation/tabs/StyledTabs.d.ts +7 -16
  119. package/dist/src/components/utils/accordion/StyledAccordion.d.ts +2 -0
  120. package/dist/src/components/utils/accordion/StyledAccordionDetails.d.ts +2 -0
  121. package/dist/src/components/utils/accordion/StyledAccordionSummary.d.ts +8 -0
  122. package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +3 -9
  123. package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +0 -5
  124. package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +4 -8
  125. package/dist/src/components/utils/copy-wrapper/CopyWrapper.d.ts +1 -1
  126. package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -2
  127. package/dist/src/components/utils/popover/StyledPopover.d.ts +2 -32
  128. package/dist/src/datetime/components/date-picker/components/StyledCalendarPicker.d.ts +1 -1
  129. package/dist/src/datetime/components/date-picker/components/StyledDayPicker.d.ts +1 -1
  130. package/dist/src/datetime/components/date-picker/hooks/useDatePickerMask.d.ts +2 -1
  131. package/dist/src/datetime/components/time-picker/TimePickerInput.d.ts +1 -1
  132. package/dist/src/datetime/components/time-picker/TimePickerPopper.d.ts +1 -1
  133. package/dist/src/datetime/components/time-picker/types.d.ts +2 -1
  134. package/dist/src/datetime/shared-components/StyledFormControl.d.ts +2 -1
  135. package/dist/src/datetime/shared-components/StyledInputField.d.ts +12 -1
  136. package/dist/src/datetime/shared-components/StyledSelect.d.ts +16 -1
  137. package/dist/src/datetime/shared-components/StyledSelectItem.d.ts +2 -1
  138. package/dist/src/datetime/shared-components/StyledTooltip.d.ts +2 -1
  139. package/dist/src/index.d.ts +1 -2
  140. package/dist/src/table/shared-components/StyledCheckbox.d.ts +4 -7
  141. package/dist/src/table/shared-components/StyledMenuItem.d.ts +2 -18
  142. package/dist/src/table/shared-components/menu-item/index.d.ts +2 -13
  143. package/dist/src/table/shared-components/tooltip/index.d.ts +1 -5
  144. package/dist/src/table/types.d.ts +1 -1
  145. package/dist/table/components/Fetching.js +4 -4
  146. package/dist/table/components/StyledTable.module.js +51 -51
  147. package/dist/table/components/TableRow.js +7 -7
  148. package/dist/table/components/TableSkeleton.js +6 -6
  149. package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +24 -24
  150. package/dist/table/components/columns/action-column/components/RowActionMenu.js +25 -26
  151. package/dist/table/components/table-footer/TablePagination.js +24 -27
  152. package/dist/table/components/table-footer/TableRowCountSelect.js +27 -30
  153. package/dist/table/helpers/cn.js +5 -4
  154. package/dist/table/shared-components/StyledCheckbox.js +55 -54
  155. package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
  156. package/dist/table/shared-components/StyledMenuItem.js +18 -12
  157. package/dist/table/shared-components/button/StyledButton.module.js +8 -8
  158. package/dist/table/shared-components/menu-item/index.js +17 -13
  159. package/dist/table/shared-components/tooltip/index.js +23 -4
  160. package/package.json +16 -9
  161. package/src/styles/index.css +1 -0
  162. package/src/styles/typographyTokens.css +12 -0
  163. package/dist/components/inputs/field-styles.js +0 -6
  164. package/dist/components/inputs/input-field/StyledInputField.module.js +0 -4
  165. package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +0 -6
  166. package/dist/components/inputs/slider/StyledSlider.module.js +0 -10
  167. package/dist/components/miscellaneous/FormControlContext.js +0 -6
  168. package/dist/components/mui-compat/Avatar.js +0 -29
  169. package/dist/components/mui-compat/ClickAwayListener.js +0 -29
  170. package/dist/components/mui-compat/Container.js +0 -24
  171. package/dist/components/mui-compat/Fade.js +0 -29
  172. package/dist/components/mui-compat/Fade.module.js +0 -9
  173. package/dist/components/mui-compat/FormLabel.js +0 -22
  174. package/dist/components/mui-compat/Paper.js +0 -44
  175. package/dist/components/mui-compat/Popper.js +0 -35
  176. package/dist/components/mui-compat/Skeleton.js +0 -26
  177. package/dist/components/mui-compat/Stack.js +0 -24
  178. package/dist/components/navigation/tabs/TabsContext.js +0 -6
  179. package/dist/components/utils/accordion/base-ui/AccordionContext.js +0 -10
  180. package/dist/components/utils/virtual-list/VirtualList.js +0 -45
  181. package/dist/helpers/arrays.js +0 -4
  182. package/dist/helpers/inputMask.js +0 -45
  183. package/dist/helpers/sx.js +0 -46
  184. package/dist/src/api-surface.test.d.ts +0 -1
  185. package/dist/src/components/inputs/field-styles.d.ts +0 -22
  186. package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +0 -10
  187. package/dist/src/components/miscellaneous/FormControlContext.d.ts +0 -14
  188. package/dist/src/components/mui-compat/Avatar.d.ts +0 -6
  189. package/dist/src/components/mui-compat/ClickAwayListener.d.ts +0 -19
  190. package/dist/src/components/mui-compat/Container.d.ts +0 -6
  191. package/dist/src/components/mui-compat/Fade.d.ts +0 -21
  192. package/dist/src/components/mui-compat/FormLabel.d.ts +0 -6
  193. package/dist/src/components/mui-compat/Paper.d.ts +0 -6
  194. package/dist/src/components/mui-compat/Popper.d.ts +0 -29
  195. package/dist/src/components/mui-compat/Skeleton.d.ts +0 -7
  196. package/dist/src/components/mui-compat/Stack.d.ts +0 -7
  197. package/dist/src/components/mui-compat/index.d.ts +0 -9
  198. package/dist/src/components/mui-compat/types.d.ts +0 -46
  199. package/dist/src/components/navigation/tabs/TabsContext.d.ts +0 -11
  200. package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +0 -10
  201. package/dist/src/components/utils/virtual-list/VirtualList.d.ts +0 -28
  202. package/dist/src/components/utils/virtual-list/index.d.ts +0 -1
  203. package/dist/src/helpers/arrays.d.ts +0 -2
  204. package/dist/src/helpers/arrays.test.d.ts +0 -1
  205. package/dist/src/helpers/inputMask.d.ts +0 -29
  206. package/dist/src/helpers/inputMask.test.d.ts +0 -1
  207. package/dist/src/helpers/sx.d.ts +0 -2
  208. package/dist/src/helpers/sx.test.d.ts +0 -1
@@ -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 l } from "@mui/material";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ var i = ({ sx: o, ...r }) => /* @__PURE__ */ e(l, {
4
+ ...r,
5
+ sx: {
6
+ color: "var(--colors-delta-800)",
7
+ margin: 0,
8
+ "& .MuiFormControlLabel-label": {
9
+ fontSize: "var(--font-size-body-base)",
10
+ lineHeight: "var(--line-height-body-base)"
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,23 @@
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 n = (e) => /* @__PURE__ */ r(t, {
5
+ ...e,
6
+ classes: {
7
+ selected: "bg-gama-50",
8
+ root: o("h-10 pl-4 pr-2 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
+ fontSize: "var(--font-size-body-base)",
13
+ "&.Mui-disabled": {
14
+ pointerEvents: "auto",
15
+ cursor: "not-allowed",
16
+ "&:hover": { backgroundColor: "transparent !important" }
17
+ },
18
+ ...e.sx
19
+ }
17
20
  });
18
21
  export {
19
- D as StyledMenuItem
22
+ n as StyledMenuItem
20
23
  };
@@ -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
  };
@@ -1,27 +1,15 @@
1
- import { cn as l } from "../../../helpers/cn.js";
2
- import { resolveSx as p } from "../../../helpers/sx.js";
3
- import { useTabsContext as f } from "./TabsContext.js";
4
- import { useCallback as x } from "react";
5
- import { jsx as u } from "react/jsx-runtime";
6
- var d = ({ value: n, label: i, disabled: r, className: s, sx: m, index: c }) => {
7
- const e = f(), t = n !== void 0 ? n : c, o = e ? e.value === t : !1;
8
- return /* @__PURE__ */ u("button", {
9
- ref: x((a) => {
10
- e?.register(t, a);
11
- }, [e, t]),
12
- type: "button",
13
- role: "tab",
14
- "aria-selected": o,
15
- "aria-disabled": r ? !0 : void 0,
16
- disabled: r,
17
- tabIndex: o ? 0 : -1,
18
- "data-tab-value": typeof t == "string" || typeof t == "number" ? String(t) : void 0,
19
- onClick: (a) => !r && e?.onSelect(a, t),
20
- className: l("inline-flex min-h-12 shrink-0 items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium normal-case tracking-normal transition-colors", e?.size === "small" && "min-h-9 px-3 py-2", o ? "text-gama-500" : "text-gray-600", r && "text-gray-300", !r && "cursor-pointer hover:text-gama-500", s),
21
- style: p(m),
22
- children: i
23
- });
24
- };
1
+ import { Tab as o } from "@mui/material";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ var e = (r) => /* @__PURE__ */ a(o, {
4
+ ...r,
5
+ sx: {
6
+ textTransform: "none",
7
+ letterSpacing: "normal",
8
+ "&.MuiTab-textColorPrimary.Mui-selected": { color: "var(--colors-gama-500)" },
9
+ "&.MuiTab-textColorPrimary": { color: "var(--colors-gray-600)" },
10
+ "&.MuiTab-textColorPrimary.Mui-disabled": { color: "var(--colors-gray-300)" }
11
+ }
12
+ });
25
13
  export {
26
- d as StyledTab
14
+ e as StyledTab
27
15
  };
@@ -1,116 +1,70 @@
1
- import { cn as d } from "../../../helpers/cn.js";
2
- import { resolveSx as T } from "../../../helpers/sx.js";
3
- import { ChevronRightIcon as H } from "../../icons/chevron-right-icon/ChevronRightIcon.js";
4
- import { ChevronLeftIcon as K } from "../../icons/chevron-left-icon/ChevronLeftIcon.js";
5
- import { TabsContext as M } from "./TabsContext.js";
6
- import { Children as P, cloneElement as V, isValidElement as _, useCallback as u, useLayoutEffect as q, useMemo as z, useRef as R, useState as S } from "react";
7
- import { jsx as o, jsxs as E } from "react/jsx-runtime";
8
- var I = 120, Z = ({ value: n, onChange: m, variant: b = "standard", scrollButtons: w = "auto", centered: A, size: h = "default", className: N, sx: j, children: g }) => {
9
- const i = R(null), a = R(/* @__PURE__ */ new Map()), [x, W] = S({
10
- left: 0,
11
- width: 0
12
- }), [c, B] = S({
13
- left: !1,
14
- right: !1
15
- }), y = b === "scrollable", p = u((e, t) => {
16
- t ? a.current.set(e, t) : a.current.delete(e);
17
- }, []), v = u((e, t) => m?.(e, t), [m]), f = u(() => {
18
- const e = a.current.get(n), t = i.current;
19
- if (e && W({
20
- left: e.offsetLeft,
21
- width: e.offsetWidth
22
- }), t) {
23
- const { scrollLeft: l, scrollWidth: r, clientWidth: s } = t;
24
- B({
25
- left: l > 1,
26
- right: l + s < r - 1
27
- });
28
- }
29
- }, [n]);
30
- q(() => {
31
- f();
32
- const e = i.current;
33
- if (!e) return;
34
- const t = new ResizeObserver(f);
35
- return t.observe(e), () => t.disconnect();
36
- }, [f, g]);
37
- const k = (e) => {
38
- i.current?.scrollBy({
39
- left: e,
40
- behavior: "smooth"
41
- });
42
- }, D = (e) => {
43
- if (![
44
- "ArrowRight",
45
- "ArrowLeft",
46
- "Home",
47
- "End"
48
- ].includes(e.key)) return;
49
- e.preventDefault();
50
- const t = Array.from(a.current.values()).filter((s) => !s.disabled);
51
- if (t.length === 0) return;
52
- const l = t.findIndex((s) => s === document.activeElement);
53
- let r = l;
54
- e.key === "ArrowRight" ? r = (l + 1) % t.length : e.key === "ArrowLeft" ? r = (l - 1 + t.length) % t.length : e.key === "Home" ? r = 0 : e.key === "End" && (r = t.length - 1), t[r]?.focus();
55
- }, C = y && w !== !1 && (w === !0 || c.left || c.right), O = z(() => ({
56
- value: n,
57
- size: h,
58
- onSelect: v,
59
- register: p
60
- }), [
61
- n,
62
- h,
63
- v,
64
- p
65
- ]), L = "flex h-10 w-10 shrink-0 items-center justify-center self-center rounded-[10%] border border-delta-500 text-delta-700 transition-colors hover:bg-gama-50 disabled:invisible";
66
- return /* @__PURE__ */ o(M.Provider, {
67
- value: O,
68
- children: /* @__PURE__ */ E("div", {
69
- className: d("relative flex items-center rounded-t-lg bg-white px-4", N),
70
- style: T(j),
71
- children: [
72
- C && /* @__PURE__ */ o("button", {
73
- type: "button",
74
- "aria-label": "scroll tabs left",
75
- className: d(L, "mr-2"),
76
- disabled: !c.left,
77
- onClick: () => k(-I),
78
- children: /* @__PURE__ */ o(K, {
79
- width: 24,
80
- height: 24
81
- })
82
- }),
83
- /* @__PURE__ */ E("div", {
84
- ref: i,
85
- role: "tablist",
86
- "aria-orientation": "horizontal",
87
- onKeyDown: D,
88
- onScroll: f,
89
- className: d("relative flex border-b border-delta-200 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", y ? "flex-1 overflow-x-auto" : "w-full", b === "fullWidth" && "[&>*]:flex-1", A && "justify-center", h === "small" && "min-h-9"),
90
- children: [P.map(g, (e, t) => _(e) ? V(e, { index: t }) : e), /* @__PURE__ */ o("span", {
91
- "aria-hidden": !0,
92
- className: "absolute bottom-0 h-0.5 bg-gama-500 transition-all duration-300",
93
- style: {
94
- left: x.left,
95
- width: x.width
96
- }
97
- })]
98
- }),
99
- C && /* @__PURE__ */ o("button", {
100
- type: "button",
101
- "aria-label": "scroll tabs right",
102
- className: d(L, "ml-2"),
103
- disabled: !c.right,
104
- onClick: () => k(I),
105
- children: /* @__PURE__ */ o(H, {
106
- width: 24,
107
- height: 24
108
- })
109
- })
110
- ]
111
- })
1
+ import { cn as s } from "../../../helpers/cn.js";
2
+ import { Tabs as e } from "@mui/material";
3
+ import { jsx as l } from "react/jsx-runtime";
4
+ function n(o) {
5
+ return Array.isArray(o);
6
+ }
7
+ function d(o) {
8
+ return o != null && !Array.isArray(o);
9
+ }
10
+ var c = {
11
+ "& .MuiTab-root": { fontSize: "var(--font-size-body-lg)" },
12
+ "& .MuiTabs-scroller": { borderBottom: "1px solid var(--colors-delta-200)" },
13
+ "& .MuiTabs-scrollButtons": {
14
+ border: "1px solid var(--colors-delta-500)",
15
+ width: 40,
16
+ height: 40,
17
+ borderRadius: "10%",
18
+ display: "none",
19
+ justifyContent: "center",
20
+ alignItems: "center",
21
+ alignSelf: "center",
22
+ "& svg": {
23
+ fontSize: 24,
24
+ color: "var(--colors-delta-700)"
25
+ },
26
+ "&:hover": { backgroundColor: "var(--colors-gama-50)" },
27
+ "&:first-of-type": { marginRight: "8px" },
28
+ "&:last-of-type": { marginLeft: "8px" },
29
+ transition: "opacity 0.3s ease, transform 0.3s ease",
30
+ opacity: 0,
31
+ transform: "scale(0)"
32
+ },
33
+ "& .MuiTabs-scrollButtons.Mui-disabled": { display: "none" },
34
+ "& .MuiTabs-scrollButtons:not(.Mui-disabled)": {
35
+ display: "flex",
36
+ opacity: 1,
37
+ transform: "scale(1)"
38
+ }
39
+ }, p = {
40
+ minHeight: 36,
41
+ "& .MuiTab-root": {
42
+ fontSize: "var(--font-size-body-base)",
43
+ height: 36,
44
+ minHeight: 36,
45
+ paddingLeft: "12px",
46
+ paddingRight: "12px",
47
+ paddingTop: "8px",
48
+ paddingBottom: "8px"
49
+ }
50
+ }, m = ({ className: o, size: i = "default", sx: r, ...a }) => {
51
+ const t = [c];
52
+ return i === "small" && t.push(p), n(r) ? t.push(...r) : d(r) && t.push(r), /* @__PURE__ */ l(e, {
53
+ ...a,
54
+ className: s("relative rounded-t-lg bg-white px-4", o),
55
+ slotProps: {
56
+ ...a.slotProps,
57
+ indicator: {
58
+ style: {
59
+ background: "var(--colors-gama-500)",
60
+ color: "var(--colors-gama-500)"
61
+ },
62
+ ...a.slotProps?.indicator ?? {}
63
+ }
64
+ },
65
+ sx: t
112
66
  });
113
67
  };
114
68
  export {
115
- Z as StyledTabs
69
+ m as StyledTabs
116
70
  };