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,33 +1,28 @@
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
- })]
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
+ }
29
24
  });
30
25
  };
31
26
  export {
32
- C as StyledBadge
27
+ x as StyledBadge
33
28
  };
@@ -1,47 +1,62 @@
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
- });
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: "var(--font-size-body-base)",
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
+ }));
45
60
  export {
46
- D as StyledChip
61
+ m as StyledChip
47
62
  };
@@ -1,41 +1,47 @@
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,
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,
14
14
  "aria-label": t,
15
- avatar: r ? /* @__PURE__ */ o(m, {
16
- dataTest: a.dataTest,
15
+ avatar: /* @__PURE__ */ e(s, {
16
+ dataTest: o.dataTest,
17
17
  disableRipple: !0,
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"
18
+ checked: a,
19
+ size: c,
20
+ sx: { pointerEvents: "none" },
21
+ slotProps: { input: { "aria-label": t } }
29
22
  }),
30
23
  clickable: !0,
31
24
  tabIndex: 0,
32
- ...a,
33
- sx: s ? {
34
- ...v,
35
- ...a.sx
36
- } : a.sx
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
+ }
37
43
  });
38
44
  });
39
45
  export {
40
- g as StyledInteractiveChip
46
+ S as StyledInteractiveChip
41
47
  };
@@ -1,54 +1,37 @@
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)
1
+ import { Tooltip as i } from "@mui/material";
2
+ import { jsx as p } from "react/jsx-runtime";
3
+ import { mergeSlotProps as r } from "@mui/material/utils";
4
+ import l from "@mui/material/Fade";
5
+ var s = {
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: "var(--font-size-body-sm)",
14
+ lineHeight: "var(--line-height-body-sm)",
15
+ letterSpacing: "0.24px",
16
+ bgcolor: "#363E4A",
17
+ wordBreak: "break-word"
18
+ }, d = (e) => {
19
+ const { slotProps: o, ...t } = e;
20
+ return /* @__PURE__ */ p(i, {
21
+ enterDelay: 500,
22
+ placement: "top",
23
+ ...t,
24
+ slots: {
25
+ transition: l,
26
+ ...t.slots
42
27
  },
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
- }) })] });
28
+ slotProps: {
29
+ ...o,
30
+ transition: r(o?.transition, { timeout: 300 }),
31
+ tooltip: r(o?.tooltip, { sx: s })
32
+ }
33
+ });
51
34
  };
52
35
  export {
53
- ee as StyledTooltip
36
+ d as StyledTooltip
54
37
  };
@@ -1,64 +1,6 @@
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
- };
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 });
62
4
  export {
63
- C as StyledTypography
5
+ t as StyledTypography
64
6
  };
@@ -1,78 +1,58 @@
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: o, onClose: r, children: h, dataTest: a, maxWidth: i = "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: n, dialogTitle: s, dialogHeaderNode: M }) => {
16
- const _ = z(), c = W(null), f = _ ? !0 : g;
17
- P(() => {
18
- const e = c.current;
19
- e && (o && !e.open ? e.showModal() : !o && e.open && e.close());
20
- }, [o]);
21
- const m = {
22
- ...C,
23
- ...S?.paper
24
- }, x = i === !1 ? void 0 : X[i];
25
- return /* @__PURE__ */ t("dialog", {
26
- ref: c,
27
- "data-testid": a,
28
- "aria-label": a,
29
- onCancel: (e) => {
30
- e.preventDefault(), v || r?.(e, "escapeKeyDown");
31
- },
32
- onClick: (e) => {
33
- e.target === c.current && r?.(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" : "open:flex open:flex-col", b, m.className, k?.paper),
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,
36
12
  style: {
37
13
  zIndex: 999,
38
- ...x && !f ? { maxWidth: x } : {},
39
- ...u(N),
40
- ...u(m.sx),
41
- ...D
14
+ ...l.style
42
15
  },
43
- children: [(!!n || !!s || 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: [n && /* @__PURE__ */ l("div", {
48
- className: "flex h-8 items-center text-sm font-normal leading-5 text-[var(--colors-grey-700)]",
49
- children: n
50
- }), s && /* @__PURE__ */ l("div", {
51
- className: "flex text-2xl font-semibold leading-8 text-[var(--colors-grey-800)]",
52
- children: s
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) => r?.(e, "escapeKeyDown"),
65
- style: {
66
- color: "var(--colors-grey-800)",
67
- paddingRight: "6px",
68
- paddingLeft: "6px"
69
- },
70
- children: j
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
+ })]
71
51
  })]
72
- })]
73
- }), h]
52
+ }) : null
53
+ }), n]
74
54
  });
75
55
  };
76
56
  export {
77
- O as StyledDialog
57
+ b as StyledDialog
78
58
  };
@@ -1,4 +1,11 @@
1
- var l = "_StyledDialog_1q1f9_1", a = { StyledDialog: l };
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
+ };
2
9
  export {
3
- a as default
10
+ l as default
4
11
  };
@@ -1,23 +1,23 @@
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", {
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,
6
8
  "data-testid": "styled-dialog-actions",
7
- className: "m-0 flex justify-center p-0",
8
- style: {
9
- ...d(a),
10
- ...i
9
+ classes: {
10
+ ...t.classes,
11
+ root: o["styled-dialog-actions-root"]
11
12
  },
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
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
18
18
  }))
19
19
  })
20
20
  });
21
21
  export {
22
- g as StyledDialogActions
22
+ f as StyledDialogActions
23
23
  };
@@ -0,0 +1,8 @@
1
+ var t = {
2
+ "styled-dialog-actions-root": "_styled-dialog-actions-root_3l3r7_1",
3
+ "styled-dialog-actions": "_styled-dialog-actions_3l3r7_1",
4
+ "action-button-wrapper": "_action-button-wrapper_3l3r7_17"
5
+ };
6
+ export {
7
+ t as default
8
+ };