@alfadocs/ui-kit 0.12.0 → 0.13.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.
- package/dist/_chunks/{ai-prompt-input-noh-N3cf.js → ai-prompt-input-DEiQwIMn.js} +21 -20
- package/dist/_chunks/{audio-recorder-BHBonrFf.js → audio-recorder-CRh4uyFL.js} +2 -2
- package/dist/_chunks/{autocomplete-C34hbfKh.js → autocomplete-mOg7WLOh.js} +2 -2
- package/dist/_chunks/{chat-input-Bov-gkwP.js → chat-input-UK-bXU7u.js} +9 -8
- package/dist/_chunks/{combobox-BHhnR3qm.js → combobox-D5tWe0t_.js} +2 -2
- package/dist/_chunks/{date-picker-BD5FYW08.js → date-picker-BlhtBhPo.js} +2 -2
- package/dist/_chunks/{date-range-picker-BZLVgcXE.js → date-range-picker-C2hRu_Ke.js} +2 -2
- package/dist/_chunks/{date-time-picker-CCoRWX7R.js → date-time-picker-B67mPZmP.js} +2 -2
- package/dist/_chunks/{input-surface-u4QB0lxe.js → input-surface-xyERuLU_.js} +9 -3
- package/dist/_chunks/{leo-sidebar-B054wsZm.js → leo-sidebar-D3TuyH5_.js} +2 -2
- package/dist/_chunks/{multi-select-Bh-xR8kP.js → multi-select-DooDzQIp.js} +2 -2
- package/dist/_chunks/{number-input-mpSLk-ld.js → number-input-DH00o0DN.js} +28 -27
- package/dist/_chunks/{otp-input-CI-Zv5q6.js → otp-input-BBXYvLx5.js} +49 -48
- package/dist/_chunks/{phone-input-DtBVs5fz.js → phone-input-DKSHX7NQ.js} +23 -22
- package/dist/_chunks/{react-day-picker-C04L_28V.js → react-day-picker-C5F3-TTX.js} +6 -3
- package/dist/_chunks/{search-bar-DmZZ9UvV.js → search-bar-DORSAzNt.js} +2 -2
- package/dist/_chunks/{search-input-BBtSRH-Q.js → search-input-BtEJAJHa.js} +2 -2
- package/dist/_chunks/{select-i9MwQeQy.js → select-Ca6ibiDL.js} +13 -12
- package/dist/_chunks/{tabs-Cg794H0Q.js → tabs-CRCyPpJo.js} +2 -2
- package/dist/_chunks/{text-area-DHtcpcLv.js → text-area-D5GAe8pV.js} +26 -25
- package/dist/_chunks/{text-input-1oqFRbVI.js → text-input-CakysYnD.js} +26 -25
- package/dist/_chunks/{transcript-panel-BpJqPr7I.js → transcript-panel-DUrjx5sa.js} +2 -2
- package/dist/_chunks/{use-password-requirements-DbPZMfV9.js → use-password-requirements-BOgFsoIe.js} +2 -2
- package/dist/agent-catalog.json +1 -1
- package/dist/components/ai-prompt-input/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/combobox/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/multi-select/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/password-input/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/index.js +21 -21
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as ee, jsx as M } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as te, useId as
|
|
2
|
+
import { forwardRef as te, useId as se, useState as L, useRef as R, useEffect as re, useCallback as N, useMemo as oe } from "react";
|
|
3
3
|
import { c as O } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as ae } from "react-i18next";
|
|
5
5
|
import { u as ie } from "./form-field-context-B3APVHKx.js";
|
|
@@ -64,8 +64,9 @@ const ce = {
|
|
|
64
64
|
[
|
|
65
65
|
"ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
|
|
66
66
|
"ds:rounded-[var(--radius-sm)]",
|
|
67
|
-
"ds:border ds:bg-
|
|
68
|
-
"ds:
|
|
67
|
+
"ds:border ds:bg-input ds:text-foreground ds:text-center ds:font-medium ds:text-[length:var(--font-size-lg)]",
|
|
68
|
+
"ds:shadow-[var(--shadow-input)]",
|
|
69
|
+
"ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
69
70
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
70
71
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
71
72
|
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
|
|
@@ -105,69 +106,69 @@ const pe = te(
|
|
|
105
106
|
id: K,
|
|
106
107
|
className: j
|
|
107
108
|
}, z) => {
|
|
108
|
-
const { t: H } = ae(), v = ie(), _ =
|
|
109
|
+
const { t: H } = ae(), v = ie(), _ = se(), P = y ? _ : void 0, w = o !== void 0, [q, W] = L(
|
|
109
110
|
() => g(m ?? "", e)
|
|
110
111
|
), p = g(
|
|
111
|
-
|
|
112
|
+
w ? o : q,
|
|
112
113
|
e
|
|
113
|
-
), G = de(p, e),
|
|
114
|
+
), G = de(p, e), I = v.disabled || !!S, B = v.invalid || !!$, J = B ? "error" : "default", C = R([]), h = R(p.length === e), d = R(p);
|
|
114
115
|
d.current = p;
|
|
115
116
|
const Q = () => {
|
|
116
|
-
const
|
|
117
|
-
return
|
|
118
|
-
}, [f,
|
|
119
|
-
|
|
120
|
-
f >= e &&
|
|
117
|
+
const s = p.length;
|
|
118
|
+
return s >= e ? e - 1 : s;
|
|
119
|
+
}, [f, k] = L(Q);
|
|
120
|
+
re(() => {
|
|
121
|
+
f >= e && k(e - 1);
|
|
121
122
|
}, [f, e]);
|
|
122
123
|
const c = N(
|
|
123
|
-
(
|
|
124
|
-
const t = Math.max(0, Math.min(e - 1,
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
124
|
+
(s) => {
|
|
125
|
+
const t = Math.max(0, Math.min(e - 1, s));
|
|
126
|
+
k(t);
|
|
127
|
+
const r = C.current[t];
|
|
128
|
+
r && (r.focus(), r.select());
|
|
128
129
|
},
|
|
129
130
|
[e]
|
|
130
131
|
), u = N(
|
|
131
|
-
(
|
|
132
|
-
const t = g(
|
|
133
|
-
|
|
132
|
+
(s) => {
|
|
133
|
+
const t = g(s, e);
|
|
134
|
+
w || W(t), d.current = t, l == null || l(t), t.length === e ? h.current || (h.current = !0, n == null || n(t)) : h.current = !1;
|
|
134
135
|
},
|
|
135
|
-
[
|
|
136
|
-
), U = (
|
|
137
|
-
const
|
|
136
|
+
[w, e, l, n]
|
|
137
|
+
), U = (s) => (t) => {
|
|
138
|
+
const r = t.target.value, a = F(r).replace(/\D/g, ""), i = d.current;
|
|
138
139
|
if (a.length === 0) {
|
|
139
|
-
if (
|
|
140
|
-
const A = i.slice(0,
|
|
140
|
+
if (r === "" && s < i.length) {
|
|
141
|
+
const A = i.slice(0, s) + i.slice(s + 1);
|
|
141
142
|
u(A);
|
|
142
143
|
}
|
|
143
144
|
return;
|
|
144
145
|
}
|
|
145
|
-
const b = i.slice(0,
|
|
146
|
+
const b = i.slice(0, s), V = i.slice(s + a.length), D = (b + a + V).slice(0, e);
|
|
146
147
|
u(D);
|
|
147
|
-
const T = Math.min(
|
|
148
|
+
const T = Math.min(s + a.length, e - 1);
|
|
148
149
|
c(T);
|
|
149
|
-
}, X = (
|
|
150
|
-
const
|
|
150
|
+
}, X = (s) => (t) => {
|
|
151
|
+
const r = d.current;
|
|
151
152
|
if (t.key === "Backspace") {
|
|
152
|
-
if (s
|
|
153
|
+
if (r[s]) {
|
|
153
154
|
t.preventDefault();
|
|
154
|
-
const a =
|
|
155
|
+
const a = r.slice(0, s) + r.slice(s + 1);
|
|
155
156
|
u(a);
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
158
|
-
if (
|
|
159
|
+
if (s > 0) {
|
|
159
160
|
t.preventDefault();
|
|
160
|
-
const a =
|
|
161
|
-
u(a), c(
|
|
161
|
+
const a = r.slice(0, s - 1) + r.slice(s);
|
|
162
|
+
u(a), c(s - 1);
|
|
162
163
|
}
|
|
163
164
|
return;
|
|
164
165
|
}
|
|
165
166
|
if (t.key === "ArrowLeft") {
|
|
166
|
-
t.preventDefault(),
|
|
167
|
+
t.preventDefault(), s > 0 && c(s - 1);
|
|
167
168
|
return;
|
|
168
169
|
}
|
|
169
170
|
if (t.key === "ArrowRight") {
|
|
170
|
-
t.preventDefault(),
|
|
171
|
+
t.preventDefault(), s < e - 1 && c(s + 1);
|
|
171
172
|
return;
|
|
172
173
|
}
|
|
173
174
|
if (t.key === "Home") {
|
|
@@ -175,20 +176,20 @@ const pe = te(
|
|
|
175
176
|
return;
|
|
176
177
|
}
|
|
177
178
|
t.key === "End" && (t.preventDefault(), c(e - 1));
|
|
178
|
-
}, Y = (
|
|
179
|
+
}, Y = (s) => (t) => {
|
|
179
180
|
const a = t.clipboardData.getData("text").replace(/\s+/g, ""), i = F(a);
|
|
180
181
|
if (!/^[0-9]+$/.test(i)) return;
|
|
181
182
|
t.preventDefault();
|
|
182
|
-
const b = d.current,
|
|
183
|
+
const b = d.current, V = b.slice(0, s), D = b.slice(s + i.length), T = (V + i + D).slice(0, e);
|
|
183
184
|
u(T);
|
|
184
|
-
const A = Math.min(
|
|
185
|
+
const A = Math.min(s + i.length, e - 1);
|
|
185
186
|
c(A);
|
|
186
|
-
}, Z = (
|
|
187
|
-
|
|
187
|
+
}, Z = (s) => (t) => {
|
|
188
|
+
k(s), t.currentTarget.select();
|
|
188
189
|
}, E = v.id, x = oe(
|
|
189
190
|
() => ({
|
|
190
191
|
getValue: () => d.current,
|
|
191
|
-
setValue: (
|
|
192
|
+
setValue: (s) => u(s),
|
|
192
193
|
clear: () => u(""),
|
|
193
194
|
focus: () => c(f),
|
|
194
195
|
isComplete: () => d.current.length === e
|
|
@@ -214,12 +215,12 @@ const pe = te(
|
|
|
214
215
|
"aria-labelledby": P,
|
|
215
216
|
"aria-invalid": B || void 0,
|
|
216
217
|
"aria-describedby": v.describedBy || void 0,
|
|
217
|
-
"aria-disabled":
|
|
218
|
+
"aria-disabled": I || void 0,
|
|
218
219
|
"data-component": "otp-input",
|
|
219
220
|
"data-component-id": K,
|
|
220
221
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
221
|
-
children: G.map((
|
|
222
|
-
const
|
|
222
|
+
children: G.map((s, t) => {
|
|
223
|
+
const r = !I && t === f;
|
|
223
224
|
return /* @__PURE__ */ M(
|
|
224
225
|
"input",
|
|
225
226
|
{
|
|
@@ -232,9 +233,9 @@ const pe = te(
|
|
|
232
233
|
pattern: "[0-9]*",
|
|
233
234
|
autoComplete: t === 0 ? "one-time-code" : "off",
|
|
234
235
|
maxLength: 1,
|
|
235
|
-
value:
|
|
236
|
-
disabled:
|
|
237
|
-
tabIndex:
|
|
236
|
+
value: s,
|
|
237
|
+
disabled: I,
|
|
238
|
+
tabIndex: r ? 0 : -1,
|
|
238
239
|
"aria-label": H("inputs.otp.digitLabel", {
|
|
239
240
|
current: t + 1,
|
|
240
241
|
total: e
|
|
@@ -257,4 +258,4 @@ pe.displayName = "OTPInput";
|
|
|
257
258
|
export {
|
|
258
259
|
pe as O
|
|
259
260
|
};
|
|
260
|
-
//# sourceMappingURL=otp-input-
|
|
261
|
+
//# sourceMappingURL=otp-input-BBXYvLx5.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as ke, useContext as Pe, useMemo as m, useState as P, useRef as $, useEffect as Ve, useLayoutEffect as Fe, useCallback as se } from "react";
|
|
3
3
|
import * as V from "@radix-ui/react-popover";
|
|
4
4
|
import { R as Ee, _ as b } from "./index-4xgbg-sn.js";
|
|
5
5
|
import { c as H } from "./index-D2ZczOXr.js";
|
|
@@ -70,9 +70,10 @@ const Me = {
|
|
|
70
70
|
}, qe = H(
|
|
71
71
|
[
|
|
72
72
|
"ds:group ds:relative ds:inline-flex ds:items-stretch ds:w-full",
|
|
73
|
-
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-
|
|
73
|
+
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-input",
|
|
74
|
+
"ds:shadow-[var(--shadow-input)]",
|
|
74
75
|
"ds:text-foreground",
|
|
75
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
76
|
+
"ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
76
77
|
"ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid",
|
|
77
78
|
"ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]",
|
|
78
79
|
"ds:forced-colors:focus-within:outline-[CanvasText]",
|
|
@@ -218,7 +219,7 @@ function et(n, r) {
|
|
|
218
219
|
})), y = new Intl.Collator(n);
|
|
219
220
|
return a.sort((o, u) => y.compare(o.name, u.name));
|
|
220
221
|
}
|
|
221
|
-
const tt =
|
|
222
|
+
const tt = ke(
|
|
222
223
|
function({
|
|
223
224
|
value: r,
|
|
224
225
|
defaultValue: d,
|
|
@@ -237,7 +238,7 @@ const tt = Se(
|
|
|
237
238
|
required: ue,
|
|
238
239
|
"aria-label": pe
|
|
239
240
|
}, fe) {
|
|
240
|
-
const { t: v, i18n: j } = je(), C = Te(),
|
|
241
|
+
const { t: v, i18n: j } = je(), C = Te(), x = Pe(Ae) !== null, z = m(
|
|
241
242
|
() => new Set(Be()),
|
|
242
243
|
[]
|
|
243
244
|
), G = m(() => {
|
|
@@ -257,7 +258,7 @@ const tt = Se(
|
|
|
257
258
|
return { country: e, display: "" };
|
|
258
259
|
}, []), [l, B] = P(G.country), [O, p] = P(
|
|
259
260
|
G.display
|
|
260
|
-
), [D, T] = P(!1), [me, U] = P(""), W = r !== void 0, A = $(""), R = $(null),
|
|
261
|
+
), [D, T] = P(!1), [me, U] = P(""), W = r !== void 0, A = $(""), R = $(null), S = $(null), he = Le(fe, S);
|
|
261
262
|
Ve(() => {
|
|
262
263
|
if (!W) return;
|
|
263
264
|
const e = r ?? "";
|
|
@@ -272,7 +273,7 @@ const tt = Se(
|
|
|
272
273
|
if (R.current == null) return;
|
|
273
274
|
const e = R.current;
|
|
274
275
|
R.current = null;
|
|
275
|
-
const t =
|
|
276
|
+
const t = S.current;
|
|
276
277
|
t && document.activeElement === t && t.setSelectionRange(e, e);
|
|
277
278
|
});
|
|
278
279
|
const h = se(
|
|
@@ -286,11 +287,11 @@ const tt = Se(
|
|
|
286
287
|
});
|
|
287
288
|
},
|
|
288
289
|
[o]
|
|
289
|
-
), ge = E ?? (
|
|
290
|
+
), ge = E ?? (x ? C.id : void 0), Y = (x ? C.disabled : !1) || !!ie, be = (x ? C.required : !1) || !!ue, Z = x ? C.invalid : !1, ye = Z ? "error" : ae, ve = x && C.describedBy ? C.describedBy : void 0, Ce = de ?? v("inputs.phone.placeholder", "Phone number"), we = (e) => {
|
|
290
291
|
if (_) return;
|
|
291
|
-
const t = e.target, s = t.value, c = t.selectionStart ?? s.length,
|
|
292
|
-
R.current = Qe(K,
|
|
293
|
-
}, J = A,
|
|
292
|
+
const t = e.target, s = t.value, c = t.selectionStart ?? s.length, w = Je(s, c), K = new M(l).input(s);
|
|
293
|
+
R.current = Qe(K, w), p(K), h(K, l);
|
|
294
|
+
}, J = A, xe = m(
|
|
294
295
|
() => ({
|
|
295
296
|
getValue: () => J.current,
|
|
296
297
|
setValue: (e) => {
|
|
@@ -311,12 +312,12 @@ const tt = Se(
|
|
|
311
312
|
},
|
|
312
313
|
focus: () => {
|
|
313
314
|
var e;
|
|
314
|
-
return (e =
|
|
315
|
+
return (e = S.current) == null ? void 0 : e.focus();
|
|
315
316
|
}
|
|
316
317
|
}),
|
|
317
318
|
[l, h, J]
|
|
318
319
|
);
|
|
319
|
-
Ke(Me,
|
|
320
|
+
Ke(Me, xe, E);
|
|
320
321
|
const ze = (e) => {
|
|
321
322
|
if (e === l) {
|
|
322
323
|
T(!1);
|
|
@@ -324,8 +325,8 @@ const tt = Se(
|
|
|
324
325
|
}
|
|
325
326
|
const t = O.replace(/\D/g, ""), s = new M(e), c = t ? s.input(t) : "";
|
|
326
327
|
B(e), p(c), T(!1), U(""), h(c, e), requestAnimationFrame(() => {
|
|
327
|
-
var
|
|
328
|
-
(
|
|
328
|
+
var w;
|
|
329
|
+
(w = S.current) == null || w.focus();
|
|
329
330
|
});
|
|
330
331
|
}, g = m(
|
|
331
332
|
() => et(
|
|
@@ -343,15 +344,15 @@ const tt = Se(
|
|
|
343
344
|
), Ne = m(
|
|
344
345
|
() => L.size > 0 ? g.filter((e) => !L.has(e.code)) : g,
|
|
345
346
|
[g, L]
|
|
346
|
-
),
|
|
347
|
+
), k = m(
|
|
347
348
|
() => g.find((e) => e.code === l),
|
|
348
349
|
[g, l]
|
|
349
|
-
), Q =
|
|
350
|
+
), Q = k ? k.dialCode : "", Ie = k ? k.name : l, X = v("inputs.phone.countryPickerLabel", "Country"), Re = `${X}: ${Ie}, +${Q}`, Se = se(
|
|
350
351
|
(e, t, s) => {
|
|
351
|
-
const c = q(e),
|
|
352
|
+
const c = q(e), w = q(t), te = s == null ? void 0 : s.map(q);
|
|
352
353
|
return Ee(
|
|
353
354
|
c,
|
|
354
|
-
|
|
355
|
+
w,
|
|
355
356
|
te
|
|
356
357
|
);
|
|
357
358
|
},
|
|
@@ -427,7 +428,7 @@ const tt = Se(
|
|
|
427
428
|
sideOffset: 6,
|
|
428
429
|
align: "start",
|
|
429
430
|
className: Ge,
|
|
430
|
-
children: /* @__PURE__ */ f(b, { filter:
|
|
431
|
+
children: /* @__PURE__ */ f(b, { filter: Se, shouldFilter: !0, loop: !0, label: X, children: [
|
|
431
432
|
/* @__PURE__ */ i(
|
|
432
433
|
b.Input,
|
|
433
434
|
{
|
|
@@ -489,7 +490,7 @@ const tt = Se(
|
|
|
489
490
|
"aria-label": pe,
|
|
490
491
|
"aria-describedby": ve,
|
|
491
492
|
"aria-invalid": Z || void 0,
|
|
492
|
-
onChange:
|
|
493
|
+
onChange: we,
|
|
493
494
|
className: _e({ size: u })
|
|
494
495
|
}
|
|
495
496
|
)
|
|
@@ -505,4 +506,4 @@ export {
|
|
|
505
506
|
He as c,
|
|
506
507
|
qe as p
|
|
507
508
|
};
|
|
508
|
-
//# sourceMappingURL=phone-input-
|
|
509
|
+
//# sourceMappingURL=phone-input-DKSHX7NQ.js.map
|
|
@@ -1752,9 +1752,12 @@ function No({ orientation: e }) {
|
|
|
1752
1752
|
const Co = ve(
|
|
1753
1753
|
[
|
|
1754
1754
|
"ds:relative ds:flex ds:items-center ds:w-full",
|
|
1755
|
-
|
|
1755
|
+
// Soft-chrome look — matches `INPUT_SURFACE_CHROME` so the trigger
|
|
1756
|
+
// shares the fill + halo with TextInput / Select / NumberInput.
|
|
1757
|
+
"ds:rounded-[var(--radius-sm)] ds:border ds:bg-input ds:text-foreground",
|
|
1758
|
+
"ds:shadow-[var(--shadow-input)]",
|
|
1756
1759
|
"ds:placeholder:text-muted-foreground",
|
|
1757
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
1760
|
+
"ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
1758
1761
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1759
1762
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1760
1763
|
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
|
|
@@ -1821,4 +1824,4 @@ export {
|
|
|
1821
1824
|
_o as p,
|
|
1822
1825
|
Co as t
|
|
1823
1826
|
};
|
|
1824
|
-
//# sourceMappingURL=react-day-picker-
|
|
1827
|
+
//# sourceMappingURL=react-day-picker-C5F3-TTX.js.map
|
|
@@ -3,7 +3,7 @@ import { forwardRef as te, useState as _, useEffect as F, useRef as j, useMemo a
|
|
|
3
3
|
import { c as A } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as U } from "react-i18next";
|
|
5
5
|
import * as q from "@radix-ui/react-popover";
|
|
6
|
-
import { S as oe } from "./search-input-
|
|
6
|
+
import { S as oe } from "./search-input-BtEJAJHa.js";
|
|
7
7
|
import { u as W } from "./registry-C9nwlNyL.js";
|
|
8
8
|
import { n as O } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
9
9
|
import { S as ie } from "./search-BonnQsHv.js";
|
|
@@ -582,4 +582,4 @@ export {
|
|
|
582
582
|
Ie as f,
|
|
583
583
|
J as s
|
|
584
584
|
};
|
|
585
|
-
//# sourceMappingURL=search-bar-
|
|
585
|
+
//# sourceMappingURL=search-bar-DORSAzNt.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as ne } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as ie, useState as F, useRef as K, useLayoutEffect as oe, useCallback as V, useImperativeHandle as de, useEffect as le } from "react";
|
|
3
3
|
import { c as x } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as ce } from "react-i18next";
|
|
5
|
-
import { T as ue } from "./text-input-
|
|
5
|
+
import { T as ue } from "./text-input-CakysYnD.js";
|
|
6
6
|
import { S as fe } from "./spinner-DirtWZNG.js";
|
|
7
7
|
import { u as me } from "./form-field-context-B3APVHKx.js";
|
|
8
8
|
import { u as be } from "./use-debounced-callback-BisrB-Fq.js";
|
|
@@ -233,4 +233,4 @@ Ee.displayName = "SearchInput";
|
|
|
233
233
|
export {
|
|
234
234
|
Ee as S
|
|
235
235
|
};
|
|
236
|
-
//# sourceMappingURL=search-input-
|
|
236
|
+
//# sourceMappingURL=search-input-BtEJAJHa.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as a, useContext as me, useState as P, useRef as G, useMemo as fe } from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-select";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as z } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as ge } from "react-i18next";
|
|
6
6
|
import { u as he, F as ve } from "./form-field-context-B3APVHKx.js";
|
|
7
7
|
import { g as be } from "./group-options-BvKhQ3xb.js";
|
|
@@ -11,7 +11,7 @@ import { C as q } from "./chevron-down-BX_NP2Yh.js";
|
|
|
11
11
|
import { C as xe } from "./check-DPdL_Sm7.js";
|
|
12
12
|
import { u as Ne } from "./registry-C9nwlNyL.js";
|
|
13
13
|
import { X as Ce } from "./x-CCcI3eJp.js";
|
|
14
|
-
const
|
|
14
|
+
const we = {
|
|
15
15
|
id: "select",
|
|
16
16
|
capabilities: ["select_single", "open", "close"],
|
|
17
17
|
state: {
|
|
@@ -79,13 +79,14 @@ const ze = {
|
|
|
79
79
|
description: "Stable opaque option value emitted on each rendered option."
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
}, L =
|
|
82
|
+
}, L = z(
|
|
83
83
|
[
|
|
84
84
|
"ds:group ds:inline-flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full",
|
|
85
|
-
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-
|
|
85
|
+
"ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-input",
|
|
86
|
+
"ds:shadow-[var(--shadow-input)]",
|
|
86
87
|
"ds:text-foreground ds:placeholder:text-muted-foreground",
|
|
87
88
|
"ds:data-[placeholder]:text-muted-foreground",
|
|
88
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
89
|
+
"ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
89
90
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
90
91
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
91
92
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
@@ -108,7 +109,7 @@ const ze = {
|
|
|
108
109
|
tone: "default"
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
),
|
|
112
|
+
), ze = z(
|
|
112
113
|
[
|
|
113
114
|
"ds:z-[var(--z-dropdown)] ds:overflow-hidden",
|
|
114
115
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
|
|
@@ -120,7 +121,7 @@ const ze = {
|
|
|
120
121
|
"ds:data-[side=top]:slide-in-from-bottom-2",
|
|
121
122
|
"ds:motion-reduce:animate-none"
|
|
122
123
|
].join(" ")
|
|
123
|
-
), Ie =
|
|
124
|
+
), Ie = z(
|
|
124
125
|
[
|
|
125
126
|
"ds:relative ds:flex ds:cursor-pointer ds:items-center",
|
|
126
127
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -190,7 +191,7 @@ const I = a(
|
|
|
190
191
|
position: n,
|
|
191
192
|
sideOffset: r,
|
|
192
193
|
"data-component": "select-content",
|
|
193
|
-
className:
|
|
194
|
+
className: ze({ className: e }),
|
|
194
195
|
...c,
|
|
195
196
|
children: [
|
|
196
197
|
/* @__PURE__ */ t(o.ScrollUpButton, { className: "ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default", children: /* @__PURE__ */ t(Se, { "aria-hidden": "true", className: "ds:size-4" }) }),
|
|
@@ -275,11 +276,11 @@ const _ = a(function({
|
|
|
275
276
|
n ?? r ?? ""
|
|
276
277
|
), m = n !== void 0, h = m ? n : ee, [N, C] = P(!1), B = G(h);
|
|
277
278
|
B.current = h;
|
|
278
|
-
const te = S ?? (p ? u.id : void 0), O = (p ? u.disabled : !1) || !!E, se = (p ? u.required : !1) || !!X, D = p ? u.invalid : !1, oe = D ? "error" : Q, ne = p && u.describedBy ? u.describedBy : void 0,
|
|
279
|
+
const te = S ?? (p ? u.id : void 0), O = (p ? u.disabled : !1) || !!E, se = (p ? u.required : !1) || !!X, D = p ? u.invalid : !1, oe = D ? "error" : Q, ne = p && u.describedBy ? u.describedBy : void 0, w = G(null), de = Te(Z, w), ie = ye(w), i = l, ae = (d) => {
|
|
279
280
|
m || b(d), i == null || i(d);
|
|
280
281
|
}, re = (d) => {
|
|
281
282
|
var y;
|
|
282
|
-
d.preventDefault(), d.stopPropagation(), m || b(""), i == null || i(""), (y =
|
|
283
|
+
d.preventDefault(), d.stopPropagation(), m || b(""), i == null || i(""), (y = w.current) == null || y.focus();
|
|
283
284
|
}, F = c ?? x("inputs.select.placeholder", "Select…"), le = g && !!h && !O, ce = be(s), ue = fe(
|
|
284
285
|
() => ({
|
|
285
286
|
getValue: () => B.current,
|
|
@@ -295,7 +296,7 @@ const _ = a(function({
|
|
|
295
296
|
}),
|
|
296
297
|
[i, m, N]
|
|
297
298
|
);
|
|
298
|
-
return Ne(
|
|
299
|
+
return Ne(we, ue, S), /* @__PURE__ */ f(
|
|
299
300
|
o.Root,
|
|
300
301
|
{
|
|
301
302
|
value: h === "" ? void 0 : h,
|
|
@@ -409,4 +410,4 @@ export {
|
|
|
409
410
|
H as i,
|
|
410
411
|
j
|
|
411
412
|
};
|
|
412
|
-
//# sourceMappingURL=select-
|
|
413
|
+
//# sourceMappingURL=select-Ca6ibiDL.js.map
|
|
@@ -6,7 +6,7 @@ import { a as N, c as q } from "./index-D2ZczOXr.js";
|
|
|
6
6
|
import { useTranslation as Z } from "react-i18next";
|
|
7
7
|
import { u as K } from "./use-direction-D6rvvG9G.js";
|
|
8
8
|
import { c as D } from "./compose-refs-C0k0tdqF.js";
|
|
9
|
-
import { S as ee } from "./select-
|
|
9
|
+
import { S as ee } from "./select-Ca6ibiDL.js";
|
|
10
10
|
import { X as te } from "./x-CCcI3eJp.js";
|
|
11
11
|
import { u as se } from "./registry-C9nwlNyL.js";
|
|
12
12
|
import { C as ae } from "./chevron-down-BX_NP2Yh.js";
|
|
@@ -396,4 +396,4 @@ export {
|
|
|
396
396
|
F as c,
|
|
397
397
|
re as t
|
|
398
398
|
};
|
|
399
|
-
//# sourceMappingURL=tabs-
|
|
399
|
+
//# sourceMappingURL=tabs-CRCyPpJo.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as N, jsx as K } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as de, useRef as O, useCallback as
|
|
2
|
+
import { forwardRef as de, useRef as O, useCallback as F, useState as P, useLayoutEffect as ce, useMemo as le, useEffect as ue } from "react";
|
|
3
3
|
import { c as fe } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as pe } from "react-i18next";
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
5
|
+
import { u as ve } from "./form-field-context-B3APVHKx.js";
|
|
6
|
+
import { u as me } from "./registry-C9nwlNyL.js";
|
|
7
7
|
const ge = {
|
|
8
8
|
id: "text-area",
|
|
9
9
|
capabilities: ["edit_inline"],
|
|
@@ -27,8 +27,8 @@ const ge = {
|
|
|
27
27
|
argsType: "{ value: string }",
|
|
28
28
|
descriptionKey: "ui.agent.textArea.actions.setValue",
|
|
29
29
|
description: "Replace the textarea value.",
|
|
30
|
-
invoke: (t,
|
|
31
|
-
t.setValue(
|
|
30
|
+
invoke: (t, m) => {
|
|
31
|
+
t.setValue(m.value);
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
clear: {
|
|
@@ -62,7 +62,8 @@ const ge = {
|
|
|
62
62
|
}
|
|
63
63
|
}, be = fe(
|
|
64
64
|
[
|
|
65
|
-
"ds:block ds:w-full ds:border ds:rounded-[var(--radius-sm)] ds:bg-
|
|
65
|
+
"ds:block ds:w-full ds:border ds:rounded-[var(--radius-sm)] ds:bg-input ds:text-foreground",
|
|
66
|
+
"ds:shadow-[var(--shadow-input)]",
|
|
66
67
|
"ds:leading-[var(--line-height-base)]",
|
|
67
68
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
68
69
|
"ds:focus:outline-none",
|
|
@@ -70,8 +71,8 @@ const ge = {
|
|
|
70
71
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
71
72
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
72
73
|
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
|
|
73
|
-
"ds:read-only:bg-muted ds:read-only:cursor-default",
|
|
74
|
-
"ds:transition-[height,color,background-color,border-color] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
74
|
+
"ds:read-only:bg-muted ds:read-only:cursor-default ds:read-only:shadow-none",
|
|
75
|
+
"ds:transition-[height,color,background-color,border-color,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
75
76
|
"ds:placeholder:text-muted-foreground"
|
|
76
77
|
].join(" "),
|
|
77
78
|
{
|
|
@@ -95,7 +96,7 @@ const ge = {
|
|
|
95
96
|
), he = (t) => t >= 1 ? "ds:text-destructive" : t >= 0.9 ? "ds:text-warning" : "ds:text-muted-foreground", ye = (t) => [...t].length, xe = de(
|
|
96
97
|
({
|
|
97
98
|
size: t = "md",
|
|
98
|
-
tone:
|
|
99
|
+
tone: m = "default",
|
|
99
100
|
autoResize: s = !1,
|
|
100
101
|
minRows: g = 2,
|
|
101
102
|
maxRows: b,
|
|
@@ -103,7 +104,7 @@ const ge = {
|
|
|
103
104
|
className: W,
|
|
104
105
|
id: h,
|
|
105
106
|
disabled: _,
|
|
106
|
-
value:
|
|
107
|
+
value: k,
|
|
107
108
|
defaultValue: E,
|
|
108
109
|
maxLength: a,
|
|
109
110
|
rows: q,
|
|
@@ -113,24 +114,24 @@ const ge = {
|
|
|
113
114
|
onInput: D,
|
|
114
115
|
...$
|
|
115
116
|
}, c) => {
|
|
116
|
-
const { t: I } = pe(), o =
|
|
117
|
+
const { t: I } = pe(), o = ve(), z = h ?? o.id, Y = o.disabled || _, G = o.invalid ? "error" : m, l = O(null), J = F(
|
|
117
118
|
(e) => {
|
|
118
119
|
l.current = e, typeof c == "function" ? c(e) : c && (c.current = e);
|
|
119
120
|
},
|
|
120
121
|
[c]
|
|
121
|
-
), u =
|
|
122
|
+
), u = k !== void 0, [Q, j] = P(
|
|
122
123
|
String(E ?? "")
|
|
123
|
-
), T = u ? String(
|
|
124
|
+
), T = u ? String(k) : Q, p = O(!1), w = F(() => {
|
|
124
125
|
const e = l.current;
|
|
125
126
|
if (!e || !s) return;
|
|
126
|
-
const r = window.getComputedStyle(e), d = parseFloat(r.lineHeight), f = parseFloat(r.paddingTop),
|
|
127
|
+
const r = window.getComputedStyle(e), d = parseFloat(r.lineHeight), f = parseFloat(r.paddingTop), v = parseFloat(r.paddingBottom), se = parseFloat(r.borderTopWidth), ae = parseFloat(r.borderBottomWidth), M = f + v + se + ae, ne = (Number.isFinite(d) ? d : 24) * g + M, oe = typeof b == "number" ? (Number.isFinite(d) ? d : 24) * b + M : Number.POSITIVE_INFINITY;
|
|
127
128
|
e.style.height = "auto";
|
|
128
129
|
const ie = Math.max(ne, Math.min(e.scrollHeight, oe));
|
|
129
130
|
e.style.height = `${ie}px`;
|
|
130
131
|
}, [s, g, b]);
|
|
131
132
|
ce(() => {
|
|
132
|
-
s &&
|
|
133
|
-
}, [s,
|
|
133
|
+
s && w();
|
|
134
|
+
}, [s, w, T]);
|
|
134
135
|
const U = (e) => {
|
|
135
136
|
u || j(e.target.value), !p.current && (n == null || n(e));
|
|
136
137
|
}, X = (e) => {
|
|
@@ -142,12 +143,12 @@ const ge = {
|
|
|
142
143
|
...e,
|
|
143
144
|
target: r,
|
|
144
145
|
currentTarget: r
|
|
145
|
-
}), s &&
|
|
146
|
-
},
|
|
147
|
-
var
|
|
146
|
+
}), s && w();
|
|
147
|
+
}, A = F((e) => {
|
|
148
|
+
var v;
|
|
148
149
|
const r = l.current;
|
|
149
150
|
if (!r) return;
|
|
150
|
-
const d = Object.getPrototypeOf(r), f = (
|
|
151
|
+
const d = Object.getPrototypeOf(r), f = (v = Object.getOwnPropertyDescriptor(d, "value")) == null ? void 0 : v.set;
|
|
151
152
|
f == null || f.call(r, e), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
152
153
|
}, []), L = le(
|
|
153
154
|
() => ({
|
|
@@ -155,16 +156,16 @@ const ge = {
|
|
|
155
156
|
var e;
|
|
156
157
|
return ((e = l.current) == null ? void 0 : e.value) ?? "";
|
|
157
158
|
},
|
|
158
|
-
setValue: (e) =>
|
|
159
|
-
clear: () =>
|
|
159
|
+
setValue: (e) => A(e),
|
|
160
|
+
clear: () => A(""),
|
|
160
161
|
focus: () => {
|
|
161
162
|
var e;
|
|
162
163
|
return (e = l.current) == null ? void 0 : e.focus();
|
|
163
164
|
}
|
|
164
165
|
}),
|
|
165
|
-
[
|
|
166
|
+
[A]
|
|
166
167
|
);
|
|
167
|
-
|
|
168
|
+
me(ge, L, h);
|
|
168
169
|
const i = typeof a == "number" && (S ?? !0) && a > 0, V = ye(T), B = i ? Math.max(0, a - V) : 0, R = i ? V / a : 0, [C, ee] = P("");
|
|
169
170
|
ue(() => {
|
|
170
171
|
if (!i) return;
|
|
@@ -236,4 +237,4 @@ xe.displayName = "TextArea";
|
|
|
236
237
|
export {
|
|
237
238
|
xe as T
|
|
238
239
|
};
|
|
239
|
-
//# sourceMappingURL=text-area-
|
|
240
|
+
//# sourceMappingURL=text-area-D5GAe8pV.js.map
|