@versini/sassysaint 5.4.15 → 5.5.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/{LazyApp.CmWxSgb_.js → LazyApp.kPg_JpHE.js} +492 -470
- package/dist/chunks/{LazyHeader.CmyI3orp.js → LazyHeader.C5vQHuXo.js} +167 -141
- package/dist/chunks/{LazyMarkdownWithExtra.bTU0zWSE.js → LazyMarkdownWithExtra.DUBrzBhM.js} +2 -2
- package/dist/chunks/{LazyMessageAssistant.BkIqe55j.js → LazyMessageAssistant.CJ_QpOdB.js} +4 -4
- package/dist/chunks/{index.Dn9p043U.js → index.CqSoo2Fx.js} +443 -429
- package/dist/chunks/{index.D8QVMbN9.js → index.UHRCFkiB.js} +54 -62
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
|
@@ -1,73 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import E, { useSyncExternalStore as Ce, useCallback as U, useEffect as R, useContext as H, useRef as k, useState as $, useLayoutEffect as O, useMemo as ne, useId as Ae, useReducer as Ie } from "react";
|
|
1
|
+
import N, { useSyncExternalStore as He, useCallback as P, useEffect as z, useContext as L, useRef as f, useState as $, useLayoutEffect as B, useMemo as me, useId as Be, useReducer as ze } from "react";
|
|
2
|
+
import { DEFAULT_AI_ENGINE as X } from "./index.UHRCFkiB.js";
|
|
4
3
|
import i from "clsx";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
viewBox: r,
|
|
8
|
-
title: t,
|
|
9
|
-
monotone: a,
|
|
10
|
-
...o
|
|
11
|
-
}) => /* @__PURE__ */ _(
|
|
12
|
-
Se,
|
|
13
|
-
{
|
|
14
|
-
defaultViewBox: "0 0 512 512",
|
|
15
|
-
size: "size-5",
|
|
16
|
-
viewBox: r,
|
|
17
|
-
className: e,
|
|
18
|
-
title: t || "Edit",
|
|
19
|
-
...o,
|
|
20
|
-
children: [
|
|
21
|
-
/* @__PURE__ */ l(
|
|
22
|
-
"path",
|
|
23
|
-
{
|
|
24
|
-
opacity: a ? "1" : "0.4",
|
|
25
|
-
d: "M0 160c0-53 43-96 96-96h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32 14.3-32 32V416c0 17.7 14.3 32 32 32H352c17.7 0 32-14.3 32-32V320c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 53-43 96-96 96H96c-53 0-96-43-96-96V160z"
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
/* @__PURE__ */ l("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
function ce(e, r) {
|
|
4
|
+
import { jsx as c, jsxs as C, Fragment as Le } from "react/jsx-runtime";
|
|
5
|
+
function ge(e, r) {
|
|
33
6
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: r }));
|
|
34
7
|
}
|
|
35
|
-
const
|
|
8
|
+
const le = (e, r) => {
|
|
36
9
|
const t = JSON.stringify(
|
|
37
10
|
typeof r == "function" ? r() : r
|
|
38
11
|
);
|
|
39
|
-
window.localStorage.setItem(e, t),
|
|
40
|
-
},
|
|
41
|
-
window.localStorage.removeItem(e),
|
|
42
|
-
},
|
|
43
|
-
function
|
|
12
|
+
window.localStorage.setItem(e, t), ge(e, t);
|
|
13
|
+
}, Me = (e) => {
|
|
14
|
+
window.localStorage.removeItem(e), ge(e, null);
|
|
15
|
+
}, se = (e) => window.localStorage.getItem(e), Oe = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
16
|
+
function Rt({
|
|
44
17
|
key: e,
|
|
45
18
|
initialValue: r
|
|
46
19
|
}) {
|
|
47
|
-
const t =
|
|
48
|
-
(
|
|
20
|
+
const t = He(Oe, () => se(e)), a = P(
|
|
21
|
+
(l) => {
|
|
49
22
|
try {
|
|
50
|
-
const s = typeof
|
|
51
|
-
s == null ?
|
|
23
|
+
const s = typeof l == "function" ? l(JSON.parse(t)) : l;
|
|
24
|
+
s == null ? Me(e) : le(e, s);
|
|
52
25
|
} catch (s) {
|
|
53
26
|
console.warn(s);
|
|
54
27
|
}
|
|
55
28
|
},
|
|
56
29
|
[e, t]
|
|
57
|
-
), o =
|
|
30
|
+
), o = P(() => {
|
|
58
31
|
a(r);
|
|
59
|
-
}, [r, a]),
|
|
32
|
+
}, [r, a]), n = P(() => {
|
|
60
33
|
a(null);
|
|
61
34
|
}, [a]);
|
|
62
|
-
return
|
|
35
|
+
return z(() => {
|
|
63
36
|
try {
|
|
64
|
-
|
|
65
|
-
} catch (
|
|
66
|
-
console.warn(
|
|
37
|
+
se(e) === null && typeof r < "u" && le(e, r);
|
|
38
|
+
} catch (l) {
|
|
39
|
+
console.warn(l);
|
|
67
40
|
}
|
|
68
|
-
}, [e, r]), [t ? JSON.parse(t) : null, a, o,
|
|
41
|
+
}, [e, r]), [t ? JSON.parse(t) : null, a, o, n];
|
|
69
42
|
}
|
|
70
|
-
const
|
|
43
|
+
const w = {
|
|
71
44
|
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
72
45
|
location(latitude: $latitude, longitude: $longitude) {
|
|
73
46
|
country
|
|
@@ -171,44 +144,44 @@ const x = {
|
|
|
171
144
|
engine: $engine,
|
|
172
145
|
tags: $tags)
|
|
173
146
|
}`
|
|
174
|
-
},
|
|
147
|
+
}, Ht = {
|
|
175
148
|
GET_LOCATION: {
|
|
176
|
-
schema:
|
|
149
|
+
schema: w.GET_LOCATION,
|
|
177
150
|
method: "location"
|
|
178
151
|
},
|
|
179
152
|
GET_CHATS: {
|
|
180
|
-
schema:
|
|
153
|
+
schema: w.GET_CHATS,
|
|
181
154
|
method: "chats"
|
|
182
155
|
},
|
|
183
156
|
GET_CHATS_STATS: {
|
|
184
|
-
schema:
|
|
157
|
+
schema: w.GET_CHATS_STATS,
|
|
185
158
|
method: "chatsStats"
|
|
186
159
|
},
|
|
187
160
|
GET_CHAT: {
|
|
188
|
-
schema:
|
|
161
|
+
schema: w.GET_CHAT,
|
|
189
162
|
method: "chatById"
|
|
190
163
|
},
|
|
191
164
|
DELETE_CHAT: {
|
|
192
|
-
schema:
|
|
165
|
+
schema: w.DELETE_CHAT,
|
|
193
166
|
method: "deleteChat"
|
|
194
167
|
},
|
|
195
168
|
ABOUT: {
|
|
196
|
-
schema:
|
|
169
|
+
schema: w.ABOUT,
|
|
197
170
|
method: "about"
|
|
198
171
|
},
|
|
199
172
|
GET_USER_PREFERENCES: {
|
|
200
|
-
schema:
|
|
173
|
+
schema: w.GET_USER_PREFERENCES,
|
|
201
174
|
method: "getUserPreferences"
|
|
202
175
|
},
|
|
203
176
|
SET_USER_PREFERENCES: {
|
|
204
|
-
schema:
|
|
177
|
+
schema: w.SET_USER_PREFERENCES,
|
|
205
178
|
method: "setUserPreferences"
|
|
206
179
|
}
|
|
207
|
-
},
|
|
180
|
+
}, he = process.env.PUBLIC_SASSY_API_SERVER_URL, Ve = async ({
|
|
208
181
|
query: e,
|
|
209
182
|
data: r,
|
|
210
183
|
headers: t = {}
|
|
211
|
-
}) => await fetch(`${
|
|
184
|
+
}) => await fetch(`${he}/graphql`, {
|
|
212
185
|
method: "POST",
|
|
213
186
|
credentials: "include",
|
|
214
187
|
headers: {
|
|
@@ -220,39 +193,39 @@ const x = {
|
|
|
220
193
|
query: e,
|
|
221
194
|
variables: r
|
|
222
195
|
})
|
|
223
|
-
}),
|
|
196
|
+
}), Bt = async ({
|
|
224
197
|
accessToken: e,
|
|
225
198
|
type: r,
|
|
226
199
|
params: t = {}
|
|
227
200
|
}) => {
|
|
228
201
|
const a = r != null && r.data ? r.data(t) : t;
|
|
229
202
|
try {
|
|
230
|
-
const o = `Bearer ${e}`,
|
|
203
|
+
const o = `Bearer ${e}`, n = await Ve({
|
|
231
204
|
headers: {
|
|
232
205
|
authorization: o
|
|
233
206
|
},
|
|
234
207
|
query: r.schema,
|
|
235
208
|
data: a
|
|
236
209
|
});
|
|
237
|
-
if (
|
|
238
|
-
return { status:
|
|
239
|
-
const { data:
|
|
210
|
+
if (n.status !== 200)
|
|
211
|
+
return { status: n.status, data: [] };
|
|
212
|
+
const { data: l, errors: s } = await n.json();
|
|
240
213
|
return {
|
|
241
|
-
status:
|
|
242
|
-
data:
|
|
214
|
+
status: n.status,
|
|
215
|
+
data: l[r.method],
|
|
243
216
|
errors: s
|
|
244
217
|
};
|
|
245
218
|
} catch (o) {
|
|
246
219
|
return console.error(o), { status: 500, data: [] };
|
|
247
220
|
}
|
|
248
|
-
},
|
|
221
|
+
}, zt = async ({
|
|
249
222
|
accessToken: e,
|
|
250
223
|
name: r,
|
|
251
224
|
data: t,
|
|
252
225
|
method: a = "POST"
|
|
253
226
|
}) => {
|
|
254
227
|
const o = `Bearer ${e}`;
|
|
255
|
-
return await fetch(`${
|
|
228
|
+
return await fetch(`${he}/api/${r}`, {
|
|
256
229
|
method: a,
|
|
257
230
|
credentials: "include",
|
|
258
231
|
headers: {
|
|
@@ -261,11 +234,11 @@ const x = {
|
|
|
261
234
|
},
|
|
262
235
|
body: JSON.stringify(t)
|
|
263
236
|
});
|
|
264
|
-
},
|
|
237
|
+
}, Lt = N.createContext({
|
|
265
238
|
state: {
|
|
266
239
|
id: "",
|
|
267
|
-
model:
|
|
268
|
-
engine:
|
|
240
|
+
model: X,
|
|
241
|
+
engine: X,
|
|
269
242
|
usage: 0,
|
|
270
243
|
messages: [],
|
|
271
244
|
isComponent: !1,
|
|
@@ -277,14 +250,14 @@ const x = {
|
|
|
277
250
|
version: "",
|
|
278
251
|
models: [],
|
|
279
252
|
plugins: [],
|
|
280
|
-
engine:
|
|
253
|
+
engine: X,
|
|
281
254
|
engines: []
|
|
282
255
|
}
|
|
283
|
-
}),
|
|
256
|
+
}), Mt = N.createContext({
|
|
284
257
|
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
285
258
|
dispatch: () => {
|
|
286
259
|
}
|
|
287
|
-
}),
|
|
260
|
+
}), Ot = N.createContext({
|
|
288
261
|
state: { tag: "" },
|
|
289
262
|
dispatch: () => {
|
|
290
263
|
}
|
|
@@ -302,10 +275,10 @@ try {
|
|
|
302
275
|
});
|
|
303
276
|
} catch {
|
|
304
277
|
}
|
|
305
|
-
const
|
|
278
|
+
const G = "thead", K = "tfoot", A = "tbody", F = {
|
|
306
279
|
ASC: "asc",
|
|
307
280
|
DESC: "desc"
|
|
308
|
-
},
|
|
281
|
+
}, Ue = ({
|
|
309
282
|
mode: e,
|
|
310
283
|
className: r,
|
|
311
284
|
wrapperClassName: t,
|
|
@@ -336,7 +309,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
336
309
|
"text-copy-light dark:text-copy-dark": e === "system",
|
|
337
310
|
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
338
311
|
})
|
|
339
|
-
}),
|
|
312
|
+
}), Fe = ({
|
|
340
313
|
className: e,
|
|
341
314
|
stickyHeader: r,
|
|
342
315
|
mode: t
|
|
@@ -349,7 +322,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
349
322
|
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "alt-system"
|
|
350
323
|
},
|
|
351
324
|
e
|
|
352
|
-
),
|
|
325
|
+
), Pe = ({
|
|
353
326
|
className: e,
|
|
354
327
|
stickyFooter: r,
|
|
355
328
|
mode: t
|
|
@@ -362,11 +335,11 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
362
335
|
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "alt-system"
|
|
363
336
|
},
|
|
364
337
|
e
|
|
365
|
-
),
|
|
338
|
+
), Ge = ({
|
|
366
339
|
mode: e,
|
|
367
340
|
className: r,
|
|
368
341
|
cellWrapper: t
|
|
369
|
-
}) => t ===
|
|
342
|
+
}) => t === G || t === K ? i(
|
|
370
343
|
{
|
|
371
344
|
"bg-table-head-dark": e === "dark",
|
|
372
345
|
"bg-table-head-light": e === "light",
|
|
@@ -378,16 +351,16 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
378
351
|
"border-b last:border-0",
|
|
379
352
|
{
|
|
380
353
|
"border-table-dark": e === "dark",
|
|
381
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even": t ===
|
|
354
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even": t === A && e === "dark",
|
|
382
355
|
"border-table-light": e === "light",
|
|
383
|
-
"odd:bg-table-light-odd even:bg-table-light-even": t ===
|
|
356
|
+
"odd:bg-table-light-odd even:bg-table-light-even": t === A && e === "light",
|
|
384
357
|
"border-table-dark dark:border-table-light": e === "system",
|
|
385
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t ===
|
|
358
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === A && e === "system",
|
|
386
359
|
"border-table-light dark:border-table-dark": e === "alt-system",
|
|
387
|
-
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t ===
|
|
360
|
+
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === A && e === "alt-system"
|
|
388
361
|
},
|
|
389
362
|
r
|
|
390
|
-
),
|
|
363
|
+
), De = ({
|
|
391
364
|
cellWrapper: e,
|
|
392
365
|
className: r,
|
|
393
366
|
compact: t,
|
|
@@ -398,35 +371,35 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
398
371
|
"text-copy-dark": a === "light",
|
|
399
372
|
"text-copy-light dark:text-copy-dark": a === "system",
|
|
400
373
|
"text-copy-dark dark:text-copy-light": a === "alt-system",
|
|
401
|
-
"px-4 py-3": !t && (e ===
|
|
402
|
-
"p-4": !t && e ===
|
|
374
|
+
"px-4 py-3": !t && (e === G || e === K),
|
|
375
|
+
"p-4": !t && e === A,
|
|
403
376
|
"px-2 py-1.5": t
|
|
404
377
|
},
|
|
405
378
|
r
|
|
406
|
-
),
|
|
379
|
+
), We = ({
|
|
407
380
|
buttonClassName: e
|
|
408
|
-
}) => i("rounded-none text-sm", e),
|
|
381
|
+
}) => i("rounded-none text-sm", e), ce = "av-button", pe = "icon", je = "button", qe = "link", Je = ({
|
|
409
382
|
type: e,
|
|
410
383
|
size: r,
|
|
411
384
|
labelRight: t,
|
|
412
385
|
labelLeft: a,
|
|
413
386
|
align: o
|
|
414
387
|
}) => {
|
|
415
|
-
const
|
|
388
|
+
const n = "text-sm font-medium max-h-8 py-0 px-2", l = "text-base font-medium max-h-9 py-1 px-3", s = "text-lg font-medium max-h-12 py-2 px-4";
|
|
416
389
|
switch (e) {
|
|
417
|
-
case
|
|
390
|
+
case je:
|
|
418
391
|
return i({
|
|
419
|
-
[
|
|
420
|
-
[
|
|
392
|
+
[n]: r === "small",
|
|
393
|
+
[l]: r === "medium",
|
|
421
394
|
[s]: r === "large"
|
|
422
395
|
});
|
|
423
|
-
case
|
|
396
|
+
case qe:
|
|
424
397
|
return i("text-center", {
|
|
425
|
-
[
|
|
426
|
-
[
|
|
398
|
+
[n]: r === "small",
|
|
399
|
+
[l]: r === "medium",
|
|
427
400
|
[s]: r === "large"
|
|
428
401
|
});
|
|
429
|
-
case
|
|
402
|
+
case pe:
|
|
430
403
|
return i("inline-flex items-center", {
|
|
431
404
|
"justify-center": o === "center",
|
|
432
405
|
"justify-start": o === "left",
|
|
@@ -439,7 +412,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
439
412
|
"h-12 px-4 text-lg font-medium": r === "large" && (t || a)
|
|
440
413
|
});
|
|
441
414
|
}
|
|
442
|
-
},
|
|
415
|
+
}, Qe = ({
|
|
443
416
|
mode: e,
|
|
444
417
|
noBackground: r,
|
|
445
418
|
noTruncate: t,
|
|
@@ -496,7 +469,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
496
469
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
497
470
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
498
471
|
});
|
|
499
|
-
},
|
|
472
|
+
}, Xe = ({
|
|
500
473
|
mode: e,
|
|
501
474
|
disabled: r,
|
|
502
475
|
variant: t
|
|
@@ -531,7 +504,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
531
504
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
532
505
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
533
506
|
});
|
|
534
|
-
},
|
|
507
|
+
}, Ye = ({
|
|
535
508
|
mode: e,
|
|
536
509
|
disabled: r,
|
|
537
510
|
variant: t
|
|
@@ -566,7 +539,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
566
539
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
567
540
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
568
541
|
});
|
|
569
|
-
},
|
|
542
|
+
}, Ke = ({
|
|
570
543
|
mode: e,
|
|
571
544
|
noBorder: r,
|
|
572
545
|
variant: t
|
|
@@ -601,72 +574,72 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
|
|
|
601
574
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
602
575
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
603
576
|
});
|
|
604
|
-
},
|
|
577
|
+
}, Ze = ({
|
|
605
578
|
focusMode: e
|
|
606
579
|
}) => i("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
607
580
|
"focus:outline-focus-dark": e === "dark",
|
|
608
581
|
"focus:outline-focus-light": e === "light",
|
|
609
582
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
610
583
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
611
|
-
}),
|
|
584
|
+
}), et = ({
|
|
612
585
|
type: e,
|
|
613
586
|
className: r,
|
|
614
587
|
raw: t,
|
|
615
588
|
mode: a,
|
|
616
589
|
focusMode: o,
|
|
617
|
-
disabled:
|
|
618
|
-
fullWidth:
|
|
590
|
+
disabled: n,
|
|
591
|
+
fullWidth: l,
|
|
619
592
|
size: s,
|
|
620
593
|
noBorder: d,
|
|
621
594
|
labelRight: u,
|
|
622
595
|
labelLeft: m,
|
|
623
|
-
noBackground:
|
|
624
|
-
variant:
|
|
596
|
+
noBackground: h,
|
|
597
|
+
variant: g,
|
|
625
598
|
noTruncate: b,
|
|
626
599
|
align: p,
|
|
627
|
-
radius:
|
|
628
|
-
}) => (
|
|
629
|
-
|
|
630
|
-
|
|
600
|
+
radius: v
|
|
601
|
+
}) => (g || (g = "primary"), t ? i(ce, r) : i(
|
|
602
|
+
ce,
|
|
603
|
+
Qe({
|
|
631
604
|
mode: a,
|
|
632
|
-
variant:
|
|
633
|
-
noBackground:
|
|
605
|
+
variant: g,
|
|
606
|
+
noBackground: h,
|
|
634
607
|
noTruncate: b,
|
|
635
|
-
radius:
|
|
608
|
+
radius: v
|
|
636
609
|
}),
|
|
637
|
-
|
|
610
|
+
Je({
|
|
638
611
|
type: e,
|
|
639
612
|
size: s,
|
|
640
613
|
labelRight: u,
|
|
641
614
|
labelLeft: m,
|
|
642
615
|
align: p
|
|
643
616
|
}),
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
617
|
+
Ke({ mode: a, variant: g, noBorder: d }),
|
|
618
|
+
Ze({ focusMode: o }),
|
|
619
|
+
Xe({ mode: a, variant: g, disabled: n }),
|
|
620
|
+
Ye({ mode: a, variant: g, disabled: n }),
|
|
648
621
|
{
|
|
649
|
-
"w-full":
|
|
650
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
622
|
+
"w-full": l,
|
|
623
|
+
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
651
624
|
},
|
|
652
625
|
r
|
|
653
|
-
)),
|
|
626
|
+
)), tt = (e, r, t) => {
|
|
654
627
|
var a;
|
|
655
628
|
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
656
|
-
},
|
|
629
|
+
}, be = N.forwardRef((e, r) => {
|
|
657
630
|
const { onClick: t, noInternalClick: a = !1, ...o } = e;
|
|
658
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ c(
|
|
659
632
|
"button",
|
|
660
633
|
{
|
|
661
634
|
ref: r,
|
|
662
|
-
onClick: (
|
|
663
|
-
|
|
635
|
+
onClick: (n) => {
|
|
636
|
+
tt(n, a, t);
|
|
664
637
|
},
|
|
665
638
|
...o
|
|
666
639
|
}
|
|
667
640
|
);
|
|
668
641
|
});
|
|
669
|
-
|
|
642
|
+
be.displayName = "BaseButton";
|
|
670
643
|
/*!
|
|
671
644
|
@versini/ui-button v3.2.0
|
|
672
645
|
© 2024 gizmette.com
|
|
@@ -680,49 +653,49 @@ try {
|
|
|
680
653
|
});
|
|
681
654
|
} catch {
|
|
682
655
|
}
|
|
683
|
-
const
|
|
656
|
+
const ye = N.forwardRef(
|
|
684
657
|
({
|
|
685
658
|
children: e,
|
|
686
659
|
disabled: r = !1,
|
|
687
660
|
mode: t = "system",
|
|
688
661
|
focusMode: a = "system",
|
|
689
662
|
fullWidth: o = !1,
|
|
690
|
-
className:
|
|
691
|
-
type:
|
|
663
|
+
className: n,
|
|
664
|
+
type: l = "button",
|
|
692
665
|
raw: s = !1,
|
|
693
666
|
noBorder: d = !1,
|
|
694
667
|
"aria-label": u,
|
|
695
668
|
label: m,
|
|
696
|
-
size:
|
|
697
|
-
labelRight:
|
|
669
|
+
size: h = "medium",
|
|
670
|
+
labelRight: g,
|
|
698
671
|
labelLeft: b,
|
|
699
672
|
noBackground: p = !1,
|
|
700
|
-
align:
|
|
701
|
-
active:
|
|
702
|
-
radius:
|
|
703
|
-
...
|
|
704
|
-
},
|
|
705
|
-
const
|
|
706
|
-
type:
|
|
673
|
+
align: v = "center",
|
|
674
|
+
active: k = !1,
|
|
675
|
+
radius: _ = "large",
|
|
676
|
+
...M
|
|
677
|
+
}, O) => {
|
|
678
|
+
const V = et({
|
|
679
|
+
type: pe,
|
|
707
680
|
mode: t,
|
|
708
681
|
focusMode: a,
|
|
709
682
|
fullWidth: o,
|
|
710
683
|
disabled: r,
|
|
711
684
|
raw: s,
|
|
712
|
-
className:
|
|
685
|
+
className: n,
|
|
713
686
|
noBorder: d,
|
|
714
|
-
size:
|
|
715
|
-
labelRight:
|
|
687
|
+
size: h,
|
|
688
|
+
labelRight: g,
|
|
716
689
|
labelLeft: b,
|
|
717
690
|
noBackground: p,
|
|
718
|
-
align:
|
|
719
|
-
radius:
|
|
720
|
-
}),
|
|
691
|
+
align: v,
|
|
692
|
+
radius: _
|
|
693
|
+
}), D = i({
|
|
721
694
|
"text-copy-accent-dark": t === "light" && !s,
|
|
722
695
|
"text-copy-light": t === "dark" && !s,
|
|
723
696
|
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !s,
|
|
724
697
|
"text-copy-light dark:text-copy-accent-dark": t === "system" && !s
|
|
725
|
-
}),
|
|
698
|
+
}), W = k ? i(
|
|
726
699
|
"relative",
|
|
727
700
|
"focus-within:static",
|
|
728
701
|
"focus-within:after:border-transparent",
|
|
@@ -739,39 +712,39 @@ const ue = E.forwardRef(
|
|
|
739
712
|
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
740
713
|
}
|
|
741
714
|
) : "";
|
|
742
|
-
return /* @__PURE__ */
|
|
743
|
-
|
|
715
|
+
return /* @__PURE__ */ c("div", { className: W, children: /* @__PURE__ */ C(
|
|
716
|
+
be,
|
|
744
717
|
{
|
|
745
|
-
ref:
|
|
746
|
-
className:
|
|
718
|
+
ref: O,
|
|
719
|
+
className: V,
|
|
747
720
|
disabled: r,
|
|
748
|
-
type:
|
|
721
|
+
type: l,
|
|
749
722
|
"aria-label": u || m,
|
|
750
|
-
...
|
|
723
|
+
...M,
|
|
751
724
|
children: [
|
|
752
|
-
b && /* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
|
|
725
|
+
b && /* @__PURE__ */ c("span", { className: "pr-2", children: b }),
|
|
726
|
+
/* @__PURE__ */ c("div", { className: D, children: e }),
|
|
727
|
+
g && /* @__PURE__ */ c("span", { className: "pl-2", children: g })
|
|
755
728
|
]
|
|
756
729
|
}
|
|
757
730
|
) });
|
|
758
731
|
}
|
|
759
732
|
);
|
|
760
|
-
|
|
761
|
-
const
|
|
733
|
+
ye.displayName = "ButtonSort";
|
|
734
|
+
const Z = ({
|
|
762
735
|
children: e,
|
|
763
736
|
fill: r,
|
|
764
737
|
viewBox: t,
|
|
765
738
|
className: a,
|
|
766
739
|
defaultViewBox: o,
|
|
767
|
-
size:
|
|
768
|
-
title:
|
|
740
|
+
size: n,
|
|
741
|
+
title: l,
|
|
769
742
|
semantic: s = !1,
|
|
770
743
|
...d
|
|
771
744
|
}) => {
|
|
772
|
-
const u = i(
|
|
773
|
-
return /* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */
|
|
745
|
+
const u = i(n, a);
|
|
746
|
+
return /* @__PURE__ */ C(Le, { children: [
|
|
747
|
+
/* @__PURE__ */ c(
|
|
775
748
|
"svg",
|
|
776
749
|
{
|
|
777
750
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -785,7 +758,7 @@ const Y = ({
|
|
|
785
758
|
children: e
|
|
786
759
|
}
|
|
787
760
|
),
|
|
788
|
-
|
|
761
|
+
l && s && /* @__PURE__ */ c("span", { className: "sr-only", children: l })
|
|
789
762
|
] });
|
|
790
763
|
};
|
|
791
764
|
/*!
|
|
@@ -801,14 +774,14 @@ try {
|
|
|
801
774
|
});
|
|
802
775
|
} catch {
|
|
803
776
|
}
|
|
804
|
-
const
|
|
777
|
+
const rt = ({
|
|
805
778
|
className: e,
|
|
806
779
|
viewBox: r,
|
|
807
780
|
title: t,
|
|
808
781
|
monotone: a,
|
|
809
782
|
...o
|
|
810
|
-
}) => /* @__PURE__ */
|
|
811
|
-
|
|
783
|
+
}) => /* @__PURE__ */ C(
|
|
784
|
+
Z,
|
|
812
785
|
{
|
|
813
786
|
defaultViewBox: "0 0 576 512",
|
|
814
787
|
size: "size-5",
|
|
@@ -817,24 +790,24 @@ const Xe = ({
|
|
|
817
790
|
title: t || "Sort",
|
|
818
791
|
...o,
|
|
819
792
|
children: [
|
|
820
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ c(
|
|
821
794
|
"path",
|
|
822
795
|
{
|
|
823
796
|
opacity: a ? "1" : "0.4",
|
|
824
797
|
d: "M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L448 141.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V141.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96z"
|
|
825
798
|
}
|
|
826
799
|
),
|
|
827
|
-
/* @__PURE__ */
|
|
800
|
+
/* @__PURE__ */ c("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
|
|
828
801
|
]
|
|
829
802
|
}
|
|
830
|
-
),
|
|
803
|
+
), at = ({
|
|
831
804
|
className: e,
|
|
832
805
|
viewBox: r,
|
|
833
806
|
title: t,
|
|
834
807
|
monotone: a,
|
|
835
808
|
...o
|
|
836
|
-
}) => /* @__PURE__ */
|
|
837
|
-
|
|
809
|
+
}) => /* @__PURE__ */ C(
|
|
810
|
+
Z,
|
|
838
811
|
{
|
|
839
812
|
defaultViewBox: "0 0 576 512",
|
|
840
813
|
size: "size-5",
|
|
@@ -843,24 +816,24 @@ const Xe = ({
|
|
|
843
816
|
title: t || "Sort Down",
|
|
844
817
|
...o,
|
|
845
818
|
children: [
|
|
846
|
-
/* @__PURE__ */
|
|
819
|
+
/* @__PURE__ */ c(
|
|
847
820
|
"path",
|
|
848
821
|
{
|
|
849
822
|
opacity: a ? "1" : "0.4",
|
|
850
823
|
d: "M288 448c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32z"
|
|
851
824
|
}
|
|
852
825
|
),
|
|
853
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ c("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
|
|
854
827
|
]
|
|
855
828
|
}
|
|
856
|
-
),
|
|
829
|
+
), ot = ({
|
|
857
830
|
className: e,
|
|
858
831
|
viewBox: r,
|
|
859
832
|
title: t,
|
|
860
833
|
monotone: a,
|
|
861
834
|
...o
|
|
862
|
-
}) => /* @__PURE__ */
|
|
863
|
-
|
|
835
|
+
}) => /* @__PURE__ */ C(
|
|
836
|
+
Z,
|
|
864
837
|
{
|
|
865
838
|
defaultViewBox: "0 0 576 512",
|
|
866
839
|
size: "size-5",
|
|
@@ -869,14 +842,14 @@ const Xe = ({
|
|
|
869
842
|
title: t || "Sort Up",
|
|
870
843
|
...o,
|
|
871
844
|
children: [
|
|
872
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ c(
|
|
873
846
|
"path",
|
|
874
847
|
{
|
|
875
848
|
opacity: a ? "1" : "0.4",
|
|
876
849
|
d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32z"
|
|
877
850
|
}
|
|
878
851
|
),
|
|
879
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ c("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
|
|
880
853
|
]
|
|
881
854
|
}
|
|
882
855
|
);
|
|
@@ -893,174 +866,174 @@ try {
|
|
|
893
866
|
});
|
|
894
867
|
} catch {
|
|
895
868
|
}
|
|
896
|
-
const
|
|
869
|
+
const R = N.createContext({
|
|
897
870
|
mode: "light",
|
|
898
871
|
cellWrapper: "thead",
|
|
899
872
|
stickyHeader: !1,
|
|
900
873
|
stickyFooter: !1,
|
|
901
874
|
compact: !1
|
|
902
|
-
}),
|
|
875
|
+
}), Vt = ({
|
|
903
876
|
children: e,
|
|
904
877
|
mode: r = "system",
|
|
905
878
|
caption: t,
|
|
906
879
|
compact: a,
|
|
907
880
|
summary: o,
|
|
908
|
-
className:
|
|
909
|
-
wrapperClassName:
|
|
881
|
+
className: n,
|
|
882
|
+
wrapperClassName: l,
|
|
910
883
|
maxHeight: s,
|
|
911
884
|
stickyHeader: d,
|
|
912
885
|
stickyFooter: u,
|
|
913
886
|
...m
|
|
914
887
|
}) => {
|
|
915
|
-
const
|
|
888
|
+
const h = Ue({
|
|
916
889
|
mode: r,
|
|
917
|
-
className:
|
|
918
|
-
wrapperClassName:
|
|
890
|
+
className: n,
|
|
891
|
+
wrapperClassName: l,
|
|
919
892
|
stickyHeader: d,
|
|
920
893
|
stickyFooter: u
|
|
921
894
|
});
|
|
922
|
-
return /* @__PURE__ */
|
|
923
|
-
|
|
895
|
+
return /* @__PURE__ */ c(
|
|
896
|
+
R.Provider,
|
|
924
897
|
{
|
|
925
898
|
value: { mode: r, stickyHeader: d, stickyFooter: u, compact: a },
|
|
926
|
-
children: /* @__PURE__ */
|
|
899
|
+
children: /* @__PURE__ */ c(
|
|
927
900
|
"div",
|
|
928
901
|
{
|
|
929
|
-
className:
|
|
902
|
+
className: h.wrapper,
|
|
930
903
|
...s && {
|
|
931
904
|
style: { maxHeight: s }
|
|
932
905
|
},
|
|
933
|
-
children: /* @__PURE__ */
|
|
934
|
-
t && /* @__PURE__ */
|
|
906
|
+
children: /* @__PURE__ */ C("table", { className: h.table, summary: o, ...m, children: [
|
|
907
|
+
t && /* @__PURE__ */ c("caption", { className: h.caption, children: t }),
|
|
935
908
|
e
|
|
936
909
|
] })
|
|
937
910
|
}
|
|
938
911
|
)
|
|
939
912
|
}
|
|
940
913
|
);
|
|
941
|
-
},
|
|
914
|
+
}, Ut = ({
|
|
942
915
|
children: e,
|
|
943
916
|
className: r,
|
|
944
917
|
...t
|
|
945
918
|
}) => {
|
|
946
|
-
const a =
|
|
947
|
-
a.cellWrapper =
|
|
948
|
-
const o =
|
|
919
|
+
const a = L(R);
|
|
920
|
+
a.cellWrapper = G;
|
|
921
|
+
const o = Fe({
|
|
949
922
|
className: r,
|
|
950
923
|
mode: a.mode,
|
|
951
924
|
stickyHeader: a.stickyHeader
|
|
952
925
|
});
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
-
},
|
|
926
|
+
return /* @__PURE__ */ c("thead", { className: o, ...t, children: e });
|
|
927
|
+
}, Ft = ({
|
|
955
928
|
children: e,
|
|
956
929
|
className: r,
|
|
957
930
|
...t
|
|
958
931
|
}) => {
|
|
959
|
-
const a =
|
|
960
|
-
a.cellWrapper =
|
|
961
|
-
const o =
|
|
932
|
+
const a = L(R);
|
|
933
|
+
a.cellWrapper = K;
|
|
934
|
+
const o = Pe({
|
|
962
935
|
className: r,
|
|
963
936
|
mode: a.mode,
|
|
964
937
|
stickyFooter: a.stickyFooter
|
|
965
938
|
});
|
|
966
|
-
return /* @__PURE__ */
|
|
967
|
-
},
|
|
968
|
-
const t =
|
|
969
|
-
return t.cellWrapper =
|
|
970
|
-
},
|
|
939
|
+
return /* @__PURE__ */ c("tfoot", { className: o, ...t, children: e });
|
|
940
|
+
}, Pt = ({ children: e, ...r }) => {
|
|
941
|
+
const t = L(R);
|
|
942
|
+
return t.cellWrapper = A, /* @__PURE__ */ c("tbody", { ...r, children: e });
|
|
943
|
+
}, Gt = ({
|
|
971
944
|
children: e,
|
|
972
945
|
className: r,
|
|
973
946
|
...t
|
|
974
947
|
}) => {
|
|
975
|
-
const a =
|
|
948
|
+
const a = L(R), o = Ge({
|
|
976
949
|
mode: a.mode,
|
|
977
950
|
cellWrapper: a.cellWrapper,
|
|
978
951
|
className: r
|
|
979
952
|
});
|
|
980
|
-
return /* @__PURE__ */
|
|
981
|
-
},
|
|
953
|
+
return /* @__PURE__ */ c("tr", { className: o, ...t, children: e });
|
|
954
|
+
}, nt = ({
|
|
982
955
|
children: e,
|
|
983
956
|
component: r,
|
|
984
957
|
className: t,
|
|
985
958
|
...a
|
|
986
959
|
}) => {
|
|
987
|
-
const o =
|
|
960
|
+
const o = L(R), n = r || (o.cellWrapper === G ? "th" : "td"), l = De({
|
|
988
961
|
cellWrapper: o.cellWrapper,
|
|
989
962
|
className: t,
|
|
990
963
|
mode: o.mode,
|
|
991
964
|
compact: o.compact
|
|
992
965
|
});
|
|
993
|
-
return /* @__PURE__ */
|
|
994
|
-
},
|
|
966
|
+
return /* @__PURE__ */ c(n, { className: l, ...a, children: e });
|
|
967
|
+
}, Dt = ({
|
|
995
968
|
align: e,
|
|
996
969
|
children: r,
|
|
997
970
|
buttonClassName: t,
|
|
998
971
|
className: a,
|
|
999
972
|
component: o,
|
|
1000
|
-
focusMode:
|
|
1001
|
-
mode:
|
|
973
|
+
focusMode: n = "alt-system",
|
|
974
|
+
mode: l = "alt-system",
|
|
1002
975
|
onClick: s,
|
|
1003
976
|
sortDirection: d,
|
|
1004
977
|
sortedCell: u,
|
|
1005
978
|
cellId: m,
|
|
1006
|
-
...
|
|
979
|
+
...h
|
|
1007
980
|
}) => {
|
|
1008
|
-
const
|
|
1009
|
-
return /* @__PURE__ */
|
|
1010
|
-
|
|
981
|
+
const g = We({ buttonClassName: t });
|
|
982
|
+
return /* @__PURE__ */ c(
|
|
983
|
+
nt,
|
|
1011
984
|
{
|
|
1012
985
|
component: o,
|
|
1013
986
|
className: a,
|
|
1014
987
|
role: "columnheader",
|
|
1015
|
-
"aria-sort": d ===
|
|
1016
|
-
...
|
|
1017
|
-
children: /* @__PURE__ */
|
|
1018
|
-
|
|
988
|
+
"aria-sort": d === F.ASC && u === m ? "ascending" : d === F.DESC && u === m ? "descending" : "other",
|
|
989
|
+
...h,
|
|
990
|
+
children: /* @__PURE__ */ c(
|
|
991
|
+
ye,
|
|
1019
992
|
{
|
|
1020
993
|
active: u === m,
|
|
1021
|
-
className:
|
|
994
|
+
className: g,
|
|
1022
995
|
onClick: s,
|
|
1023
996
|
align: e,
|
|
1024
997
|
noBorder: !0,
|
|
1025
|
-
focusMode:
|
|
1026
|
-
mode:
|
|
998
|
+
focusMode: n,
|
|
999
|
+
mode: l,
|
|
1027
1000
|
fullWidth: !0,
|
|
1028
1001
|
labelRight: r,
|
|
1029
|
-
children: d ===
|
|
1002
|
+
children: d === F.ASC && u === m ? /* @__PURE__ */ c(ot, { className: "size-4", monotone: !0 }) : d === F.DESC && u === m ? /* @__PURE__ */ c(at, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(rt, { className: "size-4", monotone: !0 })
|
|
1030
1003
|
}
|
|
1031
1004
|
)
|
|
1032
1005
|
}
|
|
1033
1006
|
);
|
|
1034
1007
|
};
|
|
1035
1008
|
/*!
|
|
1036
|
-
@versini/ui-textarea v2.
|
|
1009
|
+
@versini/ui-textarea v2.1.1
|
|
1037
1010
|
© 2024 gizmette.com
|
|
1038
1011
|
*/
|
|
1039
1012
|
try {
|
|
1040
1013
|
window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
|
|
1041
|
-
version: "2.
|
|
1042
|
-
buildTime: "12/
|
|
1014
|
+
version: "2.1.1",
|
|
1015
|
+
buildTime: "12/31/2024 06:19 PM EST",
|
|
1043
1016
|
homepage: "https://github.com/aversini/ui-components",
|
|
1044
1017
|
license: "MIT"
|
|
1045
1018
|
});
|
|
1046
1019
|
} catch {
|
|
1047
1020
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1050
|
-
const e =
|
|
1051
|
-
return
|
|
1021
|
+
const fe = "av-text-area", it = "av-text-area-wrapper", Y = "av-text-area-helper-text", lt = "av-text-area__control--right", st = "av-text-area__control--left";
|
|
1022
|
+
function ct() {
|
|
1023
|
+
const e = f(!1);
|
|
1024
|
+
return z(() => (e.current = !0, () => {
|
|
1052
1025
|
e.current = !1;
|
|
1053
|
-
}), []),
|
|
1026
|
+
}), []), P(() => e.current, []);
|
|
1054
1027
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return
|
|
1028
|
+
function dt(e) {
|
|
1029
|
+
return me(() => e.every((r) => r == null) ? () => {
|
|
1057
1030
|
} : (r) => {
|
|
1058
1031
|
e.forEach((t) => {
|
|
1059
1032
|
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
1060
1033
|
});
|
|
1061
1034
|
}, e);
|
|
1062
1035
|
}
|
|
1063
|
-
const
|
|
1036
|
+
const ut = {
|
|
1064
1037
|
x: 0,
|
|
1065
1038
|
y: 0,
|
|
1066
1039
|
width: 0,
|
|
@@ -1070,18 +1043,18 @@ const ot = {
|
|
|
1070
1043
|
bottom: 0,
|
|
1071
1044
|
right: 0
|
|
1072
1045
|
};
|
|
1073
|
-
function
|
|
1074
|
-
const r =
|
|
1046
|
+
function de(e) {
|
|
1047
|
+
const r = ct(), t = f(0), a = f(null), [o, n] = $(ut), l = me(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
|
|
1075
1048
|
const d = s[0];
|
|
1076
1049
|
d && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
1077
|
-
a.current && r() &&
|
|
1050
|
+
a.current && r() && n(d.contentRect);
|
|
1078
1051
|
}));
|
|
1079
1052
|
}), [r]);
|
|
1080
|
-
return
|
|
1081
|
-
|
|
1082
|
-
}), [
|
|
1053
|
+
return z(() => (a.current && (l == null || l.observe(a.current, e)), () => {
|
|
1054
|
+
l == null || l.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
1055
|
+
}), [l, e]), [a, o];
|
|
1083
1056
|
}
|
|
1084
|
-
function
|
|
1057
|
+
function mt({
|
|
1085
1058
|
value: e,
|
|
1086
1059
|
defaultValue: r,
|
|
1087
1060
|
finalValue: t,
|
|
@@ -1089,19 +1062,19 @@ function nt({
|
|
|
1089
1062
|
},
|
|
1090
1063
|
initialControlledDelay: o = 0
|
|
1091
1064
|
}) {
|
|
1092
|
-
const [
|
|
1065
|
+
const [n, l] = $(!1), [s, d] = $(
|
|
1093
1066
|
r !== void 0 ? r : t
|
|
1094
1067
|
), u = (m) => {
|
|
1095
1068
|
d(m), a == null || a(m);
|
|
1096
1069
|
};
|
|
1097
|
-
return
|
|
1098
|
-
(async () => e !== void 0 && !
|
|
1070
|
+
return z(() => {
|
|
1071
|
+
(async () => e !== void 0 && !n && o > 0 && (await new Promise(
|
|
1099
1072
|
(m) => setTimeout(m, o)
|
|
1100
|
-
),
|
|
1101
|
-
}, [e, o,
|
|
1073
|
+
), l(!0)))();
|
|
1074
|
+
}, [e, o, n]), e !== void 0 ? !n && o > 0 ? ["", a, !0] : [e, a, !0] : [s, u, !1];
|
|
1102
1075
|
}
|
|
1103
|
-
function
|
|
1104
|
-
const r =
|
|
1076
|
+
function gt(e) {
|
|
1077
|
+
const r = Be();
|
|
1105
1078
|
if (!e)
|
|
1106
1079
|
return r;
|
|
1107
1080
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -1111,7 +1084,7 @@ function ct(e) {
|
|
|
1111
1084
|
return typeof t == "number" || typeof t == "string" ? `${a}${t}` : `${a}${r}`;
|
|
1112
1085
|
}
|
|
1113
1086
|
}
|
|
1114
|
-
const
|
|
1087
|
+
const ke = "SET_ANNOUNCEMENT", ve = "CLEAR_ANNOUNCEMENT", ht = {
|
|
1115
1088
|
alert: null,
|
|
1116
1089
|
alertdialog: null,
|
|
1117
1090
|
log: "polite",
|
|
@@ -1119,14 +1092,14 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", st = {
|
|
|
1119
1092
|
progressbar: null,
|
|
1120
1093
|
status: "polite",
|
|
1121
1094
|
timer: "assertive"
|
|
1122
|
-
},
|
|
1095
|
+
}, pt = (e, r) => {
|
|
1123
1096
|
switch (r == null ? void 0 : r.type) {
|
|
1124
|
-
case
|
|
1097
|
+
case ke:
|
|
1125
1098
|
return {
|
|
1126
1099
|
...e,
|
|
1127
1100
|
announcement: r.payload
|
|
1128
1101
|
};
|
|
1129
|
-
case
|
|
1102
|
+
case ve:
|
|
1130
1103
|
return {
|
|
1131
1104
|
...e,
|
|
1132
1105
|
announcement: null
|
|
@@ -1134,14 +1107,14 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", st = {
|
|
|
1134
1107
|
default:
|
|
1135
1108
|
return e;
|
|
1136
1109
|
}
|
|
1137
|
-
},
|
|
1110
|
+
}, bt = ({
|
|
1138
1111
|
onAnnouncementClear: e,
|
|
1139
1112
|
dispatch: r
|
|
1140
1113
|
}) => {
|
|
1141
1114
|
r({
|
|
1142
|
-
type:
|
|
1115
|
+
type: ve
|
|
1143
1116
|
}), typeof e == "function" && e();
|
|
1144
|
-
},
|
|
1117
|
+
}, ue = ({
|
|
1145
1118
|
children: e,
|
|
1146
1119
|
clearAnnouncementDelay: r,
|
|
1147
1120
|
clearAnnouncementTimeoutRef: t,
|
|
@@ -1149,80 +1122,80 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", st = {
|
|
|
1149
1122
|
dispatch: o
|
|
1150
1123
|
}) => {
|
|
1151
1124
|
clearTimeout(t.current), e !== null && o({
|
|
1152
|
-
type:
|
|
1125
|
+
type: ke,
|
|
1153
1126
|
payload: e
|
|
1154
1127
|
}), r && (t.current = setTimeout(
|
|
1155
|
-
() =>
|
|
1128
|
+
() => bt({
|
|
1156
1129
|
onAnnouncementClear: a,
|
|
1157
1130
|
dispatch: o
|
|
1158
1131
|
}),
|
|
1159
1132
|
r
|
|
1160
1133
|
));
|
|
1161
|
-
},
|
|
1134
|
+
}, yt = ({
|
|
1162
1135
|
children: e,
|
|
1163
1136
|
announcementTimeoutRef: r,
|
|
1164
1137
|
announcementDelay: t,
|
|
1165
1138
|
clearAnnouncementDelay: a,
|
|
1166
1139
|
clearAnnouncementTimeoutRef: o,
|
|
1167
|
-
onAnnouncementClear:
|
|
1168
|
-
dispatch:
|
|
1140
|
+
onAnnouncementClear: n,
|
|
1141
|
+
dispatch: l
|
|
1169
1142
|
}) => {
|
|
1170
|
-
clearTimeout(r.current), t ? r.current = setTimeout(
|
|
1143
|
+
clearTimeout(r.current), t ? r.current = setTimeout(ue, t, {
|
|
1171
1144
|
children: e,
|
|
1172
1145
|
clearAnnouncementDelay: a,
|
|
1173
1146
|
clearAnnouncementTimeoutRef: o,
|
|
1174
|
-
onAnnouncementClear:
|
|
1175
|
-
dispatch:
|
|
1176
|
-
}) :
|
|
1147
|
+
onAnnouncementClear: n,
|
|
1148
|
+
dispatch: l
|
|
1149
|
+
}) : ue({
|
|
1177
1150
|
children: e,
|
|
1178
1151
|
clearAnnouncementDelay: a,
|
|
1179
1152
|
clearAnnouncementTimeoutRef: o,
|
|
1180
|
-
onAnnouncementClear:
|
|
1181
|
-
dispatch:
|
|
1153
|
+
onAnnouncementClear: n,
|
|
1154
|
+
dispatch: l
|
|
1182
1155
|
});
|
|
1183
1156
|
};
|
|
1184
|
-
function
|
|
1157
|
+
function ft({
|
|
1185
1158
|
children: e,
|
|
1186
1159
|
className: r,
|
|
1187
1160
|
politeness: t,
|
|
1188
1161
|
role: a = null,
|
|
1189
1162
|
announcementDelay: o,
|
|
1190
|
-
clearAnnouncementDelay:
|
|
1191
|
-
onAnnouncementClear:
|
|
1163
|
+
clearAnnouncementDelay: n,
|
|
1164
|
+
onAnnouncementClear: l,
|
|
1192
1165
|
visible: s,
|
|
1193
1166
|
...d
|
|
1194
1167
|
}) {
|
|
1195
|
-
const u =
|
|
1168
|
+
const u = f(null), m = f(null), [h, g] = ze(pt, {
|
|
1196
1169
|
announcement: null
|
|
1197
1170
|
});
|
|
1198
1171
|
let b = t;
|
|
1199
|
-
typeof b > "u" && (b = a ?
|
|
1200
|
-
|
|
1172
|
+
typeof b > "u" && (b = a ? ht[a] : "assertive"), z(() => {
|
|
1173
|
+
yt({
|
|
1201
1174
|
announcementTimeoutRef: u,
|
|
1202
1175
|
announcementDelay: o,
|
|
1203
1176
|
children: e,
|
|
1204
|
-
clearAnnouncementDelay:
|
|
1177
|
+
clearAnnouncementDelay: n,
|
|
1205
1178
|
clearAnnouncementTimeoutRef: m,
|
|
1206
|
-
onAnnouncementClear:
|
|
1207
|
-
dispatch:
|
|
1179
|
+
onAnnouncementClear: l,
|
|
1180
|
+
dispatch: g
|
|
1208
1181
|
});
|
|
1209
1182
|
}, [
|
|
1210
1183
|
e,
|
|
1211
1184
|
o,
|
|
1212
|
-
|
|
1213
|
-
|
|
1185
|
+
n,
|
|
1186
|
+
l
|
|
1214
1187
|
]);
|
|
1215
1188
|
const p = i(r, {
|
|
1216
1189
|
"sr-only": !s
|
|
1217
1190
|
});
|
|
1218
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ c(
|
|
1219
1192
|
"div",
|
|
1220
1193
|
{
|
|
1221
1194
|
"aria-live": b,
|
|
1222
1195
|
...a && { role: a },
|
|
1223
1196
|
className: p,
|
|
1224
1197
|
...d,
|
|
1225
|
-
children:
|
|
1198
|
+
children: h.announcement
|
|
1226
1199
|
}
|
|
1227
1200
|
);
|
|
1228
1201
|
}
|
|
@@ -1233,27 +1206,25 @@ function mt({
|
|
|
1233
1206
|
try {
|
|
1234
1207
|
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
1235
1208
|
version: "1.2.7",
|
|
1236
|
-
buildTime: "12/
|
|
1209
|
+
buildTime: "12/31/2024 06:19 PM EST",
|
|
1237
1210
|
homepage: "https://github.com/aversini/ui-components",
|
|
1238
1211
|
license: "MIT"
|
|
1239
1212
|
});
|
|
1240
1213
|
} catch {
|
|
1241
1214
|
}
|
|
1242
|
-
const
|
|
1243
|
-
mode: e
|
|
1244
|
-
}) => i({
|
|
1215
|
+
const kt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", vt = ({ mode: e }) => i({
|
|
1245
1216
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
1246
1217
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
1247
1218
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
1248
1219
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
1249
|
-
}),
|
|
1220
|
+
}), xt = ({
|
|
1250
1221
|
focusMode: e
|
|
1251
1222
|
}) => i("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
1252
1223
|
"focus:outline-focus-dark": e === "dark",
|
|
1253
1224
|
"focus:outline-focus-light": e === "light",
|
|
1254
1225
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1255
1226
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1256
|
-
}),
|
|
1227
|
+
}), _t = ({
|
|
1257
1228
|
noBorder: e,
|
|
1258
1229
|
error: r
|
|
1259
1230
|
}) => i("border-2", {
|
|
@@ -1261,31 +1232,46 @@ const ht = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1261
1232
|
"focus:border-border-dark": !e && r,
|
|
1262
1233
|
"border-border-error-dark": !e && r,
|
|
1263
1234
|
"border-transparent": e
|
|
1264
|
-
}),
|
|
1235
|
+
}), Et = ({
|
|
1265
1236
|
disabled: e,
|
|
1266
1237
|
raw: r,
|
|
1267
1238
|
error: t,
|
|
1268
|
-
mode: a
|
|
1239
|
+
mode: a,
|
|
1240
|
+
leftElement: o,
|
|
1241
|
+
rightElement: n
|
|
1269
1242
|
}) => {
|
|
1270
1243
|
if (r)
|
|
1271
1244
|
return "";
|
|
1272
1245
|
if (e)
|
|
1273
|
-
return i(
|
|
1246
|
+
return i(
|
|
1247
|
+
"transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
|
|
1248
|
+
{
|
|
1249
|
+
"translate-x-[12px]": n === !0 && !o || !n && !o
|
|
1250
|
+
}
|
|
1251
|
+
);
|
|
1274
1252
|
if (!t)
|
|
1275
|
-
return i(
|
|
1276
|
-
"text-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1253
|
+
return i(
|
|
1254
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
1255
|
+
{
|
|
1256
|
+
"translate-x-[12px]": n === !0 && !o || !n && !o,
|
|
1257
|
+
"text-copy-medium": a === "dark",
|
|
1258
|
+
"text-copy-dark": a === "light",
|
|
1259
|
+
"text-copy-dark dark:text-copy-medium": a === "system",
|
|
1260
|
+
"text-copy-medium dark:text-copy-dark": a === "alt-system"
|
|
1261
|
+
}
|
|
1262
|
+
);
|
|
1281
1263
|
if (t)
|
|
1282
|
-
return i(
|
|
1283
|
-
"text-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1264
|
+
return i(
|
|
1265
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
1266
|
+
{
|
|
1267
|
+
"translate-x-[12px]": n === !0 && !o || !n && !o,
|
|
1268
|
+
"text-copy-medium": a === "dark",
|
|
1269
|
+
"text-copy-error-dark": a === "light",
|
|
1270
|
+
"text-copy-error-dark dark:text-copy-error-light": a === "system",
|
|
1271
|
+
"text-copy-medium dark:text-copy-error-dark": a === "alt-system"
|
|
1272
|
+
}
|
|
1273
|
+
);
|
|
1274
|
+
}, wt = ({
|
|
1289
1275
|
error: e,
|
|
1290
1276
|
raw: r,
|
|
1291
1277
|
mode: t,
|
|
@@ -1295,245 +1281,273 @@ const ht = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1295
1281
|
return "";
|
|
1296
1282
|
if (a)
|
|
1297
1283
|
return i(
|
|
1298
|
-
|
|
1284
|
+
Y,
|
|
1299
1285
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
1300
1286
|
);
|
|
1301
1287
|
if (!e)
|
|
1302
|
-
return i(
|
|
1288
|
+
return i(Y, "absolute px-2 font-medium", {
|
|
1303
1289
|
"text-copy-medium": t === "dark",
|
|
1304
1290
|
"text-copy-dark": t === "light",
|
|
1305
1291
|
"text-copy-dark dark:text-copy-medium": t === "system",
|
|
1306
1292
|
"text-copy-medium dark:text-copy-dark": t === "alt-system"
|
|
1307
1293
|
});
|
|
1308
1294
|
if (e)
|
|
1309
|
-
return i(
|
|
1295
|
+
return i(Y, "absolute px-2 font-medium", {
|
|
1310
1296
|
"text-copy-error-light": t === "dark",
|
|
1311
1297
|
"text-copy-error-dark": t === "light",
|
|
1312
1298
|
"text-copy-error-dark dark:text-copy-error-light": t === "system",
|
|
1313
1299
|
"dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
|
|
1314
1300
|
});
|
|
1315
|
-
},
|
|
1301
|
+
}, St = ({
|
|
1316
1302
|
className: e,
|
|
1317
1303
|
textAreaClassName: r,
|
|
1318
1304
|
raw: t,
|
|
1319
1305
|
focusMode: a,
|
|
1320
1306
|
disabled: o,
|
|
1321
|
-
noBorder:
|
|
1322
|
-
error:
|
|
1323
|
-
mode: s
|
|
1307
|
+
noBorder: n,
|
|
1308
|
+
error: l,
|
|
1309
|
+
mode: s,
|
|
1310
|
+
leftElement: d,
|
|
1311
|
+
rightElement: u
|
|
1324
1312
|
}) => {
|
|
1325
|
-
const
|
|
1313
|
+
const m = t ? e : i(
|
|
1326
1314
|
"relative flex w-full flex-col justify-center",
|
|
1327
|
-
|
|
1315
|
+
it,
|
|
1328
1316
|
e
|
|
1329
|
-
),
|
|
1330
|
-
|
|
1317
|
+
), h = t ? i(r) : i(
|
|
1318
|
+
fe,
|
|
1331
1319
|
r,
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
noBorder:
|
|
1337
|
-
error:
|
|
1320
|
+
kt(),
|
|
1321
|
+
vt({ mode: s }),
|
|
1322
|
+
xt({ focusMode: a }),
|
|
1323
|
+
_t({
|
|
1324
|
+
noBorder: n,
|
|
1325
|
+
error: l
|
|
1338
1326
|
}),
|
|
1339
1327
|
{
|
|
1340
1328
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
1341
1329
|
}
|
|
1342
|
-
),
|
|
1330
|
+
), g = t ? void 0 : "sr-only", b = Et({
|
|
1343
1331
|
disabled: o,
|
|
1344
1332
|
raw: t,
|
|
1345
|
-
error:
|
|
1346
|
-
mode: s
|
|
1347
|
-
|
|
1348
|
-
|
|
1333
|
+
error: l,
|
|
1334
|
+
mode: s,
|
|
1335
|
+
rightElement: u,
|
|
1336
|
+
leftElement: d
|
|
1337
|
+
}), p = wt({
|
|
1338
|
+
error: l,
|
|
1349
1339
|
raw: t,
|
|
1350
1340
|
mode: s,
|
|
1351
1341
|
disabled: o
|
|
1352
|
-
}),
|
|
1342
|
+
}), v = t ? void 0 : i(lt, "absolute"), k = t ? void 0 : i(st, "absolute");
|
|
1353
1343
|
return {
|
|
1354
|
-
wrapper:
|
|
1355
|
-
textArea:
|
|
1356
|
-
accessibleLabel:
|
|
1357
|
-
visibleLabel:
|
|
1358
|
-
helperText:
|
|
1359
|
-
rightElement:
|
|
1344
|
+
wrapper: m,
|
|
1345
|
+
textArea: h,
|
|
1346
|
+
accessibleLabel: g,
|
|
1347
|
+
visibleLabel: b,
|
|
1348
|
+
helperText: p,
|
|
1349
|
+
rightElement: v,
|
|
1350
|
+
leftElement: k
|
|
1360
1351
|
};
|
|
1361
|
-
},
|
|
1352
|
+
}, Tt = ({
|
|
1362
1353
|
scrollHeight: e,
|
|
1363
1354
|
currentHeight: r,
|
|
1364
1355
|
currentLabelOffset: t = 0,
|
|
1365
1356
|
currentHelperTextOffset: a = 0
|
|
1366
1357
|
}) => {
|
|
1367
|
-
let o,
|
|
1358
|
+
let o, n;
|
|
1368
1359
|
if (e > 0 && e !== r) {
|
|
1369
|
-
const
|
|
1370
|
-
o = t + -1 * Math.sign(
|
|
1360
|
+
const l = e - r, s = Math.abs(l / 24);
|
|
1361
|
+
o = t + -1 * Math.sign(l) * (12 * s), n = a + Math.sign(l) * (12 * s);
|
|
1371
1362
|
}
|
|
1372
1363
|
return {
|
|
1373
1364
|
labelOffset: o,
|
|
1374
|
-
helperTextOffset:
|
|
1365
|
+
helperTextOffset: n,
|
|
1375
1366
|
scrollHeight: e
|
|
1376
1367
|
};
|
|
1377
|
-
},
|
|
1368
|
+
}, Nt = N.forwardRef(
|
|
1378
1369
|
({
|
|
1379
1370
|
id: e,
|
|
1380
1371
|
name: r,
|
|
1381
1372
|
label: t,
|
|
1382
1373
|
error: a = !1,
|
|
1383
1374
|
raw: o = !1,
|
|
1384
|
-
className:
|
|
1385
|
-
textAreaClassName:
|
|
1375
|
+
className: n,
|
|
1376
|
+
textAreaClassName: l,
|
|
1386
1377
|
mode: s = "system",
|
|
1387
1378
|
focusMode: d = "system",
|
|
1388
1379
|
value: u,
|
|
1389
1380
|
defaultValue: m,
|
|
1390
|
-
disabled:
|
|
1391
|
-
noBorder:
|
|
1381
|
+
disabled: h = !1,
|
|
1382
|
+
noBorder: g = !1,
|
|
1392
1383
|
labelId: b,
|
|
1393
1384
|
helperText: p = "",
|
|
1394
|
-
helperTextOnFocus:
|
|
1395
|
-
rightElement:
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
),
|
|
1404
|
-
|
|
1405
|
-
|
|
1385
|
+
helperTextOnFocus: v = !1,
|
|
1386
|
+
rightElement: k,
|
|
1387
|
+
leftElement: _,
|
|
1388
|
+
onChange: M,
|
|
1389
|
+
onFocus: O,
|
|
1390
|
+
onBlur: V,
|
|
1391
|
+
...D
|
|
1392
|
+
}, W) => {
|
|
1393
|
+
var ee;
|
|
1394
|
+
const x = f(null), xe = dt([W, x]), [_e, U] = de(), [Ee, I] = de(), j = f(80), te = f(-25), S = f(null), re = f(30), q = f(null), H = gt({ id: e, prefix: `${fe}-` }), [ae, we] = $(0), [oe, Se] = $(0), [Te, ne] = $(
|
|
1395
|
+
!!(!v && p)
|
|
1396
|
+
), Ne = `${r} error, ${p}`, T = St({
|
|
1397
|
+
className: n,
|
|
1398
|
+
textAreaClassName: l,
|
|
1406
1399
|
error: a,
|
|
1407
1400
|
raw: o,
|
|
1408
1401
|
focusMode: d,
|
|
1409
|
-
disabled:
|
|
1410
|
-
noBorder:
|
|
1411
|
-
mode: s
|
|
1412
|
-
|
|
1402
|
+
disabled: h,
|
|
1403
|
+
noBorder: g,
|
|
1404
|
+
mode: s,
|
|
1405
|
+
rightElement: !!k,
|
|
1406
|
+
leftElement: !!_
|
|
1407
|
+
}), [E, Ce] = mt({
|
|
1413
1408
|
value: u,
|
|
1414
1409
|
initialControlledDelay: 20,
|
|
1415
1410
|
defaultValue: m,
|
|
1416
1411
|
onChange: (y) => {
|
|
1417
|
-
|
|
1412
|
+
M && M({
|
|
1418
1413
|
target: {
|
|
1419
1414
|
value: y
|
|
1420
1415
|
}
|
|
1421
1416
|
});
|
|
1422
1417
|
}
|
|
1423
|
-
}),
|
|
1424
|
-
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1427
|
-
},
|
|
1428
|
-
|
|
1418
|
+
}), Ie = (y) => {
|
|
1419
|
+
Ce(y.target.value);
|
|
1420
|
+
}, Ae = (y) => {
|
|
1421
|
+
v && p && ne(!0), O && O(y);
|
|
1422
|
+
}, $e = (y) => {
|
|
1423
|
+
v && p && !E && ne(!1), V && V(y);
|
|
1429
1424
|
};
|
|
1430
|
-
return
|
|
1431
|
-
|
|
1432
|
-
}, [
|
|
1433
|
-
|
|
1434
|
-
}, [
|
|
1425
|
+
return B(() => {
|
|
1426
|
+
U && U.width && we(U.width + 18 + 10);
|
|
1427
|
+
}, [U]), B(() => {
|
|
1428
|
+
I && I.width && Se(I.width + 18 + 10);
|
|
1429
|
+
}, [I]), B(() => {
|
|
1430
|
+
o || x && x.current && E !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
|
|
1431
|
+
}, [E, o]), B(() => {
|
|
1435
1432
|
o || setTimeout(() => {
|
|
1436
1433
|
var y;
|
|
1437
|
-
(y =
|
|
1434
|
+
(y = S == null ? void 0 : S.current) == null || y.style.setProperty(
|
|
1438
1435
|
"--av-text-area-wrapper-transition",
|
|
1439
|
-
|
|
1436
|
+
E ? "none" : "all 0.2s ease-out"
|
|
1440
1437
|
);
|
|
1441
1438
|
}, 0);
|
|
1442
|
-
}, [
|
|
1443
|
-
var y,
|
|
1444
|
-
if (!o &&
|
|
1445
|
-
const { labelOffset:
|
|
1446
|
-
scrollHeight:
|
|
1447
|
-
currentHeight:
|
|
1448
|
-
currentLabelOffset:
|
|
1449
|
-
currentHelperTextOffset:
|
|
1439
|
+
}, [E, o]), B(() => {
|
|
1440
|
+
var y, ie;
|
|
1441
|
+
if (!o && x && x.current && E !== void 0) {
|
|
1442
|
+
const { labelOffset: J, helperTextOffset: Q, scrollHeight: Re } = Tt({
|
|
1443
|
+
scrollHeight: x.current.scrollHeight,
|
|
1444
|
+
currentHeight: j.current,
|
|
1445
|
+
currentLabelOffset: te.current,
|
|
1446
|
+
currentHelperTextOffset: re.current
|
|
1450
1447
|
});
|
|
1451
|
-
|
|
1448
|
+
J && (te.current = J, (y = S == null ? void 0 : S.current) == null || y.style.setProperty(
|
|
1452
1449
|
"--av-text-area-label",
|
|
1453
|
-
`${
|
|
1454
|
-
)),
|
|
1450
|
+
`${J}px`
|
|
1451
|
+
)), Q && (re.current = Q, (ie = q == null ? void 0 : q.current) == null || ie.style.setProperty(
|
|
1455
1452
|
"--av-text-area-helper-text",
|
|
1456
|
-
`${
|
|
1457
|
-
)),
|
|
1453
|
+
`${Q}px`
|
|
1454
|
+
)), j.current = Re || j.current;
|
|
1458
1455
|
}
|
|
1459
|
-
}, [
|
|
1460
|
-
|
|
1456
|
+
}, [E, o]), I.width > 0 && ((ee = S == null ? void 0 : S.current) == null || ee.style.setProperty(
|
|
1457
|
+
"--tw-translate-x",
|
|
1458
|
+
`${12 + I.width + 5}px`
|
|
1459
|
+
)), /* @__PURE__ */ C("div", { className: T.wrapper, children: [
|
|
1460
|
+
/* @__PURE__ */ c(
|
|
1461
1461
|
"label",
|
|
1462
1462
|
{
|
|
1463
|
-
htmlFor:
|
|
1463
|
+
htmlFor: H,
|
|
1464
1464
|
id: b,
|
|
1465
1465
|
className: T.accessibleLabel,
|
|
1466
1466
|
children: t
|
|
1467
1467
|
}
|
|
1468
1468
|
),
|
|
1469
|
-
/* @__PURE__ */
|
|
1469
|
+
_ && /* @__PURE__ */ c(
|
|
1470
|
+
"div",
|
|
1471
|
+
{
|
|
1472
|
+
ref: Ee,
|
|
1473
|
+
className: T.leftElement,
|
|
1474
|
+
children: _
|
|
1475
|
+
}
|
|
1476
|
+
),
|
|
1477
|
+
/* @__PURE__ */ c(
|
|
1470
1478
|
"textarea",
|
|
1471
1479
|
{
|
|
1472
|
-
ref:
|
|
1473
|
-
id:
|
|
1480
|
+
ref: xe,
|
|
1481
|
+
id: H,
|
|
1474
1482
|
name: r,
|
|
1475
|
-
disabled:
|
|
1483
|
+
disabled: h,
|
|
1476
1484
|
placeholder: o ? void 0 : " ",
|
|
1477
1485
|
className: T.textArea,
|
|
1478
1486
|
rows: 1,
|
|
1479
|
-
...p && { "aria-describedby": `${
|
|
1487
|
+
...p && { "aria-describedby": `${H}-helper` },
|
|
1480
1488
|
...a && { "aria-invalid": "true" },
|
|
1481
|
-
...
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1489
|
+
...k && !_ && !o && { style: { paddingRight: ae } },
|
|
1490
|
+
..._ && !k && !o && { style: { paddingLeft: oe } },
|
|
1491
|
+
...k && _ && !o && {
|
|
1492
|
+
style: {
|
|
1493
|
+
paddingRight: ae,
|
|
1494
|
+
paddingLeft: oe
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1497
|
+
value: E,
|
|
1498
|
+
onChange: Ie,
|
|
1499
|
+
onFocus: Ae,
|
|
1500
|
+
onBlur: $e,
|
|
1501
|
+
...D
|
|
1487
1502
|
}
|
|
1488
1503
|
),
|
|
1489
|
-
!o && /* @__PURE__ */
|
|
1504
|
+
!o && /* @__PURE__ */ c(
|
|
1490
1505
|
"label",
|
|
1491
1506
|
{
|
|
1492
|
-
ref:
|
|
1507
|
+
ref: S,
|
|
1493
1508
|
"aria-hidden": !0,
|
|
1494
|
-
htmlFor:
|
|
1495
|
-
className: T.visibleLabel
|
|
1509
|
+
htmlFor: H,
|
|
1510
|
+
className: `${T.visibleLabel}`,
|
|
1496
1511
|
children: t
|
|
1497
1512
|
}
|
|
1498
1513
|
),
|
|
1499
|
-
|
|
1514
|
+
Te && /* @__PURE__ */ c(
|
|
1500
1515
|
"div",
|
|
1501
1516
|
{
|
|
1502
|
-
ref:
|
|
1503
|
-
id: `${
|
|
1517
|
+
ref: q,
|
|
1518
|
+
id: `${H}-helper`,
|
|
1504
1519
|
className: T.helperText,
|
|
1505
1520
|
children: p
|
|
1506
1521
|
}
|
|
1507
1522
|
),
|
|
1508
|
-
|
|
1523
|
+
k && /* @__PURE__ */ c(
|
|
1509
1524
|
"div",
|
|
1510
1525
|
{
|
|
1511
|
-
ref:
|
|
1526
|
+
ref: _e,
|
|
1512
1527
|
className: T.rightElement,
|
|
1513
|
-
children:
|
|
1528
|
+
children: k
|
|
1514
1529
|
}
|
|
1515
1530
|
),
|
|
1516
|
-
a && p && /* @__PURE__ */
|
|
1531
|
+
a && p && /* @__PURE__ */ c(ft, { politeness: "polite", clearAnnouncementDelay: 500, children: Ne })
|
|
1517
1532
|
] });
|
|
1518
1533
|
}
|
|
1519
1534
|
);
|
|
1520
|
-
|
|
1535
|
+
Nt.displayName = "TextArea";
|
|
1521
1536
|
export {
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
At as serviceCall
|
|
1537
|
+
Lt as AppContext,
|
|
1538
|
+
Rt as E,
|
|
1539
|
+
Nt as Fe,
|
|
1540
|
+
Mt as HistoryContext,
|
|
1541
|
+
Ht as SERVICE_TYPES,
|
|
1542
|
+
Ot as TagsContext,
|
|
1543
|
+
Dt as be,
|
|
1544
|
+
Vt as ce,
|
|
1545
|
+
F as f,
|
|
1546
|
+
Pt as ge,
|
|
1547
|
+
Gt as he,
|
|
1548
|
+
Ft as ne,
|
|
1549
|
+
nt as oe,
|
|
1550
|
+
zt as restCall,
|
|
1551
|
+
Ut as se,
|
|
1552
|
+
Bt as serviceCall
|
|
1539
1553
|
};
|