@alfadocs/ui-kit 0.2.0 → 0.2.2
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/{chat-input-DOlsB1fm.js → chat-input-Bov-gkwP.js} +40 -38
- package/dist/_chunks/{combobox-DCNXqbC7.js → combobox-BLWruOxK.js} +74 -75
- package/dist/_chunks/{freemium-paywall-CnvceDav.js → freemium-paywall-CrVefV0M.js} +2 -2
- package/dist/_chunks/{leo-sidebar-CfEY-xi2.js → leo-sidebar-kHO45M6C.js} +2 -2
- package/dist/_chunks/{link-8QmFjIz2.js → link-BcYW1eNM.js} +48 -32
- package/dist/_chunks/{message-card-ChCX9Iv6.js → message-card-DjvsB_3U.js} +12 -12
- package/dist/_chunks/{message-tray-n8q9ITXI.js → message-tray-BbnAzlLH.js} +23 -23
- package/dist/_chunks/{notification-card-hBlPN1-c.js → notification-card-uTPEvAQS.js} +21 -21
- package/dist/_chunks/{notification-tray-C5cnXbl9.js → notification-tray-PGtMqXbP.js} +56 -56
- package/dist/_chunks/{payment-form-C3vT_npe.js → payment-form-B_BdHwjb.js} +21 -21
- package/dist/_chunks/transaction-chip-DE6DITun.js +196 -0
- package/dist/agent-catalog.json +15 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +1 -0
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/transaction-chip/index.d.ts +3 -0
- package/dist/components/transaction-chip/index.js +5 -0
- package/dist/components/transaction-chip/transaction-chip.d.ts +30 -0
- package/dist/i18n/config.js +36 -0
- package/dist/i18n/resources.d.ts +36 -0
- package/dist/index.js +34 -32
- package/dist/locales/de.json +12 -0
- package/dist/locales/en.json +12 -0
- package/dist/locales/it.json +12 -0
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as r, Fragment as ve } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as ye, useId as be, useRef as b, useCallback as W, useState as xe, useLayoutEffect as Ie, useImperativeHandle as ke, useMemo as Ce } from "react";
|
|
3
3
|
import { c as we } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as Ne } from "react-i18next";
|
|
@@ -44,8 +44,8 @@ const Me = [
|
|
|
44
44
|
argsType: "{ value: string }",
|
|
45
45
|
descriptionKey: "ui.agent.chatInput.actions.setValue",
|
|
46
46
|
description: "Replace the composer text.",
|
|
47
|
-
invoke: (t,
|
|
48
|
-
t.setValue(
|
|
47
|
+
invoke: (t, c) => {
|
|
48
|
+
t.setValue(c.value);
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
clear: {
|
|
@@ -109,10 +109,10 @@ const Me = [
|
|
|
109
109
|
defaultVariants: { size: "md" }
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
function Se(t,
|
|
112
|
+
function Se(t, c) {
|
|
113
113
|
if (typeof Intl < "u" && typeof Intl.Segmenter == "function")
|
|
114
114
|
try {
|
|
115
|
-
const p = new Intl.Segmenter(
|
|
115
|
+
const p = new Intl.Segmenter(c, { granularity: "grapheme" });
|
|
116
116
|
let s = 0;
|
|
117
117
|
for (const M of p.segment(t)) s += 1;
|
|
118
118
|
return s;
|
|
@@ -123,7 +123,7 @@ function Se(t, o) {
|
|
|
123
123
|
const je = ye(
|
|
124
124
|
({
|
|
125
125
|
size: t = "md",
|
|
126
|
-
value:
|
|
126
|
+
value: c,
|
|
127
127
|
defaultValue: p,
|
|
128
128
|
maxLength: s,
|
|
129
129
|
submitOnEnter: M = !1,
|
|
@@ -144,35 +144,35 @@ const je = ye(
|
|
|
144
144
|
id: z,
|
|
145
145
|
...J
|
|
146
146
|
}, L) => {
|
|
147
|
-
const { t:
|
|
147
|
+
const { t: i, i18n: O } = Ne(), Q = be(), h = b(!1), K = b(null), H = b(null), X = W((e) => {
|
|
148
148
|
H.current = e;
|
|
149
|
-
}, []), n =
|
|
149
|
+
}, []), n = c !== void 0, [Z, g] = xe(
|
|
150
150
|
String(p ?? "")
|
|
151
|
-
),
|
|
151
|
+
), a = n ? String(c) : Z, V = Se(a, O.language), v = typeof s == "number" && s > 0, D = v ? Math.max(0, s - V) : 0, ee = v && V > s * 0.9, l = v && V >= s, S = W(() => {
|
|
152
152
|
const e = H.current;
|
|
153
153
|
if (!e) return;
|
|
154
|
-
const
|
|
154
|
+
const o = window.getComputedStyle(e), y = parseFloat(o.lineHeight) || 24, ue = parseFloat(o.paddingTop) || 0, pe = parseFloat(o.paddingBottom) || 0, me = parseFloat(o.borderTopWidth) || 0, fe = parseFloat(o.borderBottomWidth) || 0, _ = ue + pe + me + fe, he = y * x + _, $ = y * T + _;
|
|
155
155
|
e.style.height = "auto";
|
|
156
156
|
const ge = Math.max(he, Math.min(e.scrollHeight, $));
|
|
157
157
|
e.style.height = `${ge}px`, e.style.overflowY = e.scrollHeight > $ ? "auto" : "hidden";
|
|
158
158
|
}, [x, T]);
|
|
159
159
|
Ie(() => {
|
|
160
160
|
S();
|
|
161
|
-
}, [S,
|
|
161
|
+
}, [S, a]);
|
|
162
162
|
const te = (e) => {
|
|
163
163
|
n || g(e.target.value), !h.current && (k == null || k(e));
|
|
164
164
|
}, se = (e) => {
|
|
165
165
|
h.current = !0, w == null || w(e);
|
|
166
|
-
},
|
|
166
|
+
}, ae = (e) => {
|
|
167
167
|
h.current = !1, N == null || N(e);
|
|
168
|
-
},
|
|
169
|
-
!
|
|
168
|
+
}, re = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || h.current, E = () => {
|
|
169
|
+
!a.trim() || f || l || (I == null || I(a), n || g(""));
|
|
170
170
|
}, j = b(null);
|
|
171
171
|
ke(L, () => j.current, []);
|
|
172
172
|
const ne = Ce(
|
|
173
173
|
() => ({
|
|
174
|
-
getValue: () =>
|
|
175
|
-
isEmpty: () => !
|
|
174
|
+
getValue: () => a,
|
|
175
|
+
isEmpty: () => !a.trim(),
|
|
176
176
|
setValue: (e) => {
|
|
177
177
|
n || g(e);
|
|
178
178
|
},
|
|
@@ -191,20 +191,20 @@ const je = ye(
|
|
|
191
191
|
// via React's render cycle — depend on currentValue + isControlled so
|
|
192
192
|
// the handle picks up new values across renders.
|
|
193
193
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
194
|
-
[
|
|
194
|
+
[a, n]
|
|
195
195
|
);
|
|
196
196
|
ze(Fe, ne, z);
|
|
197
197
|
const ie = (e) => {
|
|
198
|
-
if (C == null || C(e), !e.defaultPrevented && !
|
|
199
|
-
const
|
|
200
|
-
(
|
|
198
|
+
if (C == null || C(e), !e.defaultPrevented && !re(e) && e.key === "Enter") {
|
|
199
|
+
const o = e.metaKey || e.ctrlKey, y = M && !e.shiftKey;
|
|
200
|
+
(o || y) && (e.preventDefault(), E());
|
|
201
201
|
}
|
|
202
202
|
}, oe = () => {
|
|
203
203
|
var e;
|
|
204
204
|
(e = K.current) == null || e.click();
|
|
205
205
|
}, ce = (e) => {
|
|
206
206
|
e.target.files && e.target.files.length > 0 && (m == null || m(e.target.files)), e.target.value = "";
|
|
207
|
-
}, d = z ?? Q, B = `${d}-label`, R = v ? `${d}-counter` : void 0, P = `${d}-hint`, le = A ??
|
|
207
|
+
}, d = z ?? Q, B = `${d}-label`, R = v ? `${d}-counter` : void 0, P = `${d}-hint`, le = A ?? i("chat.input.placeholder"), de = F ?? i("chat.prompt");
|
|
208
208
|
return /* @__PURE__ */ u(
|
|
209
209
|
"div",
|
|
210
210
|
{
|
|
@@ -213,7 +213,7 @@ const je = ye(
|
|
|
213
213
|
"data-component-id": z,
|
|
214
214
|
className: Ke({ size: t, className: G }),
|
|
215
215
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ r(
|
|
217
217
|
"label",
|
|
218
218
|
{
|
|
219
219
|
id: B,
|
|
@@ -222,12 +222,12 @@ const je = ye(
|
|
|
222
222
|
children: de
|
|
223
223
|
}
|
|
224
224
|
),
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ r(
|
|
226
226
|
"textarea",
|
|
227
227
|
{
|
|
228
228
|
ref: X,
|
|
229
229
|
id: d,
|
|
230
|
-
value: n ?
|
|
230
|
+
value: n ? a : void 0,
|
|
231
231
|
defaultValue: n ? void 0 : p,
|
|
232
232
|
disabled: f,
|
|
233
233
|
rows: x,
|
|
@@ -239,7 +239,7 @@ const je = ye(
|
|
|
239
239
|
onChange: te,
|
|
240
240
|
onKeyDown: ie,
|
|
241
241
|
onCompositionStart: se,
|
|
242
|
-
onCompositionEnd:
|
|
242
|
+
onCompositionEnd: ae,
|
|
243
243
|
className: [
|
|
244
244
|
"ds:w-full ds:resize-none ds:bg-transparent",
|
|
245
245
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)]",
|
|
@@ -260,7 +260,7 @@ const je = ye(
|
|
|
260
260
|
),
|
|
261
261
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
|
|
262
262
|
m ? /* @__PURE__ */ u(ve, { children: [
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ r(
|
|
264
264
|
"input",
|
|
265
265
|
{
|
|
266
266
|
ref: K,
|
|
@@ -268,14 +268,16 @@ const je = ye(
|
|
|
268
268
|
className: "ds:sr-only",
|
|
269
269
|
multiple: !0,
|
|
270
270
|
accept: Y,
|
|
271
|
-
onChange: ce
|
|
271
|
+
onChange: ce,
|
|
272
|
+
"aria-label": i("chat.input.attach"),
|
|
273
|
+
tabIndex: -1
|
|
272
274
|
}
|
|
273
275
|
),
|
|
274
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ r(
|
|
275
277
|
U,
|
|
276
278
|
{
|
|
277
|
-
icon: /* @__PURE__ */
|
|
278
|
-
"aria-label":
|
|
279
|
+
icon: /* @__PURE__ */ r(Te, {}),
|
|
280
|
+
"aria-label": i("chat.input.attach"),
|
|
279
281
|
intent: "ghost",
|
|
280
282
|
size: "sm",
|
|
281
283
|
onClick: oe,
|
|
@@ -299,21 +301,21 @@ const je = ye(
|
|
|
299
301
|
l ? (
|
|
300
302
|
// Icon pairs with --destructive colour so the at-limit
|
|
301
303
|
// state is not conveyed by hue alone (WCAG 1.4.1).
|
|
302
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ r(Ve, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
303
305
|
) : null,
|
|
304
|
-
|
|
306
|
+
i("chat.input.remaining", { count: D })
|
|
305
307
|
]
|
|
306
308
|
}
|
|
307
309
|
) : null,
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ r("span", { id: P, className: "ds:sr-only", children: i("chat.input.sendHint") }),
|
|
311
|
+
/* @__PURE__ */ r(
|
|
310
312
|
U,
|
|
311
313
|
{
|
|
312
|
-
icon: /* @__PURE__ */
|
|
313
|
-
"aria-label":
|
|
314
|
+
icon: /* @__PURE__ */ r(Ee, {}),
|
|
315
|
+
"aria-label": i("chat.send"),
|
|
314
316
|
intent: "primary",
|
|
315
317
|
size: "sm",
|
|
316
|
-
disabled: f || !
|
|
318
|
+
disabled: f || !a.trim() || l,
|
|
317
319
|
onClick: E,
|
|
318
320
|
"aria-keyshortcuts": "Meta+Enter Control+Enter"
|
|
319
321
|
}
|
|
@@ -330,4 +332,4 @@ export {
|
|
|
330
332
|
je as C,
|
|
331
333
|
Fe as c
|
|
332
334
|
};
|
|
333
|
-
//# sourceMappingURL=chat-input-
|
|
335
|
+
//# sourceMappingURL=chat-input-Bov-gkwP.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as o, jsxs as I } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as $e, useContext as ke, useState as
|
|
2
|
+
import { forwardRef as $e, useContext as ke, useState as G, useMemo as M, useRef as v, useLayoutEffect as Oe, useEffect as E, useCallback as Ve } from "react";
|
|
3
3
|
import * as F from "@radix-ui/react-popover";
|
|
4
4
|
import { R as qe, _ as u, P as Be } from "./index-4xgbg-sn.js";
|
|
5
5
|
import { c as D } from "./index-D2ZczOXr.js";
|
|
6
6
|
import { useTranslation as Ue } from "react-i18next";
|
|
7
7
|
import { u as He, F as Ge } from "./form-field-context-B3APVHKx.js";
|
|
8
8
|
import { c as Me } from "./compose-refs-C0k0tdqF.js";
|
|
9
|
-
import { n as
|
|
10
|
-
import { g as
|
|
11
|
-
import { I as
|
|
9
|
+
import { n as L } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
10
|
+
import { g as Le } from "./group-options-BvKhQ3xb.js";
|
|
11
|
+
import { I as Qe, a as Q, d as K, c as Ke } from "./input-surface-u4QB0lxe.js";
|
|
12
12
|
import { u as Xe } from "./registry-C9nwlNyL.js";
|
|
13
13
|
import { X as We } from "./x-CCcI3eJp.js";
|
|
14
14
|
import { C as Je } from "./check-DPdL_Sm7.js";
|
|
@@ -104,16 +104,16 @@ const Ye = {
|
|
|
104
104
|
), et = D(
|
|
105
105
|
[
|
|
106
106
|
"ds:group ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:w-full",
|
|
107
|
-
|
|
107
|
+
Ke
|
|
108
108
|
].join(" "),
|
|
109
109
|
{
|
|
110
110
|
variants: {
|
|
111
111
|
size: {
|
|
112
|
-
sm: `${
|
|
113
|
-
md: `${
|
|
114
|
-
lg: `${
|
|
112
|
+
sm: `${Q.sm} ${K.sm}`,
|
|
113
|
+
md: `${Q.md} ${K.md}`,
|
|
114
|
+
lg: `${Q.lg} ${K.lg}`
|
|
115
115
|
},
|
|
116
|
-
tone:
|
|
116
|
+
tone: Qe
|
|
117
117
|
},
|
|
118
118
|
defaultVariants: {
|
|
119
119
|
size: "md",
|
|
@@ -132,7 +132,7 @@ const Ye = {
|
|
|
132
132
|
"ds:data-[side=top]:slide-in-from-bottom-2",
|
|
133
133
|
"ds:motion-reduce:animate-none"
|
|
134
134
|
].join(" ")
|
|
135
|
-
),
|
|
135
|
+
), ae = D(
|
|
136
136
|
[
|
|
137
137
|
"ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
138
138
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -176,7 +176,7 @@ function at({
|
|
|
176
176
|
keywords: [],
|
|
177
177
|
forceMount: !0,
|
|
178
178
|
onSelect: () => j(s),
|
|
179
|
-
className:
|
|
179
|
+
className: ae({ size: P }),
|
|
180
180
|
children: [
|
|
181
181
|
/* @__PURE__ */ o(
|
|
182
182
|
"span",
|
|
@@ -190,66 +190,66 @@ function at({
|
|
|
190
190
|
}
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
|
-
const
|
|
193
|
+
const ie = $e(
|
|
194
194
|
function({
|
|
195
195
|
options: r,
|
|
196
196
|
value: y,
|
|
197
197
|
defaultValue: P,
|
|
198
198
|
onValueChange: j,
|
|
199
|
-
placeholder:
|
|
199
|
+
placeholder: X,
|
|
200
200
|
clearable: A = !1,
|
|
201
|
-
disabled:
|
|
202
|
-
readOnly:
|
|
203
|
-
required:
|
|
204
|
-
name:
|
|
201
|
+
disabled: de,
|
|
202
|
+
readOnly: le,
|
|
203
|
+
required: ce,
|
|
204
|
+
name: ue,
|
|
205
205
|
id: T,
|
|
206
206
|
size: x = "md",
|
|
207
|
-
tone:
|
|
207
|
+
tone: me = "default",
|
|
208
208
|
filter: $,
|
|
209
|
-
allowCreate:
|
|
209
|
+
allowCreate: fe = !1,
|
|
210
210
|
onCreate: k,
|
|
211
|
-
open:
|
|
211
|
+
open: W,
|
|
212
212
|
onOpenChange: m,
|
|
213
|
-
emptyMessage:
|
|
214
|
-
className:
|
|
215
|
-
"aria-label":
|
|
216
|
-
},
|
|
217
|
-
const { t: C } = Ue(), h = He(), N = ke(Ge) !== null, [
|
|
213
|
+
emptyMessage: pe,
|
|
214
|
+
className: be,
|
|
215
|
+
"aria-label": J
|
|
216
|
+
}, he) {
|
|
217
|
+
const { t: C } = Ue(), h = He(), N = ke(Ge) !== null, [ge, O] = G(
|
|
218
218
|
y ?? P ?? ""
|
|
219
|
-
), z = y !== void 0, f = z ? y :
|
|
219
|
+
), z = y !== void 0, f = z ? y : ge, V = M(
|
|
220
220
|
() => r.find((e) => e.value === f),
|
|
221
221
|
[r, f]
|
|
222
|
-
), S = (
|
|
222
|
+
), S = (V == null ? void 0 : V.label) ?? "", [p, i] = G(S), [ve, Y] = G(!1), R = W !== void 0, d = R ? W : ve, w = v(!1), _ = v(null), Z = v(null);
|
|
223
223
|
Oe(() => {
|
|
224
224
|
var e;
|
|
225
225
|
(e = _.current) == null || e.setAttribute("aria-expanded", String(d));
|
|
226
226
|
}), E(() => {
|
|
227
227
|
d || i(S);
|
|
228
228
|
}, [S, d]);
|
|
229
|
-
const
|
|
229
|
+
const ye = T ?? (N ? h.id : void 0), q = (N ? h.disabled : !1) || !!de, g = !!le, xe = (N ? h.required : !1) || !!ce, ee = N ? h.invalid : !1, Ce = ee ? "error" : me, Ne = N && h.describedBy ? h.describedBy : void 0, te = X ?? C("ui.inputs.combobox.placeholder", "Search…"), ze = M(
|
|
230
230
|
() => (e, t, n) => {
|
|
231
231
|
if (w.current) return 1;
|
|
232
|
-
const b =
|
|
232
|
+
const b = L(e), a = L(t), H = n == null ? void 0 : n.map(L);
|
|
233
233
|
return $ ? $(b, a) : qe(
|
|
234
234
|
b,
|
|
235
235
|
a,
|
|
236
|
-
|
|
236
|
+
H
|
|
237
237
|
);
|
|
238
238
|
},
|
|
239
239
|
[$]
|
|
240
|
-
), l = j,
|
|
241
|
-
z ||
|
|
240
|
+
), l = j, se = (e) => {
|
|
241
|
+
z || O(e), l == null || l(e);
|
|
242
242
|
}, c = (e) => {
|
|
243
243
|
R || Y(e), m == null || m(e);
|
|
244
244
|
}, Se = (e) => {
|
|
245
245
|
const t = r.find((n) => n.value === e);
|
|
246
|
-
|
|
246
|
+
se(e), i((t == null ? void 0 : t.label) ?? ""), c(!1);
|
|
247
247
|
}, Ie = (e) => {
|
|
248
248
|
k == null || k(e), c(!1);
|
|
249
249
|
}, Re = (e) => {
|
|
250
250
|
g || (i(e), !d && e.length > 0 && !w.current && c(!0));
|
|
251
251
|
}, we = () => {
|
|
252
|
-
!
|
|
252
|
+
!q && !g && c(!0);
|
|
253
253
|
}, _e = () => {
|
|
254
254
|
w.current = !0;
|
|
255
255
|
}, Ee = () => {
|
|
@@ -261,34 +261,34 @@ const ae = $e(
|
|
|
261
261
|
e.nativeEvent.isComposing || e.key === "Escape" && d && (e.preventDefault(), c(!1), i(S));
|
|
262
262
|
}, De = (e) => {
|
|
263
263
|
var t;
|
|
264
|
-
e.preventDefault(), e.stopPropagation(),
|
|
264
|
+
e.preventDefault(), e.stopPropagation(), se(""), i(""), c(!0), (t = _.current) == null || t.focus();
|
|
265
265
|
}, Pe = (e) => {
|
|
266
266
|
g && e || (c(e), e || i(S));
|
|
267
|
-
},
|
|
267
|
+
}, oe = v(f);
|
|
268
268
|
E(() => {
|
|
269
|
-
|
|
269
|
+
oe.current = f;
|
|
270
270
|
}, [f]);
|
|
271
|
-
const
|
|
271
|
+
const ne = v(p);
|
|
272
272
|
E(() => {
|
|
273
|
-
|
|
273
|
+
ne.current = p;
|
|
274
274
|
}, [p]);
|
|
275
|
-
const
|
|
275
|
+
const re = v(d);
|
|
276
276
|
E(() => {
|
|
277
|
-
|
|
277
|
+
re.current = d;
|
|
278
278
|
}, [d]);
|
|
279
|
-
const
|
|
279
|
+
const B = Ve(
|
|
280
280
|
(e) => {
|
|
281
281
|
R || Y(e), m == null || m(e);
|
|
282
282
|
},
|
|
283
283
|
[R, m]
|
|
284
|
-
), je =
|
|
284
|
+
), je = M(
|
|
285
285
|
() => ({
|
|
286
|
-
getValue: () =>
|
|
287
|
-
getQuery: () =>
|
|
288
|
-
getIsOpen: () =>
|
|
286
|
+
getValue: () => oe.current || null,
|
|
287
|
+
getQuery: () => ne.current,
|
|
288
|
+
getIsOpen: () => re.current,
|
|
289
289
|
setValue: (e) => {
|
|
290
290
|
const t = e ?? "";
|
|
291
|
-
z ||
|
|
291
|
+
z || O(t), l == null || l(t);
|
|
292
292
|
const n = r.find((b) => b.value === t);
|
|
293
293
|
i((n == null ? void 0 : n.label) ?? "");
|
|
294
294
|
},
|
|
@@ -296,22 +296,22 @@ const ae = $e(
|
|
|
296
296
|
i(e);
|
|
297
297
|
},
|
|
298
298
|
clear: () => {
|
|
299
|
-
z ||
|
|
299
|
+
z || O(""), l == null || l(""), i("");
|
|
300
300
|
},
|
|
301
|
-
open: () =>
|
|
302
|
-
close: () =>
|
|
301
|
+
open: () => B(!0),
|
|
302
|
+
close: () => B(!1)
|
|
303
303
|
}),
|
|
304
|
-
[l, z, r,
|
|
304
|
+
[l, z, r, B]
|
|
305
305
|
);
|
|
306
306
|
Xe(Ye, je, T);
|
|
307
|
-
const Ae = A && !!f && !
|
|
307
|
+
const Ae = A && !!f && !q && !g, Te = Le(r), U = rt[x];
|
|
308
308
|
return /* @__PURE__ */ o(F.Root, { open: d, onOpenChange: Pe, children: /* @__PURE__ */ I(
|
|
309
309
|
u,
|
|
310
310
|
{
|
|
311
311
|
filter: ze,
|
|
312
312
|
shouldFilter: !0,
|
|
313
313
|
loop: !0,
|
|
314
|
-
label:
|
|
314
|
+
label: J ?? te,
|
|
315
315
|
className: "ds:w-full",
|
|
316
316
|
children: [
|
|
317
317
|
/* @__PURE__ */ o(F.Anchor, { asChild: !0, children: /* @__PURE__ */ I(
|
|
@@ -320,8 +320,8 @@ const ae = $e(
|
|
|
320
320
|
ref: Z,
|
|
321
321
|
className: et({
|
|
322
322
|
size: x,
|
|
323
|
-
tone:
|
|
324
|
-
className:
|
|
323
|
+
tone: Ce,
|
|
324
|
+
className: be
|
|
325
325
|
}),
|
|
326
326
|
"data-component": "combobox",
|
|
327
327
|
"data-component-id": T,
|
|
@@ -329,17 +329,16 @@ const ae = $e(
|
|
|
329
329
|
/* @__PURE__ */ o(
|
|
330
330
|
u.Input,
|
|
331
331
|
{
|
|
332
|
-
ref: Me(
|
|
332
|
+
ref: Me(he, _),
|
|
333
333
|
value: p,
|
|
334
334
|
onValueChange: Re,
|
|
335
|
-
id:
|
|
336
|
-
name:
|
|
337
|
-
placeholder:
|
|
338
|
-
disabled:
|
|
335
|
+
id: ye,
|
|
336
|
+
name: ue,
|
|
337
|
+
placeholder: te,
|
|
338
|
+
disabled: q,
|
|
339
339
|
readOnly: g,
|
|
340
|
-
required:
|
|
341
|
-
"aria-
|
|
342
|
-
"aria-describedby": Ce,
|
|
340
|
+
required: xe,
|
|
341
|
+
"aria-describedby": Ne,
|
|
343
342
|
"aria-invalid": ee || void 0,
|
|
344
343
|
onFocus: we,
|
|
345
344
|
onKeyDown: Fe,
|
|
@@ -374,7 +373,7 @@ const ae = $e(
|
|
|
374
373
|
{
|
|
375
374
|
forceMount: !0,
|
|
376
375
|
hidden: !d,
|
|
377
|
-
"aria-label":
|
|
376
|
+
"aria-label": J ?? C("ui.inputs.combobox.popupLabel", "Options"),
|
|
378
377
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
379
378
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
380
379
|
onInteractOutside: (e) => {
|
|
@@ -386,10 +385,10 @@ const ae = $e(
|
|
|
386
385
|
align: "start",
|
|
387
386
|
className: tt(),
|
|
388
387
|
children: /* @__PURE__ */ I(u.List, { className: ot, children: [
|
|
389
|
-
/* @__PURE__ */ o(u.Empty, { className: nt, children:
|
|
388
|
+
/* @__PURE__ */ o(u.Empty, { className: nt, children: pe ?? C("ui.inputs.combobox.empty", "No results found") }),
|
|
390
389
|
Te.map(({ group: e, items: t }, n) => {
|
|
391
390
|
const b = t.map((a) => {
|
|
392
|
-
const
|
|
391
|
+
const H = a.value === f;
|
|
393
392
|
return /* @__PURE__ */ I(
|
|
394
393
|
u.Item,
|
|
395
394
|
{
|
|
@@ -397,14 +396,14 @@ const ae = $e(
|
|
|
397
396
|
keywords: [a.label],
|
|
398
397
|
disabled: a.disabled,
|
|
399
398
|
onSelect: Se,
|
|
400
|
-
className:
|
|
399
|
+
className: ae({ size: x }),
|
|
401
400
|
children: [
|
|
402
401
|
/* @__PURE__ */ o(
|
|
403
402
|
"span",
|
|
404
403
|
{
|
|
405
404
|
"aria-hidden": "true",
|
|
406
|
-
className: `ds:inline-flex ds:items-center ds:justify-center ${
|
|
407
|
-
children:
|
|
405
|
+
className: `ds:inline-flex ds:items-center ds:justify-center ${U}`,
|
|
406
|
+
children: H ? /* @__PURE__ */ o(Je, { className: U }) : null
|
|
408
407
|
}
|
|
409
408
|
),
|
|
410
409
|
/* @__PURE__ */ o("span", { className: "ds:flex-1 ds:truncate", children: a.label }),
|
|
@@ -423,7 +422,7 @@ const ae = $e(
|
|
|
423
422
|
`group-${e}`
|
|
424
423
|
) : /* @__PURE__ */ o(u.Group, { children: b }, `group-${n}`);
|
|
425
424
|
}),
|
|
426
|
-
|
|
425
|
+
fe && p.length > 0 ? /* @__PURE__ */ o(
|
|
427
426
|
at,
|
|
428
427
|
{
|
|
429
428
|
search: p,
|
|
@@ -434,7 +433,7 @@ const ae = $e(
|
|
|
434
433
|
value: p
|
|
435
434
|
}
|
|
436
435
|
),
|
|
437
|
-
iconClass:
|
|
436
|
+
iconClass: U,
|
|
438
437
|
size: x,
|
|
439
438
|
onSelect: Ie
|
|
440
439
|
}
|
|
@@ -447,14 +446,14 @@ const ae = $e(
|
|
|
447
446
|
) });
|
|
448
447
|
}
|
|
449
448
|
);
|
|
450
|
-
|
|
451
|
-
const xt =
|
|
449
|
+
ie.displayName = "Combobox";
|
|
450
|
+
const xt = ie;
|
|
452
451
|
export {
|
|
453
452
|
xt as C,
|
|
454
453
|
tt as a,
|
|
455
454
|
Ze as b,
|
|
456
455
|
Ye as c,
|
|
457
|
-
|
|
456
|
+
ae as d,
|
|
458
457
|
et as e
|
|
459
458
|
};
|
|
460
|
-
//# sourceMappingURL=combobox-
|
|
459
|
+
//# sourceMappingURL=combobox-BLWruOxK.js.map
|
|
@@ -7,7 +7,7 @@ import { useTranslation as Z } from "react-i18next";
|
|
|
7
7
|
import { u as $ } from "./registry-C9nwlNyL.js";
|
|
8
8
|
import { B as j } from "./button-DD_0Xdmr.js";
|
|
9
9
|
import { P as ee } from "./progress-C11tqhoI.js";
|
|
10
|
-
import { f as se } from "./payment-form-
|
|
10
|
+
import { f as se } from "./payment-form-B_BdHwjb.js";
|
|
11
11
|
import { T as ae } from "./triangle-alert-CBPUIzQo.js";
|
|
12
12
|
import { C as re } from "./check-DPdL_Sm7.js";
|
|
13
13
|
const te = {
|
|
@@ -264,4 +264,4 @@ export {
|
|
|
264
264
|
de as F,
|
|
265
265
|
te as f
|
|
266
266
|
};
|
|
267
|
-
//# sourceMappingURL=freemium-paywall-
|
|
267
|
+
//# sourceMappingURL=freemium-paywall-CrVefV0M.js.map
|
|
@@ -10,7 +10,7 @@ import { A as L } from "./avatar-Dcr6XuDQ.js";
|
|
|
10
10
|
import { B as D } from "./button-DD_0Xdmr.js";
|
|
11
11
|
import { C as ae } from "./chat-container-ClzsWXp2.js";
|
|
12
12
|
import { C as re } from "./chat-message-DoAhgUTj.js";
|
|
13
|
-
import { C as le } from "./chat-input-
|
|
13
|
+
import { C as le } from "./chat-input-Bov-gkwP.js";
|
|
14
14
|
import { S as ie } from "./streaming-text-BgjCTVOw.js";
|
|
15
15
|
import { a as q, S as O } from "./suggestion-chip-C4Jz0LrM.js";
|
|
16
16
|
import { T as oe } from "./typing-indicator-BZ5jXZPn.js";
|
|
@@ -756,4 +756,4 @@ export {
|
|
|
756
756
|
we as b,
|
|
757
757
|
Ce as c
|
|
758
758
|
};
|
|
759
|
-
//# sourceMappingURL=leo-sidebar-
|
|
759
|
+
//# sourceMappingURL=leo-sidebar-kHO45M6C.js.map
|