@alfadocs/ui-kit 0.17.1 → 0.17.3
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.
- package/dist/_chunks/{accordion-DOmxGEWU.js → accordion-CNcodXuO.js} +6 -6
- package/dist/_chunks/{ai-prompt-input-DEiQwIMn.js → ai-prompt-input-B-w5Rx3V.js} +184 -181
- package/dist/_chunks/{alert-pgdXrEO5.js → alert-DBnawbmf.js} +64 -59
- package/dist/_chunks/{audio-recorder-CRh4uyFL.js → audio-recorder-DNkQLW1G.js} +3 -3
- package/dist/_chunks/{autocomplete-mOg7WLOh.js → autocomplete-BxfabhZ8.js} +167 -164
- package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js} +2 -2
- package/dist/_chunks/{chat-input-UK-bXU7u.js → chat-input-B3XmFGDw.js} +123 -122
- package/dist/_chunks/checkbox-group-Bwmt1ovQ.js +213 -0
- package/dist/_chunks/{checkbox-D5EHnB14.js → checkbox-mwbrPZDY.js} +75 -70
- package/dist/_chunks/{collapsible-CuxUBoHJ.js → collapsible-hHiyZp0b.js} +61 -63
- package/dist/_chunks/{color-picker-BPfcByHH.js → color-picker-Bm-gzpsh.js} +2 -2
- package/dist/_chunks/{combobox-D5tWe0t_.js → combobox-Da9eq00i.js} +214 -211
- package/dist/_chunks/{copy-field-BCHAZ8QV.js → copy-field-BAF4mt9h.js} +95 -132
- package/dist/_chunks/{date-picker-BlhtBhPo.js → date-picker-BIoSLRly.js} +222 -219
- package/dist/_chunks/{date-range-picker-C2hRu_Ke.js → date-range-picker-9gANFNG9.js} +81 -78
- package/dist/_chunks/{date-time-picker-B67mPZmP.js → date-time-picker-DG7BiGdb.js} +98 -95
- package/dist/_chunks/{dialog-DRp6Dejy.js → dialog-DUomPCRS.js} +69 -71
- package/dist/_chunks/{dropdown-menu-dyV7gHh_.js → dropdown-menu-DZxwF23X.js} +108 -110
- package/dist/_chunks/{freemium-paywall-BTEiVkes.js → freemium-paywall-DXc7XlGE.js} +98 -97
- package/dist/_chunks/{leo-sidebar-D3TuyH5_.js → leo-sidebar-DIsiTju3.js} +2 -2
- package/dist/_chunks/{list-DcjV0m5B.js → list-BdvDctBz.js} +184 -180
- package/dist/_chunks/{message-tray-Fsend-du.js → message-tray-BNAS8al4.js} +111 -111
- package/dist/_chunks/{multi-select-DooDzQIp.js → multi-select-CyspR5ZF.js} +157 -154
- package/dist/_chunks/{navigation-menu-DdufF-_4.js → navigation-menu-CyS1fBJ7.js} +85 -87
- package/dist/_chunks/{notification-tray-C3dYdLAF.js → notification-tray-D_69dXFY.js} +114 -114
- package/dist/_chunks/{number-input-DH00o0DN.js → number-input-BZXu6bPY.js} +92 -89
- package/dist/_chunks/{otp-input-BBXYvLx5.js → otp-input-BDF_iNpa.js} +92 -93
- package/dist/_chunks/{pagination-F1ei4khE.js → pagination-BWaXF7W0.js} +194 -211
- package/dist/_chunks/{patient-shell-BE0CdPOJ.js → patient-shell-BOOaWZA9.js} +3 -3
- package/dist/_chunks/{payment-form-CI77oIx1.js → payment-form-BjkuQeqR.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CnEJvmXC.js → pdf-viewer-BG_nsFT5.js} +2 -2
- package/dist/_chunks/{radio-group-Cz1a4QCA.js → radio-group-BHZOxrIK.js} +4 -4
- package/dist/_chunks/{select-Ca6ibiDL.js → select-C92AT_OZ.js} +7 -7
- package/dist/_chunks/{sidebar-D8Lq065m.js → sidebar-BqzlRBvC.js} +271 -291
- package/dist/_chunks/{slider-CkR6CLun.js → slider-CfEzeseL.js} +4 -4
- package/dist/_chunks/{tabs-CRCyPpJo.js → tabs-aEQfQV3x.js} +8 -8
- package/dist/_chunks/{theme-toggle-B3meAb3y.js → theme-toggle-BswYl0Yp.js} +2 -2
- package/dist/_chunks/use-controllable-state-BiY4xTzM.js +23 -0
- package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js +43 -0
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +24 -0
- package/dist/_chunks/{warning-stack-CeRihME9.js → warning-stack-CDH9TudY.js} +2 -2
- package/dist/_chunks/{workflow-map-D3MvrsZV.js → workflow-map-BeKe23uw.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/use-debounced-callback.d.ts +1 -5
- package/dist/components/_shared/use-direction.d.ts +1 -18
- package/dist/components/_shared/use-focus-trap.d.ts +1 -31
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +14 -14
- package/dist/components/list/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sidebar/index.js +8 -7
- package/dist/components/sidebar/sidebar.d.ts +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.js +98 -15
- package/dist/hooks/use-debounced-callback.d.ts +19 -0
- package/dist/hooks/use-debounced-value.d.ts +16 -0
- package/dist/hooks/use-direction.d.ts +19 -0
- package/dist/hooks/use-focus-trap.d.ts +32 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +13 -0
- package/dist/hooks/use-persistent-state.d.ts +16 -0
- package/dist/index.js +493 -492
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +4 -2
- package/dist/_chunks/checkbox-group-Qkm3Rg1S.js +0 -208
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { _ as
|
|
4
|
-
import * as
|
|
5
|
-
import { c as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { S as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { g as
|
|
11
|
-
import { I as
|
|
1
|
+
import { jsx as o, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as We, useId as Ye, useState as $, useRef as c, useCallback as D, useEffect as R, useMemo as L } from "react";
|
|
3
|
+
import { _ as f } from "./index-4xgbg-sn.js";
|
|
4
|
+
import * as T from "@radix-ui/react-popover";
|
|
5
|
+
import { c as A } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as Ze } from "react-i18next";
|
|
7
|
+
import { S as pe } from "./spinner-DirtWZNG.js";
|
|
8
|
+
import { u as et } from "./form-field-context-B3APVHKx.js";
|
|
9
|
+
import { u as tt } from "./use-controllable-state-BiY4xTzM.js";
|
|
10
|
+
import { g as st } from "./group-options-BvKhQ3xb.js";
|
|
11
|
+
import { I as nt, a as S, b as K, c as ot } from "./input-surface-xyERuLU_.js";
|
|
12
|
+
import { u as at } from "./use-debounced-callback-BisrB-Fq.js";
|
|
12
13
|
import { u as rt } from "./registry-C9nwlNyL.js";
|
|
13
14
|
const it = {
|
|
14
15
|
id: "autocomplete",
|
|
@@ -81,20 +82,20 @@ const it = {
|
|
|
81
82
|
description: "Each suggestion emits its value as data-option-id."
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
}, dt =
|
|
85
|
-
["ds:flex ds:w-full ds:items-center",
|
|
85
|
+
}, dt = A(
|
|
86
|
+
["ds:flex ds:w-full ds:items-center", ot].join(" "),
|
|
86
87
|
{
|
|
87
88
|
variants: {
|
|
88
89
|
size: {
|
|
89
|
-
sm: `${
|
|
90
|
-
md: `${
|
|
91
|
-
lg: `${
|
|
90
|
+
sm: `${S.sm} ${K.sm}`,
|
|
91
|
+
md: `${S.md} ${K.md}`,
|
|
92
|
+
lg: `${S.lg} ${K.lg}`
|
|
92
93
|
},
|
|
93
|
-
tone:
|
|
94
|
+
tone: nt
|
|
94
95
|
},
|
|
95
96
|
defaultVariants: { size: "md", tone: "default" }
|
|
96
97
|
}
|
|
97
|
-
), lt =
|
|
98
|
+
), lt = A(
|
|
98
99
|
[
|
|
99
100
|
"ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground",
|
|
100
101
|
"ds:placeholder:text-muted-foreground",
|
|
@@ -109,7 +110,7 @@ const it = {
|
|
|
109
110
|
},
|
|
110
111
|
defaultVariants: { hasStart: !1, hasEnd: !1 }
|
|
111
112
|
}
|
|
112
|
-
), ut =
|
|
113
|
+
), ut = A(
|
|
113
114
|
[
|
|
114
115
|
"ds:z-[var(--z-dropdown)] ds:overflow-hidden",
|
|
115
116
|
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-background",
|
|
@@ -120,7 +121,7 @@ const it = {
|
|
|
120
121
|
"ds:data-[state=closed]:zoom-out-95",
|
|
121
122
|
"ds:motion-reduce:animate-none"
|
|
122
123
|
].join(" ")
|
|
123
|
-
),
|
|
124
|
+
), me = A(
|
|
124
125
|
[
|
|
125
126
|
"ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
126
127
|
"ds:ps-3 ds:pe-3 ds:py-2 ds:text-[length:var(--font-size-sm)] ds:text-foreground",
|
|
@@ -129,111 +130,113 @@ const it = {
|
|
|
129
130
|
"ds:data-[selected=true]:bg-primary ds:data-[selected=true]:text-primary-foreground",
|
|
130
131
|
"ds:hover:bg-muted ds:data-[selected=true]:hover:bg-primary"
|
|
131
132
|
].join(" ")
|
|
132
|
-
),
|
|
133
|
+
), fe = [
|
|
133
134
|
"ds:[&_[cmdk-group-heading]]:ps-3",
|
|
134
135
|
"ds:[&_[cmdk-group-heading]]:pe-3",
|
|
135
136
|
"ds:[&_[cmdk-group-heading]]:py-1.5",
|
|
136
137
|
"ds:[&_[cmdk-group-heading]]:type-eyebrow",
|
|
137
138
|
"ds:[&_[cmdk-group-heading]]:text-muted-foreground"
|
|
138
|
-
].join(" "),
|
|
139
|
-
function
|
|
140
|
-
return `${s}-${l}-${
|
|
139
|
+
].join(" "), X = "ds:inline-flex ds:items-center ds:shrink-0 ds:text-muted-foreground ds:[&_svg]:size-4";
|
|
140
|
+
function J(s, l, F) {
|
|
141
|
+
return `${s}-${l}-${F}`;
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
+
function ge(s, l) {
|
|
143
144
|
return `${s}:${l}`;
|
|
144
145
|
}
|
|
145
|
-
const ct =
|
|
146
|
+
const ct = We(
|
|
146
147
|
function({
|
|
147
148
|
loadOptions: l,
|
|
148
|
-
debounceMs:
|
|
149
|
-
value:
|
|
150
|
-
defaultValue:
|
|
151
|
-
onChange:
|
|
149
|
+
debounceMs: F = 250,
|
|
150
|
+
value: he,
|
|
151
|
+
defaultValue: ve,
|
|
152
|
+
onChange: be,
|
|
152
153
|
onSelect: u,
|
|
153
154
|
recents: v,
|
|
154
|
-
onRecentSelect:
|
|
155
|
+
onRecentSelect: B,
|
|
155
156
|
snapOnBlur: ye = !1,
|
|
156
157
|
size: we = "md",
|
|
157
|
-
tone:
|
|
158
|
-
startAdornment:
|
|
159
|
-
endAdornment:
|
|
160
|
-
placeholder:
|
|
161
|
-
disabled:
|
|
158
|
+
tone: Ce = "default",
|
|
159
|
+
startAdornment: M,
|
|
160
|
+
endAdornment: P,
|
|
161
|
+
placeholder: W,
|
|
162
|
+
disabled: ke,
|
|
162
163
|
readOnly: b,
|
|
163
|
-
required:
|
|
164
|
+
required: xe,
|
|
164
165
|
name: Ve,
|
|
165
|
-
id:
|
|
166
|
-
className:
|
|
167
|
-
"aria-label":
|
|
168
|
-
},
|
|
169
|
-
const { t:
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
id: z,
|
|
167
|
+
className: Re,
|
|
168
|
+
"aria-label": Y
|
|
169
|
+
}, C) {
|
|
170
|
+
const { t: k, i18n: Ne } = Ze(), x = et(), Ie = Ye(), g = z ?? x.id ?? Ie, Z = `${g}-listbox`, Ee = `${g}-live`, h = !!(x.disabled || ke), _e = !!(x.required || xe), ee = x.invalid, $e = ee ? "error" : Ce ?? "default", De = x.describedBy || void 0, [Te, te] = tt({
|
|
171
|
+
value: he,
|
|
172
|
+
defaultValue: ve ?? "",
|
|
173
|
+
onChange: be
|
|
174
|
+
}), r = Te ?? "", [i, d] = $(!1), [y, se] = $([]), [V, j] = $(!1), [p, Ae] = $(""), N = c(!1), U = c(null), q = c(r), ne = c(/* @__PURE__ */ new Map()), oe = c(/* @__PURE__ */ new Map()), H = c(null), O = c(null), Fe = D(
|
|
172
175
|
(e) => {
|
|
173
|
-
|
|
176
|
+
H.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
|
|
174
177
|
},
|
|
175
|
-
[
|
|
176
|
-
),
|
|
177
|
-
|
|
178
|
+
[C]
|
|
179
|
+
), ae = Ne.language;
|
|
180
|
+
R(() => {
|
|
178
181
|
const e = /* @__PURE__ */ new Map();
|
|
179
182
|
for (const t of y) e.set(t.value, t);
|
|
180
|
-
|
|
181
|
-
}, [y]),
|
|
183
|
+
ne.current = e;
|
|
184
|
+
}, [y]), R(() => {
|
|
182
185
|
const e = /* @__PURE__ */ new Map();
|
|
183
186
|
if (v) for (const t of v) e.set(t.value, t);
|
|
184
|
-
|
|
187
|
+
oe.current = e;
|
|
185
188
|
}, [v]);
|
|
186
|
-
const
|
|
189
|
+
const Be = D(
|
|
187
190
|
(e) => {
|
|
188
191
|
var n;
|
|
189
|
-
if (h || b ||
|
|
190
|
-
(n =
|
|
192
|
+
if (h || b || N.current) return;
|
|
193
|
+
(n = U.current) == null || n.abort();
|
|
191
194
|
const t = new AbortController();
|
|
192
|
-
|
|
193
|
-
t.signal.aborted ||
|
|
195
|
+
U.current = t, q.current = e, j(!0), l(e, { signal: t.signal, locale: ae }).then((a) => {
|
|
196
|
+
t.signal.aborted || q.current === e && (se(a), j(!1));
|
|
194
197
|
}).catch((a) => {
|
|
195
|
-
t.signal.aborted || a && typeof a == "object" && "name" in a && a.name === "AbortError" ||
|
|
198
|
+
t.signal.aborted || a && typeof a == "object" && "name" in a && a.name === "AbortError" || q.current === e && (se([]), j(!1));
|
|
196
199
|
});
|
|
197
200
|
},
|
|
198
|
-
[h, b, l,
|
|
199
|
-
), w =
|
|
200
|
-
|
|
201
|
+
[h, b, l, ae]
|
|
202
|
+
), w = at(Be, F);
|
|
203
|
+
R(() => () => {
|
|
201
204
|
var e;
|
|
202
|
-
w.cancel(), (e =
|
|
205
|
+
w.cancel(), (e = U.current) == null || e.abort();
|
|
203
206
|
}, [w]);
|
|
204
|
-
const
|
|
207
|
+
const m = D(
|
|
205
208
|
(e) => {
|
|
206
|
-
|
|
209
|
+
te(e);
|
|
207
210
|
},
|
|
208
|
-
[
|
|
209
|
-
),
|
|
211
|
+
[te]
|
|
212
|
+
), re = D(
|
|
210
213
|
(e) => {
|
|
211
214
|
const [t, n] = e.split(":");
|
|
212
215
|
if (!n || t !== "recent" && t !== "option") return null;
|
|
213
|
-
const
|
|
214
|
-
return
|
|
216
|
+
const ce = (t === "recent" ? oe.current : ne.current).get(n);
|
|
217
|
+
return ce ? { kind: t, option: ce } : null;
|
|
215
218
|
},
|
|
216
219
|
[]
|
|
217
|
-
),
|
|
218
|
-
|
|
220
|
+
), Me = (e) => {
|
|
221
|
+
m(e), !(h || b) && (i || d(!0), !N.current && w(e));
|
|
222
|
+
}, Pe = (e) => {
|
|
223
|
+
N.current = !0;
|
|
219
224
|
}, ze = (e) => {
|
|
220
|
-
|
|
221
|
-
}, je = (e) => {
|
|
222
|
-
E.current = !1;
|
|
225
|
+
N.current = !1;
|
|
223
226
|
const t = e.currentTarget.value;
|
|
224
227
|
w(t);
|
|
225
|
-
},
|
|
228
|
+
}, je = (e) => {
|
|
226
229
|
h || b || (d(!0), r && w(r));
|
|
227
|
-
},
|
|
230
|
+
}, Ue = (e) => {
|
|
228
231
|
const t = e.relatedTarget;
|
|
229
|
-
if (!(t &&
|
|
232
|
+
if (!(t && O.current && O.current.contains(t))) {
|
|
230
233
|
if (ye && p) {
|
|
231
|
-
const n =
|
|
232
|
-
n && (
|
|
234
|
+
const n = re(p);
|
|
235
|
+
n && (m(n.option.label), u == null || u(n.option));
|
|
233
236
|
}
|
|
234
237
|
d(!1);
|
|
235
238
|
}
|
|
236
|
-
},
|
|
239
|
+
}, qe = (e) => {
|
|
237
240
|
if (!e.nativeEvent.isComposing) {
|
|
238
241
|
if (e.key === "Escape") {
|
|
239
242
|
i && (e.preventDefault(), e.stopPropagation(), d(!1));
|
|
@@ -244,48 +247,48 @@ const ct = Ye(
|
|
|
244
247
|
return;
|
|
245
248
|
}
|
|
246
249
|
if (e.key === "Tab" && i && p) {
|
|
247
|
-
const t =
|
|
248
|
-
t && (
|
|
250
|
+
const t = re(p);
|
|
251
|
+
t && (m(t.option.label), u == null || u(t.option), d(!1));
|
|
249
252
|
}
|
|
250
253
|
}
|
|
251
|
-
},
|
|
254
|
+
}, ie = (e, t) => {
|
|
252
255
|
var n;
|
|
253
|
-
|
|
254
|
-
},
|
|
256
|
+
m(t.label), e === "recent" ? B == null || B(t) : u == null || u(t), d(!1), (n = H.current) == null || n.focus();
|
|
257
|
+
}, Q = (e) => {
|
|
255
258
|
e.preventDefault();
|
|
256
|
-
},
|
|
257
|
-
() =>
|
|
259
|
+
}, I = !!(v && v.length > 0) && r.length === 0, He = L(
|
|
260
|
+
() => st(y),
|
|
258
261
|
[y]
|
|
259
|
-
),
|
|
262
|
+
), Oe = !!M, Qe = !!P || V, Ge = dt({
|
|
260
263
|
size: we,
|
|
261
264
|
tone: $e,
|
|
262
|
-
className:
|
|
263
|
-
}),
|
|
265
|
+
className: Re
|
|
266
|
+
}), Le = L(() => {
|
|
264
267
|
if (!p) return;
|
|
265
268
|
const [e, t] = p.split(":");
|
|
266
269
|
if (!(!t || e !== "recent" && e !== "option"))
|
|
267
|
-
return
|
|
268
|
-
}, [p, g]),
|
|
269
|
-
|
|
270
|
-
|
|
270
|
+
return J(g, e, t);
|
|
271
|
+
}, [p, g]), E = y.length > 0, de = !I && !E && !V && r.length > 0, le = V && !E, Se = I || E || de || le, G = c(r);
|
|
272
|
+
R(() => {
|
|
273
|
+
G.current = r;
|
|
271
274
|
}, [r]);
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
275
|
+
const ue = c(i);
|
|
276
|
+
R(() => {
|
|
277
|
+
ue.current = i;
|
|
275
278
|
}, [i]);
|
|
276
|
-
const
|
|
279
|
+
const Ke = L(
|
|
277
280
|
() => ({
|
|
278
|
-
getValue: () =>
|
|
279
|
-
getQuery: () =>
|
|
280
|
-
getIsOpen: () =>
|
|
281
|
+
getValue: () => G.current || null,
|
|
282
|
+
getQuery: () => G.current,
|
|
283
|
+
getIsOpen: () => ue.current,
|
|
281
284
|
setValue: (e) => {
|
|
282
|
-
|
|
285
|
+
m(e ?? "");
|
|
283
286
|
},
|
|
284
287
|
setQuery: (e) => {
|
|
285
|
-
|
|
288
|
+
m(e);
|
|
286
289
|
},
|
|
287
290
|
clear: () => {
|
|
288
|
-
|
|
291
|
+
m("");
|
|
289
292
|
},
|
|
290
293
|
open: () => {
|
|
291
294
|
d(!0);
|
|
@@ -294,65 +297,65 @@ const ct = Ye(
|
|
|
294
297
|
d(!1);
|
|
295
298
|
}
|
|
296
299
|
}),
|
|
297
|
-
[
|
|
300
|
+
[m]
|
|
298
301
|
);
|
|
299
|
-
rt(it,
|
|
300
|
-
const
|
|
301
|
-
count:
|
|
302
|
+
rt(it, Ke, z);
|
|
303
|
+
const Xe = y.length, Je = V ? k("common.loading", "Loading…") : i && r.length > 0 ? k("inputs.autocomplete.results", {
|
|
304
|
+
count: Xe,
|
|
302
305
|
defaultValue: "{{count}} results"
|
|
303
306
|
}) : "";
|
|
304
307
|
return /* @__PURE__ */ o(
|
|
305
|
-
|
|
308
|
+
f,
|
|
306
309
|
{
|
|
307
310
|
shouldFilter: !1,
|
|
308
311
|
value: p,
|
|
309
|
-
onValueChange:
|
|
310
|
-
label:
|
|
312
|
+
onValueChange: Ae,
|
|
313
|
+
label: Y ?? W,
|
|
311
314
|
className: "ds:w-full",
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
-
|
|
315
|
+
children: /* @__PURE__ */ _(
|
|
316
|
+
T.Root,
|
|
314
317
|
{
|
|
315
318
|
open: i && !h && !b && Se,
|
|
316
319
|
children: [
|
|
317
|
-
/* @__PURE__ */ o(
|
|
320
|
+
/* @__PURE__ */ o(T.Anchor, { asChild: !0, children: /* @__PURE__ */ _(
|
|
318
321
|
"div",
|
|
319
322
|
{
|
|
320
|
-
className:
|
|
323
|
+
className: Ge,
|
|
321
324
|
"data-component": "autocomplete",
|
|
322
|
-
"data-component-id":
|
|
325
|
+
"data-component-id": z,
|
|
323
326
|
"data-disabled": h || void 0,
|
|
324
327
|
children: [
|
|
325
|
-
|
|
328
|
+
M ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${X} ds:ps-3`, children: M }) : null,
|
|
326
329
|
/* @__PURE__ */ o(
|
|
327
|
-
|
|
330
|
+
f.Input,
|
|
328
331
|
{
|
|
329
|
-
ref:
|
|
332
|
+
ref: Fe,
|
|
330
333
|
id: g,
|
|
331
334
|
name: Ve,
|
|
332
|
-
placeholder:
|
|
335
|
+
placeholder: W,
|
|
333
336
|
value: r,
|
|
334
|
-
onValueChange:
|
|
335
|
-
onFocus:
|
|
336
|
-
onBlur:
|
|
337
|
-
onKeyDown:
|
|
338
|
-
onCompositionStart:
|
|
339
|
-
onCompositionEnd:
|
|
337
|
+
onValueChange: Me,
|
|
338
|
+
onFocus: je,
|
|
339
|
+
onBlur: Ue,
|
|
340
|
+
onKeyDown: qe,
|
|
341
|
+
onCompositionStart: Pe,
|
|
342
|
+
onCompositionEnd: ze,
|
|
340
343
|
disabled: h,
|
|
341
344
|
readOnly: b,
|
|
342
345
|
required: _e,
|
|
343
346
|
role: "combobox",
|
|
344
347
|
"aria-autocomplete": "both",
|
|
345
348
|
"aria-expanded": i,
|
|
346
|
-
"aria-controls": i ?
|
|
347
|
-
"aria-activedescendant":
|
|
349
|
+
"aria-controls": i ? Z : void 0,
|
|
350
|
+
"aria-activedescendant": Le,
|
|
348
351
|
"aria-describedby": De,
|
|
349
|
-
"aria-invalid":
|
|
350
|
-
"aria-label":
|
|
352
|
+
"aria-invalid": ee || void 0,
|
|
353
|
+
"aria-label": Y,
|
|
351
354
|
autoComplete: "off",
|
|
352
|
-
className: lt({ hasStart:
|
|
355
|
+
className: lt({ hasStart: Oe, hasEnd: Qe })
|
|
353
356
|
}
|
|
354
357
|
),
|
|
355
|
-
V ? /* @__PURE__ */ o("span", { className: `${
|
|
358
|
+
V ? /* @__PURE__ */ o("span", { className: `${X} ds:pe-3`, "aria-hidden": "true", children: /* @__PURE__ */ o(pe, { size: "sm" }) }) : P ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${X} ds:pe-3`, children: P }) : null,
|
|
356
359
|
/* @__PURE__ */ o(
|
|
357
360
|
"span",
|
|
358
361
|
{
|
|
@@ -361,16 +364,16 @@ const ct = Ye(
|
|
|
361
364
|
"aria-live": "polite",
|
|
362
365
|
"aria-atomic": "true",
|
|
363
366
|
className: "ds:sr-only",
|
|
364
|
-
children:
|
|
367
|
+
children: Je
|
|
365
368
|
}
|
|
366
369
|
)
|
|
367
370
|
]
|
|
368
371
|
}
|
|
369
372
|
) }),
|
|
370
|
-
/* @__PURE__ */ o(
|
|
371
|
-
|
|
373
|
+
/* @__PURE__ */ o(T.Portal, { forceMount: !0, children: /* @__PURE__ */ o(
|
|
374
|
+
T.Content,
|
|
372
375
|
{
|
|
373
|
-
ref:
|
|
376
|
+
ref: O,
|
|
374
377
|
forceMount: !0,
|
|
375
378
|
hidden: !i,
|
|
376
379
|
side: "bottom",
|
|
@@ -381,69 +384,69 @@ const ct = Ye(
|
|
|
381
384
|
onPointerDownOutside: (e) => {
|
|
382
385
|
var n;
|
|
383
386
|
const t = e.target;
|
|
384
|
-
if (t && ((n =
|
|
387
|
+
if (t && ((n = H.current) != null && n.contains(t))) {
|
|
385
388
|
e.preventDefault();
|
|
386
389
|
return;
|
|
387
390
|
}
|
|
388
391
|
d(!1);
|
|
389
392
|
},
|
|
390
393
|
onEscapeKeyDown: () => d(!1),
|
|
391
|
-
onMouseDown:
|
|
394
|
+
onMouseDown: Q,
|
|
392
395
|
className: ut(),
|
|
393
|
-
children: /* @__PURE__ */
|
|
394
|
-
|
|
396
|
+
children: /* @__PURE__ */ _(
|
|
397
|
+
f.List,
|
|
395
398
|
{
|
|
396
|
-
id:
|
|
399
|
+
id: Z,
|
|
397
400
|
className: "ds:max-h-[min(24rem,var(--radix-popover-content-available-height))] ds:overflow-auto ds:p-1",
|
|
398
401
|
children: [
|
|
399
|
-
|
|
400
|
-
|
|
402
|
+
I ? /* @__PURE__ */ o(
|
|
403
|
+
f.Group,
|
|
401
404
|
{
|
|
402
|
-
heading:
|
|
403
|
-
className:
|
|
405
|
+
heading: k("inputs.autocomplete.recent", "Recent"),
|
|
406
|
+
className: fe,
|
|
404
407
|
children: (v ?? []).map((e) => /* @__PURE__ */ o(
|
|
405
|
-
|
|
408
|
+
f.Item,
|
|
406
409
|
{
|
|
407
|
-
id:
|
|
408
|
-
value:
|
|
410
|
+
id: J(g, "recent", e.value),
|
|
411
|
+
value: ge("recent", e.value),
|
|
409
412
|
disabled: e.disabled,
|
|
410
|
-
onSelect: () =>
|
|
411
|
-
onMouseDown:
|
|
412
|
-
className:
|
|
413
|
+
onSelect: () => ie("recent", e),
|
|
414
|
+
onMouseDown: Q,
|
|
415
|
+
className: me(),
|
|
413
416
|
children: e.label
|
|
414
417
|
},
|
|
415
418
|
`recent-${e.value}`
|
|
416
419
|
))
|
|
417
420
|
}
|
|
418
421
|
) : null,
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
/* @__PURE__ */ o(
|
|
422
|
-
/* @__PURE__ */ o("span", { children:
|
|
422
|
+
de ? /* @__PURE__ */ o("div", { className: "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: k("inputs.autocomplete.noResults", "No results") }) : null,
|
|
423
|
+
le ? /* @__PURE__ */ _("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: [
|
|
424
|
+
/* @__PURE__ */ o(pe, { size: "sm" }),
|
|
425
|
+
/* @__PURE__ */ o("span", { children: k("common.loading", "Loading…") })
|
|
423
426
|
] }) : null,
|
|
424
|
-
!
|
|
427
|
+
!I && E ? He.map((e, t) => {
|
|
425
428
|
const n = e.items.map((a) => /* @__PURE__ */ o(
|
|
426
|
-
|
|
429
|
+
f.Item,
|
|
427
430
|
{
|
|
428
|
-
id:
|
|
429
|
-
value:
|
|
431
|
+
id: J(g, "option", a.value),
|
|
432
|
+
value: ge("option", a.value),
|
|
430
433
|
disabled: a.disabled,
|
|
431
|
-
onSelect: () =>
|
|
432
|
-
onMouseDown:
|
|
433
|
-
className:
|
|
434
|
+
onSelect: () => ie("option", a),
|
|
435
|
+
onMouseDown: Q,
|
|
436
|
+
className: me(),
|
|
434
437
|
children: a.label
|
|
435
438
|
},
|
|
436
439
|
`option-${a.value}`
|
|
437
440
|
));
|
|
438
441
|
return e.group ? /* @__PURE__ */ o(
|
|
439
|
-
|
|
442
|
+
f.Group,
|
|
440
443
|
{
|
|
441
444
|
heading: e.group,
|
|
442
|
-
className:
|
|
445
|
+
className: fe,
|
|
443
446
|
children: n
|
|
444
447
|
},
|
|
445
448
|
`group-${e.group}`
|
|
446
|
-
) : /* @__PURE__ */ o(
|
|
449
|
+
) : /* @__PURE__ */ o(f.Group, { children: n }, `group-${t}`);
|
|
447
450
|
}) : null
|
|
448
451
|
]
|
|
449
452
|
}
|
|
@@ -463,4 +466,4 @@ export {
|
|
|
463
466
|
it as a,
|
|
464
467
|
dt as b
|
|
465
468
|
};
|
|
466
|
-
//# sourceMappingURL=autocomplete-
|
|
469
|
+
//# sourceMappingURL=autocomplete-BxfabhZ8.js.map
|
package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js}
RENAMED
|
@@ -9,7 +9,7 @@ import { ModuleRegistry as qe, AllCommunityModule as We } from "ag-grid-communit
|
|
|
9
9
|
import { B as Ue } from "./button-DD_0Xdmr.js";
|
|
10
10
|
import { I as P } from "./icon-button-C4CGcYuz.js";
|
|
11
11
|
import { P as E } from "./popover--derJ_wq.js";
|
|
12
|
-
import { C as Je } from "./checkbox-
|
|
12
|
+
import { C as Je } from "./checkbox-mwbrPZDY.js";
|
|
13
13
|
import { c as te } from "./createLucideIcon-CrFbzy84.js";
|
|
14
14
|
import { P as Ze } from "./printer-CeVEWfQq.js";
|
|
15
15
|
import { F as Xe } from "./file-text-DSNuv2B8.js";
|
|
@@ -1012,4 +1012,4 @@ export {
|
|
|
1012
1012
|
mt as f,
|
|
1013
1013
|
aa as u
|
|
1014
1014
|
};
|
|
1015
|
-
//# sourceMappingURL=balance-cell-renderer-
|
|
1015
|
+
//# sourceMappingURL=balance-cell-renderer-DJB6WDPe.js.map
|