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,43 +1,31 @@
|
|
|
1
|
-
import { ErrorOutlineIcon as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { ErrorOutlineIcon as u } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
2
|
+
import { StyledFormHelperText as y } from "../../../miscellaneous/StyledFormHelperText.js";
|
|
3
|
+
import I from "clsx";
|
|
4
|
+
import { forwardRef as R, useId as s } from "react";
|
|
5
|
+
import { jsx as b, jsxs as r } from "react/jsx-runtime";
|
|
6
|
+
import { RadioGroup as v } from "@base-ui/react/radio-group";
|
|
7
|
+
var q = R(({ value: a, defaultValue: l, onValueChange: m, dataTest: c, error: t, errorText: p, helperText: e, children: n, ...f }, x) => {
|
|
8
|
+
const d = s(), i = s(), o = (t ?? !1) || (e ?? !1), h = t ? p ?? "Required" : e;
|
|
9
|
+
return /* @__PURE__ */ r(v, {
|
|
10
|
+
...f,
|
|
11
|
+
"data-testid": c,
|
|
12
|
+
"aria-describedby": o ? t ? i : d : void 0,
|
|
13
|
+
"aria-invalid": t,
|
|
14
|
+
ref: x,
|
|
12
15
|
value: a,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return /* @__PURE__ */ u("div", {
|
|
21
|
-
...g,
|
|
22
|
-
ref: R,
|
|
23
|
-
role: "radiogroup",
|
|
24
|
-
"data-testid": h,
|
|
25
|
-
"aria-describedby": c ? e ? i : r : void 0,
|
|
26
|
-
"aria-invalid": e,
|
|
27
|
-
children: [/* @__PURE__ */ p(C.Provider, {
|
|
28
|
-
value: T,
|
|
29
|
-
children: y
|
|
30
|
-
}), c && /* @__PURE__ */ u(G, {
|
|
31
|
-
id: e ? i : r,
|
|
32
|
-
role: e ? "alert" : "status",
|
|
33
|
-
className: H("m-0 flex items-center gap-1 pt-1 text-sm", e ? "text-error-500" : "text-delta-600"),
|
|
34
|
-
children: [e && /* @__PURE__ */ p(B, {
|
|
16
|
+
defaultValue: l,
|
|
17
|
+
onValueChange: m,
|
|
18
|
+
children: [n, o && /* @__PURE__ */ r(y, {
|
|
19
|
+
id: t ? i : d,
|
|
20
|
+
role: t ? "alert" : "status",
|
|
21
|
+
className: I("m-0 flex items-center gap-1 pt-1 text-sm", t ? "text-error-500" : "text-delta-600"),
|
|
22
|
+
children: [t && /* @__PURE__ */ b(u, {
|
|
35
23
|
width: 20,
|
|
36
24
|
height: 20
|
|
37
|
-
}),
|
|
25
|
+
}), h]
|
|
38
26
|
})]
|
|
39
27
|
});
|
|
40
28
|
});
|
|
41
29
|
export {
|
|
42
|
-
|
|
30
|
+
q as StyledRadioGroup
|
|
43
31
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as r } from "../../../helpers/cn.js";
|
|
2
2
|
import { SearchIcon as c } from "../../icons/search-icon/SearchIcon.js";
|
|
3
3
|
import { CloseIcon as d } from "../../icons/close-icon/CloseIcon.js";
|
|
4
4
|
import { StyledInputField as p } from "../input-field/StyledInputField.js";
|
|
5
5
|
import { useState as u } from "react";
|
|
6
|
-
import { jsx as
|
|
7
|
-
var g = ({ value: t, onClear:
|
|
8
|
-
const [
|
|
9
|
-
return /* @__PURE__ */
|
|
6
|
+
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
7
|
+
var g = ({ value: t, onClear: n, ...e }) => {
|
|
8
|
+
const [l, s] = u(!1), a = l || t;
|
|
9
|
+
return /* @__PURE__ */ h("div", {
|
|
10
10
|
className: "relative w-full",
|
|
11
|
-
children: [/* @__PURE__ */
|
|
11
|
+
children: [/* @__PURE__ */ o(p, {
|
|
12
12
|
size: "small",
|
|
13
13
|
variant: "outlined",
|
|
14
14
|
value: t,
|
|
@@ -20,24 +20,24 @@ var g = ({ value: t, onClear: l, ...e }) => {
|
|
|
20
20
|
},
|
|
21
21
|
slotProps: {
|
|
22
22
|
input: {
|
|
23
|
-
className:
|
|
23
|
+
className: r("transition-[padding] duration-300", a ? "pl-0" : "pl-5"),
|
|
24
24
|
sx: { "& input": {
|
|
25
25
|
textOverflow: "ellipsis",
|
|
26
26
|
whiteSpace: "nowrap",
|
|
27
27
|
overflow: "hidden"
|
|
28
28
|
} },
|
|
29
|
-
endAdornment: t ? /* @__PURE__ */
|
|
29
|
+
endAdornment: t ? /* @__PURE__ */ o("div", {
|
|
30
30
|
"data-testid": "styled-search-clear-icon",
|
|
31
|
-
className:
|
|
31
|
+
className: r("cursor-pointer rounded-full bg-delta-50", "flex items-center justify-center", "transform-gpu transition-all duration-300 ease-in-out", t ? "scale-100 opacity-100" : "pointer-events-none scale-75 opacity-0"),
|
|
32
32
|
style: {
|
|
33
33
|
width: 24,
|
|
34
34
|
height: 24,
|
|
35
35
|
flexShrink: 0
|
|
36
36
|
},
|
|
37
|
-
onClick: (
|
|
38
|
-
|
|
37
|
+
onClick: (i) => {
|
|
38
|
+
i.preventDefault(), i.stopPropagation(), n?.();
|
|
39
39
|
},
|
|
40
|
-
children: /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ o(d, {
|
|
41
41
|
width: 20,
|
|
42
42
|
height: 20,
|
|
43
43
|
color: "var(--colors-delta-700)",
|
|
@@ -45,21 +45,22 @@ var g = ({ value: t, onClear: l, ...e }) => {
|
|
|
45
45
|
})
|
|
46
46
|
}) : null
|
|
47
47
|
},
|
|
48
|
-
inputLabel: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
inputLabel: { sx: {
|
|
49
|
+
transform: "translate(34px, 9px) scale(1)",
|
|
50
|
+
width: a ? void 0 : "calc(100% - 42px)",
|
|
51
|
+
"&.MuiInputLabel-shrink": { transform: "translate(16px, -9px) scale(0.75)" }
|
|
52
|
+
} }
|
|
52
53
|
},
|
|
53
54
|
...e,
|
|
54
55
|
sx: {
|
|
55
56
|
...e.fullWidth ? { width: "100%" } : { width: 160 },
|
|
56
57
|
...e.sx
|
|
57
58
|
}
|
|
58
|
-
}), /* @__PURE__ */
|
|
59
|
+
}), /* @__PURE__ */ o(c, {
|
|
59
60
|
"data-testid": "styled-search-icon",
|
|
60
61
|
width: 24,
|
|
61
62
|
height: 24,
|
|
62
|
-
className:
|
|
63
|
+
className: r("absolute left-2 top-1/2 -translate-y-1/2", "transform-gpu transition-all duration-300 ease-in-out", a ? "pointer-events-none scale-75 opacity-0" : "scale-100 opacity-100", e.error && "top-1/3"),
|
|
63
64
|
color: "var(--colors-delta-700)"
|
|
64
65
|
})]
|
|
65
66
|
});
|
|
@@ -1,127 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
t.floating.style.minWidth = `${e.reference.width}px`;
|
|
24
|
-
} })
|
|
25
|
-
]
|
|
26
|
-
}), { getReferenceProps: G, getFloatingProps: J } = ye([
|
|
27
|
-
he(p, { enabled: !l && !d }),
|
|
28
|
-
be(p),
|
|
29
|
-
ve(p, { role: "listbox" })
|
|
30
|
-
]), L = E([N.setReference]), Q = E([N.setFloating, u]);
|
|
31
|
-
F(() => r?.setFocused(s), [s, r]), F(() => r?.setFilled(i || !!m || !!f), [
|
|
32
|
-
i,
|
|
33
|
-
m,
|
|
34
|
-
f,
|
|
35
|
-
r
|
|
36
|
-
]);
|
|
37
|
-
const k = (e, t) => {
|
|
38
|
-
C || O(e), I?.({ target: {
|
|
39
|
-
value: e,
|
|
40
|
-
name: h
|
|
41
|
-
} }, t), v(!1);
|
|
42
|
-
}, T = D.map(w, (e) => {
|
|
43
|
-
if (!R(e)) return e;
|
|
44
|
-
const t = e.props.value;
|
|
45
|
-
return ce(e, {
|
|
46
|
-
selected: t === n,
|
|
47
|
-
onClick: () => k(t, e.props.children)
|
|
48
|
-
});
|
|
49
|
-
}), X = D.toArray(w).find((e) => R(e) && e.props.value === n), Y = b ? b(n) : X?.props.children, Z = (e) => {
|
|
50
|
-
const t = u.current ? Array.from(u.current.querySelectorAll('[role="option"]:not([aria-disabled="true"])')) : [];
|
|
51
|
-
if (t.length === 0) return;
|
|
52
|
-
const ee = t.findIndex((te) => te === document.activeElement);
|
|
53
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), t[(ee + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus()) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), document.activeElement?.click());
|
|
54
|
-
};
|
|
55
|
-
return /* @__PURE__ */ c("div", {
|
|
56
|
-
className: a("group relative inline-flex flex-col", U && "w-full", q),
|
|
57
|
-
style: {
|
|
58
|
-
...oe(K),
|
|
59
|
-
...B
|
|
1
|
+
import { ChevronDownIcon as u } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
|
|
2
|
+
import { CloseIcon as m } from "../../icons/close-icon/CloseIcon.js";
|
|
3
|
+
import { ErrorOutlineIcon as d } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
4
|
+
import { StyledFormHelperText as c } from "../../miscellaneous/StyledFormHelperText.js";
|
|
5
|
+
import s from "clsx";
|
|
6
|
+
import { Select as h } from "@mui/material";
|
|
7
|
+
import { Fragment as p, jsx as o, jsxs as t } from "react/jsx-runtime";
|
|
8
|
+
var I = ({ dataTest: i, allowClear: l, error: e, errorText: n, ...r }) => /* @__PURE__ */ t(p, { children: [/* @__PURE__ */ o(h, {
|
|
9
|
+
...r,
|
|
10
|
+
"data-testid": i,
|
|
11
|
+
error: e,
|
|
12
|
+
value: r.value,
|
|
13
|
+
IconComponent: ({ className: a }) => /* @__PURE__ */ o(u, {
|
|
14
|
+
width: 24,
|
|
15
|
+
height: 24,
|
|
16
|
+
className: s(a, "-mt-[3.5px]")
|
|
17
|
+
}),
|
|
18
|
+
endAdornment: l && r.value ? /* @__PURE__ */ o("div", {
|
|
19
|
+
"data-testid": "select-clear-button",
|
|
20
|
+
className: "absolute right-8 flex items-center justify-center rounded-full p-[2px] duration-300 hover:bg-gama-100",
|
|
21
|
+
onClick: () => {
|
|
22
|
+
r.onChange?.({ target: { value: "" } }, null);
|
|
60
23
|
},
|
|
61
|
-
children:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
className: "flex items-center justify-center rounded-full p-[2px] hover:bg-gama-100",
|
|
84
|
-
onClick: (e) => {
|
|
85
|
-
e.stopPropagation(), k("", null);
|
|
86
|
-
},
|
|
87
|
-
children: /* @__PURE__ */ o(se, {
|
|
88
|
-
width: 18,
|
|
89
|
-
height: 18
|
|
90
|
-
})
|
|
91
|
-
}), /* @__PURE__ */ o(re, {
|
|
92
|
-
width: 24,
|
|
93
|
-
height: 24,
|
|
94
|
-
className: a("transition-transform", s && "rotate-180")
|
|
95
|
-
})]
|
|
96
|
-
}),
|
|
97
|
-
/* @__PURE__ */ o("div", { className: ne({
|
|
98
|
-
focused: s,
|
|
99
|
-
error: y,
|
|
100
|
-
disabled: l,
|
|
101
|
-
readOnly: d
|
|
102
|
-
}) })
|
|
103
|
-
]
|
|
104
|
-
}),
|
|
105
|
-
s && /* @__PURE__ */ o(me, { children: /* @__PURE__ */ o("ul", {
|
|
106
|
-
ref: Q,
|
|
107
|
-
role: "listbox",
|
|
108
|
-
"aria-label": h,
|
|
109
|
-
style: W,
|
|
110
|
-
...J(),
|
|
111
|
-
onKeyDown: Z,
|
|
112
|
-
className: a("z-[1300] m-0 max-h-72 list-none overflow-auto rounded-lg border border-delta-300 bg-white px-0 py-1 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", M?.className),
|
|
113
|
-
children: T
|
|
114
|
-
}) }),
|
|
115
|
-
y && /* @__PURE__ */ c(ae, {
|
|
116
|
-
className: "m-0 flex items-center gap-1 pt-1 text-sm text-error-500",
|
|
117
|
-
children: [/* @__PURE__ */ o(le, {
|
|
118
|
-
width: 20,
|
|
119
|
-
height: 20
|
|
120
|
-
}), j ?? "Required"]
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
});
|
|
124
|
-
};
|
|
24
|
+
children: /* @__PURE__ */ o(m, {
|
|
25
|
+
width: 18,
|
|
26
|
+
height: 18
|
|
27
|
+
})
|
|
28
|
+
}) : null,
|
|
29
|
+
sx: {
|
|
30
|
+
".MuiOutlinedInput-notchedOutline": { borderColor: "var(--colors-delta-500) !important" },
|
|
31
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": { borderColor: "var(--colors-gama-500) !important" },
|
|
32
|
+
"&.MuiFormLabel-root-MuiInputLabel-root .Mui-error": { color: "var(--colors-error-500) !important" },
|
|
33
|
+
"&.Mui-error .MuiOutlinedInput-notchedOutline": { borderColor: "var(--colors-error-500) !important" },
|
|
34
|
+
"& .MuiInputBase-colorPrimary.Mui-error fieldset": { borderColor: "var(--colors-error-500) !important" },
|
|
35
|
+
"&.Mui-focused::after": { borderColor: "var(--colors-gama-400) !important" },
|
|
36
|
+
"&:hover .MuiOutlinedInput-notchedOutline": { border: "2px solid var(--colors-gama-300) !important" },
|
|
37
|
+
...r.sx
|
|
38
|
+
}
|
|
39
|
+
}), e && /* @__PURE__ */ t(c, {
|
|
40
|
+
className: "m-0 flex items-center gap-1 pt-1 text-sm text-error-500",
|
|
41
|
+
children: [/* @__PURE__ */ o(d, {
|
|
42
|
+
width: 20,
|
|
43
|
+
height: 20
|
|
44
|
+
}), n ?? "Required"]
|
|
45
|
+
})] });
|
|
125
46
|
export {
|
|
126
|
-
|
|
47
|
+
I as StyledSelect
|
|
127
48
|
};
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { CheckIcon as t } from "../../icons/check-icon/CheckIcon.js";
|
|
2
|
+
import { MenuItem as o } from "@mui/material";
|
|
3
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
var s = (e) => /* @__PURE__ */ n(o, {
|
|
5
|
+
...e,
|
|
6
|
+
sx: {
|
|
7
|
+
"&.MuiMenuItem-root": {
|
|
8
|
+
fontSize: "var(--font-size-body-base) !important",
|
|
9
|
+
gap: "4px",
|
|
10
|
+
px: 1
|
|
11
|
+
},
|
|
12
|
+
"&.Mui-selected": { backgroundColor: "var(--colors-gama-50) !important" }
|
|
13
|
+
},
|
|
14
|
+
children: [/* @__PURE__ */ r("span", {
|
|
15
|
+
style: {
|
|
16
|
+
width: "24px",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
display: "flex"
|
|
19
|
+
},
|
|
20
|
+
children: e.selected && /* @__PURE__ */ r(t, {
|
|
14
21
|
width: 22,
|
|
15
22
|
height: 22,
|
|
16
|
-
|
|
23
|
+
style: { color: "var(--colors-gama-500)" }
|
|
17
24
|
})
|
|
18
|
-
}), /* @__PURE__ */
|
|
19
|
-
className: "min-w-0 flex-1 truncate",
|
|
20
|
-
children: r
|
|
21
|
-
})]
|
|
25
|
+
}), /* @__PURE__ */ r("span", { children: e.children })]
|
|
22
26
|
});
|
|
23
27
|
export {
|
|
24
|
-
|
|
28
|
+
s as StyledSelectItem
|
|
25
29
|
};
|