@overdoser/react-toolkit 0.8.1 → 0.9.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 (34) hide show
  1. package/AGENTS.md +6 -0
  2. package/CHANGELOG.md +84 -0
  3. package/components/Drawer/Drawer.js +88 -83
  4. package/components/Timeline/GanttTimeline.d.ts +144 -0
  5. package/components/Timeline/GanttTimeline.js +305 -0
  6. package/components/Timeline/GanttTimeline.module.scss.js +55 -0
  7. package/components/Timeline/HistoryTimeline.d.ts +184 -0
  8. package/components/Timeline/HistoryTimeline.js +445 -0
  9. package/components/Timeline/HistoryTimeline.module.scss.js +59 -0
  10. package/components/Timeline/Timeline.module.scss.js +111 -0
  11. package/components/Timeline/TimelineShared.d.ts +79 -0
  12. package/components/Timeline/TimelineShared.js +173 -0
  13. package/components/Timeline/TraceTimeline.d.ts +180 -0
  14. package/components/Timeline/TraceTimeline.js +511 -0
  15. package/components/Timeline/TraceTimeline.module.scss.js +105 -0
  16. package/components/Timeline/demoData.d.ts +42 -0
  17. package/components/Timeline/historyLayout.d.ts +82 -0
  18. package/components/Timeline/historyLayout.js +264 -0
  19. package/components/Timeline/index.d.ts +7 -0
  20. package/components/Timeline/timelineCore.d.ts +90 -0
  21. package/components/Timeline/timelineCore.js +135 -0
  22. package/components/Timeline/traceLayout.d.ts +72 -0
  23. package/components/Timeline/traceLayout.js +92 -0
  24. package/components/Timeline/useTimeline.d.ts +39 -0
  25. package/components/Timeline/useTimeline.js +81 -0
  26. package/components/inputs/Select/Select.js +158 -154
  27. package/index.css +1 -1
  28. package/index.d.ts +2 -0
  29. package/index.js +93 -87
  30. package/index.layered.css +1 -1
  31. package/llms.txt +113 -0
  32. package/manifest.json +323 -0
  33. package/package.json +1 -1
  34. package/recipes/live-timeline-feed.tsx +147 -0
@@ -1,18 +1,18 @@
1
- import { jsx as o, jsxs as P, Fragment as me } from "react/jsx-runtime";
2
- import { forwardRef as ne, useState as Q, useRef as w, useId as le, useCallback as S, useMemo as ae, useEffect as q } from "react";
1
+ import { jsx as s, jsxs as P, Fragment as me } from "react/jsx-runtime";
2
+ import { forwardRef as ne, useState as U, useRef as w, useId as le, useCallback as S, useMemo as ae, useEffect as $ } from "react";
3
3
  import { createPortal as ie } from "react-dom";
4
4
  import f from "clsx";
5
5
  import e from "./Select.module.scss.js";
6
- import { usePortalPosition as oe } from "../../../hooks/usePortalPosition.js";
7
- const se = ne(
6
+ import { usePortalPosition as se } from "../../../hooks/usePortalPosition.js";
7
+ const oe = ne(
8
8
  ({
9
9
  inputSize: h = "md",
10
10
  error: b = !1,
11
11
  options: p,
12
- placeholder: H,
12
+ placeholder: q,
13
13
  classes: u,
14
- className: F,
15
- style: U,
14
+ className: W,
15
+ style: B,
16
16
  children: y,
17
17
  searchable: g,
18
18
  searchPlaceholder: ee,
@@ -20,37 +20,37 @@ const se = ne(
20
20
  onValueChange: v,
21
21
  ...L
22
22
  }, N) => {
23
- const W = te || v ? (s) => {
24
- te?.(s), v?.(s.target.value);
23
+ const M = te || v ? (o) => {
24
+ te?.(o), v?.(o.target.value);
25
25
  } : void 0;
26
- return /* @__PURE__ */ P("div", { className: f(e.wrapper, e[h], b && e.error, u?.wrapper, F), style: U, children: [
26
+ return /* @__PURE__ */ P("div", { className: f(e.wrapper, e[h], b && e.error, u?.wrapper, W), style: B, children: [
27
27
  /* @__PURE__ */ P(
28
28
  "select",
29
29
  {
30
30
  ref: N,
31
31
  className: f(e.root, e[h], b && e.error, u?.root),
32
- onChange: W,
32
+ onChange: M,
33
33
  ...L,
34
34
  children: [
35
- H && /* @__PURE__ */ o("option", { value: "", disabled: !0, children: H }),
36
- p ? p.map((s) => /* @__PURE__ */ o("option", { value: s.value, disabled: s.disabled, children: s.label }, s.value)) : y
35
+ q && /* @__PURE__ */ s("option", { value: "", disabled: !0, children: q }),
36
+ p ? p.map((o) => /* @__PURE__ */ s("option", { value: o.value, disabled: o.disabled, children: o.label }, o.value)) : y
37
37
  ]
38
38
  }
39
39
  ),
40
- /* @__PURE__ */ o("span", { className: f(e.arrow, u?.arrow) })
40
+ /* @__PURE__ */ s("span", { className: f(e.arrow, u?.arrow) })
41
41
  ] });
42
42
  }
43
43
  );
44
- se.displayName = "NativeSelect";
44
+ oe.displayName = "NativeSelect";
45
45
  const ce = ne(
46
46
  ({
47
47
  inputSize: h = "md",
48
48
  error: b = !1,
49
49
  options: p = [],
50
- placeholder: H = "Select...",
50
+ placeholder: q = "Select...",
51
51
  classes: u,
52
- className: F,
53
- style: U,
52
+ className: W,
53
+ style: B,
54
54
  value: y,
55
55
  disabled: g,
56
56
  id: ee,
@@ -58,77 +58,79 @@ const ce = ne(
58
58
  onChange: v,
59
59
  onValueChange: L,
60
60
  portal: N = !0
61
- }, W) => {
62
- const [s, B] = Q(!1), [M, X] = Q(""), [c, d] = Q(0), K = w(null), I = w(null), A = w(null), R = w(null), k = w(null), $ = le(), O = oe(K, s && N), re = w(null), T = W ?? re, z = w(!1);
63
- q(() => {
64
- z.current && !s && A.current?.focus(), z.current = s;
65
- }, [s]);
61
+ }, M) => {
62
+ const [o, X] = U(!1), [A, T] = U(""), [c, d] = U(0), j = w(null), I = w(null), _ = w(null), R = w(null), k = w(null), Q = le(), K = se(j, o && N), H = w(null), re = (r) => {
63
+ H.current = r, typeof M == "function" ? M(r) : M && (M.current = r);
64
+ }, z = w(!1);
65
+ $(() => {
66
+ z.current && !o && _.current?.focus(), z.current = o;
67
+ }, [o]);
66
68
  const C = S(() => {
67
- B(!1), X(""), d(0);
69
+ X(!1), T(""), d(0);
68
70
  }, []), G = S(() => {
69
- g || (B(!0), X(""), d(0), setTimeout(() => I.current?.focus(), 0));
71
+ g || (X(!0), T(""), d(0), setTimeout(() => I.current?.focus(), 0));
70
72
  }, [g]), J = S(
71
- (n) => {
72
- if (L?.(n), T.current) {
73
+ (r) => {
74
+ if (L?.(r), H.current) {
73
75
  Object.getOwnPropertyDescriptor(
74
76
  HTMLSelectElement.prototype,
75
77
  "value"
76
- )?.set?.call(T.current, n);
77
- const r = new Event("change", { bubbles: !0 });
78
- T.current.dispatchEvent(r), v?.(r);
78
+ )?.set?.call(H.current, r);
79
+ const n = new Event("change", { bubbles: !0 });
80
+ H.current.dispatchEvent(n), v?.(n);
79
81
  }
80
82
  C();
81
83
  },
82
- [L, v, T, C]
84
+ [L, v, H, C]
83
85
  ), x = ae(() => {
84
- if (!M) return p;
85
- const n = M.toLowerCase();
86
- return p.filter((a) => a.label.toLowerCase().includes(n));
87
- }, [p, M]);
88
- q(() => {
89
- const n = x.findIndex((a) => !a.disabled);
90
- d(n >= 0 ? n : 0);
91
- }, [x]), q(() => {
92
- if (!s) return;
93
- const n = k.current;
94
- if (!n) return;
95
- n.querySelectorAll('[role="option"]')[c]?.scrollIntoView?.({ block: "nearest" });
96
- }, [c, s]);
86
+ if (!A) return p;
87
+ const r = A.toLowerCase();
88
+ return p.filter((a) => a.label.toLowerCase().includes(r));
89
+ }, [p, A]);
90
+ $(() => {
91
+ const r = x.findIndex((a) => !a.disabled);
92
+ d(r >= 0 ? r : 0);
93
+ }, [x]), $(() => {
94
+ if (!o) return;
95
+ const r = k.current;
96
+ if (!r) return;
97
+ r.querySelectorAll('[role="option"]')[c]?.scrollIntoView?.({ block: "nearest" });
98
+ }, [c, o]);
97
99
  const E = S(
98
- (n) => {
99
- const a = x.map((r, m) => r.disabled ? -1 : m).filter((r) => r >= 0);
100
+ (r) => {
101
+ const a = x.map((n, m) => n.disabled ? -1 : m).filter((n) => n >= 0);
100
102
  if (a.length !== 0)
101
- if (n.key === "ArrowDown")
102
- n.preventDefault(), d((r) => {
103
- const m = a.indexOf(r);
103
+ if (r.key === "ArrowDown")
104
+ r.preventDefault(), d((n) => {
105
+ const m = a.indexOf(n);
104
106
  return m < a.length - 1 ? a[m + 1] : a[0];
105
107
  });
106
- else if (n.key === "ArrowUp")
107
- n.preventDefault(), d((r) => {
108
- const m = a.indexOf(r);
108
+ else if (r.key === "ArrowUp")
109
+ r.preventDefault(), d((n) => {
110
+ const m = a.indexOf(n);
109
111
  return m > 0 ? a[m - 1] : a[a.length - 1];
110
112
  });
111
- else if (n.key === "Enter") {
112
- n.preventDefault();
113
- const r = x[c];
114
- r && !r.disabled && J(r.value);
115
- } else n.key === "Escape" && (n.preventDefault(), C());
113
+ else if (r.key === "Enter") {
114
+ r.preventDefault();
115
+ const n = x[c];
116
+ n && !n.disabled && J(n.value);
117
+ } else r.key === "Escape" && (r.preventDefault(), C());
116
118
  },
117
119
  [x, c, J, C]
118
120
  );
119
- q(() => {
120
- if (!s) return;
121
- const n = (a) => {
122
- const r = a.target;
123
- K.current?.contains(r) || R.current?.contains(r) || C();
121
+ $(() => {
122
+ if (!o) return;
123
+ const r = (a) => {
124
+ const n = a.target;
125
+ j.current?.contains(n) || R.current?.contains(n) || C();
124
126
  };
125
- return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
126
- }, [s, C]);
127
- const _ = p.find((n) => n.value === y)?.label, Y = x.filter((n) => !n.disabled);
127
+ return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
128
+ }, [o, C]);
129
+ const O = p.find((r) => r.value === y)?.label, Y = x.filter((r) => !r.disabled);
128
130
  return /* @__PURE__ */ P(
129
131
  "div",
130
132
  {
131
- ref: K,
133
+ ref: j,
132
134
  className: f(
133
135
  e.wrapper,
134
136
  e.searchableWrapper,
@@ -136,14 +138,14 @@ const ce = ne(
136
138
  b && e.error,
137
139
  g && e.disabled,
138
140
  u?.wrapper,
139
- F
141
+ W
140
142
  ),
141
- style: U,
143
+ style: B,
142
144
  children: [
143
- /* @__PURE__ */ o(
145
+ /* @__PURE__ */ s(
144
146
  "select",
145
147
  {
146
- ref: T,
148
+ ref: re,
147
149
  className: e.hiddenSelect,
148
150
  value: y ?? "",
149
151
  disabled: g,
@@ -151,36 +153,36 @@ const ce = ne(
151
153
  "aria-hidden": "true",
152
154
  onChange: () => {
153
155
  },
154
- children: p.map((n) => /* @__PURE__ */ o("option", { value: n.value, children: n.label }, n.value))
156
+ children: p.map((r) => /* @__PURE__ */ s("option", { value: r.value, children: r.label }, r.value))
155
157
  }
156
158
  ),
157
159
  /* @__PURE__ */ P(
158
160
  "button",
159
161
  {
160
- ref: A,
162
+ ref: _,
161
163
  id: ee,
162
164
  type: "button",
163
165
  className: f(
164
166
  e.root,
165
167
  e.searchableTrigger,
166
168
  e[h],
167
- s && e.triggerOpen,
169
+ o && e.triggerOpen,
168
170
  b && e.error,
169
- s && e.visuallyHidden,
171
+ o && e.visuallyHidden,
170
172
  u?.root
171
173
  ),
172
174
  onClick: G,
173
175
  disabled: g,
174
- "aria-expanded": s,
176
+ "aria-expanded": o,
175
177
  "aria-haspopup": "listbox",
176
- "aria-controls": s ? $ : void 0,
178
+ "aria-controls": o ? Q : void 0,
177
179
  children: [
178
- /* @__PURE__ */ o("span", { className: f(e.triggerLabel, !_ && e.placeholder), children: _ || H }),
179
- /* @__PURE__ */ o("span", { className: f(e.arrow, e.arrowInline, u?.arrow) })
180
+ /* @__PURE__ */ s("span", { className: f(e.triggerLabel, !O && e.placeholder), children: O || q }),
181
+ /* @__PURE__ */ s("span", { className: f(e.arrow, e.arrowInline, u?.arrow) })
180
182
  ]
181
183
  }
182
184
  ),
183
- s && /* @__PURE__ */ o(
185
+ o && /* @__PURE__ */ s(
184
186
  "input",
185
187
  {
186
188
  ref: I,
@@ -195,52 +197,52 @@ const ce = ne(
195
197
  u?.root,
196
198
  u?.search
197
199
  ),
198
- placeholder: _ || H,
199
- value: M,
200
- onChange: (n) => X(n.target.value),
200
+ placeholder: O || q,
201
+ value: A,
202
+ onChange: (r) => T(r.target.value),
201
203
  onKeyDown: E,
202
204
  "aria-expanded": !0,
203
205
  "aria-haspopup": "listbox",
204
- "aria-controls": $,
206
+ "aria-controls": Q,
205
207
  "aria-activedescendant": Y.length > 0 ? `select-option-${x[c]?.value}` : void 0
206
208
  }
207
209
  ),
208
- s && (() => {
209
- const n = N ? {
210
+ o && (() => {
211
+ const r = N ? {
210
212
  position: "fixed",
211
- top: O.top + 4,
212
- left: O.left,
213
+ top: K.top + 4,
214
+ left: K.left,
213
215
  right: "auto",
214
- width: O.width,
216
+ width: K.width,
215
217
  zIndex: "var(--crk-z-floating)"
216
- } : void 0, a = /* @__PURE__ */ o(
218
+ } : void 0, a = /* @__PURE__ */ s(
217
219
  "div",
218
220
  {
219
- id: $,
221
+ id: Q,
220
222
  ref: R,
221
223
  className: f(e.menu, u?.menu),
222
- style: n,
224
+ style: r,
223
225
  role: "listbox",
224
- children: /* @__PURE__ */ o("div", { className: e.menuItems, ref: k, children: x.length === 0 ? /* @__PURE__ */ o("div", { className: e.noResults, children: "No results" }) : x.map((r, m) => /* @__PURE__ */ o(
226
+ children: /* @__PURE__ */ s("div", { className: e.menuItems, ref: k, children: x.length === 0 ? /* @__PURE__ */ s("div", { className: e.noResults, children: "No results" }) : x.map((n, m) => /* @__PURE__ */ s(
225
227
  "button",
226
228
  {
227
- id: `select-option-${r.value}`,
229
+ id: `select-option-${n.value}`,
228
230
  type: "button",
229
231
  role: "option",
230
- "aria-selected": r.value === y,
232
+ "aria-selected": n.value === y,
231
233
  className: f(
232
234
  e.item,
233
- r.disabled && e.itemDisabled,
234
- r.value === y && e.itemSelected,
235
+ n.disabled && e.itemDisabled,
236
+ n.value === y && e.itemSelected,
235
237
  m === c && e.itemHighlighted,
236
238
  u?.item
237
239
  ),
238
- disabled: r.disabled,
239
- onClick: () => J(r.value),
240
+ disabled: n.disabled,
241
+ onClick: () => J(n.value),
240
242
  onMouseEnter: () => d(m),
241
- children: r.content ?? r.label
243
+ children: n.content ?? n.label
242
244
  },
243
- r.value
245
+ n.value
244
246
  )) })
245
247
  }
246
248
  );
@@ -257,10 +259,10 @@ const ue = ne(
257
259
  inputSize: h = "md",
258
260
  error: b = !1,
259
261
  options: p = [],
260
- placeholder: H = "Select...",
262
+ placeholder: q = "Select...",
261
263
  classes: u,
262
- className: F,
263
- style: U,
264
+ className: W,
265
+ style: B,
264
266
  value: y,
265
267
  disabled: g,
266
268
  id: ee,
@@ -268,22 +270,24 @@ const ue = ne(
268
270
  onValuesChange: v,
269
271
  clearSearchOnSelect: L = !0,
270
272
  closeOnSelect: N = !0,
271
- allowCreate: W = !1,
272
- onCreate: s,
273
- createLabel: B,
274
- portal: M = !0
275
- }, X) => {
276
- const c = Array.isArray(y) ? y : y ? [y] : [], [d, K] = Q(!1), [I, A] = Q(""), [R, k] = Q(0), $ = w(null), O = w(null), re = w(null), T = w(null), z = w(null), C = le(), G = oe(z, d && M), J = w(null), x = X ?? J, E = S(() => {
277
- K(!1), A(""), k(0);
278
- }, []), _ = S(() => {
279
- g || (K(!0), A(""), k(0), setTimeout(() => O.current?.focus(), 0));
273
+ allowCreate: M = !1,
274
+ onCreate: o,
275
+ createLabel: X,
276
+ portal: A = !0
277
+ }, T) => {
278
+ const c = Array.isArray(y) ? y : y ? [y] : [], [d, j] = U(!1), [I, _] = U(""), [R, k] = U(0), Q = w(null), K = w(null), H = w(null), re = w(null), z = w(null), C = le(), G = se(z, d && A), J = w(null), x = (t) => {
279
+ J.current = t, typeof T == "function" ? T(t) : T && (T.current = t);
280
+ }, E = S(() => {
281
+ j(!1), _(""), k(0);
282
+ }, []), O = S(() => {
283
+ g || (j(!0), _(""), k(0), setTimeout(() => K.current?.focus(), 0));
280
284
  }, [g]), Y = S(
281
285
  (t) => {
282
286
  const i = c.includes(t) ? c.filter((l) => l !== t) : [...c, t];
283
- v?.(i), N ? E() : L && A("");
287
+ v?.(i), N ? E() : L && _("");
284
288
  },
285
289
  [c, v, N, E, L]
286
- ), n = S(
290
+ ), r = S(
287
291
  (t, i) => {
288
292
  i.stopPropagation(), v?.(c.filter((l) => l !== t));
289
293
  },
@@ -292,17 +296,17 @@ const ue = ne(
292
296
  if (!I) return p;
293
297
  const t = I.toLowerCase();
294
298
  return p.filter((i) => i.label.toLowerCase().includes(t));
295
- }, [p, I]), r = I.trim(), m = W && r.length > 0 && !p.some(
296
- (t) => t.label.toLowerCase() === r.toLowerCase() || t.value === r
297
- ) && !c.includes(r), j = S(() => {
298
- r && (c.includes(r) || (s?.(r), v?.([...c, r]), N ? E() : L && A("")));
299
- }, [r, c, s, v, N, E, L]);
300
- q(() => {
299
+ }, [p, I]), n = I.trim(), m = M && n.length > 0 && !p.some(
300
+ (t) => t.label.toLowerCase() === n.toLowerCase() || t.value === n
301
+ ) && !c.includes(n), F = S(() => {
302
+ n && (c.includes(n) || (o?.(n), v?.([...c, n]), N ? E() : L && _("")));
303
+ }, [n, c, o, v, N, E, L]);
304
+ $(() => {
301
305
  const t = a.findIndex((i) => !i.disabled);
302
306
  k(t >= 0 ? t : 0);
303
- }, [a]), q(() => {
307
+ }, [a]), $(() => {
304
308
  if (!d) return;
305
- const t = T.current;
309
+ const t = re.current;
306
310
  if (!t) return;
307
311
  t.querySelectorAll('[role="option"]')[R]?.scrollIntoView?.({ block: "nearest" });
308
312
  }, [R, d]);
@@ -316,7 +320,7 @@ const ue = ne(
316
320
  if (i.length !== 0)
317
321
  if (t.key === "ArrowDown") {
318
322
  if (t.preventDefault(), !d) {
319
- _();
323
+ O();
320
324
  return;
321
325
  }
322
326
  k((l) => {
@@ -330,20 +334,20 @@ const ue = ne(
330
334
  });
331
335
  else if (t.key === "Enter") {
332
336
  if (t.preventDefault(), m && R === Z) {
333
- j();
337
+ F();
334
338
  return;
335
339
  }
336
340
  const l = a[R];
337
- l && !l.disabled ? Y(l.value) : m && j();
341
+ l && !l.disabled ? Y(l.value) : m && F();
338
342
  } else t.key === "Escape" && (t.preventDefault(), E());
339
343
  },
340
- [a, R, Y, E, I, c, v, d, _, m, j, Z]
344
+ [a, R, Y, E, I, c, v, d, O, m, F, Z]
341
345
  );
342
- q(() => {
346
+ $(() => {
343
347
  if (!d) return;
344
348
  const t = (i) => {
345
349
  const l = i.target;
346
- $.current?.contains(l) || re.current?.contains(l) || E();
350
+ Q.current?.contains(l) || H.current?.contains(l) || E();
347
351
  };
348
352
  return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
349
353
  }, [d, E]);
@@ -351,7 +355,7 @@ const ue = ne(
351
355
  return /* @__PURE__ */ P(
352
356
  "div",
353
357
  {
354
- ref: $,
358
+ ref: Q,
355
359
  className: f(
356
360
  e.wrapper,
357
361
  e.searchableWrapper,
@@ -359,11 +363,11 @@ const ue = ne(
359
363
  b && e.error,
360
364
  g && e.disabled,
361
365
  u?.wrapper,
362
- F
366
+ W
363
367
  ),
364
- style: U,
368
+ style: B,
365
369
  children: [
366
- /* @__PURE__ */ o(
370
+ /* @__PURE__ */ s(
367
371
  "select",
368
372
  {
369
373
  ref: x,
@@ -375,7 +379,7 @@ const ue = ne(
375
379
  "aria-hidden": "true",
376
380
  onChange: () => {
377
381
  },
378
- children: p.map((t) => /* @__PURE__ */ o("option", { value: t.value, children: t.label }, t.value))
382
+ children: p.map((t) => /* @__PURE__ */ s("option", { value: t.value, children: t.label }, t.value))
379
383
  }
380
384
  ),
381
385
  /* @__PURE__ */ P(
@@ -391,7 +395,7 @@ const ue = ne(
391
395
  u?.root
392
396
  ),
393
397
  onClick: () => {
394
- d ? O.current?.focus() : _();
398
+ d ? K.current?.focus() : O();
395
399
  },
396
400
  role: "combobox",
397
401
  "aria-expanded": d,
@@ -399,59 +403,59 @@ const ue = ne(
399
403
  "aria-controls": d ? C : void 0,
400
404
  children: [
401
405
  fe.map((t) => /* @__PURE__ */ P("span", { className: f(e.chip, u?.chip), children: [
402
- /* @__PURE__ */ o("span", { className: e.chipLabel, children: t.content ?? t.label }),
403
- /* @__PURE__ */ o(
406
+ /* @__PURE__ */ s("span", { className: e.chipLabel, children: t.content ?? t.label }),
407
+ /* @__PURE__ */ s(
404
408
  "button",
405
409
  {
406
410
  type: "button",
407
411
  className: f(e.chipRemove, u?.chipRemove),
408
- onClick: (i) => n(t.value, i),
412
+ onClick: (i) => r(t.value, i),
409
413
  "aria-label": `Remove ${t.label}`,
410
414
  tabIndex: -1,
411
415
  children: "×"
412
416
  }
413
417
  )
414
418
  ] }, t.value)),
415
- /* @__PURE__ */ o(
419
+ /* @__PURE__ */ s(
416
420
  "input",
417
421
  {
418
- ref: O,
422
+ ref: K,
419
423
  id: ee,
420
424
  type: "text",
421
425
  className: e.multiSearch,
422
- placeholder: c.length === 0 ? H : "",
426
+ placeholder: c.length === 0 ? q : "",
423
427
  value: I,
424
428
  onChange: (t) => {
425
- A(t.target.value), d || _();
429
+ _(t.target.value), d || O();
426
430
  },
427
431
  onKeyDown: de,
428
432
  disabled: g,
429
433
  "aria-label": "Search options"
430
434
  }
431
435
  ),
432
- /* @__PURE__ */ o("span", { className: f(e.arrow, e.arrowMulti, u?.arrow) })
436
+ /* @__PURE__ */ s("span", { className: f(e.arrow, e.arrowMulti, u?.arrow) })
433
437
  ]
434
438
  }
435
439
  ),
436
440
  d && (() => {
437
- const t = M ? {
441
+ const t = A ? {
438
442
  position: "fixed",
439
443
  top: G.top + 4,
440
444
  left: G.left,
441
445
  right: "auto",
442
446
  width: G.width,
443
447
  zIndex: "var(--crk-z-floating)"
444
- } : void 0, i = /* @__PURE__ */ o(
448
+ } : void 0, i = /* @__PURE__ */ s(
445
449
  "div",
446
450
  {
447
451
  id: C,
448
- ref: re,
452
+ ref: H,
449
453
  className: f(e.menu, u?.menu),
450
454
  style: t,
451
455
  role: "listbox",
452
456
  "aria-multiselectable": "true",
453
- children: /* @__PURE__ */ P("div", { className: e.menuItems, ref: T, children: [
454
- a.length === 0 && !m && /* @__PURE__ */ o("div", { className: e.noResults, children: "No results" }),
457
+ children: /* @__PURE__ */ P("div", { className: e.menuItems, ref: re, children: [
458
+ a.length === 0 && !m && /* @__PURE__ */ s("div", { className: e.noResults, children: "No results" }),
455
459
  a.map((l, D) => {
456
460
  const V = c.includes(l.value);
457
461
  return /* @__PURE__ */ P(
@@ -472,14 +476,14 @@ const ue = ne(
472
476
  onClick: () => Y(l.value),
473
477
  onMouseEnter: () => k(D),
474
478
  children: [
475
- V && /* @__PURE__ */ o("span", { className: e.itemCheck, "aria-hidden": "true" }),
479
+ V && /* @__PURE__ */ s("span", { className: e.itemCheck, "aria-hidden": "true" }),
476
480
  l.content ?? l.label
477
481
  ]
478
482
  },
479
483
  l.value
480
484
  );
481
485
  }),
482
- m && /* @__PURE__ */ o(
486
+ m && /* @__PURE__ */ s(
483
487
  "button",
484
488
  {
485
489
  type: "button",
@@ -490,11 +494,11 @@ const ue = ne(
490
494
  R === Z && e.itemHighlighted,
491
495
  u?.item
492
496
  ),
493
- onClick: j,
497
+ onClick: F,
494
498
  onMouseEnter: () => k(Z),
495
- children: B ? B(r) : /* @__PURE__ */ P(me, { children: [
499
+ children: X ? X(n) : /* @__PURE__ */ P(me, { children: [
496
500
  "Create “",
497
- /* @__PURE__ */ o("strong", { children: r }),
501
+ /* @__PURE__ */ s("strong", { children: n }),
498
502
  "”"
499
503
  ] })
500
504
  },
@@ -503,7 +507,7 @@ const ue = ne(
503
507
  ] })
504
508
  }
505
509
  );
506
- return M && typeof document < "u" ? ie(i, document.body) : i;
510
+ return A && typeof document < "u" ? ie(i, document.body) : i;
507
511
  })()
508
512
  ]
509
513
  }
@@ -512,7 +516,7 @@ const ue = ne(
512
516
  );
513
517
  ue.displayName = "MultiSelect";
514
518
  const he = ne(
515
- (h, b) => h.multiple ? /* @__PURE__ */ o(ue, { ref: b, ...h }) : h.searchable ? /* @__PURE__ */ o(ce, { ref: b, ...h }) : /* @__PURE__ */ o(se, { ref: b, ...h })
519
+ (h, b) => h.multiple ? /* @__PURE__ */ s(ue, { ref: b, ...h }) : h.searchable ? /* @__PURE__ */ s(ce, { ref: b, ...h }) : /* @__PURE__ */ s(oe, { ref: b, ...h })
516
520
  );
517
521
  he.displayName = "Select";
518
522
  export {