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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/data-display/badge/StyledBadge.js +29 -24
- package/dist/components/data-display/chip/StyledChip.js +45 -60
- package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +32 -38
- package/dist/components/data-display/tooltip/StyledTooltip.js +50 -33
- package/dist/components/data-display/typography/StyledTypography.js +62 -4
- package/dist/components/feedback/dialog/StyledDialog.js +70 -50
- package/dist/components/feedback/dialog/StyledDialog.module.js +2 -9
- package/dist/components/feedback/dialog/StyledDialogActions.js +16 -16
- package/dist/components/feedback/dialog/StyledDialogContent.js +17 -14
- package/dist/components/feedback/dialog/StyledDialogTitle.js +18 -13
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +56 -57
- package/dist/components/feedback/snack-bar/StyledAlert.js +72 -14
- package/dist/components/feedback/snack-bar/StyledSnackbar.js +34 -8
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.js +33 -34
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +55 -58
- 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 +1 -1
- package/dist/components/inputs/field-styles.js +6 -0
- package/dist/components/inputs/input-field/StyledInputField.js +104 -81
- package/dist/components/inputs/input-field/StyledInputField.module.js +4 -0
- package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +6 -0
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +40 -29
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
- package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +35 -23
- package/dist/components/inputs/select/StyledSelect.js +124 -45
- package/dist/components/inputs/select/StyledSelectItem.js +19 -23
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +181 -151
- package/dist/components/inputs/slider/StyledSlider.js +78 -52
- package/dist/components/inputs/slider/StyledSlider.module.js +10 -0
- package/dist/components/inputs/switch/base-ui/StyledSwitch.js +44 -39
- package/dist/components/miscellaneous/FormControlContext.js +6 -0
- package/dist/components/miscellaneous/StyledFormControl.js +39 -21
- package/dist/components/miscellaneous/StyledFormControlLabel.js +27 -16
- package/dist/components/miscellaneous/StyledFormGroup.js +16 -4
- package/dist/components/miscellaneous/StyledFormHelperText.js +12 -4
- package/dist/components/miscellaneous/StyledInputLabel.js +20 -4
- package/dist/components/mui-compat/Avatar.js +29 -0
- package/dist/components/mui-compat/ClickAwayListener.js +29 -0
- package/dist/components/mui-compat/Container.js +24 -0
- package/dist/components/mui-compat/Fade.js +29 -0
- package/dist/components/mui-compat/Fade.module.js +9 -0
- package/dist/components/mui-compat/FormLabel.js +22 -0
- package/dist/components/mui-compat/Paper.js +44 -0
- package/dist/components/mui-compat/Popper.js +35 -0
- package/dist/components/mui-compat/Skeleton.js +26 -0
- package/dist/components/mui-compat/Stack.js +24 -0
- package/dist/components/navigation/drawer/StyledDrawer.js +42 -4
- package/dist/components/navigation/listbox/Listbox.js +7 -7
- package/dist/components/navigation/menu/StyledMenu.js +27 -11
- package/dist/components/navigation/menu/StyledMenuItem.js +16 -18
- package/dist/components/navigation/menu/StyledMenuList.js +32 -4
- package/dist/components/navigation/tabs/StyledTab.js +25 -13
- package/dist/components/navigation/tabs/StyledTabs.js +112 -64
- package/dist/components/navigation/tabs/TabsContext.js +6 -0
- package/dist/components/utils/accordion/base-ui/AccordionContext.js +10 -0
- package/dist/components/utils/accordion/base-ui/StyledAccordion.js +28 -21
- package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +7 -7
- package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +28 -14
- package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +31 -27
- package/dist/components/utils/popover/StyledPopover.js +43 -15
- 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 +13 -14
- 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 +4 -5
- 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 +15 -16
- package/dist/datetime/components/time-picker/TimePickerPopper.js +21 -19
- package/dist/datetime/helpers/cn.js +4 -5
- package/dist/helpers/arrays.js +4 -0
- package/dist/helpers/cn.js +4 -5
- package/dist/helpers/inputMask.js +45 -0
- package/dist/helpers/sx.js +46 -0
- package/dist/index.js +183 -175
- package/dist/src/api-surface.test.d.ts +1 -0
- package/dist/src/components/data-display/badge/StyledBadge.d.ts +26 -2
- package/dist/src/components/data-display/chip/StyledChip.d.ts +39 -5
- package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +11 -4
- package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +36 -2
- package/dist/src/components/data-display/typography/StyledTypography.d.ts +19 -1
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +37 -4
- package/dist/src/components/feedback/dialog/StyledDialogActions.d.ts +12 -2
- package/dist/src/components/feedback/dialog/StyledDialogContent.d.ts +12 -2
- package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +10 -2
- package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +24 -2
- package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +21 -2
- 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/base-ui/StyledCheckbox.d.ts +9 -4
- package/dist/src/components/inputs/dynamic-select/types.d.ts +2 -2
- package/dist/src/components/inputs/field-styles.d.ts +22 -0
- package/dist/src/components/inputs/input-field/StyledInputField.d.ts +67 -11
- package/dist/src/components/inputs/input-field/index.d.ts +1 -1
- package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +10 -0
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadio.d.ts +20 -5
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +24 -7
- package/dist/src/components/inputs/select/StyledSelect.d.ts +39 -16
- package/dist/src/components/inputs/select/StyledSelectItem.d.ts +14 -2
- package/dist/src/components/inputs/select/index.d.ts +0 -1
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +88 -17
- package/dist/src/components/inputs/slider/StyledSlider.d.ts +55 -3
- package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +20 -4
- package/dist/src/components/miscellaneous/FormControlContext.d.ts +14 -0
- package/dist/src/components/miscellaneous/StyledFormControl.d.ts +22 -2
- package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +21 -2
- package/dist/src/components/miscellaneous/StyledFormGroup.d.ts +11 -2
- package/dist/src/components/miscellaneous/StyledFormHelperText.d.ts +12 -2
- package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +20 -2
- package/dist/src/components/mui-compat/Avatar.d.ts +6 -0
- package/dist/src/components/mui-compat/ClickAwayListener.d.ts +19 -0
- package/dist/src/components/mui-compat/Container.d.ts +6 -0
- package/dist/src/components/mui-compat/Fade.d.ts +21 -0
- package/dist/src/components/mui-compat/FormLabel.d.ts +6 -0
- package/dist/src/components/mui-compat/Paper.d.ts +6 -0
- package/dist/src/components/mui-compat/Popper.d.ts +29 -0
- package/dist/src/components/mui-compat/Skeleton.d.ts +7 -0
- package/dist/src/components/mui-compat/Stack.d.ts +7 -0
- package/dist/src/components/mui-compat/index.d.ts +9 -0
- package/dist/src/components/mui-compat/types.d.ts +46 -0
- package/dist/src/components/navigation/drawer/StyledDrawer.d.ts +21 -2
- package/dist/src/components/navigation/menu/StyledMenu.d.ts +25 -2
- package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +21 -2
- package/dist/src/components/navigation/menu/StyledMenuList.d.ts +16 -2
- package/dist/src/components/navigation/menu/index.d.ts +0 -1
- package/dist/src/components/navigation/tabs/StyledTab.d.ts +17 -3
- package/dist/src/components/navigation/tabs/StyledTabs.d.ts +16 -7
- package/dist/src/components/navigation/tabs/TabsContext.d.ts +11 -0
- package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +10 -0
- package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +9 -3
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +5 -0
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +8 -4
- 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 +31 -2
- 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 +1 -2
- 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 +1 -2
- package/dist/src/datetime/shared-components/StyledFormControl.d.ts +1 -2
- package/dist/src/datetime/shared-components/StyledInputField.d.ts +1 -12
- package/dist/src/datetime/shared-components/StyledSelect.d.ts +1 -16
- package/dist/src/datetime/shared-components/StyledSelectItem.d.ts +1 -2
- package/dist/src/datetime/shared-components/StyledTooltip.d.ts +1 -2
- package/dist/src/helpers/arrays.d.ts +2 -0
- package/dist/src/helpers/arrays.test.d.ts +1 -0
- package/dist/src/helpers/inputMask.d.ts +29 -0
- package/dist/src/helpers/inputMask.test.d.ts +1 -0
- package/dist/src/helpers/sx.d.ts +2 -0
- package/dist/src/helpers/sx.test.d.ts +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/table/shared-components/StyledCheckbox.d.ts +7 -4
- package/dist/src/table/shared-components/StyledMenuItem.d.ts +18 -2
- package/dist/src/table/shared-components/menu-item/index.d.ts +13 -2
- package/dist/src/table/shared-components/tooltip/index.d.ts +5 -1
- package/dist/src/table/types.d.ts +1 -1
- package/dist/table/components/Fetching.js +4 -4
- 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 +26 -25
- package/dist/table/components/table-footer/TablePagination.js +27 -24
- package/dist/table/components/table-footer/TableRowCountSelect.js +30 -27
- package/dist/table/helpers/cn.js +4 -5
- package/dist/table/shared-components/StyledCheckbox.js +54 -55
- package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
- package/dist/table/shared-components/StyledMenuItem.js +12 -18
- package/dist/table/shared-components/menu-item/index.js +13 -17
- package/dist/table/shared-components/tooltip/index.js +4 -23
- package/package.json +9 -16
- package/dist/components/feedback/dialog/StyledDialogActions.module.js +0 -8
- package/dist/components/feedback/dialog/StyledDialogContent.module.js +0 -4
- package/dist/components/feedback/dialog/StyledDialogTitle.module.js +0 -4
- package/dist/components/inputs/checkbox/StyledCheckbox.js +0 -20
- package/dist/components/inputs/radio-button/StyledRadio.js +0 -17
- package/dist/datetime/shared-components/ExpandIcon.js +0 -18
- package/dist/datetime/shared-components/StyledFormControl.js +0 -23
- package/dist/datetime/shared-components/StyledInputField.js +0 -47
- package/dist/datetime/shared-components/StyledSelect.js +0 -47
- package/dist/datetime/shared-components/StyledSelectItem.js +0 -13
- package/dist/datetime/shared-components/StyledTooltip.js +0 -32
- package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +0 -4
- package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +0 -4
- package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +0 -4
- package/dist/src/components/inputs/switch/StyledSwitch.d.ts +0 -5
- package/dist/src/components/utils/accordion/StyledAccordion.d.ts +0 -2
- package/dist/src/components/utils/accordion/StyledAccordionDetails.d.ts +0 -2
- package/dist/src/components/utils/accordion/StyledAccordionSummary.d.ts +0 -8
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { jsx as
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
...
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
19
|
+
n as StyledDialogTitle
|
|
15
20
|
};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { cn as c } from "../../../helpers/cn.js";
|
|
2
|
-
import { DotsVerticalIcon as
|
|
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
|
|
6
|
-
import { KeyboardCapslockIcon as
|
|
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
|
|
10
|
-
import { StyledMenuItem as
|
|
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
|
|
13
|
-
import { ArrowExpand as
|
|
14
|
-
import { ArrowShrink as
|
|
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
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
30
|
+
Y(!r);
|
|
32
31
|
};
|
|
33
|
-
return /* @__PURE__ */ t(
|
|
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, !
|
|
36
|
+
className: c(T.dialog, !r && T.hidden),
|
|
38
37
|
children: /* @__PURE__ */ t("div", {
|
|
39
|
-
className: V("flex items-center justify-between", !
|
|
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: [
|
|
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(
|
|
52
|
+
endIcon: /* @__PURE__ */ e(re, {
|
|
54
53
|
height: 20,
|
|
55
54
|
width: 20,
|
|
56
55
|
color: "text-gama-500"
|
|
57
56
|
}),
|
|
58
|
-
children:
|
|
57
|
+
children: L
|
|
59
58
|
}) })
|
|
60
|
-
}),
|
|
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:
|
|
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:
|
|
71
|
+
children: z
|
|
73
72
|
}) })
|
|
74
73
|
})]
|
|
75
74
|
})]
|
|
76
75
|
})
|
|
77
76
|
}),
|
|
78
77
|
/* @__PURE__ */ t("div", {
|
|
79
|
-
style:
|
|
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",
|
|
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
|
-
|
|
96
|
-
|
|
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(
|
|
102
|
+
endIcon: /* @__PURE__ */ e(le, {
|
|
104
103
|
height: 20,
|
|
105
104
|
width: 20,
|
|
106
105
|
color: "text-delta-700"
|
|
107
106
|
}),
|
|
108
|
-
children:
|
|
107
|
+
children: K
|
|
109
108
|
}) })
|
|
110
109
|
}),
|
|
111
|
-
|
|
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: (
|
|
118
|
-
|
|
116
|
+
onClick: (d) => {
|
|
117
|
+
_ !== void 0 && F ? F() : Z(!G), d.detail !== 0 && d.currentTarget.blur();
|
|
119
118
|
},
|
|
120
|
-
endIcon: a ? /* @__PURE__ */ e(
|
|
119
|
+
endIcon: a ? /* @__PURE__ */ e(se, {
|
|
121
120
|
width: 20,
|
|
122
121
|
height: 20,
|
|
123
122
|
color: "text-delta-700"
|
|
124
|
-
}) : /* @__PURE__ */ e(
|
|
123
|
+
}) : /* @__PURE__ */ e(oe, {
|
|
125
124
|
width: 20,
|
|
126
125
|
height: 20,
|
|
127
126
|
color: "text-delta-700"
|
|
128
127
|
}),
|
|
129
|
-
children:
|
|
128
|
+
children: R
|
|
130
129
|
}) })
|
|
131
130
|
}),
|
|
132
|
-
|
|
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:
|
|
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:
|
|
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 && !
|
|
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
|
-
}), (
|
|
159
|
-
className: c("flex items-center justify-between border-0 border-t-[1px] border-solid border-delta-200 bg-white p-4",
|
|
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
|
-
|
|
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(
|
|
163
|
+
startIcon: /* @__PURE__ */ e(ie, {
|
|
165
164
|
width: 24,
|
|
166
165
|
height: 24
|
|
167
166
|
}),
|
|
168
|
-
onClick:
|
|
167
|
+
onClick: B,
|
|
169
168
|
children: s
|
|
170
|
-
}), /* @__PURE__ */ e(
|
|
171
|
-
open:
|
|
172
|
-
anchorEl:
|
|
173
|
-
onClose:
|
|
174
|
-
children: l.map((
|
|
175
|
-
className:
|
|
176
|
-
onClick:
|
|
177
|
-
children:
|
|
178
|
-
},
|
|
179
|
-
})] }) : s &&
|
|
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(
|
|
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
|
-
|
|
226
|
+
Ce as MinimizableDialog
|
|
228
227
|
};
|
|
@@ -1,17 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
74
|
+
E as StyledAlert
|
|
17
75
|
};
|
|
@@ -1,10 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
35
|
+
S as StyledSnackbar
|
|
10
36
|
};
|
|
@@ -1,73 +1,72 @@
|
|
|
1
1
|
import { omit as f } from "../../../../helpers/omit.js";
|
|
2
|
-
import { CloseIcon as
|
|
3
|
-
import { CheckOutlineIcon as
|
|
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
|
|
6
|
-
import { WarningAmberOutlineIcon as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { forwardRef as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
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__ */
|
|
17
|
+
error: /* @__PURE__ */ e(g, {
|
|
19
18
|
height: 24,
|
|
20
19
|
width: 24
|
|
21
20
|
}),
|
|
22
|
-
success: /* @__PURE__ */
|
|
21
|
+
success: /* @__PURE__ */ e(p, {
|
|
23
22
|
height: 24,
|
|
24
23
|
width: 24
|
|
25
24
|
}),
|
|
26
|
-
warning: /* @__PURE__ */
|
|
25
|
+
warning: /* @__PURE__ */ e(v, {
|
|
27
26
|
height: 24,
|
|
28
27
|
width: 24
|
|
29
28
|
})
|
|
30
|
-
},
|
|
31
|
-
const { id: a, message:
|
|
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:
|
|
38
|
-
return /* @__PURE__ */
|
|
36
|
+
]), { closeSnackbar: h } = k();
|
|
37
|
+
return /* @__PURE__ */ e(S, {
|
|
39
38
|
ref: l,
|
|
40
39
|
role: "alert",
|
|
41
|
-
...
|
|
40
|
+
...d,
|
|
42
41
|
children: /* @__PURE__ */ n("div", {
|
|
43
|
-
className:
|
|
42
|
+
className: o(r.container, r[t]),
|
|
44
43
|
children: [
|
|
45
44
|
/* @__PURE__ */ n("div", {
|
|
46
|
-
className:
|
|
45
|
+
className: r.header,
|
|
47
46
|
children: [/* @__PURE__ */ n("div", {
|
|
48
|
-
className:
|
|
49
|
-
children: [
|
|
50
|
-
}), /* @__PURE__ */
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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__ */
|
|
63
|
-
className:
|
|
64
|
-
children:
|
|
61
|
+
/* @__PURE__ */ e("div", {
|
|
62
|
+
className: o(r.message, r[`message_${t}`]),
|
|
63
|
+
children: s
|
|
65
64
|
}),
|
|
66
|
-
|
|
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
|
-
|
|
71
|
+
R as StyledDefaultSnackbar
|
|
73
72
|
};
|