asma-ui-core 3.23.0 → 3.25.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.
Files changed (33) hide show
  1. package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +9 -9
  2. package/dist/components/data-display/tooltip/StyledTooltip.js +27 -28
  3. package/dist/components/icons/grid-view-outline-icon/GridViewOutlineIcon.js +17 -0
  4. package/dist/components/icons/grid-view-outline-icon/index.js +1 -0
  5. package/dist/components/icons/index.js +2 -0
  6. package/dist/components/icons/list-view-outline-icon/ListViewOutlineIcon.js +17 -0
  7. package/dist/components/icons/list-view-outline-icon/index.js +1 -0
  8. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +1 -1
  9. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +89 -89
  10. package/dist/components/inputs/input-field/StyledInputField.js +80 -74
  11. package/dist/components/inputs/search-field/StyledSearchField.js +33 -31
  12. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +114 -106
  13. package/dist/components/navigation/tabs/StyledTabs.js +15 -9
  14. package/dist/components/utils/accordion/base-ui/StyledAccordion.js +1 -1
  15. package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +20 -18
  16. package/dist/datetime/components/time-picker/TimePickerInput.js +7 -7
  17. package/dist/datetime/shared-components/StyledTooltip.js +27 -31
  18. package/dist/index.js +371 -367
  19. package/dist/src/components/icons/grid-view-outline-icon/GridViewOutlineIcon.d.ts +2 -0
  20. package/dist/src/components/icons/grid-view-outline-icon/index.d.ts +1 -0
  21. package/dist/src/components/icons/index.d.ts +2 -0
  22. package/dist/src/components/icons/list-view-outline-icon/ListViewOutlineIcon.d.ts +2 -0
  23. package/dist/src/components/icons/list-view-outline-icon/index.d.ts +1 -0
  24. package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +1 -1
  25. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +1 -1
  26. package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +1 -1
  27. package/dist/src/table/shared-components/StyledCheckbox.d.ts +1 -1
  28. package/dist/table/components/columns/action-column/components/RowActionMenu.js +40 -37
  29. package/dist/table/components/table-footer/TablePagination.js +18 -18
  30. package/dist/table/components/table-footer/TableRowCountSelect.js +17 -17
  31. package/dist/table/shared-components/StyledCheckbox.js +1 -1
  32. package/dist/table/shared-components/tooltip/index.js +21 -19
  33. package/package.json +5 -11
@@ -2,23 +2,23 @@ import { StyledChip as v } from "../chip/StyledChip.js";
2
2
  import { StyledCheckbox as b } from "../../inputs/checkbox/StyledCheckbox.js";
3
3
  import { StyledRadio as m } from "../../inputs/radio-button/StyledRadio.js";
4
4
  import { forwardRef as u } from "react";
5
- import { jsx as t } from "react/jsx-runtime";
5
+ import { jsx as e } from "react/jsx-runtime";
6
6
  var S = u(({ type: i = "checkbox", checked: a, size: c = "small", ...o }, n) => {
7
- const r = i === "checkbox", s = r ? b : m, d = !o.readOnly && !r && a, e = {
7
+ const r = i === "checkbox", s = r ? b : m, d = !o.readOnly && !r && a, l = {
8
8
  borderColor: "var(--colors-gama-300)",
9
9
  backgroundColor: "var(--colors-gama-25)",
10
10
  boxShadow: "0 0 0 1px inset var(--colors-gama-300)"
11
- }, l = o.ariaLabel ?? (typeof o.label == "string" ? o.label : void 0);
12
- return /* @__PURE__ */ t(v, {
11
+ }, t = o.ariaLabel ?? (typeof o.label == "string" ? o.label : void 0);
12
+ return /* @__PURE__ */ e(v, {
13
13
  ref: n,
14
- "aria-label": l,
15
- avatar: /* @__PURE__ */ t(s, {
14
+ "aria-label": t,
15
+ avatar: /* @__PURE__ */ e(s, {
16
16
  dataTest: o.dataTest,
17
17
  disableRipple: !0,
18
18
  checked: a,
19
19
  size: c,
20
20
  sx: { pointerEvents: "none" },
21
- inputProps: { "aria-label": l }
21
+ slotProps: { input: { "aria-label": t } }
22
22
  }),
23
23
  clickable: !0,
24
24
  tabIndex: 0,
@@ -29,7 +29,7 @@ var S = u(({ type: i = "checkbox", checked: a, size: c = "small", ...o }, n) =>
29
29
  borderColor: "var(--colors-gama-400)",
30
30
  boxShadow: "0 0 0 1px inset var(--colors-gama-400)",
31
31
  backgroundColor: "var(--colors-gama-50)",
32
- "&:hover": e
32
+ "&:hover": l
33
33
  },
34
34
  ...a && { "& .MuiChip-avatar": { "& .MuiSvgIcon-root": { color: "var(--colors-gama-500)" } } },
35
35
  ...o.readOnly && { "& .MuiChip-avatar": {
@@ -37,7 +37,7 @@ var S = u(({ type: i = "checkbox", checked: a, size: c = "small", ...o }, n) =>
37
37
  "& .MuiCheckbox-root, & .MuiRadio-root": { color: "var(--colors-delta-500)" },
38
38
  "& .Mui-checked": { color: "var(--colors-delta-500)" }
39
39
  } },
40
- "&:focus:hover": e,
40
+ "&:focus:hover": l,
41
41
  ...o.sx
42
42
  }
43
43
  });
@@ -1,38 +1,37 @@
1
1
  import { Tooltip as e } from "@mui/material";
2
2
  import { jsx as i } from "react/jsx-runtime";
3
- import n from "@mui/material/Fade";
4
- var x = (r) => {
5
- const { componentsProps: t, ...p } = r, o = t?.tooltip;
3
+ import { mergeSlotProps as r } from "@mui/material/utils";
4
+ import l from "@mui/material/Fade";
5
+ var a = {
6
+ borderRadius: "3px",
7
+ "& .MuiTooltip-arrow": { color: "#363E4A" },
8
+ color: "white",
9
+ boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.25)",
10
+ display: "flex",
11
+ padding: "4px 8px",
12
+ alignItems: "center",
13
+ fontSize: "12px",
14
+ lineHeight: "16px",
15
+ letterSpacing: "0.24px",
16
+ bgcolor: "#363E4A",
17
+ wordBreak: "break-word"
18
+ }, d = (p) => {
19
+ const { slotProps: o, ...t } = p;
6
20
  return /* @__PURE__ */ i(e, {
7
- TransitionComponent: n,
8
- TransitionProps: { timeout: 300 },
9
21
  enterDelay: 500,
10
22
  placement: "top",
11
- componentsProps: {
12
- ...t,
13
- tooltip: {
14
- ...o ?? {},
15
- style: { ...o?.style ?? {} },
16
- sx: {
17
- borderRadius: "3px",
18
- "& .MuiTooltip-arrow": { color: "#363E4A" },
19
- color: "white",
20
- boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.25)",
21
- display: "flex",
22
- padding: "4px 8px",
23
- alignItems: "center",
24
- fontSize: "12px",
25
- lineHeight: "16px",
26
- letterSpacing: "0.24px",
27
- bgcolor: "#363E4A",
28
- wordBreak: "break-word",
29
- ...o?.sx
30
- }
31
- }
23
+ ...t,
24
+ slots: {
25
+ transition: l,
26
+ ...t.slots
32
27
  },
33
- ...p
28
+ slotProps: {
29
+ ...o,
30
+ transition: r(o?.transition, { timeout: 300 }),
31
+ tooltip: r(o?.tooltip, { sx: a })
32
+ }
34
33
  });
35
34
  };
36
35
  export {
37
- x as StyledTooltip
36
+ d as StyledTooltip
38
37
  };
@@ -0,0 +1,17 @@
1
+ import { jsx as V } from "react/jsx-runtime";
2
+ function t(H) {
3
+ return /* @__PURE__ */ V("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: 24,
6
+ height: 24,
7
+ viewBox: "0 0 24 24",
8
+ ...H,
9
+ children: /* @__PURE__ */ V("path", {
10
+ fill: "currentColor",
11
+ d: "M2.64844 11.2502V2.63281H11.2517V11.2502H2.64844ZM2.64844 21.3535V12.7502H11.2517V21.3535H2.64844ZM12.7517 11.2502V2.63281H21.3691V11.2502H12.7517ZM12.7517 21.3535V12.7502H21.3691V21.3535H12.7517ZM4.62889 9.25561H9.27126V4.62739H4.62889V9.25561ZM14.7463 9.25561H19.3745V4.62739H14.7463V9.25561ZM14.7463 19.373H19.3745V14.7307H14.7463V19.373ZM4.62889 19.373H9.27126V14.7307H4.62889V19.373Z"
12
+ })
13
+ });
14
+ }
15
+ export {
16
+ t as GridViewOutlineIcon
17
+ };
@@ -0,0 +1 @@
1
+ export * from './GridViewOutlineIcon.js'
@@ -63,6 +63,7 @@ export * from './link-outline-icon.js'
63
63
  export * from './fast-check-outline-icon.js'
64
64
  export * from './unknown-document-outline-rounded-icon.js'
65
65
  export * from './list-status-icon.js'
66
+ export * from './list-view-outline-icon.js'
66
67
  export * from './text-box-check-outline-icon.js'
67
68
  export * from './list-settings-line-icon.js'
68
69
  export * from './earth-icon.js'
@@ -127,6 +128,7 @@ export * from './history-icon.js'
127
128
  export * from './conversion-path.js'
128
129
  export * from './graph-icon.js'
129
130
  export * from './graph-outline-icon.js'
131
+ export * from './grid-view-outline-icon.js'
130
132
  export * from './notes-icon.js'
131
133
  export * from './save-icon.js'
132
134
  export * from './remove-icon.js'
@@ -0,0 +1,17 @@
1
+ import { jsx as V } from "react/jsx-runtime";
2
+ function i(H) {
3
+ return /* @__PURE__ */ V("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: 24,
6
+ height: 24,
7
+ viewBox: "0 0 24 24",
8
+ ...H,
9
+ children: /* @__PURE__ */ V("path", {
10
+ fill: "currentColor",
11
+ d: "M9.10499 18.373H20.3745V15.2165H9.10499V18.373ZM3.62889 8.78391H7.32236V5.62739H3.62889V8.78391ZM3.62889 13.4589H7.32236V10.5665H3.62889V13.4589ZM3.62889 18.373H7.32236V15.2165H3.62889V18.373ZM9.10499 13.4589H20.3745V10.5665H9.10499V13.4589ZM9.10499 8.78391H20.3745V5.62739H9.10499V8.78391ZM1.64844 20.3535V3.63281H22.3691V20.3535H1.64844Z"
12
+ })
13
+ });
14
+ }
15
+ export {
16
+ i as ListViewOutlineIcon
17
+ };
@@ -0,0 +1 @@
1
+ export * from './ListViewOutlineIcon.js'
@@ -2,7 +2,7 @@ import { cn as C } from "../../../../helpers/cn.js";
2
2
  import e from "./StyledCheckbox.module.js";
3
3
  import p, { useEffect as E } from "react";
4
4
  import { jsx as t, jsxs as k } from "react/jsx-runtime";
5
- import { Checkbox as f } from "@base-ui/react";
5
+ import { Checkbox as f } from "@base-ui/react/checkbox";
6
6
  var L = (n) => /* @__PURE__ */ k("svg", {
7
7
  viewBox: "0 0 24 24",
8
8
  width: "100%",
@@ -1,160 +1,160 @@
1
- import { cn as D } from "../../../../helpers/cn.js";
1
+ import { cn as V } from "../../../../helpers/cn.js";
2
2
  import { LoadingIcon as Q } from "../../../icons/loading-icon/LoadingIcon.js";
3
3
  import { CheckIcon as U } from "../../../icons/check-icon/CheckIcon.js";
4
4
  import { PlusIconCircle as X } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
5
- import { StyledChip as j } from "../../../data-display/chip/StyledChip.js";
6
- import { StyledTooltip as A } from "../../../data-display/tooltip/StyledTooltip.js";
5
+ import { StyledChip as D } from "../../../data-display/chip/StyledChip.js";
6
+ import { StyledTooltip as j } from "../../../data-display/tooltip/StyledTooltip.js";
7
7
  import { StyledCheckbox as Y } from "../../checkbox/base-ui/StyledCheckbox.js";
8
8
  import { StyledInputField as Z } from "../../input-field/StyledInputField.js";
9
9
  import { StyledSelectAutocomplete as ee } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
10
  import { DynamicInteractiveChipGroup as te } from "./DynamicInteractiveChipGroup.js";
11
- import { createElement as L, forwardRef as le, useCallback as b, useState as ae } from "react";
12
- import { Fragment as V, jsx as l, jsxs as x } from "react/jsx-runtime";
13
- var ge = le((v, $) => {
14
- const [q, w] = ae(!1), { options: y, dataTest: O, value: d, readOnly: u, multiple: n, required: B, onChange: m, size: E, title: S, noOptionsText: z, placeholder: F, disabled: k, helperText: K, disableHelperText: H, error: R, valueKey: I = "value", labelKey: G = "label", renderLabel: i, getOptionTooltip: N, startAdornment: W, autocompleteProps: r, loading: p, maxTags: _ } = v, f = y.length < 11, s = (e) => typeof e == "object" ? e?.[G]?.toString() ?? "" : e?.toString() ?? "", h = b((e) => typeof e == "object" ? e?.[I] : e, [I]), g = b((e, t) => h(e) === h(t), [h]), C = (e) => {
15
- const t = h(e);
16
- return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : s(e);
11
+ import { createElement as L, forwardRef as le, useCallback as b, useState as re } from "react";
12
+ import { Fragment as $, jsx as l, jsxs as x } from "react/jsx-runtime";
13
+ var ge = le((O, q) => {
14
+ const [B, T] = re(!1), { options: y, dataTest: S, value: i, readOnly: d, multiple: a, required: E, onChange: C, size: z, title: k, noOptionsText: F, placeholder: K, disabled: N, helperText: H, disableHelperText: R, error: G, valueKey: A = "value", labelKey: W = "label", renderLabel: s, getOptionTooltip: I, startAdornment: _, autocompleteProps: n, loading: u, maxTags: J } = O, m = y.length < 11, c = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", p = b((e) => typeof e == "object" ? e?.[A] : e, [A]), f = b((e, t) => typeof t == "string" ? !1 : p(e) === p(t), [p]), v = (e) => {
15
+ const t = p(e);
16
+ return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : c(e);
17
17
  }, P = b((e) => {
18
- w(!0), r?.onOpen?.(e);
19
- }, [r]), J = b((e, t) => {
20
- w(!1), r?.onClose?.(e, t);
21
- }, [r]);
22
- return n && u ? /* @__PURE__ */ l(te, { ...v }) : /* @__PURE__ */ x("div", {
18
+ T(!0), n?.onOpen?.(e);
19
+ }, [n]), M = b((e, t) => {
20
+ T(!1), n?.onClose?.(e, t);
21
+ }, [n]);
22
+ return a && d ? /* @__PURE__ */ l(te, { ...O }) : /* @__PURE__ */ x("div", {
23
23
  className: "flex w-full flex-col gap-y-1",
24
- children: [S && /* @__PURE__ */ l("span", {
24
+ children: [k && /* @__PURE__ */ l("span", {
25
25
  className: "text-base font-semibold text-delta-800",
26
- children: S
26
+ children: k
27
27
  }), /* @__PURE__ */ l(ee, {
28
- open: q,
28
+ open: B,
29
29
  onOpen: P,
30
- onClose: J,
31
- disableCloseOnSelect: n,
32
- dataTest: O,
33
- disabled: !!k || !!p,
34
- noOptionsText: z,
35
- loading: p,
36
- readOnly: u,
37
- value: d,
38
- size: E,
39
- disableClearable: B,
30
+ onClose: M,
31
+ disableCloseOnSelect: a,
32
+ dataTest: S,
33
+ disabled: !!N || !!u,
34
+ noOptionsText: F,
35
+ loading: u,
36
+ readOnly: d,
37
+ value: i,
38
+ size: z,
39
+ disableClearable: E,
40
40
  options: y,
41
41
  fullWidth: !0,
42
42
  classes: { listbox: "h-full max-h-[300px]" },
43
- getOptionLabel: r?.getOptionLabel ?? s,
43
+ getOptionLabel: n?.getOptionLabel ?? c,
44
44
  onChange: (e, t) => {
45
- m(t);
45
+ C(t);
46
46
  },
47
47
  filterSelectedOptions: !1,
48
- isOptionEqualToValue: r?.isOptionEqualToValue ?? g,
48
+ isOptionEqualToValue: n?.isOptionEqualToValue ?? f,
49
49
  autoHeight: !0,
50
- multiple: n,
51
- renderTags: (e) => {
52
- const t = _ ?? y.length, a = e.slice(0, t), c = e.length - t;
50
+ multiple: a,
51
+ renderValue: a ? (e) => {
52
+ if (!Array.isArray(e)) return null;
53
+ const t = e, r = J ?? y.length, h = t.slice(0, r), g = t.length - r;
53
54
  return /* @__PURE__ */ x("div", {
54
55
  className: "flex flex-wrap gap-2",
55
- children: [a.map((o) => /* @__PURE__ */ l(j, {
56
- dataTest: `${C(o)}-chip`,
57
- readOnly: u,
56
+ children: [h.map((o) => /* @__PURE__ */ l(D, {
57
+ dataTest: `${v(o)}-chip`,
58
+ readOnly: d,
58
59
  variant: "outlined",
59
- label: i ? i(o) : s(o),
60
+ label: s ? s(o) : c(o),
60
61
  classes: {
61
62
  root: "h-fit w-fit min-h-[32px]",
62
63
  label: "block whitespace-normal"
63
64
  },
64
- disabled: !!k || !!p,
65
+ disabled: !!N || !!u,
65
66
  onDelete: () => {
66
- if (!n) {
67
- m(null);
68
- return;
69
- }
70
- m(d.filter((T) => !g(T, o)));
67
+ Array.isArray(i) && C(i.filter((w) => !f(w, o)));
71
68
  }
72
- }, C(o))), c > 0 && /* @__PURE__ */ l(j, {
69
+ }, v(o))), g > 0 && /* @__PURE__ */ l(D, {
73
70
  dataTest: "remaining-count-tag-chip",
74
- label: `+${c}`,
71
+ label: `+${g}`,
75
72
  variant: "outlined",
76
73
  onClick: P
77
74
  })]
78
75
  });
79
- },
80
- popupIcon: p ? /* @__PURE__ */ l(Q, {
76
+ } : void 0,
77
+ popupIcon: u ? /* @__PURE__ */ l(Q, {
81
78
  height: 24,
82
79
  width: 24
83
- }) : n ? /* @__PURE__ */ l(X, {
80
+ }) : a ? /* @__PURE__ */ l(X, {
84
81
  height: 24,
85
82
  width: 24
86
83
  }) : void 0,
87
84
  renderOption: (e, t) => {
88
- const a = typeof t == "object" ? !!t?.disabled : !1, c = N ? N(t) : null;
89
- if (n) {
90
- const T = !!d?.find((M) => g(M, t));
85
+ const r = typeof t == "object" ? !!t?.disabled : !1, h = I ? I(t) : null;
86
+ if (a) {
87
+ const o = !!i?.find((w) => f(w, t));
91
88
  return /* @__PURE__ */ L("li", {
92
89
  ...e,
93
90
  key: e.id,
94
- onClick: a ? void 0 : e.onClick,
95
- className: D("flex h-full cursor-pointer gap-x-1 bg-white text-sm/5 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 hover:bg-delta-50"),
96
- "aria-disabled": a
97
- }, /* @__PURE__ */ l(A, {
91
+ onClick: r ? void 0 : e.onClick,
92
+ className: V("flex h-full cursor-pointer gap-x-1 bg-white text-sm/5 hover:bg-gama-50", r && "cursor-not-allowed bg-delta-50 hover:bg-delta-50"),
93
+ "aria-disabled": r
94
+ }, /* @__PURE__ */ l(j, {
98
95
  arrow: !0,
99
- title: c,
100
- children: /* @__PURE__ */ x(V, { children: [/* @__PURE__ */ l(Y, {
101
- disabled: a,
102
- dataTest: `${C(t)}-checkbox`,
96
+ title: h,
97
+ children: /* @__PURE__ */ x($, { children: [/* @__PURE__ */ l(Y, {
98
+ disabled: r,
99
+ dataTest: `${v(t)}-checkbox`,
103
100
  size: "small",
104
101
  className: "min-w-[36px]",
105
- checked: T
106
- }), i ? i(t) : /* @__PURE__ */ l("span", {
102
+ checked: o
103
+ }), s ? s(t) : /* @__PURE__ */ l("span", {
107
104
  className: "h-fit py-[10px] text-sm text-delta-700",
108
- children: s(t)
105
+ children: c(t)
109
106
  })] })
110
107
  }));
111
108
  }
112
- const o = g(d, t);
109
+ const g = i != null && f(i, t);
113
110
  return /* @__PURE__ */ L("li", {
114
111
  ...e,
115
112
  key: e.id,
116
- className: D("flex h-full cursor-pointer gap-x-1 px-2 text-sm/5 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 hover:bg-delta-50"),
117
- onClick: a ? void 0 : e.onClick,
118
- "aria-disabled": a
119
- }, /* @__PURE__ */ l(A, {
113
+ className: V("flex h-full cursor-pointer gap-x-1 px-2 text-sm/5 hover:bg-gama-50", r && "cursor-not-allowed bg-delta-50 hover:bg-delta-50"),
114
+ onClick: r ? void 0 : e.onClick,
115
+ "aria-disabled": r
116
+ }, /* @__PURE__ */ l(j, {
120
117
  arrow: !0,
121
- title: c,
122
- children: /* @__PURE__ */ x(V, { children: [/* @__PURE__ */ l("span", {
118
+ title: h,
119
+ children: /* @__PURE__ */ x($, { children: [/* @__PURE__ */ l("span", {
123
120
  className: "h-full w-5 min-w-5 py-[10px]",
124
- children: o && /* @__PURE__ */ l(U, {
121
+ children: g && /* @__PURE__ */ l(U, {
125
122
  className: "size-5 min-h-5 min-w-5 text-gama-500",
126
123
  height: 20,
127
124
  width: 20
128
125
  })
129
- }), i ? i(t) : /* @__PURE__ */ l("span", {
126
+ }), s ? s(t) : /* @__PURE__ */ l("span", {
130
127
  className: "py-[10px] text-sm text-delta-700",
131
- children: s(t)
128
+ children: c(t)
132
129
  })] })
133
130
  }));
134
131
  },
135
132
  renderInput: (e) => /* @__PURE__ */ l(Z, {
136
- dataTest: `${O}-input-field`,
133
+ dataTest: `${S}-input-field`,
137
134
  ...e,
138
- inputRef: $,
139
- error: R,
140
- helperText: H ? "" : K ?? " ",
135
+ inputRef: q,
136
+ error: G,
137
+ helperText: R ? "" : H ?? " ",
141
138
  variant: "outlined",
142
139
  label: "",
143
- placeholder: F,
144
- readOnly: u,
145
- onKeyDown: f ? (t) => t.preventDefault() : void 0,
146
- autoComplete: f ? "off" : "on",
147
- InputProps: {
148
- ...e.InputProps,
149
- startAdornment: W ?? e.InputProps.startAdornment,
150
- style: f ? { caretColor: "transparent" } : {}
151
- },
152
- inputProps: {
153
- ...e.inputProps,
154
- style: f ? { caretColor: "transparent" } : {}
140
+ placeholder: K,
141
+ readOnly: d,
142
+ onKeyDown: m ? (t) => t.preventDefault() : void 0,
143
+ autoComplete: m ? "off" : "on",
144
+ slotProps: {
145
+ ...e.slotProps,
146
+ input: {
147
+ ...e.slotProps?.input ?? {},
148
+ startAdornment: _ ?? e.slotProps?.input?.startAdornment,
149
+ style: m ? { caretColor: "transparent" } : {}
150
+ },
151
+ htmlInput: {
152
+ ...e.slotProps?.htmlInput ?? {},
153
+ style: m ? { caretColor: "transparent" } : {}
154
+ }
155
155
  }
156
156
  }),
157
- ...r
157
+ ...n
158
158
  })]
159
159
  });
160
160
  });
@@ -1,77 +1,83 @@
1
- import { CloseIcon as d } from "../../icons/close-icon/CloseIcon.js";
2
- import { ErrorOutlineIcon as p } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
3
- import { TextField as c } from "@mui/material";
4
- import { jsx as o, jsxs as m } from "react/jsx-runtime";
5
- var h = ({ allowClear: l, onClear: n, readOnly: t, disabled: u, error: e, helperText: a, dataTest: s, ...r }) => /* @__PURE__ */ o(c, {
6
- ...r,
7
- "data-testid": s,
8
- disabled: (u ?? !1) || (t ?? !1),
9
- error: e,
10
- helperText: t ? null : e ? /* @__PURE__ */ m("span", {
11
- className: "inline-flex items-center gap-1",
12
- children: [/* @__PURE__ */ o(p, {
13
- width: 20,
14
- height: 20,
15
- className: "min-w-5"
16
- }), a ?? "Required"]
17
- }) : a,
18
- type: r.type ?? "mui-input",
19
- InputProps: {
20
- ...r.InputProps,
21
- endAdornment: l && r.value ? /* @__PURE__ */ o("div", {
22
- role: "button",
23
- className: "absolute right-4 z-40 flex items-center justify-center rounded-full p-[2px] duration-300 hover:bg-gama-100",
24
- onClick: (i) => {
25
- i.stopPropagation(), i.preventDefault(), n?.();
26
- },
27
- children: /* @__PURE__ */ o(d, {
28
- width: 18,
29
- height: 18
30
- })
31
- }) : r.InputProps?.endAdornment
32
- },
33
- sx: {
34
- "& input:-webkit-autofill, & .MuiInputBase-root:has(> input:-webkit-autofill)": { backgroundColor: "#e8f0fe !important" },
35
- "& input": { backgroundColor: "transparent" },
36
- "& .MuiInputBase-root": { backgroundColor: "transparent" },
37
- "& .MuiInputBase-colorPrimary fieldset": { borderColor: "var(--colors-delta-500) !important" },
38
- "& .MuiInputBase-colorPrimary.Mui-focused fieldset": { borderColor: "var(--colors-gama-400) !important" },
39
- "& .MuiInputBase-colorPrimary.Mui-focused::after": { borderColor: "var(--colors-gama-400) !important" },
40
- "& .MuiInputBase-colorPrimary.Mui-focused:hover fieldset": { borderColor: "var(--colors-gama-400) !important" },
41
- "& .MuiInputBase-colorPrimary:hover fieldset": {
42
- borderColor: "var(--colors-gama-300) !important",
43
- borderWidth: "2px !important"
44
- },
45
- "& .MuiInputBase-colorPrimary.Mui-disabled:hover fieldset": { borderWidth: "1px !important" },
46
- "& .MuiInputBase-colorPrimary.Mui-error fieldset": { borderColor: "var(--colors-error-500) !important" },
47
- "& .MuiInputBase-colorPrimary.Mui-error:hover fieldset": { borderColor: "var(--colors-error-500) !important" },
48
- "& .MuiFormHelperText-root": {
49
- fontSize: "14px",
50
- marginLeft: 0
51
- },
52
- "& .MuiFormHelperText-root.Mui-error": { color: "var(--colors-error-500) !important" },
53
- "& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-300) !important" },
54
- "& label.Mui-focused": { color: "var(--colors-gama-500) !important" },
55
- "& label.Mui-error": { color: "var(--colors-error-500) !important" },
56
- "& label.Mui-focused.MuiInputLabel-shrink": { color: "var(--colors-gama-500) !important" },
57
- "& label.Mui-error.MuiInputLabel-shrink": { color: "var(--colors-error-500) !important" },
58
- "& label": { color: "var(--colors-delta-500) !important" },
59
- "& label.MuiInputLabel-shrink": { color: "var(--colors-delta-800) !important" },
60
- "& label.Mui-disabled": { color: "var(--colors-gray-300) !important" },
61
- "& .MuiOutlinedInput-input::placeholder": {
62
- color: "var(--colors-delta-500) !important",
63
- opacity: "1 !important"
1
+ import { CloseIcon as m } from "../../icons/close-icon/CloseIcon.js";
2
+ import { ErrorOutlineIcon as b } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
3
+ import { TextField as M } from "@mui/material";
4
+ import { jsx as o, jsxs as f } from "react/jsx-runtime";
5
+ var y = ({ allowClear: u, onClear: s, readOnly: t, disabled: d, error: e, helperText: a, dataTest: p, slotProps: i, ...r }) => {
6
+ const c = (d ?? !1) || (t ?? !1), l = i?.input;
7
+ return /* @__PURE__ */ o(M, {
8
+ ...r,
9
+ "data-testid": p,
10
+ disabled: c,
11
+ error: e,
12
+ helperText: t ? null : e ? /* @__PURE__ */ f("span", {
13
+ className: "inline-flex items-center gap-1",
14
+ children: [/* @__PURE__ */ o(b, {
15
+ width: 20,
16
+ height: 20,
17
+ className: "min-w-5"
18
+ }), a ?? "Required"]
19
+ }) : a,
20
+ type: r.type ?? "mui-input",
21
+ slotProps: {
22
+ ...i,
23
+ input: {
24
+ ...l,
25
+ endAdornment: u && r.value ? /* @__PURE__ */ o("div", {
26
+ role: "button",
27
+ className: "absolute right-4 z-40 flex items-center justify-center rounded-full p-[2px] duration-300 hover:bg-gama-100",
28
+ onClick: (n) => {
29
+ n.stopPropagation(), n.preventDefault(), s?.();
30
+ },
31
+ children: /* @__PURE__ */ o(m, {
32
+ width: 18,
33
+ height: 18
34
+ })
35
+ }) : l?.endAdornment
36
+ }
64
37
  },
65
- "& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-300) !important" },
66
- ...t && {
67
- "& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-800) !important" },
68
- "& .MuiInputBase-colorPrimary.Mui-disabled": { backgroundColor: "var(--colors-delta-10) !important" },
69
- "& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-200) !important" },
70
- "& label.Mui-disabled": { color: "var(--colors-gray-800) !important" }
71
- },
72
- ...r.sx
73
- }
74
- });
38
+ sx: {
39
+ "& input:-webkit-autofill, & .MuiInputBase-root:has(> input:-webkit-autofill)": { backgroundColor: "#e8f0fe !important" },
40
+ "& input": { backgroundColor: "transparent" },
41
+ "& .MuiInputBase-root": { backgroundColor: "transparent" },
42
+ "& .MuiInputBase-colorPrimary fieldset": { borderColor: "var(--colors-delta-500) !important" },
43
+ "& .MuiInputBase-colorPrimary.Mui-focused fieldset": { borderColor: "var(--colors-gama-400) !important" },
44
+ "& .MuiInputBase-colorPrimary.Mui-focused::after": { borderColor: "var(--colors-gama-400) !important" },
45
+ "& .MuiInputBase-colorPrimary.Mui-focused:hover fieldset": { borderColor: "var(--colors-gama-400) !important" },
46
+ "& .MuiInputBase-colorPrimary:hover fieldset": {
47
+ borderColor: "var(--colors-gama-300) !important",
48
+ borderWidth: "2px !important"
49
+ },
50
+ "& .MuiInputBase-colorPrimary.Mui-disabled:hover fieldset": { borderWidth: "1px !important" },
51
+ "& .MuiInputBase-colorPrimary.Mui-error fieldset": { borderColor: "var(--colors-error-500) !important" },
52
+ "& .MuiInputBase-colorPrimary.Mui-error:hover fieldset": { borderColor: "var(--colors-error-500) !important" },
53
+ "& .MuiFormHelperText-root": {
54
+ fontSize: "14px",
55
+ marginLeft: 0
56
+ },
57
+ "& .MuiFormHelperText-root.Mui-error": { color: "var(--colors-error-500) !important" },
58
+ "& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-300) !important" },
59
+ "& label.Mui-focused": { color: "var(--colors-gama-500) !important" },
60
+ "& label.Mui-error": { color: "var(--colors-error-500) !important" },
61
+ "& label.Mui-focused.MuiInputLabel-shrink": { color: "var(--colors-gama-500) !important" },
62
+ "& label.Mui-error.MuiInputLabel-shrink": { color: "var(--colors-error-500) !important" },
63
+ "& label": { color: "var(--colors-delta-500) !important" },
64
+ "& label.MuiInputLabel-shrink": { color: "var(--colors-delta-800) !important" },
65
+ "& label.Mui-disabled": { color: "var(--colors-gray-300) !important" },
66
+ "& .MuiOutlinedInput-input::placeholder": {
67
+ color: "var(--colors-delta-500) !important",
68
+ opacity: "1 !important"
69
+ },
70
+ "& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-300) !important" },
71
+ ...t && {
72
+ "& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-800) !important" },
73
+ "& .MuiInputBase-colorPrimary.Mui-disabled": { backgroundColor: "var(--colors-delta-10) !important" },
74
+ "& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-200) !important" },
75
+ "& label.Mui-disabled": { color: "var(--colors-gray-800) !important" }
76
+ },
77
+ ...r.sx
78
+ }
79
+ });
80
+ };
75
81
  export {
76
- h as StyledInputField
82
+ y as StyledInputField
77
83
  };