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,28 +1,33 @@
1
- import { Badge as t } from "@mui/material";
2
- import { jsx as g } from "react/jsx-runtime";
3
- var x = ({ color: r = "primary", dataTest: a, size: e = "medium", sx: d, ...o }) => {
4
- const i = d?.["& .MuiBadge-badge"];
5
- return /* @__PURE__ */ g(t, {
6
- color: r,
7
- "data-testid": a,
8
- ...o,
9
- sx: {
10
- "& .MuiBadge-colorPrimary": {
11
- backgroundColor: "#D9F256",
12
- color: "#0A3D3D",
13
- border: "1px solid #C1E600"
14
- },
15
- ...d,
16
- ...e === "small" ? { "& .MuiBadge-badge": {
17
- minWidth: "16px",
18
- height: "16px",
19
- width: "max-content",
20
- padding: "0 4px",
21
- ...i
22
- } } : {}
23
- }
1
+ import { resolveSx as a } from "../../../helpers/sx.js";
2
+ import A from "clsx";
3
+ import { jsx as O, jsxs as D } from "react/jsx-runtime";
4
+ var i = {
5
+ primary: "bg-[#D9F256] text-[#0A3D3D] border border-solid border-[#C1E600]",
6
+ default: "bg-[#e0e0e0] text-[rgba(0,0,0,0.87)]",
7
+ secondary: "bg-[#9c27b0] text-white",
8
+ error: "bg-[#d32f2f] text-white",
9
+ info: "bg-[#0288d1] text-white",
10
+ success: "bg-[#2e7d32] text-white",
11
+ warning: "bg-[#ed6c02] text-white"
12
+ }, L = {
13
+ "top-right": "top-0 right-0 translate-x-1/2 -translate-y-1/2 origin-[100%_0%]",
14
+ "top-left": "top-0 left-0 -translate-x-1/2 -translate-y-1/2 origin-[0%_0%]",
15
+ "bottom-right": "bottom-0 right-0 translate-x-1/2 translate-y-1/2 origin-[100%_100%]",
16
+ "bottom-left": "bottom-0 left-0 -translate-x-1/2 translate-y-1/2 origin-[0%_100%]"
17
+ }, n = "& .MuiBadge-badge", C = ({ color: p = "primary", dataTest: x, size: d = "medium", badgeContent: t, max: o = 99, showZero: c = !1, variant: m = "standard", invisible: f, anchorOrigin: s, children: b, className: h, sx: e, overlap: $, classes: z, slots: B, slotProps: E, component: N, ...g }) => {
18
+ const l = e && typeof e == "object" && !Array.isArray(e) ? e : {}, y = a(l[n]), u = a(Object.fromEntries(Object.entries(l).filter(([j]) => j !== n))), r = m === "dot", w = !!f || !r && (t === 0 || t === void 0 || t === null) && !c, _ = r ? null : typeof t == "number" && t > o ? `${o}+` : t, v = s?.vertical ?? "top", S = s?.horizontal ?? "right";
19
+ return /* @__PURE__ */ D("span", {
20
+ className: "relative inline-flex shrink-0 align-middle",
21
+ "data-testid": x,
22
+ style: u,
23
+ ...g,
24
+ children: [b, !w && /* @__PURE__ */ O("span", {
25
+ className: A("absolute z-[1] box-border flex flex-row flex-wrap content-center items-center justify-center whitespace-nowrap font-roboto font-medium leading-none", L[`${v}-${S}`], r ? "h-[6px] w-[6px] min-w-[6px] rounded-[3px] p-0" : d === "small" ? "h-[16px] w-max min-w-[16px] rounded-[10px] px-[4px] text-[0.75rem]" : "h-[20px] min-w-[20px] rounded-[10px] px-[6px] text-[0.75rem]", i[p] ?? i.default, h),
26
+ style: y,
27
+ children: _
28
+ })]
24
29
  });
25
30
  };
26
31
  export {
27
- x as StyledBadge
32
+ C as StyledBadge
28
33
  };
@@ -1,62 +1,47 @@
1
- import { CloseIcon as t } from "../../icons/close-icon/CloseIcon.js";
2
- import { forwardRef as c } from "react";
3
- import { Chip as s } from "@mui/material";
4
- import { jsx as e } from "react/jsx-runtime";
5
- var m = c(({ dataTest: r, readOnly: o, onDelete: l, ...a }, d) => /* @__PURE__ */ e(s, {
6
- ...a,
7
- ref: d,
8
- "data-testid": r,
9
- deleteIcon: o ? void 0 : /* @__PURE__ */ e(t, {
10
- "data-testid": `${r}-delete`,
11
- height: 18,
12
- width: 18,
13
- className: "min-w-[18px]"
14
- }),
15
- onDelete: o ? void 0 : l,
16
- sx: {
17
- border: "1px solid",
18
- backgroundColor: "white",
19
- borderColor: "var(--colors-delta-300)",
20
- color: "var(--colors-delta-800)",
21
- fontSize: "14px",
22
- ...o ? {
23
- pointerEvents: "none",
24
- "&:hover": {
25
- borderColor: "var(--colors-delta-300)",
26
- backgroundColor: "white"
27
- }
28
- } : {
29
- "&:hover, &[data-hovered]": {
30
- borderColor: "var(--colors-gama-200)",
31
- backgroundColor: "var(--colors-gama-50)"
32
- },
33
- "&:focus, &[data-focus]": {
34
- outline: "none",
35
- borderColor: "var(--colors-gama-400)",
36
- backgroundColor: "var(--colors-gama-50)",
37
- boxShadow: "0 0 0 1px inset var(--colors-gama-400)"
38
- },
39
- "&:active": {
40
- borderColor: "var(--colors-gama-400)",
41
- backgroundColor: "var(--colors-gama-50)",
42
- boxShadow: "0 0 0 2px inset var(--colors-gama-400)"
43
- },
44
- "& .MuiChip-deleteIcon": {
45
- border: "1px solid",
46
- borderColor: "var(--colors-delta-100)",
47
- color: "var(--colors-delta-700)",
48
- backgroundColor: "var(--colors-delta-50)",
49
- borderRadius: "50%",
50
- "&:hover": {
51
- borderColor: "var(--colors-delta-100)",
52
- backgroundColor: "var(--colors-delta-50)",
53
- color: "var(--colors-delta-700)"
54
- }
55
- }
56
- },
57
- ...a.sx
58
- }
59
- }));
1
+ import { cn as e } from "../../../helpers/cn.js";
2
+ import { resolveSx as C } from "../../../helpers/sx.js";
3
+ import { CloseIcon as S } from "../../icons/close-icon/CloseIcon.js";
4
+ import { forwardRef as y } from "react";
5
+ import { jsx as r, jsxs as I } from "react/jsx-runtime";
6
+ var D = y(({ dataTest: n, label: h, size: p = "medium", disabled: t, readOnly: o, clickable: f, icon: u, avatar: d, deleteIcon: v, onDelete: m, onClick: l, className: b, classes: a, sx: x, tabIndex: c, "aria-label": _, "data-hovered": w, "data-focus": N, variant: P, color: R }, j) => {
7
+ const i = !o && !t && (!!f || !!l), s = d ?? u, k = (g) => {
8
+ g.stopPropagation(), m?.(g);
9
+ };
10
+ return /* @__PURE__ */ I("div", {
11
+ ref: j,
12
+ "data-testid": n,
13
+ "aria-label": _,
14
+ "data-hovered": w,
15
+ "data-focus": N,
16
+ role: i ? "button" : void 0,
17
+ tabIndex: i ? c ?? 0 : c,
18
+ onClick: t || o ? void 0 : l,
19
+ className: e("inline-flex max-w-full items-center gap-1 rounded-2xl border border-delta-300 bg-white text-sm text-delta-800", p === "small" ? "h-6 px-2" : "h-8 px-3", o && "pointer-events-none", t && "pointer-events-none opacity-[0.38]", i && e("cursor-pointer outline-none", "data-[hovered]:border-gama-200 data-[hovered]:bg-gama-50 hover:border-gama-200 hover:bg-gama-50", "focus:border-gama-400 focus:bg-gama-50 focus:shadow-[0_0_0_1px_inset_var(--colors-gama-400)]", "data-[focus]:border-gama-400 data-[focus]:bg-gama-50 data-[focus]:shadow-[0_0_0_1px_inset_var(--colors-gama-400)]", "active:border-gama-400 active:bg-gama-50 active:shadow-[0_0_0_2px_inset_var(--colors-gama-400)]"), a?.root, b),
20
+ style: C(x),
21
+ children: [
22
+ s && /* @__PURE__ */ r("span", {
23
+ className: e("flex shrink-0 items-center", d ? a?.avatar : a?.icon),
24
+ children: s
25
+ }),
26
+ /* @__PURE__ */ r("span", {
27
+ className: e("min-w-0 truncate", a?.label),
28
+ children: h
29
+ }),
30
+ m && !o && /* @__PURE__ */ r("button", {
31
+ type: "button",
32
+ "data-testid": `${n}-delete`,
33
+ onClick: k,
34
+ disabled: t,
35
+ className: e("ml-1 flex shrink-0 items-center justify-center rounded-full border border-delta-100 bg-delta-50 text-delta-700", a?.deleteIcon),
36
+ children: v ?? /* @__PURE__ */ r(S, {
37
+ height: 18,
38
+ width: 18,
39
+ className: "min-w-[18px]"
40
+ })
41
+ })
42
+ ]
43
+ });
44
+ });
60
45
  export {
61
- m as StyledChip
46
+ D as StyledChip
62
47
  };
@@ -1,47 +1,41 @@
1
- import { StyledChip as v } from "../chip/StyledChip.js";
2
- import { StyledCheckbox as b } from "../../inputs/checkbox/StyledCheckbox.js";
3
- import { StyledRadio as m } from "../../inputs/radio-button/StyledRadio.js";
4
- import { forwardRef as u } from "react";
5
- import { jsx as e } from "react/jsx-runtime";
6
- var S = u(({ type: i = "checkbox", checked: a, size: c = "small", ...o }, n) => {
7
- const r = i === "checkbox", s = r ? b : m, d = !o.readOnly && !r && a, l = {
8
- borderColor: "var(--colors-gama-300)",
9
- backgroundColor: "var(--colors-gama-25)",
10
- boxShadow: "0 0 0 1px inset var(--colors-gama-300)"
11
- }, t = o.ariaLabel ?? (typeof o.label == "string" ? o.label : void 0);
12
- return /* @__PURE__ */ e(v, {
13
- ref: n,
1
+ import { StyledChip as c } from "../chip/StyledChip.js";
2
+ import { StyledCheckbox as m } from "../../inputs/checkbox/base-ui/StyledCheckbox.js";
3
+ import { StyledRadio as b } from "../../inputs/radio-button/base-ui/StyledRadio.js";
4
+ import { forwardRef as x } from "react";
5
+ import { jsx as o } from "react/jsx-runtime";
6
+ var v = {
7
+ borderColor: "var(--colors-gama-400)",
8
+ backgroundColor: "var(--colors-gama-50)",
9
+ boxShadow: "0 0 0 1px inset var(--colors-gama-400)"
10
+ }, g = x(({ type: i = "checkbox", checked: e, size: l = "small", ariaLabel: n, ...a }, d) => {
11
+ const r = i === "checkbox", t = n ?? (typeof a.label == "string" ? a.label : void 0), s = !a.readOnly && !r && !!e;
12
+ return /* @__PURE__ */ o(c, {
13
+ ref: d,
14
14
  "aria-label": t,
15
- avatar: /* @__PURE__ */ e(s, {
16
- dataTest: o.dataTest,
15
+ avatar: r ? /* @__PURE__ */ o(m, {
16
+ dataTest: a.dataTest,
17
17
  disableRipple: !0,
18
- checked: a,
19
- size: c,
20
- sx: { pointerEvents: "none" },
21
- slotProps: { input: { "aria-label": t } }
18
+ checked: e,
19
+ size: l,
20
+ readOnly: a.readOnly,
21
+ "aria-label": t,
22
+ className: "pointer-events-none"
23
+ }) : /* @__PURE__ */ o(b, {
24
+ dataTest: a.dataTest,
25
+ checked: e,
26
+ size: l,
27
+ "aria-label": t,
28
+ className: "pointer-events-none"
22
29
  }),
23
30
  clickable: !0,
24
31
  tabIndex: 0,
25
- ...o,
26
- sx: {
27
- ...d && {
28
- outline: "none",
29
- borderColor: "var(--colors-gama-400)",
30
- boxShadow: "0 0 0 1px inset var(--colors-gama-400)",
31
- backgroundColor: "var(--colors-gama-50)",
32
- "&:hover": l
33
- },
34
- ...a && { "& .MuiChip-avatar": { "& .MuiSvgIcon-root": { color: "var(--colors-gama-500)" } } },
35
- ...o.readOnly && { "& .MuiChip-avatar": {
36
- "& .MuiSvgIcon-root": { color: "var(--colors-delta-500)" },
37
- "& .MuiCheckbox-root, & .MuiRadio-root": { color: "var(--colors-delta-500)" },
38
- "& .Mui-checked": { color: "var(--colors-delta-500)" }
39
- } },
40
- "&:focus:hover": l,
41
- ...o.sx
42
- }
32
+ ...a,
33
+ sx: s ? {
34
+ ...v,
35
+ ...a.sx
36
+ } : a.sx
43
37
  });
44
38
  });
45
39
  export {
46
- S as StyledInteractiveChip
40
+ g as StyledInteractiveChip
47
41
  };
@@ -1,37 +1,54 @@
1
- import { Tooltip as e } from "@mui/material";
2
- import { jsx as i } from "react/jsx-runtime";
3
- import { mergeSlotProps as r } from "@mui/material/utils";
4
- import l from "@mui/material/Fade";
5
- var a = {
6
- borderRadius: "3px",
7
- "& .MuiTooltip-arrow": { color: "#363E4A" },
8
- color: "white",
9
- boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.25)",
10
- display: "flex",
11
- padding: "4px 8px",
12
- alignItems: "center",
13
- fontSize: "12px",
14
- lineHeight: "16px",
15
- letterSpacing: "0.24px",
16
- bgcolor: "#363E4A",
17
- wordBreak: "break-word"
18
- }, d = (p) => {
19
- const { slotProps: o, ...t } = p;
20
- return /* @__PURE__ */ i(e, {
21
- enterDelay: 500,
22
- placement: "top",
23
- ...t,
24
- slots: {
25
- transition: l,
26
- ...t.slots
1
+ import { cn as A } from "../../../helpers/cn.js";
2
+ import { resolveSx as T } from "../../../helpers/sx.js";
3
+ import { cloneElement as j, useRef as k, useState as C } from "react";
4
+ import { Fragment as I, jsx as d, jsxs as m } from "react/jsx-runtime";
5
+ import { FloatingArrow as M, FloatingPortal as N, arrow as P, autoUpdate as U, flip as z, offset as B, shift as D, useDismiss as G, useFloating as H, useFocus as L, useHover as q, useInteractions as J, useMergeRefs as K, useRole as Q } from "@floating-ui/react";
6
+ var V = "#363E4A", ee = ({ title: o, children: t, placement: g = "top", arrow: s = !1, enterDelay: u = 500, leaveDelay: x = 0, open: l, onOpen: F, onClose: v, disableHoverListener: w, disableFocusListener: h, className: y, slotProps: n }) => {
7
+ const [R, b] = C(!1), r = l !== void 0, a = l ?? R, i = k(null), O = (c) => {
8
+ r || b(c), c ? F?.() : v?.();
9
+ }, { refs: p, floatingStyles: _, context: e } = H({
10
+ open: a,
11
+ onOpenChange: O,
12
+ placement: g,
13
+ whileElementsMounted: U,
14
+ middleware: [
15
+ B(s ? 8 : 6),
16
+ z({ padding: 8 }),
17
+ D({ padding: 8 }),
18
+ ...s ? [P({ element: i })] : []
19
+ ]
20
+ }), { getReferenceProps: E, getFloatingProps: S } = J([
21
+ q(e, {
22
+ enabled: !r && !w,
23
+ delay: {
24
+ open: u,
25
+ close: x
26
+ },
27
+ move: !1
28
+ }),
29
+ L(e, { enabled: !r && !h }),
30
+ G(e),
31
+ Q(e, { role: "tooltip" })
32
+ ]), f = j(t, E({
33
+ ref: K([p.setReference, t.ref]),
34
+ ...t.props
35
+ }));
36
+ return o == null || o === "" ? f : /* @__PURE__ */ m(I, { children: [f, a && /* @__PURE__ */ d(N, { children: /* @__PURE__ */ m("div", {
37
+ ref: p.setFloating,
38
+ style: {
39
+ ..._,
40
+ ...n?.tooltip?.style,
41
+ ...T(n?.tooltip?.sx)
27
42
  },
28
- slotProps: {
29
- ...o,
30
- transition: r(o?.transition, { timeout: 300 }),
31
- tooltip: r(o?.tooltip, { sx: a })
32
- }
33
- });
43
+ ...S(),
44
+ className: A("z-[1500] flex items-center break-words rounded-[3px] bg-[#363E4A] px-2 py-1 text-xs leading-4 tracking-[0.24px] text-white shadow-[0px_1px_4px_0px_rgba(0,0,0,0.25)]", y, n?.tooltip?.className),
45
+ children: [o, s && /* @__PURE__ */ d(M, {
46
+ ref: i,
47
+ context: e,
48
+ fill: V
49
+ })]
50
+ }) })] });
34
51
  };
35
52
  export {
36
- d as StyledTooltip
53
+ ee as StyledTooltip
37
54
  };
@@ -1,6 +1,64 @@
1
- import { Typography as o } from "@mui/material";
2
- import { jsx as p } from "react/jsx-runtime";
3
- var t = (r) => /* @__PURE__ */ p(o, { ...r });
1
+ import { resolveSx as x } from "../../../helpers/sx.js";
2
+ import b from "clsx";
3
+ import { createElement as y } from "react";
4
+ var k = {
5
+ h1: "h1",
6
+ h2: "h2",
7
+ h3: "h3",
8
+ h4: "h4",
9
+ h5: "h5",
10
+ h6: "h6",
11
+ subtitle1: "h6",
12
+ subtitle2: "h6",
13
+ body1: "p",
14
+ body2: "p",
15
+ inherit: "p"
16
+ }, u = {
17
+ h1: "text-[6rem] font-light leading-[1.167] tracking-[-0.01562em]",
18
+ h2: "text-[3.75rem] font-light leading-[1.2] tracking-[-0.00833em]",
19
+ h3: "text-[3rem] font-normal leading-[1.167] tracking-normal",
20
+ h4: "text-[2.125rem] font-normal leading-[1.235] tracking-[0.00735em]",
21
+ h5: "text-[1.5rem] font-normal leading-[1.334] tracking-normal",
22
+ h6: "text-[1.25rem] font-medium leading-[1.6] tracking-[0.0075em]",
23
+ subtitle1: "text-[1rem] font-normal leading-[1.75] tracking-[0.00938em]",
24
+ subtitle2: "text-[0.875rem] font-medium leading-[1.57] tracking-[0.00714em]",
25
+ body1: "text-[1rem] font-normal leading-[1.5] tracking-[0.00938em]",
26
+ body2: "text-[0.875rem] font-normal leading-[1.43] tracking-[0.01071em]",
27
+ button: "text-[0.875rem] font-medium leading-[1.75] tracking-[0.02857em] uppercase",
28
+ caption: "text-[0.75rem] font-normal leading-[1.66] tracking-[0.03333em]",
29
+ overline: "text-[0.75rem] font-normal leading-[2.66] tracking-[0.08333em] uppercase",
30
+ inherit: "text-inherit font-[inherit] leading-[inherit] tracking-[inherit]"
31
+ }, v = {
32
+ inherit: "inherit",
33
+ initial: "initial",
34
+ "text.primary": "rgba(0, 0, 0, 0.87)",
35
+ "text.secondary": "rgba(0, 0, 0, 0.6)",
36
+ "text.disabled": "rgba(0, 0, 0, 0.38)",
37
+ primary: "#1976d2",
38
+ "primary.main": "#1976d2",
39
+ secondary: "#9c27b0",
40
+ "secondary.main": "#9c27b0",
41
+ error: "#d32f2f",
42
+ "error.main": "#d32f2f",
43
+ warning: "#ed6c02",
44
+ "warning.main": "#ed6c02",
45
+ info: "#0288d1",
46
+ "info.main": "#0288d1",
47
+ success: "#2e7d32",
48
+ "success.main": "#2e7d32"
49
+ }, C = (i) => {
50
+ const { variant: e = "body1", variantMapping: a, align: n, noWrap: o, gutterBottom: m, color: t, component: l, className: d, sx: c, style: g, classes: A, children: s, ...h } = i, f = l ?? a?.[e] ?? k[e] ?? "span", r = t ? v[t] ?? t : void 0, p = {
51
+ ...n ? { textAlign: n } : {},
52
+ ...r ? { color: r } : {},
53
+ ...x(c),
54
+ ...g
55
+ };
56
+ return y(f, {
57
+ className: b("m-0 font-roboto", u[e], o && "overflow-hidden text-ellipsis whitespace-nowrap", m && "mb-[0.35em]", d),
58
+ style: p,
59
+ ...h
60
+ }, s);
61
+ };
4
62
  export {
5
- t as StyledTypography
63
+ C as StyledTypography
6
64
  };
@@ -1,58 +1,78 @@
1
- import { CloseIcon as p } from "../../icons/close-icon/CloseIcon.js";
2
- import { StyledButton as f } from "../../inputs/button/StyledButton.js";
3
- import e from "./StyledDialog.module.js";
4
- import { useMobileMediaQuery as h } from "../../../hooks/useMediaQuery.hook.js";
5
- import { Dialog as u } from "@mui/material";
6
- import { jsx as i, jsxs as o } from "react/jsx-runtime";
7
- var b = ({ onCloseText: s, children: n, dataTest: d, showCloseIcon: a = !0, dialogLabel: r, dialogTitle: t, dialogHeaderNode: c, ...l }) => {
8
- const m = h();
9
- return /* @__PURE__ */ o(u, {
10
- "data-testid": d,
11
- "aria-label": d,
1
+ import { cn as p } from "../../../helpers/cn.js";
2
+ import { resolveSx as u } from "../../../helpers/sx.js";
3
+ import { CloseIcon as I } from "../../icons/close-icon/CloseIcon.js";
4
+ import { StyledButton as R } from "../../inputs/button/StyledButton.js";
5
+ import { useMobileMediaQuery as z } from "../../../hooks/useMediaQuery.hook.js";
6
+ import K from "./StyledDialog.module.js";
7
+ import { useEffect as P, useRef as W } from "react";
8
+ import { jsx as l, jsxs as t } from "react/jsx-runtime";
9
+ var X = {
10
+ xs: 444,
11
+ sm: 600,
12
+ md: 900,
13
+ lg: 1200,
14
+ xl: 1536
15
+ }, O = ({ open: r, onClose: o, children: h, dataTest: a, maxWidth: n = "sm", fullWidth: y, fullScreen: g, scroll: w = "paper", disableEscapeKeyDown: v, className: b, style: D, sx: N, classes: k, PaperProps: C, slotProps: S, onCloseText: j, showCloseIcon: d = !0, dialogLabel: s, dialogTitle: c, dialogHeaderNode: M }) => {
16
+ const _ = z(), i = W(null), f = _ ? !0 : g;
17
+ P(() => {
18
+ const e = i.current;
19
+ e && (r && !e.open ? e.showModal() : !r && e.open && e.close());
20
+ }, [r]);
21
+ const m = {
22
+ ...C,
23
+ ...S?.paper
24
+ }, x = n === !1 ? void 0 : X[n];
25
+ return /* @__PURE__ */ t("dialog", {
26
+ ref: i,
27
+ "data-testid": a,
28
+ "aria-label": a,
29
+ onCancel: (e) => {
30
+ e.preventDefault(), v || o?.(e, "escapeKeyDown");
31
+ },
32
+ onClick: (e) => {
33
+ e.target === i.current && o?.(e, "backdropClick");
34
+ },
35
+ className: p(K.StyledDialog, "m-auto max-h-[calc(100%-64px)] overflow-hidden rounded-2xl border-0 bg-white p-0 text-delta-800 shadow-xl", f ? "h-full max-h-full w-full max-w-full rounded-none" : p("w-[calc(100%-64px)]", y ? "w-[calc(100%-64px)]" : "w-auto"), w === "body" ? "overflow-y-auto" : "flex flex-col", b, m.className, k?.paper),
12
36
  style: {
13
37
  zIndex: 999,
14
- ...l.style
38
+ ...x && !f ? { maxWidth: x } : {},
39
+ ...u(N),
40
+ ...u(m.sx),
41
+ ...D
15
42
  },
16
- fullScreen: m ? !0 : l.fullScreen,
17
- ...l,
18
- children: [/* @__PURE__ */ i("div", {
19
- className: e["styled-dialog-root"],
20
- children: r || t || a ? /* @__PURE__ */ o("div", {
21
- className: e["styled-top-header"],
22
- children: [/* @__PURE__ */ o("div", {
23
- className: e["styled-dialog-info"],
24
- children: [r && /* @__PURE__ */ i("div", {
25
- className: e["styled-dialog-label"],
26
- children: r
27
- }), t && /* @__PURE__ */ i("div", {
28
- className: e["styled-dialog-title"],
29
- children: t
30
- })]
31
- }), a && /* @__PURE__ */ o("div", {
32
- className: e["styled-dialog-close"],
33
- children: [c, /* @__PURE__ */ i(f, {
34
- dataTest: `close-button-${d}`,
35
- variant: "textGray",
36
- size: "small",
37
- endIcon: /* @__PURE__ */ i(p, {
38
- width: 20,
39
- height: 20
40
- }),
41
- onClick: (y) => {
42
- l.onClose && l.onClose(y, "escapeKeyDown");
43
- },
44
- style: {
45
- color: "var(--colors-grey-800)",
46
- paddingRight: "6px",
47
- paddingLeft: "6px"
48
- },
49
- children: s
50
- })]
43
+ children: [(!!s || !!c || d) && /* @__PURE__ */ t("div", {
44
+ className: "flex w-full justify-between px-4 pt-4",
45
+ children: [/* @__PURE__ */ t("div", {
46
+ className: "flex flex-col justify-start gap-0.5",
47
+ children: [s && /* @__PURE__ */ l("div", {
48
+ className: "flex h-8 items-center text-sm font-normal leading-5 text-[var(--colors-grey-700)]",
49
+ children: s
50
+ }), c && /* @__PURE__ */ l("div", {
51
+ className: "flex text-2xl font-semibold leading-8 text-[var(--colors-grey-800)]",
52
+ children: c
53
+ })]
54
+ }), d && /* @__PURE__ */ t("div", {
55
+ className: "flex flex-grow justify-end gap-2",
56
+ children: [M, /* @__PURE__ */ l(R, {
57
+ dataTest: `close-button-${a}`,
58
+ variant: "textGray",
59
+ size: "small",
60
+ endIcon: /* @__PURE__ */ l(I, {
61
+ width: 20,
62
+ height: 20
63
+ }),
64
+ onClick: (e) => o?.(e, "escapeKeyDown"),
65
+ style: {
66
+ color: "var(--colors-grey-800)",
67
+ paddingRight: "6px",
68
+ paddingLeft: "6px"
69
+ },
70
+ children: j
51
71
  })]
52
- }) : null
53
- }), n]
72
+ })]
73
+ }), h]
54
74
  });
55
75
  };
56
76
  export {
57
- b as StyledDialog
77
+ O as StyledDialog
58
78
  };
@@ -1,11 +1,4 @@
1
- var l = {
2
- "styled-dialog-root": "_styled-dialog-root_1st3i_1",
3
- "styled-top-header": "_styled-top-header_1st3i_6",
4
- "styled-dialog-close": "_styled-dialog-close_1st3i_13",
5
- "styled-dialog-info": "_styled-dialog-info_1st3i_20",
6
- "styled-dialog-label": "_styled-dialog-label_1st3i_27",
7
- "styled-dialog-title": "_styled-dialog-title_1st3i_37"
8
- };
1
+ var l = "_StyledDialog_1q1f9_1", a = { StyledDialog: l };
9
2
  export {
10
- l as default
3
+ a as default
11
4
  };
@@ -1,23 +1,23 @@
1
- import { cn as l } from "../../../helpers/cn.js";
2
- import o from "./StyledDialogActions.module.js";
3
- import e from "react";
4
- import { DialogActions as r } from "@mui/material";
5
- import { jsx as i } from "react/jsx-runtime";
6
- var f = (t) => /* @__PURE__ */ i(r, {
7
- ...t,
1
+ import { resolveSx as d } from "../../../helpers/sx.js";
2
+ import m from "clsx";
3
+ import { Children as o } from "react";
4
+ import { jsx as e } from "react/jsx-runtime";
5
+ var g = ({ children: l, className: s, sx: a, style: i, classes: c, disableSpacing: n, ...t }) => /* @__PURE__ */ e("div", {
8
6
  "data-testid": "styled-dialog-actions",
9
- classes: {
10
- ...t.classes,
11
- root: o["styled-dialog-actions-root"]
7
+ className: "m-0 flex justify-center p-0",
8
+ style: {
9
+ ...d(a),
10
+ ...i
12
11
  },
13
- children: /* @__PURE__ */ i("div", {
14
- className: l(o["styled-dialog-actions"], t.className),
15
- children: e.Children.map(t.children, (a) => /* @__PURE__ */ i("div", {
16
- className: o["action-button-wrapper"],
17
- children: a
12
+ ...t,
13
+ children: /* @__PURE__ */ e("div", {
14
+ className: m("flex w-full justify-end gap-2 p-4", s),
15
+ children: o.map(l, (r) => /* @__PURE__ */ e("div", {
16
+ className: "max-md:flex-1 max-md:[&_button]:w-full",
17
+ children: r
18
18
  }))
19
19
  })
20
20
  });
21
21
  export {
22
- f as StyledDialogActions
22
+ g as StyledDialogActions
23
23
  };
@@ -1,16 +1,19 @@
1
- import n from "./StyledDialogContent.module.js";
2
- import { DialogContent as r } from "@mui/material";
3
- import { jsx as a } from "react/jsx-runtime";
4
- var s = ({ children: t, classes: o, className: e, ...l }) => /* @__PURE__ */ a(r, {
5
- ...l,
6
- "data-test": "styled-dialog-content",
7
- classes: {
8
- ...o,
9
- root: n["styled-dialog-content"]
10
- },
11
- className: e,
12
- children: t
13
- });
1
+ import { resolveSx as d } from "../../../helpers/sx.js";
2
+ import m from "clsx";
3
+ import { jsx as i } from "react/jsx-runtime";
4
+ var p = ({ children: e, className: o, sx: r, style: t, dividers: l, classes: c, ...s }) => {
5
+ const a = {
6
+ ...d(r),
7
+ ...t
8
+ };
9
+ return /* @__PURE__ */ i("div", {
10
+ "data-test": "styled-dialog-content",
11
+ className: m("w-full flex-auto overflow-y-auto p-4", l && "border-y border-solid border-[rgba(0,0,0,0.12)]", o),
12
+ style: a,
13
+ ...s,
14
+ children: e
15
+ });
16
+ };
14
17
  export {
15
- s as StyledDialogContent
18
+ p as StyledDialogContent
16
19
  };