@caspeco/casper-ui-library 4.0.0 → 4.1.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 (59) hide show
  1. package/dist/components/combobox/combobox-button.d.ts +1 -1
  2. package/dist/components/combobox/combobox-button.d.ts.map +1 -1
  3. package/dist/components/combobox/combobox-button.js +85 -69
  4. package/dist/components/combobox/combobox-item.d.ts +2 -1
  5. package/dist/components/combobox/combobox-item.d.ts.map +1 -1
  6. package/dist/components/combobox/combobox-item.js +10 -10
  7. package/dist/components/combobox/combobox-menu.js +68 -69
  8. package/dist/components/combobox/combobox.d.ts.map +1 -1
  9. package/dist/components/combobox/combobox.js +120 -123
  10. package/dist/components/combobox/types.d.ts +2 -0
  11. package/dist/components/combobox/types.d.ts.map +1 -1
  12. package/dist/components/date-picker/base-date-picker.js +175 -176
  13. package/dist/components/date-picker/date-picker-header.js +10 -10
  14. package/dist/components/date-picker/helper.js +9 -9
  15. package/dist/components/image-upload/image-cropper.js +112 -113
  16. package/dist/components/image-upload/image-upload-dropzone.js +35 -36
  17. package/dist/components/menu/menu-group.js +44 -45
  18. package/dist/components/segmented-control/segmented-control.js +29 -29
  19. package/dist/components/table/table-cell.js +25 -26
  20. package/dist/components/table/table-header-dropdown.js +60 -60
  21. package/dist/components/table/table-header-row.js +19 -20
  22. package/dist/components/table/table-toolbar.js +63 -64
  23. package/dist/components/table/use-controllable-state.js +7 -7
  24. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
  25. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +41 -41
  26. package/dist/node_modules/date-fns/addDays.js +7 -7
  27. package/dist/node_modules/date-fns/addMonths.js +13 -13
  28. package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
  29. package/dist/node_modules/date-fns/endOfDay.js +6 -6
  30. package/dist/node_modules/date-fns/endOfMonth.js +6 -6
  31. package/dist/node_modules/date-fns/format.js +46 -47
  32. package/dist/node_modules/date-fns/getDayOfYear.js +8 -8
  33. package/dist/node_modules/date-fns/getISOWeek.js +9 -9
  34. package/dist/node_modules/date-fns/getISOWeekYear.js +10 -10
  35. package/dist/node_modules/date-fns/getWeek.js +9 -9
  36. package/dist/node_modules/date-fns/getWeekYear.js +13 -14
  37. package/dist/node_modules/date-fns/isSameDay.js +9 -9
  38. package/dist/node_modules/date-fns/isSameMonth.js +9 -9
  39. package/dist/node_modules/date-fns/isSameWeek.js +8 -8
  40. package/dist/node_modules/date-fns/isSameYear.js +9 -9
  41. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
  42. package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +4 -4
  43. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
  44. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +4 -4
  45. package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +6 -6
  46. package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +17 -17
  47. package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +47 -47
  48. package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +11 -11
  49. package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +3 -3
  50. package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +4 -4
  51. package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +5 -5
  52. package/dist/node_modules/date-fns/startOfDay.js +6 -6
  53. package/dist/node_modules/date-fns/startOfMonth.js +6 -6
  54. package/dist/node_modules/date-fns/startOfWeek.js +7 -8
  55. package/dist/node_modules/date-fns/startOfWeekYear.js +9 -10
  56. package/dist/node_modules/date-fns/startOfYear.js +5 -5
  57. package/dist/theme/theme-config/components/modal-theme.js +13 -15
  58. package/dist/theme/theme-config/components/select-theme.js +15 -19
  59. package/package.json +3 -3
@@ -1,3 +1,3 @@
1
1
  import { ComboboxInnerProps } from './types.js';
2
- export declare function ComboboxButton({ id, asPlainText, inputValue, selectedItems, displayItems, toggleItem, highlightState, openState, parentStrings, size, variant, label, placeHolderText, isDisabled, isReadOnly, isInvalid, collapsed, setInputValue, onSearch, isSingleSelect, }: ComboboxInnerProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ComboboxButton({ id, asPlainText, inputValue, selectedItems, displayItems, toggleItem, highlightState, openState, parentStrings, size, variant, label, placeHolderText, isDisabled, isReadOnly, isInvalid, collapsed, hasPendingDelete, setHasPendingDelete, setInputValue, onSearch, isSingleSelect, }: ComboboxInnerProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=combobox-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-button.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAsBlD,wBAAgB,cAAc,CAAC,EAC9B,EAAE,EACF,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,QAAQ,EACR,cAAc,GACd,EAAE,kBAAkB,2CAuJpB"}
1
+ {"version":3,"file":"combobox-button.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAsBlD,wBAAgB,cAAc,CAAC,EAC9B,EAAE,EACF,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,cAAc,GACd,EAAE,kBAAkB,2CAwKpB"}
@@ -1,14 +1,14 @@
1
1
  import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
- import { useStyleConfig as A, Flex as u, Box as c, Input as E } from "@chakra-ui/react";
3
- import { Fragment as F } from "react";
4
- import { ComboboxItem as s } from "./combobox-item.js";
5
- import { Tag as L } from "../tag/tag.js";
6
- import { Icon as N } from "../icon/icon.js";
7
- import { Icons as X } from "../icon/types.js";
8
- import { ThemeColorVariable as n, ThemeSpaceVariable as d, ThemeRadiusVariable as K, ThemeIconSizeVariable as T } from "../../theme/theme-types.js";
9
- function O() {
2
+ import { useStyleConfig as E, Flex as u, Box as d, Input as F } from "@chakra-ui/react";
3
+ import { Fragment as L } from "react";
4
+ import { ComboboxItem as O } from "./combobox-item.js";
5
+ import { Tag as N } from "../tag/tag.js";
6
+ import { Icon as X } from "../icon/icon.js";
7
+ import { Icons as K } from "../icon/types.js";
8
+ import { ThemeColorVariable as n, ThemeSpaceVariable as c, ThemeRadiusVariable as T, ThemeIconSizeVariable as U } from "../../theme/theme-types.js";
9
+ function y() {
10
10
  return /* @__PURE__ */ i(
11
- c,
11
+ d,
12
12
  {
13
13
  backgroundColor: n.NeutralContainer,
14
14
  width: "8px",
@@ -26,48 +26,49 @@ function O() {
26
26
  }
27
27
  );
28
28
  }
29
- function Y({
30
- id: y,
31
- asPlainText: a,
29
+ function H({
30
+ id: s,
31
+ asPlainText: l,
32
32
  inputValue: b,
33
33
  selectedItems: r,
34
- displayItems: S,
35
- toggleItem: g,
34
+ displayItems: _,
35
+ toggleItem: x,
36
36
  highlightState: f,
37
- openState: l,
38
- parentStrings: _,
39
- size: D,
40
- variant: j,
41
- label: w,
42
- placeHolderText: B,
43
- isDisabled: m,
44
- isReadOnly: h,
45
- isInvalid: R,
46
- collapsed: x,
47
- setInputValue: C,
48
- onSearch: e,
49
- isSingleSelect: V
37
+ openState: a,
38
+ parentStrings: j,
39
+ size: B,
40
+ variant: R,
41
+ label: C,
42
+ placeHolderText: V,
43
+ isDisabled: h,
44
+ isReadOnly: m,
45
+ isInvalid: W,
46
+ collapsed: S,
47
+ hasPendingDelete: w,
48
+ setHasPendingDelete: g,
49
+ setInputValue: k,
50
+ onSearch: t,
51
+ isSingleSelect: v
50
52
  }) {
51
- var t;
52
- const W = A("Combobox", { size: D, variant: j }), v = (o) => {
53
- if (o.key === "Enter" && (o.preventDefault(), o.stopPropagation(), l.isOpen ? g(S[f.index]) : l.open()), o.key === "Escape") {
54
- if (!l.isOpen) return;
55
- o.preventDefault(), o.stopPropagation(), l.close(), a || (C(""), e == null || e(""));
53
+ const z = E("Combobox", { size: B, variant: R }), A = (o) => {
54
+ if (o.key === "Enter" && (o.preventDefault(), o.stopPropagation(), a.isOpen ? x(_[f.index]) : a.open()), o.key === "Escape") {
55
+ if (!a.isOpen) return;
56
+ o.preventDefault(), o.stopPropagation(), a.close(), l || (k(""), t?.(""));
56
57
  }
57
- o.key === "Backspace" && b.length === 0 && r.length > 0 && !a && g(r[r.length - 1]), o.key === "ArrowDown" && (l.isOpen ? f.next() : l.open()), o.key === "ArrowUp" && (l.isOpen ? f.previous() : l.open());
58
- }, z = (o) => {
58
+ o.key === "Backspace" ? b.length === 0 && r.length > 0 && !l && (w ? (x(r[r.length - 1]), g(!1)) : g(!0)) : g(!1), o.key === "ArrowDown" && (a.isOpen ? f.next() : a.open()), o.key === "ArrowUp" && (a.isOpen ? f.previous() : a.open());
59
+ }, D = (o) => {
59
60
  o.preventDefault(), o.stopPropagation();
60
- const k = o.target.value;
61
- C(k), e == null || e(k), f.set(0), l.open();
61
+ const e = o.target.value;
62
+ k(e), t?.(e), f.set(0), a.open();
62
63
  };
63
64
  return /* @__PURE__ */ p(
64
65
  u,
65
66
  {
66
- __css: W,
67
- "aria-disabled": m,
68
- "aria-readonly": h,
69
- borderRadius: K.Small,
70
- padding: d.Small,
67
+ __css: z,
68
+ "aria-disabled": h,
69
+ "aria-readonly": m,
70
+ borderRadius: T.Small,
71
+ padding: c.Small,
71
72
  _focusWithin: {
72
73
  borderColor: n.Info,
73
74
  boxShadow: `0 0 0 4px ${n.InfoContainer}`,
@@ -81,30 +82,45 @@ function Y({
81
82
  /* @__PURE__ */ p(
82
83
  u,
83
84
  {
84
- flexWrap: x || V ? "nowrap" : "wrap",
85
- gap: d.Small,
85
+ flexWrap: S || v ? "nowrap" : "wrap",
86
+ gap: c.Small,
86
87
  overflow: "hidden",
87
88
  children: [
88
- w && /* @__PURE__ */ i(c, { whiteSpace: "nowrap", children: w }),
89
- !a && (x ? r.length > 0 && /* @__PURE__ */ p(
89
+ C && /* @__PURE__ */ i(d, { whiteSpace: "nowrap", children: C }),
90
+ !l && (S ? r.length > 0 && /* @__PURE__ */ p(
90
91
  u,
91
92
  {
92
- gap: d.XSmall,
93
+ gap: c.XSmall,
93
94
  flexShrink: "1",
94
95
  overflow: "hidden",
95
96
  whiteSpace: "nowrap",
96
97
  textOverflow: "ellipsis",
97
98
  children: [
98
- r.length > 3 && /* @__PURE__ */ i(O, {}),
99
- r.length > 2 && /* @__PURE__ */ i(O, {}),
100
- r.length > 1 && /* @__PURE__ */ i(L, { children: r.length - 1 }),
101
- /* @__PURE__ */ i(s, { item: r[r.length - 1], asPlainText: a })
99
+ r.length > 3 && /* @__PURE__ */ i(y, {}),
100
+ r.length > 2 && /* @__PURE__ */ i(y, {}),
101
+ r.length > 1 && /* @__PURE__ */ i(N, { children: r.length - 1 }),
102
+ /* @__PURE__ */ i(
103
+ O,
104
+ {
105
+ isDeleting: w,
106
+ item: r[r.length - 1],
107
+ asPlainText: l
108
+ }
109
+ )
102
110
  ]
103
111
  }
104
- ) : r.map((o) => /* @__PURE__ */ i(s, { item: o, asPlainText: a }, o.id))),
105
- a && r.length > 0 && b === r[0].label && ((t = _[r[0].id]) == null ? void 0 : t.map((o) => /* @__PURE__ */ p(F, { children: [
112
+ ) : r.map((o, e) => /* @__PURE__ */ i(
113
+ O,
114
+ {
115
+ item: o,
116
+ asPlainText: l,
117
+ isDeleting: e === r.length - 1 && w
118
+ },
119
+ o.id
120
+ ))),
121
+ l && r.length > 0 && b === r[0].label && j[r[0].id]?.map((o) => /* @__PURE__ */ p(L, { children: [
106
122
  /* @__PURE__ */ i(
107
- c,
123
+ d,
108
124
  {
109
125
  color: n.OnSurfaceSubdued,
110
126
  textOverflow: "ellipsis",
@@ -113,22 +129,22 @@ function Y({
113
129
  children: o
114
130
  }
115
131
  ),
116
- /* @__PURE__ */ i(c, { color: n.OnSurfaceSubdued, children: "/" })
117
- ] }, o))),
132
+ /* @__PURE__ */ i(d, { color: n.OnSurfaceSubdued, children: "/" })
133
+ ] }, o)),
118
134
  /* @__PURE__ */ i(
119
- E,
135
+ F,
120
136
  {
121
- id: y,
122
- isDisabled: m,
123
- isReadOnly: h,
124
- isInvalid: R,
125
- onKeyDown: v,
137
+ id: s,
138
+ isDisabled: h,
139
+ isReadOnly: m,
140
+ isInvalid: W,
141
+ onKeyDown: A,
126
142
  variant: "unstyled",
127
143
  value: b,
128
144
  autoComplete: "off",
129
- minWidth: d.XLarge,
130
- onChange: z,
131
- placeholder: B,
145
+ minWidth: c.XLarge,
146
+ onChange: D,
147
+ placeholder: V,
132
148
  border: "none",
133
149
  flex: 1,
134
150
  color: n.OnSurface,
@@ -146,11 +162,11 @@ function Y({
146
162
  }
147
163
  ),
148
164
  /* @__PURE__ */ i(u, { className: "combobox-dropdown-icon", justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ i(
149
- N,
165
+ X,
150
166
  {
151
- icon: X.TreeViewCollapse,
152
- size: T.Small,
153
- color: m || h ? n.OnSurfaceSubdued : n.OnSurface
167
+ icon: K.TreeViewCollapse,
168
+ size: U.Small,
169
+ color: h || m ? n.OnSurfaceSubdued : n.OnSurface
154
170
  }
155
171
  ) })
156
172
  ]
@@ -158,5 +174,5 @@ function Y({
158
174
  );
159
175
  }
160
176
  export {
161
- Y as ComboboxButton
177
+ H as ComboboxButton
162
178
  };
@@ -2,7 +2,8 @@ import { ComboboxItem as ComboboxItemType } from './types.js';
2
2
  type ComboboxItemProps = {
3
3
  item: ComboboxItemType;
4
4
  asPlainText?: boolean;
5
+ isDeleting?: boolean;
5
6
  };
6
- export declare function ComboboxItem({ item, asPlainText }: ComboboxItemProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ComboboxItem({ item, asPlainText, isDeleting }: ComboboxItemProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
8
9
  //# sourceMappingURL=combobox-item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-item.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAahE,KAAK,iBAAiB,GAAG;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAiBpE"}
1
+ {"version":3,"file":"combobox-item.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAahE,KAAK,iBAAiB,GAAG;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,iBAAiB,2CAiBhF"}
@@ -1,9 +1,9 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { Flex as t } from "@chakra-ui/react";
3
- import { Box as n } from "../box/box.js";
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { Flex as d } from "@chakra-ui/react";
3
+ import { Box as a } from "../box/box.js";
4
4
  import { Tag as r } from "../tag/tag.js";
5
- import { ThemeSpaceVariable as d } from "../../theme/theme-types.js";
6
- const c = {
5
+ import { ThemeSpaceVariable as c } from "../../theme/theme-types.js";
6
+ const s = {
7
7
  info: r.Info,
8
8
  success: r.Success,
9
9
  warning: r.Warning,
@@ -13,13 +13,13 @@ const c = {
13
13
  neutral: r,
14
14
  undefined: r.ComboboxItem
15
15
  };
16
- function x({ item: o, asPlainText: a }) {
17
- const l = o.variant || "neutral", p = c[l];
18
- return a ? /* @__PURE__ */ i(t, { gap: d.XSmall, overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: [
16
+ function b({ item: o, asPlainText: p, isDeleting: n }) {
17
+ const l = n ? "primary" : o.variant || "neutral", i = s[l];
18
+ return p ? /* @__PURE__ */ t(d, { gap: c.XSmall, overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: [
19
19
  o.prepend,
20
20
  o.label
21
- ] }) : /* @__PURE__ */ e(n, { overflow: "hidden", children: /* @__PURE__ */ e(p, { prepend: o.prepend, dot: o.dot, children: /* @__PURE__ */ e(n, { display: "block", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: o.label }) }) });
21
+ ] }) : /* @__PURE__ */ e(a, { overflow: "hidden", children: /* @__PURE__ */ e(i, { prepend: o.prepend, dot: o.dot, solid: n, children: /* @__PURE__ */ e(a, { display: "block", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: o.label }) }) });
22
22
  }
23
23
  export {
24
- x as ComboboxItem
24
+ b as ComboboxItem
25
25
  };
@@ -1,26 +1,26 @@
1
- import { jsxs as l, jsx as i, Fragment as K } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as i, Fragment as G } from "react/jsx-runtime";
2
2
  import { Box as d, Flex as g } from "@chakra-ui/react";
3
- import { autoUpdate as L, computePosition as N, flip as Q } from "../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
4
- import { Fragment as D, useState as Z, useEffect as R } from "react";
5
- import { ComboboxItem as oo } from "./combobox-item.js";
6
- import { interpolate as ro } from "./translations.js";
7
- import { ThemeColorVariable as o, ThemeShadowVariable as no, ThemeRadiusVariable as X, ThemeSpaceVariable as t, ThemeIconSizeVariable as P, ThemeFontSizeVariable as eo, ThemeBorderVariable as to } from "../../theme/theme-types.js";
8
- import { Text as I } from "../text/text.js";
9
- import { Icon as B } from "../icon/icon.js";
10
- import { Icons as C } from "../icon/types.js";
11
- const io = (n, e, u, a, b) => {
12
- const [m, s] = Z({
3
+ import { autoUpdate as J, computePosition as K, flip as L } from "../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
4
+ import { Fragment as F, useState as N, useEffect as Q } from "react";
5
+ import { ComboboxItem as Z } from "./combobox-item.js";
6
+ import { interpolate as R } from "./translations.js";
7
+ import { ThemeColorVariable as o, ThemeShadowVariable as oo, ThemeRadiusVariable as V, ThemeSpaceVariable as t, ThemeIconSizeVariable as $, ThemeFontSizeVariable as ro, ThemeBorderVariable as no } from "../../theme/theme-types.js";
8
+ import { Text as z } from "../text/text.js";
9
+ import { Icon as P } from "../icon/icon.js";
10
+ import { Icons as B } from "../icon/types.js";
11
+ const eo = (n, e, u, a, b) => {
12
+ const [m, s] = N({
13
13
  transform: "translate(0, 0)",
14
14
  minWidth: 0
15
15
  });
16
- return R(() => {
16
+ return Q(() => {
17
17
  if (!n.current || !e.current || !u) return () => {
18
18
  };
19
19
  const S = async () => {
20
20
  if (n.current && e.current && u) {
21
- const { width: p } = n.current.getBoundingClientRect(), { x: h, y: x } = await N(n.current, e.current, {
21
+ const { width: p } = n.current.getBoundingClientRect(), { x: h, y: x } = await K(n.current, e.current, {
22
22
  placement: b || "bottom-start",
23
- middleware: [Q()]
23
+ middleware: [L()]
24
24
  });
25
25
  s({
26
26
  transform: `translate(${h}px, ${x}px)`,
@@ -28,10 +28,10 @@ const io = (n, e, u, a, b) => {
28
28
  });
29
29
  }
30
30
  };
31
- return L(n.current, e.current, S);
31
+ return J(n.current, e.current, S);
32
32
  }, [n, e, u, b, a]), m;
33
33
  };
34
- function ao({
34
+ function to({
35
35
  isSingleSelect: n,
36
36
  isChecked: e
37
37
  }) {
@@ -44,21 +44,21 @@ function ao({
44
44
  flexShrink: "0",
45
45
  border: `${n && e ? 8 : 2}px solid ${e ? o.Primary : o.OnBackground}`,
46
46
  backgroundColor: e && !n ? o.Primary : "auto",
47
- borderRadius: n ? "50%" : X.Small,
47
+ borderRadius: n ? "50%" : V.Small,
48
48
  children: !n && e && /* @__PURE__ */ i(
49
- B,
49
+ P,
50
50
  {
51
51
  top: "-2px",
52
52
  position: "absolute",
53
- width: P.Small,
53
+ width: $.Small,
54
54
  color: o.Surface,
55
- icon: C.Checkbox
55
+ icon: B.Checkbox
56
56
  }
57
57
  )
58
58
  }
59
59
  );
60
60
  }
61
- function So({
61
+ function fo({
62
62
  asPlainText: n,
63
63
  inputValue: e,
64
64
  selectedItems: u,
@@ -70,23 +70,23 @@ function So({
70
70
  isSingleSelect: p,
71
71
  isSearching: h,
72
72
  isReadOnly: x,
73
- isHidingItems: j,
74
- popoverWidth: H,
75
- popoverPlacement: A,
73
+ isHidingItems: D,
74
+ popoverWidth: I,
75
+ popoverPlacement: X,
76
76
  previousSelectedItems: k,
77
- parentRef: E,
78
- popupRef: O,
79
- footerContent: v,
80
- subMenuState: M,
81
- translation: T
77
+ parentRef: j,
78
+ popupRef: C,
79
+ footerContent: O,
80
+ subMenuState: v,
81
+ translation: M
82
82
  }) {
83
- const U = io(
84
- E,
85
- O,
83
+ const H = eo(
84
+ j,
85
+ C,
86
86
  s.isOpen,
87
- H,
88
- A
89
- ), W = (r) => {
87
+ I,
88
+ X
89
+ ), A = (r) => {
90
90
  m.set(r);
91
91
  };
92
92
  return /* @__PURE__ */ l(
@@ -98,12 +98,12 @@ function So({
98
98
  zIndex: "50",
99
99
  visibility: "visible",
100
100
  backgroundColor: o.Surface,
101
- borderRadius: X.Medium,
102
- boxShadow: no.Medium,
101
+ borderRadius: V.Medium,
102
+ boxShadow: oo.Medium,
103
103
  color: o.OnSurface,
104
104
  overflow: "hidden",
105
- style: U,
106
- ref: O,
105
+ style: H,
106
+ ref: C,
107
107
  onClick: (r) => {
108
108
  r.preventDefault(), r.stopPropagation(), p && s.close();
109
109
  },
@@ -119,38 +119,37 @@ function So({
119
119
  padding: `${t.Small} 0`,
120
120
  children: [
121
121
  h && a.length === 0 && e.length > 0 && /* @__PURE__ */ i(
122
- I,
122
+ z,
123
123
  {
124
124
  px: t.Small,
125
125
  color: o.OnSurfaceSubdued,
126
- children: `${T.noMatchFor} "${e}"`
126
+ children: `${M.noMatchFor} "${e}"`
127
127
  }
128
128
  ),
129
129
  a.map((r, f) => {
130
- var z, V;
131
- const y = u.some((c) => c.id === r.id), Y = (c) => {
130
+ const T = u.some((c) => c.id === r.id), E = (c) => {
132
131
  c.stopPropagation(), c.preventDefault(), b(r);
133
- }, _ = (z = r.children) == null ? void 0 : z.length, w = r.id === "_back", $ = M.opened[M.opened.length - 1], F = r.id === ($ == null ? void 0 : $.id), q = w ? /* @__PURE__ */ l(g, { gap: t.XSmall, alignItems: "center", children: [
134
- /* @__PURE__ */ i(B, { icon: C.Back, size: P.Small }),
132
+ }, U = r.children?.length, w = r.id === "_back", W = v.opened[v.opened.length - 1], y = r.id === W?.id, Y = w ? /* @__PURE__ */ l(g, { gap: t.XSmall, alignItems: "center", children: [
133
+ /* @__PURE__ */ i(P, { icon: B.Back, size: $.Small }),
135
134
  r.label
136
- ] }) : /* @__PURE__ */ l(K, { children: [
135
+ ] }) : /* @__PURE__ */ l(G, { children: [
137
136
  /* @__PURE__ */ l(g, { gap: t.XSmall, alignItems: "center", whiteSpace: "nowrap", children: [
138
- (V = S[r.id]) == null ? void 0 : V.map((c) => /* @__PURE__ */ l(D, { children: [
137
+ S[r.id]?.map((c) => /* @__PURE__ */ l(F, { children: [
139
138
  /* @__PURE__ */ i(d, { color: o.OnSurfaceSubdued, children: c }),
140
139
  /* @__PURE__ */ i(d, { color: o.OnSurfaceSubdued, children: "/" })
141
140
  ] }, c)),
142
- /* @__PURE__ */ i(oo, { item: r, asPlainText: n })
141
+ /* @__PURE__ */ i(Z, { item: r, asPlainText: n })
143
142
  ] }),
144
- x ? void 0 : _ && !F && !h ? /* @__PURE__ */ i(
145
- B,
143
+ x ? void 0 : U && !y && !h ? /* @__PURE__ */ i(
144
+ P,
146
145
  {
147
- icon: C.Forward,
148
- size: P.Small,
146
+ icon: B.Forward,
147
+ size: $.Small,
149
148
  color: o.OnBackgroundSubdued
150
149
  }
151
- ) : /* @__PURE__ */ i(ao, { isSingleSelect: p, isChecked: y })
152
- ] }), G = k.length > 0 && k.length - 1 === f && k.length < a.length, J = !x && !h && (G || (w || F));
153
- return /* @__PURE__ */ l(D, { children: [
150
+ ) : /* @__PURE__ */ i(to, { isSingleSelect: p, isChecked: T })
151
+ ] }), _ = k.length > 0 && k.length - 1 === f && k.length < a.length, q = !x && !h && (_ || (w || y));
152
+ return /* @__PURE__ */ l(F, { children: [
154
153
  /* @__PURE__ */ i(
155
154
  g,
156
155
  {
@@ -162,15 +161,15 @@ function So({
162
161
  gap: t.Medium,
163
162
  textDecoration: "none",
164
163
  backgroundColor: m.index === f ? o.AccentHoverAlpha : "",
165
- onClick: Y,
164
+ onClick: E,
166
165
  tabIndex: -1,
167
- onMouseEnter: () => W(f),
166
+ onMouseEnter: () => A(f),
168
167
  "data-is-active-index": m.index === f,
169
- "aria-selected": y,
170
- children: q
168
+ "aria-selected": T,
169
+ children: Y
171
170
  }
172
171
  ),
173
- J && /* @__PURE__ */ i(
172
+ q && /* @__PURE__ */ i(
174
173
  d,
175
174
  {
176
175
  margin: `${t.Small} ${w ? 0 : t.Medium}`,
@@ -181,14 +180,14 @@ function So({
181
180
  )
182
181
  ] }, r.id);
183
182
  }),
184
- j && /* @__PURE__ */ i(
185
- I,
183
+ D && /* @__PURE__ */ i(
184
+ z,
186
185
  {
187
186
  px: t.Small,
188
187
  py: t.Small,
189
188
  color: o.OnSurfaceSubdued,
190
- fontSize: eo.Small,
191
- children: ro(T.showMaxItems, {
189
+ fontSize: ro.Small,
190
+ children: R(M.showMaxItems, {
192
191
  count: a.length
193
192
  })
194
193
  }
@@ -196,15 +195,15 @@ function So({
196
195
  ]
197
196
  }
198
197
  ),
199
- v && /* @__PURE__ */ i(
198
+ O && /* @__PURE__ */ i(
200
199
  d,
201
200
  {
202
201
  position: "sticky",
203
202
  bottom: "0",
204
203
  backgroundColor: o.Surface,
205
204
  padding: `${t.Small} ${t.Medium}`,
206
- borderTop: `${to.XSmall} ${o.OnSurfaceBorder}`,
207
- children: v
205
+ borderTop: `${no.XSmall} ${o.OnSurfaceBorder}`,
206
+ children: O
208
207
  }
209
208
  )
210
209
  ]
@@ -212,6 +211,6 @@ function So({
212
211
  );
213
212
  }
214
213
  export {
215
- ao as CheckboxOrRadioButton,
216
- So as ComboboxMenu
214
+ to as CheckboxOrRadioButton,
215
+ fo as ComboboxMenu
217
216
  };
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIX,aAAa,EAKb,MAAM,SAAS,CAAC;AAiGjB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EACxB,EAAE,EACF,KAAU,EACV,cAAsB,EACtB,aAAkB,EAClB,MAAgB,EAChB,IAAW,EACX,OAAmB,EACnB,WAAmB,EACnB,QAAQ,EACR,KAAK,EACL,eAAe,EACf,QAAQ,EACR,MAAM,EACN,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,SAAiB,EACjB,GAAG,KAAK,EACR,EAAE,aAAa,2CAsLf"}
1
+ {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIX,aAAa,EAKb,MAAM,SAAS,CAAC;AAiGjB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EACxB,EAAE,EACF,KAAU,EACV,cAAsB,EACtB,aAAkB,EAClB,MAAgB,EAChB,IAAW,EACX,OAAmB,EACnB,WAAmB,EACnB,QAAQ,EACR,KAAK,EACL,eAAe,EACf,QAAQ,EACR,MAAM,EACN,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,SAAiB,EACjB,GAAG,KAAK,EACR,EAAE,aAAa,2CA2Lf"}