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,16 +1,17 @@
|
|
|
1
|
+
import { StyledPopover as y } from "../../../components/utils/popover/StyledPopover.js";
|
|
2
|
+
import { StyledMenuList as S } from "../../../components/navigation/menu/StyledMenuList.js";
|
|
1
3
|
import c from "../StyledTable.module.js";
|
|
2
4
|
import { StyledTooltip as g } from "../../shared-components/tooltip/index.js";
|
|
3
5
|
import { ChevronDownIcon as I } from "../../shared-components/ChevronDownIcon.js";
|
|
4
|
-
import { useToggleMenuVisibility as
|
|
5
|
-
import { StyledButton as
|
|
6
|
+
import { useToggleMenuVisibility as N } from "../../hooks/useToggleMenuVisibility.hook.js";
|
|
7
|
+
import { StyledButton as m } from "../../shared-components/button/StyledButton.js";
|
|
6
8
|
import { ChevronRightIcon as O } from "../../shared-components/ChevronRightIcon.js";
|
|
7
|
-
import { ChevronLeftIcon as
|
|
8
|
-
import { StyledMenuItem as
|
|
9
|
-
import { useCallback as v, useMemo as P, useRef as
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const { anchorEl: s, open: p, handleClose: d, handleOpen: b } = y(), u = N(null), n = C === "no", f = P(() => ({
|
|
9
|
+
import { ChevronLeftIcon as w } from "../../shared-components/ChevronLeftIcon.js";
|
|
10
|
+
import { StyledMenuItem as k } from "../../shared-components/menu-item/index.js";
|
|
11
|
+
import { useCallback as v, useMemo as P, useRef as z } from "react";
|
|
12
|
+
import { Fragment as $, jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
13
|
+
function V({ table: o, locale: C }) {
|
|
14
|
+
const { anchorEl: s, open: p, handleClose: d, handleOpen: b } = N(), u = z(null), n = C === "no", f = P(() => ({
|
|
14
15
|
anchorOrigin: {
|
|
15
16
|
vertical: -5,
|
|
16
17
|
horizontal: "center"
|
|
@@ -32,12 +33,12 @@ function H({ table: o, locale: C }) {
|
|
|
32
33
|
d,
|
|
33
34
|
i
|
|
34
35
|
]);
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ h($, { children: [
|
|
36
37
|
/* @__PURE__ */ e(g, {
|
|
37
38
|
title: n ? "Nåværende side" : "Current Page",
|
|
38
39
|
children: /* @__PURE__ */ e("div", {
|
|
39
40
|
ref: u,
|
|
40
|
-
children: /* @__PURE__ */ m
|
|
41
|
+
children: /* @__PURE__ */ h(m, {
|
|
41
42
|
dataTest: "current-page-button",
|
|
42
43
|
variant: "outlined",
|
|
43
44
|
size: "large",
|
|
@@ -59,24 +60,26 @@ function H({ table: o, locale: C }) {
|
|
|
59
60
|
})
|
|
60
61
|
})
|
|
61
62
|
}),
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
+
/* @__PURE__ */ e(y, {
|
|
63
64
|
open: p,
|
|
64
65
|
anchorEl: s,
|
|
65
|
-
slotProps: { paper: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
slotProps: { paper: {
|
|
67
|
+
className: "border border-solid border-delta-200",
|
|
68
|
+
sx: {
|
|
69
|
+
width: s ? s.clientWidth : void 0,
|
|
70
|
+
maxHeight: 288,
|
|
71
|
+
overflowY: "auto"
|
|
72
|
+
}
|
|
73
|
+
} },
|
|
70
74
|
onClose: d,
|
|
71
75
|
anchorOrigin: f.anchorOrigin,
|
|
72
76
|
transformOrigin: f.transformOrigin,
|
|
73
|
-
|
|
74
|
-
children: /* @__PURE__ */ e(k, { children: x.map((t) => /* @__PURE__ */ e(w, {
|
|
77
|
+
children: /* @__PURE__ */ e(S, { children: x.map((t) => /* @__PURE__ */ e(k, {
|
|
75
78
|
onClick: (r) => {
|
|
76
79
|
r.stopPropagation(), r.preventDefault(), T(t);
|
|
77
80
|
},
|
|
78
81
|
selected: t === l,
|
|
79
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ h("span", {
|
|
80
83
|
className: "text-sm font-normal text-delta-700",
|
|
81
84
|
children: [
|
|
82
85
|
n ? "Side" : "Page",
|
|
@@ -88,7 +91,7 @@ function H({ table: o, locale: C }) {
|
|
|
88
91
|
}),
|
|
89
92
|
/* @__PURE__ */ e(g, {
|
|
90
93
|
title: l === 1 ? "" : n ? "Forrige side" : "Previous Page",
|
|
91
|
-
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
94
|
+
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(m, {
|
|
92
95
|
dataTest: "prev-page-button",
|
|
93
96
|
variant: "outlined",
|
|
94
97
|
onClick: () => {
|
|
@@ -96,7 +99,7 @@ function H({ table: o, locale: C }) {
|
|
|
96
99
|
},
|
|
97
100
|
size: "large",
|
|
98
101
|
disabled: !o.getCanPreviousPage(),
|
|
99
|
-
startIcon: /* @__PURE__ */ e(
|
|
102
|
+
startIcon: /* @__PURE__ */ e(w, {
|
|
100
103
|
height: 24,
|
|
101
104
|
width: 24
|
|
102
105
|
})
|
|
@@ -104,7 +107,7 @@ function H({ table: o, locale: C }) {
|
|
|
104
107
|
}),
|
|
105
108
|
/* @__PURE__ */ e(g, {
|
|
106
109
|
title: l === a ? "" : n ? "Neste side" : "Next Page",
|
|
107
|
-
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
110
|
+
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(m, {
|
|
108
111
|
dataTest: "next-page-button",
|
|
109
112
|
variant: "outlined",
|
|
110
113
|
onClick: () => {
|
|
@@ -121,5 +124,5 @@ function H({ table: o, locale: C }) {
|
|
|
121
124
|
] });
|
|
122
125
|
}
|
|
123
126
|
export {
|
|
124
|
-
|
|
127
|
+
V as TablePagination
|
|
125
128
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { StyledPopover as w } from "../../../components/utils/popover/StyledPopover.js";
|
|
2
|
+
import { StyledMenuList as O } from "../../../components/navigation/menu/StyledMenuList.js";
|
|
3
|
+
import { ChevronDownIcon as S } from "../../shared-components/ChevronDownIcon.js";
|
|
4
|
+
import { useToggleMenuVisibility as v } from "../../hooks/useToggleMenuVisibility.hook.js";
|
|
5
|
+
import { StyledButton as C } from "../../shared-components/button/StyledButton.js";
|
|
6
|
+
import { StyledMenuItem as b } from "../../shared-components/menu-item/index.js";
|
|
7
|
+
import { useCallback as x, useMemo as d } from "react";
|
|
7
8
|
import { Fragment as y, jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
8
9
|
var M = [
|
|
9
10
|
5,
|
|
@@ -12,8 +13,8 @@ var M = [
|
|
|
12
13
|
50,
|
|
13
14
|
100
|
|
14
15
|
];
|
|
15
|
-
function
|
|
16
|
-
const { anchorEl: i, open: l, handleClose: a, handleOpen: h } =
|
|
16
|
+
function D({ table: n, locale: p }) {
|
|
17
|
+
const { anchorEl: i, open: l, handleClose: a, handleOpen: h } = v(), t = n.getState().pagination.pageSize, c = p === "no", m = d(() => ({
|
|
17
18
|
anchorOrigin: {
|
|
18
19
|
vertical: -5,
|
|
19
20
|
horizontal: "center"
|
|
@@ -22,44 +23,46 @@ function j({ table: n, locale: d }) {
|
|
|
22
23
|
vertical: "bottom",
|
|
23
24
|
horizontal: "center"
|
|
24
25
|
}
|
|
25
|
-
}), []), g =
|
|
26
|
-
const o = /* @__PURE__ */ new Set([...M,
|
|
27
|
-
return Array.from(o).sort((
|
|
28
|
-
}, [
|
|
26
|
+
}), []), g = d(() => {
|
|
27
|
+
const o = /* @__PURE__ */ new Set([...M, t]);
|
|
28
|
+
return Array.from(o).sort((r, f) => r - f);
|
|
29
|
+
}, [t]), u = x((o) => {
|
|
29
30
|
n.setPageSize(o), a();
|
|
30
31
|
}, [a, n]);
|
|
31
|
-
return /* @__PURE__ */ s(y, { children: [/* @__PURE__ */ s(
|
|
32
|
+
return /* @__PURE__ */ s(y, { children: [/* @__PURE__ */ s(C, {
|
|
32
33
|
dataTest: "table-rows-count-button",
|
|
33
34
|
variant: "outlined",
|
|
34
35
|
size: "large",
|
|
35
36
|
onClick: h,
|
|
36
|
-
endIcon: /* @__PURE__ */ e(
|
|
37
|
+
endIcon: /* @__PURE__ */ e(S, {
|
|
37
38
|
className: `${l ? "rotate-180" : "rotate-0"} transition-transform duration-300`,
|
|
38
39
|
height: 24,
|
|
39
40
|
width: 24
|
|
40
41
|
}),
|
|
41
42
|
children: [
|
|
42
|
-
|
|
43
|
+
t,
|
|
43
44
|
" ",
|
|
44
45
|
c ? "rader" : "rows"
|
|
45
46
|
]
|
|
46
|
-
}), /* @__PURE__ */ e(
|
|
47
|
+
}), /* @__PURE__ */ e(w, {
|
|
47
48
|
open: l,
|
|
48
49
|
anchorEl: i,
|
|
49
|
-
slotProps: { paper: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
slotProps: { paper: {
|
|
51
|
+
className: "border border-solid border-delta-200",
|
|
52
|
+
sx: {
|
|
53
|
+
width: i ? i.clientWidth : void 0,
|
|
54
|
+
maxHeight: 288,
|
|
55
|
+
overflowY: "auto"
|
|
56
|
+
}
|
|
57
|
+
} },
|
|
54
58
|
onClose: a,
|
|
55
59
|
anchorOrigin: m.anchorOrigin,
|
|
56
60
|
transformOrigin: m.transformOrigin,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
t.stopPropagation(), t.preventDefault(), u(o);
|
|
61
|
+
children: /* @__PURE__ */ e(O, { children: g.map((o) => /* @__PURE__ */ e(b, {
|
|
62
|
+
onClick: (r) => {
|
|
63
|
+
r.stopPropagation(), r.preventDefault(), u(o);
|
|
61
64
|
},
|
|
62
|
-
selected:
|
|
65
|
+
selected: t === o,
|
|
63
66
|
children: /* @__PURE__ */ s("span", {
|
|
64
67
|
className: "text-sm font-normal text-delta-700",
|
|
65
68
|
children: [
|
|
@@ -72,5 +75,5 @@ function j({ table: n, locale: d }) {
|
|
|
72
75
|
})] });
|
|
73
76
|
}
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
D as TableRowCountSelect
|
|
76
79
|
};
|
package/dist/table/helpers/cn.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as m } from "../helpers/cn.js";
|
|
2
2
|
import e from "./StyledCheckbox.module.js";
|
|
3
|
-
import
|
|
4
|
-
import { jsx as
|
|
5
|
-
|
|
6
|
-
var L = (n) => /* @__PURE__ */ k("svg", {
|
|
3
|
+
import L, { useEffect as C, useRef as f } from "react";
|
|
4
|
+
import { jsx as o, jsxs as k } from "react/jsx-runtime";
|
|
5
|
+
var E = (t) => /* @__PURE__ */ k("svg", {
|
|
7
6
|
viewBox: "0 0 24 24",
|
|
8
7
|
width: "100%",
|
|
9
8
|
height: "100%",
|
|
10
9
|
fill: "none",
|
|
11
|
-
...
|
|
12
|
-
children: [/* @__PURE__ */
|
|
10
|
+
...t,
|
|
11
|
+
children: [/* @__PURE__ */ o("title", { children: "Indeterminate icon" }), /* @__PURE__ */ o("path", {
|
|
13
12
|
d: "M6 12H18",
|
|
14
13
|
stroke: "currentColor",
|
|
15
|
-
strokeWidth:
|
|
14
|
+
strokeWidth: t.strokeWidth ?? 3,
|
|
16
15
|
strokeLinecap: "round"
|
|
17
16
|
})]
|
|
18
|
-
}), H = (
|
|
17
|
+
}), H = (t) => /* @__PURE__ */ k("svg", {
|
|
19
18
|
viewBox: "0 0 24 24",
|
|
20
19
|
width: "100%",
|
|
21
20
|
height: "100%",
|
|
@@ -24,56 +23,56 @@ var L = (n) => /* @__PURE__ */ k("svg", {
|
|
|
24
23
|
strokeWidth: 2,
|
|
25
24
|
strokeLinecap: "round",
|
|
26
25
|
strokeLinejoin: "round",
|
|
27
|
-
...
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
-
}),
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, [l])
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const r = { target: {
|
|
44
|
-
name: a.name,
|
|
45
|
-
value: a.value,
|
|
46
|
-
checked: o
|
|
47
|
-
} };
|
|
48
|
-
u?.(r, o);
|
|
49
|
-
}, [
|
|
50
|
-
u,
|
|
51
|
-
a.name,
|
|
52
|
-
a.value,
|
|
53
|
-
c
|
|
54
|
-
]);
|
|
55
|
-
return /* @__PURE__ */ k(f.Root, {
|
|
26
|
+
...t,
|
|
27
|
+
children: [/* @__PURE__ */ o("title", { children: "Check icon" }), /* @__PURE__ */ o("path", { d: "M4 12l5 5L20 6" })]
|
|
28
|
+
}), M = ({ dataTest: t, size: l = "medium", disabled: d, readOnly: c, indeterminate: n = !1, checked: h, disableRipple: x, hideWrapper: v, className: b, onChange: g, ...I }) => {
|
|
29
|
+
const a = !!v, s = !x && !a && !d && !c, p = f(null), u = f(null);
|
|
30
|
+
C(() => {
|
|
31
|
+
p.current && (p.current.indeterminate = n);
|
|
32
|
+
}, [n]);
|
|
33
|
+
const R = m(e.CheckboxWrapper, !a && e[`size-${l}`], a && e.HideWrapper, n && e.Indeterminate, c && e.ReadOnly, s && e.CheckboxHover, b), w = m(e.Checkbox, e[`size-${l}`], n && e.Indeterminate), N = n ? E : H, W = L.useCallback((r) => {
|
|
34
|
+
if (r.stopPropagation(), !s) return;
|
|
35
|
+
const i = document.createElement("span");
|
|
36
|
+
i.className = e.CheckboxRipple ?? "", i.addEventListener("animationend", () => i.remove(), { once: !0 }), u.current?.appendChild(i);
|
|
37
|
+
}, [s]);
|
|
38
|
+
return C(() => {
|
|
39
|
+
const r = u.current;
|
|
40
|
+
return () => r?.replaceChildren();
|
|
41
|
+
}, []), /* @__PURE__ */ k("label", {
|
|
56
42
|
className: R,
|
|
57
|
-
"data-test":
|
|
58
|
-
checked: x,
|
|
59
|
-
disabled: m,
|
|
60
|
-
readOnly: c,
|
|
61
|
-
indeterminate: i,
|
|
43
|
+
"data-test": t,
|
|
62
44
|
onPointerDown: W,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
className:
|
|
72
|
-
|
|
45
|
+
"data-checked": h && !n ? "" : void 0,
|
|
46
|
+
"data-unchecked": !h && !n ? "" : void 0,
|
|
47
|
+
"data-indeterminate": n ? "" : void 0,
|
|
48
|
+
"data-disabled": d ? "" : void 0,
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ o("input", {
|
|
51
|
+
ref: p,
|
|
52
|
+
type: "checkbox",
|
|
53
|
+
className: "sr-only",
|
|
54
|
+
checked: h,
|
|
55
|
+
disabled: d,
|
|
56
|
+
readOnly: c,
|
|
57
|
+
onChange: (r) => {
|
|
58
|
+
c || g?.(r, r.target.checked);
|
|
59
|
+
},
|
|
60
|
+
...I
|
|
61
|
+
}),
|
|
62
|
+
!a && s && /* @__PURE__ */ o("span", {
|
|
63
|
+
ref: u,
|
|
64
|
+
className: e.CheckboxRippleContainer
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ o("span", {
|
|
67
|
+
className: w,
|
|
68
|
+
children: /* @__PURE__ */ o("span", {
|
|
69
|
+
className: e.Indicator,
|
|
70
|
+
children: /* @__PURE__ */ o(N, { strokeWidth: l === "small" ? 3 : 2 })
|
|
71
|
+
})
|
|
73
72
|
})
|
|
74
|
-
|
|
73
|
+
]
|
|
75
74
|
});
|
|
76
75
|
};
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
M as StyledCheckbox
|
|
79
78
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var e = "
|
|
1
|
+
var e = "_CheckboxWrapper_lq2x6_1", _ = "_Checkbox_lq2x6_1", r = "_Indeterminate_lq2x6_28", a = "_ReadOnly_lq2x6_55", l = "_Indicator_lq2x6_64", x = "_HideWrapper_lq2x6_68", p = "_CheckboxHover_lq2x6_75", i = "_CheckboxRippleContainer_lq2x6_75", o = "_CheckboxRipple_lq2x6_75", d = "_ripple_lq2x6_1", c = {
|
|
2
2
|
CheckboxWrapper: e,
|
|
3
|
-
"size-small": "_size-
|
|
4
|
-
"size-medium": "_size-
|
|
3
|
+
"size-small": "_size-small_lq2x6_11",
|
|
4
|
+
"size-medium": "_size-medium_lq2x6_15",
|
|
5
5
|
Checkbox: _,
|
|
6
6
|
Indeterminate: r,
|
|
7
7
|
ReadOnly: a,
|
|
8
|
-
Indicator:
|
|
9
|
-
HideWrapper:
|
|
10
|
-
CheckboxHover:
|
|
11
|
-
CheckboxRippleContainer:
|
|
12
|
-
CheckboxRipple:
|
|
13
|
-
ripple:
|
|
8
|
+
Indicator: l,
|
|
9
|
+
HideWrapper: x,
|
|
10
|
+
CheckboxHover: p,
|
|
11
|
+
CheckboxRippleContainer: i,
|
|
12
|
+
CheckboxRipple: o,
|
|
13
|
+
ripple: d
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
c as default
|
|
17
17
|
};
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
pointerEvents: "auto",
|
|
13
|
-
cursor: "not-allowed",
|
|
14
|
-
"&:hover": { backgroundColor: "transparent !important" }
|
|
15
|
-
},
|
|
16
|
-
...o.sx
|
|
17
|
-
}
|
|
1
|
+
import { cn as l } from "../helpers/cn.js";
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
|
+
var s = ({ children: o, disabled: e, selected: r, className: t, classes: n, onClick: i, onMouseDown: m, onMouseUp: a }) => /* @__PURE__ */ c("li", {
|
|
4
|
+
role: "menuitem",
|
|
5
|
+
"aria-disabled": e ? !0 : void 0,
|
|
6
|
+
tabIndex: -1,
|
|
7
|
+
onClick: e ? void 0 : i,
|
|
8
|
+
onMouseDown: m,
|
|
9
|
+
onMouseUp: a,
|
|
10
|
+
className: l("flex items-center px-3 py-2.5 outline-none", e ? "cursor-not-allowed" : "cursor-pointer hover:bg-delta-50", r && "bg-gama-50", n?.root, t),
|
|
11
|
+
children: o
|
|
18
12
|
});
|
|
19
13
|
export {
|
|
20
|
-
|
|
14
|
+
s as StyledMenuItem
|
|
21
15
|
};
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
...o,
|
|
14
|
-
children: [/* @__PURE__ */ a(r, {
|
|
1
|
+
import { cn as n } from "../../helpers/cn.js";
|
|
2
|
+
import { CheckIcon as i } from "../CheckIcon.js";
|
|
3
|
+
import { jsx as m, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
var p = ({ children: e, selected: r, disabled: o, className: t, onClick: a }) => /* @__PURE__ */ l("li", {
|
|
5
|
+
role: "menuitem",
|
|
6
|
+
"aria-disabled": o ? !0 : void 0,
|
|
7
|
+
tabIndex: -1,
|
|
8
|
+
onClick: o ? void 0 : a,
|
|
9
|
+
className: n("flex items-center gap-x-1 p-2 outline-none", o ? "cursor-not-allowed" : "cursor-pointer hover:bg-delta-50", r && "bg-gama-50 hover:bg-gama-50", t),
|
|
10
|
+
children: [/* @__PURE__ */ m(i, {
|
|
15
11
|
width: 24,
|
|
16
12
|
height: 24,
|
|
17
|
-
color:
|
|
13
|
+
color: r ? "var(--colors-gama-500)" : "transparent",
|
|
18
14
|
style: { transition: "color 0.2s ease" }
|
|
19
|
-
}),
|
|
15
|
+
}), e]
|
|
20
16
|
});
|
|
21
17
|
export {
|
|
22
|
-
|
|
18
|
+
p as StyledMenuItem
|
|
23
19
|
};
|
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyledTooltip as t } from "../../../components/data-display/tooltip/StyledTooltip.js";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
var m = (t) => /* @__PURE__ */ r(o, {
|
|
5
|
-
slots: { transition: p },
|
|
6
|
-
slotProps: {
|
|
7
|
-
transition: { timeout: 300 },
|
|
8
|
-
tooltip: { sx: {
|
|
9
|
-
borderRadius: "3px !important",
|
|
10
|
-
"& .MuiTooltip-arrow": { color: "#363E4A !important" },
|
|
11
|
-
color: "white !important",
|
|
12
|
-
boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.25) !important",
|
|
13
|
-
display: "flex !important",
|
|
14
|
-
padding: "4px 8px !important",
|
|
15
|
-
alignItems: "center !important",
|
|
16
|
-
fontSize: "12px !important",
|
|
17
|
-
lineHeight: "16px !important",
|
|
18
|
-
letterSpacing: " 0.24px !important",
|
|
19
|
-
bgcolor: "#363E4A !important",
|
|
20
|
-
wordBreak: "break-word !important"
|
|
21
|
-
} }
|
|
22
|
-
},
|
|
3
|
+
var l = (o) => /* @__PURE__ */ r(t, {
|
|
23
4
|
arrow: !0,
|
|
24
5
|
placement: "top",
|
|
25
|
-
...
|
|
6
|
+
...o
|
|
26
7
|
});
|
|
27
8
|
export {
|
|
28
|
-
|
|
9
|
+
l as StyledTooltip
|
|
29
10
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.35.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"**/*.css",
|
|
@@ -60,6 +60,9 @@
|
|
|
60
60
|
"storybook": "storybook dev -p 6006",
|
|
61
61
|
"storybook:no-browser": "storybook dev -p 6006 --no-open",
|
|
62
62
|
"build-storybook": "export NODE_OPTIONS=--max_old_space_size=6240 && storybook build",
|
|
63
|
+
"vrt": "bash scripts/vrt.sh check",
|
|
64
|
+
"vrt:accept": "bash scripts/vrt.sh accept",
|
|
65
|
+
"vrt:report": "playwright show-report",
|
|
63
66
|
"test-storybook": "npx vitest --project=storybook",
|
|
64
67
|
"changeset:pre-beta": "changeset pre enter beta",
|
|
65
68
|
"changeset:pre-exit": "changeset pre exit",
|
|
@@ -72,31 +75,24 @@
|
|
|
72
75
|
"node": ">=24 <25"
|
|
73
76
|
},
|
|
74
77
|
"dependencies": {
|
|
75
|
-
"@base-ui/react": "^1.5.0",
|
|
76
78
|
"@dnd-kit/core": "^6.1.0",
|
|
77
79
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
78
80
|
"@dnd-kit/sortable": "^8.0.0",
|
|
79
81
|
"@dnd-kit/utilities": "^3.2.2",
|
|
80
|
-
"@
|
|
82
|
+
"@floating-ui/react": "^0.27.19",
|
|
81
83
|
"@tanstack/react-table": "^8.21.3",
|
|
82
84
|
"@tanstack/react-virtual": "^3.13.21",
|
|
83
85
|
"clsx": "^1.2.1",
|
|
84
86
|
"date-fns": "^3.6.0",
|
|
85
|
-
"lodash-es": "^4.18.1",
|
|
86
|
-
"material-ui-popup-state": "^5.3.6",
|
|
87
87
|
"notistack": "^3.0.2",
|
|
88
|
-
"react-day-picker": "^9.14.0"
|
|
89
|
-
"tailwind-merge": "^2.5.2"
|
|
88
|
+
"react-day-picker": "^9.14.0"
|
|
90
89
|
},
|
|
91
90
|
"devDependencies": {
|
|
92
91
|
"@changesets/cli": "^2.26.2",
|
|
93
92
|
"@chromatic-com/storybook": "^5.1.1",
|
|
94
|
-
"@emotion/react": "^11.11.1",
|
|
95
|
-
"@emotion/styled": "^11.11.0",
|
|
96
|
-
"@mui/material": "^9.0.1",
|
|
97
|
-
"@faker-js/faker": "^8.0.2",
|
|
98
|
-
"@tippyjs/react": "^4.2.6",
|
|
99
93
|
"@eslint/js": "^9.39.2",
|
|
94
|
+
"@faker-js/faker": "^8.0.2",
|
|
95
|
+
"@playwright/test": "1.60.0",
|
|
100
96
|
"@storybook/addon-a11y": "10.3.3",
|
|
101
97
|
"@storybook/addon-docs": "10.3.3",
|
|
102
98
|
"@storybook/addon-links": "10.3.3",
|
|
@@ -104,7 +100,7 @@
|
|
|
104
100
|
"@storybook/addon-vitest": "10.3.3",
|
|
105
101
|
"@storybook/react-vite": "10.3.3",
|
|
106
102
|
"@storybook/test-runner": "^0.24.3",
|
|
107
|
-
"@
|
|
103
|
+
"@tippyjs/react": "^4.2.6",
|
|
108
104
|
"@types/node": "^24.12.4",
|
|
109
105
|
"@types/react": "^18.3.23",
|
|
110
106
|
"@types/react-copy-to-clipboard": "^5.0.7",
|
|
@@ -143,9 +139,6 @@
|
|
|
143
139
|
"vitest": "^4.0.16"
|
|
144
140
|
},
|
|
145
141
|
"peerDependencies": {
|
|
146
|
-
"@emotion/react": "^11.*",
|
|
147
|
-
"@emotion/styled": "^11.*",
|
|
148
|
-
"@mui/material": "^9.0.0",
|
|
149
142
|
"react": "^18.0.0 || ^19.0.0",
|
|
150
143
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
151
144
|
},
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Checkbox as r } from "@mui/material";
|
|
2
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
var c = ({ dataTest: t, ...o }) => /* @__PURE__ */ i(r, {
|
|
4
|
-
...o,
|
|
5
|
-
"data-testid": t,
|
|
6
|
-
sx: {
|
|
7
|
-
...o.sx,
|
|
8
|
-
"&.MuiCheckbox-root": { color: "var(--colors-delta-500) !important" },
|
|
9
|
-
"&.MuiCheckbox-root.Mui-checked": { color: "var(--colors-gama-500) !important" },
|
|
10
|
-
"&.MuiCheckbox-root.MuiCheckbox-indeterminate": { color: "var(--colors-gama-500) !important" },
|
|
11
|
-
"&.MuiCheckbox-root.Mui-disabled": { color: "var(--colors-delta-200) !important" },
|
|
12
|
-
"&.MuiCheckbox-root .PrivateSwitchBase-input": {
|
|
13
|
-
height: "100% !important",
|
|
14
|
-
width: "100% !important"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
export {
|
|
19
|
-
c as StyledCheckbox
|
|
20
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Radio as r } from "@mui/material";
|
|
2
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
var e = ({ dataTest: o, ...t }) => /* @__PURE__ */ a(r, {
|
|
4
|
-
...t,
|
|
5
|
-
"data-testid": o,
|
|
6
|
-
sx: {
|
|
7
|
-
"&": { color: "var(--colors-delta-500)" },
|
|
8
|
-
"& input": {
|
|
9
|
-
height: "100% !important",
|
|
10
|
-
width: "100% !important"
|
|
11
|
-
},
|
|
12
|
-
"&.Mui-checked": { color: "var(--colors-gama-500)" }
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
export {
|
|
16
|
-
e as StyledRadio
|
|
17
|
-
};
|