@bertimatteodev/astra-ui 0.8.5 → 0.8.6
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/astra-ui.cjs +1 -1
- package/dist/astra-ui.css +1 -1
- package/dist/astra-ui.js +313 -233
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/astra-ui.js
CHANGED
|
@@ -182,7 +182,7 @@ var w = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
182
182
|
d: "M8 18h.01",
|
|
183
183
|
key: "lrp35t"
|
|
184
184
|
}]
|
|
185
|
-
]),
|
|
185
|
+
]), ee = N("calendar-days", [
|
|
186
186
|
["path", {
|
|
187
187
|
d: "M8 2v3",
|
|
188
188
|
key: "1ioesn"
|
|
@@ -227,28 +227,28 @@ var w = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
227
227
|
d: "M16 17h.01",
|
|
228
228
|
key: "ql8jdd"
|
|
229
229
|
}]
|
|
230
|
-
]),
|
|
230
|
+
]), F = N("check", [["path", {
|
|
231
231
|
d: "M20 6 9 17l-5-5",
|
|
232
232
|
key: "1gmf2c"
|
|
233
|
-
}]]),
|
|
233
|
+
}]]), te = N("chevron-down", [["path", {
|
|
234
234
|
d: "m6 9 6 6 6-6",
|
|
235
235
|
key: "qrunsl"
|
|
236
|
-
}]]),
|
|
236
|
+
}]]), I = N("chevron-left", [["path", {
|
|
237
237
|
d: "m15 18-6-6 6-6",
|
|
238
238
|
key: "1wnfg3"
|
|
239
|
-
}]]),
|
|
239
|
+
}]]), L = N("chevron-right", [["path", {
|
|
240
240
|
d: "m9 18 6-6-6-6",
|
|
241
241
|
key: "mthhwq"
|
|
242
|
-
}]]),
|
|
242
|
+
}]]), R = N("chevron-up", [["path", {
|
|
243
243
|
d: "m18 15-6-6-6 6",
|
|
244
244
|
key: "153udz"
|
|
245
|
-
}]]),
|
|
245
|
+
}]]), ne = N("chevrons-up-down", [["path", {
|
|
246
246
|
d: "m7 15 5 5 5-5",
|
|
247
247
|
key: "1hf1tw"
|
|
248
248
|
}], ["path", {
|
|
249
249
|
d: "m7 9 5-5 5 5",
|
|
250
250
|
key: "sgt6xg"
|
|
251
|
-
}]]),
|
|
251
|
+
}]]), re = N("delete", [
|
|
252
252
|
["path", {
|
|
253
253
|
d: "M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",
|
|
254
254
|
key: "1yo7s0"
|
|
@@ -261,7 +261,7 @@ var w = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
261
261
|
d: "m18 9-6 6",
|
|
262
262
|
key: "1fp51s"
|
|
263
263
|
}]
|
|
264
|
-
]),
|
|
264
|
+
]), ie = N("equal", [["line", {
|
|
265
265
|
x1: "5",
|
|
266
266
|
x2: "19",
|
|
267
267
|
y1: "9",
|
|
@@ -273,7 +273,7 @@ var w = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
273
273
|
y1: "15",
|
|
274
274
|
y2: "15",
|
|
275
275
|
key: "g8yjpy"
|
|
276
|
-
}]]),
|
|
276
|
+
}]]), z = {
|
|
277
277
|
field: "_field_11hml_1",
|
|
278
278
|
label: "_label_11hml_11",
|
|
279
279
|
trigger: "_trigger_11hml_18",
|
|
@@ -291,22 +291,22 @@ var w = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
291
291
|
confirmKey: "_confirmKey_11hml_178",
|
|
292
292
|
submitButton: "_submitButton_11hml_188",
|
|
293
293
|
wideKey: "_wideKey_11hml_221"
|
|
294
|
-
},
|
|
294
|
+
}, ae = {
|
|
295
295
|
"+": "+",
|
|
296
296
|
"-": "−",
|
|
297
297
|
"*": "×",
|
|
298
298
|
"/": "÷"
|
|
299
299
|
};
|
|
300
|
-
function
|
|
300
|
+
function oe(e, t) {
|
|
301
301
|
let n = String(e);
|
|
302
302
|
return t === "," ? n.replace(".", ",") : n;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function se(e, t) {
|
|
305
305
|
if (!e) return null;
|
|
306
306
|
let n = t === "," ? e.replace(",", ".") : e, r = Number(n);
|
|
307
307
|
return Number.isFinite(r) ? r : null;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function ce(e, t, n) {
|
|
310
310
|
switch (n) {
|
|
311
311
|
case "+": return e + t;
|
|
312
312
|
case "-": return e - t;
|
|
@@ -314,8 +314,8 @@ function oe(e, t, n) {
|
|
|
314
314
|
case "/": return t === 0 ? null : e / t;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
let [d, m] = u(() => e === void 0 ? "" :
|
|
317
|
+
function le({ initialValue: e, decimalSeparator: t = ",", label: n, placeholder: r = "Inserisci un valore", disabled: i = !1, maxFractionDigits: a = 2, onValueChange: s, onConfirm: l }) {
|
|
318
|
+
let [d, m] = u(() => e === void 0 ? "" : oe(e, t)), [h, g] = u(null), [_, v] = u(null), [y, b] = u(!1), [x, S] = u(!0), [C, w] = u(!1), T = c(() => se(d, t), [t, d]);
|
|
319
319
|
o(() => {
|
|
320
320
|
s?.(C ? null : T);
|
|
321
321
|
}, [
|
|
@@ -448,17 +448,17 @@ function se({ initialValue: e, decimalSeparator: t = ",", label: n, placeholder:
|
|
|
448
448
|
v(e ?? null), S(!0);
|
|
449
449
|
return;
|
|
450
450
|
}
|
|
451
|
-
let n =
|
|
451
|
+
let n = ce(h, T, _);
|
|
452
452
|
if (n === null) {
|
|
453
453
|
m("Errore"), g(null), v(null), S(!0), w(!0);
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
let r =
|
|
456
|
+
let r = oe(n, t);
|
|
457
457
|
m(r), g(e ? n : null), v(e ?? null), S(!0);
|
|
458
458
|
}
|
|
459
459
|
function j() {
|
|
460
460
|
A();
|
|
461
|
-
let e = h !== null && _ !== null ?
|
|
461
|
+
let e = h !== null && _ !== null ? ce(h, T ?? 0, _) : T;
|
|
462
462
|
e != null && (l?.(e), b(!1));
|
|
463
463
|
}
|
|
464
464
|
function M(e) {
|
|
@@ -482,56 +482,56 @@ function se({ initialValue: e, decimalSeparator: t = ",", label: n, placeholder:
|
|
|
482
482
|
A(e.value);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
let N = _ ? `${h ?? ""} ${
|
|
485
|
+
let N = _ ? `${h ?? ""} ${ae[_]}` : null;
|
|
486
486
|
return /* @__PURE__ */ p("div", {
|
|
487
|
-
className:
|
|
487
|
+
className: z.field,
|
|
488
488
|
children: [
|
|
489
489
|
n ? /* @__PURE__ */ f("span", {
|
|
490
|
-
className:
|
|
490
|
+
className: z.label,
|
|
491
491
|
children: n
|
|
492
492
|
}) : null,
|
|
493
493
|
/* @__PURE__ */ p("button", {
|
|
494
494
|
type: "button",
|
|
495
|
-
className:
|
|
495
|
+
className: z.trigger,
|
|
496
496
|
disabled: i,
|
|
497
497
|
"aria-label": y ? "Chiudi calcolatrice" : "Apri calcolatrice",
|
|
498
498
|
"aria-expanded": y,
|
|
499
499
|
onClick: () => b((e) => !e),
|
|
500
500
|
children: [/* @__PURE__ */ f(P, {
|
|
501
|
-
className:
|
|
501
|
+
className: z.triggerIcon,
|
|
502
502
|
size: 20,
|
|
503
503
|
"aria-hidden": "true"
|
|
504
504
|
}), /* @__PURE__ */ f("span", {
|
|
505
|
-
className: d ?
|
|
505
|
+
className: d ? z.triggerValue : z.placeholder,
|
|
506
506
|
children: d || r
|
|
507
507
|
})]
|
|
508
508
|
}),
|
|
509
509
|
y ? /* @__PURE__ */ p("section", {
|
|
510
|
-
className:
|
|
510
|
+
className: z.calculator,
|
|
511
511
|
"aria-label": "Calcolatrice",
|
|
512
512
|
children: [
|
|
513
513
|
/* @__PURE__ */ p("div", {
|
|
514
|
-
className:
|
|
514
|
+
className: z.display,
|
|
515
515
|
"aria-live": "polite",
|
|
516
516
|
"aria-atomic": "true",
|
|
517
517
|
children: [/* @__PURE__ */ f("span", {
|
|
518
|
-
className:
|
|
518
|
+
className: z.expression,
|
|
519
519
|
children: N ?? "\xA0"
|
|
520
520
|
}), /* @__PURE__ */ f("output", {
|
|
521
|
-
className: `${
|
|
521
|
+
className: `${z.value} numeric`,
|
|
522
522
|
"aria-label": `Valore corrente: ${d}`,
|
|
523
523
|
children: d
|
|
524
524
|
})]
|
|
525
525
|
}),
|
|
526
526
|
/* @__PURE__ */ f("div", {
|
|
527
|
-
className:
|
|
527
|
+
className: z.keypad,
|
|
528
528
|
children: E.map((e) => {
|
|
529
529
|
let t = [
|
|
530
|
-
|
|
531
|
-
e.kind === "operator" &&
|
|
532
|
-
e.kind === "action" &&
|
|
533
|
-
e.kind === "confirm" &&
|
|
534
|
-
e.wide &&
|
|
530
|
+
z.key,
|
|
531
|
+
e.kind === "operator" && z.operatorKey,
|
|
532
|
+
e.kind === "action" && z.actionKey,
|
|
533
|
+
e.kind === "confirm" && z.confirmKey,
|
|
534
|
+
e.wide && z.wideKey
|
|
535
535
|
].filter(Boolean).join(" "), n = e.value === "backspace", r = e.value === "equals";
|
|
536
536
|
return /* @__PURE__ */ p("button", {
|
|
537
537
|
type: "button",
|
|
@@ -540,12 +540,12 @@ function se({ initialValue: e, decimalSeparator: t = ",", label: n, placeholder:
|
|
|
540
540
|
"aria-label": e.ariaLabel ?? e.label,
|
|
541
541
|
onClick: () => M(e),
|
|
542
542
|
children: [
|
|
543
|
-
n ? /* @__PURE__ */ f(
|
|
543
|
+
n ? /* @__PURE__ */ f(re, {
|
|
544
544
|
size: 18,
|
|
545
545
|
strokeWidth: 1.9,
|
|
546
546
|
"aria-hidden": "true"
|
|
547
547
|
}) : null,
|
|
548
|
-
r ? /* @__PURE__ */ f(
|
|
548
|
+
r ? /* @__PURE__ */ f(ie, {
|
|
549
549
|
size: 18,
|
|
550
550
|
strokeWidth: 2,
|
|
551
551
|
"aria-hidden": "true"
|
|
@@ -557,11 +557,11 @@ function se({ initialValue: e, decimalSeparator: t = ",", label: n, placeholder:
|
|
|
557
557
|
}),
|
|
558
558
|
/* @__PURE__ */ f("button", {
|
|
559
559
|
type: "button",
|
|
560
|
-
className:
|
|
560
|
+
className: z.submitButton,
|
|
561
561
|
disabled: i,
|
|
562
562
|
"aria-label": "Confirm value",
|
|
563
563
|
onClick: j,
|
|
564
|
-
children: /* @__PURE__ */ f(
|
|
564
|
+
children: /* @__PURE__ */ f(F, {
|
|
565
565
|
size: 18,
|
|
566
566
|
strokeWidth: 2,
|
|
567
567
|
"aria-hidden": "true"
|
|
@@ -572,7 +572,7 @@ function se({ initialValue: e, decimalSeparator: t = ",", label: n, placeholder:
|
|
|
572
572
|
]
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
|
-
var
|
|
575
|
+
var B = {
|
|
576
576
|
field: "_field_t3jjk_1",
|
|
577
577
|
label: "_label_t3jjk_8",
|
|
578
578
|
trigger: "_trigger_t3jjk_15",
|
|
@@ -594,7 +594,7 @@ var H = {
|
|
|
594
594
|
today: "_today_t3jjk_195",
|
|
595
595
|
footer: "_footer_t3jjk_210",
|
|
596
596
|
textButton: "_textButton_t3jjk_218"
|
|
597
|
-
},
|
|
597
|
+
}, ue = [
|
|
598
598
|
"Lun",
|
|
599
599
|
"Mar",
|
|
600
600
|
"Mer",
|
|
@@ -603,47 +603,47 @@ var H = {
|
|
|
603
603
|
"Sab",
|
|
604
604
|
"Dom"
|
|
605
605
|
];
|
|
606
|
-
function
|
|
606
|
+
function V(e) {
|
|
607
607
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function de(e) {
|
|
610
610
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function fe(e, t) {
|
|
613
613
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function pe(e, t) {
|
|
616
616
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
let r =
|
|
620
|
-
return !!(t && r <
|
|
618
|
+
function me(e, t, n) {
|
|
619
|
+
let r = V(e);
|
|
620
|
+
return !!(t && r < V(t) || n && r > V(n));
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function he(e) {
|
|
623
623
|
let t = e.getFullYear(), n = e.getMonth(), r = new Date(t, n, 1), i = new Date(t, n + 1, 0), a = (r.getDay() + 6) % 7, o = Math.ceil((a + i.getDate()) / 7) * 7, s = new Date(t, n, 1 - a);
|
|
624
624
|
return Array.from({ length: o }, (e, t) => new Date(s.getFullYear(), s.getMonth(), s.getDate() + t));
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function ge(e, t) {
|
|
627
627
|
let n = new Intl.DateTimeFormat(t, {
|
|
628
628
|
month: "long",
|
|
629
629
|
year: "numeric"
|
|
630
630
|
}).format(e);
|
|
631
631
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function _e(e, t) {
|
|
634
634
|
return e ? new Intl.DateTimeFormat(t, {
|
|
635
635
|
day: "2-digit",
|
|
636
636
|
month: "short",
|
|
637
637
|
year: "numeric"
|
|
638
638
|
}).format(e) : "";
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function ve(...e) {
|
|
641
641
|
return e.filter(Boolean).join(" ");
|
|
642
642
|
}
|
|
643
|
-
function
|
|
644
|
-
let y = s(), b = _ ?? `date-picker-${y}`, x = `${b}-dialog`, S = `${b}-error`, C = l(null), w = l(null), [T, E] = u(!1), [D, O] = u(() =>
|
|
643
|
+
function ye({ value: e, onChange: t, label: n, placeholder: r = "Seleziona una data", locale: i = "it-IT", disabled: a = !1, minDate: d, maxDate: m, clearable: h = !1, name: g, id: _, error: v }) {
|
|
644
|
+
let y = s(), b = _ ?? `date-picker-${y}`, x = `${b}-dialog`, S = `${b}-error`, C = l(null), w = l(null), [T, E] = u(!1), [D, O] = u(() => V(e ?? /* @__PURE__ */ new Date())), k = c(() => he(D), [D]), A = V(/* @__PURE__ */ new Date());
|
|
645
645
|
o(() => {
|
|
646
|
-
e && O(
|
|
646
|
+
e && O(V(e));
|
|
647
647
|
}, [e]), o(() => {
|
|
648
648
|
function e(e) {
|
|
649
649
|
C.current && !C.current.contains(e.target) && E(!1);
|
|
@@ -656,10 +656,10 @@ function _e({ value: e, onChange: t, label: n, placeholder: r = "Seleziona una d
|
|
|
656
656
|
};
|
|
657
657
|
}, []);
|
|
658
658
|
function j() {
|
|
659
|
-
a || (O(
|
|
659
|
+
a || (O(V(e ?? /* @__PURE__ */ new Date())), E(!0));
|
|
660
660
|
}
|
|
661
661
|
function M(e) {
|
|
662
|
-
|
|
662
|
+
me(e, d, m) || (t(V(e)), E(!1), w.current?.focus());
|
|
663
663
|
}
|
|
664
664
|
function N(e) {
|
|
665
665
|
O((t) => new Date(t.getFullYear(), t.getMonth() + e, 1));
|
|
@@ -674,20 +674,20 @@ function _e({ value: e, onChange: t, label: n, placeholder: r = "Seleziona una d
|
|
|
674
674
|
else if (e.key === "End") n.setDate(t.getDate() + (6 - (t.getDay() + 6) % 7));
|
|
675
675
|
else return;
|
|
676
676
|
e.preventDefault();
|
|
677
|
-
let r = `${b}-${
|
|
677
|
+
let r = `${b}-${de(n)}`, i = document.getElementById(r);
|
|
678
678
|
if (i) {
|
|
679
679
|
i.focus();
|
|
680
680
|
return;
|
|
681
681
|
}
|
|
682
682
|
O(new Date(n.getFullYear(), n.getMonth(), 1));
|
|
683
683
|
}
|
|
684
|
-
let
|
|
684
|
+
let F = _e(e, i);
|
|
685
685
|
return /* @__PURE__ */ p("div", {
|
|
686
686
|
ref: C,
|
|
687
|
-
className:
|
|
687
|
+
className: B.field,
|
|
688
688
|
children: [
|
|
689
689
|
n ? /* @__PURE__ */ f("label", {
|
|
690
|
-
className:
|
|
690
|
+
className: B.label,
|
|
691
691
|
htmlFor: b,
|
|
692
692
|
children: n
|
|
693
693
|
}) : null,
|
|
@@ -695,61 +695,61 @@ function _e({ value: e, onChange: t, label: n, placeholder: r = "Seleziona una d
|
|
|
695
695
|
id: b,
|
|
696
696
|
type: "hidden",
|
|
697
697
|
name: g,
|
|
698
|
-
value: e ?
|
|
698
|
+
value: e ? de(e) : ""
|
|
699
699
|
}),
|
|
700
700
|
/* @__PURE__ */ p("button", {
|
|
701
701
|
ref: w,
|
|
702
702
|
type: "button",
|
|
703
|
-
className:
|
|
703
|
+
className: ve(B.trigger, v && B.hasError, a && B.isDisabled),
|
|
704
704
|
disabled: a,
|
|
705
705
|
"aria-haspopup": "dialog",
|
|
706
706
|
"aria-expanded": T,
|
|
707
707
|
"aria-controls": T ? x : void 0,
|
|
708
708
|
onClick: () => T ? E(!1) : j(),
|
|
709
|
-
children: [/* @__PURE__ */ f(
|
|
710
|
-
className:
|
|
709
|
+
children: [/* @__PURE__ */ f(ee, {
|
|
710
|
+
className: B.triggerIcon,
|
|
711
711
|
size: 18,
|
|
712
712
|
"aria-hidden": "true"
|
|
713
713
|
}), /* @__PURE__ */ f("span", {
|
|
714
|
-
className:
|
|
715
|
-
children:
|
|
714
|
+
className: ve(B.triggerValue, !e && B.placeholder),
|
|
715
|
+
children: F || r
|
|
716
716
|
})]
|
|
717
717
|
}),
|
|
718
718
|
v ? /* @__PURE__ */ f("p", {
|
|
719
719
|
id: S,
|
|
720
|
-
className:
|
|
720
|
+
className: B.error,
|
|
721
721
|
role: "alert",
|
|
722
722
|
children: v
|
|
723
723
|
}) : null,
|
|
724
724
|
T ? /* @__PURE__ */ p("div", {
|
|
725
725
|
id: x,
|
|
726
|
-
className:
|
|
726
|
+
className: B.popover,
|
|
727
727
|
role: "dialog",
|
|
728
728
|
"aria-label": "Seleziona una data",
|
|
729
729
|
children: [
|
|
730
730
|
/* @__PURE__ */ p("header", {
|
|
731
|
-
className:
|
|
731
|
+
className: B.calendarHeader,
|
|
732
732
|
children: [
|
|
733
733
|
/* @__PURE__ */ f("button", {
|
|
734
734
|
type: "button",
|
|
735
|
-
className:
|
|
735
|
+
className: B.navigationButton,
|
|
736
736
|
"aria-label": "Mese precedente",
|
|
737
737
|
onClick: () => N(-1),
|
|
738
|
-
children: /* @__PURE__ */ f(
|
|
738
|
+
children: /* @__PURE__ */ f(I, {
|
|
739
739
|
size: 18,
|
|
740
740
|
"aria-hidden": "true"
|
|
741
741
|
})
|
|
742
742
|
}),
|
|
743
743
|
/* @__PURE__ */ f("span", {
|
|
744
|
-
className:
|
|
745
|
-
children:
|
|
744
|
+
className: B.monthLabel,
|
|
745
|
+
children: ge(D, i)
|
|
746
746
|
}),
|
|
747
747
|
/* @__PURE__ */ f("button", {
|
|
748
748
|
type: "button",
|
|
749
|
-
className:
|
|
749
|
+
className: B.navigationButton,
|
|
750
750
|
"aria-label": "Mese successivo",
|
|
751
751
|
onClick: () => N(1),
|
|
752
|
-
children: /* @__PURE__ */ f(
|
|
752
|
+
children: /* @__PURE__ */ f(L, {
|
|
753
753
|
size: 18,
|
|
754
754
|
"aria-hidden": "true"
|
|
755
755
|
})
|
|
@@ -757,20 +757,20 @@ function _e({ value: e, onChange: t, label: n, placeholder: r = "Seleziona una d
|
|
|
757
757
|
]
|
|
758
758
|
}),
|
|
759
759
|
/* @__PURE__ */ p("div", {
|
|
760
|
-
className:
|
|
760
|
+
className: B.calendarGrid,
|
|
761
761
|
role: "grid",
|
|
762
|
-
"aria-label":
|
|
763
|
-
children: [
|
|
764
|
-
className:
|
|
762
|
+
"aria-label": ge(D, i),
|
|
763
|
+
children: [ue.map((e) => /* @__PURE__ */ f("span", {
|
|
764
|
+
className: B.weekDay,
|
|
765
765
|
role: "columnheader",
|
|
766
766
|
children: e
|
|
767
767
|
}, e)), k.map((t) => {
|
|
768
|
-
let n =
|
|
768
|
+
let n = pe(t, D), r = e ? fe(t, e) : !1, a = fe(t, A), o = me(t, d, m), s = `${b}-${de(t)}`;
|
|
769
769
|
return /* @__PURE__ */ f("button", {
|
|
770
770
|
id: s,
|
|
771
771
|
type: "button",
|
|
772
772
|
role: "gridcell",
|
|
773
|
-
className:
|
|
773
|
+
className: ve(B.day, !n && B.outsideMonth, r && B.selectedDay, a && B.today),
|
|
774
774
|
disabled: o,
|
|
775
775
|
"aria-label": new Intl.DateTimeFormat(i, {
|
|
776
776
|
weekday: "long",
|
|
@@ -787,17 +787,17 @@ function _e({ value: e, onChange: t, label: n, placeholder: r = "Seleziona una d
|
|
|
787
787
|
})]
|
|
788
788
|
}),
|
|
789
789
|
/* @__PURE__ */ p("footer", {
|
|
790
|
-
className:
|
|
790
|
+
className: B.footer,
|
|
791
791
|
children: [/* @__PURE__ */ f("button", {
|
|
792
792
|
type: "button",
|
|
793
|
-
className:
|
|
793
|
+
className: B.textButton,
|
|
794
794
|
onClick: () => {
|
|
795
795
|
O(A), M(A);
|
|
796
796
|
},
|
|
797
797
|
children: "Oggi"
|
|
798
798
|
}), h && e ? /* @__PURE__ */ f("button", {
|
|
799
799
|
type: "button",
|
|
800
|
-
className:
|
|
800
|
+
className: B.textButton,
|
|
801
801
|
onClick: () => {
|
|
802
802
|
t(null), E(!1), w.current?.focus();
|
|
803
803
|
},
|
|
@@ -809,7 +809,7 @@ function _e({ value: e, onChange: t, label: n, placeholder: r = "Seleziona una d
|
|
|
809
809
|
]
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
|
-
var
|
|
812
|
+
var H = {
|
|
813
813
|
button: "_button_2kydv_1",
|
|
814
814
|
sizeSm: "_sizeSm_2kydv_27",
|
|
815
815
|
sizeMd: "_sizeMd_2kydv_32",
|
|
@@ -823,20 +823,20 @@ var W = {
|
|
|
823
823
|
spinner: "_spinner_2kydv_94",
|
|
824
824
|
spin: "_spin_2kydv_94",
|
|
825
825
|
loading: "_loading_2kydv_103"
|
|
826
|
-
},
|
|
827
|
-
primary:
|
|
828
|
-
secondary:
|
|
829
|
-
ghost:
|
|
830
|
-
danger:
|
|
831
|
-
},
|
|
832
|
-
sm:
|
|
833
|
-
md:
|
|
834
|
-
lg:
|
|
826
|
+
}, be = {
|
|
827
|
+
primary: H.variantPrimary,
|
|
828
|
+
secondary: H.variantSecondary,
|
|
829
|
+
ghost: H.variantGhost,
|
|
830
|
+
danger: H.variantDanger
|
|
831
|
+
}, xe = {
|
|
832
|
+
sm: H.sizeSm,
|
|
833
|
+
md: H.sizeMd,
|
|
834
|
+
lg: H.sizeLg
|
|
835
835
|
};
|
|
836
|
-
function
|
|
836
|
+
function Se(...e) {
|
|
837
837
|
return e.filter(Boolean).join(" ");
|
|
838
838
|
}
|
|
839
|
-
var
|
|
839
|
+
var Ce = r(function({ icon: e, label: t, className: n, variant: r = "secondary", size: i = "md", isLoading: a = !1, borderless: o = !1, backgroundColor: s, disabled: c, type: l = "button", style: u, ...d }, p) {
|
|
840
840
|
let m = c || a, h = s ? {
|
|
841
841
|
...u,
|
|
842
842
|
backgroundColor: s
|
|
@@ -844,24 +844,24 @@ var xe = r(function({ icon: e, label: t, className: n, variant: r = "secondary",
|
|
|
844
844
|
return /* @__PURE__ */ f("button", {
|
|
845
845
|
ref: p,
|
|
846
846
|
type: l,
|
|
847
|
-
className:
|
|
847
|
+
className: Se(H.button, be[r], xe[i], a && H.loading, o && H.borderless, n),
|
|
848
848
|
style: h,
|
|
849
849
|
disabled: m,
|
|
850
850
|
"aria-label": t,
|
|
851
851
|
"aria-busy": a || void 0,
|
|
852
852
|
...d,
|
|
853
853
|
children: a ? /* @__PURE__ */ f("span", {
|
|
854
|
-
className:
|
|
854
|
+
className: H.spinner,
|
|
855
855
|
"aria-hidden": "true"
|
|
856
856
|
}) : /* @__PURE__ */ f("span", {
|
|
857
|
-
className:
|
|
857
|
+
className: H.icon,
|
|
858
858
|
"aria-hidden": "true",
|
|
859
859
|
children: e
|
|
860
860
|
})
|
|
861
861
|
});
|
|
862
862
|
});
|
|
863
|
-
|
|
864
|
-
var
|
|
863
|
+
Ce.displayName = "IconButton";
|
|
864
|
+
var U = {
|
|
865
865
|
field: "_field_1pq0j_1",
|
|
866
866
|
label: "_label_1pq0j_7",
|
|
867
867
|
required: "_required_1pq0j_14",
|
|
@@ -875,39 +875,39 @@ var G = {
|
|
|
875
875
|
};
|
|
876
876
|
//#endregion
|
|
877
877
|
//#region src/components/TextField/TextField.tsx
|
|
878
|
-
function
|
|
878
|
+
function we(...e) {
|
|
879
879
|
return e.filter(Boolean).join(" ");
|
|
880
880
|
}
|
|
881
|
-
var
|
|
881
|
+
var Te = r(function({ id: e, label: t, hint: n, error: r, startAdornment: i, endAdornment: a, className: o, containerClassName: c, disabled: l, required: u, "aria-describedby": d, ...m }, h) {
|
|
882
882
|
let g = s(), _ = e ?? `text-field-${g}`, v = `${_}-hint`, y = `${_}-error`, b = [
|
|
883
883
|
d,
|
|
884
884
|
n ? v : null,
|
|
885
885
|
r ? y : null
|
|
886
886
|
].filter(Boolean).join(" ");
|
|
887
887
|
return /* @__PURE__ */ p("div", {
|
|
888
|
-
className:
|
|
888
|
+
className: we(U.field, c),
|
|
889
889
|
children: [
|
|
890
890
|
t ? /* @__PURE__ */ p("label", {
|
|
891
|
-
className:
|
|
891
|
+
className: U.label,
|
|
892
892
|
htmlFor: _,
|
|
893
893
|
children: [t, u ? /* @__PURE__ */ p("span", {
|
|
894
|
-
className:
|
|
894
|
+
className: U.required,
|
|
895
895
|
"aria-hidden": "true",
|
|
896
896
|
children: [" ", "*"]
|
|
897
897
|
}) : null]
|
|
898
898
|
}) : null,
|
|
899
899
|
/* @__PURE__ */ p("div", {
|
|
900
|
-
className:
|
|
900
|
+
className: we(U.control, r && U.hasError, l && U.isDisabled),
|
|
901
901
|
children: [
|
|
902
902
|
i ? /* @__PURE__ */ f("span", {
|
|
903
|
-
className:
|
|
903
|
+
className: U.adornment,
|
|
904
904
|
"aria-hidden": "true",
|
|
905
905
|
children: i
|
|
906
906
|
}) : null,
|
|
907
907
|
/* @__PURE__ */ f("input", {
|
|
908
908
|
ref: h,
|
|
909
909
|
id: _,
|
|
910
|
-
className:
|
|
910
|
+
className: we(U.input, o),
|
|
911
911
|
disabled: l,
|
|
912
912
|
required: u,
|
|
913
913
|
"aria-invalid": r ? !0 : void 0,
|
|
@@ -915,7 +915,7 @@ var Ce = r(function({ id: e, label: t, hint: n, error: r, startAdornment: i, end
|
|
|
915
915
|
...m
|
|
916
916
|
}),
|
|
917
917
|
a ? /* @__PURE__ */ f("span", {
|
|
918
|
-
className:
|
|
918
|
+
className: U.adornment,
|
|
919
919
|
"aria-hidden": "true",
|
|
920
920
|
children: a
|
|
921
921
|
}) : null
|
|
@@ -923,20 +923,20 @@ var Ce = r(function({ id: e, label: t, hint: n, error: r, startAdornment: i, end
|
|
|
923
923
|
}),
|
|
924
924
|
r ? /* @__PURE__ */ f("p", {
|
|
925
925
|
id: y,
|
|
926
|
-
className:
|
|
926
|
+
className: U.error,
|
|
927
927
|
role: "alert",
|
|
928
928
|
children: r
|
|
929
929
|
}) : null,
|
|
930
930
|
!r && n ? /* @__PURE__ */ f("p", {
|
|
931
931
|
id: v,
|
|
932
|
-
className:
|
|
932
|
+
className: U.hint,
|
|
933
933
|
children: n
|
|
934
934
|
}) : null
|
|
935
935
|
]
|
|
936
936
|
});
|
|
937
937
|
});
|
|
938
|
-
|
|
939
|
-
var
|
|
938
|
+
Te.displayName = "TextField";
|
|
939
|
+
var W = {
|
|
940
940
|
field: "_field_3nnjq_1",
|
|
941
941
|
label: "_label_3nnjq_7",
|
|
942
942
|
required: "_required_3nnjq_14",
|
|
@@ -957,70 +957,70 @@ var K = {
|
|
|
957
957
|
};
|
|
958
958
|
//#endregion
|
|
959
959
|
//#region src/components/Dropdown/Dropdown.tsx
|
|
960
|
-
function
|
|
960
|
+
function G(...e) {
|
|
961
961
|
return e.filter(Boolean).join(" ");
|
|
962
962
|
}
|
|
963
|
-
var
|
|
963
|
+
var Ee = r(function({ id: e, options: t, label: n, hint: r, error: i, placeholder: a, className: c, containerClassName: d, disabled: m, required: h, value: g, defaultValue: _, onChange: v, onValueChange: y, "aria-describedby": b, ...x }, S) {
|
|
964
964
|
let C = s(), w = e ?? `dropdown-${C}`, T = `${w}-hint`, E = `${w}-error`, D = `${w}-label`, O = `${w}-listbox`, k = [
|
|
965
965
|
b,
|
|
966
966
|
r ? T : null,
|
|
967
967
|
i ? E : null
|
|
968
|
-
].filter(Boolean).join(" "), A = typeof g == "string" ? g : void 0, [j, M] = u(typeof _ == "string" ? _ : ""), [N, P] = u(!1), [
|
|
968
|
+
].filter(Boolean).join(" "), A = typeof g == "string" ? g : void 0, [j, M] = u(typeof _ == "string" ? _ : ""), [N, P] = u(!1), [ee, F] = u(0), te = l(null), I = A ?? j, L = t.find((e) => e.value === I), R = t.reduce((e, t, n) => (t.disabled || e.push(n), e), []);
|
|
969
969
|
o(() => {
|
|
970
970
|
function e(e) {
|
|
971
|
-
|
|
971
|
+
te.current?.contains(e.target) || P(!1);
|
|
972
972
|
}
|
|
973
973
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
974
974
|
}, []);
|
|
975
|
-
function
|
|
975
|
+
function ne(e) {
|
|
976
976
|
v?.(e), y?.(e.target.value);
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function re(e) {
|
|
979
979
|
A === void 0 && M(e), y?.(e), P(!1);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function ie(e) {
|
|
982
982
|
if (!m) {
|
|
983
983
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
984
984
|
e.preventDefault(), P(!0);
|
|
985
|
-
let t = (
|
|
986
|
-
|
|
985
|
+
let t = (R.indexOf(ee) + (e.key === "ArrowDown" ? 1 : -1) + R.length) % R.length;
|
|
986
|
+
F(R[t] ?? 0);
|
|
987
987
|
}
|
|
988
988
|
if (e.key === "Enter" || e.key === " ") {
|
|
989
989
|
if (e.preventDefault(), N) {
|
|
990
|
-
let e = t[
|
|
991
|
-
e && !e.disabled &&
|
|
990
|
+
let e = t[ee];
|
|
991
|
+
e && !e.disabled && re(e.value);
|
|
992
992
|
} else P(!0);
|
|
993
993
|
}
|
|
994
994
|
e.key === "Escape" && P(!1);
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
return /* @__PURE__ */ p("div", {
|
|
998
|
-
className:
|
|
998
|
+
className: G(W.field, d),
|
|
999
999
|
children: [
|
|
1000
1000
|
n ? /* @__PURE__ */ p("label", {
|
|
1001
1001
|
id: D,
|
|
1002
|
-
className:
|
|
1002
|
+
className: W.label,
|
|
1003
1003
|
htmlFor: w,
|
|
1004
1004
|
children: [n, h ? /* @__PURE__ */ p("span", {
|
|
1005
|
-
className:
|
|
1005
|
+
className: W.required,
|
|
1006
1006
|
"aria-hidden": "true",
|
|
1007
1007
|
children: [" ", "*"]
|
|
1008
1008
|
}) : null]
|
|
1009
1009
|
}) : null,
|
|
1010
1010
|
/* @__PURE__ */ p("div", {
|
|
1011
|
-
ref:
|
|
1012
|
-
className:
|
|
1011
|
+
ref: te,
|
|
1012
|
+
className: G(W.control, i && W.hasError, m && W.isDisabled, N && W.isOpen),
|
|
1013
1013
|
children: [
|
|
1014
1014
|
/* @__PURE__ */ p("select", {
|
|
1015
1015
|
ref: S,
|
|
1016
1016
|
id: w,
|
|
1017
|
-
className:
|
|
1017
|
+
className: W.nativeSelect,
|
|
1018
1018
|
disabled: m,
|
|
1019
1019
|
required: h,
|
|
1020
|
-
value:
|
|
1020
|
+
value: I,
|
|
1021
1021
|
"aria-invalid": i ? !0 : void 0,
|
|
1022
1022
|
"aria-describedby": k || void 0,
|
|
1023
|
-
onChange:
|
|
1023
|
+
onChange: ne,
|
|
1024
1024
|
...x,
|
|
1025
1025
|
children: [a ? /* @__PURE__ */ f("option", {
|
|
1026
1026
|
value: "",
|
|
@@ -1034,7 +1034,7 @@ var we = r(function({ id: e, options: t, label: n, hint: r, error: i, placeholde
|
|
|
1034
1034
|
}),
|
|
1035
1035
|
/* @__PURE__ */ p("button", {
|
|
1036
1036
|
type: "button",
|
|
1037
|
-
className:
|
|
1037
|
+
className: G(W.trigger, c),
|
|
1038
1038
|
disabled: m,
|
|
1039
1039
|
"aria-haspopup": "listbox",
|
|
1040
1040
|
"aria-expanded": N,
|
|
@@ -1043,34 +1043,34 @@ var we = r(function({ id: e, options: t, label: n, hint: r, error: i, placeholde
|
|
|
1043
1043
|
"aria-describedby": k || void 0,
|
|
1044
1044
|
"aria-invalid": i ? !0 : void 0,
|
|
1045
1045
|
onClick: () => P((e) => !e),
|
|
1046
|
-
onKeyDown:
|
|
1046
|
+
onKeyDown: ie,
|
|
1047
1047
|
children: [/* @__PURE__ */ f("span", {
|
|
1048
|
-
className:
|
|
1049
|
-
children:
|
|
1048
|
+
className: L ? void 0 : W.placeholder,
|
|
1049
|
+
children: L?.label ?? a
|
|
1050
1050
|
}), /* @__PURE__ */ f("span", {
|
|
1051
|
-
className:
|
|
1051
|
+
className: W.indicator,
|
|
1052
1052
|
"aria-hidden": "true"
|
|
1053
1053
|
})]
|
|
1054
1054
|
}),
|
|
1055
1055
|
N ? /* @__PURE__ */ p("div", {
|
|
1056
1056
|
id: O,
|
|
1057
|
-
className:
|
|
1057
|
+
className: W.menu,
|
|
1058
1058
|
role: "listbox",
|
|
1059
1059
|
children: [a ? /* @__PURE__ */ f("button", {
|
|
1060
1060
|
type: "button",
|
|
1061
|
-
className:
|
|
1061
|
+
className: G(W.option, !I && W.selectedOption),
|
|
1062
1062
|
role: "option",
|
|
1063
|
-
"aria-selected": !
|
|
1064
|
-
onClick: () =>
|
|
1063
|
+
"aria-selected": !I,
|
|
1064
|
+
onClick: () => re(""),
|
|
1065
1065
|
children: a
|
|
1066
1066
|
}) : null, t.map((e, t) => /* @__PURE__ */ f("button", {
|
|
1067
1067
|
type: "button",
|
|
1068
|
-
className:
|
|
1068
|
+
className: G(W.option, e.value === I && W.selectedOption, t === ee && W.activeOption),
|
|
1069
1069
|
role: "option",
|
|
1070
|
-
"aria-selected": e.value ===
|
|
1070
|
+
"aria-selected": e.value === I,
|
|
1071
1071
|
disabled: e.disabled,
|
|
1072
|
-
onMouseEnter: () =>
|
|
1073
|
-
onClick: () =>
|
|
1072
|
+
onMouseEnter: () => F(t),
|
|
1073
|
+
onClick: () => re(e.value),
|
|
1074
1074
|
children: e.label
|
|
1075
1075
|
}, e.value))]
|
|
1076
1076
|
}) : null
|
|
@@ -1078,20 +1078,20 @@ var we = r(function({ id: e, options: t, label: n, hint: r, error: i, placeholde
|
|
|
1078
1078
|
}),
|
|
1079
1079
|
i ? /* @__PURE__ */ f("p", {
|
|
1080
1080
|
id: E,
|
|
1081
|
-
className:
|
|
1081
|
+
className: W.error,
|
|
1082
1082
|
role: "alert",
|
|
1083
1083
|
children: i
|
|
1084
1084
|
}) : null,
|
|
1085
1085
|
!i && r ? /* @__PURE__ */ f("p", {
|
|
1086
1086
|
id: T,
|
|
1087
|
-
className:
|
|
1087
|
+
className: W.hint,
|
|
1088
1088
|
children: r
|
|
1089
1089
|
}) : null
|
|
1090
1090
|
]
|
|
1091
1091
|
});
|
|
1092
1092
|
});
|
|
1093
|
-
|
|
1094
|
-
var
|
|
1093
|
+
Ee.displayName = "Dropdown";
|
|
1094
|
+
var De = {
|
|
1095
1095
|
group: "_group_1fqa2_1",
|
|
1096
1096
|
option: "_option_1fqa2_8",
|
|
1097
1097
|
selected: "_selected_1fqa2_41",
|
|
@@ -1099,10 +1099,10 @@ var Te = {
|
|
|
1099
1099
|
};
|
|
1100
1100
|
//#endregion
|
|
1101
1101
|
//#region src/components/MultiSelect/MultiSelect.tsx
|
|
1102
|
-
function
|
|
1102
|
+
function Oe(...e) {
|
|
1103
1103
|
return e.filter(Boolean).join(" ");
|
|
1104
1104
|
}
|
|
1105
|
-
var
|
|
1105
|
+
var ke = r(function({ options: e, value: t, defaultValue: n = [], multiple: r = !1, disabled: i = !1, className: a, onValueChange: o, "aria-label": s = r ? "Selezione multipla" : "Selezione singola", ...c }, l) {
|
|
1106
1106
|
let [d, m] = u(n), h = t ?? d, g = r ? h : h.slice(0, 1);
|
|
1107
1107
|
function _(e) {
|
|
1108
1108
|
let n = g.includes(e), i = r ? n ? g.filter((t) => t !== e) : [...g, e] : n ? [] : [e];
|
|
@@ -1112,7 +1112,7 @@ var De = r(function({ options: e, value: t, defaultValue: n = [], multiple: r =
|
|
|
1112
1112
|
ref: l,
|
|
1113
1113
|
role: "group",
|
|
1114
1114
|
"aria-label": s,
|
|
1115
|
-
className:
|
|
1115
|
+
className: Oe(De.group, a),
|
|
1116
1116
|
...c,
|
|
1117
1117
|
children: e.map((e) => {
|
|
1118
1118
|
let t = g.includes(e.value), n = i || e.disabled, r = e.selectedColor ? {
|
|
@@ -1121,21 +1121,21 @@ var De = r(function({ options: e, value: t, defaultValue: n = [], multiple: r =
|
|
|
1121
1121
|
} : void 0;
|
|
1122
1122
|
return /* @__PURE__ */ p("button", {
|
|
1123
1123
|
type: "button",
|
|
1124
|
-
className:
|
|
1124
|
+
className: Oe(De.option, t && De.selected),
|
|
1125
1125
|
disabled: n,
|
|
1126
1126
|
"aria-pressed": t,
|
|
1127
1127
|
style: r,
|
|
1128
1128
|
onClick: () => _(e.value),
|
|
1129
1129
|
children: [e.count === void 0 ? null : /* @__PURE__ */ f("span", {
|
|
1130
|
-
className:
|
|
1130
|
+
className: De.count,
|
|
1131
1131
|
children: e.count
|
|
1132
1132
|
}), /* @__PURE__ */ f("span", { children: e.label })]
|
|
1133
1133
|
}, e.value);
|
|
1134
1134
|
})
|
|
1135
1135
|
});
|
|
1136
1136
|
});
|
|
1137
|
-
|
|
1138
|
-
var
|
|
1137
|
+
ke.displayName = "MultiSelect";
|
|
1138
|
+
var K = {
|
|
1139
1139
|
carousel: "_carousel_17hln_1",
|
|
1140
1140
|
navigationButton: "_navigationButton_17hln_13",
|
|
1141
1141
|
track: "_track_17hln_51",
|
|
@@ -1145,30 +1145,30 @@ var J = {
|
|
|
1145
1145
|
};
|
|
1146
1146
|
//#endregion
|
|
1147
1147
|
//#region src/components/MonthCarousel/MonthCarousel.tsx
|
|
1148
|
-
function
|
|
1148
|
+
function Ae(e) {
|
|
1149
1149
|
return e.year * 12 + e.month - 1;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function je(e, t) {
|
|
1152
1152
|
let n = e.year * 12 + e.month - 1 + t;
|
|
1153
1153
|
return {
|
|
1154
1154
|
year: Math.floor(n / 12),
|
|
1155
1155
|
month: (n % 12 + 12) % 12 + 1
|
|
1156
1156
|
};
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function Me(e, t) {
|
|
1159
1159
|
let n = new Date(e.year, e.month - 1, 1), r = new Intl.DateTimeFormat(t, {
|
|
1160
1160
|
month: "long",
|
|
1161
1161
|
year: "numeric"
|
|
1162
1162
|
}).format(n);
|
|
1163
1163
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1166
|
-
let i =
|
|
1167
|
-
return e === -1 && n ?
|
|
1165
|
+
function Ne(e, t, n, r) {
|
|
1166
|
+
let i = je(t, e);
|
|
1167
|
+
return e === -1 && n ? Ae(i) < Ae(n) : e === 1 && r ? Ae(i) > Ae(r) : !1;
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1170
|
-
let [d, m] = u(0), h = l(null), g = c(() =>
|
|
1171
|
-
n === -1 && _ || n === 1 && v || (m(n), t(
|
|
1169
|
+
function Pe({ value: e, onChange: t, locale: n = "it-IT", minMonth: r, maxMonth: a, disabled: o = !1, ariaLabel: s = "Seleziona il mese" }) {
|
|
1170
|
+
let [d, m] = u(0), h = l(null), g = c(() => Me(e, n), [e, n]), _ = o || Ne(-1, e, r, a), v = o || Ne(1, e, r, a), y = i((n) => {
|
|
1171
|
+
n === -1 && _ || n === 1 && v || (m(n), t(je(e, n)));
|
|
1172
1172
|
}, [
|
|
1173
1173
|
v,
|
|
1174
1174
|
_,
|
|
@@ -1179,57 +1179,57 @@ function Me({ value: e, onChange: t, locale: n = "it-IT", minMonth: r, maxMonth:
|
|
|
1179
1179
|
e.key === "ArrowLeft" ? (e.preventDefault(), y(-1)) : e.key === "ArrowRight" && (e.preventDefault(), y(1));
|
|
1180
1180
|
}
|
|
1181
1181
|
return /* @__PURE__ */ p("div", {
|
|
1182
|
-
className:
|
|
1182
|
+
className: K.carousel,
|
|
1183
1183
|
role: "group",
|
|
1184
1184
|
"aria-label": s,
|
|
1185
1185
|
onKeyDown: b,
|
|
1186
1186
|
children: [
|
|
1187
1187
|
/* @__PURE__ */ f("button", {
|
|
1188
1188
|
type: "button",
|
|
1189
|
-
className:
|
|
1189
|
+
className: K.navigationButton,
|
|
1190
1190
|
"aria-label": "Mese precedente",
|
|
1191
1191
|
disabled: _,
|
|
1192
1192
|
onClick: () => y(-1),
|
|
1193
|
-
children: /* @__PURE__ */ f(
|
|
1193
|
+
children: /* @__PURE__ */ f(I, {
|
|
1194
1194
|
size: 18,
|
|
1195
1195
|
"aria-hidden": "true"
|
|
1196
1196
|
})
|
|
1197
1197
|
}),
|
|
1198
1198
|
/* @__PURE__ */ f("div", {
|
|
1199
|
-
className:
|
|
1199
|
+
className: K.track,
|
|
1200
1200
|
children: /* @__PURE__ */ f("span", {
|
|
1201
|
-
className:
|
|
1201
|
+
className: K.label,
|
|
1202
1202
|
"data-direction": d,
|
|
1203
1203
|
children: g
|
|
1204
1204
|
}, `${e.year}-${e.month}`)
|
|
1205
1205
|
}),
|
|
1206
1206
|
/* @__PURE__ */ f("button", {
|
|
1207
1207
|
type: "button",
|
|
1208
|
-
className:
|
|
1208
|
+
className: K.navigationButton,
|
|
1209
1209
|
"aria-label": "Mese successivo",
|
|
1210
1210
|
disabled: v,
|
|
1211
1211
|
onClick: () => y(1),
|
|
1212
|
-
children: /* @__PURE__ */ f(
|
|
1212
|
+
children: /* @__PURE__ */ f(L, {
|
|
1213
1213
|
size: 18,
|
|
1214
1214
|
"aria-hidden": "true"
|
|
1215
1215
|
})
|
|
1216
1216
|
}),
|
|
1217
1217
|
/* @__PURE__ */ f("span", {
|
|
1218
1218
|
ref: h,
|
|
1219
|
-
className:
|
|
1219
|
+
className: K.srOnly,
|
|
1220
1220
|
"aria-live": "polite",
|
|
1221
1221
|
children: g
|
|
1222
1222
|
})
|
|
1223
1223
|
]
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
|
-
var
|
|
1226
|
+
var Fe = { badge: "_badge_3xnd3_1" };
|
|
1227
1227
|
//#endregion
|
|
1228
1228
|
//#region src/components/Badge/Badge.tsx
|
|
1229
|
-
function
|
|
1229
|
+
function Ie(...e) {
|
|
1230
1230
|
return e.filter(Boolean).join(" ");
|
|
1231
1231
|
}
|
|
1232
|
-
var
|
|
1232
|
+
var Le = r(function({ text: e, color: t, className: n, style: r, ...i }, a) {
|
|
1233
1233
|
let o = t ? {
|
|
1234
1234
|
...r,
|
|
1235
1235
|
"--badge-color": t,
|
|
@@ -1237,14 +1237,14 @@ var Fe = r(function({ text: e, color: t, className: n, style: r, ...i }, a) {
|
|
|
1237
1237
|
} : r;
|
|
1238
1238
|
return /* @__PURE__ */ f("span", {
|
|
1239
1239
|
ref: a,
|
|
1240
|
-
className:
|
|
1240
|
+
className: Ie(Fe.badge, n),
|
|
1241
1241
|
style: o,
|
|
1242
1242
|
...i,
|
|
1243
1243
|
children: e
|
|
1244
1244
|
});
|
|
1245
1245
|
});
|
|
1246
|
-
|
|
1247
|
-
var
|
|
1246
|
+
Le.displayName = "Badge";
|
|
1247
|
+
var q = {
|
|
1248
1248
|
switch: "_switch_1u3md_1",
|
|
1249
1249
|
input: "_input_1u3md_14",
|
|
1250
1250
|
track: "_track_1u3md_24",
|
|
@@ -1256,10 +1256,10 @@ var Y = {
|
|
|
1256
1256
|
};
|
|
1257
1257
|
//#endregion
|
|
1258
1258
|
//#region src/components/Switch/Switch.tsx
|
|
1259
|
-
function
|
|
1259
|
+
function Re(...e) {
|
|
1260
1260
|
return e.filter(Boolean).join(" ");
|
|
1261
1261
|
}
|
|
1262
|
-
var
|
|
1262
|
+
var ze = r(function({ label: e, className: t, color: n, size: r = "md", disabled: i = !1, onChange: a, onCheckedChange: o, "aria-label": s = "Interruttore", style: c, ...l }, u) {
|
|
1263
1263
|
function d(e) {
|
|
1264
1264
|
a?.(e), o?.(e.target.checked);
|
|
1265
1265
|
}
|
|
@@ -1268,32 +1268,112 @@ var Le = r(function({ label: e, className: t, color: n, size: r = "md", disabled
|
|
|
1268
1268
|
"--switch-color": n
|
|
1269
1269
|
} : c;
|
|
1270
1270
|
return /* @__PURE__ */ p("label", {
|
|
1271
|
-
className:
|
|
1271
|
+
className: Re(q.switch, q[`size${r[0].toUpperCase()}${r.slice(1)}`], i && q.disabled, t),
|
|
1272
1272
|
style: m,
|
|
1273
1273
|
children: [
|
|
1274
1274
|
/* @__PURE__ */ f("input", {
|
|
1275
1275
|
ref: u,
|
|
1276
1276
|
type: "checkbox",
|
|
1277
|
-
className:
|
|
1277
|
+
className: q.input,
|
|
1278
1278
|
disabled: i,
|
|
1279
1279
|
"aria-label": s,
|
|
1280
1280
|
onChange: d,
|
|
1281
1281
|
...l
|
|
1282
1282
|
}),
|
|
1283
1283
|
/* @__PURE__ */ f("span", {
|
|
1284
|
-
className:
|
|
1284
|
+
className: q.track,
|
|
1285
1285
|
"aria-hidden": "true",
|
|
1286
|
-
children: /* @__PURE__ */ f("span", { className:
|
|
1286
|
+
children: /* @__PURE__ */ f("span", { className: q.thumb })
|
|
1287
1287
|
}),
|
|
1288
1288
|
e ? /* @__PURE__ */ f("span", {
|
|
1289
|
-
className:
|
|
1289
|
+
className: q.label,
|
|
1290
1290
|
children: e
|
|
1291
1291
|
}) : null
|
|
1292
1292
|
]
|
|
1293
1293
|
});
|
|
1294
1294
|
});
|
|
1295
|
-
|
|
1296
|
-
var
|
|
1295
|
+
ze.displayName = "Switch";
|
|
1296
|
+
var J = {
|
|
1297
|
+
list: "_list_gx1se_1",
|
|
1298
|
+
listItem: "_listItem_gx1se_12",
|
|
1299
|
+
itemInner: "_itemInner_gx1se_21",
|
|
1300
|
+
interactive: "_interactive_gx1se_36",
|
|
1301
|
+
leading: "_leading_gx1se_50",
|
|
1302
|
+
content: "_content_gx1se_57",
|
|
1303
|
+
meta: "_meta_gx1se_65",
|
|
1304
|
+
trailing: "_trailing_gx1se_74",
|
|
1305
|
+
chevron: "_chevron_gx1se_86",
|
|
1306
|
+
action: "_action_gx1se_91",
|
|
1307
|
+
statusMessage: "_statusMessage_gx1se_98"
|
|
1308
|
+
};
|
|
1309
|
+
//#endregion
|
|
1310
|
+
//#region src/components/List/List.tsx
|
|
1311
|
+
function Be(...e) {
|
|
1312
|
+
return e.filter(Boolean).join(" ");
|
|
1313
|
+
}
|
|
1314
|
+
function Ve({ data: e, getRowId: t, renderItem: n, onItemClick: r, showChevron: i = !0, emptyMessage: a = "Non sono disponibili elementi da visualizzare.", isLoading: o = !1, ariaLabel: s, containerClassName: c }) {
|
|
1315
|
+
let l = !!r;
|
|
1316
|
+
return o ? /* @__PURE__ */ f("div", {
|
|
1317
|
+
className: Be(J.list, c),
|
|
1318
|
+
"aria-label": s,
|
|
1319
|
+
"aria-busy": "true",
|
|
1320
|
+
role: "status",
|
|
1321
|
+
children: /* @__PURE__ */ f("p", {
|
|
1322
|
+
className: J.statusMessage,
|
|
1323
|
+
children: "Caricamento in corso…"
|
|
1324
|
+
})
|
|
1325
|
+
}) : e.length === 0 ? /* @__PURE__ */ f("div", {
|
|
1326
|
+
className: Be(J.list, c),
|
|
1327
|
+
"aria-label": s,
|
|
1328
|
+
role: "status",
|
|
1329
|
+
children: /* @__PURE__ */ f("p", {
|
|
1330
|
+
className: J.statusMessage,
|
|
1331
|
+
children: a
|
|
1332
|
+
})
|
|
1333
|
+
}) : /* @__PURE__ */ f("ul", {
|
|
1334
|
+
className: Be(J.list, c),
|
|
1335
|
+
"aria-label": s,
|
|
1336
|
+
children: e.map((e, a) => {
|
|
1337
|
+
let o = t(e, a), s = n(e, a), c = l ? "button" : "div";
|
|
1338
|
+
return /* @__PURE__ */ p("li", {
|
|
1339
|
+
className: J.listItem,
|
|
1340
|
+
children: [/* @__PURE__ */ p(c, {
|
|
1341
|
+
type: l ? "button" : void 0,
|
|
1342
|
+
className: Be(J.itemInner, l && J.interactive),
|
|
1343
|
+
onClick: l ? () => r?.(e, a) : void 0,
|
|
1344
|
+
children: [
|
|
1345
|
+
s.leading ? /* @__PURE__ */ f("span", {
|
|
1346
|
+
className: J.leading,
|
|
1347
|
+
children: s.leading
|
|
1348
|
+
}) : null,
|
|
1349
|
+
/* @__PURE__ */ f("span", {
|
|
1350
|
+
className: J.content,
|
|
1351
|
+
children: s.content
|
|
1352
|
+
}),
|
|
1353
|
+
s.meta ? /* @__PURE__ */ f("span", {
|
|
1354
|
+
className: J.meta,
|
|
1355
|
+
children: s.meta
|
|
1356
|
+
}) : null,
|
|
1357
|
+
s.trailing ? /* @__PURE__ */ f("span", {
|
|
1358
|
+
className: J.trailing,
|
|
1359
|
+
children: s.trailing
|
|
1360
|
+
}) : null,
|
|
1361
|
+
l && i ? /* @__PURE__ */ f(L, {
|
|
1362
|
+
className: J.chevron,
|
|
1363
|
+
size: 18,
|
|
1364
|
+
"aria-hidden": "true"
|
|
1365
|
+
}) : null
|
|
1366
|
+
]
|
|
1367
|
+
}), s.action ? /* @__PURE__ */ f("span", {
|
|
1368
|
+
className: J.action,
|
|
1369
|
+
onClick: (e) => e.stopPropagation(),
|
|
1370
|
+
children: s.action
|
|
1371
|
+
}) : null]
|
|
1372
|
+
}, o);
|
|
1373
|
+
})
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
var Y = {
|
|
1297
1377
|
wrapper: "_wrapper_1ly5u_1",
|
|
1298
1378
|
table: "_table_1ly5u_11",
|
|
1299
1379
|
caption: "_caption_1ly5u_19",
|
|
@@ -1314,20 +1394,20 @@ var X = {
|
|
|
1314
1394
|
};
|
|
1315
1395
|
//#endregion
|
|
1316
1396
|
//#region src/components/DataTable/DataTable.tsx
|
|
1317
|
-
function
|
|
1397
|
+
function X(...e) {
|
|
1318
1398
|
return e.filter(Boolean).join(" ");
|
|
1319
1399
|
}
|
|
1320
|
-
function
|
|
1400
|
+
function He(e, t) {
|
|
1321
1401
|
return e == null ? 1 : t == null ? -1 : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t), "it-IT", {
|
|
1322
1402
|
numeric: !0,
|
|
1323
1403
|
sensitivity: "base"
|
|
1324
1404
|
});
|
|
1325
1405
|
}
|
|
1326
|
-
function
|
|
1406
|
+
function Ue({ columns: e, data: t, getRowId: n, caption: r, emptyMessage: i = "Non sono disponibili dati da visualizzare.", isLoading: a = !1, sortable: o = !0, onRowClick: s, rowAriaLabel: l, className: d, containerClassName: m, ...h }) {
|
|
1327
1407
|
let [g, _] = u(null), v = c(() => {
|
|
1328
1408
|
if (!g?.column.sortValue) return t;
|
|
1329
1409
|
let { column: e, direction: n } = g, r = n === "ascending" ? 1 : -1;
|
|
1330
|
-
return [...t].sort((t, n) =>
|
|
1410
|
+
return [...t].sort((t, n) => He(e.sortValue?.(t), e.sortValue?.(n)) * r);
|
|
1331
1411
|
}, [t, g]);
|
|
1332
1412
|
function y(e) {
|
|
1333
1413
|
!o || !e.sortable || !e.sortValue || _((t) => t?.column.id === e.id ? t.direction === "ascending" ? {
|
|
@@ -1342,42 +1422,42 @@ function ze({ columns: e, data: t, getRowId: n, caption: r, emptyMessage: i = "N
|
|
|
1342
1422
|
return g?.column.id === e.id ? g.direction : "none";
|
|
1343
1423
|
}
|
|
1344
1424
|
function x(e) {
|
|
1345
|
-
return g?.column.id === e.id ? g.direction === "ascending" ? /* @__PURE__ */ f(
|
|
1425
|
+
return g?.column.id === e.id ? g.direction === "ascending" ? /* @__PURE__ */ f(R, {
|
|
1346
1426
|
size: 15,
|
|
1347
1427
|
"aria-hidden": "true"
|
|
1348
|
-
}) : /* @__PURE__ */ f(
|
|
1428
|
+
}) : /* @__PURE__ */ f(te, {
|
|
1349
1429
|
size: 15,
|
|
1350
1430
|
"aria-hidden": "true"
|
|
1351
|
-
}) : /* @__PURE__ */ f(
|
|
1431
|
+
}) : /* @__PURE__ */ f(ne, {
|
|
1352
1432
|
size: 15,
|
|
1353
1433
|
"aria-hidden": "true"
|
|
1354
1434
|
});
|
|
1355
1435
|
}
|
|
1356
1436
|
return /* @__PURE__ */ f("div", {
|
|
1357
|
-
className:
|
|
1437
|
+
className: X(Y.wrapper, m),
|
|
1358
1438
|
children: /* @__PURE__ */ p("table", {
|
|
1359
|
-
className:
|
|
1439
|
+
className: X(Y.table, d),
|
|
1360
1440
|
...h,
|
|
1361
1441
|
children: [
|
|
1362
1442
|
r ? /* @__PURE__ */ f("caption", {
|
|
1363
|
-
className:
|
|
1443
|
+
className: Y.caption,
|
|
1364
1444
|
children: r
|
|
1365
1445
|
}) : null,
|
|
1366
1446
|
/* @__PURE__ */ f("colgroup", { children: e.map((e) => /* @__PURE__ */ f("col", { style: e.width ? { width: e.width } : void 0 }, e.id)) }),
|
|
1367
1447
|
/* @__PURE__ */ f("thead", {
|
|
1368
|
-
className:
|
|
1448
|
+
className: Y.head,
|
|
1369
1449
|
children: /* @__PURE__ */ f("tr", { children: e.map((e) => {
|
|
1370
1450
|
let t = o && e.sortable && !!e.sortValue;
|
|
1371
1451
|
return /* @__PURE__ */ f("th", {
|
|
1372
1452
|
scope: "col",
|
|
1373
1453
|
"aria-sort": t ? b(e) : void 0,
|
|
1374
|
-
className:
|
|
1454
|
+
className: X(Y.headerCell, Y[`align${We(e.align ?? "left")}`], e.hideOnMobile && Y.hideOnMobile),
|
|
1375
1455
|
children: t ? /* @__PURE__ */ p("button", {
|
|
1376
1456
|
type: "button",
|
|
1377
|
-
className:
|
|
1457
|
+
className: Y.sortButton,
|
|
1378
1458
|
onClick: () => y(e),
|
|
1379
1459
|
children: [/* @__PURE__ */ f("span", { children: e.header }), /* @__PURE__ */ f("span", {
|
|
1380
|
-
className:
|
|
1460
|
+
className: Y.sortIcon,
|
|
1381
1461
|
children: x(e)
|
|
1382
1462
|
})]
|
|
1383
1463
|
}) : e.header
|
|
@@ -1385,15 +1465,15 @@ function ze({ columns: e, data: t, getRowId: n, caption: r, emptyMessage: i = "N
|
|
|
1385
1465
|
}) })
|
|
1386
1466
|
}),
|
|
1387
1467
|
/* @__PURE__ */ p("tbody", {
|
|
1388
|
-
className:
|
|
1468
|
+
className: Y.body,
|
|
1389
1469
|
children: [
|
|
1390
1470
|
a ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", {
|
|
1391
|
-
className:
|
|
1471
|
+
className: Y.statusCell,
|
|
1392
1472
|
colSpan: e.length,
|
|
1393
1473
|
children: "Caricamento dati…"
|
|
1394
1474
|
}) }) : null,
|
|
1395
1475
|
!a && v.length === 0 ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", {
|
|
1396
|
-
className:
|
|
1476
|
+
className: Y.statusCell,
|
|
1397
1477
|
colSpan: e.length,
|
|
1398
1478
|
children: i
|
|
1399
1479
|
}) }) : null,
|
|
@@ -1402,7 +1482,7 @@ function ze({ columns: e, data: t, getRowId: n, caption: r, emptyMessage: i = "N
|
|
|
1402
1482
|
a?.(t, r);
|
|
1403
1483
|
};
|
|
1404
1484
|
return /* @__PURE__ */ f("tr", {
|
|
1405
|
-
className:
|
|
1485
|
+
className: X(Y.row, o && Y.interactiveRow),
|
|
1406
1486
|
tabIndex: o ? 0 : void 0,
|
|
1407
1487
|
"aria-label": o ? l?.(t, r) : void 0,
|
|
1408
1488
|
onClick: o ? c : void 0,
|
|
@@ -1410,7 +1490,7 @@ function ze({ columns: e, data: t, getRowId: n, caption: r, emptyMessage: i = "N
|
|
|
1410
1490
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), c());
|
|
1411
1491
|
} : void 0,
|
|
1412
1492
|
children: e.map((e) => /* @__PURE__ */ f("td", {
|
|
1413
|
-
className:
|
|
1493
|
+
className: X(Y.cell, Y[`align${We(e.align ?? "left")}`], e.numeric && Y.numeric, e.hideOnMobile && Y.hideOnMobile),
|
|
1414
1494
|
children: e.cell(t, r)
|
|
1415
1495
|
}, e.id))
|
|
1416
1496
|
}, i);
|
|
@@ -1421,10 +1501,10 @@ function ze({ columns: e, data: t, getRowId: n, caption: r, emptyMessage: i = "N
|
|
|
1421
1501
|
})
|
|
1422
1502
|
});
|
|
1423
1503
|
}
|
|
1424
|
-
function
|
|
1504
|
+
function We(e) {
|
|
1425
1505
|
return `${e.charAt(0).toUpperCase()}${e.slice(1)}`;
|
|
1426
1506
|
}
|
|
1427
|
-
var
|
|
1507
|
+
var Z = {
|
|
1428
1508
|
root: "_root_4rywg_1",
|
|
1429
1509
|
track: "_track_4rywg_8",
|
|
1430
1510
|
sm: "_sm_4rywg_16",
|
|
@@ -1434,40 +1514,40 @@ var Q = {
|
|
|
1434
1514
|
};
|
|
1435
1515
|
//#endregion
|
|
1436
1516
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
1437
|
-
function
|
|
1517
|
+
function Ge(e, t) {
|
|
1438
1518
|
if (t <= 0) return 0;
|
|
1439
1519
|
let n = e / t * 100;
|
|
1440
1520
|
return Math.min(100, Math.max(0, n));
|
|
1441
1521
|
}
|
|
1442
|
-
var
|
|
1443
|
-
let n =
|
|
1522
|
+
var Ke = (e, t) => {
|
|
1523
|
+
let n = Ge(e, t);
|
|
1444
1524
|
return `${Math.round(n)}%`;
|
|
1445
1525
|
};
|
|
1446
|
-
function
|
|
1447
|
-
let c =
|
|
1526
|
+
function qe({ value: e, max: t = 100, color: n = "var(--color-danger-500)", showValue: r = !0, formatValue: i = Ke, label: a, size: o = "md", className: s }) {
|
|
1527
|
+
let c = Ge(e, t), l = Math.max(0, t), u = Math.min(l, Math.max(0, e));
|
|
1448
1528
|
return /* @__PURE__ */ p("div", {
|
|
1449
|
-
className: [
|
|
1529
|
+
className: [Z.root, s].filter(Boolean).join(" "),
|
|
1450
1530
|
children: [/* @__PURE__ */ f("div", {
|
|
1451
|
-
className: [
|
|
1531
|
+
className: [Z.track, Z[o]].join(" "),
|
|
1452
1532
|
role: "progressbar",
|
|
1453
1533
|
"aria-valuemin": 0,
|
|
1454
1534
|
"aria-valuemax": l,
|
|
1455
1535
|
"aria-valuenow": u,
|
|
1456
1536
|
"aria-label": a,
|
|
1457
1537
|
children: /* @__PURE__ */ f("div", {
|
|
1458
|
-
className:
|
|
1538
|
+
className: Z.fill,
|
|
1459
1539
|
style: {
|
|
1460
1540
|
width: `${c}%`,
|
|
1461
1541
|
backgroundColor: n
|
|
1462
1542
|
}
|
|
1463
1543
|
})
|
|
1464
1544
|
}), r ? /* @__PURE__ */ f("span", {
|
|
1465
|
-
className: `${
|
|
1545
|
+
className: `${Z.value} numeric`,
|
|
1466
1546
|
children: i(e, t)
|
|
1467
1547
|
}) : null]
|
|
1468
1548
|
});
|
|
1469
1549
|
}
|
|
1470
|
-
var
|
|
1550
|
+
var Q = {
|
|
1471
1551
|
root: "_root_xnpes_1",
|
|
1472
1552
|
track: "_track_xnpes_6",
|
|
1473
1553
|
slide: "_slide_xnpes_19",
|
|
@@ -1480,10 +1560,10 @@ var $ = {
|
|
|
1480
1560
|
};
|
|
1481
1561
|
//#endregion
|
|
1482
1562
|
//#region src/components/Carousel/Carousel.tsx
|
|
1483
|
-
function
|
|
1563
|
+
function $(...e) {
|
|
1484
1564
|
return e.filter(Boolean).join(" ");
|
|
1485
1565
|
}
|
|
1486
|
-
function
|
|
1566
|
+
function Je({ children: t, ariaLabel: n = "Carosello", showArrows: r = !0, showDots: a = !0, gap: c = "var(--space-4)", slideWidth: m = "100%", className: h }) {
|
|
1487
1567
|
let g = l(null), _ = l([]), v = s(), y = e.toArray(t), [b, x] = u(0), [S, C] = u(!1), [w, T] = u(y.length > 1), E = i(() => {
|
|
1488
1568
|
let e = g.current;
|
|
1489
1569
|
if (!e) return;
|
|
@@ -1519,14 +1599,14 @@ function Ge({ children: t, ariaLabel: n = "Carosello", showArrows: r = !0, showD
|
|
|
1519
1599
|
D(Math.min(y.length - 1, b + 1));
|
|
1520
1600
|
}
|
|
1521
1601
|
return /* @__PURE__ */ p("div", {
|
|
1522
|
-
className:
|
|
1602
|
+
className: $(Q.root, h),
|
|
1523
1603
|
role: "region",
|
|
1524
1604
|
"aria-roledescription": "carosello",
|
|
1525
1605
|
"aria-label": n,
|
|
1526
1606
|
children: [
|
|
1527
1607
|
/* @__PURE__ */ f("div", {
|
|
1528
1608
|
ref: g,
|
|
1529
|
-
className:
|
|
1609
|
+
className: Q.track,
|
|
1530
1610
|
style: { gap: c },
|
|
1531
1611
|
onScroll: E,
|
|
1532
1612
|
children: y.map((e, t) => /* @__PURE__ */ f("div", {
|
|
@@ -1534,7 +1614,7 @@ function Ge({ children: t, ariaLabel: n = "Carosello", showArrows: r = !0, showD
|
|
|
1534
1614
|
_.current[t] = e;
|
|
1535
1615
|
},
|
|
1536
1616
|
id: `${v}-slide-${t}`,
|
|
1537
|
-
className:
|
|
1617
|
+
className: Q.slide,
|
|
1538
1618
|
style: { minWidth: m },
|
|
1539
1619
|
role: "group",
|
|
1540
1620
|
"aria-roledescription": "slide",
|
|
@@ -1544,33 +1624,33 @@ function Ge({ children: t, ariaLabel: n = "Carosello", showArrows: r = !0, showD
|
|
|
1544
1624
|
}),
|
|
1545
1625
|
r && y.length > 1 ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("button", {
|
|
1546
1626
|
type: "button",
|
|
1547
|
-
className:
|
|
1627
|
+
className: $(Q.arrow, Q.arrowPrev),
|
|
1548
1628
|
"aria-label": "Elemento precedente",
|
|
1549
1629
|
disabled: !S,
|
|
1550
1630
|
onClick: O,
|
|
1551
|
-
children: /* @__PURE__ */ f(
|
|
1631
|
+
children: /* @__PURE__ */ f(I, {
|
|
1552
1632
|
size: 18,
|
|
1553
1633
|
"aria-hidden": "true"
|
|
1554
1634
|
})
|
|
1555
1635
|
}), /* @__PURE__ */ f("button", {
|
|
1556
1636
|
type: "button",
|
|
1557
|
-
className:
|
|
1637
|
+
className: $(Q.arrow, Q.arrowNext),
|
|
1558
1638
|
"aria-label": "Elemento successivo",
|
|
1559
1639
|
disabled: !w,
|
|
1560
1640
|
onClick: k,
|
|
1561
|
-
children: /* @__PURE__ */ f(
|
|
1641
|
+
children: /* @__PURE__ */ f(L, {
|
|
1562
1642
|
size: 18,
|
|
1563
1643
|
"aria-hidden": "true"
|
|
1564
1644
|
})
|
|
1565
1645
|
})] }) : null,
|
|
1566
1646
|
a && y.length > 1 ? /* @__PURE__ */ f("div", {
|
|
1567
|
-
className:
|
|
1647
|
+
className: Q.dots,
|
|
1568
1648
|
role: "tablist",
|
|
1569
1649
|
"aria-label": "Vai a",
|
|
1570
1650
|
children: y.map((e, t) => /* @__PURE__ */ f("button", {
|
|
1571
1651
|
type: "button",
|
|
1572
1652
|
role: "tab",
|
|
1573
|
-
className:
|
|
1653
|
+
className: $(Q.dot, t === b && Q.activeDot),
|
|
1574
1654
|
"aria-selected": t === b,
|
|
1575
1655
|
"aria-controls": `${v}-slide-${t}`,
|
|
1576
1656
|
"aria-label": `Vai all'elemento ${t + 1}`,
|
|
@@ -1581,4 +1661,4 @@ function Ge({ children: t, ariaLabel: n = "Carosello", showArrows: r = !0, showD
|
|
|
1581
1661
|
});
|
|
1582
1662
|
}
|
|
1583
1663
|
//#endregion
|
|
1584
|
-
export {
|
|
1664
|
+
export { Le as Badge, v as Button, le as CalculatorKeypad, C as Card, Je as Carousel, Ue as DataTable, ye as DatePicker, Ee as Dropdown, Ce as IconButton, Ve as List, Pe as MonthCarousel, ke as MultiSelect, qe as ProgressBar, ze as Switch, Te as TextField };
|