@pibit.ai/cure-design-system 0.6.29 → 0.6.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,OAAO,CAAC;AAYf,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uHAAuH;IACvH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8GAA8G;IAC9G,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAyGD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,IAAW,EACX,QAAgB,EAChB,gBAAgB,EAChB,QAAgB,EAChB,cAAc,EACd,SAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAkB,EAClB,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAuGlB"}
1
+ {"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,OAAO,CAAC;AAef,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uHAAuH;IACvH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8GAA8G;IAC9G,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAyGD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,IAAW,EACX,QAAgB,EAChB,gBAAgB,EAChB,QAAgB,EAChB,cAAc,EACd,SAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAkB,EAClB,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAwIlB"}
@@ -1,86 +1,86 @@
1
- import { jsx as r, jsxs as F, Fragment as z } from "react/jsx-runtime";
2
- import { useRef as L, useCallback as b, useEffect as k, useMemo as q } from "react";
3
- import { SearchMd as A, XClose as E } from "@untitledui/icons";
4
- import { ComboBox as P, Group as R, Input as j } from "react-aria-components";
5
- import { cx as i } from "../../utils/cn.js";
6
- import { getPlatformShortcutLabel as B } from "../../utils/keyboard-shortcut.js";
7
- import { sizes as g } from "./select-shared.js";
8
- import { ButtonUtility as G } from "../button/button-utility.js";
9
- const M = {
1
+ import { jsx as r, jsxs as _, Fragment as M } from "react/jsx-runtime";
2
+ import { useRef as U, useCallback as S, useEffect as F, useMemo as j } from "react";
3
+ import { SearchMd as B, XClose as G } from "@untitledui/icons";
4
+ import { ComboBox as O, Group as T, Input as V } from "react-aria-components";
5
+ import { cx as c } from "../../utils/cn.js";
6
+ import { getPlatformShortcutLabel as X } from "../../utils/keyboard-shortcut.js";
7
+ import { sizes as k } from "./select-shared.js";
8
+ import { ButtonUtility as H } from "../button/button-utility.js";
9
+ const J = 15, Q = {
10
10
  xs: "h-7",
11
11
  sm: "h-8",
12
12
  md: "h-9",
13
13
  lg: "h-11"
14
- }, _ = ({
15
- size: u,
16
- shortcut: l,
17
- bordered: h = !1,
18
- placeholder: y,
19
- shortcutClassName: x,
20
- onKeyDown: d,
21
- onClear: m,
22
- hasValue: o,
23
- className: s
14
+ }, W = ({
15
+ size: m,
16
+ shortcut: u,
17
+ bordered: g = !1,
18
+ placeholder: x,
19
+ shortcutClassName: b,
20
+ onKeyDown: f,
21
+ onClear: p,
22
+ hasValue: i,
23
+ className: l
24
24
  }) => {
25
- const n = g[u] ? u : "sm";
25
+ const o = k[m] ? m : "sm";
26
26
  return /* @__PURE__ */ r(
27
- R,
27
+ T,
28
28
  {
29
- className: ({ isFocusWithin: a, isDisabled: p }) => i(
29
+ className: ({ isFocusWithin: a, isDisabled: h }) => c(
30
30
  "relative flex w-full items-center gap-2 rounded-md bg-primary outline-hidden transition-shadow duration-100 ease-linear ring-inset",
31
- h && "border border-secondary",
32
- p && "cursor-not-allowed bg-disabled_subtle",
31
+ g && "border border-secondary",
32
+ h && "cursor-not-allowed bg-disabled_subtle",
33
33
  a && "ring-1 ring-brand",
34
- M[n],
35
- g[n].root,
36
- s
34
+ Q[o],
35
+ k[o].root,
36
+ l
37
37
  ),
38
- children: ({ isDisabled: a }) => /* @__PURE__ */ F(z, { children: [
38
+ children: ({ isDisabled: a }) => /* @__PURE__ */ _(M, { children: [
39
39
  /* @__PURE__ */ r(
40
- A,
40
+ B,
41
41
  {
42
42
  color: "var(--color-utility-gray-300)",
43
43
  className: "pointer-events-none size-4 flex-shrink-0"
44
44
  }
45
45
  ),
46
46
  /* @__PURE__ */ r("div", { className: "relative flex w-full items-center gap-2", children: /* @__PURE__ */ r(
47
- j,
47
+ V,
48
48
  {
49
- placeholder: y,
50
- onKeyDown: d,
51
- className: i(
49
+ placeholder: x,
50
+ onKeyDown: f,
51
+ className: c(
52
52
  "z-10 w-full appearance-none bg-transparent text-xs text-primary caret-alpha-black/90 placeholder:text-placeholder_subtle focus:outline-hidden disabled:cursor-not-allowed disabled:text-disabled disabled:placeholder:text-disabled",
53
- o && "pr-6",
54
- l && !o && "pr-12"
53
+ i && "pr-6",
54
+ u && !i && "pr-12"
55
55
  )
56
56
  }
57
57
  ) }),
58
- /* @__PURE__ */ r("div", { className: "flex-shrink-0", children: o && !a && /* @__PURE__ */ r(
59
- G,
58
+ /* @__PURE__ */ r("div", { className: "flex-shrink-0", children: i && !a && /* @__PURE__ */ r(
59
+ H,
60
60
  {
61
- icon: /* @__PURE__ */ r(E, { size: 14 }),
61
+ icon: /* @__PURE__ */ r(G, { size: 14 }),
62
62
  color: "tertiary",
63
- onClick: m,
63
+ onClick: p,
64
64
  "aria-label": "Clear search"
65
65
  }
66
66
  ) }),
67
- l && !o && /* @__PURE__ */ r(
67
+ u && !i && /* @__PURE__ */ r(
68
68
  "div",
69
69
  {
70
- className: i(
70
+ className: c(
71
71
  "pointer-events-none absolute inset-y-0.5 right-0.5 z-10 flex items-center rounded-r-[inherit] bg-linear-to-r from-transparent pl-8",
72
- g[n].shortcut,
73
- x
72
+ k[o].shortcut,
73
+ b
74
74
  ),
75
75
  children: /* @__PURE__ */ r(
76
76
  "span",
77
77
  {
78
- className: i(
78
+ className: c(
79
79
  "pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset",
80
80
  a && "bg-transparent text-disabled"
81
81
  ),
82
82
  "aria-hidden": "true",
83
- children: B(["meta"], "K")
83
+ children: X(["meta"], "K")
84
84
  }
85
85
  )
86
86
  }
@@ -89,46 +89,63 @@ const M = {
89
89
  }
90
90
  );
91
91
  };
92
- function Y({
93
- size: u = "sm",
94
- shortcut: l = !1,
95
- registerShortcut: h,
96
- bordered: y = !1,
97
- innerClassName: x,
98
- autoFocus: d = !1,
99
- placeholder: m,
100
- shortcutClassName: o,
101
- value: s,
102
- onChange: n,
92
+ function oe({
93
+ size: m = "sm",
94
+ shortcut: u = !1,
95
+ registerShortcut: g,
96
+ bordered: x = !1,
97
+ innerClassName: b,
98
+ autoFocus: f = !1,
99
+ placeholder: p,
100
+ shortcutClassName: i,
101
+ value: l,
102
+ onChange: o,
103
103
  onKeyDown: a,
104
- className: p,
105
- isDisabled: c = !1,
106
- "aria-label": v,
107
- ...K
104
+ className: h,
105
+ isDisabled: d = !1,
106
+ "aria-label": q,
107
+ ...z
108
108
  }) {
109
- const w = L(null), S = h ?? l, f = b(() => {
109
+ const y = U(null), E = g ?? u, K = S(() => {
110
110
  var e, t;
111
- (t = (e = w.current) == null ? void 0 : e.querySelector("input")) == null || t.focus();
111
+ (t = (e = y.current) == null ? void 0 : e.querySelector("input")) == null || t.focus();
112
112
  }, []);
113
- k(() => {
114
- if (!d || c) return;
115
- let e = 0;
116
- const t = requestAnimationFrame(() => {
117
- e = requestAnimationFrame(() => f());
118
- });
119
- return () => {
120
- cancelAnimationFrame(t), cancelAnimationFrame(e);
113
+ F(() => {
114
+ if (!f || d) return;
115
+ let e = 0, t = J, v = !1;
116
+ const w = () => {
117
+ v = !0;
118
+ }, L = (n) => {
119
+ const s = y.current, I = (s == null ? void 0 : s.closest('[role="dialog"]')) ?? s;
120
+ I && n.target instanceof Node && !I.contains(n.target) && w();
121
+ }, N = [
122
+ "keydown",
123
+ "pointerdown",
124
+ "touchstart",
125
+ "compositionstart"
126
+ ];
127
+ N.forEach((n) => document.addEventListener(n, w, !0)), document.addEventListener("focusin", L, !0);
128
+ const C = () => {
129
+ var s;
130
+ if (v) return;
131
+ const n = (s = y.current) == null ? void 0 : s.querySelector("input");
132
+ n && document.activeElement !== n && n.focus(), --t > 0 && (e = requestAnimationFrame(C));
133
+ };
134
+ return e = requestAnimationFrame(C), () => {
135
+ cancelAnimationFrame(e), N.forEach(
136
+ (n) => document.removeEventListener(n, w, !0)
137
+ ), document.removeEventListener("focusin", L, !0);
121
138
  };
122
- }, [d, c, f]), k(() => {
123
- if (!S || c) return;
139
+ }, [f, d]), F(() => {
140
+ if (!E || d) return;
124
141
  const e = (t) => {
125
- (t.metaKey || t.ctrlKey) && !t.shiftKey && !t.altKey && t.key.toLowerCase() === "k" && (t.preventDefault(), t.stopPropagation(), f());
142
+ (t.metaKey || t.ctrlKey) && !t.shiftKey && !t.altKey && t.key.toLowerCase() === "k" && (t.preventDefault(), t.stopPropagation(), K());
126
143
  };
127
144
  return window.addEventListener("keydown", e, { capture: !0 }), () => window.removeEventListener("keydown", e, {
128
145
  capture: !0
129
146
  });
130
- }, [S, c, f]);
131
- const N = b(
147
+ }, [E, d, K]);
148
+ const A = S(
132
149
  (e) => {
133
150
  if ((e.metaKey || e.ctrlKey) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === "k") {
134
151
  e.preventDefault(), e.stopPropagation();
@@ -137,39 +154,39 @@ function Y({
137
154
  e.key === "Enter" && (e.preventDefault(), e.stopPropagation()), a == null || a(e);
138
155
  },
139
156
  [a]
140
- ), I = b(() => {
141
- n == null || n("");
142
- }, [n]), C = q(() => !!s && s.length > 0, [s]);
157
+ ), P = S(() => {
158
+ o == null || o("");
159
+ }, [o]), R = j(() => !!l && l.length > 0, [l]);
143
160
  return /* @__PURE__ */ r(
144
- P,
161
+ O,
145
162
  {
146
- ...K,
147
- ref: w,
148
- inputValue: s,
149
- onInputChange: n,
163
+ ...z,
164
+ ref: y,
165
+ inputValue: l,
166
+ onInputChange: o,
150
167
  menuTrigger: "manual",
151
168
  items: [],
152
169
  allowsCustomValue: !0,
153
- isDisabled: c,
154
- "aria-label": v || m || "Search",
155
- className: i("w-xs", p),
170
+ isDisabled: d,
171
+ "aria-label": q || p || "Search",
172
+ className: c("w-xs", h),
156
173
  children: () => /* @__PURE__ */ r(
157
- _,
174
+ W,
158
175
  {
159
- size: u,
160
- shortcut: l,
161
- bordered: y,
162
- placeholder: m,
163
- shortcutClassName: o,
164
- onKeyDown: N,
165
- onClear: I,
166
- hasValue: C,
167
- className: i(p, x)
176
+ size: m,
177
+ shortcut: u,
178
+ bordered: x,
179
+ placeholder: p,
180
+ shortcutClassName: i,
181
+ onKeyDown: A,
182
+ onClear: P,
183
+ hasValue: R,
184
+ className: c(h, b)
168
185
  }
169
186
  )
170
187
  }
171
188
  );
172
189
  }
173
190
  export {
174
- Y as default
191
+ oe as default
175
192
  };
@@ -1 +1 @@
1
- {"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/searchable-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAEV,WAAW,IAAI,eAAe,EAC/B,MAAM,uBAAuB,CAAC;AAW/B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAwBzB,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,eAAe,CAAC,cAAc,CAAC,EAC/B,UAAU,GAAG,OAAO,GAAG,mBAAmB,CAC3C;IACC,mGAAmG;IACnG,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9D,mDAAmD;IACnD,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,eAAe,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC;IACjC,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,2GAA2G;IAC3G,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2GAA2G;IAC3G,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,SAAS,CAAC;IACjD,6DAA6D;IAC7D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,4GAA4G;IAC5G,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAiPD,eAAO,MAAM,gBAAgB,GAAI,iWA2B9B,qBAAqB,4CAsQvB,CAAC"}
1
+ {"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/searchable-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAEV,WAAW,IAAI,eAAe,EAC/B,MAAM,uBAAuB,CAAC;AAW/B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAwBzB,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,eAAe,CAAC,cAAc,CAAC,EAC/B,UAAU,GAAG,OAAO,GAAG,mBAAmB,CAC3C;IACC,mGAAmG;IACnG,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9D,mDAAmD;IACnD,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,eAAe,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC;IACjC,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,2GAA2G;IAC3G,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2GAA2G;IAC3G,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,SAAS,CAAC;IACjD,6DAA6D;IAC7D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,4GAA4G;IAC5G,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAiPD,eAAO,MAAM,gBAAgB,GAAI,iWA2B9B,qBAAqB,4CAsRvB,CAAC"}
@@ -1,78 +1,78 @@
1
- import { jsx as e, jsxs as h, Fragment as _ } from "react/jsx-runtime";
2
- import { useState as Y, useRef as Z, useCallback as R, useMemo as $, isValidElement as pe } from "react";
3
- import { ChevronDown as I, XClose as me } from "@untitledui/icons";
4
- import { Select as xe, ListBox as he, Button as be, SelectValue as ge, ButtonContext as ve } from "react-aria-components";
5
- import { Avatar as we } from "../avatar/avatar.js";
6
- import { Popover as Ne } from "./popover.js";
7
- import { SelectItem as ke } from "./select-item.js";
8
- import { SelectContext as ye, fontSizes as k, sizes as Pe } from "./select-shared.js";
9
- import { HintText as Te } from "../input/hint-text.js";
10
- import { Label as qe } from "../input/label.js";
1
+ import { jsx as r, jsxs as b, Fragment as X } from "react/jsx-runtime";
2
+ import { useState as W, useRef as $, useCallback as D, useMemo as I, useEffect as xe, isValidElement as he } from "react";
3
+ import { ChevronDown as C, XClose as be } from "@untitledui/icons";
4
+ import { Select as ge, ListBox as ve, Button as we, SelectValue as Ne, ButtonContext as ke } from "react-aria-components";
5
+ import { Avatar as ye } from "../avatar/avatar.js";
6
+ import { Popover as Pe } from "./popover.js";
7
+ import { SelectItem as Te } from "./select-item.js";
8
+ import { SelectContext as qe, fontSizes as y, sizes as Be } from "./select-shared.js";
9
+ import { HintText as Ke } from "../input/hint-text.js";
10
+ import { Label as Re } from "../input/label.js";
11
11
  import { cx as o } from "../../utils/cn.js";
12
- import { isReactComponent as Be } from "../../utils/is-react-component.js";
13
- import { LoadingIndicator as Ke } from "../../applications/loading-indicator/loading-indicator.js";
14
- import Re from "./SearchInput.js";
15
- const De = {
12
+ import { isReactComponent as De } from "../../utils/is-react-component.js";
13
+ import { LoadingIndicator as Se } from "../../applications/loading-indicator/loading-indicator.js";
14
+ import je from "./SearchInput.js";
15
+ const Fe = {
16
16
  sm: "rounded-md",
17
17
  md: "rounded-md",
18
18
  lg: "rounded-lg"
19
- }, Se = {
19
+ }, Oe = {
20
20
  sm: "text-xs",
21
21
  md: "text-sm",
22
22
  lg: "text-md"
23
- }, je = "relative flex w-full cursor-pointer items-center bg-primary ring-1 outline-hidden transition duration-100 ease-linear ring-inset", Oe = (m, y) => {
24
- const i = y.trim().toLowerCase();
23
+ }, Ue = "relative flex w-full cursor-pointer items-center bg-primary ring-1 outline-hidden transition duration-100 ease-linear ring-inset", Ee = (m, P) => {
24
+ const i = P.trim().toLowerCase();
25
25
  if (!i) return !0;
26
- const u = String(m.label ?? "").toLowerCase(), b = String(m.supportingText ?? "").toLowerCase(), l = String(m.id ?? "").toLowerCase();
27
- return u.includes(i) || b.includes(i) || l.includes(i);
28
- }, Ue = {
26
+ const u = String(m.label ?? "").toLowerCase(), g = String(m.supportingText ?? "").toLowerCase(), l = String(m.id ?? "").toLowerCase();
27
+ return u.includes(i) || g.includes(i) || l.includes(i);
28
+ }, Le = {
29
29
  sm: "size-4",
30
30
  md: "size-4",
31
31
  lg: "size-5"
32
- }, Fe = ({
32
+ }, Ve = ({
33
33
  isOpen: m,
34
- isFocused: y,
34
+ isFocused: P,
35
35
  isDisabled: i,
36
36
  isInvalid: u,
37
- isLoading: b,
37
+ isLoading: g,
38
38
  size: l = "sm",
39
39
  placeholder: V,
40
- placeholderIcon: P,
41
- textStyles: g,
42
- selectedDisplayValue: T,
40
+ placeholderIcon: T,
41
+ textStyles: v,
42
+ selectedDisplayValue: q,
43
43
  isClearable: z = !1,
44
44
  onClear: a,
45
45
  hasSelection: s = !1,
46
46
  endAdornment: d,
47
- triggerSelectedItem: D = null,
48
- hasSupportingText: q = !1,
47
+ triggerSelectedItem: S = null,
48
+ hasSupportingText: B = !1,
49
49
  leadingAdornment: x,
50
50
  inlineSupportingText: M = !1
51
51
  }) => {
52
- const S = z && s && !i && a;
53
- return /* @__PURE__ */ e(
54
- be,
52
+ const j = z && s && !i && a;
53
+ return /* @__PURE__ */ r(
54
+ we,
55
55
  {
56
56
  className: o(
57
- je,
58
- De[l],
59
- u ? "ring-error" : y || m ? "ring-brand" : "ring-secondary",
57
+ Ue,
58
+ Fe[l],
59
+ u ? "ring-error" : P || m ? "ring-brand" : "ring-secondary",
60
60
  i && "cursor-not-allowed bg-disabled_subtle text-disabled"
61
61
  ),
62
- children: /* @__PURE__ */ e(
63
- ge,
62
+ children: /* @__PURE__ */ r(
63
+ Ne,
64
64
  {
65
65
  className: o(
66
66
  "flex h-max w-full items-center justify-start gap-2 text-left align-middle",
67
- q ? "px-2 pt-3 pb-3" : o("truncate", Pe[l].root),
67
+ B ? "px-2 pt-3 pb-3" : o("truncate", Be[l].root),
68
68
  "*:data-icon:size-5 *:data-icon:shrink-0 *:data-icon:text-fg-quaternary in-disabled:*:data-icon:text-fg-disabled"
69
69
  ),
70
- children: (j) => {
71
- const r = D ?? j.selectedItem, v = (r == null ? void 0 : r.icon) || P, f = !!r, w = !f && !!T;
72
- return b && !f && !w ? /* @__PURE__ */ h(_, { children: [
73
- /* @__PURE__ */ e("div", { className: "h-3.5 min-w-0 flex-1 animate-pulse rounded bg-secondary" }),
74
- /* @__PURE__ */ e(
75
- I,
70
+ children: (F) => {
71
+ const t = S ?? F.selectedItem, w = (t == null ? void 0 : t.icon) || T, f = !!t, N = !f && !!q;
72
+ return g && !f && !N ? /* @__PURE__ */ b(X, { children: [
73
+ /* @__PURE__ */ r("div", { className: "h-3.5 min-w-0 flex-1 animate-pulse rounded bg-secondary" }),
74
+ /* @__PURE__ */ r(
75
+ C,
76
76
  {
77
77
  "aria-hidden": "true",
78
78
  className: o(
@@ -81,100 +81,100 @@ const De = {
81
81
  )
82
82
  }
83
83
  )
84
- ] }) : /* @__PURE__ */ h(_, { children: [
85
- r != null && r.avatarUrl ? /* @__PURE__ */ e(
86
- we,
84
+ ] }) : /* @__PURE__ */ b(X, { children: [
85
+ t != null && t.avatarUrl ? /* @__PURE__ */ r(
86
+ ye,
87
87
  {
88
88
  size: "xs",
89
- src: r.avatarUrl,
90
- alt: r.label
89
+ src: t.avatarUrl,
90
+ alt: t.label
91
91
  }
92
- ) : Be(v) ? /* @__PURE__ */ e(v, { "data-icon": !0, "aria-hidden": "true" }) : pe(v) ? v : null,
93
- x && (f || w) ? /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center self-center", children: x }) : null,
94
- f && M ? /* @__PURE__ */ h("section", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
95
- /* @__PURE__ */ e(
92
+ ) : De(w) ? /* @__PURE__ */ r(w, { "data-icon": !0, "aria-hidden": "true" }) : he(w) ? w : null,
93
+ x && (f || N) ? /* @__PURE__ */ r("div", { className: "flex shrink-0 items-center self-center", children: x }) : null,
94
+ f && M ? /* @__PURE__ */ b("section", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
95
+ /* @__PURE__ */ r(
96
96
  "p",
97
97
  {
98
98
  className: o(
99
99
  "shrink-0 truncate font-medium text-primary",
100
- k[l],
101
- g
100
+ y[l],
101
+ v
102
102
  ),
103
- children: r == null ? void 0 : r.label
103
+ children: t == null ? void 0 : t.label
104
104
  }
105
105
  ),
106
- (r == null ? void 0 : r.supportingText) && /* @__PURE__ */ e(
106
+ (t == null ? void 0 : t.supportingText) && /* @__PURE__ */ r(
107
107
  "p",
108
108
  {
109
109
  className: o(
110
110
  "min-w-0 truncate text-tertiary",
111
- k[l]
111
+ y[l]
112
112
  ),
113
- children: r == null ? void 0 : r.supportingText
113
+ children: t == null ? void 0 : t.supportingText
114
114
  }
115
115
  )
116
- ] }) : f ? /* @__PURE__ */ h("section", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
117
- /* @__PURE__ */ e(
116
+ ] }) : f ? /* @__PURE__ */ b("section", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
117
+ /* @__PURE__ */ r(
118
118
  "p",
119
119
  {
120
120
  className: o(
121
121
  "truncate font-medium text-primary",
122
- k[l],
123
- g
122
+ y[l],
123
+ v
124
124
  ),
125
- children: r == null ? void 0 : r.label
125
+ children: t == null ? void 0 : t.label
126
126
  }
127
127
  ),
128
- (r == null ? void 0 : r.supportingText) && /* @__PURE__ */ e(
128
+ (t == null ? void 0 : t.supportingText) && /* @__PURE__ */ r(
129
129
  "p",
130
130
  {
131
131
  className: o(
132
132
  "truncate text-xs",
133
- (r == null ? void 0 : r.supportingTextClassName) ?? "text-[#818792]"
133
+ (t == null ? void 0 : t.supportingTextClassName) ?? "text-[#818792]"
134
134
  ),
135
- children: r == null ? void 0 : r.supportingText
135
+ children: t == null ? void 0 : t.supportingText
136
136
  }
137
137
  )
138
- ] }) : w ? /* @__PURE__ */ e("section", { className: "flex min-w-0 flex-1 gap-2 truncate", children: /* @__PURE__ */ e(
138
+ ] }) : N ? /* @__PURE__ */ r("section", { className: "flex min-w-0 flex-1 gap-2 truncate", children: /* @__PURE__ */ r(
139
139
  "p",
140
140
  {
141
141
  className: o(
142
142
  "truncate font-medium text-primary",
143
- k[l],
144
- g
143
+ y[l],
144
+ v
145
145
  ),
146
- children: T
146
+ children: q
147
147
  }
148
- ) }) : /* @__PURE__ */ e(
148
+ ) }) : /* @__PURE__ */ r(
149
149
  "p",
150
150
  {
151
151
  className: o(
152
152
  "min-w-0 flex-1 text-placeholder_subtle",
153
- k[l],
153
+ y[l],
154
154
  i && "text-disabled"
155
155
  ),
156
156
  children: V
157
157
  }
158
158
  ),
159
- d ? /* @__PURE__ */ e(ve.Provider, { value: null, children: /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center self-center", children: d }) }) : null,
160
- S ? /* @__PURE__ */ e(
159
+ d ? /* @__PURE__ */ r(ke.Provider, { value: null, children: /* @__PURE__ */ r("div", { className: "flex shrink-0 items-center self-center", children: d }) }) : null,
160
+ j ? /* @__PURE__ */ r(
161
161
  "button",
162
162
  {
163
163
  type: "button",
164
164
  tabIndex: -1,
165
165
  "aria-label": "Clear selection",
166
- onPointerDown: (N) => {
167
- N.stopPropagation();
166
+ onPointerDown: (k) => {
167
+ k.stopPropagation();
168
168
  },
169
- onClick: (N) => {
170
- N.preventDefault(), N.stopPropagation(), a == null || a();
169
+ onClick: (k) => {
170
+ k.preventDefault(), k.stopPropagation(), a == null || a();
171
171
  },
172
172
  className: "flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1 text-fg-quaternary outline-hidden transition hover:bg-primary_hover focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-ring",
173
- children: /* @__PURE__ */ e(me, { "aria-hidden": !0, className: Ue[l] })
173
+ children: /* @__PURE__ */ r(be, { "aria-hidden": !0, className: Le[l] })
174
174
  }
175
175
  ) : null,
176
- /* @__PURE__ */ e(
177
- I,
176
+ /* @__PURE__ */ r(
177
+ C,
178
178
  {
179
179
  "aria-hidden": "true",
180
180
  className: o(
@@ -189,192 +189,200 @@ const De = {
189
189
  )
190
190
  }
191
191
  );
192
- }, Ze = ({
192
+ }, Ce = ({
193
193
  placeholder: m = "Select",
194
- placeholderIcon: y,
194
+ placeholderIcon: P,
195
195
  size: i = "sm",
196
196
  items: u,
197
- label: b,
197
+ label: g,
198
198
  hint: l,
199
199
  tooltip: V,
200
- className: P,
201
- footer: g,
202
- textStyles: T,
200
+ className: T,
201
+ footer: v,
202
+ textStyles: q,
203
203
  popoverClassName: z,
204
204
  onSearchChange: a,
205
205
  onSelectionChange: s,
206
206
  isLoading: d = !1,
207
- isClearable: D = !1,
208
- openOnClear: q = !1,
207
+ isClearable: S = !1,
208
+ openOnClear: B = !1,
209
209
  isDeselectable: x = !1,
210
210
  searchPlaceholder: M = "Search...",
211
- selectedDisplayValue: S,
212
- renderItem: j,
213
- endAdornment: r,
214
- leadingAdornment: v,
211
+ selectedDisplayValue: j,
212
+ renderItem: F,
213
+ endAdornment: t,
214
+ leadingAdornment: w,
215
215
  inlineSupportingText: f = !1,
216
- shouldFilterItems: w = !0,
217
- filterItem: N,
218
- ...C
216
+ shouldFilterItems: N = !0,
217
+ filterItem: k,
218
+ ...ee
219
219
  }) => {
220
- const [A, W] = Y(""), [ee, re] = Y(!1), E = Z(!1), X = Z(null), {
221
- selectedKey: H,
222
- isOpen: G,
223
- onOpenChange: O,
224
- ...te
225
- } = C, c = H == null || String(H) === "" ? null : H, U = G !== void 0, F = q || U, ne = U ? G : F ? ee : void 0, le = R(
220
+ const [A, G] = W(""), [re, te] = W(!1), [ne, J] = W(0), H = $(!1), Q = $(null), {
221
+ selectedKey: _,
222
+ isOpen: O,
223
+ onOpenChange: U,
224
+ ...le
225
+ } = ee, c = _ == null || String(_) === "" ? null : _, h = O !== void 0, E = B || h, se = h ? O : E ? re : void 0, oe = D(
226
226
  (n) => {
227
- W(n), a == null || a(n);
227
+ G(n), a == null || a(n);
228
228
  },
229
229
  [a]
230
- ), J = N ?? Oe, B = $(() => {
231
- if (!w) return u;
230
+ ), Y = k ?? Ee, K = I(() => {
231
+ if (!N) return u;
232
232
  const n = A.trim();
233
- return n ? u.filter((t) => J(t, n)) : u;
234
- }, [J, A, u, w]), se = (n) => {
235
- var Q;
236
- if (n.key !== "ArrowDown" && n.key !== "ArrowUp" || n.nativeEvent.isComposing || !(n.target instanceof HTMLInputElement) || (n.preventDefault(), n.stopPropagation(), d || B.length === 0)) return;
237
- const t = (Q = X.current) == null ? void 0 : Q.querySelectorAll(
233
+ return n ? u.filter((e) => Y(e, n)) : u;
234
+ }, [Y, A, u, N]), ie = (n) => {
235
+ var Z;
236
+ if (n.key !== "ArrowDown" && n.key !== "ArrowUp" || n.nativeEvent.isComposing || !(n.target instanceof HTMLInputElement) || (n.preventDefault(), n.stopPropagation(), d || K.length === 0)) return;
237
+ const e = (Z = Q.current) == null ? void 0 : Z.querySelectorAll(
238
238
  '[role="option"]:not([aria-disabled="true"])'
239
- ), p = n.key === "ArrowDown" ? t == null ? void 0 : t[0] : t == null ? void 0 : t[t.length - 1];
239
+ ), p = n.key === "ArrowDown" ? e == null ? void 0 : e[0] : e == null ? void 0 : e[e.length - 1];
240
240
  p == null || p.focus({ preventScroll: !0 }), p == null || p.scrollIntoView({ block: "nearest" });
241
- }, K = R(
241
+ }, R = D(
242
242
  (n) => {
243
- !U && F && re(n), n || (W(""), a == null || a("")), O == null || O(n);
243
+ !h && E && te(n), n && !h && J((e) => e + 1), n || (G(""), a == null || a("")), U == null || U(n);
244
244
  },
245
- [U, F, O, a]
246
- ), oe = R(() => {
247
- s == null || s(null), q && K(!0);
248
- }, [q, s, K]), ie = R(() => {
249
- !x || c == null || (E.current = !0, s == null || s(null), K(!1), queueMicrotask(() => {
250
- E.current = !1;
245
+ [h, E, U, a]
246
+ );
247
+ xe(() => {
248
+ h && O && J((n) => n + 1);
249
+ }, [h, O]);
250
+ const ae = D(() => {
251
+ s == null || s(null), B && R(!0);
252
+ }, [B, s, R]), ce = D(() => {
253
+ !x || c == null || (H.current = !0, s == null || s(null), R(!1), queueMicrotask(() => {
254
+ H.current = !1;
251
255
  }));
252
- }, [K, x, s, c]), ae = R(
256
+ }, [R, x, s, c]), ue = D(
253
257
  (n) => {
254
- if (E.current) return;
255
- const t = n == null || String(n) === "" ? null : String(n), p = c == null || String(c) === "" ? null : String(c);
256
- t !== p && (s == null || s(t));
258
+ if (H.current) return;
259
+ const e = n == null || String(n) === "" ? null : String(n), p = c == null || String(c) === "" ? null : String(c);
260
+ e !== p && (s == null || s(e));
257
261
  },
258
262
  [s, c]
259
- ), ce = c != null || !!S, L = $(
263
+ ), de = c != null || !!j, L = I(
260
264
  () => c == null ? null : u.find((n) => String(n.id) === String(c)) ?? null,
261
265
  [u, c]
262
- ), ue = !f && !!(L != null && L.supportingText), de = [{ id: "none", label: "none" }], fe = B.length > 0 ? B : de;
263
- return /* @__PURE__ */ e(
264
- ye.Provider,
266
+ ), fe = !f && !!(L != null && L.supportingText), pe = [{ id: "none", label: "none" }], me = K.length > 0 ? K : pe;
267
+ return /* @__PURE__ */ r(
268
+ qe.Provider,
265
269
  {
266
270
  value: {
267
271
  size: i,
268
272
  isDeselectable: x,
269
273
  selectedKey: c,
270
- onReselectCurrent: x ? ie : void 0
274
+ onReselectCurrent: x ? ce : void 0
271
275
  },
272
- children: /* @__PURE__ */ e(
273
- xe,
276
+ children: /* @__PURE__ */ r(
277
+ ge,
274
278
  {
275
- ...te,
279
+ ...le,
276
280
  selectedKey: c,
277
- ...F ? { isOpen: ne } : {},
278
- onOpenChange: K,
279
- onSelectionChange: ae,
281
+ ...E ? { isOpen: se } : {},
282
+ onOpenChange: R,
283
+ onSelectionChange: ue,
280
284
  className: (n) => o(
281
285
  "flex flex-col gap-1.5",
282
- typeof P == "function" ? P(n) : P
286
+ typeof T == "function" ? T(n) : T
283
287
  ),
284
- children: (n) => /* @__PURE__ */ h(_, { children: [
285
- b && /* @__PURE__ */ e(
286
- qe,
288
+ children: (n) => /* @__PURE__ */ b(X, { children: [
289
+ g && /* @__PURE__ */ r(
290
+ Re,
287
291
  {
288
292
  isRequired: n.isRequired,
289
293
  tooltip: V,
290
- className: Se[i],
291
- children: b
294
+ className: Oe[i],
295
+ children: g
292
296
  }
293
297
  ),
294
- /* @__PURE__ */ e(
295
- Fe,
298
+ /* @__PURE__ */ r(
299
+ Ve,
296
300
  {
297
301
  ...n,
298
302
  size: i,
299
303
  isLoading: d,
300
304
  placeholder: m,
301
- placeholderIcon: y,
302
- textStyles: T,
303
- selectedDisplayValue: S,
304
- isClearable: D,
305
- hasSelection: ce,
306
- hasSupportingText: ue,
305
+ placeholderIcon: P,
306
+ textStyles: q,
307
+ selectedDisplayValue: j,
308
+ isClearable: S,
309
+ hasSelection: de,
310
+ hasSupportingText: fe,
307
311
  triggerSelectedItem: L,
308
- leadingAdornment: v,
312
+ leadingAdornment: w,
309
313
  inlineSupportingText: f,
310
- onClear: D && s ? oe : void 0,
311
- endAdornment: r
314
+ onClear: S && s ? ae : void 0,
315
+ endAdornment: t
312
316
  }
313
317
  ),
314
- /* @__PURE__ */ h(
315
- Ne,
318
+ /* @__PURE__ */ b(
319
+ Pe,
316
320
  {
317
321
  size: i,
318
322
  className: o("flex flex-col overflow-hidden", z),
319
323
  children: [
320
- /* @__PURE__ */ e(
324
+ /* @__PURE__ */ r(
321
325
  "div",
322
326
  {
323
327
  className: "z-10 shrink-0 border-b border-tertiary bg-primary p-1.5",
324
- onMouseDown: (t) => t.stopPropagation(),
325
- onPointerDown: (t) => t.stopPropagation(),
326
- onClick: (t) => t.stopPropagation(),
327
- onKeyDownCapture: se,
328
- children: /* @__PURE__ */ e(
329
- Re,
328
+ onMouseDown: (e) => e.stopPropagation(),
329
+ onPointerDown: (e) => e.stopPropagation(),
330
+ onClick: (e) => e.stopPropagation(),
331
+ onKeyDownCapture: ie,
332
+ children: /* @__PURE__ */ r(
333
+ je,
330
334
  {
331
335
  size: "sm",
332
336
  placeholder: M,
333
337
  value: A,
334
- onChange: (t) => le(t),
335
- onKeyDown: (t) => t.stopPropagation(),
338
+ onChange: (e) => oe(e),
339
+ onKeyDown: (e) => {
340
+ e.key !== "Escape" && e.stopPropagation();
341
+ },
336
342
  className: "w-full ring-0 outline-hidden bg-secondary rounded-lg",
337
343
  autoFocus: !0
338
- }
344
+ },
345
+ ne
339
346
  )
340
347
  }
341
348
  ),
342
- /* @__PURE__ */ h("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: [
343
- d && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ e(Ke, { size: "xs", type: "line-simple" }) }),
344
- !d && B.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ e("p", { className: o("text-tertiary", k[i]), children: "No results" }) }),
345
- /* @__PURE__ */ e(
346
- he,
349
+ /* @__PURE__ */ b("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: [
350
+ d && /* @__PURE__ */ r("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ r(Se, { size: "xs", type: "line-simple" }) }),
351
+ !d && K.length === 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ r("p", { className: o("text-tertiary", y[i]), children: "No results" }) }),
352
+ /* @__PURE__ */ r(
353
+ ve,
347
354
  {
348
- ref: X,
349
- items: fe,
355
+ ref: Q,
356
+ autoFocus: !1,
357
+ items: me,
350
358
  shouldFocusOnHover: !1,
351
359
  shouldFocusWrap: !0,
352
360
  className: o(
353
361
  "min-h-0 overflow-y-auto outline-hidden px-1",
354
- (d || B.length === 0) && "hidden"
362
+ (d || K.length === 0) && "hidden"
355
363
  ),
356
- children: (t) => j ? j(t) : /* @__PURE__ */ e(
357
- ke,
364
+ children: (e) => F ? F(e) : /* @__PURE__ */ r(
365
+ Te,
358
366
  {
359
- id: t.id,
360
- label: t.label,
361
- avatarUrl: t.avatarUrl,
362
- supportingText: t.supportingText,
363
- supportingTextClassName: t.supportingTextClassName,
364
- isDisabled: t.isDisabled,
365
- icon: t.icon,
366
- textStyles: T
367
+ id: e.id,
368
+ label: e.label,
369
+ avatarUrl: e.avatarUrl,
370
+ supportingText: e.supportingText,
371
+ supportingTextClassName: e.supportingTextClassName,
372
+ isDisabled: e.isDisabled,
373
+ icon: e.icon,
374
+ textStyles: q
367
375
  },
368
- t.id
376
+ e.id
369
377
  )
370
378
  }
371
379
  )
372
380
  ] }),
373
- g && /* @__PURE__ */ e("div", { className: "shrink-0 border-t border-tertiary bg-primary p-1.5", children: g })
381
+ v && /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-tertiary bg-primary p-1.5", children: v })
374
382
  ]
375
383
  }
376
384
  ),
377
- l && /* @__PURE__ */ e(Te, { isInvalid: n.isInvalid, children: l })
385
+ l && /* @__PURE__ */ r(Ke, { isInvalid: n.isInvalid, children: l })
378
386
  ] })
379
387
  }
380
388
  )
@@ -382,5 +390,5 @@ const De = {
382
390
  );
383
391
  };
384
392
  export {
385
- Ze as SearchableSelect
393
+ Ce as SearchableSelect
386
394
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pibit.ai/cure-design-system",
3
- "version": "0.6.29",
3
+ "version": "0.6.30",
4
4
  "description": "CURE Design System - React component library",
5
5
  "author": "Pibit",
6
6
  "license": "MIT",