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,26 @@
1
- import { cn as A } from "../../../../helpers/cn.js";
2
- import I from "./StyledAccordion.module.js";
3
- import { AccordionContext as S } from "./AccordionContext.js";
4
- import { useId as l, useMemo as y, useState as C } from "react";
5
- import { jsx as s } from "react/jsx-runtime";
6
- var N = ({ className: d, children: m, expanded: t, defaultExpanded: p, disabled: e, onChange: u, ...f }) => {
7
- const n = l(), r = l(), c = t !== void 0, [a, v] = C(!!p), o = c ? !!t : a, g = () => {
8
- const i = !o;
9
- c || v(i), u?.(i);
10
- }, x = y(() => ({
11
- open: o,
12
- toggle: g,
13
- disabled: e,
14
- triggerId: n,
15
- panelId: r
16
- }), [
17
- o,
18
- e,
19
- n,
20
- r
21
- ]);
22
- return /* @__PURE__ */ s("div", {
23
- ...f,
24
- className: A(I.AccordionRoot, d),
25
- children: /* @__PURE__ */ s(S.Provider, {
26
- value: x,
27
- children: m
1
+ import { cn as u } from "../../../../helpers/cn.js";
2
+ import s from "./StyledAccordion.module.js";
3
+ import "react";
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ import { Accordion as e } from "@base-ui/react/accordion";
6
+ var g = ({ className: c, children: i, expanded: r, defaultExpanded: l, onChange: m, ...n }) => {
7
+ const o = "item", d = {
8
+ ...n,
9
+ type: "single",
10
+ className: u(s.AccordionRoot, c),
11
+ onValueChange: (a) => {
12
+ m?.(a.includes(o));
13
+ },
14
+ ...r !== void 0 ? { value: r ? [o] : [] } : { defaultValue: l ? [o] : [] }
15
+ };
16
+ return /* @__PURE__ */ t(e.Root, {
17
+ ...d,
18
+ children: /* @__PURE__ */ t(e.Item, {
19
+ value: o,
20
+ children: i
28
21
  })
29
22
  });
30
23
  };
31
24
  export {
32
- N as StyledAccordion
25
+ g as StyledAccordion
33
26
  };
@@ -1,12 +1,12 @@
1
- var r = "_AccordionRoot_p579g_1", _ = "_Trigger_p579g_9", g = "_Header_p579g_18", e = "_TriggerIcon_p579g_40", o = "_TriggerIconRight_p579g_48", a = "_Panel_p579g_56", n = "_Content_p579g_64", t = {
1
+ var r = "_AccordionRoot_wzlmo_1", o = "_Trigger_wzlmo_9", _ = "_Header_wzlmo_18", e = "_TriggerIcon_wzlmo_40", a = "_TriggerIconRight_wzlmo_48", g = "_Panel_wzlmo_56", l = "_Content_wzlmo_67", n = {
2
2
  AccordionRoot: r,
3
- Trigger: _,
4
- Header: g,
3
+ Trigger: o,
4
+ Header: _,
5
5
  TriggerIcon: e,
6
- TriggerIconRight: o,
7
- Panel: a,
8
- Content: n
6
+ TriggerIconRight: a,
7
+ Panel: g,
8
+ Content: l
9
9
  };
10
10
  export {
11
- t as default
11
+ n as default
12
12
  };
@@ -1,30 +1,16 @@
1
- import n from "./StyledAccordion.module.js";
2
- import { useAccordionContext as g } from "./AccordionContext.js";
3
- import { clsx as s } from "clsx";
4
- import { useEffect as h, useRef as v, useState as x } from "react";
5
- import { jsx as c } from "react/jsx-runtime";
6
- var C = ({ children: r, className: i, contentClassName: l, ...a }) => {
7
- const { open: d, panelId: m, triggerId: u } = g(), e = v(null), [f, p] = x(0);
8
- return h(() => {
9
- if (!e.current) return;
10
- const t = () => p(e.current?.scrollHeight ?? 0);
11
- t();
12
- const o = new ResizeObserver(t);
13
- return o.observe(e.current), () => o.disconnect();
14
- }, [r]), /* @__PURE__ */ c("div", {
15
- ...a,
16
- id: m,
17
- role: "region",
18
- "aria-labelledby": u,
19
- className: s(n.Panel, i),
20
- style: { "--accordion-panel-height": d ? `${f}px` : "0px" },
21
- children: /* @__PURE__ */ c("div", {
22
- ref: e,
23
- className: s(n.Content, l),
24
- children: r
25
- })
26
- });
27
- };
1
+ import o from "./StyledAccordion.module.js";
2
+ import { clsx as r } from "clsx";
3
+ import "react";
4
+ import { jsx as e } from "react/jsx-runtime";
5
+ import { Accordion as c } from "@base-ui/react/accordion";
6
+ var f = ({ children: m, className: t, contentClassName: i, ...l }) => /* @__PURE__ */ e(c.Panel, {
7
+ ...l,
8
+ className: r(o.Panel, t),
9
+ children: /* @__PURE__ */ e("div", {
10
+ className: r(o.Content, i),
11
+ children: m
12
+ })
13
+ });
28
14
  export {
29
- C as StyledAccordionDetails
15
+ f as StyledAccordionDetails
30
16
  };
@@ -1,39 +1,35 @@
1
- import { ChevronDownIcon as b } from "../../../icons/chevron-down-icon/ChevronDownIcon.js";
2
- import e from "./StyledAccordion.module.js";
3
- import { useAccordionContext as A } from "./AccordionContext.js";
1
+ import { ChevronDownIcon as a } from "../../../icons/chevron-down-icon/ChevronDownIcon.js";
2
+ import r from "./StyledAccordion.module.js";
4
3
  import o from "clsx";
5
4
  import "react";
6
- import { Fragment as c, jsx as t, jsxs as l } from "react/jsx-runtime";
7
- var _ = ({ size: d = "large", expandChevronRight: i, className: g, headerClassName: m, sx: p, children: n, onClick: x, ...h }) => {
8
- const { open: a, toggle: u, disabled: f, triggerId: y, panelId: I } = A(), r = d === "small", v = {
9
- "--trigger-height": r ? "48px" : "72px",
10
- "--trigger-padding-x": r ? "8px" : "16px",
11
- "--trigger-font-size": r ? "14px" : "18px",
12
- "--chevron-size": r ? "20px" : "24px",
5
+ import { Fragment as n, jsx as e, jsxs as s } from "react/jsx-runtime";
6
+ import { Accordion as c } from "@base-ui/react/accordion";
7
+ var N = ({ size: g = "large", expandChevronRight: m, className: l, headerClassName: d, sx: p, children: i, ...x }) => {
8
+ const t = g === "small", f = {
9
+ "--trigger-height": t ? "48px" : "72px",
10
+ "--trigger-padding-x": t ? "8px" : "16px",
11
+ "--trigger-font-size": t ? "14px" : "18px",
12
+ "--chevron-size": t ? "20px" : "24px",
13
13
  ...p
14
- }, s = /* @__PURE__ */ t(b, {
15
- className: o(e.TriggerIcon, i && e.TriggerIconRight),
16
- "data-state-icon": !0
17
- });
18
- return /* @__PURE__ */ t("h3", {
19
- className: o(e.Header, m),
20
- children: /* @__PURE__ */ t("button", {
21
- ...h,
22
- type: "button",
23
- id: y,
24
- "aria-expanded": a,
25
- "aria-controls": I,
26
- disabled: f,
27
- onClick: (S) => {
28
- x?.(S), u();
29
- },
30
- className: o(e.Trigger, g),
31
- style: v,
32
- "data-panel-open": a ? "" : void 0,
33
- children: i ? /* @__PURE__ */ l(c, { children: [n, s] }) : /* @__PURE__ */ l(c, { children: [s, n] })
14
+ };
15
+ return /* @__PURE__ */ e(c.Header, {
16
+ className: o(r.Header, d),
17
+ children: /* @__PURE__ */ e(c.Trigger, {
18
+ ...x,
19
+ nativeButton: !1,
20
+ render: /* @__PURE__ */ e("div", {}),
21
+ className: o(r.Trigger, l),
22
+ style: f,
23
+ children: m ? /* @__PURE__ */ s(n, { children: [i, /* @__PURE__ */ e(a, {
24
+ className: o(r.TriggerIcon, r.TriggerIconRight),
25
+ "data-state-icon": !0
26
+ })] }) : /* @__PURE__ */ s(n, { children: [/* @__PURE__ */ e(a, {
27
+ className: r.TriggerIcon,
28
+ "data-state-icon": !0
29
+ }), i] })
34
30
  })
35
31
  });
36
32
  };
37
33
  export {
38
- _ as StyledAccordionSummary
34
+ N as StyledAccordionSummary
39
35
  };
@@ -1,46 +1,17 @@
1
- import { cn as w } from "../../../helpers/cn.js";
2
- import { resolveSx as l } from "../../../helpers/sx.js";
3
- import { useMemo as x } from "react";
4
- import { jsx as i } from "react/jsx-runtime";
5
- import { FloatingPortal as z, autoUpdate as R, flip as A, offset as D, shift as M, useDismiss as N, useFloating as S, useInteractions as k, useMergeRefs as C } from "@floating-ui/react";
6
- var E = {
7
- vertical: "bottom",
8
- horizontal: "left"
9
- }, P = {
10
- vertical: "top",
11
- horizontal: "left"
12
- }, T = (e, t) => `${t.vertical === "bottom" ? "top" : t.vertical === "top" ? "bottom" : e.vertical === "top" ? "top" : "bottom"}${e.horizontal === "left" ? "-start" : e.horizontal === "right" ? "-end" : ""}`, j = ({ open: e, anchorEl: t, onClose: s, anchorOrigin: r = E, transformOrigin: a = P, id: n, className: p, sx: m, slotProps: o, onClick: c, children: f }) => {
13
- const { refs: d, floatingStyles: u, context: v } = S({
14
- open: e,
15
- placement: x(() => T(r, a), [r, a]),
16
- whileElementsMounted: R,
17
- elements: { reference: t ?? void 0 },
18
- middleware: [
19
- D(4),
20
- A({ padding: 8 }),
21
- M({ padding: 8 })
22
- ],
23
- onOpenChange: (y, F, b) => {
24
- y || s?.(F ?? {}, b === "escape-key" ? "escapeKeyDown" : "backdropClick");
25
- }
26
- }), { getFloatingProps: g } = k([N(v, {
27
- outsidePress: !0,
28
- escapeKey: !0
29
- })]), h = C([d.setFloating]);
30
- return e ? /* @__PURE__ */ i(z, { children: /* @__PURE__ */ i("div", {
31
- ref: h,
32
- id: n,
33
- style: {
34
- ...u,
35
- ...l(m),
36
- ...l(o?.paper?.sx),
37
- ...o?.paper?.style
38
- },
39
- ...g({ onClick: c }),
40
- className: w("z-[1300] overflow-auto rounded bg-white shadow-lg", p ?? "my-1", o?.paper?.className),
41
- children: f
42
- }) }) : null;
43
- };
1
+ import { Popover as a } from "@mui/material";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ var n = ({ anchorOrigin: o, transformOrigin: r, className: t, ...i }) => /* @__PURE__ */ e(a, {
4
+ anchorOrigin: o ?? {
5
+ vertical: "bottom",
6
+ horizontal: "left"
7
+ },
8
+ transformOrigin: r ?? {
9
+ vertical: "top",
10
+ horizontal: "left"
11
+ },
12
+ className: t ?? "my-1",
13
+ ...i
14
+ });
44
15
  export {
45
- j as StyledPopover
16
+ n as StyledPopover
46
17
  };
@@ -3,17 +3,17 @@ import { StyledDayPicker as k } from "./components/StyledDayPicker.js";
3
3
  import { StyledCalendarPicker as u } from "./components/StyledCalendarPicker.js";
4
4
  import { DatePickerInputIndex as x } from "./components/DatePickerInputIndex.js";
5
5
  import { useIsMobileView as C } from "../../hooks/useWindowWidthSize.hook.js";
6
- import { StyledDrawer as h } from "../../../components/navigation/drawer/StyledDrawer.js";
7
- import { useBackNavigationClose as v } from "../../hooks/useBackNavigationClose.hook.js";
6
+ import { useBackNavigationClose as h } from "../../hooks/useBackNavigationClose.hook.js";
8
7
  import { useState as s } from "react";
9
- import { Fragment as b, jsx as o, jsxs as y } from "react/jsx-runtime";
8
+ import { Drawer as v } from "@mui/material";
9
+ import { Fragment as b, jsx as o, jsxs as D } from "react/jsx-runtime";
10
10
  var j = (c) => {
11
11
  const a = C(), [e, n] = s(null), [p, m] = s(!1), [d, i] = s(!1), P = (l) => {
12
12
  n(l.currentTarget), f(l, m);
13
13
  }, r = () => {
14
14
  i(!0), n(null);
15
15
  };
16
- v({
16
+ h({
17
17
  open: !!e,
18
18
  onClose: r
19
19
  });
@@ -22,7 +22,7 @@ var j = (c) => {
22
22
  validateOnCalendarClose: d,
23
23
  onValidatedOnce: () => i(!1)
24
24
  };
25
- return /* @__PURE__ */ y(b, { children: [
25
+ return /* @__PURE__ */ D(b, { children: [
26
26
  /* @__PURE__ */ o(x, {
27
27
  datePickerProps: t,
28
28
  onClick: P
@@ -36,7 +36,7 @@ var j = (c) => {
36
36
  },
37
37
  positionAbove: p
38
38
  }),
39
- a && /* @__PURE__ */ o(h, {
39
+ a && /* @__PURE__ */ o(v, {
40
40
  anchor: "bottom",
41
41
  open: !!e,
42
42
  onClose: r,
@@ -1,5 +1,5 @@
1
- import { StyledInputField as G } from "../../../../components/inputs/input-field/StyledInputField.js";
2
1
  import { getValue as x } from "../helpers.js";
2
+ import { StyledInputField as G } from "../../../shared-components/StyledInputField.js";
3
3
  import { cn as J } from "../../../helpers/cn.js";
4
4
  import { DatePickerButton as K } from "./DatePickerButton.js";
5
5
  import { useDatePickerMask as L } from "../hooks/useDatePickerMask.js";
@@ -1,6 +1,6 @@
1
- import { StyledTooltip as a } from "../../../../components/data-display/tooltip/StyledTooltip.js";
2
- import { cn as s } from "../../../helpers/cn.js";
3
- import { OutlineErrorRounded as m } from "../../../shared-components/OutlineErrorRounded.js";
1
+ import { cn as a } from "../../../helpers/cn.js";
2
+ import { OutlineErrorRounded as s } from "../../../shared-components/OutlineErrorRounded.js";
3
+ import { StyledTooltip as m } from "../../../shared-components/StyledTooltip.js";
4
4
  import "react";
5
5
  import { Fragment as d, jsx as r, jsxs as p } from "react/jsx-runtime";
6
6
  var b = ({ text: e, hasError: i }) => {
@@ -8,8 +8,8 @@ var b = ({ text: e, hasError: i }) => {
8
8
  const t = i ? 35 : 40, o = e.length > t, n = o ? e.slice(0, t) + "…" : e, l = /* @__PURE__ */ p("div", {
9
9
  className: "flex items-start gap-1",
10
10
  children: [/* @__PURE__ */ r("div", {
11
- className: s("flex", "transform-gpu transition-all duration-300 ease-in-out"),
12
- children: i && /* @__PURE__ */ r(m, {
11
+ className: a("flex", "transform-gpu transition-all duration-300 ease-in-out"),
12
+ children: i && /* @__PURE__ */ r(s, {
13
13
  width: 20,
14
14
  height: 20,
15
15
  color: "var(--colors-error-500)"
@@ -27,7 +27,7 @@ var b = ({ text: e, hasError: i }) => {
27
27
  children: n
28
28
  })]
29
29
  });
30
- return o ? /* @__PURE__ */ r(a, {
30
+ return o ? /* @__PURE__ */ r(m, {
31
31
  title: e,
32
32
  placement: "right",
33
33
  arrow: !0,
@@ -1,25 +1,25 @@
1
- import { StyledPopover as n } from "../../../../components/utils/popover/StyledPopover.js";
2
- import { StyledDayPicker as c } from "./StyledDayPicker.js";
1
+ import { StyledDayPicker as n } from "./StyledDayPicker.js";
2
+ import { Popover as c } from "@mui/material";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
- var h = ({ datePickerProps: e, popoverProps: t, positionAbove: o }) => {
5
- const { open: l, anchorEl: i, onClose: a } = t;
6
- return /* @__PURE__ */ r(n, {
7
- open: l,
8
- anchorEl: i,
4
+ var h = ({ datePickerProps: e, popoverProps: o, positionAbove: t }) => {
5
+ const { open: i, anchorEl: l, onClose: a } = o;
6
+ return /* @__PURE__ */ r(c, {
7
+ open: i,
8
+ anchorEl: l,
9
9
  onClose: a,
10
10
  anchorOrigin: {
11
- vertical: o ? "top" : 50,
11
+ vertical: t ? "top" : 50,
12
12
  horizontal: "left"
13
13
  },
14
14
  transformOrigin: {
15
- vertical: o ? "bottom" : "top",
15
+ vertical: t ? "bottom" : "top",
16
16
  horizontal: "left"
17
17
  },
18
18
  children: /* @__PURE__ */ r("div", {
19
19
  className: "p-4",
20
- children: /* @__PURE__ */ r(c, {
20
+ children: /* @__PURE__ */ r(n, {
21
21
  datePickerProps: e,
22
- popoverProps: t
22
+ popoverProps: o
23
23
  })
24
24
  })
25
25
  });
@@ -2,10 +2,11 @@ import { ChevronLeftIcon as c } from "../../../shared-components/ChevronLeftIcon
2
2
  import { ChevronRightIcon as f } from "../../../shared-components/ChevronRightIcon.js";
3
3
  import { StyledButton as a } from "../../../shared-components/button/StyledButton.js";
4
4
  import { jsx as t, jsxs as s } from "react/jsx-runtime";
5
- import { useNavigation as y } from "react-day-picker";
6
- import { isDate as v, isValid as u } from "date-fns";
7
- var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, onClear: d, required: p }) => {
8
- const { nextMonth: n, previousMonth: r } = y();
5
+ import { useNavigation as v } from "react-day-picker";
6
+ import { isDate as y, isValid as x } from "date-fns";
7
+ import { compact as u, isArray as g, isObject as C } from "lodash-es";
8
+ var W = ({ onClose: m, isNb: l, selected: i, removeSelection: h, setMonth: e, onClear: d, required: p }) => {
9
+ const { nextMonth: n, previousMonth: r } = v();
9
10
  return /* @__PURE__ */ s("div", {
10
11
  style: {
11
12
  marginTop: "8px",
@@ -17,12 +18,12 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
17
18
  dataTest: "",
18
19
  variant: "text",
19
20
  onClick: (o) => {
20
- d ? d() : h(o), l(new Date(Date.now()));
21
+ d ? d() : h(o), e(new Date(Date.now()));
21
22
  },
22
23
  size: "small",
23
- disabled: !!p || i === null || Array.isArray(i) && i.length === 0 || v(i) && !u(i) || typeof i == "object" && i !== null && !Object.values(i).filter(Boolean).length,
24
+ disabled: !!p || i === null || g(i) && i.length === 0 || y(i) && !x(i) || C(i) && !u(Object.values(i)).length,
24
25
  style: { minWidth: "60px" },
25
- children: e ? "Nullstill" : "Clear"
26
+ children: l ? "Nullstill" : "Clear"
26
27
  }),
27
28
  /* @__PURE__ */ s("div", {
28
29
  style: {
@@ -36,7 +37,7 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
36
37
  size: "small",
37
38
  disabled: !r,
38
39
  onClick: () => {
39
- r && l(r);
40
+ r && e(r);
40
41
  },
41
42
  style: { minWidth: "25px" },
42
43
  children: /* @__PURE__ */ t(c, {
@@ -48,10 +49,10 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
48
49
  dataTest: "",
49
50
  size: "small",
50
51
  onClick: () => {
51
- l(new Date(Date.now()));
52
+ e(new Date(Date.now()));
52
53
  },
53
54
  variant: "outlined",
54
- children: e ? "I dag" : "Today"
55
+ children: l ? "I dag" : "Today"
55
56
  }),
56
57
  /* @__PURE__ */ t(a, {
57
58
  dataTest: "",
@@ -59,7 +60,7 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
59
60
  size: "small",
60
61
  disabled: !n,
61
62
  onClick: () => {
62
- n && l(n);
63
+ n && e(n);
63
64
  },
64
65
  style: { minWidth: "25px" },
65
66
  children: /* @__PURE__ */ t(f, {
@@ -77,11 +78,11 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
77
78
  m?.(o, "backdropClick");
78
79
  },
79
80
  style: { minWidth: "60px" },
80
- children: e ? "Velg" : "Select"
81
+ children: l ? "Velg" : "Select"
81
82
  })
82
83
  ]
83
84
  });
84
85
  };
85
86
  export {
86
- b as StyledCalendarPickerFooter
87
+ W as StyledCalendarPickerFooter
87
88
  };
@@ -1,17 +1,17 @@
1
- import { StyledSelect as c } from "../../../../components/inputs/select/StyledSelect.js";
2
- import { StyledSelectItem as b } from "../../../../components/inputs/select/StyledSelectItem.js";
3
- import { StyledFormControl as f } from "../../../../components/miscellaneous/StyledFormControl.js";
1
+ import { StyledFormControl as c } from "../../../shared-components/StyledFormControl.js";
2
+ import { StyledSelect as b } from "../../../shared-components/StyledSelect.js";
3
+ import { StyledSelectItem as f } from "../../../shared-components/StyledSelectItem.js";
4
4
  import u from "./StyledCalendarPickerSelectPeriod.module.js";
5
- import { jsx as a } from "react/jsx-runtime";
6
- var h = (r) => r.charAt(0).toUpperCase() + r.slice(1).toLowerCase();
7
- function g(r) {
8
- const { options: o = [], onChange: t, value: l, disabled: d, className: n, style: i, name: m } = r, s = r["aria-label"];
9
- return /* @__PURE__ */ a(f, {
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ import { capitalize as S } from "lodash-es";
7
+ function x(a) {
8
+ const { options: o = [], onChange: l, value: t, disabled: d, className: n, style: i, name: m } = a, s = a["aria-label"];
9
+ return /* @__PURE__ */ r(c, {
10
10
  style: {
11
11
  marginLeft: "-2px",
12
12
  marginRight: "8px"
13
13
  },
14
- children: /* @__PURE__ */ a(c, {
14
+ children: /* @__PURE__ */ r(b, {
15
15
  dataTest: "StyledCalendarPickerSelectMonth",
16
16
  size: "small",
17
17
  variant: "standard",
@@ -20,8 +20,8 @@ function g(r) {
20
20
  disabled: d,
21
21
  className: n,
22
22
  style: i,
23
- value: l ?? "",
24
- onChange: (e) => t?.(e),
23
+ value: t ?? "",
24
+ onChange: (e) => l?.(e),
25
25
  MenuProps: { className: u["styled-calendar-picker-select-period-menu"] },
26
26
  sx: {
27
27
  "&::before": { borderBottom: "none" },
@@ -29,14 +29,14 @@ function g(r) {
29
29
  "&:hover:not(.Mui-disabled, .Mui-error)::before": { borderBottom: "none" },
30
30
  "&:focus::before": { borderBottom: "none" }
31
31
  },
32
- children: o.map((e) => /* @__PURE__ */ a(b, {
32
+ children: o.map((e) => /* @__PURE__ */ r(f, {
33
33
  value: e.value,
34
34
  disabled: e.disabled,
35
- children: h(e.label)
35
+ children: S(e.label)
36
36
  }, e.value))
37
37
  })
38
38
  });
39
39
  }
40
40
  export {
41
- g as StyledCalendarPickerSelectMonth
41
+ x as StyledCalendarPickerSelectMonth
42
42
  };
@@ -1,16 +1,16 @@
1
- import { StyledSelect as o } from "../../../../components/inputs/select/StyledSelect.js";
2
- import { StyledSelectItem as u } from "../../../../components/inputs/select/StyledSelectItem.js";
3
- import { StyledFormControl as S } from "../../../../components/miscellaneous/StyledFormControl.js";
1
+ import { StyledFormControl as o } from "../../../shared-components/StyledFormControl.js";
2
+ import { StyledSelect as u } from "../../../shared-components/StyledSelect.js";
3
+ import { StyledSelectItem as S } from "../../../shared-components/StyledSelectItem.js";
4
4
  import y from "./StyledCalendarPickerSelectPeriod.module.js";
5
5
  import { jsx as a } from "react/jsx-runtime";
6
6
  function C(l) {
7
7
  const { options: r = [], onChange: t, value: d, disabled: i, className: n, style: m, name: c } = l, s = l["aria-label"];
8
- return /* @__PURE__ */ a(S, {
8
+ return /* @__PURE__ */ a(o, {
9
9
  style: {
10
10
  width: "70px",
11
11
  marginLeft: "5px"
12
12
  },
13
- children: /* @__PURE__ */ a(o, {
13
+ children: /* @__PURE__ */ a(u, {
14
14
  dataTest: "StyledCalendarPickerSelectYear",
15
15
  size: "small",
16
16
  variant: "standard",
@@ -22,7 +22,7 @@ function C(l) {
22
22
  value: d ?? "",
23
23
  onChange: (e) => t?.(e),
24
24
  MenuProps: { className: y["styled-calendar-picker-select-period-menu"] },
25
- children: r.map((e) => /* @__PURE__ */ a(u, {
25
+ children: r.map((e) => /* @__PURE__ */ a(S, {
26
26
  value: e.value,
27
27
  disabled: e.disabled,
28
28
  children: e.label
@@ -5,11 +5,12 @@ import { StyledCalendarPickerSelectYear as N } from "./StyledCalendarPickerSelec
5
5
  import e from "./StyledCalendarPicker.module.js";
6
6
  import { buildDisabled as Y } from "../helpers.js";
7
7
  import { useState as F } from "react";
8
+ import "@mui/material";
8
9
  import { jsx as i } from "react/jsx-runtime";
9
10
  import { DayPicker as W } from "react-day-picker";
10
11
  import { endOfMonth as q, startOfToday as R } from "date-fns";
11
12
  import { enGB as T } from "date-fns/locale";
12
- var K = ({ datePickerProps: t, popoverProps: y }) => {
13
+ var Q = ({ datePickerProps: t, popoverProps: y }) => {
13
14
  const { showOutsideDays: h = !0, locale: s = T, numberOfMonths: b, disabledDays: w, onClear: f, title: j, ...g } = t, { onClose: m } = y, [_, c] = F((t.mode === "range" ? t.selected?.from : t.selected) ?? /* @__PURE__ */ new Date()), u = s.code === "nb", v = (b ?? 1) < 2, D = Y(w, "disallowPast" in t ? t.disallowPast : void 0, "disallowFuture" in t ? t.disallowFuture : void 0, R()), S = (n) => {
14
15
  if (!t.selected || !t.onSelect) return;
15
16
  const o = /* @__PURE__ */ new Date(), a = {};
@@ -29,8 +30,8 @@ var K = ({ datePickerProps: t, popoverProps: y }) => {
29
30
  if (c(n), !!t.onSelect && (!t.mode || t.mode === "single")) {
30
31
  const o = t.selected;
31
32
  if (o instanceof Date) {
32
- const a = n.getFullYear(), d = n.getMonth(), l = o.getDate(), M = q(new Date(a, d, 1)).getDate(), p = Math.min(l, M), r = new Date(o);
33
- r.setFullYear(a, d, p), t.onSelect(r, r, {}, {});
33
+ const a = n.getFullYear(), d = n.getMonth(), l = o.getDate(), p = q(new Date(a, d, 1)).getDate(), M = Math.min(l, p), r = new Date(o);
34
+ r.setFullYear(a, d, M), t.onSelect(r, r, {}, {});
34
35
  }
35
36
  }
36
37
  },
@@ -105,5 +106,5 @@ var K = ({ datePickerProps: t, popoverProps: y }) => {
105
106
  });
106
107
  };
107
108
  export {
108
- K as StyledDayPicker
109
+ Q as StyledDayPicker
109
110
  };
@@ -1,9 +1,9 @@
1
- import { useInputMask as a } from "../../../../helpers/inputMask.js";
2
- var s = () => ({ maskRef: a({
1
+ import { useMask as e } from "@react-input/mask";
2
+ var a = () => ({ maskRef: e({
3
3
  mask: " / / ",
4
- maskChar: " ",
4
+ replacement: { " ": /\d/ },
5
5
  showMask: !0
6
6
  }) });
7
7
  export {
8
- s as useDatePickerMask
8
+ a as useDatePickerMask
9
9
  };