asma-ui-core 3.34.0 → 3.35.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 +27 -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 +43 -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 +37 -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 +21 -2
  130. package/dist/src/components/navigation/menu/StyledMenu.d.ts +25 -2
  131. package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +21 -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 +31 -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,15 +1,20 @@
1
- import o from "./StyledDialogTitle.module.js";
2
- import { DialogTitle as e } from "@mui/material";
3
- import { jsx as i } from "react/jsx-runtime";
4
- var s = ({ children: t, ...l }) => t ? /* @__PURE__ */ i(e, {
5
- ...l,
6
- "data-testid": "styled-dialog-title",
7
- classes: {
8
- ...l.classes,
9
- root: o["styled-dialog-title-root"]
10
- },
11
- children: t
12
- }) : null;
1
+ import { resolveSx as a } from "../../../helpers/sx.js";
2
+ import i from "clsx";
3
+ import { jsx as m } from "react/jsx-runtime";
4
+ var n = ({ children: t, className: e, sx: l, style: s, classes: x, ...o }) => {
5
+ if (!t) return null;
6
+ const r = {
7
+ ...a(l),
8
+ ...s
9
+ };
10
+ return /* @__PURE__ */ m("h2", {
11
+ "data-testid": "styled-dialog-title",
12
+ className: i("mx-3 p-4 text-[20px] font-semibold leading-[20px]", e),
13
+ style: r,
14
+ ...o,
15
+ children: t
16
+ });
17
+ };
13
18
  export {
14
- s as StyledDialogTitle
19
+ n as StyledDialogTitle
15
20
  };
@@ -1,25 +1,24 @@
1
1
  import { cn as c } from "../../../helpers/cn.js";
2
- import { DotsVerticalIcon as de } from "../../icons/dots-vertical-icon/DotsVerticalIcon.js";
2
+ import { DotsVerticalIcon as ie } from "../../icons/dots-vertical-icon/DotsVerticalIcon.js";
3
3
  import { LoadingIcon as S } from "../../icons/loading-icon/LoadingIcon.js";
4
4
  import { CloseIcon as O } from "../../icons/close-icon/CloseIcon.js";
5
- import { MinimizeIcon as re } from "../../icons/minimize-icon/MinimizeIcon.js";
6
- import { KeyboardCapslockIcon as ne } from "../../icons/keyboard-capslock-icon/KeyboardCapslockIcon.js";
5
+ import { MinimizeIcon as le } from "../../icons/minimize-icon/MinimizeIcon.js";
6
+ import { KeyboardCapslockIcon as re } from "../../icons/keyboard-capslock-icon/KeyboardCapslockIcon.js";
7
7
  import { StyledTooltip as h } from "../../data-display/tooltip/StyledTooltip.js";
8
8
  import { StyledButton as i } from "../../inputs/button/StyledButton.js";
9
- import { StyledMenu as ae } from "../../navigation/menu/StyledMenu.js";
10
- import { StyledMenuItem as oe } from "../../navigation/menu/StyledMenuItem.js";
9
+ import { StyledMenu as de } from "../../navigation/menu/StyledMenu.js";
10
+ import { StyledMenuItem as ne } from "../../navigation/menu/StyledMenuItem.js";
11
11
  import T from "./MinimizableDialog.module.js";
12
- import { useToggleMenuVisibility as se } from "../../../hooks/useToggleMenuVisibility.hook.js";
13
- import { ArrowExpand as ce } from "../../icons/arrow-expand/ArrowExpand.js";
14
- import { ArrowShrink as he } from "../../icons/arrow-shrink/ArrowShrink.js";
12
+ import { useToggleMenuVisibility as ae } from "../../../hooks/useToggleMenuVisibility.hook.js";
13
+ import { ArrowExpand as oe } from "../../icons/arrow-expand/ArrowExpand.js";
14
+ import { ArrowShrink as se } from "../../icons/arrow-shrink/ArrowShrink.js";
15
15
  import V from "clsx";
16
16
  import { useState as $ } from "react";
17
- import { Fragment as z, jsx as e, jsxs as t } from "react/jsx-runtime";
18
- import { isArray as K, isFunction as L } from "lodash-es";
19
- var Ge = ({ onCloseText: N = "", onMinimizeText: R = "", onExpandText: U = "", onFullScreenText: q = "", showCloseIcon: k = !0, showMinimizeIcon: H = !0, showExpandIcon: J = !0, showFullScreenIcon: Q = !0, title: u, label: p, children: v, open: W, onClose: I, className: y = "", primaryButtonText: g, primaryButtonLoading: x = !1, secondaryButtonText: o, onPrimaryButtonClick: m, onSecondaryButtonClick: f, dataTest: M, actionNode: X, extraActions: l, extraActionsText: s, btnContainerClassName: j, footerClassName: Y, footerInfo: C, locale: n = "en", enableFullscreen: Z = !0, fullScreenState: F, handleFullScreenState: _ }) => {
20
- const [d, P] = $(!1), [G, A] = $(!1), { open: B, anchorEl: ee, handleOpen: te, handleClose: ie } = se();
21
- if (!W) return null;
22
- const a = F ?? G, b = a && !d, le = b ? {
17
+ import { Fragment as y, jsx as e, jsxs as t } from "react/jsx-runtime";
18
+ var Ce = ({ onCloseText: z = "", onMinimizeText: K = "", onExpandText: L = "", onFullScreenText: R = "", showCloseIcon: N = !0, showMinimizeIcon: U = !0, showExpandIcon: q = !0, showFullScreenIcon: H = !0, title: u, label: p, children: v, open: J, onClose: k, className: I = "", primaryButtonText: g, primaryButtonLoading: x = !1, secondaryButtonText: o, onPrimaryButtonClick: m, onSecondaryButtonClick: f, dataTest: M, actionNode: Q, extraActions: l, extraActionsText: s, btnContainerClassName: j, footerClassName: W, footerInfo: C, locale: n = "en", enableFullscreen: X = !0, fullScreenState: _, handleFullScreenState: F }) => {
19
+ const [r, Y] = $(!1), [G, Z] = $(!1), { open: A, anchorEl: P, handleOpen: B, handleClose: ee } = ae();
20
+ if (!J) return null;
21
+ const a = _ ?? G, b = a && !r, te = b ? {
23
22
  right: "auto",
24
23
  bottom: "auto",
25
24
  left: "50%",
@@ -28,56 +27,56 @@ var Ge = ({ onCloseText: N = "", onMinimizeText: R = "", onExpandText: U = "", o
28
27
  width: "min(1000px, calc(100vw - 32px))",
29
28
  height: "95dvh"
30
29
  } : void 0, w = g ?? x, D = w || o, E = () => {
31
- P(!d);
30
+ Y(!r);
32
31
  };
33
- return /* @__PURE__ */ t(z, { children: [
32
+ return /* @__PURE__ */ t(y, { children: [
34
33
  b && /* @__PURE__ */ e("div", { className: "fixed inset-0 z-[51] bg-[rgb(98,110,126)] bg-opacity-70" }),
35
34
  /* @__PURE__ */ e("div", {
36
35
  style: { zIndex: 51 },
37
- className: c(T.dialog, !d && T.hidden),
36
+ className: c(T.dialog, !r && T.hidden),
38
37
  children: /* @__PURE__ */ t("div", {
39
- className: V("flex items-center justify-between", !d && "hidden"),
38
+ className: V("flex items-center justify-between", !r && "hidden"),
40
39
  "data-testid": M,
41
40
  children: [/* @__PURE__ */ e("div", {
42
41
  className: "truncate text-lg font-semibold text-delta-800",
43
42
  children: u
44
43
  }), /* @__PURE__ */ t("div", {
45
44
  className: "flex items-center gap-x-1",
46
- children: [J && /* @__PURE__ */ e(h, {
45
+ children: [q && /* @__PURE__ */ e(h, {
47
46
  title: n === "en" ? "Expand" : "Utvid",
48
47
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(i, {
49
48
  dataTest: "minimize-button",
50
49
  variant: "text",
51
50
  size: "small",
52
51
  onClick: E,
53
- endIcon: /* @__PURE__ */ e(ne, {
52
+ endIcon: /* @__PURE__ */ e(re, {
54
53
  height: 20,
55
54
  width: 20,
56
55
  color: "text-gama-500"
57
56
  }),
58
- children: U
57
+ children: L
59
58
  }) })
60
- }), k && /* @__PURE__ */ e(h, {
59
+ }), N && /* @__PURE__ */ e(h, {
61
60
  title: n === "en" ? "Close" : "Lukk",
62
61
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(i, {
63
62
  dataTest: "close-button",
64
63
  variant: "textGray",
65
64
  size: "small",
66
- onClick: I,
65
+ onClick: k,
67
66
  endIcon: /* @__PURE__ */ e(O, {
68
67
  height: 20,
69
68
  width: 20,
70
69
  color: "text-delta-700"
71
70
  }),
72
- children: N
71
+ children: z
73
72
  }) })
74
73
  })]
75
74
  })]
76
75
  })
77
76
  }),
78
77
  /* @__PURE__ */ t("div", {
79
- style: le,
80
- className: c("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300", y && !d && !a ? y : "", d && "!h-0 !w-0 opacity-0 duration-0", b && "fixed duration-0"),
78
+ style: te,
79
+ className: c("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300", I && !r && !a ? I : "", r && "!h-0 !w-0 opacity-0 duration-0", b && "fixed duration-0"),
81
80
  "data-testid": M,
82
81
  children: [/* @__PURE__ */ t("div", {
83
82
  className: "flex flex-col gap-y-2 border-b-[1px] border-delta-200 p-4",
@@ -92,56 +91,56 @@ var Ge = ({ onCloseText: N = "", onMinimizeText: R = "", onExpandText: U = "", o
92
91
  }), /* @__PURE__ */ t("div", {
93
92
  className: "flex items-center gap-x-1",
94
93
  children: [
95
- X,
96
- H && /* @__PURE__ */ e(h, {
94
+ Q,
95
+ U && /* @__PURE__ */ e(h, {
97
96
  title: n === "en" ? "Minimize" : "Minimer",
98
97
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(i, {
99
98
  dataTest: "minimize-button",
100
99
  variant: "textGray",
101
100
  size: "small",
102
101
  onClick: E,
103
- endIcon: /* @__PURE__ */ e(re, {
102
+ endIcon: /* @__PURE__ */ e(le, {
104
103
  height: 20,
105
104
  width: 20,
106
105
  color: "text-delta-700"
107
106
  }),
108
- children: R
107
+ children: K
109
108
  }) })
110
109
  }),
111
- Z && Q && /* @__PURE__ */ e(h, {
110
+ X && H && /* @__PURE__ */ e(h, {
112
111
  title: a ? n === "en" ? "Exit full screen" : "Avslutt fullskjerm" : n === "en" ? "Full screen" : "Fullskjerm",
113
112
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(i, {
114
113
  dataTest: "fullscreen-button",
115
114
  variant: "textGray",
116
115
  size: "small",
117
- onClick: (r) => {
118
- F !== void 0 && _ ? _() : A(!G), r.detail !== 0 && r.currentTarget.blur();
116
+ onClick: (d) => {
117
+ _ !== void 0 && F ? F() : Z(!G), d.detail !== 0 && d.currentTarget.blur();
119
118
  },
120
- endIcon: a ? /* @__PURE__ */ e(he, {
119
+ endIcon: a ? /* @__PURE__ */ e(se, {
121
120
  width: 20,
122
121
  height: 20,
123
122
  color: "text-delta-700"
124
- }) : /* @__PURE__ */ e(ce, {
123
+ }) : /* @__PURE__ */ e(oe, {
125
124
  width: 20,
126
125
  height: 20,
127
126
  color: "text-delta-700"
128
127
  }),
129
- children: q
128
+ children: R
130
129
  }) })
131
130
  }),
132
- k && /* @__PURE__ */ e(h, {
131
+ N && /* @__PURE__ */ e(h, {
133
132
  title: n === "en" ? "Close" : "Lukk",
134
133
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(i, {
135
134
  dataTest: "close-button",
136
135
  variant: "textGray",
137
136
  size: "small",
138
- onClick: I,
137
+ onClick: k,
139
138
  endIcon: /* @__PURE__ */ e(O, {
140
139
  height: 20,
141
140
  width: 20,
142
141
  color: "text-delta-700"
143
142
  }),
144
- children: N
143
+ children: z
145
144
  }) })
146
145
  })
147
146
  ]
@@ -151,32 +150,32 @@ var Ge = ({ onCloseText: N = "", onMinimizeText: R = "", onExpandText: U = "", o
151
150
  children: u
152
151
  })]
153
152
  }), /* @__PURE__ */ t("div", {
154
- className: V("flex flex-col", a && !d && "h-[87dvh]"),
153
+ className: V("flex flex-col", a && !r && "h-[87dvh]"),
155
154
  children: [/* @__PURE__ */ e("div", {
156
155
  className: "flex-grow overflow-y-auto",
157
156
  children: typeof v == "function" ? v({ fullScreen: a }) : v
158
- }), (K(l) && l.length || L(l)) && s || C ? /* @__PURE__ */ t("div", {
159
- className: c("flex items-center justify-between border-0 border-t-[1px] border-solid border-delta-200 bg-white p-4", Y),
157
+ }), (Array.isArray(l) && l.length || typeof l == "function") && s || C ? /* @__PURE__ */ t("div", {
158
+ className: c("flex items-center justify-between border-0 border-t-[1px] border-solid border-delta-200 bg-white p-4", W),
160
159
  children: [
161
- K(l) && l.length && s ? /* @__PURE__ */ t(z, { children: [/* @__PURE__ */ e(i, {
160
+ Array.isArray(l) && l.length && s ? /* @__PURE__ */ t(y, { children: [/* @__PURE__ */ e(i, {
162
161
  dataTest: "extra-actions-button",
163
162
  variant: "textGray",
164
- startIcon: /* @__PURE__ */ e(de, {
163
+ startIcon: /* @__PURE__ */ e(ie, {
165
164
  width: 24,
166
165
  height: 24
167
166
  }),
168
- onClick: te,
167
+ onClick: B,
169
168
  children: s
170
- }), /* @__PURE__ */ e(ae, {
171
- open: B,
172
- anchorEl: ee,
173
- onClose: ie,
174
- children: l.map((r) => /* @__PURE__ */ e(oe, {
175
- className: r.className,
176
- onClick: r.onClick,
177
- children: r.label
178
- }, r.label))
179
- })] }) : s && L(l) && /* @__PURE__ */ e(i, {
169
+ }), /* @__PURE__ */ e(de, {
170
+ open: A,
171
+ anchorEl: P,
172
+ onClose: ee,
173
+ children: l.map((d) => /* @__PURE__ */ e(ne, {
174
+ className: d.className,
175
+ onClick: d.onClick,
176
+ children: d.label
177
+ }, d.label))
178
+ })] }) : s && typeof l == "function" && /* @__PURE__ */ e(i, {
180
179
  dataTest: "extra-action-button",
181
180
  variant: "text",
182
181
  onClick: l,
@@ -202,7 +201,7 @@ var Ge = ({ onCloseText: N = "", onMinimizeText: R = "", onExpandText: U = "", o
202
201
  })]
203
202
  }) : null
204
203
  ]
205
- }) : /* @__PURE__ */ e(z, { children: D ? /* @__PURE__ */ t("div", {
204
+ }) : /* @__PURE__ */ e(y, { children: D ? /* @__PURE__ */ t("div", {
206
205
  className: c("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4", j),
207
206
  children: [o && f && /* @__PURE__ */ e(i, {
208
207
  dataTest: "cancel-button",
@@ -224,5 +223,5 @@ var Ge = ({ onCloseText: N = "", onMinimizeText: R = "", onExpandText: U = "", o
224
223
  ] });
225
224
  };
226
225
  export {
227
- Ge as MinimizableDialog
226
+ Ce as MinimizableDialog
228
227
  };
@@ -1,17 +1,75 @@
1
- import { CheckOutlineIcon as r } from "./components/CheckOutlineIcon.js";
2
- import { Alert as e } from "@mui/material";
3
- import { jsx as t } from "react/jsx-runtime";
4
- var m = (i) => /* @__PURE__ */ t(e, {
5
- iconMapping: {
6
- success: /* @__PURE__ */ t(r, {
7
- height: 24,
8
- width: 24,
9
- fontSize: "inherit"
10
- }),
11
- ...i.iconMapping
1
+ import { cn as f } from "../../../helpers/cn.js";
2
+ import { resolveSx as g } from "../../../helpers/sx.js";
3
+ import { CloseIcon as m } from "../../icons/close-icon/CloseIcon.js";
4
+ import { CheckOutlineIcon as u } from "./components/CheckOutlineIcon.js";
5
+ import { ErrorOutlineIcon as b } from "./components/ErrorOutlineIcon.js";
6
+ import { InfoOutlineIcon as x } from "./components/InfoOutlineIcon.js";
7
+ import { WarningAmberOutlineIcon as w } from "./components/WarningAmberOutlineIcon.js";
8
+ import { jsx as r, jsxs as p } from "react/jsx-runtime";
9
+ var I = {
10
+ standard: {
11
+ success: "bg-success-50 text-success-700",
12
+ info: "bg-info-50 text-info-700",
13
+ warning: "bg-warning-50 text-warning-700",
14
+ error: "bg-error-50 text-error-700"
12
15
  },
13
- ...i
14
- });
16
+ filled: {
17
+ success: "bg-success-500 text-white",
18
+ info: "bg-info-500 text-white",
19
+ warning: "bg-warning-500 text-white",
20
+ error: "bg-error-500 text-white"
21
+ },
22
+ outlined: {
23
+ success: "border border-success-500 text-success-700",
24
+ info: "border border-info-500 text-info-700",
25
+ warning: "border border-warning-500 text-warning-700",
26
+ error: "border border-error-500 text-error-700"
27
+ }
28
+ }, A = {
29
+ success: /* @__PURE__ */ r(u, {
30
+ width: 24,
31
+ height: 24
32
+ }),
33
+ info: /* @__PURE__ */ r(x, {
34
+ width: 24,
35
+ height: 24
36
+ }),
37
+ warning: /* @__PURE__ */ r(w, {
38
+ width: 24,
39
+ height: 24
40
+ }),
41
+ error: /* @__PURE__ */ r(b, {
42
+ width: 24,
43
+ height: 24
44
+ })
45
+ }, E = ({ severity: e = "success", variant: i = "standard", icon: t, iconMapping: s, action: c, onClose: n, children: a, className: l, sx: d, role: h = "alert" }) => {
46
+ const o = t === !1 ? null : t ?? s?.[e] ?? A[e];
47
+ return /* @__PURE__ */ p("div", {
48
+ role: h,
49
+ className: f("flex items-center gap-2 rounded-lg px-4 py-2 text-sm", I[i][e], l),
50
+ style: g(d),
51
+ children: [
52
+ o && /* @__PURE__ */ r("span", {
53
+ className: "flex shrink-0 items-center",
54
+ children: o
55
+ }),
56
+ /* @__PURE__ */ r("span", {
57
+ className: "min-w-0 flex-1",
58
+ children: a
59
+ }),
60
+ c ?? (n && /* @__PURE__ */ r("button", {
61
+ type: "button",
62
+ "aria-label": "Close",
63
+ onClick: n,
64
+ className: "flex shrink-0 items-center justify-center rounded-full p-1 hover:bg-black/10",
65
+ children: /* @__PURE__ */ r(m, {
66
+ width: 18,
67
+ height: 18
68
+ })
69
+ }))
70
+ ]
71
+ });
72
+ };
15
73
  export {
16
- m as StyledAlert
74
+ E as StyledAlert
17
75
  };
@@ -1,10 +1,36 @@
1
- import { Snackbar as t } from "@mui/material";
2
- import { jsx as o } from "react/jsx-runtime";
3
- var d = ({ children: a, ...r }) => /* @__PURE__ */ o(t, {
4
- autoHideDuration: r.autoHideDuration ?? 3e3,
5
- ...r,
6
- children: a && /* @__PURE__ */ o("div", { children: a })
7
- });
1
+ import { cn as c } from "../../../helpers/cn.js";
2
+ import { useEffect as p } from "react";
3
+ import { jsx as l, jsxs as x } from "react/jsx-runtime";
4
+ import { FloatingPortal as h } from "@floating-ui/react";
5
+ var b = {
6
+ "top-left": "top-6 left-6",
7
+ "top-center": "top-6 left-1/2 -translate-x-1/2",
8
+ "top-right": "top-6 right-6",
9
+ "bottom-left": "bottom-6 left-6",
10
+ "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
11
+ "bottom-right": "bottom-6 right-6"
12
+ }, S = ({ open: t = !1, autoHideDuration: e = 3e3, onClose: r, anchorOrigin: o = {
13
+ vertical: "bottom",
14
+ horizontal: "left"
15
+ }, message: i, action: m, children: a, className: f }) => {
16
+ if (p(() => {
17
+ if (!t || e == null) return;
18
+ const s = setTimeout(() => r?.(null, "timeout"), e);
19
+ return () => clearTimeout(s);
20
+ }, [
21
+ t,
22
+ e,
23
+ r
24
+ ]), !t) return null;
25
+ const n = b[`${o.vertical}-${o.horizontal}`];
26
+ return /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l("div", {
27
+ className: c("fixed z-[1400] flex items-center gap-2", n, f),
28
+ children: a ?? /* @__PURE__ */ x("div", {
29
+ className: "flex items-center gap-2 rounded-lg bg-delta-800 px-4 py-3 text-sm text-white shadow-lg",
30
+ children: [i, m]
31
+ })
32
+ }) });
33
+ };
8
34
  export {
9
- d as StyledSnackbar
35
+ S as StyledSnackbar
10
36
  };
@@ -1,73 +1,72 @@
1
1
  import { omit as f } from "../../../../helpers/omit.js";
2
- import { CloseIcon as p } from "../../../icons/close-icon/CloseIcon.js";
3
- import { CheckOutlineIcon as u } from "./CheckOutlineIcon.js";
2
+ import { CloseIcon as u } from "../../../icons/close-icon/CloseIcon.js";
3
+ import { CheckOutlineIcon as p } from "./CheckOutlineIcon.js";
4
4
  import { ErrorOutlineIcon as g } from "./ErrorOutlineIcon.js";
5
- import { InfoOutlineIcon as I } from "./InfoOutlineIcon.js";
6
- import { WarningAmberOutlineIcon as S } from "./WarningAmberOutlineIcon.js";
7
- import i from "./StyledDefaultSnackbar.module.js";
8
- import t from "clsx";
9
- import { forwardRef as v } from "react";
10
- import { IconButton as b } from "@mui/material";
11
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
12
- import { SnackbarContent as k, useSnackbar as w } from "notistack";
13
- var x = {
14
- info: /* @__PURE__ */ r(I, {
5
+ import { InfoOutlineIcon as b } from "./InfoOutlineIcon.js";
6
+ import { WarningAmberOutlineIcon as v } from "./WarningAmberOutlineIcon.js";
7
+ import r from "./StyledDefaultSnackbar.module.js";
8
+ import o from "clsx";
9
+ import { forwardRef as I } from "react";
10
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
11
+ import { SnackbarContent as S, useSnackbar as k } from "notistack";
12
+ var w = {
13
+ info: /* @__PURE__ */ e(b, {
15
14
  height: 24,
16
15
  width: 24
17
16
  }),
18
- error: /* @__PURE__ */ r(g, {
17
+ error: /* @__PURE__ */ e(g, {
19
18
  height: 24,
20
19
  width: 24
21
20
  }),
22
- success: /* @__PURE__ */ r(u, {
21
+ success: /* @__PURE__ */ e(p, {
23
22
  height: 24,
24
23
  width: 24
25
24
  }),
26
- warning: /* @__PURE__ */ r(S, {
25
+ warning: /* @__PURE__ */ e(v, {
27
26
  height: 24,
28
27
  width: 24
29
28
  })
30
- }, B = v((c, l) => {
31
- const { id: a, message: m, severity: e, action: o, title: s, ...h } = f(c, [
29
+ }, R = I((c, l) => {
30
+ const { id: a, message: s, severity: t, action: i, title: m, ...d } = f(c, [
32
31
  "anchorOrigin",
33
32
  "autoHideDuration",
34
33
  "hideIconVariant",
35
34
  "iconVariant",
36
35
  "persist"
37
- ]), { closeSnackbar: d } = w();
38
- return /* @__PURE__ */ r(k, {
36
+ ]), { closeSnackbar: h } = k();
37
+ return /* @__PURE__ */ e(S, {
39
38
  ref: l,
40
39
  role: "alert",
41
- ...h,
40
+ ...d,
42
41
  children: /* @__PURE__ */ n("div", {
43
- className: t(i.container, i[e]),
42
+ className: o(r.container, r[t]),
44
43
  children: [
45
44
  /* @__PURE__ */ n("div", {
46
- className: i.header,
45
+ className: r.header,
47
46
  children: [/* @__PURE__ */ n("div", {
48
- className: t(i.title, i[`title_${e}`]),
49
- children: [x[e], /* @__PURE__ */ r("span", { children: s ?? e })]
50
- }), /* @__PURE__ */ r(b, {
47
+ className: o(r.title, r[`title_${t}`]),
48
+ children: [w[t], /* @__PURE__ */ e("span", { children: m ?? t })]
49
+ }), /* @__PURE__ */ e("button", {
50
+ type: "button",
51
51
  "aria-label": "close",
52
- color: "inherit",
53
- sx: { p: "2px" },
54
- onClick: () => d(a),
55
- children: /* @__PURE__ */ r(p, {
52
+ className: "flex items-center justify-center rounded-full p-[2px] hover:bg-black/10",
53
+ onClick: () => h(a),
54
+ children: /* @__PURE__ */ e(u, {
56
55
  width: 20,
57
56
  height: 20,
58
57
  color: "#49525F"
59
58
  })
60
59
  })]
61
60
  }),
62
- /* @__PURE__ */ r("div", {
63
- className: t(i.message, i[`message_${e}`]),
64
- children: m
61
+ /* @__PURE__ */ e("div", {
62
+ className: o(r.message, r[`message_${t}`]),
63
+ children: s
65
64
  }),
66
- o ? /* @__PURE__ */ r("div", { children: typeof o == "function" ? o(a) : o }) : null
65
+ i ? /* @__PURE__ */ e("div", { children: typeof i == "function" ? i(a) : i }) : null
67
66
  ]
68
67
  })
69
68
  });
70
69
  });
71
70
  export {
72
- B as StyledDefaultSnackbar
71
+ R as StyledDefaultSnackbar
73
72
  };