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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/data-display/badge/StyledBadge.js +24 -29
- package/dist/components/data-display/chip/StyledChip.js +60 -45
- package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +38 -32
- package/dist/components/data-display/tooltip/StyledTooltip.js +33 -50
- package/dist/components/data-display/typography/StyledTypography.js +4 -62
- package/dist/components/feedback/dialog/StyledDialog.js +50 -70
- package/dist/components/feedback/dialog/StyledDialog.module.js +9 -2
- package/dist/components/feedback/dialog/StyledDialogActions.js +16 -16
- package/dist/components/feedback/dialog/StyledDialogActions.module.js +8 -0
- package/dist/components/feedback/dialog/StyledDialogContent.js +14 -17
- package/dist/components/feedback/dialog/StyledDialogContent.module.js +4 -0
- package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -18
- package/dist/components/feedback/dialog/StyledDialogTitle.module.js +4 -0
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +57 -56
- package/dist/components/feedback/snack-bar/StyledAlert.js +14 -72
- package/dist/components/feedback/snack-bar/StyledSnackbar.js +8 -34
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.js +34 -33
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.module.js +8 -8
- package/dist/components/inputs/button/StyledButton.module.js +7 -7
- package/dist/components/inputs/checkbox/StyledCheckbox.js +20 -0
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +58 -55
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -12
- package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +1 -1
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +19 -19
- package/dist/components/inputs/input-field/StyledInputField.js +81 -104
- package/dist/components/inputs/radio-button/StyledRadio.js +17 -0
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +29 -40
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
- package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +23 -35
- package/dist/components/inputs/search-field/StyledSearchField.js +19 -18
- package/dist/components/inputs/select/StyledSelect.js +45 -124
- package/dist/components/inputs/select/StyledSelectItem.js +23 -19
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +151 -181
- package/dist/components/inputs/slider/StyledSlider.js +52 -78
- package/dist/components/inputs/switch/base-ui/StyledSwitch.js +39 -44
- package/dist/components/miscellaneous/StyledFormControl.js +21 -39
- package/dist/components/miscellaneous/StyledFormControlLabel.js +16 -27
- package/dist/components/miscellaneous/StyledFormGroup.js +4 -16
- package/dist/components/miscellaneous/StyledFormHelperText.js +4 -12
- package/dist/components/miscellaneous/StyledInputLabel.js +4 -20
- package/dist/components/navigation/drawer/StyledDrawer.js +4 -42
- package/dist/components/navigation/listbox/Listbox.js +7 -7
- package/dist/components/navigation/menu/StyledMenu.js +11 -28
- package/dist/components/navigation/menu/StyledMenuItem.js +19 -16
- package/dist/components/navigation/menu/StyledMenuList.js +4 -32
- package/dist/components/navigation/tabs/StyledTab.js +13 -25
- package/dist/components/navigation/tabs/StyledTabs.js +66 -112
- package/dist/components/utils/accordion/base-ui/StyledAccordion.js +21 -28
- package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +7 -7
- package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +14 -28
- package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +27 -31
- package/dist/components/utils/popover/StyledPopover.js +15 -44
- package/dist/datetime/components/date-picker/StyledDatePicker.js +6 -6
- package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +1 -1
- package/dist/datetime/components/date-picker/components/HelperTextWithTooltip.js +6 -6
- package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +11 -11
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +14 -13
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +14 -14
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +6 -6
- package/dist/datetime/components/date-picker/components/StyledDayPicker.js +5 -4
- package/dist/datetime/components/date-picker/hooks/useDatePickerMask.js +4 -4
- package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
- package/dist/datetime/components/time-picker/TimePickerInput.js +16 -15
- package/dist/datetime/components/time-picker/TimePickerPopper.js +19 -21
- package/dist/datetime/helpers/cn.js +5 -4
- package/dist/datetime/shared-components/ExpandIcon.js +18 -0
- package/dist/datetime/shared-components/StyledFormControl.js +23 -0
- package/dist/datetime/shared-components/StyledInputField.js +47 -0
- package/dist/datetime/shared-components/StyledSelect.js +47 -0
- package/dist/datetime/shared-components/StyledSelectItem.js +13 -0
- package/dist/datetime/shared-components/StyledTooltip.js +32 -0
- package/dist/helpers/cn.js +5 -4
- package/dist/index.js +175 -185
- package/dist/src/components/data-display/badge/StyledBadge.d.ts +2 -26
- package/dist/src/components/data-display/chip/StyledChip.d.ts +5 -39
- package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +4 -11
- package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +2 -36
- package/dist/src/components/data-display/typography/StyledTypography.d.ts +1 -19
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +4 -50
- package/dist/src/components/feedback/dialog/StyledDialogActions.d.ts +2 -12
- package/dist/src/components/feedback/dialog/StyledDialogContent.d.ts +2 -12
- package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +2 -10
- package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +2 -24
- package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +2 -21
- package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/types.d.ts +1 -1
- package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +4 -0
- package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +4 -9
- package/dist/src/components/inputs/dynamic-select/types.d.ts +2 -2
- package/dist/src/components/inputs/input-field/StyledInputField.d.ts +11 -67
- package/dist/src/components/inputs/input-field/index.d.ts +1 -1
- package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +4 -0
- package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +4 -0
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadio.d.ts +5 -20
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +7 -24
- package/dist/src/components/inputs/select/StyledSelect.d.ts +16 -39
- package/dist/src/components/inputs/select/StyledSelectItem.d.ts +2 -14
- package/dist/src/components/inputs/select/index.d.ts +1 -0
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +17 -88
- package/dist/src/components/inputs/slider/StyledSlider.d.ts +3 -55
- package/dist/src/components/inputs/switch/StyledSwitch.d.ts +5 -0
- package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +4 -20
- package/dist/src/components/miscellaneous/StyledFormControl.d.ts +2 -22
- package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +2 -21
- package/dist/src/components/miscellaneous/StyledFormGroup.d.ts +2 -11
- package/dist/src/components/miscellaneous/StyledFormHelperText.d.ts +2 -12
- package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +2 -20
- package/dist/src/components/navigation/drawer/StyledDrawer.d.ts +2 -28
- package/dist/src/components/navigation/menu/StyledMenu.d.ts +2 -33
- package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +2 -23
- package/dist/src/components/navigation/menu/StyledMenuList.d.ts +2 -16
- package/dist/src/components/navigation/menu/index.d.ts +1 -0
- package/dist/src/components/navigation/tabs/StyledTab.d.ts +3 -17
- package/dist/src/components/navigation/tabs/StyledTabs.d.ts +7 -16
- package/dist/src/components/utils/accordion/StyledAccordion.d.ts +2 -0
- package/dist/src/components/utils/accordion/StyledAccordionDetails.d.ts +2 -0
- package/dist/src/components/utils/accordion/StyledAccordionSummary.d.ts +8 -0
- package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +3 -9
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +0 -5
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +4 -8
- package/dist/src/components/utils/copy-wrapper/CopyWrapper.d.ts +1 -1
- package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -2
- package/dist/src/components/utils/popover/StyledPopover.d.ts +2 -32
- package/dist/src/datetime/components/date-picker/components/StyledCalendarPicker.d.ts +1 -1
- package/dist/src/datetime/components/date-picker/components/StyledDayPicker.d.ts +1 -1
- package/dist/src/datetime/components/date-picker/hooks/useDatePickerMask.d.ts +2 -1
- package/dist/src/datetime/components/time-picker/TimePickerInput.d.ts +1 -1
- package/dist/src/datetime/components/time-picker/TimePickerPopper.d.ts +1 -1
- package/dist/src/datetime/components/time-picker/types.d.ts +2 -1
- package/dist/src/datetime/shared-components/StyledFormControl.d.ts +2 -1
- package/dist/src/datetime/shared-components/StyledInputField.d.ts +12 -1
- package/dist/src/datetime/shared-components/StyledSelect.d.ts +16 -1
- package/dist/src/datetime/shared-components/StyledSelectItem.d.ts +2 -1
- package/dist/src/datetime/shared-components/StyledTooltip.d.ts +2 -1
- package/dist/src/index.d.ts +1 -2
- package/dist/src/table/shared-components/StyledCheckbox.d.ts +4 -7
- package/dist/src/table/shared-components/StyledMenuItem.d.ts +2 -18
- package/dist/src/table/shared-components/menu-item/index.d.ts +2 -13
- package/dist/src/table/shared-components/tooltip/index.d.ts +1 -5
- package/dist/src/table/types.d.ts +1 -1
- package/dist/table/components/Fetching.js +4 -4
- package/dist/table/components/StyledTable.module.js +51 -51
- package/dist/table/components/TableRow.js +7 -7
- package/dist/table/components/TableSkeleton.js +6 -6
- package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +24 -24
- package/dist/table/components/columns/action-column/components/RowActionMenu.js +25 -26
- package/dist/table/components/table-footer/TablePagination.js +24 -27
- package/dist/table/components/table-footer/TableRowCountSelect.js +27 -30
- package/dist/table/helpers/cn.js +5 -4
- package/dist/table/shared-components/StyledCheckbox.js +55 -54
- package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
- package/dist/table/shared-components/StyledMenuItem.js +18 -12
- package/dist/table/shared-components/button/StyledButton.module.js +8 -8
- package/dist/table/shared-components/menu-item/index.js +17 -13
- package/dist/table/shared-components/tooltip/index.js +23 -4
- package/package.json +16 -9
- package/src/styles/index.css +1 -0
- package/src/styles/typographyTokens.css +12 -0
- package/dist/components/inputs/field-styles.js +0 -6
- package/dist/components/inputs/input-field/StyledInputField.module.js +0 -4
- package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +0 -6
- package/dist/components/inputs/slider/StyledSlider.module.js +0 -10
- package/dist/components/miscellaneous/FormControlContext.js +0 -6
- package/dist/components/mui-compat/Avatar.js +0 -29
- package/dist/components/mui-compat/ClickAwayListener.js +0 -29
- package/dist/components/mui-compat/Container.js +0 -24
- package/dist/components/mui-compat/Fade.js +0 -29
- package/dist/components/mui-compat/Fade.module.js +0 -9
- package/dist/components/mui-compat/FormLabel.js +0 -22
- package/dist/components/mui-compat/Paper.js +0 -44
- package/dist/components/mui-compat/Popper.js +0 -35
- package/dist/components/mui-compat/Skeleton.js +0 -26
- package/dist/components/mui-compat/Stack.js +0 -24
- package/dist/components/navigation/tabs/TabsContext.js +0 -6
- package/dist/components/utils/accordion/base-ui/AccordionContext.js +0 -10
- package/dist/components/utils/virtual-list/VirtualList.js +0 -45
- package/dist/helpers/arrays.js +0 -4
- package/dist/helpers/inputMask.js +0 -45
- package/dist/helpers/sx.js +0 -46
- package/dist/src/api-surface.test.d.ts +0 -1
- package/dist/src/components/inputs/field-styles.d.ts +0 -22
- package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +0 -10
- package/dist/src/components/miscellaneous/FormControlContext.d.ts +0 -14
- package/dist/src/components/mui-compat/Avatar.d.ts +0 -6
- package/dist/src/components/mui-compat/ClickAwayListener.d.ts +0 -19
- package/dist/src/components/mui-compat/Container.d.ts +0 -6
- package/dist/src/components/mui-compat/Fade.d.ts +0 -21
- package/dist/src/components/mui-compat/FormLabel.d.ts +0 -6
- package/dist/src/components/mui-compat/Paper.d.ts +0 -6
- package/dist/src/components/mui-compat/Popper.d.ts +0 -29
- package/dist/src/components/mui-compat/Skeleton.d.ts +0 -7
- package/dist/src/components/mui-compat/Stack.d.ts +0 -7
- package/dist/src/components/mui-compat/index.d.ts +0 -9
- package/dist/src/components/mui-compat/types.d.ts +0 -46
- package/dist/src/components/navigation/tabs/TabsContext.d.ts +0 -11
- package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +0 -10
- package/dist/src/components/utils/virtual-list/VirtualList.d.ts +0 -28
- package/dist/src/components/utils/virtual-list/index.d.ts +0 -1
- package/dist/src/helpers/arrays.d.ts +0 -2
- package/dist/src/helpers/arrays.test.d.ts +0 -1
- package/dist/src/helpers/inputMask.d.ts +0 -29
- package/dist/src/helpers/inputMask.test.d.ts +0 -1
- package/dist/src/helpers/sx.d.ts +0 -2
- package/dist/src/helpers/sx.test.d.ts +0 -1
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
e,
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
+
g as StyledAccordion
|
|
33
26
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var r = "
|
|
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:
|
|
3
|
+
Trigger: o,
|
|
4
|
+
Header: _,
|
|
5
5
|
TriggerIcon: e,
|
|
6
|
-
TriggerIconRight:
|
|
7
|
-
Panel:
|
|
8
|
-
Content:
|
|
6
|
+
TriggerIconRight: a,
|
|
7
|
+
Panel: g,
|
|
8
|
+
Content: l
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
n as default
|
|
12
12
|
};
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
15
|
+
f as StyledAccordionDetails
|
|
30
16
|
};
|
|
@@ -1,39 +1,35 @@
|
|
|
1
|
-
import { ChevronDownIcon as
|
|
2
|
-
import
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"--trigger-
|
|
11
|
-
"--trigger-
|
|
12
|
-
"--
|
|
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
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
34
|
+
N as StyledAccordionSummary
|
|
39
35
|
};
|
|
@@ -1,46 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
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 {
|
|
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 {
|
|
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
|
-
|
|
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__ */
|
|
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(
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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:
|
|
12
|
-
children: i && /* @__PURE__ */ r(
|
|
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(
|
|
30
|
+
return o ? /* @__PURE__ */ r(m, {
|
|
31
31
|
title: e,
|
|
32
32
|
placement: "right",
|
|
33
33
|
arrow: !0,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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:
|
|
5
|
-
const { open:
|
|
6
|
-
return /* @__PURE__ */ r(
|
|
7
|
-
open:
|
|
8
|
-
anchorEl:
|
|
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:
|
|
11
|
+
vertical: t ? "top" : 50,
|
|
12
12
|
horizontal: "left"
|
|
13
13
|
},
|
|
14
14
|
transformOrigin: {
|
|
15
|
-
vertical:
|
|
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(
|
|
20
|
+
children: /* @__PURE__ */ r(n, {
|
|
21
21
|
datePickerProps: e,
|
|
22
|
-
popoverProps:
|
|
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
|
|
6
|
-
import { isDate as
|
|
7
|
-
|
|
8
|
-
|
|
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),
|
|
21
|
+
d ? d() : h(o), e(new Date(Date.now()));
|
|
21
22
|
},
|
|
22
23
|
size: "small",
|
|
23
|
-
disabled: !!p || i === null ||
|
|
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:
|
|
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 &&
|
|
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
|
-
|
|
52
|
+
e(new Date(Date.now()));
|
|
52
53
|
},
|
|
53
54
|
variant: "outlined",
|
|
54
|
-
children:
|
|
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 &&
|
|
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:
|
|
81
|
+
children: l ? "Velg" : "Select"
|
|
81
82
|
})
|
|
82
83
|
]
|
|
83
84
|
});
|
|
84
85
|
};
|
|
85
86
|
export {
|
|
86
|
-
|
|
87
|
+
W as StyledCalendarPickerFooter
|
|
87
88
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
const { options: o = [], onChange:
|
|
9
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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:
|
|
24
|
-
onChange: (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__ */
|
|
32
|
+
children: o.map((e) => /* @__PURE__ */ r(f, {
|
|
33
33
|
value: e.value,
|
|
34
34
|
disabled: e.disabled,
|
|
35
|
-
children:
|
|
35
|
+
children: S(e.label)
|
|
36
36
|
}, e.value))
|
|
37
37
|
})
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
x as StyledCalendarPickerSelectMonth
|
|
42
42
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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(
|
|
8
|
+
return /* @__PURE__ */ a(o, {
|
|
9
9
|
style: {
|
|
10
10
|
width: "70px",
|
|
11
11
|
marginLeft: "5px"
|
|
12
12
|
},
|
|
13
|
-
children: /* @__PURE__ */ a(
|
|
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(
|
|
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
|
|
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(),
|
|
33
|
-
r.setFullYear(a, d,
|
|
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
|
-
|
|
109
|
+
Q as StyledDayPicker
|
|
109
110
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
1
|
+
import { useMask as e } from "@react-input/mask";
|
|
2
|
+
var a = () => ({ maskRef: e({
|
|
3
3
|
mask: " / / ",
|
|
4
|
-
|
|
4
|
+
replacement: { " ": /\d/ },
|
|
5
5
|
showMask: !0
|
|
6
6
|
}) });
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
a as useDatePickerMask
|
|
9
9
|
};
|