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,192 +1,162 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { ChevronDownIcon as
|
|
3
|
-
import { CloseIcon as
|
|
4
|
-
import { CheckIcon as
|
|
5
|
-
import { PlusIconCircle as
|
|
6
|
-
import { StyledChip as
|
|
7
|
-
import { StyledCheckbox as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, he = (e) => {
|
|
62
|
-
if (e.key === "Enter" && n && f != null && h[f] != null) {
|
|
63
|
-
e.preventDefault();
|
|
64
|
-
const t = h[f];
|
|
65
|
-
E(t) || C(e, t);
|
|
66
|
-
} else e.key === "ArrowDown" && !n && m(!0);
|
|
67
|
-
}, ge = !G && !u && !L && (o ? i.length > 0 : I !== null), be = o ? k ? k(i, ({ index: e }) => ({ "data-index": e })) : i.map((e, t) => /* @__PURE__ */ s($e, {
|
|
68
|
-
dataTest: `selected-chip-${a(e)}`,
|
|
69
|
-
label: a(e),
|
|
70
|
-
readOnly: u,
|
|
71
|
-
onDelete: u ? void 0 : (l) => C(l, e)
|
|
72
|
-
}, `${a(e)}-${t}`)) : void 0, xe = /* @__PURE__ */ D("span", {
|
|
73
|
-
className: "flex items-center",
|
|
74
|
-
children: [
|
|
75
|
-
j && /* @__PURE__ */ s(Ae, {
|
|
76
|
-
width: 20,
|
|
77
|
-
height: 20,
|
|
78
|
-
className: "animate-spin"
|
|
79
|
-
}),
|
|
80
|
-
ge && /* @__PURE__ */ s("span", {
|
|
81
|
-
role: "button",
|
|
82
|
-
"data-testid": `${r}-clear`,
|
|
83
|
-
className: "flex min-h-6 min-w-6 cursor-pointer items-center justify-center rounded-full bg-delta-50",
|
|
84
|
-
onMouseDown: (e) => {
|
|
85
|
-
e.preventDefault(), pe(e);
|
|
86
|
-
},
|
|
87
|
-
children: /* @__PURE__ */ s(Ie, {
|
|
88
|
-
width: 20,
|
|
89
|
-
height: 20,
|
|
90
|
-
className: "text-delta-700"
|
|
91
|
-
})
|
|
92
|
-
}),
|
|
93
|
-
u ? null : J ?? (o ? /* @__PURE__ */ s(Se, {
|
|
1
|
+
import { cn as v } from "../../../helpers/cn.js";
|
|
2
|
+
import { ChevronDownIcon as le } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
|
|
3
|
+
import { CloseIcon as ae } from "../../icons/close-icon/CloseIcon.js";
|
|
4
|
+
import { CheckIcon as se } from "../../icons/check-icon/CheckIcon.js";
|
|
5
|
+
import { PlusIconCircle as ne } from "../../icons/plus-icon-circle/PlusIconCircle.js";
|
|
6
|
+
import { StyledChip as ce } from "../../data-display/chip/StyledChip.js";
|
|
7
|
+
import { StyledCheckbox as R } from "../checkbox/base-ui/StyledCheckbox.js";
|
|
8
|
+
import H from "./StyledSelectAutocomplete.module.js";
|
|
9
|
+
import B from "clsx";
|
|
10
|
+
import { createElement as A, useLayoutEffect as ie, useRef as de, useState as D } from "react";
|
|
11
|
+
import { Autocomplete as ue, Paper as me } from "@mui/material";
|
|
12
|
+
import { jsx as o, jsxs as L } from "react/jsx-runtime";
|
|
13
|
+
import { mergeSlotProps as pe } from "@mui/material/utils";
|
|
14
|
+
function he(s, c) {
|
|
15
|
+
return pe(s, c);
|
|
16
|
+
}
|
|
17
|
+
function Ie({ dataTest: s, autoHeight: c, getOptionLabel: u, wrapperClassName: z, multiple: n, allowSelectAll: W, selectAllLabel: C, className: V, defaultValue: M, isOptionEqualToValue: p, onChange: _, options: h, popupIcon: F, readOnly: f, renderOption: G, renderValue: K, sx: O, value: x, ...T }) {
|
|
18
|
+
const { slots: U, slotProps: g, ...E } = T, [N, J] = D("auto"), b = de(null), l = n === !0 && W === !0 && !f, k = x !== void 0, S = (e) => Array.isArray(e) ? e : [], [Q, X] = D(() => S(M));
|
|
19
|
+
ie(() => {
|
|
20
|
+
if (!c) return;
|
|
21
|
+
const e = b.current?.getBoundingClientRect().height ?? 0, t = b.current?.getBoundingClientRect().top ?? 0, r = window.innerHeight - t - e - 40;
|
|
22
|
+
J(r > 0 ? r : "auto");
|
|
23
|
+
}, [c]);
|
|
24
|
+
const i = (e) => typeof e == "object" && e !== null && "label" in e ? e.label : String(e), Y = (e) => typeof e == "object" && e !== null && "disabled" in e && !!e.disabled, Z = {
|
|
25
|
+
padding: 0,
|
|
26
|
+
"& .MuiAutocomplete-option": { paddingLeft: n ? "12px !important" : "6px !important" }
|
|
27
|
+
}, w = c ? { maxHeight: N === "auto" ? "auto" : `${N}px` } : void 0, I = l ? S(k ? x : Q) : [], d = l ? h.filter((e) => !Y(e)) : h, q = (e, t) => {
|
|
28
|
+
const r = typeof e == "object" && e !== null;
|
|
29
|
+
return r !== (typeof t == "object" && t !== null) || !r && typeof e != typeof t ? !1 : p ? p(e, t) : e === t;
|
|
30
|
+
}, P = l ? d.filter((e) => I.some((t) => q(e, t))).length : 0, $ = l && d.length > 0 && P === d.length, ee = l && P > 0 && !$, j = (e, t, r, a) => {
|
|
31
|
+
l && !k && X(S(t)), _?.(e, t, r, a);
|
|
32
|
+
}, te = (e, t) => {
|
|
33
|
+
j(e, t ? [...d] : [], t ? "selectOption" : "clear", void 0);
|
|
34
|
+
}, re = (e, t) => Array.isArray(e) ? e.map((r, a) => {
|
|
35
|
+
const m = t({ index: a }), y = u?.(r) ?? i(r);
|
|
36
|
+
return /* @__PURE__ */ A(ce, {
|
|
37
|
+
...m,
|
|
38
|
+
key: `selected-chip-${y}-${a}`,
|
|
39
|
+
dataTest: `selected-chip-${y}`,
|
|
40
|
+
label: y,
|
|
41
|
+
variant: "outlined"
|
|
42
|
+
});
|
|
43
|
+
}) : null, oe = {
|
|
44
|
+
sx: Z,
|
|
45
|
+
...w ? { style: w } : {}
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ o("div", {
|
|
48
|
+
className: v(H.styledSelectAutocompleteWrapper, z),
|
|
49
|
+
ref: b,
|
|
50
|
+
children: /* @__PURE__ */ o(ue, {
|
|
51
|
+
...E,
|
|
52
|
+
multiple: n,
|
|
53
|
+
defaultValue: l ? void 0 : M,
|
|
54
|
+
getOptionLabel: u,
|
|
55
|
+
isOptionEqualToValue: p,
|
|
56
|
+
className: B("!text-sm", V),
|
|
57
|
+
onChange: j,
|
|
58
|
+
options: h,
|
|
59
|
+
renderValue: K ?? (n ? re : void 0),
|
|
60
|
+
popupIcon: f ? null : F ?? n ? /* @__PURE__ */ o(ne, {
|
|
94
61
|
width: 24,
|
|
95
62
|
height: 24
|
|
96
|
-
}) : /* @__PURE__ */
|
|
63
|
+
}) : /* @__PURE__ */ o(le, {
|
|
97
64
|
width: 24,
|
|
98
65
|
height: 24,
|
|
99
|
-
className:
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
66
|
+
className: B(H["select-custom-icon"])
|
|
67
|
+
}),
|
|
68
|
+
readOnly: f,
|
|
69
|
+
"data-testid": s,
|
|
70
|
+
value: l ? I : x,
|
|
71
|
+
slots: {
|
|
72
|
+
...U,
|
|
73
|
+
paper: ({ children: e }) => /* @__PURE__ */ L(me, {
|
|
74
|
+
"data-testid": `paper-${s}`,
|
|
75
|
+
sx: {
|
|
76
|
+
padding: "0 !important",
|
|
77
|
+
marginTop: "0px !important",
|
|
78
|
+
"& .MuiAutocomplete-option.Mui-focused": { background: "var(--colors-delta-50) !important" },
|
|
79
|
+
"& li[aria-selected=true]": { background: "var(--colors-gama-50) !important" },
|
|
80
|
+
"& li[aria-selected=true].MuiAutocomplete-option.Mui-focused": { background: "var(--colors-gama-50) !important" },
|
|
81
|
+
"&:has([data-select-all-header]:hover) .MuiAutocomplete-option.Mui-focused": { background: "transparent !important" },
|
|
82
|
+
"&:has([data-select-all-header]:hover) li[aria-selected=true].MuiAutocomplete-option.Mui-focused": { background: "var(--colors-gama-50) !important" }
|
|
83
|
+
},
|
|
84
|
+
children: [l && d.length > 0 && /* @__PURE__ */ L("div", {
|
|
85
|
+
"data-select-all-header": !0,
|
|
86
|
+
className: "flex items-center gap-x-[10px] border-[1px] border-b border-solid border-delta-200 bg-delta-50 py-2 pl-3 text-xs",
|
|
87
|
+
onMouseDown: (t) => t.preventDefault(),
|
|
88
|
+
role: "presentation",
|
|
89
|
+
children: [/* @__PURE__ */ o(R, {
|
|
90
|
+
size: "small",
|
|
91
|
+
dataTest: `${s}-select-all`,
|
|
92
|
+
checked: $,
|
|
93
|
+
indeterminate: ee,
|
|
94
|
+
hideWrapper: !0,
|
|
95
|
+
onChange: te,
|
|
96
|
+
"aria-label": C ?? "Select all"
|
|
97
|
+
}), /* @__PURE__ */ o("span", {
|
|
98
|
+
className: "truncate text-[10px] font-semibold uppercase text-delta-600",
|
|
99
|
+
children: C ?? "Select all"
|
|
100
|
+
})]
|
|
101
|
+
}), e]
|
|
102
|
+
})
|
|
121
103
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
104
|
+
renderOption: G ?? ((e, t, { selected: r }) => {
|
|
105
|
+
const a = e, m = e.id ?? i(t);
|
|
106
|
+
return n ? /* @__PURE__ */ A("li", {
|
|
107
|
+
...a,
|
|
108
|
+
key: m,
|
|
109
|
+
className: v(e.className, "flex items-center gap-x-[10px] border-0 border-b border-solid border-delta-200")
|
|
110
|
+
}, /* @__PURE__ */ o(R, {
|
|
111
|
+
dataTest: `${s}-${i(t)}-checkbox`,
|
|
112
|
+
checked: r,
|
|
113
|
+
size: "small",
|
|
114
|
+
hideWrapper: !0
|
|
115
|
+
}), /* @__PURE__ */ o("span", {
|
|
116
|
+
className: "flex-1 truncate py-2 text-sm text-delta-700",
|
|
117
|
+
children: u?.(t) ?? i(t)
|
|
118
|
+
})) : /* @__PURE__ */ A("li", {
|
|
119
|
+
...a,
|
|
120
|
+
key: m,
|
|
121
|
+
className: v(e.className, "flex items-center gap-x-1")
|
|
122
|
+
}, /* @__PURE__ */ o("span", {
|
|
123
|
+
className: "w-5",
|
|
124
|
+
children: r && /* @__PURE__ */ o(se, {
|
|
125
|
+
width: 20,
|
|
126
|
+
height: 20,
|
|
127
|
+
style: { color: "var(--colors-gama-500)" }
|
|
128
|
+
})
|
|
129
|
+
}), /* @__PURE__ */ o("span", {
|
|
130
|
+
className: "flex-1 truncate py-2 text-sm text-delta-700",
|
|
131
|
+
children: u?.(t) ?? i(t)
|
|
132
|
+
}));
|
|
133
|
+
}),
|
|
134
|
+
sx: {
|
|
135
|
+
...O,
|
|
136
|
+
"& .MuiOutlinedInput-notchedOutline": { borderColor: "var(--colors-gama-500) !important" },
|
|
137
|
+
"& .select-custom-icon": { marginTop: "-0.5px !important" },
|
|
138
|
+
"& .MuiInputBase-inputSizeSmall": { minHeight: "23px !important" }
|
|
154
139
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
modal: !1,
|
|
172
|
-
initialFocus: -1,
|
|
173
|
-
returnFocus: !1,
|
|
174
|
-
children: /* @__PURE__ */ s("ul", {
|
|
175
|
-
ref: fe,
|
|
176
|
-
style: ie,
|
|
177
|
-
...de(),
|
|
178
|
-
className: x("z-[1300] m-0 list-none overflow-auto rounded-lg border border-delta-200 bg-white py-0 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", Y?.listbox),
|
|
179
|
-
children: j ? /* @__PURE__ */ s("li", {
|
|
180
|
-
className: "px-3 py-2 text-sm text-delta-600",
|
|
181
|
-
children: H
|
|
182
|
-
}) : h.length === 0 ? /* @__PURE__ */ s("li", {
|
|
183
|
-
className: "px-3 py-2 text-sm text-delta-600",
|
|
184
|
-
children: O
|
|
185
|
-
}) : h.map(Ne)
|
|
140
|
+
slotProps: {
|
|
141
|
+
...g,
|
|
142
|
+
clearIndicator: {
|
|
143
|
+
disableRipple: !0,
|
|
144
|
+
disableFocusRipple: !0,
|
|
145
|
+
...g?.clearIndicator ?? {}
|
|
146
|
+
},
|
|
147
|
+
listbox: he(g?.listbox, oe)
|
|
148
|
+
},
|
|
149
|
+
clearIcon: /* @__PURE__ */ o("span", {
|
|
150
|
+
className: "flex min-h-6 min-w-6 cursor-pointer items-center justify-center rounded-full bg-delta-50",
|
|
151
|
+
children: /* @__PURE__ */ o(ae, {
|
|
152
|
+
width: 20,
|
|
153
|
+
height: 20,
|
|
154
|
+
className: "text-delta-700"
|
|
155
|
+
})
|
|
186
156
|
})
|
|
187
|
-
})
|
|
157
|
+
})
|
|
188
158
|
});
|
|
189
159
|
}
|
|
190
160
|
export {
|
|
191
|
-
|
|
161
|
+
Ie as StyledSelectAutocomplete
|
|
192
162
|
};
|
|
@@ -1,82 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { ErrorOutlineIcon as c } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
2
|
+
import { StyledFormHelperText as b } from "../../miscellaneous/StyledFormHelperText.js";
|
|
3
|
+
import e from "clsx";
|
|
4
|
+
import { Slider as n } from "@mui/material";
|
|
5
|
+
import { Fragment as g, jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
var k = ({ dataTest: i, error: r, errorText: d, helperText: o, ...a }) => {
|
|
7
|
+
const s = (r ?? !1) || (o ?? !1), m = r ? d ?? "Required" : o;
|
|
8
|
+
return /* @__PURE__ */ l(g, { children: [/* @__PURE__ */ t(n, {
|
|
9
|
+
...a,
|
|
10
|
+
"data-testid": i,
|
|
11
|
+
slotProps: {
|
|
12
|
+
...a.slotProps,
|
|
13
|
+
thumb: {
|
|
14
|
+
className: e("h-4 w-4", "before:shadow-none", 'after:h-8 after:w-8 after:content-[""]', a.orientation === "vertical" ? "mb-1 ml-0" : "ml-1", a.disabled ? "bg-delta-200" : "bg-gama-500"),
|
|
15
|
+
...a.slotProps?.thumb
|
|
16
|
+
},
|
|
17
|
+
rail: {
|
|
18
|
+
className: "bg-delta-200",
|
|
19
|
+
...a.slotProps?.rail
|
|
20
|
+
},
|
|
21
|
+
markLabel: {
|
|
22
|
+
className: e("ml-1 text-base font-semibold text-delta-600", a.orientation === "vertical" && "mb-1"),
|
|
23
|
+
...a.slotProps?.markLabel
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
sx: {
|
|
27
|
+
...a.sx,
|
|
28
|
+
"& .MuiSlider-track": {
|
|
29
|
+
backgroundColor: a.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)",
|
|
30
|
+
borderColor: a.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)"
|
|
31
|
+
},
|
|
32
|
+
"& .MuiSlider-mark": {
|
|
33
|
+
backgroundColor: "white",
|
|
34
|
+
border: "1px solid var(--colors-delta-300)",
|
|
35
|
+
borderRadius: "50%",
|
|
36
|
+
height: "8px",
|
|
37
|
+
width: "8px",
|
|
38
|
+
"&.MuiSlider-markActive": {
|
|
39
|
+
backgroundColor: a.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)",
|
|
40
|
+
border: "1px solid",
|
|
41
|
+
borderColor: a.disabled ? "var(--colors-gray-200)" : "var(--colors-gama-500)",
|
|
42
|
+
opacity: 1
|
|
43
|
+
}
|
|
44
|
+
}
|
|
21
45
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
max: u,
|
|
30
|
-
step: R,
|
|
31
|
-
value: i,
|
|
32
|
-
disabled: p,
|
|
33
|
-
"aria-orientation": M,
|
|
34
|
-
className: e(d.SliderInput, o ? d.Vertical : d.Horizontal, q === "small" && d.Small, p && d.Disabled, c?.thumb, y?.thumb?.className),
|
|
35
|
-
onChange: (l) => S(K, l, Number(l.currentTarget.value), t),
|
|
36
|
-
onPointerUp: (l) => S(P, l, Number(l.currentTarget.value), t),
|
|
37
|
-
onKeyUp: (l) => S(P, l, Number(l.currentTarget.value), t)
|
|
38
|
-
}, t);
|
|
39
|
-
return /* @__PURE__ */ b("div", {
|
|
40
|
-
className: e("flex", o ? "h-full w-8 flex-col items-center" : "w-full flex-col", c?.root, E),
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ b("div", {
|
|
43
|
-
className: e("relative", o ? "h-full w-8" : "h-4 w-full"),
|
|
44
|
-
children: [/* @__PURE__ */ b("div", {
|
|
45
|
-
className: e("absolute", o ? "inset-y-2 left-1/2 w-1 -translate-x-1/2" : "inset-x-2 top-1/2 h-1 -translate-y-1/2"),
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ m("div", { className: e("absolute inset-0 rounded-full bg-delta-200", c?.rail, y?.rail?.className) }),
|
|
48
|
-
/* @__PURE__ */ m("div", {
|
|
49
|
-
className: e("absolute rounded-full", o ? "left-0 w-full" : "top-0 h-full", p ? "bg-delta-200" : "bg-gama-500", c?.track),
|
|
50
|
-
style: G
|
|
51
|
-
}),
|
|
52
|
-
N.map((t) => {
|
|
53
|
-
const i = j(t.value);
|
|
54
|
-
return /* @__PURE__ */ m("span", {
|
|
55
|
-
className: e("absolute h-2 w-2 -translate-x-1/2 rounded-full border", o ? "left-1/2 translate-y-1/2" : "top-1/2 -translate-y-1/2", i ? e("border-gama-500", p ? "bg-delta-200" : "bg-gama-500", c?.markActive) : e("border-delta-300 bg-white", c?.mark)),
|
|
56
|
-
style: D(t.value)
|
|
57
|
-
}, t.value);
|
|
58
|
-
})
|
|
59
|
-
]
|
|
60
|
-
}), f ? [$(0, n[0]), $(1, n[1])] : $(0, g)]
|
|
61
|
-
}),
|
|
62
|
-
N.some((t) => t.label != null) && /* @__PURE__ */ m("div", {
|
|
63
|
-
className: e("relative", o ? "h-full w-full" : "mt-1 h-5 w-full"),
|
|
64
|
-
children: N.map((t) => t.label == null ? null : /* @__PURE__ */ m("span", {
|
|
65
|
-
className: e("absolute -translate-x-1/2 text-sm font-semibold", j(t.value) ? e("text-delta-800", c?.markLabelActive) : "text-delta-600", c?.markLabel, y?.markLabel?.className),
|
|
66
|
-
style: D(t.value),
|
|
67
|
-
children: t.label
|
|
68
|
-
}, t.value))
|
|
69
|
-
}),
|
|
70
|
-
O && /* @__PURE__ */ b(Q, {
|
|
71
|
-
className: e("m-0 flex items-center gap-1 pt-1 text-sm", v ? "text-error-500" : "text-delta-600"),
|
|
72
|
-
children: [v && /* @__PURE__ */ m(J, {
|
|
73
|
-
width: 20,
|
|
74
|
-
height: 20
|
|
75
|
-
}), k]
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
});
|
|
46
|
+
}), s && /* @__PURE__ */ l(b, {
|
|
47
|
+
className: e("m-0 flex items-center gap-1 pt-1 text-base", r ? "text-error-500" : "text-delta-600"),
|
|
48
|
+
children: [r && /* @__PURE__ */ t(c, {
|
|
49
|
+
width: 20,
|
|
50
|
+
height: 20
|
|
51
|
+
}), m]
|
|
52
|
+
})] });
|
|
79
53
|
};
|
|
80
54
|
export {
|
|
81
|
-
|
|
55
|
+
k as StyledSlider
|
|
82
56
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { cn as x } from "../../../../helpers/cn.js";
|
|
2
1
|
import { getSvgIconStyle as C } from "../../../icons/iconStyle.js";
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { jsx as
|
|
6
|
-
|
|
2
|
+
import r from "./StyledSwitch.module.js";
|
|
3
|
+
import { forwardRef as y, useState as N } from "react";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
import { Switch as d } from "@base-ui/react/switch";
|
|
6
|
+
var b = ({ className: e }) => /* @__PURE__ */ t("svg", {
|
|
7
7
|
viewBox: "0 0 24 24",
|
|
8
|
-
className:
|
|
8
|
+
className: e,
|
|
9
9
|
fill: "none",
|
|
10
|
-
children: /* @__PURE__ */
|
|
10
|
+
children: /* @__PURE__ */ t("rect", {
|
|
11
11
|
x: "6",
|
|
12
12
|
y: "10.5",
|
|
13
13
|
width: "11",
|
|
@@ -15,55 +15,50 @@ var N = ({ className: t }) => /* @__PURE__ */ e("svg", {
|
|
|
15
15
|
fill: "currentColor",
|
|
16
16
|
rx: "0.75"
|
|
17
17
|
})
|
|
18
|
-
}), I = ({ width:
|
|
18
|
+
}), I = ({ width: e = 11, height: o = 11, className: c = "", onClick: n, color: s }) => /* @__PURE__ */ t("svg", {
|
|
19
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
-
width:
|
|
21
|
-
height:
|
|
20
|
+
width: e,
|
|
21
|
+
height: o,
|
|
22
22
|
viewBox: "0 0 448 512",
|
|
23
|
-
className:
|
|
24
|
-
onClick:
|
|
25
|
-
style: C(
|
|
23
|
+
className: c,
|
|
24
|
+
onClick: n,
|
|
25
|
+
style: C(s),
|
|
26
26
|
"aria-hidden": "true",
|
|
27
27
|
focusable: "false",
|
|
28
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ t("path", {
|
|
29
29
|
fill: "currentColor",
|
|
30
30
|
d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7L393.4 105.4c12.5-12.5 32.8-12.5 45.2 0"
|
|
31
31
|
})
|
|
32
|
-
}),
|
|
33
|
-
const [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, h = a.iconContent;
|
|
41
|
-
return /* @__PURE__ */ e("button", {
|
|
32
|
+
}), M = y(({ checked: e, defaultChecked: o = !1, onChange: c, disabled: n, readOnly: s, required: f, id: a, dataTest: u, ...v }, w) => {
|
|
33
|
+
const [g, p] = N(o), l = e !== void 0, h = l ? e : g, S = (i) => {
|
|
34
|
+
l || p(i), c?.({ target: {
|
|
35
|
+
checked: i,
|
|
36
|
+
name: a
|
|
37
|
+
} }, i);
|
|
38
|
+
}, x = l ? { checked: h } : { defaultChecked: o }, m = r.iconContent;
|
|
39
|
+
return /* @__PURE__ */ t(d.Root, {
|
|
42
40
|
...v,
|
|
41
|
+
...x,
|
|
42
|
+
nativeButton: !0,
|
|
43
|
+
render: /* @__PURE__ */ t("button", {}),
|
|
43
44
|
ref: w,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"data-disabled": c ? "" : void 0,
|
|
58
|
-
children: /* @__PURE__ */ e("span", {
|
|
59
|
-
className: a.thumb,
|
|
60
|
-
children: /* @__PURE__ */ e("span", {
|
|
61
|
-
className: a.icon,
|
|
62
|
-
children: o ? /* @__PURE__ */ e(I, { className: h }) : /* @__PURE__ */ e(N, { className: h })
|
|
45
|
+
className: r.switch,
|
|
46
|
+
onCheckedChange: S,
|
|
47
|
+
disabled: n,
|
|
48
|
+
readOnly: s,
|
|
49
|
+
required: f,
|
|
50
|
+
id: a,
|
|
51
|
+
name: a,
|
|
52
|
+
"data-testid": u,
|
|
53
|
+
children: /* @__PURE__ */ t(d.Thumb, {
|
|
54
|
+
className: r.thumb,
|
|
55
|
+
children: /* @__PURE__ */ t("span", {
|
|
56
|
+
className: r.icon,
|
|
57
|
+
children: h ? /* @__PURE__ */ t(I, { className: m }) : /* @__PURE__ */ t(b, { className: m })
|
|
63
58
|
})
|
|
64
59
|
})
|
|
65
60
|
});
|
|
66
61
|
});
|
|
67
62
|
export {
|
|
68
|
-
|
|
63
|
+
M as StyledSwitch
|
|
69
64
|
};
|