@plyaz/ui 0.6.8 → 0.6.10

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/index.es.js CHANGED
@@ -1,235 +1,84 @@
1
- var Q = Object.defineProperty;
2
- var Z = (t, e, a) => e in t ? Q(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
3
- var k = (t, e, a) => Z(t, typeof e != "symbol" ? e + "" : e, a);
4
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
5
- import { c as i } from "./utils-BlazSa45.js";
6
- import { clsx as J } from "clsx";
7
- import { Slot as X } from "@radix-ui/react-slot";
8
- import Y, { memo as ee } from "react";
1
+ var $ = Object.defineProperty;
2
+ var V = (t, e, a) => e in t ? $(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
3
+ var v = (t, e, a) => V(t, typeof e != "symbol" ? e + "" : e, a);
4
+ import { jsx as s, jsxs as x } from "react/jsx-runtime";
5
+ import { c as i, G as E, A as _, J as R, R as G, C as K, V as U, T as q, S as W, b as H } from "./constant-BgZiatEy.js";
6
+ import "clsx";
7
+ import { Slot as J } from "@radix-ui/react-slot";
8
+ import O, { memo as Q } from "react";
9
9
  import * as u from "@radix-ui/react-select";
10
- import { CheckIcon as te, ChevronDownIcon as j, ChevronUpIcon as ae } from "lucide-react";
11
- import { useTranslations as C } from "next-intl";
12
- const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @__PURE__ */ o(e, { className: a, ...r, "data-testid": "box", children: t }), Fe = ({ className: t = "", children: e, element: a, ...r }) => /* @__PURE__ */ o(
13
- w,
10
+ import { CheckIcon as Z, ChevronDownIcon as I, ChevronUpIcon as X } from "lucide-react";
11
+ import { useTranslations as T } from "next-intl";
12
+ const b = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @__PURE__ */ s(e, { className: a, ...r, "data-testid": "box", children: t }), Se = ({ className: t = "", children: e, element: a, ...r }) => /* @__PURE__ */ s(
13
+ b,
14
14
  {
15
15
  element: a,
16
16
  className: i("mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl", t),
17
17
  ...r,
18
18
  children: e
19
19
  }
20
- ), T = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, M = J, re = (t, e) => (a) => {
21
- var r;
22
- if ((e == null ? void 0 : e.variants) == null) return M(t, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
23
- const { variants: n, defaultVariants: s } = e, l = Object.keys(n).map((g) => {
24
- const x = a == null ? void 0 : a[g], h = s == null ? void 0 : s[g];
25
- if (x === null) return null;
26
- const v = T(x) || T(h);
27
- return n[g][v];
28
- }), d = a && Object.entries(a).reduce((g, x) => {
29
- let [h, v] = x;
30
- return v === void 0 || (g[h] = v), g;
31
- }, {}), m = e == null || (r = e.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((g, x) => {
32
- let { class: h, className: v, ...q } = x;
33
- return Object.entries(q).every((H) => {
34
- let [A, S] = H;
35
- return Array.isArray(S) ? S.includes({
36
- ...s,
37
- ...d
38
- }[A]) : {
39
- ...s,
40
- ...d
41
- }[A] === S;
42
- }) ? [
43
- ...g,
44
- h,
45
- v
46
- ] : g;
47
- }, []);
48
- return M(t, l, m, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
49
- }, F = {
50
- start: "justify-start",
51
- end: "justify-end",
52
- center: "justify-center",
53
- between: "justify-between",
54
- around: "justify-around",
55
- evenly: "justify-evenly",
56
- stretch: "justify-stretch"
57
- }, D = {
58
- start: "items-start",
59
- end: "items-end",
60
- center: "items-center",
61
- baseline: "items-baseline",
62
- stretch: "items-stretch"
63
- }, ne = {
64
- body: "font-general",
65
- heading: "font-general",
66
- caption: "font-general"
67
- }, se = {
68
- xs: "text-xs",
69
- sm: "text-sm",
70
- base: "text-base",
71
- lg: "text-lg",
72
- xl: "text-xl",
73
- "2xl": "text-2xl",
74
- "3xl": "text-3xl",
75
- "4xl": "text-4xl",
76
- "5xl": "text-5xl",
77
- "6xl": "text-6xl",
78
- "7xl": "text-7xl",
79
- "8xl": "text-8xl",
80
- "9xl": "text-9xl"
81
- }, oe = {
82
- normal: "font-normal",
83
- medium: "font-medium",
84
- semibold: "font-semibold",
85
- bold: "font-bold",
86
- light: "font-light"
87
- }, le = {
88
- 1: "grid-cols-1",
89
- 2: "grid-cols-2",
90
- 3: "grid-cols-3",
91
- 4: "grid-cols-4",
92
- 5: "grid-cols-5",
93
- 6: "grid-cols-6",
94
- 7: "grid-cols-7",
95
- 8: "grid-cols-8",
96
- 9: "grid-cols-9"
97
- }, ie = {
98
- 1: "grid-rows-1",
99
- 2: "grid-rows-2",
100
- 3: "grid-rows-3",
101
- 4: "grid-rows-4",
102
- 5: "grid-rows-5",
103
- 6: "grid-rows-6",
104
- 7: "grid-rows-7",
105
- 8: "grid-rows-8",
106
- 9: "grid-rows-9"
107
- }, V = {
108
- 1: "gap-1",
109
- 2: "gap-2",
110
- 3: "gap-3",
111
- 4: "gap-4",
112
- 5: "gap-5",
113
- 6: "gap-6",
114
- 7: "gap-7",
115
- 8: "gap-8",
116
- 9: "gap-9"
117
- }, ce = re(
118
- "inline-flex justify-center items-center gap-2 disabled:opacity-50 aria-invalid:border-destructive focus-visible:border-ring rounded-md outline-none aria-invalid:ring-destructive/20 focus-visible:ring-[3px] focus-visible:ring-ring/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 font-medium text-sm whitespace-nowrap transition-all [&_svg]:pointer-events-none disabled:pointer-events-none shrink-0 [&_svg]:shrink-0",
119
- {
120
- variants: {
121
- variant: {
122
- default: `
123
- bg-primary text-primary-foreground shadow-xs
124
- hover:bg-primary/90
125
- `,
126
- destructive: `
127
- bg-destructive text-white shadow-xs
128
- hover:bg-destructive/90
129
- focus-visible:ring-destructive/20
130
- dark:bg-destructive/60 dark:focus-visible:ring-destructive/40
131
- `,
132
- outline: `
133
- border bg-background shadow-xs
134
- hover:bg-accent hover:text-accent-foreground
135
- dark:border-input dark:bg-input/30 dark:hover:bg-input/50
136
- `,
137
- secondary: `
138
- bg-secondary text-secondary-foreground shadow-xs
139
- hover:bg-secondary/80
140
- `,
141
- ghost: `
142
- hover:bg-accent hover:text-accent-foreground
143
- dark:hover:bg-accent/50
144
- `,
145
- link: `
146
- text-primary underline-offset-4
147
- hover:underline
148
- `
149
- },
150
- size: {
151
- default: `
152
- h-9 px-4 py-2
153
- has-[>svg]:px-3
154
- `,
155
- sm: `
156
- h-8 gap-1.5 rounded-md px-3
157
- has-[>svg]:px-2.5
158
- `,
159
- lg: `
160
- h-10 rounded-md px-6
161
- has-[>svg]:px-4
162
- `,
163
- icon: "size-9"
164
- }
165
- },
166
- defaultVariants: {
167
- variant: "default",
168
- size: "default"
169
- }
170
- }
171
- ), de = {
20
+ ), Y = {
172
21
  row: "flex-row",
173
22
  col: "flex-col",
174
23
  row_reverse: "flex-row-reverse",
175
24
  col_reverse: "flex-col-reverse"
176
- }, ue = {
25
+ }, ee = {
177
26
  wrap: "flex-wrap",
178
27
  nowrap: "flex-nowrap",
179
28
  wrap_reverse: "flex-wrap-reverse"
180
- }, De = ({
29
+ }, Ee = ({
181
30
  children: t,
182
31
  gap: e,
183
32
  direction: a,
184
33
  justify: r,
185
34
  align: n,
186
- wrap: s,
187
- className: l = "",
35
+ wrap: l,
36
+ className: o = "",
188
37
  element: d,
189
38
  ...m
190
- }) => /* @__PURE__ */ o(
191
- w,
39
+ }) => /* @__PURE__ */ s(
40
+ b,
192
41
  {
193
42
  element: d,
194
43
  className: i(
195
44
  "flex",
196
- a && de[a],
197
- r && F[r],
198
- n && D[n],
199
- s && ue[s],
200
- e && V[e],
201
- l
45
+ a && Y[a],
46
+ r && R[r],
47
+ n && _[n],
48
+ l && ee[l],
49
+ e && E[e],
50
+ o
202
51
  ),
203
52
  ...m,
204
53
  children: t
205
54
  }
206
- ), Ve = ({
55
+ ), _e = ({
207
56
  children: t,
208
57
  className: e,
209
58
  cols: a,
210
59
  rows: r,
211
60
  gap: n,
212
- justify: s,
213
- align: l,
61
+ justify: l,
62
+ align: o,
214
63
  element: d,
215
64
  ...m
216
- }) => /* @__PURE__ */ o(
217
- w,
65
+ }) => /* @__PURE__ */ s(
66
+ b,
218
67
  {
219
68
  element: d,
220
69
  className: i(
221
70
  "grid",
222
- a && le[a],
223
- r && ie[r],
224
- n && V[n],
225
- s && F[s],
226
- l && D[l],
71
+ a && K[a],
72
+ r && G[r],
73
+ n && E[n],
74
+ l && R[l],
75
+ o && _[o],
227
76
  e
228
77
  ),
229
78
  ...m,
230
79
  children: t
231
80
  }
232
- ), ge = {
81
+ ), te = {
233
82
  xs: "xs",
234
83
  sm: "sm",
235
84
  base: "base",
@@ -238,18 +87,18 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
238
87
  "2xl": "2xl",
239
88
  "3xl": "3xl",
240
89
  "4xl": "4xl"
241
- }, $e = ({ children: t, element: e, className: a, size: r, ...n }) => /* @__PURE__ */ o(
242
- N,
90
+ }, Re = ({ children: t, element: e, className: a, size: r, ...n }) => /* @__PURE__ */ s(
91
+ h,
243
92
  {
244
93
  className: a,
245
94
  element: e,
246
- size: ge[r],
95
+ size: te[r],
247
96
  variant: "heading",
248
97
  weight: "medium",
249
98
  ...n,
250
99
  children: t
251
100
  }
252
- ), Be = ({ children: t, className: e, href: a, ...r }) => /* @__PURE__ */ o(
101
+ ), Ie = ({ children: t, className: e, href: a, ...r }) => /* @__PURE__ */ s(
253
102
  "a",
254
103
  {
255
104
  "data-testid": "link",
@@ -263,71 +112,71 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
263
112
  ...r,
264
113
  children: t
265
114
  }
266
- ), fe = {
115
+ ), ae = {
267
116
  xs: "xs",
268
117
  sm: "sm",
269
118
  base: "base",
270
119
  lg: "lg"
271
- }, Ke = ({ children: t, className: e, size: a, ...r }) => /* @__PURE__ */ o(
272
- N,
120
+ }, Te = ({ children: t, className: e, size: a, ...r }) => /* @__PURE__ */ s(
121
+ h,
273
122
  {
274
123
  className: e,
275
124
  element: "p",
276
- size: fe[a],
125
+ size: ae[a],
277
126
  variant: "body",
278
127
  weight: "normal",
279
128
  ...r,
280
129
  children: t
281
130
  }
282
- ), Ue = ({ className: t = "", children: e, ...a }) => /* @__PURE__ */ o(w, { element: "section", className: t, ...a, children: e }), Ge = ({
131
+ ), Ae = ({ className: t = "", children: e, ...a }) => /* @__PURE__ */ s(b, { element: "section", className: t, ...a, children: e }), ze = ({
283
132
  children: t,
284
133
  direction: e = "horizontal",
285
134
  spacing: a = "space-x-2",
286
135
  element: r,
287
136
  className: n,
288
- ...s
289
- }) => /* @__PURE__ */ o(w, { className: i("flex", e === "vertical" ? "flex-col" : "flex-row", a, n), element: r, ...s, children: t }), N = ({
137
+ ...l
138
+ }) => /* @__PURE__ */ s(b, { className: i("flex", e === "vertical" ? "flex-col" : "flex-row", a, n), element: r, ...l, children: t }), h = ({
290
139
  className: t,
291
140
  children: e,
292
141
  element: a,
293
142
  weight: r,
294
143
  variant: n,
295
- size: s,
296
- ...l
297
- }) => /* @__PURE__ */ o(
144
+ size: l,
145
+ ...o
146
+ }) => /* @__PURE__ */ s(
298
147
  a,
299
148
  {
300
149
  "data-testid": "text",
301
150
  className: i(
302
151
  "font-normal text-base",
303
- s && se[s],
304
- r && oe[r],
305
- n && ne[n],
152
+ l && W[l],
153
+ r && q[r],
154
+ n && U[n],
306
155
  t
307
156
  ),
308
- ...l,
157
+ ...o,
309
158
  children: e
310
159
  }
311
160
  );
312
- function Oe({
161
+ function Me({
313
162
  className: t,
314
163
  variant: e,
315
164
  size: a,
316
165
  asChild: r = !1,
317
166
  ...n
318
167
  }) {
319
- return /* @__PURE__ */ o(
320
- r ? X : "button",
168
+ return /* @__PURE__ */ s(
169
+ r ? J : "button",
321
170
  {
322
171
  "data-slot": "button",
323
- className: i(ce({ variant: e, size: a, className: t })),
172
+ className: i(H({ variant: e, size: a, className: t })),
324
173
  ...n,
325
174
  "data-testid": "button"
326
175
  }
327
176
  );
328
177
  }
329
- function We({ className: t, type: e, ...a }) {
330
- return /* @__PURE__ */ o(
178
+ function Fe({ className: t, type: e, ...a }) {
179
+ return /* @__PURE__ */ s(
331
180
  "input",
332
181
  {
333
182
  type: e,
@@ -361,7 +210,7 @@ function We({ className: t, type: e, ...a }) {
361
210
  }
362
211
  );
363
212
  }
364
- const me = ee(
213
+ const re = Q(
365
214
  ({
366
215
  children: t,
367
216
  className: e = "",
@@ -374,7 +223,7 @@ const me = ee(
374
223
  WebkitTextFillColor: "transparent",
375
224
  animationDuration: `${10 / r}s`
376
225
  };
377
- return /* @__PURE__ */ y(
226
+ return /* @__PURE__ */ x(
378
227
  "span",
379
228
  {
380
229
  className: `
@@ -383,8 +232,8 @@ const me = ee(
383
232
  `,
384
233
  "data-testid": "auroraText",
385
234
  children: [
386
- /* @__PURE__ */ o("span", { className: "sr-only", children: t }),
387
- /* @__PURE__ */ o(
235
+ /* @__PURE__ */ s("span", { className: "sr-only", children: t }),
236
+ /* @__PURE__ */ s(
388
237
  "span",
389
238
  {
390
239
  className: `
@@ -401,23 +250,23 @@ const me = ee(
401
250
  );
402
251
  }
403
252
  );
404
- me.displayName = "AuroraText";
405
- function pe({ ...t }) {
406
- return /* @__PURE__ */ o(u.Root, { "data-slot": "select", ...t });
253
+ re.displayName = "AuroraText";
254
+ function ne({ ...t }) {
255
+ return /* @__PURE__ */ s(u.Root, { "data-slot": "select", ...t });
407
256
  }
408
- function qe({ ...t }) {
409
- return /* @__PURE__ */ o(u.Group, { "data-slot": "select-group", ...t });
257
+ function De({ ...t }) {
258
+ return /* @__PURE__ */ s(u.Group, { "data-slot": "select-group", ...t });
410
259
  }
411
- function xe({ ...t }) {
412
- return /* @__PURE__ */ o(u.Value, { "data-slot": "select-value", ...t });
260
+ function se({ ...t }) {
261
+ return /* @__PURE__ */ s(u.Value, { "data-slot": "select-value", ...t });
413
262
  }
414
- function ve({
263
+ function le({
415
264
  className: t,
416
265
  size: e = "default",
417
266
  children: a,
418
267
  ...r
419
268
  }) {
420
- return /* @__PURE__ */ y(
269
+ return /* @__PURE__ */ x(
421
270
  u.Trigger,
422
271
  {
423
272
  "data-slot": "select-trigger",
@@ -449,18 +298,18 @@ function ve({
449
298
  ...r,
450
299
  children: [
451
300
  a,
452
- /* @__PURE__ */ o(u.Icon, { asChild: !0, children: /* @__PURE__ */ o(j, { className: "size-4 opacity-50" }) })
301
+ /* @__PURE__ */ s(u.Icon, { asChild: !0, children: /* @__PURE__ */ s(I, { className: "size-4 opacity-50" }) })
453
302
  ]
454
303
  }
455
304
  );
456
305
  }
457
- function be({
306
+ function oe({
458
307
  className: t,
459
308
  children: e,
460
309
  position: a = "popper",
461
310
  ...r
462
311
  }) {
463
- return /* @__PURE__ */ o(u.Portal, { "data-testid": "select", children: /* @__PURE__ */ y(
312
+ return /* @__PURE__ */ s(u.Portal, { "data-testid": "select", children: /* @__PURE__ */ x(
464
313
  u.Content,
465
314
  {
466
315
  "data-slot": "select-content",
@@ -490,8 +339,8 @@ function be({
490
339
  position: a,
491
340
  ...r,
492
341
  children: [
493
- /* @__PURE__ */ o(ye, {}),
494
- /* @__PURE__ */ o(
342
+ /* @__PURE__ */ s(ce, {}),
343
+ /* @__PURE__ */ s(
495
344
  u.Viewport,
496
345
  {
497
346
  className: i(
@@ -504,13 +353,13 @@ function be({
504
353
  children: e
505
354
  }
506
355
  ),
507
- /* @__PURE__ */ o(we, {})
356
+ /* @__PURE__ */ s(ue, {})
508
357
  ]
509
358
  }
510
359
  ) });
511
360
  }
512
- function He({ className: t, ...e }) {
513
- return /* @__PURE__ */ o(
361
+ function Ce({ className: t, ...e }) {
362
+ return /* @__PURE__ */ s(
514
363
  u.Label,
515
364
  {
516
365
  "data-slot": "select-label",
@@ -519,12 +368,12 @@ function He({ className: t, ...e }) {
519
368
  }
520
369
  );
521
370
  }
522
- function he({
371
+ function ie({
523
372
  className: t,
524
373
  children: e,
525
374
  ...a
526
375
  }) {
527
- return /* @__PURE__ */ y(
376
+ return /* @__PURE__ */ x(
528
377
  u.Item,
529
378
  {
530
379
  "data-slot": "select-item",
@@ -543,17 +392,17 @@ function he({
543
392
  ),
544
393
  ...a,
545
394
  children: [
546
- /* @__PURE__ */ o("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ o(u.ItemIndicator, { children: /* @__PURE__ */ o(te, { className: "size-4" }) }) }),
547
- /* @__PURE__ */ o(u.ItemText, { children: e })
395
+ /* @__PURE__ */ s("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ s(u.ItemIndicator, { children: /* @__PURE__ */ s(Z, { className: "size-4" }) }) }),
396
+ /* @__PURE__ */ s(u.ItemText, { children: e })
548
397
  ]
549
398
  }
550
399
  );
551
400
  }
552
- function Qe({
401
+ function je({
553
402
  className: t,
554
403
  ...e
555
404
  }) {
556
- return /* @__PURE__ */ o(
405
+ return /* @__PURE__ */ s(
557
406
  u.Separator,
558
407
  {
559
408
  "data-slot": "select-separator",
@@ -562,127 +411,127 @@ function Qe({
562
411
  }
563
412
  );
564
413
  }
565
- function ye({
414
+ function ce({
566
415
  className: t,
567
416
  ...e
568
417
  }) {
569
- return /* @__PURE__ */ o(
418
+ return /* @__PURE__ */ s(
570
419
  u.ScrollUpButton,
571
420
  {
572
421
  "data-slot": "select-scroll-up-button",
573
422
  className: i("flex cursor-default items-center justify-center py-1", t),
574
423
  ...e,
575
- children: /* @__PURE__ */ o(ae, { className: "size-4" })
424
+ children: /* @__PURE__ */ s(X, { className: "size-4" })
576
425
  }
577
426
  );
578
427
  }
579
- function we({
428
+ function ue({
580
429
  className: t,
581
430
  ...e
582
431
  }) {
583
- return /* @__PURE__ */ o(
432
+ return /* @__PURE__ */ s(
584
433
  u.ScrollDownButton,
585
434
  {
586
435
  "data-slot": "select-scroll-down-button",
587
436
  className: i("flex cursor-default items-center justify-center py-1", t),
588
437
  ...e,
589
- children: /* @__PURE__ */ o(j, { className: "size-4" })
438
+ children: /* @__PURE__ */ s(I, { className: "size-4" })
590
439
  }
591
440
  );
592
441
  }
593
- const Ze = ({
442
+ const Be = ({
594
443
  translationKey: t,
595
444
  translationOptions: e,
596
445
  namespace: a,
597
446
  ...r
598
447
  }) => {
599
- const s = C(a)(
448
+ const l = T(a)(
600
449
  t,
601
450
  e == null ? void 0 : e.args
602
451
  );
603
- return /* @__PURE__ */ o(N, { ...r, children: s });
604
- }, Je = ({
452
+ return /* @__PURE__ */ s(h, { ...r, children: l });
453
+ }, $e = ({
605
454
  translationKey: t,
606
455
  translationOptions: e,
607
456
  namespace: a,
608
457
  className: r,
609
458
  tag: n = "div"
610
459
  }) => {
611
- const l = C(a)(
460
+ const o = T(a)(
612
461
  t,
613
462
  e == null ? void 0 : e.args
614
463
  );
615
- return Y.createElement(n, { className: r, "data-testid": "translated-html" }, l);
464
+ return O.createElement(n, { className: r, "data-testid": "translated-html" }, o);
616
465
  };
617
- var Ne = Object.defineProperty, c = (t, e) => Ne(t, "name", { value: e, configurable: !0 }), E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
618
- function I(t, e) {
466
+ var de = Object.defineProperty, c = (t, e) => de(t, "name", { value: e, configurable: !0 }), y = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map();
467
+ function P(t, e) {
619
468
  return `${t}:${JSON.stringify(e ?? {})}`;
620
469
  }
621
- c(I, "getFormatterKey");
622
- function $(t) {
470
+ c(P, "getFormatterKey");
471
+ function A(t) {
623
472
  const e = typeof t == "string" || typeof t == "number" ? new Date(t) : t;
624
473
  return e instanceof Date && !Number.isNaN(e.getTime()) ? e : null;
625
474
  }
626
- c($, "parseDate");
627
- function B(t, e = "en", a) {
628
- var s;
629
- const r = $(t);
475
+ c(A, "parseDate");
476
+ function z(t, e = "en", a) {
477
+ var l;
478
+ const r = A(t);
630
479
  if (!r)
631
480
  return "";
632
- const n = I(e, a);
633
- return E.has(n) || E.set(n, new Intl.DateTimeFormat(e, a)), ((s = E.get(n)) == null ? void 0 : s.format(r)) ?? "";
481
+ const n = P(e, a);
482
+ return y.has(n) || y.set(n, new Intl.DateTimeFormat(e, a)), ((l = y.get(n)) == null ? void 0 : l.format(r)) ?? "";
634
483
  }
635
- c(B, "formatDate");
636
- function K(t, e = "en", a) {
484
+ c(z, "formatDate");
485
+ function M(t, e = "en", a) {
637
486
  var n;
638
487
  if (typeof t != "number" || Number.isNaN(t))
639
488
  return "";
640
- const r = I(e, a);
641
- return _.has(r) || _.set(r, new Intl.NumberFormat(e, a)), ((n = _.get(r)) == null ? void 0 : n.format(t)) ?? "";
489
+ const r = P(e, a);
490
+ return L.has(r) || L.set(r, new Intl.NumberFormat(e, a)), ((n = L.get(r)) == null ? void 0 : n.format(t)) ?? "";
642
491
  }
643
- c(K, "formatNumber");
644
- var P = {
492
+ c(M, "formatNumber");
493
+ var N = {
645
494
  defaultLocale: "en",
646
495
  supportedLocales: ["en", "es", "fr", "it", "pt-BR", "pt-PT"],
647
496
  fallbackLocale: "en"
648
497
  };
649
- function ke() {
650
- return P.supportedLocales;
498
+ function pe() {
499
+ return N.supportedLocales;
651
500
  }
652
- c(ke, "getSupportedLanguages");
653
- function Le() {
654
- return P.defaultLocale;
501
+ c(pe, "getSupportedLanguages");
502
+ function fe() {
503
+ return N.defaultLocale;
655
504
  }
656
- c(Le, "getDefaultLanguage");
657
- function Pe() {
658
- return P.fallbackLocale;
505
+ c(fe, "getDefaultLanguage");
506
+ function me() {
507
+ return N.fallbackLocale;
659
508
  }
660
- c(Pe, "getFallbackLanguage");
661
- function Se(t) {
662
- return P.supportedLocales.includes(t);
509
+ c(me, "getFallbackLanguage");
510
+ function ge(t) {
511
+ return N.supportedLocales.includes(t);
663
512
  }
664
- c(Se, "isSupportedLanguage");
665
- var p = /* @__PURE__ */ new Map();
666
- function Ee({
513
+ c(ge, "isSupportedLanguage");
514
+ var f = /* @__PURE__ */ new Map();
515
+ function xe({
667
516
  value: t,
668
517
  forms: e,
669
518
  lang: a,
670
519
  type: r = "cardinal"
671
520
  }) {
672
- if (!G(t, e))
521
+ if (!D(t, e))
673
522
  return "";
674
523
  if (t === 0 && e.zero)
675
- return z(e.zero, t);
676
- const s = O(a, r).select(t), l = U(e, s) ?? e.other ?? Object.values(e)[0];
677
- return l ? z(l, t) : "";
524
+ return k(e.zero, t);
525
+ const l = C(a, r).select(t), o = F(e, l) ?? e.other ?? Object.values(e)[0];
526
+ return o ? k(o, t) : "";
678
527
  }
679
- c(Ee, "pluralize");
680
- function R(t, e) {
528
+ c(xe, "pluralize");
529
+ function S(t, e) {
681
530
  return `${t}:${e}`;
682
531
  }
683
- c(R, "getPluralRulesKey");
684
- var _e = /{count}|#/g;
685
- function U(t, e) {
532
+ c(S, "getPluralRulesKey");
533
+ var be = /{count}|#/g;
534
+ function F(t, e) {
686
535
  switch (e) {
687
536
  case "zero":
688
537
  return t.zero;
@@ -700,37 +549,37 @@ function U(t, e) {
700
549
  return;
701
550
  }
702
551
  }
703
- c(U, "selectTemplate");
704
- function G(t, e) {
552
+ c(F, "selectTemplate");
553
+ function D(t, e) {
705
554
  return typeof t == "number" && e && typeof e == "object";
706
555
  }
707
- c(G, "isValidInput");
708
- function z(t, e) {
709
- return t.replaceAll(_e, e.toString());
556
+ c(D, "isValidInput");
557
+ function k(t, e) {
558
+ return t.replaceAll(be, e.toString());
710
559
  }
711
- c(z, "replacePlaceholders");
712
- function O(t, e) {
713
- const a = R(t, e);
714
- if (!p.has(a))
560
+ c(k, "replacePlaceholders");
561
+ function C(t, e) {
562
+ const a = S(t, e);
563
+ if (!f.has(a))
715
564
  try {
716
- p.set(a, new Intl.PluralRules(t, { type: e }));
565
+ f.set(a, new Intl.PluralRules(t, { type: e }));
717
566
  } catch {
718
- return L(a, e);
567
+ return w(a, e);
719
568
  }
720
- return p.get(a) ?? L(a, e);
569
+ return f.get(a) ?? w(a, e);
721
570
  }
722
- c(O, "getPluralRules");
723
- function L(t, e) {
724
- const a = R("en", e);
725
- p.has(a) || p.set(a, new Intl.PluralRules("en", { type: e }));
726
- const r = p.get(a) ?? L(a, e);
727
- return p.set(t, r), r;
571
+ c(C, "getPluralRules");
572
+ function w(t, e) {
573
+ const a = S("en", e);
574
+ f.has(a) || f.set(a, new Intl.PluralRules("en", { type: e }));
575
+ const r = f.get(a) ?? w(a, e);
576
+ return f.set(t, r), r;
728
577
  }
729
- c(L, "getFallbackPluralRules");
730
- var f;
731
- f = class {
578
+ c(w, "getFallbackPluralRules");
579
+ var p;
580
+ p = class {
732
581
  constructor() {
733
- k(this, "fallbackLocale");
582
+ v(this, "fallbackLocale");
734
583
  this.fallbackLocale = "en";
735
584
  }
736
585
  /**
@@ -738,7 +587,7 @@ f = class {
738
587
  * @returns {LocaleDetector} The singleton instance.
739
588
  */
740
589
  static getInstance() {
741
- return f.instance || (f.instance = new f()), f.instance;
590
+ return p.instance || (p.instance = new p()), p.instance;
742
591
  }
743
592
  /**
744
593
  * Detect locale using server-side request or client-side settings.
@@ -755,8 +604,8 @@ f = class {
755
604
  * @private
756
605
  */
757
606
  detectFromRequest(e) {
758
- var s, l, d;
759
- const a = (s = e.url.split("?")[1]) == null ? void 0 : s.split("=")[1], r = e.headers.get("accept-language"), n = (d = (l = e.headers.get("cookie")) == null ? void 0 : l.split("; ").find((m) => m.startsWith("locale="))) == null ? void 0 : d.split("=")[1];
607
+ var l, o, d;
608
+ const a = (l = e.url.split("?")[1]) == null ? void 0 : l.split("=")[1], r = e.headers.get("accept-language"), n = (d = (o = e.headers.get("cookie")) == null ? void 0 : o.split("; ").find((m) => m.startsWith("locale="))) == null ? void 0 : d.split("=")[1];
760
609
  return a ?? n ?? this.parseAcceptLanguage(r ?? "") ?? this.fallbackLocale;
761
610
  }
762
611
  /**
@@ -770,8 +619,8 @@ f = class {
770
619
  return null;
771
620
  let a = null, r = 0;
772
621
  for (const n of e.split(",")) {
773
- const { lang: s, q: l } = this.parseLangAndQ(n.trim());
774
- if (l > r && (r = l, a = s, l === 1))
622
+ const { lang: l, q: o } = this.parseLangAndQ(n.trim());
623
+ if (o > r && (r = o, a = l, o === 1))
775
624
  break;
776
625
  }
777
626
  return a;
@@ -780,8 +629,8 @@ f = class {
780
629
  const a = e.indexOf(";"), r = a === -1 ? e : e.slice(0, Math.max(0, a));
781
630
  let n = 1;
782
631
  if (a !== -1) {
783
- const s = /q=(?<q>[\d.]+)/.exec(e.slice(a + 1));
784
- n = s != null && s.groups ? Number.parseFloat(s.groups.q) || 0 : 1;
632
+ const l = /q=(?<q>[\d.]+)/.exec(e.slice(a + 1));
633
+ n = l != null && l.groups ? Number.parseFloat(l.groups.q) || 0 : 1;
785
634
  }
786
635
  return { lang: r, q: n };
787
636
  }
@@ -793,11 +642,11 @@ f = class {
793
642
  setFallbackLocale(e) {
794
643
  this.fallbackLocale = e;
795
644
  }
796
- }, c(f, "LocaleDetector"), k(f, "instance");
797
- var b;
798
- b = class {
645
+ }, c(p, "LocaleDetector"), v(p, "instance");
646
+ var g;
647
+ g = class {
799
648
  constructor(e) {
800
- k(this, "namespaces");
649
+ v(this, "namespaces");
801
650
  this.namespaces = e ? new Map(e) : /* @__PURE__ */ new Map();
802
651
  }
803
652
  /**
@@ -807,7 +656,7 @@ b = class {
807
656
  * @throws {Error} If the namespace name is invalid.
808
657
  */
809
658
  addNamespace(e, a) {
810
- if (!W(e))
659
+ if (!j(e))
811
660
  throw new Error("Invalid namespace name");
812
661
  this.namespaces.set(e, a);
813
662
  }
@@ -843,113 +692,113 @@ b = class {
843
692
  */
844
693
  validateNamespace(e, a) {
845
694
  const r = this.namespaces.get(e);
846
- return r ? a ? Object.entries(a).every(([n, s]) => {
695
+ return r ? a ? Object.entries(a).every(([n, l]) => {
847
696
  var d;
848
- const l = (d = Object.getOwnPropertyDescriptor(r, n)) == null ? void 0 : d.value;
849
- return l !== void 0 && typeof l === s;
697
+ const o = (d = Object.getOwnPropertyDescriptor(r, n)) == null ? void 0 : d.value;
698
+ return o !== void 0 && typeof o === l;
850
699
  }) : !0 : !1;
851
700
  }
852
- }, c(b, "NamespaceManager");
853
- function W(t) {
701
+ }, c(g, "NamespaceManager");
702
+ function j(t) {
854
703
  return /^\w+$/.test(t);
855
704
  }
856
- c(W, "isSafeKey");
857
- const Xe = ({
705
+ c(j, "isSafeKey");
706
+ const Ve = ({
858
707
  date: t,
859
708
  formatOptions: e,
860
709
  locale: a,
861
710
  ...r
862
711
  }) => {
863
- const n = B(t, a, e);
864
- return /* @__PURE__ */ o(N, { ...r, children: n });
865
- }, Ye = ({
712
+ const n = z(t, a, e);
713
+ return /* @__PURE__ */ s(h, { ...r, children: n });
714
+ }, Ge = ({
866
715
  value: t,
867
716
  formatOptions: e,
868
717
  locale: a,
869
718
  ...r
870
719
  }) => {
871
- const n = K(t, a, e);
872
- return /* @__PURE__ */ o(N, { ...r, children: n });
720
+ const n = M(t, a, e);
721
+ return /* @__PURE__ */ s(h, { ...r, children: n });
873
722
  };
874
- function et({
723
+ function Ke({
875
724
  locale: t,
876
725
  locales: e,
877
726
  onChange: a,
878
727
  getLabel: r,
879
728
  disabled: n
880
729
  }) {
881
- return /* @__PURE__ */ y(pe, { value: t, onValueChange: a, disabled: n, children: [
882
- /* @__PURE__ */ o(ve, { children: /* @__PURE__ */ o(xe, { placeholder: r(t) }) }),
883
- /* @__PURE__ */ o(be, { children: e.map((s) => /* @__PURE__ */ o(he, { value: s, children: r(s) }, s)) })
730
+ return /* @__PURE__ */ x(ne, { value: t, onValueChange: a, disabled: n, children: [
731
+ /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(se, { placeholder: r(t) }) }),
732
+ /* @__PURE__ */ s(oe, { children: e.map((l) => /* @__PURE__ */ s(ie, { value: l, children: r(l) }, l)) })
884
733
  ] });
885
734
  }
886
- function tt({
735
+ function Ue({
887
736
  className: t,
888
737
  reverse: e = !1,
889
738
  pauseOnHover: a = !1,
890
739
  paused: r = !1,
891
740
  children: n,
892
- vertical: s = !1,
893
- repeat: l = 4,
741
+ vertical: l = !1,
742
+ repeat: o = 4,
894
743
  ...d
895
744
  }) {
896
- return /* @__PURE__ */ o(
745
+ return /* @__PURE__ */ s(
897
746
  "div",
898
747
  {
899
748
  ...d,
900
749
  className: i(
901
750
  "group flex overflow-hidden p-2 [--duration:40s] [--gap:1rem] [gap:var(--gap)]",
902
751
  {
903
- "flex-row": !s,
904
- "flex-col": s
752
+ "flex-row": !l,
753
+ "flex-col": l
905
754
  },
906
755
  t
907
756
  ),
908
- children: Array(l).fill(0).map((m, g) => /* @__PURE__ */ o(
757
+ children: Array(o).fill(0).map((m, B) => /* @__PURE__ */ s(
909
758
  "div",
910
759
  {
911
760
  className: i("flex shrink-0 justify-around [gap:var(--gap)]", {
912
- "animate-marquee flex-row": !s,
913
- "animate-marquee-vertical flex-col": s,
761
+ "animate-marquee flex-row": !l,
762
+ "animate-marquee-vertical flex-col": l,
914
763
  "group-hover:[animation-play-state:paused]": a,
915
764
  "[animation-direction:reverse]": e,
916
765
  "[animation-play-state:paused]": r
917
766
  }),
918
767
  children: n
919
768
  },
920
- g
769
+ B
921
770
  ))
922
771
  }
923
772
  );
924
773
  }
925
774
  export {
926
- me as AuroraText,
927
- w as Box,
928
- Oe as Button,
929
- Fe as Container,
930
- Be as ExternalLink,
931
- De as Flex,
932
- Xe as FormattedDate,
933
- Ye as FormattedNumber,
934
- Ve as Grid,
935
- $e as Heading,
936
- We as Input,
937
- et as LanguageSelector,
938
- tt as Marquee,
939
- Ke as Paragraph,
940
- Ue as Section,
941
- pe as Select,
942
- be as SelectContent,
943
- qe as SelectGroup,
944
- he as SelectItem,
945
- He as SelectLabel,
946
- we as SelectScrollDownButton,
947
- ye as SelectScrollUpButton,
948
- Qe as SelectSeparator,
949
- ve as SelectTrigger,
950
- xe as SelectValue,
951
- Ge as Stack,
952
- N as Text,
953
- Je as TranslatedHtml,
954
- Ze as TranslatedText
775
+ re as AuroraText,
776
+ b as Box,
777
+ Me as Button,
778
+ Se as Container,
779
+ Ie as ExternalLink,
780
+ Ee as Flex,
781
+ Ve as FormattedDate,
782
+ Ge as FormattedNumber,
783
+ _e as Grid,
784
+ Re as Heading,
785
+ Fe as Input,
786
+ Ke as LanguageSelector,
787
+ Ue as Marquee,
788
+ Te as Paragraph,
789
+ Ae as Section,
790
+ ne as Select,
791
+ oe as SelectContent,
792
+ De as SelectGroup,
793
+ ie as SelectItem,
794
+ Ce as SelectLabel,
795
+ ue as SelectScrollDownButton,
796
+ ce as SelectScrollUpButton,
797
+ je as SelectSeparator,
798
+ le as SelectTrigger,
799
+ se as SelectValue,
800
+ ze as Stack,
801
+ h as Text,
802
+ $e as TranslatedHtml,
803
+ Be as TranslatedText
955
804
  };