@cascivo/react 0.16.1 → 0.17.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 (50) hide show
  1. package/dist/accordion/accordion.js +5 -4
  2. package/dist/app-shell/app-shell.css +1 -1
  3. package/dist/app-shell/app-shell.js +28 -26
  4. package/dist/app-shell/app-shell.module.js +8 -8
  5. package/dist/button/button.css +1 -1
  6. package/dist/button/button.js +4 -1
  7. package/dist/button/button.module.js +4 -1
  8. package/dist/calendar/calendar.js +67 -63
  9. package/dist/card/card.css +1 -1
  10. package/dist/card/card.module.js +8 -8
  11. package/dist/checkbox/checkbox.css +1 -1
  12. package/dist/checkbox/checkbox.module.js +4 -4
  13. package/dist/combobox/combobox.js +55 -54
  14. package/dist/data-table/data-table.css +1 -1
  15. package/dist/data-table/data-table.js +155 -160
  16. package/dist/data-table/data-table.module.js +29 -29
  17. package/dist/date-picker/date-picker.js +90 -89
  18. package/dist/field/field.css +1 -1
  19. package/dist/field/field.module.js +3 -3
  20. package/dist/index.d.ts +72 -4
  21. package/dist/layouts/src/grid/grid.css +1 -1
  22. package/dist/layouts/src/grid/grid.module.js +3 -3
  23. package/dist/node/accordion/accordion.js +5 -4
  24. package/dist/node/app-shell/app-shell.js +28 -26
  25. package/dist/node/app-shell/app-shell.module.js +8 -8
  26. package/dist/node/button/button.js +4 -1
  27. package/dist/node/button/button.module.js +4 -1
  28. package/dist/node/calendar/calendar.js +67 -63
  29. package/dist/node/card/card.module.js +8 -8
  30. package/dist/node/checkbox/checkbox.module.js +4 -4
  31. package/dist/node/combobox/combobox.js +55 -54
  32. package/dist/node/data-table/data-table.js +155 -160
  33. package/dist/node/data-table/data-table.module.js +29 -29
  34. package/dist/node/date-picker/date-picker.js +90 -89
  35. package/dist/node/field/field.module.js +3 -3
  36. package/dist/node/layouts/src/grid/grid.module.js +3 -3
  37. package/dist/node/search/search.js +5 -4
  38. package/dist/node/side-nav/side-nav.js +90 -89
  39. package/dist/node/swap/swap.js +2 -3
  40. package/dist/node/switcher/switcher.js +1 -1
  41. package/dist/node/tabs/tabs.js +5 -4
  42. package/dist/node/toc/toc.js +5 -4
  43. package/dist/search/search.js +5 -4
  44. package/dist/side-nav/side-nav.js +90 -89
  45. package/dist/styles.css +7 -7
  46. package/dist/swap/swap.js +2 -3
  47. package/dist/switcher/switcher.js +1 -1
  48. package/dist/tabs/tabs.js +5 -4
  49. package/dist/toc/toc.js +5 -4
  50. package/package.json +3 -3
@@ -1,3 +1,6 @@
1
- var e = { button: "_button_131qn_2" };
1
+ var e = {
2
+ label: "_label_yace7_10",
3
+ button: "_button_yace7_8"
4
+ };
2
5
  //#endregion
3
6
  export { e as default };
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./calendar.module.js";
4
- import { batch as t, cn as n, useSignal as r, useSignals as i } from "@cascivo/core";
5
- import { builtin as a, currentLocale as o, t as s } from "@cascivo/i18n";
6
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { batch as t, cn as n, useControllableSignal as r, useSignal as i, useSignals as a } from "@cascivo/core";
5
+ import { builtin as o, currentLocale as s, t as c } from "@cascivo/i18n";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
7
  //#region ../components/src/calendar/calendar.tsx
8
- function u(e) {
8
+ function d(e) {
9
9
  try {
10
10
  let t = new Intl.Locale(e).weekInfo;
11
11
  if (t) return t.firstDay % 7;
12
12
  } catch {}
13
13
  return 1;
14
14
  }
15
- function d(e, t, n) {
15
+ function f(e, t, n) {
16
16
  let r = new Date(Date.UTC(e, t, 1)), i = new Date(Date.UTC(e, t + 1, 0)), a = (r.getUTCDay() - n + 7) % 7, o = [];
17
17
  for (let e = 0; e < a; e++) o.push(null);
18
18
  for (let n = 1; n <= i.getUTCDate(); n++) o.push(new Date(Date.UTC(e, t, n)));
@@ -21,22 +21,22 @@ function d(e, t, n) {
21
21
  for (let e = 0; e < o.length; e += 7) s.push(o.slice(e, e + 7));
22
22
  return s;
23
23
  }
24
- function f(e) {
24
+ function p(e) {
25
25
  return `${e.getUTCFullYear()}-${e.getUTCMonth()}-${e.getUTCDate()}`;
26
26
  }
27
- function p(e, t) {
28
- return !e || !t ? !1 : f(e) === f(t);
29
- }
30
27
  function m(e, t) {
31
- return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate() + t));
28
+ return !e || !t ? !1 : p(e) === p(t);
32
29
  }
33
30
  function h(e, t) {
34
- return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth() + t, e.getUTCDate()));
31
+ return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate() + t));
35
32
  }
36
33
  function g(e, t) {
37
- return m(e, -((e.getUTCDay() - t + 7) % 7));
34
+ return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth() + t, e.getUTCDate()));
35
+ }
36
+ function _(e, t) {
37
+ return h(e, -((e.getUTCDay() - t + 7) % 7));
38
38
  }
39
- function _(e, t, n) {
39
+ function v(e, t, n) {
40
40
  if (t) {
41
41
  let n = new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()));
42
42
  if (e.getTime() < n.getTime()) return !0;
@@ -47,96 +47,100 @@ function _(e, t, n) {
47
47
  }
48
48
  return !1;
49
49
  }
50
- function v({ value: f, defaultValue: v, onValueChange: y, min: b, max: x, disabled: S, locale: C, size: w = "md", labels: T, className: E, isInRange: D, isRangeStart: O, isRangeEnd: k, onDayHover: A, month: j, year: M, onViewChange: N, hideNav: P = !1 }) {
51
- i();
52
- let F = C ?? o(), I = T?.previousMonth ?? s(a.calendar.previousMonth), L = T?.nextMonth ?? s(a.calendar.nextMonth), R = f === void 0 ? v ?? null : f, z = /* @__PURE__ */ new Date(), B = R ?? v ?? z, V = r(B.getUTCFullYear()), H = r(B.getUTCMonth()), U = r(B);
53
- j !== void 0 && (H.value = j), M !== void 0 && (V.value = M);
54
- let W = u(F), G = d(V.value, H.value, W), K = new Intl.DateTimeFormat(F, { weekday: "short" }), q = Array.from({ length: 7 }, (e, t) => {
55
- let n = new Date(Date.UTC(2024, 0, 7 + W + t));
56
- return K.format(n);
57
- }), J = new Intl.DateTimeFormat(F, {
50
+ function y({ value: p, defaultValue: y, onValueChange: b, min: x, max: S, disabled: C, locale: w, size: T = "md", labels: E, className: D, isInRange: O, isRangeStart: k, isRangeEnd: A, onDayHover: j, month: M, year: N, onViewChange: P, hideNav: F = !1 }) {
51
+ a();
52
+ let I = w ?? s(), L = E?.previousMonth ?? c(o.calendar.previousMonth), R = E?.nextMonth ?? c(o.calendar.nextMonth), z = p === void 0 ? y ?? null : p, B = /* @__PURE__ */ new Date(), V = z ?? y ?? B, [H] = r({
53
+ value: N,
54
+ defaultValue: V.getUTCFullYear()
55
+ }), [U] = r({
56
+ value: M,
57
+ defaultValue: V.getUTCMonth()
58
+ }), W = i(V), G = d(I), K = f(H.value, U.value, G), q = new Intl.DateTimeFormat(I, { weekday: "short" }), J = Array.from({ length: 7 }, (e, t) => {
59
+ let n = new Date(Date.UTC(2024, 0, 7 + G + t));
60
+ return q.format(n);
61
+ }), ee = new Intl.DateTimeFormat(I, {
58
62
  weekday: "long",
59
63
  year: "numeric",
60
64
  month: "long",
61
65
  day: "numeric"
62
- }), Y = new Intl.DateTimeFormat(F, {
66
+ }), Y = new Intl.DateTimeFormat(I, {
63
67
  month: "long",
64
68
  year: "numeric"
65
- }).format(new Date(Date.UTC(V.value, H.value, 1))), X = (e) => _(e, b, x) || (S ? S(e) : !1), Z = j !== void 0 || M !== void 0, ee = (e) => {
66
- Z ? U.value = e : t(() => {
67
- V.value = e.getUTCFullYear(), H.value = e.getUTCMonth(), U.value = e;
68
- }), N?.({
69
+ }).format(new Date(Date.UTC(H.value, U.value, 1))), X = (e) => v(e, x, S) || (C ? C(e) : !1), Z = M !== void 0 || N !== void 0, te = (e) => {
70
+ Z ? W.value = e : t(() => {
71
+ H.value = e.getUTCFullYear(), U.value = e.getUTCMonth(), W.value = e;
72
+ }), P?.({
69
73
  month: e.getUTCMonth(),
70
74
  year: e.getUTCFullYear()
71
75
  });
72
76
  }, Q = (e) => {
73
- X(e) || y?.(e);
77
+ X(e) || b?.(e);
74
78
  }, $ = (e) => {
75
- let n = h(new Date(Date.UTC(V.value, H.value, 1)), e), r = n.getUTCMonth(), i = n.getUTCFullYear();
79
+ let n = g(new Date(Date.UTC(H.value, U.value, 1)), e), r = n.getUTCMonth(), i = n.getUTCFullYear();
76
80
  Z || t(() => {
77
- H.value = r, V.value = i;
78
- }), N?.({
81
+ U.value = r, H.value = i;
82
+ }), P?.({
79
83
  month: r,
80
84
  year: i
81
85
  });
82
86
  };
83
- return /* @__PURE__ */ l("div", {
84
- className: n(e.calendar, E),
85
- "data-size": w,
86
- onMouseLeave: () => A?.(null),
87
- children: [/* @__PURE__ */ l("div", {
87
+ return /* @__PURE__ */ u("div", {
88
+ className: n(e.calendar, D),
89
+ "data-size": T,
90
+ onMouseLeave: () => j?.(null),
91
+ children: [/* @__PURE__ */ u("div", {
88
92
  className: e.header,
89
93
  children: [
90
- P ? /* @__PURE__ */ c("span", { className: e.navSpacer }) : /* @__PURE__ */ c("button", {
94
+ F ? /* @__PURE__ */ l("span", { className: e.navSpacer }) : /* @__PURE__ */ l("button", {
91
95
  type: "button",
92
96
  className: e.navButton,
93
- "aria-label": I,
97
+ "aria-label": L,
94
98
  onClick: () => $(-1),
95
99
  children: "‹"
96
100
  }),
97
- /* @__PURE__ */ c("span", {
101
+ /* @__PURE__ */ l("span", {
98
102
  className: e.monthLabel,
99
103
  "aria-live": "polite",
100
104
  children: Y
101
105
  }),
102
- P ? /* @__PURE__ */ c("span", { className: e.navSpacer }) : /* @__PURE__ */ c("button", {
106
+ F ? /* @__PURE__ */ l("span", { className: e.navSpacer }) : /* @__PURE__ */ l("button", {
103
107
  type: "button",
104
108
  className: e.navButton,
105
- "aria-label": L,
109
+ "aria-label": R,
106
110
  onClick: () => $(1),
107
111
  children: "›"
108
112
  })
109
113
  ]
110
- }), /* @__PURE__ */ l("table", {
114
+ }), /* @__PURE__ */ u("table", {
111
115
  role: "grid",
112
116
  "aria-label": Y,
113
117
  className: e.grid,
114
118
  onKeyDown: (e) => {
115
- let t = U.value, n;
119
+ let t = W.value, n;
116
120
  switch (e.key) {
117
121
  case "ArrowRight":
118
- n = m(t, 1);
122
+ n = h(t, 1);
119
123
  break;
120
124
  case "ArrowLeft":
121
- n = m(t, -1);
125
+ n = h(t, -1);
122
126
  break;
123
127
  case "ArrowDown":
124
- n = m(t, 7);
128
+ n = h(t, 7);
125
129
  break;
126
130
  case "ArrowUp":
127
- n = m(t, -7);
131
+ n = h(t, -7);
128
132
  break;
129
133
  case "Home":
130
- n = g(t, W);
134
+ n = _(t, G);
131
135
  break;
132
136
  case "End":
133
- n = m(g(t, W), 6);
137
+ n = h(_(t, G), 6);
134
138
  break;
135
139
  case "PageUp":
136
- n = h(t, e.shiftKey ? -12 : -1);
140
+ n = g(t, e.shiftKey ? -12 : -1);
137
141
  break;
138
142
  case "PageDown":
139
- n = h(t, e.shiftKey ? 12 : 1);
143
+ n = g(t, e.shiftKey ? 12 : 1);
140
144
  break;
141
145
  case "Enter":
142
146
  case " ":
@@ -144,45 +148,45 @@ function v({ value: f, defaultValue: v, onValueChange: y, min: b, max: x, disabl
144
148
  return;
145
149
  default: return;
146
150
  }
147
- e.preventDefault(), ee(n), A?.(n);
151
+ e.preventDefault(), te(n), j?.(n);
148
152
  },
149
- children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ c("tr", {
153
+ children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", {
150
154
  role: "row",
151
- children: q.map((t) => /* @__PURE__ */ c("th", {
155
+ children: J.map((t) => /* @__PURE__ */ l("th", {
152
156
  className: e.weekday,
153
157
  abbr: t,
154
158
  scope: "col",
155
159
  children: t
156
160
  }, t))
157
- }) }), /* @__PURE__ */ c("tbody", { children: G.map((t, n) => /* @__PURE__ */ c("tr", {
161
+ }) }), /* @__PURE__ */ l("tbody", { children: K.map((t, n) => /* @__PURE__ */ l("tr", {
158
162
  role: "row",
159
163
  children: t.map((t, n) => {
160
- if (!t) return /* @__PURE__ */ c("td", {
164
+ if (!t) return /* @__PURE__ */ l("td", {
161
165
  role: "gridcell",
162
166
  className: e.empty
163
167
  }, n);
164
- let r = p(t, R), i = p(t, z), a = p(t, U.value), o = X(t), s = D ? D(t) : !1, l = O ? O(t) : !1, u = k ? k(t) : !1;
165
- return /* @__PURE__ */ c("td", {
168
+ let r = m(t, z), i = m(t, B), a = m(t, W.value), o = X(t), s = O ? O(t) : !1, c = k ? k(t) : !1, u = A ? A(t) : !1;
169
+ return /* @__PURE__ */ l("td", {
166
170
  role: "gridcell",
167
171
  className: e.cell,
168
172
  "aria-selected": r,
169
- children: /* @__PURE__ */ c("button", {
173
+ children: /* @__PURE__ */ l("button", {
170
174
  type: "button",
171
175
  className: e.day,
172
176
  tabIndex: a ? 0 : -1,
173
- "aria-label": J.format(t),
177
+ "aria-label": ee.format(t),
174
178
  "aria-current": i ? "date" : void 0,
175
179
  "aria-disabled": o || void 0,
176
180
  "data-selected": r || void 0,
177
181
  "data-today": i || void 0,
178
182
  "data-in-range": s || void 0,
179
- "data-range-start": l || void 0,
183
+ "data-range-start": c || void 0,
180
184
  "data-range-end": u || void 0,
181
185
  onClick: () => Q(t),
182
186
  onFocus: () => {
183
- U.value = t;
187
+ W.value = t;
184
188
  },
185
- onMouseEnter: () => A?.(t),
189
+ onMouseEnter: () => j?.(t),
186
190
  children: t.getUTCDate()
187
191
  })
188
192
  }, n);
@@ -192,4 +196,4 @@ function v({ value: f, defaultValue: v, onValueChange: y, min: b, max: x, disabl
192
196
  });
193
197
  }
194
198
  //#endregion
195
- export { v as Calendar };
199
+ export { y as Calendar };
@@ -1,12 +1,12 @@
1
1
  var e = {
2
- card: "_card_ssezx_2",
3
- header: "_header_ssezx_12",
4
- content: "_content_ssezx_12",
5
- footer: "_footer_ssezx_12",
6
- headerRow: "_headerRow_ssezx_67",
7
- headerMain: "_headerMain_ssezx_75",
8
- headerActions: "_headerActions_ssezx_82",
9
- title: "_title_ssezx_90"
2
+ card: "_card_ipz9f_2",
3
+ header: "_header_ipz9f_19",
4
+ content: "_content_ipz9f_19",
5
+ footer: "_footer_ipz9f_19",
6
+ headerRow: "_headerRow_ipz9f_74",
7
+ headerMain: "_headerMain_ipz9f_82",
8
+ headerActions: "_headerActions_ipz9f_89",
9
+ title: "_title_ipz9f_97"
10
10
  };
11
11
  //#endregion
12
12
  export { e as default };
@@ -1,8 +1,8 @@
1
1
  var e = {
2
- wrapper: "_wrapper_tw120_2",
3
- input: "_input_tw120_15",
4
- control: "_control_tw120_28",
5
- label: "_label_tw120_72"
2
+ wrapper: "_wrapper_4zlmw_2",
3
+ input: "_input_4zlmw_15",
4
+ control: "_control_4zlmw_28",
5
+ label: "_label_4zlmw_78"
6
6
  };
7
7
  //#endregion
8
8
  export { e as default };
@@ -2,45 +2,46 @@
2
2
 
3
3
  import e from "./combobox.module.js";
4
4
  import { useId as t, useRef as n } from "react";
5
- import { cn as r, createMachine as i, focusElement as a, useMachine as o, useSignal as s, useSignalEffect as c, useSignals as l } from "@cascivo/core";
6
- import { builtin as u, t as d } from "@cascivo/i18n";
7
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
5
+ import { cn as r, createMachine as i, focusElement as a, useControllableSignal as o, useMachine as s, useSignal as c, useSignalEffect as l, useSignals as u } from "@cascivo/core";
6
+ import { builtin as d, t as f } from "@cascivo/i18n";
7
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
8
  //#region ../components/src/combobox/combobox.tsx
9
- var m = i({
9
+ var h = i({
10
10
  initial: "closed",
11
11
  states: {
12
12
  closed: { on: { OPEN: "open" } },
13
13
  open: { on: { CLOSE: "closed" } }
14
14
  }
15
15
  });
16
- function h({ options: i, value: h, defaultValue: g, onValueChange: _, onChange: v, clearable: y = !1, searchable: b = !0, label: x, hint: S, error: C, size: w = "md", disabled: T = !1, labels: E, className: D, id: O }) {
17
- l();
18
- let [k, A] = o(m), j = t(), M = O ?? `cascade-combobox-${j}`, N = `${j}-listbox`, P = n(null), F = E?.placeholder ?? d(u.combobox.placeholder), I = E?.empty ?? d(u.combobox.empty), L = E?.clear ?? d(u.combobox.clear), R = E?.search ?? d(u.combobox.search), z = s(h ?? g);
19
- h !== void 0 && (z.value = h);
20
- let B = s(""), V = s(0), H = k.value === "open", U = i.filter((e) => !b || !B.value ? !0 : e.label.toLowerCase().includes(B.value.toLowerCase())), W = i.find((e) => e.value === z.value);
21
- c(() => {
16
+ function g({ options: i, value: g, defaultValue: _, onValueChange: v, onChange: y, clearable: b = !1, searchable: x = !0, label: S, hint: C, error: w, size: T = "md", disabled: E = !1, labels: D, className: O, id: k }) {
17
+ u();
18
+ let [A, j] = s(h), M = t(), N = k ?? `cascade-combobox-${M}`, P = `${M}-listbox`, F = n(null), ee = D?.placeholder ?? f(d.combobox.placeholder), I = D?.empty ?? f(d.combobox.empty), L = D?.clear ?? f(d.combobox.clear), R = D?.search ?? f(d.combobox.search), [z] = o({
19
+ value: g,
20
+ defaultValue: _
21
+ }), B = c(""), V = c(0), H = A.value === "open", U = i.filter((e) => !x || !B.value ? !0 : e.label.toLowerCase().includes(B.value.toLowerCase())), W = i.find((e) => e.value === z.value);
22
+ l(() => {
22
23
  if (!H) return;
23
24
  let e = (e) => {
24
- let t = document.getElementById(`${j}-root`);
25
- t && !t.contains(e.target) && A("CLOSE");
25
+ let t = document.getElementById(`${M}-root`);
26
+ t && !t.contains(e.target) && j("CLOSE");
26
27
  };
27
28
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
28
29
  });
29
30
  let G = () => {
30
- T || (B.value = "", V.value = 0, A("OPEN"), setTimeout(() => a(P.current), 0));
31
+ E || (B.value = "", V.value = 0, j("OPEN"), setTimeout(() => a(F.current), 0));
31
32
  }, K = () => {
32
- A("CLOSE"), B.value = "";
33
- }, q = _ ?? v, J = (e) => {
34
- h === void 0 && (z.value = e), q?.(e), K();
33
+ j("CLOSE"), B.value = "";
34
+ }, q = v ?? y, J = (e) => {
35
+ g === void 0 && (z.value = e), q?.(e), K();
35
36
  }, Y = () => {
36
- h === void 0 && (z.value = void 0), q?.(void 0);
37
+ g === void 0 && (z.value = void 0), q?.(void 0);
37
38
  }, X = U.flatMap((e, t) => e.disabled ? [] : [t]), Z = (e) => {
38
39
  if (X.length === 0) return;
39
40
  let t = X[(X.indexOf(V.value) + e + X.length) % X.length];
40
41
  t !== void 0 && (V.value = t);
41
42
  }, Q = (e) => {
42
43
  (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), G());
43
- }, ee = (e) => {
44
+ }, te = (e) => {
44
45
  switch (e.key) {
45
46
  case "ArrowDown":
46
47
  e.preventDefault(), Z(1);
@@ -61,42 +62,42 @@ function h({ options: i, value: h, defaultValue: g, onValueChange: _, onChange:
61
62
  K();
62
63
  break;
63
64
  }
64
- }, $ = (e) => `${j}-option-${e}`;
65
- return /* @__PURE__ */ p("div", {
66
- id: `${j}-root`,
67
- className: r(e.wrapper, D),
68
- "data-state": C ? "error" : k.value,
69
- "data-size": w,
65
+ }, $ = (e) => `${M}-option-${e}`;
66
+ return /* @__PURE__ */ m("div", {
67
+ id: `${M}-root`,
68
+ className: r(e.wrapper, O),
69
+ "data-state": w ? "error" : A.value,
70
+ "data-size": T,
70
71
  children: [
71
- x && /* @__PURE__ */ f("label", {
72
+ S && /* @__PURE__ */ p("label", {
72
73
  className: e.label,
73
- htmlFor: M,
74
- children: x
74
+ htmlFor: N,
75
+ children: S
75
76
  }),
76
- /* @__PURE__ */ p("div", {
77
+ /* @__PURE__ */ m("div", {
77
78
  className: e.field,
78
- children: [/* @__PURE__ */ p("button", {
79
- id: M,
79
+ children: [/* @__PURE__ */ m("button", {
80
+ id: N,
80
81
  type: "button",
81
82
  role: "combobox",
82
83
  "aria-expanded": H,
83
- "aria-controls": N,
84
+ "aria-controls": P,
84
85
  "aria-haspopup": "listbox",
85
86
  "aria-activedescendant": H && V.value >= 0 ? $(V.value) : void 0,
86
- "aria-invalid": C ? !0 : void 0,
87
- "aria-describedby": C ? `${j}-error` : S ? `${j}-hint` : void 0,
87
+ "aria-invalid": w ? !0 : void 0,
88
+ "aria-describedby": w ? `${M}-error` : C ? `${M}-hint` : void 0,
88
89
  className: e.trigger,
89
- disabled: T,
90
+ disabled: E,
90
91
  onKeyDown: Q,
91
92
  onClick: H ? K : G,
92
- children: [/* @__PURE__ */ f("span", {
93
+ children: [/* @__PURE__ */ p("span", {
93
94
  className: r(e.value, W ? void 0 : e.placeholder),
94
- children: W?.label ?? F
95
- }), /* @__PURE__ */ f("span", {
95
+ children: W?.label ?? ee
96
+ }), /* @__PURE__ */ p("span", {
96
97
  className: e.chevron,
97
98
  "aria-hidden": "true"
98
99
  })]
99
- }), y && z.value !== void 0 && /* @__PURE__ */ f("button", {
100
+ }), b && z.value !== void 0 && /* @__PURE__ */ p("button", {
100
101
  type: "button",
101
102
  className: e.clear,
102
103
  "aria-label": L,
@@ -106,30 +107,30 @@ function h({ options: i, value: h, defaultValue: g, onValueChange: _, onChange:
106
107
  children: "✕"
107
108
  })]
108
109
  }),
109
- /* @__PURE__ */ p("div", {
110
+ /* @__PURE__ */ m("div", {
110
111
  role: "listbox",
111
- id: N,
112
+ id: P,
112
113
  className: e.listbox,
113
114
  "data-state": H ? "open" : "closed",
114
- "aria-label": x,
115
- children: [b && H && /* @__PURE__ */ f("div", {
115
+ "aria-label": S,
116
+ children: [x && H && /* @__PURE__ */ p("div", {
116
117
  className: e.searchWrapper,
117
- children: /* @__PURE__ */ f("input", {
118
- ref: P,
118
+ children: /* @__PURE__ */ p("input", {
119
+ ref: F,
119
120
  type: "text",
120
121
  className: e.search,
121
122
  value: B.value,
122
123
  onChange: (e) => {
123
124
  B.value = e.target.value, V.value = 0;
124
125
  },
125
- onKeyDown: ee,
126
+ onKeyDown: te,
126
127
  "aria-label": R,
127
128
  autoComplete: "off"
128
129
  })
129
- }), U.length === 0 ? /* @__PURE__ */ f("div", {
130
+ }), U.length === 0 ? /* @__PURE__ */ p("div", {
130
131
  className: e.empty,
131
132
  children: I
132
- }) : U.map((t, n) => /* @__PURE__ */ f("div", {
133
+ }) : U.map((t, n) => /* @__PURE__ */ p("div", {
133
134
  id: $(n),
134
135
  role: "option",
135
136
  "aria-selected": t.value === z.value,
@@ -146,19 +147,19 @@ function h({ options: i, value: h, defaultValue: g, onValueChange: _, onChange:
146
147
  children: t.label
147
148
  }, t.value))]
148
149
  }),
149
- C && /* @__PURE__ */ f("span", {
150
- id: `${j}-error`,
150
+ w && /* @__PURE__ */ p("span", {
151
+ id: `${M}-error`,
151
152
  className: e.error,
152
153
  role: "alert",
153
- children: C
154
+ children: w
154
155
  }),
155
- !C && S && /* @__PURE__ */ f("span", {
156
- id: `${j}-hint`,
156
+ !w && C && /* @__PURE__ */ p("span", {
157
+ id: `${M}-hint`,
157
158
  className: e.hint,
158
- children: S
159
+ children: C
159
160
  })
160
161
  ]
161
162
  });
162
163
  }
163
164
  //#endregion
164
- export { h as Combobox };
165
+ export { g as Combobox };