@starasia/date 5.2.5 → 5.3.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/date.es.js +316 -275
- package/dist/date.umd.js +39 -2
- package/dist/interfaces.d.ts +2 -2
- package/package.json +1 -1
package/dist/date.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as $, jsx as a, Fragment as en } from "react/jsx-runtime";
|
|
2
2
|
import { useState as A, useRef as J, useEffect as B, forwardRef as K } from "react";
|
|
3
3
|
const R = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
|
|
4
4
|
|
|
@@ -348,6 +348,12 @@ const R = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
|
|
|
348
348
|
border-style: solid;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
.sa-calendar-input-container.xs {
|
|
352
|
+
height: var(--sa-h-7, 28px);
|
|
353
|
+
border-radius: var(--sa-radii-sm, 6px);
|
|
354
|
+
font-size: var(--sa-font-size-sm, 12px);
|
|
355
|
+
padding-inline: var(--sa-spacing-2, 8px);
|
|
356
|
+
}
|
|
351
357
|
.sa-calendar-input-container.sm {
|
|
352
358
|
height: var(--sa-h-8, 32px);
|
|
353
359
|
border-radius: var(--sa-radii-sm, 6px);
|
|
@@ -501,6 +507,37 @@ const R = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
|
|
|
501
507
|
height: 38px;
|
|
502
508
|
}
|
|
503
509
|
|
|
510
|
+
/* xs trigger → reuse the compact (sm) calendar panel */
|
|
511
|
+
.sa-calendar.sa-calendar-size-xs {
|
|
512
|
+
padding: 16px 12px;
|
|
513
|
+
gap: 8px;
|
|
514
|
+
}
|
|
515
|
+
.sa-calendar.sa-calendar-size-xs.sa-calendar-no-padding {
|
|
516
|
+
padding: 0;
|
|
517
|
+
}
|
|
518
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-days-name-preivew,
|
|
519
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-days-number-preivew {
|
|
520
|
+
gap: 4px;
|
|
521
|
+
}
|
|
522
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-days-name-preivew p,
|
|
523
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-days-number-preivew p {
|
|
524
|
+
font-size: var(--sa-font-size-sm, 12px);
|
|
525
|
+
}
|
|
526
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-days-number-preivew p {
|
|
527
|
+
width: 28px;
|
|
528
|
+
height: 26px;
|
|
529
|
+
}
|
|
530
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-days-today::before {
|
|
531
|
+
width: 22px;
|
|
532
|
+
height: 22px;
|
|
533
|
+
}
|
|
534
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-months-preview p,
|
|
535
|
+
.sa-calendar.sa-calendar-size-xs .sa-calendar-years-preview p {
|
|
536
|
+
font-size: var(--sa-font-size-sm, 12px);
|
|
537
|
+
width: 76px;
|
|
538
|
+
height: 38px;
|
|
539
|
+
}
|
|
540
|
+
|
|
504
541
|
.sa-calendar.sa-calendar-size-lg {
|
|
505
542
|
padding: 28px 20px;
|
|
506
543
|
gap: 16px;
|
|
@@ -571,48 +608,50 @@ const R = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
|
|
|
571
608
|
"Nov",
|
|
572
609
|
"Dec"
|
|
573
610
|
];
|
|
574
|
-
function rn(
|
|
575
|
-
const [n, t] = A(
|
|
576
|
-
o.current && !o.current.contains(
|
|
611
|
+
function rn(e) {
|
|
612
|
+
const [n, t] = A(e), o = J(null), l = (u) => {
|
|
613
|
+
o.current && !o.current.contains(u.target) && t(!1);
|
|
577
614
|
};
|
|
578
615
|
return B(() => (document.addEventListener("click", l, !0), () => {
|
|
579
616
|
document.removeEventListener("click", l, !0);
|
|
580
617
|
}), []), { ref: o, isComponentVisible: n, setIsComponentVisible: t };
|
|
581
618
|
}
|
|
582
|
-
const Q = "sa-calendar-input-styles", dn = (
|
|
619
|
+
const Q = "sa-calendar-input-styles", dn = (e) => {
|
|
583
620
|
if (!document.getElementById(Q)) {
|
|
584
621
|
const n = document.createElement("style");
|
|
585
|
-
n.id = Q, n.textContent =
|
|
622
|
+
n.id = Q, n.textContent = e, document.head.appendChild(n);
|
|
586
623
|
}
|
|
587
624
|
};
|
|
588
625
|
dn(R);
|
|
589
|
-
const O = (
|
|
590
|
-
if (
|
|
626
|
+
const O = (e) => {
|
|
627
|
+
if (e === "xs")
|
|
628
|
+
return 14;
|
|
629
|
+
if (e === "sm")
|
|
591
630
|
return 16;
|
|
592
|
-
if (
|
|
631
|
+
if (e === "md")
|
|
593
632
|
return 16;
|
|
594
|
-
if (
|
|
633
|
+
if (e === "lg")
|
|
595
634
|
return 20;
|
|
596
|
-
}, cn = (
|
|
635
|
+
}, cn = (e) => {
|
|
597
636
|
const {
|
|
598
|
-
size: n = "
|
|
637
|
+
size: n = "sm",
|
|
599
638
|
status: t = "default",
|
|
600
639
|
variant: o = "outline",
|
|
601
640
|
clearable: l,
|
|
602
|
-
onClear:
|
|
641
|
+
onClear: u,
|
|
603
642
|
...i
|
|
604
|
-
} =
|
|
643
|
+
} = e, g = J(null), f = () => {
|
|
605
644
|
g.current && i.onClick && (g.current.focus(), i.onClick(""));
|
|
606
645
|
}, r = t === "disable" || i.disabled, d = !!i.value, w = l && d && !r, M = (k) => {
|
|
607
|
-
k.stopPropagation(),
|
|
646
|
+
k.stopPropagation(), u == null || u();
|
|
608
647
|
};
|
|
609
|
-
return /* @__PURE__ */
|
|
648
|
+
return /* @__PURE__ */ $(
|
|
610
649
|
"div",
|
|
611
650
|
{
|
|
612
651
|
className: `sa-calendar-input-container sa-calendar-input-${o} sa-calendar-input-container-${t} ${n} `,
|
|
613
652
|
onClick: f,
|
|
614
653
|
children: [
|
|
615
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-input-container-icon-left", children: /* @__PURE__ */ a(
|
|
616
655
|
"svg",
|
|
617
656
|
{
|
|
618
657
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -620,7 +659,7 @@ const O = (a) => {
|
|
|
620
659
|
height: O(n),
|
|
621
660
|
viewBox: "0 0 20 20",
|
|
622
661
|
fill: "none",
|
|
623
|
-
children: /* @__PURE__ */
|
|
662
|
+
children: /* @__PURE__ */ a(
|
|
624
663
|
"path",
|
|
625
664
|
{
|
|
626
665
|
d: "M12.5 2.08301V5.41634M7.50002 2.08301V5.41634M17.0688 9.58301H2.93113M17.0688 9.58301C16.8953 4.82698 15.1284 3.33301 10 3.33301C4.87165 3.33301 3.10469 4.82698 2.93113 9.58301M17.0688 9.58301C17.0786 9.85037 17.0834 10.128 17.0834 10.4163C17.0834 15.833 15.4167 17.4997 10 17.4997C4.58335 17.4997 2.91669 15.833 2.91669 10.4163C2.91669 10.128 2.92138 9.85037 2.93113 9.58301",
|
|
@@ -632,7 +671,7 @@ const O = (a) => {
|
|
|
632
671
|
)
|
|
633
672
|
}
|
|
634
673
|
) }),
|
|
635
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-input-preview-container", children: /* @__PURE__ */ a(
|
|
636
675
|
"input",
|
|
637
676
|
{
|
|
638
677
|
className: "sa-calendar-input",
|
|
@@ -642,14 +681,14 @@ const O = (a) => {
|
|
|
642
681
|
ref: g
|
|
643
682
|
}
|
|
644
683
|
) }),
|
|
645
|
-
w ? /* @__PURE__ */
|
|
684
|
+
w ? /* @__PURE__ */ a(
|
|
646
685
|
"button",
|
|
647
686
|
{
|
|
648
687
|
type: "button",
|
|
649
688
|
"aria-label": "Clear date",
|
|
650
689
|
className: "sa-calendar-input-clear",
|
|
651
690
|
onClick: M,
|
|
652
|
-
children: /* @__PURE__ */
|
|
691
|
+
children: /* @__PURE__ */ a(
|
|
653
692
|
"svg",
|
|
654
693
|
{
|
|
655
694
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -657,7 +696,7 @@ const O = (a) => {
|
|
|
657
696
|
height: O(n),
|
|
658
697
|
viewBox: "0 0 20 20",
|
|
659
698
|
fill: "none",
|
|
660
|
-
children: /* @__PURE__ */
|
|
699
|
+
children: /* @__PURE__ */ a(
|
|
661
700
|
"path",
|
|
662
701
|
{
|
|
663
702
|
d: "M5 5L15 15M15 5L5 15",
|
|
@@ -670,7 +709,7 @@ const O = (a) => {
|
|
|
670
709
|
}
|
|
671
710
|
)
|
|
672
711
|
}
|
|
673
|
-
) : /* @__PURE__ */
|
|
712
|
+
) : /* @__PURE__ */ a("div", { className: "sa-calendar-input-container-icon-right", children: /* @__PURE__ */ a(
|
|
674
713
|
"svg",
|
|
675
714
|
{
|
|
676
715
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -678,7 +717,7 @@ const O = (a) => {
|
|
|
678
717
|
height: O(n),
|
|
679
718
|
viewBox: "0 0 20 20",
|
|
680
719
|
fill: "none",
|
|
681
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ a(
|
|
682
721
|
"path",
|
|
683
722
|
{
|
|
684
723
|
d: "M3.33331 7.5L9.99998 14.1667L16.6666 7.5",
|
|
@@ -693,121 +732,121 @@ const O = (a) => {
|
|
|
693
732
|
]
|
|
694
733
|
}
|
|
695
734
|
);
|
|
696
|
-
},
|
|
697
|
-
date:
|
|
735
|
+
}, pn = ({
|
|
736
|
+
date: e,
|
|
698
737
|
setDate: n,
|
|
699
738
|
dateRange: t,
|
|
700
739
|
setDateRange: o,
|
|
701
740
|
onChange: l,
|
|
702
|
-
minDate:
|
|
741
|
+
minDate: u,
|
|
703
742
|
maxDate: i,
|
|
704
743
|
input: g
|
|
705
744
|
}) => {
|
|
706
|
-
var
|
|
745
|
+
var z, c, y;
|
|
707
746
|
const [f, r] = A(null);
|
|
708
|
-
let d = new Date(
|
|
709
|
-
const k =
|
|
710
|
-
for (let
|
|
711
|
-
|
|
712
|
-
d.getDate() + (
|
|
747
|
+
let d = new Date(e.getFullYear(), e.getMonth(), 1), w = d.getDay(), M = [];
|
|
748
|
+
const k = e.getMonth(), N = (/* @__PURE__ */ new Date()).toDateString(), m = !!(t.from && !t.to), h = m && f ? f : null;
|
|
749
|
+
for (let p = 0; p < 42; p++) {
|
|
750
|
+
p === 0 && w === 0 ? d.setDate(d.getDate() - 7) : p === 0 ? d.setDate(
|
|
751
|
+
d.getDate() + (p - w)
|
|
713
752
|
) : d.setDate(d.getDate() + 1);
|
|
714
|
-
let
|
|
753
|
+
let b = {
|
|
715
754
|
currentMonth: d.getMonth() === k,
|
|
716
755
|
date: new Date(d),
|
|
717
756
|
month: d.getMonth(),
|
|
718
757
|
number: d.getDate(),
|
|
719
|
-
selected: d.toDateString() === ((
|
|
758
|
+
selected: d.toDateString() === ((z = t.from) == null ? void 0 : z.toDateString()) || d.toDateString() === (((c = t.to) == null ? void 0 : c.toDateString()) || ((y = t.from) == null ? void 0 : y.toDateString())),
|
|
720
759
|
isToday: d.toDateString() === N,
|
|
721
760
|
year: d.getFullYear(),
|
|
722
|
-
isDisabled:
|
|
761
|
+
isDisabled: u && d < u || i && d > i
|
|
723
762
|
};
|
|
724
|
-
M.push(
|
|
763
|
+
M.push(b);
|
|
725
764
|
}
|
|
726
|
-
const s = (
|
|
727
|
-
n(
|
|
728
|
-
}, x = (
|
|
729
|
-
let
|
|
730
|
-
if (
|
|
731
|
-
|
|
732
|
-
else if (!
|
|
733
|
-
|
|
765
|
+
const s = (p) => {
|
|
766
|
+
n(p);
|
|
767
|
+
}, x = (p) => {
|
|
768
|
+
let b = { ...t };
|
|
769
|
+
if (b.from && b.to)
|
|
770
|
+
b = { from: p, to: null };
|
|
771
|
+
else if (!b.from)
|
|
772
|
+
b = { from: p, to: null };
|
|
734
773
|
else {
|
|
735
|
-
const E =
|
|
736
|
-
|
|
774
|
+
const E = b.from.getTime();
|
|
775
|
+
p.getTime() > E ? b = { from: b.from, to: p } : b = { from: p, to: b.from };
|
|
737
776
|
}
|
|
738
|
-
o(
|
|
777
|
+
o(b), l(b);
|
|
739
778
|
};
|
|
740
|
-
return /* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ $(
|
|
741
780
|
"div",
|
|
742
781
|
{
|
|
743
782
|
className: "sa-calendar-days-preivew",
|
|
744
783
|
onMouseLeave: () => r(null),
|
|
745
784
|
children: [
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */
|
|
748
|
-
const E = t.from && t.to &&
|
|
785
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-name-preivew", children: an.map((p, b) => /* @__PURE__ */ a("p", { children: p }, b)) }),
|
|
786
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-number-preivew", children: M.map((p, b) => {
|
|
787
|
+
const E = t.from && t.to && p.date.getTime() > t.from.getTime() && p.date.getTime() < t.to.getTime(), S = (() => {
|
|
749
788
|
if (!h || !t.from)
|
|
750
789
|
return !1;
|
|
751
|
-
const
|
|
752
|
-
return L > C ?
|
|
753
|
-
})(), D =
|
|
754
|
-
return /* @__PURE__ */
|
|
790
|
+
const Y = p.date.getTime(), C = t.from.getTime(), L = h.getTime();
|
|
791
|
+
return L > C ? Y > C && Y < L : Y < C && Y > L;
|
|
792
|
+
})(), D = m && f && p.date.toDateString() === f.toDateString(), F = p.isDisabled, I = () => E || S ? "var(--sa-color-info-alpha-a10, #64b5f61a)" : "", T = () => F ? "var(--sa-color-gray-400, #b7b9be)" : E || S ? "var(--sa-color-gray-500, #8c8f97)" : "";
|
|
793
|
+
return /* @__PURE__ */ a(
|
|
755
794
|
"p",
|
|
756
795
|
{
|
|
757
|
-
className: `${
|
|
796
|
+
className: `${p.currentMonth ? "sa-calendar-days-current" : "sa-calendar-days"} ${p.selected || D ? "sa-calendar-days-active" : ""} ${p.isToday && !p.selected ? "sa-calendar-days-today" : ""}`,
|
|
758
797
|
style: {
|
|
759
798
|
backgroundColor: I(),
|
|
760
799
|
pointerEvents: F ? "none" : void 0,
|
|
761
800
|
cursor: F ? "not-allowed" : "pointer",
|
|
762
801
|
color: T(),
|
|
763
|
-
opacity: D && !
|
|
802
|
+
opacity: D && !p.selected ? 0.75 : 1,
|
|
764
803
|
...g ? {} : { width: "100%" }
|
|
765
804
|
},
|
|
766
805
|
onClick: () => {
|
|
767
|
-
F || (s(
|
|
806
|
+
F || (s(p.date), x(p.date));
|
|
768
807
|
},
|
|
769
808
|
onMouseEnter: () => {
|
|
770
|
-
F || r(
|
|
809
|
+
F || r(p.date);
|
|
771
810
|
},
|
|
772
|
-
children:
|
|
811
|
+
children: p.number
|
|
773
812
|
},
|
|
774
|
-
|
|
813
|
+
b
|
|
775
814
|
);
|
|
776
815
|
}) })
|
|
777
816
|
]
|
|
778
817
|
}
|
|
779
818
|
);
|
|
780
|
-
},
|
|
781
|
-
date:
|
|
819
|
+
}, un = ({
|
|
820
|
+
date: e,
|
|
782
821
|
setDate: n,
|
|
783
822
|
filter: t,
|
|
784
823
|
setViews: o,
|
|
785
824
|
dateRange: l,
|
|
786
|
-
setDateRange:
|
|
825
|
+
setDateRange: u,
|
|
787
826
|
onChange: i,
|
|
788
827
|
minDate: g,
|
|
789
828
|
maxDate: f,
|
|
790
829
|
input: r
|
|
791
830
|
}) => {
|
|
792
831
|
var N;
|
|
793
|
-
const d = (N = l.from) == null ? void 0 : N.getFullYear(), w =
|
|
794
|
-
t ? (k(
|
|
795
|
-
}, k = (
|
|
832
|
+
const d = (N = l.from) == null ? void 0 : N.getFullYear(), w = e.getFullYear(), M = (m) => {
|
|
833
|
+
t ? (k(m), n(m)) : (o("days"), n(m));
|
|
834
|
+
}, k = (m) => {
|
|
796
835
|
let h = { ...l };
|
|
797
836
|
if (h.from && h.to)
|
|
798
|
-
h = { from:
|
|
837
|
+
h = { from: m, to: null };
|
|
799
838
|
else if (!h.from)
|
|
800
|
-
h = { from:
|
|
839
|
+
h = { from: m, to: null };
|
|
801
840
|
else {
|
|
802
841
|
const s = h.from.getTime();
|
|
803
|
-
|
|
842
|
+
m.getTime() > s ? h = { from: h.from, to: m } : h = { from: m, to: h.from };
|
|
804
843
|
}
|
|
805
|
-
|
|
844
|
+
u(h), i(h);
|
|
806
845
|
};
|
|
807
|
-
return /* @__PURE__ */
|
|
808
|
-
var
|
|
809
|
-
const s = l.from != null && new Date(w, h).getTime() > l.from.getTime() && new Date(w, h).getTime() < (((
|
|
810
|
-
return /* @__PURE__ */
|
|
846
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-months-preview", children: W.map((m, h) => {
|
|
847
|
+
var z, c, y;
|
|
848
|
+
const s = l.from != null && new Date(w, h).getTime() > l.from.getTime() && new Date(w, h).getTime() < (((z = l.to) == null ? void 0 : z.getTime()) || l.from.getTime()), x = g && new Date(w, h) < g || f && new Date(w, h) > f;
|
|
849
|
+
return /* @__PURE__ */ a(
|
|
811
850
|
"p",
|
|
812
851
|
{
|
|
813
852
|
className: d === w && (h === ((c = l.from) == null ? void 0 : c.getMonth()) || h === ((y = l.to) == null ? void 0 : y.getMonth())) ? "sa-calendar-months-active" : "",
|
|
@@ -821,36 +860,36 @@ const O = (a) => {
|
|
|
821
860
|
onClick: () => {
|
|
822
861
|
x || M(new Date(w, h));
|
|
823
862
|
},
|
|
824
|
-
children:
|
|
863
|
+
children: m.slice(0, 3)
|
|
825
864
|
},
|
|
826
865
|
h
|
|
827
866
|
);
|
|
828
867
|
}) });
|
|
829
|
-
}, q = (
|
|
830
|
-
const n = Math.floor(
|
|
868
|
+
}, q = (e) => {
|
|
869
|
+
const n = Math.floor(e / 10) * 10, t = n + 10;
|
|
831
870
|
return { start: n, end: t };
|
|
832
871
|
}, hn = ({
|
|
833
|
-
date:
|
|
872
|
+
date: e,
|
|
834
873
|
filter: n,
|
|
835
874
|
setViews: t,
|
|
836
875
|
setDate: o,
|
|
837
876
|
dateRange: l,
|
|
838
|
-
setDateRange:
|
|
877
|
+
setDateRange: u,
|
|
839
878
|
onChange: i,
|
|
840
879
|
minDate: g,
|
|
841
880
|
maxDate: f,
|
|
842
881
|
input: r
|
|
843
882
|
}) => {
|
|
844
|
-
var x,
|
|
883
|
+
var x, z;
|
|
845
884
|
let d = [];
|
|
846
|
-
const w =
|
|
885
|
+
const w = e.getFullYear(), { start: M, end: k } = q(w), N = (x = l.from) == null ? void 0 : x.getFullYear(), m = (z = l.to) == null ? void 0 : z.getFullYear();
|
|
847
886
|
for (let c = M; c < k; c++) {
|
|
848
|
-
const y = new Date(c, 0),
|
|
887
|
+
const y = new Date(c, 0), p = (!g || y >= g) && (!f || y <= f), b = N != null && c === N || m != null && c === m, E = l.from != null && l.to != null && y > l.from && y < l.to;
|
|
849
888
|
d.push({
|
|
850
889
|
year: c,
|
|
851
|
-
active:
|
|
852
|
-
highlight: E &&
|
|
853
|
-
disabled: !
|
|
890
|
+
active: b && p,
|
|
891
|
+
highlight: E && p,
|
|
892
|
+
disabled: !p
|
|
854
893
|
});
|
|
855
894
|
}
|
|
856
895
|
const h = (c) => {
|
|
@@ -862,12 +901,12 @@ const O = (a) => {
|
|
|
862
901
|
else if (!y.from)
|
|
863
902
|
y = { from: c, to: null };
|
|
864
903
|
else {
|
|
865
|
-
const
|
|
866
|
-
c.getTime() >
|
|
904
|
+
const p = y.from.getTime();
|
|
905
|
+
c.getTime() > p ? y = { from: y.from, to: c } : y = { from: c, to: y.from };
|
|
867
906
|
}
|
|
868
|
-
|
|
907
|
+
u(y), i(y);
|
|
869
908
|
};
|
|
870
|
-
return /* @__PURE__ */
|
|
909
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-years-preview", children: d.map((c, y) => /* @__PURE__ */ a(
|
|
871
910
|
"p",
|
|
872
911
|
{
|
|
873
912
|
className: `${c.active ? "sa-calendar-months-active" : ""} ${c.highlight ? "sa-calendar-months-highlight" : ""} ${c.disabled ? "sa-calendar-disabled" : ""}`,
|
|
@@ -885,7 +924,7 @@ const O = (a) => {
|
|
|
885
924
|
},
|
|
886
925
|
y
|
|
887
926
|
)) });
|
|
888
|
-
}, tn = ({ ...
|
|
927
|
+
}, tn = ({ ...e }) => /* @__PURE__ */ a(
|
|
889
928
|
"svg",
|
|
890
929
|
{
|
|
891
930
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -893,8 +932,8 @@ const O = (a) => {
|
|
|
893
932
|
height: "20",
|
|
894
933
|
viewBox: "0 0 20 20",
|
|
895
934
|
fill: "none",
|
|
896
|
-
...
|
|
897
|
-
children: /* @__PURE__ */
|
|
935
|
+
...e,
|
|
936
|
+
children: /* @__PURE__ */ a(
|
|
898
937
|
"path",
|
|
899
938
|
{
|
|
900
939
|
d: "M12.5 3.33334L5.83337 10L12.5 16.6667",
|
|
@@ -905,7 +944,7 @@ const O = (a) => {
|
|
|
905
944
|
}
|
|
906
945
|
)
|
|
907
946
|
}
|
|
908
|
-
), sn = ({ ...
|
|
947
|
+
), sn = ({ ...e }) => /* @__PURE__ */ a(
|
|
909
948
|
"svg",
|
|
910
949
|
{
|
|
911
950
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -913,8 +952,8 @@ const O = (a) => {
|
|
|
913
952
|
height: "20",
|
|
914
953
|
viewBox: "0 0 20 20",
|
|
915
954
|
fill: "none",
|
|
916
|
-
...
|
|
917
|
-
children: /* @__PURE__ */
|
|
955
|
+
...e,
|
|
956
|
+
children: /* @__PURE__ */ a(
|
|
918
957
|
"path",
|
|
919
958
|
{
|
|
920
959
|
d: "M7.5 16.6667L14.1667 10L7.5 3.33334",
|
|
@@ -926,14 +965,14 @@ const O = (a) => {
|
|
|
926
965
|
)
|
|
927
966
|
}
|
|
928
967
|
), gn = ({
|
|
929
|
-
setViews:
|
|
968
|
+
setViews: e,
|
|
930
969
|
views: n,
|
|
931
970
|
filter: t,
|
|
932
971
|
date: o,
|
|
933
972
|
setDate: l
|
|
934
973
|
}) => {
|
|
935
|
-
const
|
|
936
|
-
t ||
|
|
974
|
+
const u = () => {
|
|
975
|
+
t || e((r) => r === "days" ? "months" : r === "months" ? "years" : "days");
|
|
937
976
|
}, i = () => {
|
|
938
977
|
if (n === "years") {
|
|
939
978
|
l((r) => new Date(r.getFullYear() + 10, 0));
|
|
@@ -960,8 +999,8 @@ const O = (a) => {
|
|
|
960
999
|
)
|
|
961
1000
|
);
|
|
962
1001
|
};
|
|
963
|
-
return /* @__PURE__ */
|
|
964
|
-
/* @__PURE__ */
|
|
1002
|
+
return /* @__PURE__ */ $("div", { className: "sa-calendar-header", children: [
|
|
1003
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-header-title", onClick: u, children: (() => {
|
|
965
1004
|
if (n === "days")
|
|
966
1005
|
return `${W[o.getMonth()]} ${o.getFullYear()}`;
|
|
967
1006
|
if (n === "months")
|
|
@@ -969,23 +1008,23 @@ const O = (a) => {
|
|
|
969
1008
|
if (n === "years")
|
|
970
1009
|
return `${q(o.getFullYear()).start} ~ ${q(o.getFullYear()).end}`;
|
|
971
1010
|
})() }),
|
|
972
|
-
/* @__PURE__ */
|
|
973
|
-
/* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ $("div", { className: "sa-calendar-header-nav", children: [
|
|
1012
|
+
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: g, children: /* @__PURE__ */ a(tn, {}) }),
|
|
1013
|
+
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: i, children: /* @__PURE__ */ a(sn, {}) })
|
|
975
1014
|
] })
|
|
976
1015
|
] });
|
|
977
1016
|
};
|
|
978
|
-
function P(
|
|
979
|
-
const n = new Date(
|
|
1017
|
+
function P(e) {
|
|
1018
|
+
const n = new Date(e), t = n.getFullYear(), o = n.getMonth();
|
|
980
1019
|
return `${n.getDate().toString().padStart(2, "0")} ${ln[o]} ${t}`;
|
|
981
1020
|
}
|
|
982
1021
|
const on = ({
|
|
983
|
-
label:
|
|
1022
|
+
label: e,
|
|
984
1023
|
labelPosition: n = "outside-top",
|
|
985
1024
|
required: t,
|
|
986
1025
|
optional: o,
|
|
987
1026
|
description: l,
|
|
988
|
-
helperText:
|
|
1027
|
+
helperText: u,
|
|
989
1028
|
errorText: i,
|
|
990
1029
|
fullWidth: g,
|
|
991
1030
|
children: f
|
|
@@ -993,75 +1032,75 @@ const on = ({
|
|
|
993
1032
|
const r = [
|
|
994
1033
|
"sa-date-field",
|
|
995
1034
|
g ? "sa-date-field-fullwidth" : ""
|
|
996
|
-
].filter(Boolean).join(" "), d =
|
|
997
|
-
/* @__PURE__ */
|
|
998
|
-
o && /* @__PURE__ */
|
|
999
|
-
t && /* @__PURE__ */
|
|
1000
|
-
] }) : null, w = /* @__PURE__ */
|
|
1001
|
-
|
|
1002
|
-
i && /* @__PURE__ */
|
|
1035
|
+
].filter(Boolean).join(" "), d = e ? /* @__PURE__ */ $("div", { className: "sa-date-field-label-row", children: [
|
|
1036
|
+
/* @__PURE__ */ a("span", { className: "sa-date-field-label-text", children: e }),
|
|
1037
|
+
o && /* @__PURE__ */ a("span", { className: "sa-date-field-optional-badge", children: "Optional" }),
|
|
1038
|
+
t && /* @__PURE__ */ a("span", { className: "sa-date-field-required", children: "*" })
|
|
1039
|
+
] }) : null, w = /* @__PURE__ */ $(en, { children: [
|
|
1040
|
+
u && !i && /* @__PURE__ */ a("p", { className: "sa-date-field-helper", children: u }),
|
|
1041
|
+
i && /* @__PURE__ */ a("p", { className: "sa-date-field-error-msg", children: i })
|
|
1003
1042
|
] });
|
|
1004
|
-
return
|
|
1005
|
-
/* @__PURE__ */
|
|
1043
|
+
return e ? n === "outside-left" ? /* @__PURE__ */ $("div", { className: `${r} sa-date-field-left`, children: [
|
|
1044
|
+
/* @__PURE__ */ $("div", { className: "sa-date-field-left-label", children: [
|
|
1006
1045
|
d,
|
|
1007
|
-
l && /* @__PURE__ */
|
|
1046
|
+
l && /* @__PURE__ */ a("p", { className: "sa-date-field-helper-top", children: l })
|
|
1008
1047
|
] }),
|
|
1009
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ $("div", { className: "sa-date-field-input-wrap", children: [
|
|
1010
1049
|
f,
|
|
1011
1050
|
w
|
|
1012
1051
|
] })
|
|
1013
|
-
] }) : /* @__PURE__ */
|
|
1052
|
+
] }) : /* @__PURE__ */ $("div", { className: r, children: [
|
|
1014
1053
|
d,
|
|
1015
|
-
l && /* @__PURE__ */
|
|
1054
|
+
l && /* @__PURE__ */ a("p", { className: "sa-date-field-helper-top", children: l }),
|
|
1016
1055
|
f,
|
|
1017
1056
|
w
|
|
1018
|
-
] }) : /* @__PURE__ */
|
|
1019
|
-
l && /* @__PURE__ */
|
|
1057
|
+
] }) : /* @__PURE__ */ $("div", { className: r, children: [
|
|
1058
|
+
l && /* @__PURE__ */ a("p", { className: "sa-date-field-helper-top", children: l }),
|
|
1020
1059
|
f,
|
|
1021
1060
|
w
|
|
1022
1061
|
] });
|
|
1023
|
-
}, X = "sa-calendar-styles", fn = (
|
|
1062
|
+
}, X = "sa-calendar-styles", fn = (e) => {
|
|
1024
1063
|
if (!document.getElementById(X)) {
|
|
1025
1064
|
const n = document.createElement("style");
|
|
1026
|
-
n.id = X, n.textContent =
|
|
1065
|
+
n.id = X, n.textContent = e, document.head.appendChild(n);
|
|
1027
1066
|
}
|
|
1028
1067
|
};
|
|
1029
1068
|
fn(R);
|
|
1030
|
-
const
|
|
1069
|
+
const mn = K(
|
|
1031
1070
|
({
|
|
1032
|
-
value:
|
|
1071
|
+
value: e,
|
|
1033
1072
|
onChange: n,
|
|
1034
1073
|
filter: t,
|
|
1035
1074
|
input: o = !0,
|
|
1036
1075
|
disabled: l,
|
|
1037
|
-
minDate:
|
|
1076
|
+
minDate: u,
|
|
1038
1077
|
maxDate: i,
|
|
1039
1078
|
placeholder: g,
|
|
1040
|
-
size: f,
|
|
1079
|
+
size: f = "sm",
|
|
1041
1080
|
variant: r,
|
|
1042
1081
|
status: d,
|
|
1043
1082
|
clearable: w,
|
|
1044
1083
|
fullWidth: M = !0,
|
|
1045
1084
|
withPadding: k = !0,
|
|
1046
1085
|
label: N,
|
|
1047
|
-
labelPosition:
|
|
1086
|
+
labelPosition: m,
|
|
1048
1087
|
required: h,
|
|
1049
1088
|
optional: s,
|
|
1050
1089
|
description: x,
|
|
1051
|
-
helperText:
|
|
1090
|
+
helperText: z,
|
|
1052
1091
|
errorText: c
|
|
1053
1092
|
}, y) => {
|
|
1054
|
-
const
|
|
1055
|
-
from: (
|
|
1056
|
-
to: (
|
|
1093
|
+
const p = c ? "error" : d, { ref: b, isComponentVisible: E, setIsComponentVisible: S } = rn(!1), D = J(null), [F, I] = A("days"), [T, Y] = A(/* @__PURE__ */ new Date()), [C, L] = A({
|
|
1094
|
+
from: (e == null ? void 0 : e.from) ?? null,
|
|
1095
|
+
to: (e == null ? void 0 : e.to) ?? null
|
|
1057
1096
|
});
|
|
1058
1097
|
B(() => {
|
|
1059
|
-
if (
|
|
1060
|
-
const v =
|
|
1061
|
-
v.from &&
|
|
1098
|
+
if (e) {
|
|
1099
|
+
const v = e;
|
|
1100
|
+
v.from && Y(v.from), L(v);
|
|
1062
1101
|
} else
|
|
1063
|
-
|
|
1064
|
-
}, [
|
|
1102
|
+
Y(/* @__PURE__ */ new Date()), L({ from: null, to: null });
|
|
1103
|
+
}, [e]), B(() => {
|
|
1065
1104
|
t && I(t);
|
|
1066
1105
|
}, [t]), B(() => {
|
|
1067
1106
|
t || I("days");
|
|
@@ -1070,7 +1109,7 @@ const bn = K(
|
|
|
1070
1109
|
}, [o]);
|
|
1071
1110
|
const G = () => {
|
|
1072
1111
|
var v, V;
|
|
1073
|
-
if (!
|
|
1112
|
+
if (!e)
|
|
1074
1113
|
return "";
|
|
1075
1114
|
if (t) {
|
|
1076
1115
|
if (F === "days")
|
|
@@ -1082,27 +1121,27 @@ const bn = K(
|
|
|
1082
1121
|
} else
|
|
1083
1122
|
return `${P(C.from)} ~ ${P(C.to || C.from) || "-"}`;
|
|
1084
1123
|
}, j = () => {
|
|
1085
|
-
if (D.current &&
|
|
1086
|
-
const v =
|
|
1124
|
+
if (D.current && b.current && o) {
|
|
1125
|
+
const v = b.current.getBoundingClientRect(), V = D.current.getBoundingClientRect();
|
|
1087
1126
|
window.innerWidth < v.left + V.width ? D.current.style.left = `${v.left - V.width + v.width}px` : D.current.style.left = `${v.left}px`, v.top + V.height > window.innerHeight ? D.current.style.top = `${v.y - (v.height + V.height - 28)}px` : D.current.style.top = `${v.y + v.height}px`;
|
|
1088
1127
|
}
|
|
1089
1128
|
};
|
|
1090
1129
|
B(() => {
|
|
1091
|
-
D.current &&
|
|
1092
|
-
}, [D,
|
|
1130
|
+
D.current && b.current && o && j();
|
|
1131
|
+
}, [D, b, E]), B(() => {
|
|
1093
1132
|
const v = y == null ? void 0 : y.current;
|
|
1094
1133
|
return v && v.addEventListener("scroll", j), window.addEventListener("scroll", j), () => {
|
|
1095
1134
|
v && v.removeEventListener("scroll", j), window.removeEventListener("scroll", j);
|
|
1096
1135
|
};
|
|
1097
1136
|
}, []);
|
|
1098
|
-
const U = /* @__PURE__ */
|
|
1137
|
+
const U = /* @__PURE__ */ $(
|
|
1099
1138
|
"div",
|
|
1100
1139
|
{
|
|
1101
1140
|
className: "sa-calendar-wrapper",
|
|
1102
1141
|
style: { height: o ? "auto" : "100%" },
|
|
1103
|
-
ref: o ?
|
|
1142
|
+
ref: o ? b : null,
|
|
1104
1143
|
children: [
|
|
1105
|
-
o ? /* @__PURE__ */
|
|
1144
|
+
o ? /* @__PURE__ */ a(
|
|
1106
1145
|
cn,
|
|
1107
1146
|
{
|
|
1108
1147
|
value: G(),
|
|
@@ -1116,46 +1155,46 @@ const bn = K(
|
|
|
1116
1155
|
placeholder: g,
|
|
1117
1156
|
size: f,
|
|
1118
1157
|
variant: r,
|
|
1119
|
-
status:
|
|
1158
|
+
status: p,
|
|
1120
1159
|
clearable: w,
|
|
1121
1160
|
onClear: () => n(void 0)
|
|
1122
1161
|
}
|
|
1123
1162
|
) : null,
|
|
1124
|
-
E ? /* @__PURE__ */
|
|
1163
|
+
E ? /* @__PURE__ */ $(
|
|
1125
1164
|
"div",
|
|
1126
1165
|
{
|
|
1127
|
-
className: `sa-calendar sa-calendar-size-${f || "
|
|
1166
|
+
className: `sa-calendar sa-calendar-size-${f || "sm"} ${o ? "" : "sa-calendar-no-input"} ${k ? "" : "sa-calendar-no-padding"}`,
|
|
1128
1167
|
style: l ? { pointerEvents: "none" } : void 0,
|
|
1129
1168
|
ref: D,
|
|
1130
1169
|
children: [
|
|
1131
|
-
/* @__PURE__ */
|
|
1170
|
+
/* @__PURE__ */ a(
|
|
1132
1171
|
gn,
|
|
1133
1172
|
{
|
|
1134
1173
|
setViews: I,
|
|
1135
1174
|
views: F,
|
|
1136
1175
|
filter: t,
|
|
1137
1176
|
date: T,
|
|
1138
|
-
setDate:
|
|
1177
|
+
setDate: Y
|
|
1139
1178
|
}
|
|
1140
1179
|
),
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
|
|
1180
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-body", children: F === "days" ? /* @__PURE__ */ a(
|
|
1181
|
+
pn,
|
|
1143
1182
|
{
|
|
1144
1183
|
date: T,
|
|
1145
|
-
setDate:
|
|
1184
|
+
setDate: Y,
|
|
1146
1185
|
setIsComponentVisible: S,
|
|
1147
1186
|
dateRange: C,
|
|
1148
1187
|
setDateRange: L,
|
|
1149
1188
|
input: o,
|
|
1150
1189
|
onChange: n,
|
|
1151
|
-
minDate:
|
|
1190
|
+
minDate: u,
|
|
1152
1191
|
maxDate: i
|
|
1153
1192
|
}
|
|
1154
|
-
) : F === "months" ? /* @__PURE__ */
|
|
1155
|
-
|
|
1193
|
+
) : F === "months" ? /* @__PURE__ */ a(
|
|
1194
|
+
un,
|
|
1156
1195
|
{
|
|
1157
1196
|
date: T,
|
|
1158
|
-
setDate:
|
|
1197
|
+
setDate: Y,
|
|
1159
1198
|
filter: t,
|
|
1160
1199
|
setViews: I,
|
|
1161
1200
|
dateRange: C,
|
|
@@ -1163,14 +1202,14 @@ const bn = K(
|
|
|
1163
1202
|
setIsComponentVisible: S,
|
|
1164
1203
|
input: o,
|
|
1165
1204
|
onChange: n,
|
|
1166
|
-
minDate:
|
|
1205
|
+
minDate: u,
|
|
1167
1206
|
maxDate: i
|
|
1168
1207
|
}
|
|
1169
|
-
) : /* @__PURE__ */
|
|
1208
|
+
) : /* @__PURE__ */ a(
|
|
1170
1209
|
hn,
|
|
1171
1210
|
{
|
|
1172
1211
|
date: T,
|
|
1173
|
-
setDate:
|
|
1212
|
+
setDate: Y,
|
|
1174
1213
|
filter: t,
|
|
1175
1214
|
setViews: I,
|
|
1176
1215
|
dateRange: C,
|
|
@@ -1178,7 +1217,7 @@ const bn = K(
|
|
|
1178
1217
|
setIsComponentVisible: S,
|
|
1179
1218
|
input: o,
|
|
1180
1219
|
onChange: n,
|
|
1181
|
-
minDate:
|
|
1220
|
+
minDate: u,
|
|
1182
1221
|
maxDate: i
|
|
1183
1222
|
}
|
|
1184
1223
|
) })
|
|
@@ -1188,55 +1227,57 @@ const bn = K(
|
|
|
1188
1227
|
]
|
|
1189
1228
|
}
|
|
1190
1229
|
);
|
|
1191
|
-
return /* @__PURE__ */
|
|
1230
|
+
return /* @__PURE__ */ a(
|
|
1192
1231
|
on,
|
|
1193
1232
|
{
|
|
1194
1233
|
label: N,
|
|
1195
|
-
labelPosition:
|
|
1234
|
+
labelPosition: m,
|
|
1196
1235
|
required: h,
|
|
1197
1236
|
optional: s,
|
|
1198
1237
|
description: x,
|
|
1199
|
-
helperText:
|
|
1238
|
+
helperText: z,
|
|
1200
1239
|
errorText: c,
|
|
1201
1240
|
fullWidth: M,
|
|
1202
1241
|
children: U
|
|
1203
1242
|
}
|
|
1204
1243
|
);
|
|
1205
1244
|
}
|
|
1206
|
-
), _ = "sa-calendar-input-styles",
|
|
1245
|
+
), _ = "sa-calendar-input-styles", bn = (e) => {
|
|
1207
1246
|
if (!document.getElementById(_)) {
|
|
1208
1247
|
const n = document.createElement("style");
|
|
1209
|
-
n.id = _, n.textContent =
|
|
1248
|
+
n.id = _, n.textContent = e, document.head.appendChild(n);
|
|
1210
1249
|
}
|
|
1211
1250
|
};
|
|
1212
|
-
|
|
1213
|
-
const H = (
|
|
1214
|
-
if (
|
|
1251
|
+
bn(R);
|
|
1252
|
+
const H = (e) => {
|
|
1253
|
+
if (e === "xs")
|
|
1254
|
+
return 14;
|
|
1255
|
+
if (e === "sm")
|
|
1215
1256
|
return 16;
|
|
1216
|
-
if (
|
|
1257
|
+
if (e === "md")
|
|
1217
1258
|
return 16;
|
|
1218
|
-
if (
|
|
1259
|
+
if (e === "lg")
|
|
1219
1260
|
return 20;
|
|
1220
|
-
}, vn = (
|
|
1261
|
+
}, vn = (e) => {
|
|
1221
1262
|
const {
|
|
1222
|
-
size: n = "
|
|
1263
|
+
size: n = "sm",
|
|
1223
1264
|
status: t = "default",
|
|
1224
1265
|
variant: o = "outline",
|
|
1225
1266
|
clearable: l,
|
|
1226
|
-
onClear:
|
|
1267
|
+
onClear: u,
|
|
1227
1268
|
...i
|
|
1228
|
-
} =
|
|
1269
|
+
} = e, g = J(null), f = () => {
|
|
1229
1270
|
g.current && i.onClick && (g.current.focus(), i.onClick(""));
|
|
1230
1271
|
}, r = t === "disable" || i.disabled, d = !!i.value, w = l && d && !r, M = (k) => {
|
|
1231
|
-
k.stopPropagation(),
|
|
1272
|
+
k.stopPropagation(), u == null || u();
|
|
1232
1273
|
};
|
|
1233
|
-
return /* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ $(
|
|
1234
1275
|
"div",
|
|
1235
1276
|
{
|
|
1236
1277
|
className: `sa-calendar-input-container sa-calendar-input-${o} sa-calendar-input-container-${t} ${n} `,
|
|
1237
1278
|
onClick: f,
|
|
1238
1279
|
children: [
|
|
1239
|
-
/* @__PURE__ */
|
|
1280
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-input-container-icon-left", children: /* @__PURE__ */ a(
|
|
1240
1281
|
"svg",
|
|
1241
1282
|
{
|
|
1242
1283
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1244,7 +1285,7 @@ const H = (a) => {
|
|
|
1244
1285
|
height: H(n),
|
|
1245
1286
|
viewBox: "0 0 20 20",
|
|
1246
1287
|
fill: "none",
|
|
1247
|
-
children: /* @__PURE__ */
|
|
1288
|
+
children: /* @__PURE__ */ a(
|
|
1248
1289
|
"path",
|
|
1249
1290
|
{
|
|
1250
1291
|
d: "M12.5 2.08301V5.41634M7.50002 2.08301V5.41634M17.0688 9.58301H2.93113M17.0688 9.58301C16.8953 4.82698 15.1284 3.33301 10 3.33301C4.87165 3.33301 3.10469 4.82698 2.93113 9.58301M17.0688 9.58301C17.0786 9.85037 17.0834 10.128 17.0834 10.4163C17.0834 15.833 15.4167 17.4997 10 17.4997C4.58335 17.4997 2.91669 15.833 2.91669 10.4163C2.91669 10.128 2.92138 9.85037 2.93113 9.58301",
|
|
@@ -1256,7 +1297,7 @@ const H = (a) => {
|
|
|
1256
1297
|
)
|
|
1257
1298
|
}
|
|
1258
1299
|
) }),
|
|
1259
|
-
/* @__PURE__ */
|
|
1300
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-input-preview-container", children: /* @__PURE__ */ a(
|
|
1260
1301
|
"input",
|
|
1261
1302
|
{
|
|
1262
1303
|
className: "sa-calendar-input",
|
|
@@ -1266,14 +1307,14 @@ const H = (a) => {
|
|
|
1266
1307
|
ref: g
|
|
1267
1308
|
}
|
|
1268
1309
|
) }),
|
|
1269
|
-
w ? /* @__PURE__ */
|
|
1310
|
+
w ? /* @__PURE__ */ a(
|
|
1270
1311
|
"button",
|
|
1271
1312
|
{
|
|
1272
1313
|
type: "button",
|
|
1273
1314
|
"aria-label": "Clear date",
|
|
1274
1315
|
className: "sa-calendar-input-clear",
|
|
1275
1316
|
onClick: M,
|
|
1276
|
-
children: /* @__PURE__ */
|
|
1317
|
+
children: /* @__PURE__ */ a(
|
|
1277
1318
|
"svg",
|
|
1278
1319
|
{
|
|
1279
1320
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1281,7 +1322,7 @@ const H = (a) => {
|
|
|
1281
1322
|
height: H(n),
|
|
1282
1323
|
viewBox: "0 0 20 20",
|
|
1283
1324
|
fill: "none",
|
|
1284
|
-
children: /* @__PURE__ */
|
|
1325
|
+
children: /* @__PURE__ */ a(
|
|
1285
1326
|
"path",
|
|
1286
1327
|
{
|
|
1287
1328
|
d: "M5 5L15 15M15 5L5 15",
|
|
@@ -1294,7 +1335,7 @@ const H = (a) => {
|
|
|
1294
1335
|
}
|
|
1295
1336
|
)
|
|
1296
1337
|
}
|
|
1297
|
-
) : /* @__PURE__ */
|
|
1338
|
+
) : /* @__PURE__ */ a("div", { className: "sa-calendar-input-container-icon-right", children: /* @__PURE__ */ a(
|
|
1298
1339
|
"svg",
|
|
1299
1340
|
{
|
|
1300
1341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1302,7 +1343,7 @@ const H = (a) => {
|
|
|
1302
1343
|
height: H(n),
|
|
1303
1344
|
viewBox: "0 0 20 20",
|
|
1304
1345
|
fill: "none",
|
|
1305
|
-
children: /* @__PURE__ */
|
|
1346
|
+
children: /* @__PURE__ */ a(
|
|
1306
1347
|
"path",
|
|
1307
1348
|
{
|
|
1308
1349
|
d: "M3.33331 7.5L9.99998 14.1667L16.6666 7.5",
|
|
@@ -1318,12 +1359,12 @@ const H = (a) => {
|
|
|
1318
1359
|
}
|
|
1319
1360
|
);
|
|
1320
1361
|
}, yn = ({
|
|
1321
|
-
date:
|
|
1362
|
+
date: e,
|
|
1322
1363
|
setDate: n,
|
|
1323
1364
|
previewDate: t,
|
|
1324
1365
|
setPreviewDate: o,
|
|
1325
1366
|
setIsComponentVisible: l,
|
|
1326
|
-
minDate:
|
|
1367
|
+
minDate: u,
|
|
1327
1368
|
maxDate: i,
|
|
1328
1369
|
input: g,
|
|
1329
1370
|
onChange: f,
|
|
@@ -1334,42 +1375,42 @@ const H = (a) => {
|
|
|
1334
1375
|
t.getMonth(),
|
|
1335
1376
|
1
|
|
1336
1377
|
), w = d.getDay(), M = [];
|
|
1337
|
-
const k =
|
|
1378
|
+
const k = e.toDateString(), N = (/* @__PURE__ */ new Date()).toDateString(), m = t.getMonth();
|
|
1338
1379
|
for (let s = 0; s < 42; s++) {
|
|
1339
1380
|
s === 0 && w === 0 ? d.setDate(d.getDate() - 7) : s === 0 ? d.setDate(
|
|
1340
1381
|
d.getDate() + (s - w)
|
|
1341
1382
|
) : d.setDate(d.getDate() + 1);
|
|
1342
1383
|
let x = {
|
|
1343
|
-
currentMonth: d.getMonth() ===
|
|
1384
|
+
currentMonth: d.getMonth() === m,
|
|
1344
1385
|
date: new Date(d),
|
|
1345
1386
|
month: d.getMonth(),
|
|
1346
1387
|
number: d.getDate(),
|
|
1347
1388
|
selected: r && d.toDateString() === k,
|
|
1348
1389
|
isToday: d.toDateString() === N,
|
|
1349
1390
|
year: d.getFullYear(),
|
|
1350
|
-
isDisabled:
|
|
1391
|
+
isDisabled: u && d < u || i && d > i
|
|
1351
1392
|
};
|
|
1352
1393
|
M.push(x);
|
|
1353
1394
|
}
|
|
1354
1395
|
const h = (s) => {
|
|
1355
|
-
(!
|
|
1396
|
+
(!u || s >= u) && (!i || s <= i) && (n(s), f(s), o(s), g && l(!1));
|
|
1356
1397
|
};
|
|
1357
|
-
return /* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
const
|
|
1361
|
-
return /* @__PURE__ */
|
|
1398
|
+
return /* @__PURE__ */ $("div", { className: "sa-calendar-days-preivew", children: [
|
|
1399
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-name-preivew", children: an.map((s, x) => /* @__PURE__ */ a("p", { children: s }, x)) }),
|
|
1400
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-number-preivew", children: M.map((s, x) => {
|
|
1401
|
+
const z = s.isDisabled;
|
|
1402
|
+
return /* @__PURE__ */ a(
|
|
1362
1403
|
"p",
|
|
1363
1404
|
{
|
|
1364
1405
|
className: `${s.currentMonth ? "sa-calendar-days-current" : "sa-calendar-days"} ${s.selected ? "sa-calendar-days-active" : ""} ${s.isToday && !s.selected ? "sa-calendar-days-today" : ""}`,
|
|
1365
1406
|
style: {
|
|
1366
|
-
color:
|
|
1367
|
-
pointerEvents:
|
|
1368
|
-
cursor:
|
|
1407
|
+
color: z ? "#ccc" : void 0,
|
|
1408
|
+
pointerEvents: z ? "none" : void 0,
|
|
1409
|
+
cursor: z ? "not-allowed" : "pointer",
|
|
1369
1410
|
...g ? {} : { width: "100%" }
|
|
1370
1411
|
},
|
|
1371
1412
|
onClick: () => {
|
|
1372
|
-
|
|
1413
|
+
z || h(s.date);
|
|
1373
1414
|
},
|
|
1374
1415
|
children: s.number
|
|
1375
1416
|
},
|
|
@@ -1378,24 +1419,24 @@ const H = (a) => {
|
|
|
1378
1419
|
}) })
|
|
1379
1420
|
] });
|
|
1380
1421
|
}, wn = ({
|
|
1381
|
-
date:
|
|
1422
|
+
date: e,
|
|
1382
1423
|
setDate: n,
|
|
1383
1424
|
filter: t,
|
|
1384
1425
|
setViews: o,
|
|
1385
1426
|
onChange: l,
|
|
1386
|
-
previewDate:
|
|
1427
|
+
previewDate: u,
|
|
1387
1428
|
setPreviewDate: i,
|
|
1388
1429
|
minDate: g,
|
|
1389
1430
|
maxDate: f,
|
|
1390
1431
|
input: r,
|
|
1391
1432
|
hasValue: d
|
|
1392
1433
|
}) => {
|
|
1393
|
-
const w =
|
|
1394
|
-
(!g ||
|
|
1434
|
+
const w = e.getMonth(), M = e.getFullYear(), k = u.getFullYear(), N = (m) => {
|
|
1435
|
+
(!g || m >= g) && (!f || m <= f) && (t ? (l(m), n(m), i(m)) : (o("days"), i(m)));
|
|
1395
1436
|
};
|
|
1396
|
-
return /* @__PURE__ */
|
|
1437
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-months-preview", children: W.map((m, h) => {
|
|
1397
1438
|
const s = g && new Date(k, h, 1) < g || f && new Date(k, h + 1, 0) > f;
|
|
1398
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ a(
|
|
1399
1440
|
"p",
|
|
1400
1441
|
{
|
|
1401
1442
|
className: d && h === w && k === M ? "sa-calendar-months-active" : "",
|
|
@@ -1408,21 +1449,21 @@ const H = (a) => {
|
|
|
1408
1449
|
onClick: () => {
|
|
1409
1450
|
s || N(new Date(k, h));
|
|
1410
1451
|
},
|
|
1411
|
-
children:
|
|
1452
|
+
children: m.slice(0, 3)
|
|
1412
1453
|
},
|
|
1413
1454
|
h
|
|
1414
1455
|
);
|
|
1415
1456
|
}) });
|
|
1416
|
-
}, Z = (
|
|
1417
|
-
const n = Math.floor(
|
|
1457
|
+
}, Z = (e) => {
|
|
1458
|
+
const n = Math.floor(e / 10) * 10, t = n + 10;
|
|
1418
1459
|
return { start: n, end: t };
|
|
1419
1460
|
}, xn = ({
|
|
1420
|
-
date:
|
|
1461
|
+
date: e,
|
|
1421
1462
|
filter: n,
|
|
1422
1463
|
setViews: t,
|
|
1423
1464
|
setDate: o,
|
|
1424
1465
|
onChange: l,
|
|
1425
|
-
previewDate:
|
|
1466
|
+
previewDate: u,
|
|
1426
1467
|
setPreviewDate: i,
|
|
1427
1468
|
minDate: g,
|
|
1428
1469
|
maxDate: f,
|
|
@@ -1430,19 +1471,19 @@ const H = (a) => {
|
|
|
1430
1471
|
hasValue: d
|
|
1431
1472
|
}) => {
|
|
1432
1473
|
let w = [];
|
|
1433
|
-
const M =
|
|
1474
|
+
const M = u.getFullYear(), { start: k, end: N } = Z(M), m = e.getFullYear();
|
|
1434
1475
|
for (let s = k; s < N; s++) {
|
|
1435
1476
|
let x = g && new Date(s, 0, 1) < g || f && new Date(s, 11, 31) > f;
|
|
1436
1477
|
w.push({
|
|
1437
1478
|
year: s,
|
|
1438
|
-
active: !!d && s ===
|
|
1479
|
+
active: !!d && s === m,
|
|
1439
1480
|
isDisabled: x
|
|
1440
1481
|
});
|
|
1441
1482
|
}
|
|
1442
1483
|
const h = (s) => {
|
|
1443
1484
|
(!g || s >= g) && (!f || s <= f) && (n ? (l(s), o(s), i(s)) : (t("months"), i(s)));
|
|
1444
1485
|
};
|
|
1445
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-years-preview", children: w.map((s, x) => /* @__PURE__ */ a(
|
|
1446
1487
|
"p",
|
|
1447
1488
|
{
|
|
1448
1489
|
className: s.active ? "sa-calendar-months-active" : "",
|
|
@@ -1460,14 +1501,14 @@ const H = (a) => {
|
|
|
1460
1501
|
x
|
|
1461
1502
|
)) });
|
|
1462
1503
|
}, kn = ({
|
|
1463
|
-
setViews:
|
|
1504
|
+
setViews: e,
|
|
1464
1505
|
views: n,
|
|
1465
1506
|
filter: t,
|
|
1466
1507
|
previewDate: o,
|
|
1467
1508
|
setPreviewDate: l
|
|
1468
1509
|
}) => {
|
|
1469
|
-
const
|
|
1470
|
-
t ||
|
|
1510
|
+
const u = () => {
|
|
1511
|
+
t || e((r) => r === "days" ? "months" : r === "months" ? "years" : "days");
|
|
1471
1512
|
}, i = () => {
|
|
1472
1513
|
if (n === "years") {
|
|
1473
1514
|
l((r) => new Date(r.getFullYear() + 10, 0));
|
|
@@ -1498,8 +1539,8 @@ const H = (a) => {
|
|
|
1498
1539
|
)
|
|
1499
1540
|
);
|
|
1500
1541
|
};
|
|
1501
|
-
return /* @__PURE__ */
|
|
1502
|
-
/* @__PURE__ */
|
|
1542
|
+
return /* @__PURE__ */ $("div", { className: "sa-calendar-header", children: [
|
|
1543
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-header-title", onClick: u, children: (() => {
|
|
1503
1544
|
if (n === "days")
|
|
1504
1545
|
return `${W[o.getMonth()]} ${o.getFullYear()}`;
|
|
1505
1546
|
if (n === "months")
|
|
@@ -1507,74 +1548,74 @@ const H = (a) => {
|
|
|
1507
1548
|
if (n === "years")
|
|
1508
1549
|
return `${Z(o.getFullYear()).start} ~ ${Z(o.getFullYear()).end}`;
|
|
1509
1550
|
})() }),
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
/* @__PURE__ */
|
|
1551
|
+
/* @__PURE__ */ $("div", { className: "sa-calendar-header-nav", children: [
|
|
1552
|
+
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: g, children: /* @__PURE__ */ a(tn, {}) }),
|
|
1553
|
+
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: i, children: /* @__PURE__ */ a(sn, {}) })
|
|
1513
1554
|
] })
|
|
1514
1555
|
] });
|
|
1515
|
-
}, nn = "sa-calendar-styles", Mn = (
|
|
1556
|
+
}, nn = "sa-calendar-styles", Mn = (e) => {
|
|
1516
1557
|
if (!document.getElementById(nn)) {
|
|
1517
1558
|
const n = document.createElement("style");
|
|
1518
|
-
n.id = nn, n.textContent =
|
|
1559
|
+
n.id = nn, n.textContent = e, document.head.appendChild(n);
|
|
1519
1560
|
}
|
|
1520
1561
|
};
|
|
1521
1562
|
Mn(R);
|
|
1522
1563
|
const Cn = K(
|
|
1523
1564
|
({
|
|
1524
|
-
value:
|
|
1565
|
+
value: e,
|
|
1525
1566
|
onChange: n,
|
|
1526
1567
|
filter: t,
|
|
1527
1568
|
input: o = !0,
|
|
1528
1569
|
disabled: l,
|
|
1529
|
-
minDate:
|
|
1570
|
+
minDate: u,
|
|
1530
1571
|
maxDate: i,
|
|
1531
1572
|
placeholder: g,
|
|
1532
|
-
size: f,
|
|
1573
|
+
size: f = "sm",
|
|
1533
1574
|
variant: r,
|
|
1534
1575
|
status: d,
|
|
1535
1576
|
clearable: w,
|
|
1536
1577
|
fullWidth: M = !0,
|
|
1537
1578
|
withPadding: k = !0,
|
|
1538
1579
|
label: N,
|
|
1539
|
-
labelPosition:
|
|
1580
|
+
labelPosition: m,
|
|
1540
1581
|
required: h,
|
|
1541
1582
|
optional: s,
|
|
1542
1583
|
description: x,
|
|
1543
|
-
helperText:
|
|
1584
|
+
helperText: z,
|
|
1544
1585
|
errorText: c
|
|
1545
1586
|
}, y) => {
|
|
1546
|
-
const
|
|
1587
|
+
const p = c ? "error" : d, { ref: b, isComponentVisible: E, setIsComponentVisible: S } = rn(!1), D = J(null), [F, I] = A("days"), [T, Y] = A(/* @__PURE__ */ new Date()), [C, L] = A(/* @__PURE__ */ new Date());
|
|
1547
1588
|
B(() => {
|
|
1548
|
-
|
|
1549
|
-
}, [
|
|
1589
|
+
e ? (Y(e), L(e)) : (Y(/* @__PURE__ */ new Date()), L(/* @__PURE__ */ new Date()));
|
|
1590
|
+
}, [e]), B(() => {
|
|
1550
1591
|
t && I(t);
|
|
1551
1592
|
}, [t]), B(() => {
|
|
1552
1593
|
t || I("days");
|
|
1553
1594
|
}, [E]), B(() => {
|
|
1554
1595
|
o || S(!0);
|
|
1555
1596
|
}, [o]);
|
|
1556
|
-
const G = () =>
|
|
1557
|
-
if (D.current &&
|
|
1558
|
-
const v =
|
|
1597
|
+
const G = () => e ? t === "days" ? P(T) : t === "months" ? `${W[T.getMonth()]} ${T.getFullYear()}` : t === "years" ? T.getFullYear() : P(T) : "", j = () => {
|
|
1598
|
+
if (D.current && b.current && o) {
|
|
1599
|
+
const v = b.current.getBoundingClientRect(), V = D.current.getBoundingClientRect();
|
|
1559
1600
|
window.innerWidth < v.left + V.width ? D.current.style.left = `${v.left - V.width + v.width}px` : D.current.style.left = `${v.left}px`, v.top + V.height > window.innerHeight ? D.current.style.top = `${v.y - (v.height + V.height - 28)}px` : D.current.style.top = `${v.y + v.height}px`;
|
|
1560
1601
|
}
|
|
1561
1602
|
};
|
|
1562
1603
|
B(() => {
|
|
1563
|
-
D.current &&
|
|
1564
|
-
}, [D,
|
|
1604
|
+
D.current && b.current && o && j();
|
|
1605
|
+
}, [D, b, E]), B(() => {
|
|
1565
1606
|
const v = y == null ? void 0 : y.current;
|
|
1566
1607
|
return v && v.addEventListener("scroll", j), window.addEventListener("scroll", j), () => {
|
|
1567
1608
|
v && v.removeEventListener("scroll", j), window.removeEventListener("scroll", j);
|
|
1568
1609
|
};
|
|
1569
1610
|
}, []);
|
|
1570
|
-
const U = /* @__PURE__ */
|
|
1611
|
+
const U = /* @__PURE__ */ $(
|
|
1571
1612
|
"div",
|
|
1572
1613
|
{
|
|
1573
1614
|
className: "sa-calendar-wrapper",
|
|
1574
1615
|
style: { height: o ? "auto" : "100%" },
|
|
1575
|
-
ref: o ?
|
|
1616
|
+
ref: o ? b : null,
|
|
1576
1617
|
children: [
|
|
1577
|
-
o ? /* @__PURE__ */
|
|
1618
|
+
o ? /* @__PURE__ */ a(
|
|
1578
1619
|
vn,
|
|
1579
1620
|
{
|
|
1580
1621
|
value: G(),
|
|
@@ -1585,20 +1626,20 @@ const Cn = K(
|
|
|
1585
1626
|
disabled: l,
|
|
1586
1627
|
size: f,
|
|
1587
1628
|
variant: r,
|
|
1588
|
-
status:
|
|
1629
|
+
status: p,
|
|
1589
1630
|
inputMode: "none",
|
|
1590
1631
|
clearable: w,
|
|
1591
1632
|
onClear: () => n(void 0)
|
|
1592
1633
|
}
|
|
1593
1634
|
) : null,
|
|
1594
|
-
E ? /* @__PURE__ */
|
|
1635
|
+
E ? /* @__PURE__ */ $(
|
|
1595
1636
|
"div",
|
|
1596
1637
|
{
|
|
1597
|
-
className: `sa-calendar sa-calendar-size-${f || "
|
|
1638
|
+
className: `sa-calendar sa-calendar-size-${f || "sm"} ${o ? "" : "sa-calendar-no-input"} ${k ? "" : "sa-calendar-no-padding"}`,
|
|
1598
1639
|
style: l ? { pointerEvents: "none" } : void 0,
|
|
1599
1640
|
ref: D,
|
|
1600
1641
|
children: [
|
|
1601
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ a(
|
|
1602
1643
|
kn,
|
|
1603
1644
|
{
|
|
1604
1645
|
setViews: I,
|
|
@@ -1609,49 +1650,49 @@ const Cn = K(
|
|
|
1609
1650
|
isComponentVisible: E
|
|
1610
1651
|
}
|
|
1611
1652
|
),
|
|
1612
|
-
/* @__PURE__ */
|
|
1653
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-body", children: F === "days" ? /* @__PURE__ */ a(
|
|
1613
1654
|
yn,
|
|
1614
1655
|
{
|
|
1615
1656
|
date: T,
|
|
1616
|
-
setDate:
|
|
1657
|
+
setDate: Y,
|
|
1617
1658
|
previewDate: C,
|
|
1618
1659
|
setPreviewDate: L,
|
|
1619
1660
|
setIsComponentVisible: S,
|
|
1620
1661
|
input: o,
|
|
1621
|
-
minDate:
|
|
1662
|
+
minDate: u,
|
|
1622
1663
|
maxDate: i,
|
|
1623
1664
|
onChange: n,
|
|
1624
|
-
hasValue:
|
|
1665
|
+
hasValue: e != null
|
|
1625
1666
|
}
|
|
1626
|
-
) : F === "months" ? /* @__PURE__ */
|
|
1667
|
+
) : F === "months" ? /* @__PURE__ */ a(
|
|
1627
1668
|
wn,
|
|
1628
1669
|
{
|
|
1629
1670
|
date: T,
|
|
1630
|
-
setDate:
|
|
1671
|
+
setDate: Y,
|
|
1631
1672
|
previewDate: C,
|
|
1632
1673
|
setPreviewDate: L,
|
|
1633
1674
|
filter: t,
|
|
1634
1675
|
setViews: I,
|
|
1635
1676
|
onChange: n,
|
|
1636
|
-
minDate:
|
|
1677
|
+
minDate: u,
|
|
1637
1678
|
maxDate: i,
|
|
1638
1679
|
input: o,
|
|
1639
|
-
hasValue:
|
|
1680
|
+
hasValue: e != null
|
|
1640
1681
|
}
|
|
1641
|
-
) : /* @__PURE__ */
|
|
1682
|
+
) : /* @__PURE__ */ a(
|
|
1642
1683
|
xn,
|
|
1643
1684
|
{
|
|
1644
1685
|
date: T,
|
|
1645
|
-
setDate:
|
|
1686
|
+
setDate: Y,
|
|
1646
1687
|
previewDate: C,
|
|
1647
1688
|
setPreviewDate: L,
|
|
1648
1689
|
filter: t,
|
|
1649
1690
|
setViews: I,
|
|
1650
1691
|
onChange: n,
|
|
1651
|
-
minDate:
|
|
1692
|
+
minDate: u,
|
|
1652
1693
|
maxDate: i,
|
|
1653
1694
|
input: o,
|
|
1654
|
-
hasValue:
|
|
1695
|
+
hasValue: e != null
|
|
1655
1696
|
}
|
|
1656
1697
|
) })
|
|
1657
1698
|
]
|
|
@@ -1660,29 +1701,29 @@ const Cn = K(
|
|
|
1660
1701
|
]
|
|
1661
1702
|
}
|
|
1662
1703
|
);
|
|
1663
|
-
return /* @__PURE__ */
|
|
1704
|
+
return /* @__PURE__ */ a(
|
|
1664
1705
|
on,
|
|
1665
1706
|
{
|
|
1666
1707
|
label: N,
|
|
1667
|
-
labelPosition:
|
|
1708
|
+
labelPosition: m,
|
|
1668
1709
|
required: h,
|
|
1669
1710
|
optional: s,
|
|
1670
1711
|
description: x,
|
|
1671
|
-
helperText:
|
|
1712
|
+
helperText: z,
|
|
1672
1713
|
errorText: c,
|
|
1673
1714
|
fullWidth: M,
|
|
1674
1715
|
children: U
|
|
1675
1716
|
}
|
|
1676
1717
|
);
|
|
1677
1718
|
}
|
|
1678
|
-
),
|
|
1719
|
+
), zn = K(
|
|
1679
1720
|
({
|
|
1680
|
-
value:
|
|
1721
|
+
value: e,
|
|
1681
1722
|
onChange: n,
|
|
1682
1723
|
filter: t,
|
|
1683
1724
|
input: o = !0,
|
|
1684
1725
|
rangedDate: l,
|
|
1685
|
-
disabled:
|
|
1726
|
+
disabled: u,
|
|
1686
1727
|
minDate: i,
|
|
1687
1728
|
maxDate: g,
|
|
1688
1729
|
placeholder: f,
|
|
@@ -1692,20 +1733,20 @@ const Cn = K(
|
|
|
1692
1733
|
clearable: M,
|
|
1693
1734
|
fullWidth: k,
|
|
1694
1735
|
withPadding: N,
|
|
1695
|
-
label:
|
|
1736
|
+
label: m,
|
|
1696
1737
|
labelPosition: h,
|
|
1697
1738
|
required: s,
|
|
1698
1739
|
optional: x,
|
|
1699
|
-
description:
|
|
1740
|
+
description: z,
|
|
1700
1741
|
helperText: c,
|
|
1701
1742
|
errorText: y
|
|
1702
|
-
},
|
|
1703
|
-
const
|
|
1743
|
+
}, p) => {
|
|
1744
|
+
const b = {
|
|
1704
1745
|
onChange: n,
|
|
1705
|
-
value:
|
|
1746
|
+
value: e,
|
|
1706
1747
|
input: o,
|
|
1707
1748
|
filter: t,
|
|
1708
|
-
disabled:
|
|
1749
|
+
disabled: u,
|
|
1709
1750
|
minDate: i,
|
|
1710
1751
|
maxDate: g,
|
|
1711
1752
|
placeholder: f,
|
|
@@ -1715,17 +1756,17 @@ const Cn = K(
|
|
|
1715
1756
|
clearable: M,
|
|
1716
1757
|
fullWidth: k,
|
|
1717
1758
|
withPadding: N,
|
|
1718
|
-
label:
|
|
1759
|
+
label: m,
|
|
1719
1760
|
labelPosition: h,
|
|
1720
1761
|
required: s,
|
|
1721
1762
|
optional: x,
|
|
1722
|
-
description:
|
|
1763
|
+
description: z,
|
|
1723
1764
|
helperText: c,
|
|
1724
1765
|
errorText: y
|
|
1725
1766
|
};
|
|
1726
|
-
return /* @__PURE__ */
|
|
1767
|
+
return /* @__PURE__ */ a(en, { children: l ? /* @__PURE__ */ a(mn, { ...b, ref: p }) : /* @__PURE__ */ a(Cn, { ...b, ref: p }) });
|
|
1727
1768
|
}
|
|
1728
1769
|
);
|
|
1729
1770
|
export {
|
|
1730
|
-
|
|
1771
|
+
zn as StarasiaDate
|
|
1731
1772
|
};
|