@starasia/date 5.1.0 → 5.1.1
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 +456 -434
- package/dist/date.umd.js +24 -4
- package/package.json +1 -1
package/dist/date.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as j, useRef as
|
|
3
|
-
const
|
|
1
|
+
import { jsxs as $, jsx as a, Fragment as nn } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j, useRef as J, useEffect as I, forwardRef as Z } from "react";
|
|
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
|
|
|
5
5
|
* {
|
|
6
6
|
margin: 0;
|
|
@@ -10,7 +10,7 @@ const J = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
|
|
|
10
10
|
/* box-sizing: border-box; */
|
|
11
11
|
}
|
|
12
12
|
:root {
|
|
13
|
-
--sa-date-radius: var(--sa-radii-
|
|
13
|
+
--sa-date-radius: var(--sa-radii-sm, 0.375rem);
|
|
14
14
|
--sa-date-radius-lg: var(--sa-radii-lg, 0.75rem);
|
|
15
15
|
--sa-date-bg: var(--sa-background-primary, #ffffff);
|
|
16
16
|
--sa-date-border-color: var(--sa-color-gray-alpha-a20, #78867f33);
|
|
@@ -235,8 +235,28 @@ const J = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
.sa-calendar-days-active {
|
|
238
|
-
background: var(--sa-date-brand
|
|
238
|
+
background: var(--sa-date-brand);
|
|
239
|
+
color: #fff;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.sa-calendar-days-today {
|
|
243
|
+
position: relative;
|
|
239
244
|
color: var(--sa-date-brand);
|
|
245
|
+
font-weight: 700;
|
|
246
|
+
background: transparent;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.sa-calendar-days-today::before {
|
|
250
|
+
content: '';
|
|
251
|
+
position: absolute;
|
|
252
|
+
top: 50%;
|
|
253
|
+
left: 50%;
|
|
254
|
+
transform: translate(-50%, -50%);
|
|
255
|
+
width: 32px;
|
|
256
|
+
height: 32px;
|
|
257
|
+
background: var(--sa-date-brand-secondary);
|
|
258
|
+
border-radius: 50%;
|
|
259
|
+
z-index: -1;
|
|
240
260
|
}
|
|
241
261
|
|
|
242
262
|
/* MONTH STYLING */
|
|
@@ -500,7 +520,7 @@ const J = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
|
|
|
500
520
|
width: 32px;
|
|
501
521
|
height: 32px;
|
|
502
522
|
}
|
|
503
|
-
`, en = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
523
|
+
`, en = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], W = [
|
|
504
524
|
"January",
|
|
505
525
|
"February",
|
|
506
526
|
"March",
|
|
@@ -528,12 +548,12 @@ const J = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
|
|
|
528
548
|
"Dec"
|
|
529
549
|
];
|
|
530
550
|
function an(r) {
|
|
531
|
-
const [e, t] = j(r),
|
|
532
|
-
|
|
551
|
+
const [e, t] = j(r), o = J(null), l = (u) => {
|
|
552
|
+
o.current && !o.current.contains(u.target) && t(!1);
|
|
533
553
|
};
|
|
534
|
-
return
|
|
554
|
+
return I(() => (document.addEventListener("click", l, !0), () => {
|
|
535
555
|
document.removeEventListener("click", l, !0);
|
|
536
|
-
}), []), { ref:
|
|
556
|
+
}), []), { ref: o, isComponentVisible: e, setIsComponentVisible: t };
|
|
537
557
|
}
|
|
538
558
|
const K = "sa-calendar-input-styles", ln = (r) => {
|
|
539
559
|
if (!document.getElementById(K)) {
|
|
@@ -541,8 +561,8 @@ const K = "sa-calendar-input-styles", ln = (r) => {
|
|
|
541
561
|
e.id = K, e.textContent = r, document.head.appendChild(e);
|
|
542
562
|
}
|
|
543
563
|
};
|
|
544
|
-
ln(
|
|
545
|
-
const
|
|
564
|
+
ln(R);
|
|
565
|
+
const H = (r) => {
|
|
546
566
|
if (r === "sm")
|
|
547
567
|
return 16;
|
|
548
568
|
if (r === "md")
|
|
@@ -553,27 +573,27 @@ const W = (r) => {
|
|
|
553
573
|
const {
|
|
554
574
|
size: e = "md",
|
|
555
575
|
status: t = "default",
|
|
556
|
-
variant:
|
|
576
|
+
variant: o = "outline",
|
|
557
577
|
clearable: l,
|
|
558
|
-
onClear:
|
|
578
|
+
onClear: u,
|
|
559
579
|
...d
|
|
560
|
-
} = r,
|
|
561
|
-
|
|
562
|
-
}, n = t === "disable" || d.disabled,
|
|
563
|
-
D.stopPropagation(),
|
|
580
|
+
} = r, p = J(null), g = () => {
|
|
581
|
+
p.current && d.onClick && (p.current.focus(), d.onClick(""));
|
|
582
|
+
}, n = t === "disable" || d.disabled, c = !!d.value, v = l && c && !n, k = (D) => {
|
|
583
|
+
D.stopPropagation(), u == null || u();
|
|
564
584
|
};
|
|
565
|
-
return /* @__PURE__ */
|
|
585
|
+
return /* @__PURE__ */ $(
|
|
566
586
|
"div",
|
|
567
587
|
{
|
|
568
|
-
className: `sa-calendar-input-container sa-calendar-input-${
|
|
569
|
-
onClick:
|
|
588
|
+
className: `sa-calendar-input-container sa-calendar-input-${o} sa-calendar-input-container-${t} ${e} `,
|
|
589
|
+
onClick: g,
|
|
570
590
|
children: [
|
|
571
591
|
/* @__PURE__ */ a("div", { className: "sa-calendar-input-container-icon-left", children: /* @__PURE__ */ a(
|
|
572
592
|
"svg",
|
|
573
593
|
{
|
|
574
594
|
xmlns: "http://www.w3.org/2000/svg",
|
|
575
|
-
width:
|
|
576
|
-
height:
|
|
595
|
+
width: H(e),
|
|
596
|
+
height: H(e),
|
|
577
597
|
viewBox: "0 0 20 20",
|
|
578
598
|
fill: "none",
|
|
579
599
|
children: /* @__PURE__ */ a(
|
|
@@ -595,22 +615,22 @@ const W = (r) => {
|
|
|
595
615
|
...d,
|
|
596
616
|
disabled: n,
|
|
597
617
|
value: d.value,
|
|
598
|
-
ref:
|
|
618
|
+
ref: p
|
|
599
619
|
}
|
|
600
620
|
) }),
|
|
601
|
-
|
|
621
|
+
v ? /* @__PURE__ */ a(
|
|
602
622
|
"button",
|
|
603
623
|
{
|
|
604
624
|
type: "button",
|
|
605
625
|
"aria-label": "Clear date",
|
|
606
626
|
className: "sa-calendar-input-clear",
|
|
607
|
-
onClick:
|
|
627
|
+
onClick: k,
|
|
608
628
|
children: /* @__PURE__ */ a(
|
|
609
629
|
"svg",
|
|
610
630
|
{
|
|
611
631
|
xmlns: "http://www.w3.org/2000/svg",
|
|
612
|
-
width:
|
|
613
|
-
height:
|
|
632
|
+
width: H(e),
|
|
633
|
+
height: H(e),
|
|
614
634
|
viewBox: "0 0 20 20",
|
|
615
635
|
fill: "none",
|
|
616
636
|
children: /* @__PURE__ */ a(
|
|
@@ -630,8 +650,8 @@ const W = (r) => {
|
|
|
630
650
|
"svg",
|
|
631
651
|
{
|
|
632
652
|
xmlns: "http://www.w3.org/2000/svg",
|
|
633
|
-
width:
|
|
634
|
-
height:
|
|
653
|
+
width: H(e),
|
|
654
|
+
height: H(e),
|
|
635
655
|
viewBox: "0 0 20 20",
|
|
636
656
|
fill: "none",
|
|
637
657
|
children: /* @__PURE__ */ a(
|
|
@@ -653,79 +673,80 @@ const W = (r) => {
|
|
|
653
673
|
date: r,
|
|
654
674
|
setDate: e,
|
|
655
675
|
dateRange: t,
|
|
656
|
-
setDateRange:
|
|
676
|
+
setDateRange: o,
|
|
657
677
|
onChange: l,
|
|
658
|
-
minDate:
|
|
678
|
+
minDate: u,
|
|
659
679
|
maxDate: d,
|
|
660
|
-
input:
|
|
680
|
+
input: p
|
|
661
681
|
}) => {
|
|
662
|
-
var
|
|
663
|
-
const [
|
|
664
|
-
let
|
|
665
|
-
const D = r.getMonth(),
|
|
666
|
-
for (let
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
) :
|
|
670
|
-
let
|
|
671
|
-
currentMonth:
|
|
672
|
-
date: new Date(
|
|
673
|
-
month:
|
|
674
|
-
number:
|
|
675
|
-
selected:
|
|
676
|
-
|
|
677
|
-
|
|
682
|
+
var h, m, F;
|
|
683
|
+
const [g, n] = j(null);
|
|
684
|
+
let c = new Date(r.getFullYear(), r.getMonth(), 1), v = c.getDay(), k = [];
|
|
685
|
+
const D = r.getMonth(), b = (/* @__PURE__ */ new Date()).toDateString(), f = !!(t.from && !t.to), s = f && g ? g : null;
|
|
686
|
+
for (let i = 0; i < 42; i++) {
|
|
687
|
+
i === 0 && v === 0 ? c.setDate(c.getDate() - 7) : i === 0 ? c.setDate(
|
|
688
|
+
c.getDate() + (i - v)
|
|
689
|
+
) : c.setDate(c.getDate() + 1);
|
|
690
|
+
let w = {
|
|
691
|
+
currentMonth: c.getMonth() === D,
|
|
692
|
+
date: new Date(c),
|
|
693
|
+
month: c.getMonth(),
|
|
694
|
+
number: c.getDate(),
|
|
695
|
+
selected: c.toDateString() === ((h = t.from) == null ? void 0 : h.toDateString()) || c.toDateString() === (((m = t.to) == null ? void 0 : m.toDateString()) || ((F = t.from) == null ? void 0 : F.toDateString())),
|
|
696
|
+
isToday: c.toDateString() === b,
|
|
697
|
+
year: c.getFullYear(),
|
|
698
|
+
isDisabled: u && c < u || d && c > d
|
|
678
699
|
};
|
|
679
|
-
|
|
700
|
+
k.push(w);
|
|
680
701
|
}
|
|
681
|
-
const
|
|
682
|
-
e(
|
|
683
|
-
},
|
|
684
|
-
var
|
|
685
|
-
let
|
|
686
|
-
if (
|
|
687
|
-
|
|
702
|
+
const x = (i) => {
|
|
703
|
+
e(i);
|
|
704
|
+
}, N = (i) => {
|
|
705
|
+
var L;
|
|
706
|
+
let w = { ...t };
|
|
707
|
+
if (w.from && w.to)
|
|
708
|
+
w = { from: i, to: null };
|
|
688
709
|
else {
|
|
689
|
-
const
|
|
690
|
-
|
|
710
|
+
const M = ((L = w.from) == null ? void 0 : L.getTime()) || 0;
|
|
711
|
+
i.getTime() > M ? w = { from: w.from, to: i } : w = { from: i, to: w.from };
|
|
691
712
|
}
|
|
692
|
-
|
|
713
|
+
o(w), l(w);
|
|
693
714
|
};
|
|
694
|
-
return /* @__PURE__ */
|
|
715
|
+
return /* @__PURE__ */ $(
|
|
695
716
|
"div",
|
|
696
717
|
{
|
|
697
718
|
className: "sa-calendar-days-preivew",
|
|
698
719
|
onMouseLeave: () => n(null),
|
|
699
720
|
children: [
|
|
700
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-days-name-preivew", children: en.map((
|
|
701
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-days-number-preivew", children:
|
|
702
|
-
const
|
|
703
|
-
if (!
|
|
721
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-name-preivew", children: en.map((i, w) => /* @__PURE__ */ a("p", { children: i }, w)) }),
|
|
722
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-number-preivew", children: k.map((i, w) => {
|
|
723
|
+
const L = t.from && t.to && i.date.getTime() > t.from.getTime() && i.date.getTime() < t.to.getTime(), M = (() => {
|
|
724
|
+
if (!s || !t.from)
|
|
704
725
|
return !1;
|
|
705
|
-
const
|
|
706
|
-
return
|
|
707
|
-
})(),
|
|
726
|
+
const C = i.date.getTime(), z = t.from.getTime(), A = s.getTime();
|
|
727
|
+
return A > z ? C > z && C < A : C < z && C > A;
|
|
728
|
+
})(), T = f && g && i.date.toDateString() === g.toDateString(), Y = i.isDisabled, E = () => L || M ? "var(--sa-color-info-alpha-a10, #64b5f61a)" : "", S = () => Y ? "var(--sa-color-gray-400, #b7b9be)" : L || M ? "var(--sa-color-gray-500, #8c8f97)" : "";
|
|
708
729
|
return /* @__PURE__ */ a(
|
|
709
730
|
"p",
|
|
710
731
|
{
|
|
711
|
-
className: `${
|
|
732
|
+
className: `${i.currentMonth ? "sa-calendar-days-current" : "sa-calendar-days"} ${i.selected || T ? "sa-calendar-days-active" : ""} ${i.isToday && !i.selected ? "sa-calendar-days-today" : ""}`,
|
|
712
733
|
style: {
|
|
713
|
-
backgroundColor:
|
|
714
|
-
pointerEvents:
|
|
715
|
-
cursor:
|
|
716
|
-
color:
|
|
717
|
-
opacity:
|
|
718
|
-
...
|
|
734
|
+
backgroundColor: E(),
|
|
735
|
+
pointerEvents: Y ? "none" : void 0,
|
|
736
|
+
cursor: Y ? "not-allowed" : "pointer",
|
|
737
|
+
color: S(),
|
|
738
|
+
opacity: T && !i.selected ? 0.75 : 1,
|
|
739
|
+
...p ? {} : { width: "100%" }
|
|
719
740
|
},
|
|
720
741
|
onClick: () => {
|
|
721
|
-
|
|
742
|
+
Y || (x(i.date), N(i.date));
|
|
722
743
|
},
|
|
723
744
|
onMouseEnter: () => {
|
|
724
|
-
|
|
745
|
+
Y || n(i.date);
|
|
725
746
|
},
|
|
726
|
-
children:
|
|
747
|
+
children: i.number
|
|
727
748
|
},
|
|
728
|
-
|
|
749
|
+
w
|
|
729
750
|
);
|
|
730
751
|
}) })
|
|
731
752
|
]
|
|
@@ -735,47 +756,47 @@ const W = (r) => {
|
|
|
735
756
|
date: r,
|
|
736
757
|
setDate: e,
|
|
737
758
|
filter: t,
|
|
738
|
-
setViews:
|
|
759
|
+
setViews: o,
|
|
739
760
|
dateRange: l,
|
|
740
|
-
setDateRange:
|
|
761
|
+
setDateRange: u,
|
|
741
762
|
onChange: d,
|
|
742
|
-
minDate:
|
|
743
|
-
maxDate:
|
|
763
|
+
minDate: p,
|
|
764
|
+
maxDate: g,
|
|
744
765
|
input: n
|
|
745
766
|
}) => {
|
|
746
|
-
const
|
|
747
|
-
t ? (D(
|
|
748
|
-
}, D = (
|
|
749
|
-
var
|
|
750
|
-
let
|
|
751
|
-
if (
|
|
752
|
-
|
|
767
|
+
const c = l.from.getFullYear(), v = r.getFullYear(), k = (b) => {
|
|
768
|
+
t ? (D(b), e(b)) : (o("days"), e(b));
|
|
769
|
+
}, D = (b) => {
|
|
770
|
+
var s;
|
|
771
|
+
let f = { ...l };
|
|
772
|
+
if (f.from && f.to)
|
|
773
|
+
f = { from: b, to: null };
|
|
753
774
|
else {
|
|
754
|
-
const
|
|
755
|
-
|
|
775
|
+
const x = ((s = f.from) == null ? void 0 : s.getTime()) || 0;
|
|
776
|
+
b.getTime() > x ? f = { from: f.from, to: b } : f = { from: b, to: f.from };
|
|
756
777
|
}
|
|
757
|
-
|
|
778
|
+
u(f), d(f);
|
|
758
779
|
};
|
|
759
|
-
return /* @__PURE__ */ a("div", { className: "sa-calendar-months-preview", children:
|
|
760
|
-
var
|
|
761
|
-
const
|
|
780
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-months-preview", children: W.map((b, f) => {
|
|
781
|
+
var N, h, m;
|
|
782
|
+
const s = new Date(v, f).getTime() > l.from.getTime() && new Date(v, f).getTime() < (((N = l.to) == null ? void 0 : N.getTime()) || l.from.getTime()), x = p && new Date(v, f) < p || g && new Date(v, f) > g;
|
|
762
783
|
return /* @__PURE__ */ a(
|
|
763
784
|
"p",
|
|
764
785
|
{
|
|
765
|
-
className:
|
|
786
|
+
className: c === v && (f === ((h = l.from) == null ? void 0 : h.getMonth()) || f === ((m = l.to) == null ? void 0 : m.getMonth())) ? "sa-calendar-months-active" : "",
|
|
766
787
|
style: {
|
|
767
|
-
backgroundColor:
|
|
768
|
-
pointerEvents:
|
|
769
|
-
cursor:
|
|
770
|
-
color:
|
|
788
|
+
backgroundColor: s ? "var(--sa-color-info-alpha-a10, #64b5f61a)" : "",
|
|
789
|
+
pointerEvents: x ? "none" : void 0,
|
|
790
|
+
cursor: x ? "not-allowed" : "pointer",
|
|
791
|
+
color: x ? "var(--sa-color-gray-400, #b7b9be)" : s ? "var(--sa-color-gray-500, #8c8f97)" : "",
|
|
771
792
|
...n ? {} : { width: "100%" }
|
|
772
793
|
},
|
|
773
794
|
onClick: () => {
|
|
774
|
-
|
|
795
|
+
x || k(new Date(v, f));
|
|
775
796
|
},
|
|
776
|
-
children:
|
|
797
|
+
children: b.slice(0, 3)
|
|
777
798
|
},
|
|
778
|
-
|
|
799
|
+
f
|
|
779
800
|
);
|
|
780
801
|
}) });
|
|
781
802
|
}, q = (r) => {
|
|
@@ -785,45 +806,45 @@ const W = (r) => {
|
|
|
785
806
|
date: r,
|
|
786
807
|
filter: e,
|
|
787
808
|
setViews: t,
|
|
788
|
-
setDate:
|
|
809
|
+
setDate: o,
|
|
789
810
|
dateRange: l,
|
|
790
|
-
setDateRange:
|
|
811
|
+
setDateRange: u,
|
|
791
812
|
onChange: d,
|
|
792
|
-
minDate:
|
|
793
|
-
maxDate:
|
|
813
|
+
minDate: p,
|
|
814
|
+
maxDate: g,
|
|
794
815
|
input: n
|
|
795
816
|
}) => {
|
|
796
|
-
var
|
|
797
|
-
let
|
|
798
|
-
const
|
|
799
|
-
for (let h =
|
|
800
|
-
const
|
|
801
|
-
|
|
817
|
+
var N;
|
|
818
|
+
let c = [];
|
|
819
|
+
const v = r.getFullYear(), { start: k, end: D } = q(v), b = l.from.getFullYear(), f = (N = l.to) == null ? void 0 : N.getFullYear();
|
|
820
|
+
for (let h = k; h < D; h++) {
|
|
821
|
+
const m = new Date(h, 0), F = (!p || m >= p) && (!g || m <= g), i = h === b || h === f, w = m > l.from && m < l.to;
|
|
822
|
+
c.push({
|
|
802
823
|
year: h,
|
|
803
|
-
active:
|
|
804
|
-
highlight:
|
|
805
|
-
disabled: !
|
|
824
|
+
active: i && F,
|
|
825
|
+
highlight: w && F,
|
|
826
|
+
disabled: !F
|
|
806
827
|
});
|
|
807
828
|
}
|
|
808
|
-
const
|
|
809
|
-
e ? (
|
|
810
|
-
},
|
|
811
|
-
var
|
|
812
|
-
let
|
|
813
|
-
if (
|
|
814
|
-
|
|
829
|
+
const s = (h) => {
|
|
830
|
+
e ? (x(h), o(h)) : (o(h), t("months"));
|
|
831
|
+
}, x = (h) => {
|
|
832
|
+
var F;
|
|
833
|
+
let m = { ...l };
|
|
834
|
+
if (m.from && m.to)
|
|
835
|
+
m = { from: h, to: null };
|
|
815
836
|
else {
|
|
816
|
-
const
|
|
817
|
-
h.getTime() >
|
|
837
|
+
const i = ((F = m.from) == null ? void 0 : F.getTime()) || 0;
|
|
838
|
+
h.getTime() > i ? m = { from: m.from, to: h } : m = { from: h, to: m.from };
|
|
818
839
|
}
|
|
819
|
-
|
|
840
|
+
u(m), d(m);
|
|
820
841
|
};
|
|
821
|
-
return /* @__PURE__ */ a("div", { className: "sa-calendar-years-preview", children:
|
|
842
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-years-preview", children: c.map((h, m) => /* @__PURE__ */ a(
|
|
822
843
|
"p",
|
|
823
844
|
{
|
|
824
845
|
className: `${h.active ? "sa-calendar-months-active" : ""} ${h.highlight ? "sa-calendar-months-highlight" : ""} ${h.disabled ? "sa-calendar-disabled" : ""}`,
|
|
825
846
|
onClick: () => {
|
|
826
|
-
h.disabled ||
|
|
847
|
+
h.disabled || s(new Date(h.year, 0));
|
|
827
848
|
},
|
|
828
849
|
style: {
|
|
829
850
|
backgroundColor: h.highlight ? "var(--sa-color-info-alpha-a10, #64b5f61a)" : "",
|
|
@@ -834,7 +855,7 @@ const W = (r) => {
|
|
|
834
855
|
},
|
|
835
856
|
children: h.year
|
|
836
857
|
},
|
|
837
|
-
|
|
858
|
+
m
|
|
838
859
|
)) });
|
|
839
860
|
}, rn = ({ ...r }) => /* @__PURE__ */ a(
|
|
840
861
|
"svg",
|
|
@@ -880,10 +901,10 @@ const W = (r) => {
|
|
|
880
901
|
setViews: r,
|
|
881
902
|
views: e,
|
|
882
903
|
filter: t,
|
|
883
|
-
date:
|
|
904
|
+
date: o,
|
|
884
905
|
setDate: l
|
|
885
906
|
}) => {
|
|
886
|
-
const
|
|
907
|
+
const u = () => {
|
|
887
908
|
t || r((n) => n === "days" ? "months" : n === "months" ? "years" : "days");
|
|
888
909
|
}, d = () => {
|
|
889
910
|
if (e === "years") {
|
|
@@ -895,7 +916,7 @@ const W = (r) => {
|
|
|
895
916
|
return;
|
|
896
917
|
}
|
|
897
918
|
l((n) => new Date(n.getFullYear(), n.getMonth() + 1));
|
|
898
|
-
},
|
|
919
|
+
}, p = () => {
|
|
899
920
|
if (e === "years") {
|
|
900
921
|
l((n) => new Date(n.getFullYear() - 10, 0));
|
|
901
922
|
return;
|
|
@@ -911,65 +932,65 @@ const W = (r) => {
|
|
|
911
932
|
)
|
|
912
933
|
);
|
|
913
934
|
};
|
|
914
|
-
return /* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-header-title", onClick:
|
|
935
|
+
return /* @__PURE__ */ $("div", { className: "sa-calendar-header", children: [
|
|
936
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-header-title", onClick: u, children: (() => {
|
|
916
937
|
if (e === "days")
|
|
917
|
-
return `${
|
|
938
|
+
return `${W[o.getMonth()]} ${o.getFullYear()}`;
|
|
918
939
|
if (e === "months")
|
|
919
|
-
return `${
|
|
940
|
+
return `${o.getFullYear()}`;
|
|
920
941
|
if (e === "years")
|
|
921
|
-
return `${q(
|
|
942
|
+
return `${q(o.getFullYear()).start} ~ ${q(o.getFullYear()).end}`;
|
|
922
943
|
})() }),
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
-
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick:
|
|
944
|
+
/* @__PURE__ */ $("div", { className: "sa-calendar-header-nav", children: [
|
|
945
|
+
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: p, children: /* @__PURE__ */ a(rn, {}) }),
|
|
925
946
|
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: d, children: /* @__PURE__ */ a(tn, {}) })
|
|
926
947
|
] })
|
|
927
948
|
] });
|
|
928
949
|
};
|
|
929
|
-
function
|
|
930
|
-
const e = new Date(r), t = e.getFullYear(),
|
|
931
|
-
return `${e.getDate().toString().padStart(2, "0")} ${on[
|
|
950
|
+
function P(r) {
|
|
951
|
+
const e = new Date(r), t = e.getFullYear(), o = e.getMonth();
|
|
952
|
+
return `${e.getDate().toString().padStart(2, "0")} ${on[o]} ${t}`;
|
|
932
953
|
}
|
|
933
954
|
const sn = ({
|
|
934
955
|
label: r,
|
|
935
956
|
labelPosition: e = "outside-top",
|
|
936
957
|
required: t,
|
|
937
|
-
optional:
|
|
958
|
+
optional: o,
|
|
938
959
|
description: l,
|
|
939
|
-
helperText:
|
|
960
|
+
helperText: u,
|
|
940
961
|
errorText: d,
|
|
941
|
-
fullWidth:
|
|
942
|
-
children:
|
|
962
|
+
fullWidth: p,
|
|
963
|
+
children: g
|
|
943
964
|
}) => {
|
|
944
965
|
const n = [
|
|
945
966
|
"sa-date-field",
|
|
946
|
-
|
|
947
|
-
].filter(Boolean).join(" "),
|
|
967
|
+
p ? "sa-date-field-fullwidth" : ""
|
|
968
|
+
].filter(Boolean).join(" "), c = r ? /* @__PURE__ */ $("div", { className: "sa-date-field-label-row", children: [
|
|
948
969
|
/* @__PURE__ */ a("span", { className: "sa-date-field-label-text", children: r }),
|
|
949
|
-
|
|
970
|
+
o && /* @__PURE__ */ a("span", { className: "sa-date-field-optional-badge", children: "Optional" }),
|
|
950
971
|
t && /* @__PURE__ */ a("span", { className: "sa-date-field-required", children: "*" })
|
|
951
|
-
] }) : null,
|
|
952
|
-
|
|
972
|
+
] }) : null, v = /* @__PURE__ */ $(nn, { children: [
|
|
973
|
+
u && !d && /* @__PURE__ */ a("p", { className: "sa-date-field-helper", children: u }),
|
|
953
974
|
d && /* @__PURE__ */ a("p", { className: "sa-date-field-error-msg", children: d })
|
|
954
975
|
] });
|
|
955
|
-
return r ? e === "outside-left" ? /* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */
|
|
957
|
-
|
|
976
|
+
return r ? e === "outside-left" ? /* @__PURE__ */ $("div", { className: `${n} sa-date-field-left`, children: [
|
|
977
|
+
/* @__PURE__ */ $("div", { className: "sa-date-field-left-label", children: [
|
|
978
|
+
c,
|
|
958
979
|
l && /* @__PURE__ */ a("p", { className: "sa-date-field-helper-top", children: l })
|
|
959
980
|
] }),
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
|
|
962
|
-
|
|
981
|
+
/* @__PURE__ */ $("div", { className: "sa-date-field-input-wrap", children: [
|
|
982
|
+
g,
|
|
983
|
+
v
|
|
963
984
|
] })
|
|
964
|
-
] }) : /* @__PURE__ */
|
|
965
|
-
|
|
985
|
+
] }) : /* @__PURE__ */ $("div", { className: n, children: [
|
|
986
|
+
c,
|
|
966
987
|
l && /* @__PURE__ */ a("p", { className: "sa-date-field-helper-top", children: l }),
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
] }) : /* @__PURE__ */
|
|
988
|
+
g,
|
|
989
|
+
v
|
|
990
|
+
] }) : /* @__PURE__ */ $("div", { className: n, children: [
|
|
970
991
|
l && /* @__PURE__ */ a("p", { className: "sa-date-field-helper-top", children: l }),
|
|
971
|
-
|
|
972
|
-
|
|
992
|
+
g,
|
|
993
|
+
v
|
|
973
994
|
] });
|
|
974
995
|
}, Q = "sa-calendar-styles", gn = (r) => {
|
|
975
996
|
if (!document.getElementById(Q)) {
|
|
@@ -977,156 +998,156 @@ const sn = ({
|
|
|
977
998
|
e.id = Q, e.textContent = r, document.head.appendChild(e);
|
|
978
999
|
}
|
|
979
1000
|
};
|
|
980
|
-
gn(
|
|
1001
|
+
gn(R);
|
|
981
1002
|
const fn = Z(
|
|
982
1003
|
({
|
|
983
1004
|
value: r,
|
|
984
1005
|
onChange: e,
|
|
985
1006
|
filter: t,
|
|
986
|
-
input:
|
|
1007
|
+
input: o = !0,
|
|
987
1008
|
disabled: l,
|
|
988
|
-
minDate:
|
|
1009
|
+
minDate: u,
|
|
989
1010
|
maxDate: d,
|
|
990
|
-
placeholder:
|
|
991
|
-
size:
|
|
1011
|
+
placeholder: p,
|
|
1012
|
+
size: g,
|
|
992
1013
|
variant: n,
|
|
993
|
-
status:
|
|
994
|
-
clearable:
|
|
995
|
-
fullWidth:
|
|
1014
|
+
status: c,
|
|
1015
|
+
clearable: v,
|
|
1016
|
+
fullWidth: k = !0,
|
|
996
1017
|
label: D,
|
|
997
|
-
labelPosition:
|
|
998
|
-
required:
|
|
999
|
-
optional:
|
|
1000
|
-
description:
|
|
1001
|
-
helperText:
|
|
1018
|
+
labelPosition: b,
|
|
1019
|
+
required: f,
|
|
1020
|
+
optional: s,
|
|
1021
|
+
description: x,
|
|
1022
|
+
helperText: N,
|
|
1002
1023
|
errorText: h
|
|
1003
|
-
},
|
|
1004
|
-
const
|
|
1024
|
+
}, m) => {
|
|
1025
|
+
const F = h ? "error" : c, { ref: i, isComponentVisible: w, setIsComponentVisible: L } = an(!1), M = J(null), [T, Y] = j("days"), [E, S] = j(/* @__PURE__ */ new Date()), [C, z] = j({
|
|
1005
1026
|
from: (r == null ? void 0 : r.from) || /* @__PURE__ */ new Date(),
|
|
1006
1027
|
to: (r == null ? void 0 : r.to) || /* @__PURE__ */ new Date()
|
|
1007
1028
|
});
|
|
1008
|
-
|
|
1009
|
-
r ? (
|
|
1029
|
+
I(() => {
|
|
1030
|
+
r ? (S(r.from), z(r)) : (S(/* @__PURE__ */ new Date()), z({
|
|
1010
1031
|
from: /* @__PURE__ */ new Date(),
|
|
1011
1032
|
to: /* @__PURE__ */ new Date()
|
|
1012
1033
|
}));
|
|
1013
|
-
}, [r]),
|
|
1014
|
-
t &&
|
|
1015
|
-
}, [t]),
|
|
1016
|
-
t ||
|
|
1017
|
-
}, [
|
|
1018
|
-
|
|
1019
|
-
}, [
|
|
1020
|
-
const
|
|
1021
|
-
var
|
|
1034
|
+
}, [r]), I(() => {
|
|
1035
|
+
t && Y(t);
|
|
1036
|
+
}, [t]), I(() => {
|
|
1037
|
+
t || Y("days");
|
|
1038
|
+
}, [w]), I(() => {
|
|
1039
|
+
o || L(!0);
|
|
1040
|
+
}, [o]);
|
|
1041
|
+
const A = () => {
|
|
1042
|
+
var y, B;
|
|
1022
1043
|
if (!r)
|
|
1023
1044
|
return "";
|
|
1024
1045
|
if (t) {
|
|
1025
|
-
if (
|
|
1026
|
-
return `${
|
|
1027
|
-
if (
|
|
1028
|
-
return `${
|
|
1029
|
-
if (
|
|
1030
|
-
return `${(
|
|
1046
|
+
if (T === "days")
|
|
1047
|
+
return `${P(C.from)} ~ ${P(C.to || C.from) || "-"}`;
|
|
1048
|
+
if (T === "months")
|
|
1049
|
+
return `${W[C.from.getMonth()]} ~ ${C.to ? W[C.to.getMonth()] : "-"}`;
|
|
1050
|
+
if (T === "years")
|
|
1051
|
+
return `${(y = C.from) == null ? void 0 : y.getFullYear()} ~ ${((B = C.to) == null ? void 0 : B.getFullYear()) || "-"}`;
|
|
1031
1052
|
} else
|
|
1032
|
-
return `${
|
|
1053
|
+
return `${P(C.from)} ~ ${P(C.to || C.from) || "-"}`;
|
|
1033
1054
|
}, V = () => {
|
|
1034
|
-
if (M.current &&
|
|
1035
|
-
const
|
|
1036
|
-
window.innerWidth <
|
|
1055
|
+
if (M.current && i.current && o) {
|
|
1056
|
+
const y = i.current.getBoundingClientRect(), B = M.current.getBoundingClientRect();
|
|
1057
|
+
window.innerWidth < y.left + B.width ? M.current.style.left = `${y.left - B.width + y.width}px` : M.current.style.left = `${y.left}px`, y.top + B.height > window.innerHeight ? M.current.style.top = `${y.y - (y.height + B.height - 28)}px` : M.current.style.top = `${y.y + y.height}px`;
|
|
1037
1058
|
}
|
|
1038
1059
|
};
|
|
1039
|
-
|
|
1040
|
-
M.current &&
|
|
1041
|
-
}, [M,
|
|
1042
|
-
const
|
|
1043
|
-
return
|
|
1044
|
-
|
|
1060
|
+
I(() => {
|
|
1061
|
+
M.current && i.current && o && V();
|
|
1062
|
+
}, [M, i, w]), I(() => {
|
|
1063
|
+
const y = m == null ? void 0 : m.current;
|
|
1064
|
+
return y && y.addEventListener("scroll", V), window.addEventListener("scroll", V), () => {
|
|
1065
|
+
y && y.removeEventListener("scroll", V), window.removeEventListener("scroll", V);
|
|
1045
1066
|
};
|
|
1046
1067
|
}, []);
|
|
1047
|
-
const U = /* @__PURE__ */
|
|
1068
|
+
const U = /* @__PURE__ */ $(
|
|
1048
1069
|
"div",
|
|
1049
1070
|
{
|
|
1050
1071
|
className: "sa-calendar-wrapper",
|
|
1051
|
-
style: { height:
|
|
1052
|
-
ref:
|
|
1072
|
+
style: { height: o ? "auto" : "100%" },
|
|
1073
|
+
ref: o ? i : null,
|
|
1053
1074
|
children: [
|
|
1054
|
-
|
|
1075
|
+
o ? /* @__PURE__ */ a(
|
|
1055
1076
|
dn,
|
|
1056
1077
|
{
|
|
1057
|
-
value:
|
|
1078
|
+
value: A(),
|
|
1058
1079
|
inputMode: "none",
|
|
1059
1080
|
onClick: () => {
|
|
1060
|
-
|
|
1081
|
+
L(!0);
|
|
1061
1082
|
},
|
|
1062
1083
|
onChange: () => {
|
|
1063
1084
|
},
|
|
1064
1085
|
disabled: l,
|
|
1065
|
-
placeholder:
|
|
1066
|
-
size:
|
|
1086
|
+
placeholder: p,
|
|
1087
|
+
size: g,
|
|
1067
1088
|
variant: n,
|
|
1068
|
-
status:
|
|
1069
|
-
clearable:
|
|
1089
|
+
status: F,
|
|
1090
|
+
clearable: v,
|
|
1070
1091
|
onClear: () => e(void 0)
|
|
1071
1092
|
}
|
|
1072
1093
|
) : null,
|
|
1073
|
-
|
|
1094
|
+
w ? /* @__PURE__ */ $(
|
|
1074
1095
|
"div",
|
|
1075
1096
|
{
|
|
1076
|
-
className: `sa-calendar sa-calendar-size-${
|
|
1097
|
+
className: `sa-calendar sa-calendar-size-${g || "md"} ${o ? "" : "sa-calendar-no-input"}`,
|
|
1077
1098
|
ref: M,
|
|
1078
1099
|
children: [
|
|
1079
1100
|
/* @__PURE__ */ a(
|
|
1080
1101
|
pn,
|
|
1081
1102
|
{
|
|
1082
|
-
setViews:
|
|
1083
|
-
views:
|
|
1103
|
+
setViews: Y,
|
|
1104
|
+
views: T,
|
|
1084
1105
|
filter: t,
|
|
1085
1106
|
date: E,
|
|
1086
|
-
setDate:
|
|
1107
|
+
setDate: S
|
|
1087
1108
|
}
|
|
1088
1109
|
),
|
|
1089
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-body", children:
|
|
1110
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-body", children: T === "days" ? /* @__PURE__ */ a(
|
|
1090
1111
|
cn,
|
|
1091
1112
|
{
|
|
1092
1113
|
date: E,
|
|
1093
|
-
setDate:
|
|
1094
|
-
setIsComponentVisible:
|
|
1114
|
+
setDate: S,
|
|
1115
|
+
setIsComponentVisible: L,
|
|
1095
1116
|
dateRange: C,
|
|
1096
1117
|
setDateRange: z,
|
|
1097
|
-
input:
|
|
1118
|
+
input: o,
|
|
1098
1119
|
onChange: e,
|
|
1099
|
-
minDate:
|
|
1120
|
+
minDate: u,
|
|
1100
1121
|
maxDate: d
|
|
1101
1122
|
}
|
|
1102
|
-
) :
|
|
1123
|
+
) : T === "months" ? /* @__PURE__ */ a(
|
|
1103
1124
|
un,
|
|
1104
1125
|
{
|
|
1105
1126
|
date: E,
|
|
1106
|
-
setDate:
|
|
1127
|
+
setDate: S,
|
|
1107
1128
|
filter: t,
|
|
1108
|
-
setViews:
|
|
1129
|
+
setViews: Y,
|
|
1109
1130
|
dateRange: C,
|
|
1110
1131
|
setDateRange: z,
|
|
1111
|
-
setIsComponentVisible:
|
|
1112
|
-
input:
|
|
1132
|
+
setIsComponentVisible: L,
|
|
1133
|
+
input: o,
|
|
1113
1134
|
onChange: e,
|
|
1114
|
-
minDate:
|
|
1135
|
+
minDate: u,
|
|
1115
1136
|
maxDate: d
|
|
1116
1137
|
}
|
|
1117
1138
|
) : /* @__PURE__ */ a(
|
|
1118
1139
|
hn,
|
|
1119
1140
|
{
|
|
1120
1141
|
date: E,
|
|
1121
|
-
setDate:
|
|
1142
|
+
setDate: S,
|
|
1122
1143
|
filter: t,
|
|
1123
|
-
setViews:
|
|
1144
|
+
setViews: Y,
|
|
1124
1145
|
dateRange: C,
|
|
1125
1146
|
setDateRange: z,
|
|
1126
|
-
setIsComponentVisible:
|
|
1127
|
-
input:
|
|
1147
|
+
setIsComponentVisible: L,
|
|
1148
|
+
input: o,
|
|
1128
1149
|
onChange: e,
|
|
1129
|
-
minDate:
|
|
1150
|
+
minDate: u,
|
|
1130
1151
|
maxDate: d
|
|
1131
1152
|
}
|
|
1132
1153
|
) })
|
|
@@ -1140,13 +1161,13 @@ const fn = Z(
|
|
|
1140
1161
|
sn,
|
|
1141
1162
|
{
|
|
1142
1163
|
label: D,
|
|
1143
|
-
labelPosition:
|
|
1144
|
-
required:
|
|
1145
|
-
optional:
|
|
1146
|
-
description:
|
|
1147
|
-
helperText:
|
|
1164
|
+
labelPosition: b,
|
|
1165
|
+
required: f,
|
|
1166
|
+
optional: s,
|
|
1167
|
+
description: x,
|
|
1168
|
+
helperText: N,
|
|
1148
1169
|
errorText: h,
|
|
1149
|
-
fullWidth:
|
|
1170
|
+
fullWidth: k,
|
|
1150
1171
|
children: U
|
|
1151
1172
|
}
|
|
1152
1173
|
);
|
|
@@ -1157,8 +1178,8 @@ const fn = Z(
|
|
|
1157
1178
|
e.id = X, e.textContent = r, document.head.appendChild(e);
|
|
1158
1179
|
}
|
|
1159
1180
|
};
|
|
1160
|
-
bn(
|
|
1161
|
-
const
|
|
1181
|
+
bn(R);
|
|
1182
|
+
const O = (r) => {
|
|
1162
1183
|
if (r === "sm")
|
|
1163
1184
|
return 16;
|
|
1164
1185
|
if (r === "md")
|
|
@@ -1169,27 +1190,27 @@ const H = (r) => {
|
|
|
1169
1190
|
const {
|
|
1170
1191
|
size: e = "md",
|
|
1171
1192
|
status: t = "default",
|
|
1172
|
-
variant:
|
|
1193
|
+
variant: o = "outline",
|
|
1173
1194
|
clearable: l,
|
|
1174
|
-
onClear:
|
|
1195
|
+
onClear: u,
|
|
1175
1196
|
...d
|
|
1176
|
-
} = r,
|
|
1177
|
-
|
|
1178
|
-
}, n = t === "disable" || d.disabled,
|
|
1179
|
-
D.stopPropagation(),
|
|
1197
|
+
} = r, p = J(null), g = () => {
|
|
1198
|
+
p.current && d.onClick && (p.current.focus(), d.onClick(""));
|
|
1199
|
+
}, n = t === "disable" || d.disabled, c = !!d.value, v = l && c && !n, k = (D) => {
|
|
1200
|
+
D.stopPropagation(), u == null || u();
|
|
1180
1201
|
};
|
|
1181
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ $(
|
|
1182
1203
|
"div",
|
|
1183
1204
|
{
|
|
1184
|
-
className: `sa-calendar-input-container sa-calendar-input-${
|
|
1185
|
-
onClick:
|
|
1205
|
+
className: `sa-calendar-input-container sa-calendar-input-${o} sa-calendar-input-container-${t} ${e} `,
|
|
1206
|
+
onClick: g,
|
|
1186
1207
|
children: [
|
|
1187
1208
|
/* @__PURE__ */ a("div", { className: "sa-calendar-input-container-icon-left", children: /* @__PURE__ */ a(
|
|
1188
1209
|
"svg",
|
|
1189
1210
|
{
|
|
1190
1211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1191
|
-
width:
|
|
1192
|
-
height:
|
|
1212
|
+
width: O(e),
|
|
1213
|
+
height: O(e),
|
|
1193
1214
|
viewBox: "0 0 20 20",
|
|
1194
1215
|
fill: "none",
|
|
1195
1216
|
children: /* @__PURE__ */ a(
|
|
@@ -1211,22 +1232,22 @@ const H = (r) => {
|
|
|
1211
1232
|
...d,
|
|
1212
1233
|
disabled: n,
|
|
1213
1234
|
value: d.value,
|
|
1214
|
-
ref:
|
|
1235
|
+
ref: p
|
|
1215
1236
|
}
|
|
1216
1237
|
) }),
|
|
1217
|
-
|
|
1238
|
+
v ? /* @__PURE__ */ a(
|
|
1218
1239
|
"button",
|
|
1219
1240
|
{
|
|
1220
1241
|
type: "button",
|
|
1221
1242
|
"aria-label": "Clear date",
|
|
1222
1243
|
className: "sa-calendar-input-clear",
|
|
1223
|
-
onClick:
|
|
1244
|
+
onClick: k,
|
|
1224
1245
|
children: /* @__PURE__ */ a(
|
|
1225
1246
|
"svg",
|
|
1226
1247
|
{
|
|
1227
1248
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1228
|
-
width:
|
|
1229
|
-
height:
|
|
1249
|
+
width: O(e),
|
|
1250
|
+
height: O(e),
|
|
1230
1251
|
viewBox: "0 0 20 20",
|
|
1231
1252
|
fill: "none",
|
|
1232
1253
|
children: /* @__PURE__ */ a(
|
|
@@ -1246,8 +1267,8 @@ const H = (r) => {
|
|
|
1246
1267
|
"svg",
|
|
1247
1268
|
{
|
|
1248
1269
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1249
|
-
width:
|
|
1250
|
-
height:
|
|
1270
|
+
width: O(e),
|
|
1271
|
+
height: O(e),
|
|
1251
1272
|
viewBox: "0 0 20 20",
|
|
1252
1273
|
fill: "none",
|
|
1253
1274
|
children: /* @__PURE__ */ a(
|
|
@@ -1269,57 +1290,58 @@ const H = (r) => {
|
|
|
1269
1290
|
date: r,
|
|
1270
1291
|
setDate: e,
|
|
1271
1292
|
previewDate: t,
|
|
1272
|
-
setPreviewDate:
|
|
1293
|
+
setPreviewDate: o,
|
|
1273
1294
|
setIsComponentVisible: l,
|
|
1274
|
-
minDate:
|
|
1295
|
+
minDate: u,
|
|
1275
1296
|
maxDate: d,
|
|
1276
|
-
input:
|
|
1277
|
-
onChange:
|
|
1297
|
+
input: p,
|
|
1298
|
+
onChange: g
|
|
1278
1299
|
}) => {
|
|
1279
1300
|
let n = new Date(
|
|
1280
1301
|
t.getFullYear(),
|
|
1281
1302
|
t.getMonth(),
|
|
1282
1303
|
1
|
|
1283
|
-
),
|
|
1284
|
-
const
|
|
1285
|
-
for (let
|
|
1286
|
-
|
|
1287
|
-
n.getDate() + (
|
|
1304
|
+
), c = n.getDay(), v = [];
|
|
1305
|
+
const k = r.toDateString(), D = (/* @__PURE__ */ new Date()).toDateString(), b = t.getMonth();
|
|
1306
|
+
for (let s = 0; s < 42; s++) {
|
|
1307
|
+
s === 0 && c === 0 ? n.setDate(n.getDate() - 7) : s === 0 ? n.setDate(
|
|
1308
|
+
n.getDate() + (s - c)
|
|
1288
1309
|
) : n.setDate(n.getDate() + 1);
|
|
1289
|
-
let
|
|
1290
|
-
currentMonth: n.getMonth() ===
|
|
1310
|
+
let x = {
|
|
1311
|
+
currentMonth: n.getMonth() === b,
|
|
1291
1312
|
date: new Date(n),
|
|
1292
1313
|
month: n.getMonth(),
|
|
1293
1314
|
number: n.getDate(),
|
|
1294
|
-
selected: n.toDateString() ===
|
|
1315
|
+
selected: n.toDateString() === k,
|
|
1316
|
+
isToday: n.toDateString() === D,
|
|
1295
1317
|
year: n.getFullYear(),
|
|
1296
|
-
isDisabled:
|
|
1318
|
+
isDisabled: u && n < u || d && n > d
|
|
1297
1319
|
};
|
|
1298
|
-
|
|
1320
|
+
v.push(x);
|
|
1299
1321
|
}
|
|
1300
|
-
const
|
|
1301
|
-
(!
|
|
1322
|
+
const f = (s) => {
|
|
1323
|
+
(!u || s >= u) && (!d || s <= d) && (e(s), g(s), o(s), p && l(!1));
|
|
1302
1324
|
};
|
|
1303
|
-
return /* @__PURE__ */
|
|
1304
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-days-name-preivew", children: en.map((
|
|
1305
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-days-number-preivew", children:
|
|
1306
|
-
const
|
|
1325
|
+
return /* @__PURE__ */ $("div", { className: "sa-calendar-days-preivew", children: [
|
|
1326
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-name-preivew", children: en.map((s, x) => /* @__PURE__ */ a("p", { children: s }, x)) }),
|
|
1327
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-days-number-preivew", children: v.map((s, x) => {
|
|
1328
|
+
const N = s.isDisabled;
|
|
1307
1329
|
return /* @__PURE__ */ a(
|
|
1308
1330
|
"p",
|
|
1309
1331
|
{
|
|
1310
|
-
className: `${
|
|
1332
|
+
className: `${s.currentMonth ? "sa-calendar-days-current" : "sa-calendar-days"} ${s.selected ? "sa-calendar-days-active" : ""} ${s.isToday && !s.selected ? "sa-calendar-days-today" : ""}`,
|
|
1311
1333
|
style: {
|
|
1312
|
-
color:
|
|
1313
|
-
pointerEvents:
|
|
1314
|
-
cursor:
|
|
1315
|
-
...
|
|
1334
|
+
color: N ? "#ccc" : void 0,
|
|
1335
|
+
pointerEvents: N ? "none" : void 0,
|
|
1336
|
+
cursor: N ? "not-allowed" : "pointer",
|
|
1337
|
+
...p ? {} : { width: "100%" }
|
|
1316
1338
|
},
|
|
1317
1339
|
onClick: () => {
|
|
1318
|
-
|
|
1340
|
+
N || f(s.date);
|
|
1319
1341
|
},
|
|
1320
|
-
children:
|
|
1342
|
+
children: s.number
|
|
1321
1343
|
},
|
|
1322
|
-
|
|
1344
|
+
x
|
|
1323
1345
|
);
|
|
1324
1346
|
}) })
|
|
1325
1347
|
] });
|
|
@@ -1327,35 +1349,35 @@ const H = (r) => {
|
|
|
1327
1349
|
date: r,
|
|
1328
1350
|
setDate: e,
|
|
1329
1351
|
filter: t,
|
|
1330
|
-
setViews:
|
|
1352
|
+
setViews: o,
|
|
1331
1353
|
onChange: l,
|
|
1332
|
-
previewDate:
|
|
1354
|
+
previewDate: u,
|
|
1333
1355
|
setPreviewDate: d,
|
|
1334
|
-
minDate:
|
|
1335
|
-
maxDate:
|
|
1356
|
+
minDate: p,
|
|
1357
|
+
maxDate: g,
|
|
1336
1358
|
input: n
|
|
1337
1359
|
}) => {
|
|
1338
|
-
const
|
|
1339
|
-
(!
|
|
1360
|
+
const c = r.getMonth(), v = r.getFullYear(), k = u.getFullYear(), D = (b) => {
|
|
1361
|
+
(!p || b >= p) && (!g || b <= g) && (t ? (l(b), e(b), d(b)) : (o("days"), d(b)));
|
|
1340
1362
|
};
|
|
1341
|
-
return /* @__PURE__ */ a("div", { className: "sa-calendar-months-preview", children:
|
|
1342
|
-
const
|
|
1363
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-months-preview", children: W.map((b, f) => {
|
|
1364
|
+
const s = p && new Date(k, f, 1) < p || g && new Date(k, f + 1, 0) > g;
|
|
1343
1365
|
return /* @__PURE__ */ a(
|
|
1344
1366
|
"p",
|
|
1345
1367
|
{
|
|
1346
|
-
className:
|
|
1368
|
+
className: f === c && k === v ? "sa-calendar-months-active" : "",
|
|
1347
1369
|
style: {
|
|
1348
|
-
color:
|
|
1349
|
-
pointerEvents:
|
|
1350
|
-
cursor:
|
|
1370
|
+
color: s ? "#ccc" : void 0,
|
|
1371
|
+
pointerEvents: s ? "none" : void 0,
|
|
1372
|
+
cursor: s ? "not-allowed" : "pointer",
|
|
1351
1373
|
...n ? {} : { width: "100%" }
|
|
1352
1374
|
},
|
|
1353
1375
|
onClick: () => {
|
|
1354
|
-
|
|
1376
|
+
s || D(new Date(k, f));
|
|
1355
1377
|
},
|
|
1356
|
-
children:
|
|
1378
|
+
children: b.slice(0, 3)
|
|
1357
1379
|
},
|
|
1358
|
-
|
|
1380
|
+
f
|
|
1359
1381
|
);
|
|
1360
1382
|
}) });
|
|
1361
1383
|
}, G = (r) => {
|
|
@@ -1365,48 +1387,48 @@ const H = (r) => {
|
|
|
1365
1387
|
date: r,
|
|
1366
1388
|
filter: e,
|
|
1367
1389
|
setViews: t,
|
|
1368
|
-
setDate:
|
|
1390
|
+
setDate: o,
|
|
1369
1391
|
onChange: l,
|
|
1370
|
-
previewDate:
|
|
1392
|
+
previewDate: u,
|
|
1371
1393
|
setPreviewDate: d,
|
|
1372
|
-
minDate:
|
|
1373
|
-
maxDate:
|
|
1394
|
+
minDate: p,
|
|
1395
|
+
maxDate: g,
|
|
1374
1396
|
input: n
|
|
1375
1397
|
}) => {
|
|
1376
|
-
let
|
|
1377
|
-
const
|
|
1378
|
-
for (let
|
|
1379
|
-
let
|
|
1380
|
-
|
|
1398
|
+
let c = [];
|
|
1399
|
+
const v = u.getFullYear(), { start: k, end: D } = G(v), b = r.getFullYear();
|
|
1400
|
+
for (let s = k; s < D; s++) {
|
|
1401
|
+
let x = p && new Date(s, 0, 1) < p || g && new Date(s, 11, 31) > g;
|
|
1402
|
+
c.push({ year: s, active: s === b, isDisabled: x });
|
|
1381
1403
|
}
|
|
1382
|
-
const
|
|
1383
|
-
(!
|
|
1404
|
+
const f = (s) => {
|
|
1405
|
+
(!p || s >= p) && (!g || s <= g) && (e ? (l(s), o(s), d(s)) : (t("months"), d(s)));
|
|
1384
1406
|
};
|
|
1385
|
-
return /* @__PURE__ */ a("div", { className: "sa-calendar-years-preview", children:
|
|
1407
|
+
return /* @__PURE__ */ a("div", { className: "sa-calendar-years-preview", children: c.map((s, x) => /* @__PURE__ */ a(
|
|
1386
1408
|
"p",
|
|
1387
1409
|
{
|
|
1388
|
-
className:
|
|
1410
|
+
className: s.active ? "sa-calendar-months-active" : "",
|
|
1389
1411
|
style: {
|
|
1390
|
-
color:
|
|
1391
|
-
pointerEvents:
|
|
1392
|
-
cursor:
|
|
1412
|
+
color: s.isDisabled ? "#ccc" : void 0,
|
|
1413
|
+
pointerEvents: s.isDisabled ? "none" : void 0,
|
|
1414
|
+
cursor: s.isDisabled ? "not-allowed" : "pointer",
|
|
1393
1415
|
...n ? {} : { width: "100%" }
|
|
1394
1416
|
},
|
|
1395
1417
|
onClick: () => {
|
|
1396
|
-
|
|
1418
|
+
s.isDisabled || f(new Date(s.year, 0));
|
|
1397
1419
|
},
|
|
1398
|
-
children:
|
|
1420
|
+
children: s.year
|
|
1399
1421
|
},
|
|
1400
|
-
|
|
1422
|
+
x
|
|
1401
1423
|
)) });
|
|
1402
1424
|
}, xn = ({
|
|
1403
1425
|
setViews: r,
|
|
1404
1426
|
views: e,
|
|
1405
1427
|
filter: t,
|
|
1406
|
-
previewDate:
|
|
1428
|
+
previewDate: o,
|
|
1407
1429
|
setPreviewDate: l
|
|
1408
1430
|
}) => {
|
|
1409
|
-
const
|
|
1431
|
+
const u = () => {
|
|
1410
1432
|
t || r((n) => n === "days" ? "months" : n === "months" ? "years" : "days");
|
|
1411
1433
|
}, d = () => {
|
|
1412
1434
|
if (e === "years") {
|
|
@@ -1420,7 +1442,7 @@ const H = (r) => {
|
|
|
1420
1442
|
return;
|
|
1421
1443
|
}
|
|
1422
1444
|
l((n) => new Date(n.getFullYear(), n.getMonth() + 1));
|
|
1423
|
-
},
|
|
1445
|
+
}, p = () => {
|
|
1424
1446
|
if (e === "years") {
|
|
1425
1447
|
l((n) => new Date(n.getFullYear() - 10, 0));
|
|
1426
1448
|
return;
|
|
@@ -1438,17 +1460,17 @@ const H = (r) => {
|
|
|
1438
1460
|
)
|
|
1439
1461
|
);
|
|
1440
1462
|
};
|
|
1441
|
-
return /* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-header-title", onClick:
|
|
1463
|
+
return /* @__PURE__ */ $("div", { className: "sa-calendar-header", children: [
|
|
1464
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-header-title", onClick: u, children: (() => {
|
|
1443
1465
|
if (e === "days")
|
|
1444
|
-
return `${
|
|
1466
|
+
return `${W[o.getMonth()]} ${o.getFullYear()}`;
|
|
1445
1467
|
if (e === "months")
|
|
1446
|
-
return `${
|
|
1468
|
+
return `${o.getFullYear()}`;
|
|
1447
1469
|
if (e === "years")
|
|
1448
|
-
return `${G(
|
|
1470
|
+
return `${G(o.getFullYear()).start} ~ ${G(o.getFullYear()).end}`;
|
|
1449
1471
|
})() }),
|
|
1450
|
-
/* @__PURE__ */
|
|
1451
|
-
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick:
|
|
1472
|
+
/* @__PURE__ */ $("div", { className: "sa-calendar-header-nav", children: [
|
|
1473
|
+
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: p, children: /* @__PURE__ */ a(rn, {}) }),
|
|
1452
1474
|
/* @__PURE__ */ a("button", { className: "sa-calendar-nav-btn", onClick: d, children: /* @__PURE__ */ a(tn, {}) })
|
|
1453
1475
|
] })
|
|
1454
1476
|
] });
|
|
@@ -1458,135 +1480,135 @@ const H = (r) => {
|
|
|
1458
1480
|
e.id = _, e.textContent = r, document.head.appendChild(e);
|
|
1459
1481
|
}
|
|
1460
1482
|
};
|
|
1461
|
-
kn(
|
|
1483
|
+
kn(R);
|
|
1462
1484
|
const Mn = Z(
|
|
1463
1485
|
({
|
|
1464
1486
|
value: r,
|
|
1465
1487
|
onChange: e,
|
|
1466
1488
|
filter: t,
|
|
1467
|
-
input:
|
|
1489
|
+
input: o = !0,
|
|
1468
1490
|
disabled: l,
|
|
1469
|
-
minDate:
|
|
1491
|
+
minDate: u,
|
|
1470
1492
|
maxDate: d,
|
|
1471
|
-
placeholder:
|
|
1472
|
-
size:
|
|
1493
|
+
placeholder: p,
|
|
1494
|
+
size: g,
|
|
1473
1495
|
variant: n,
|
|
1474
|
-
status:
|
|
1475
|
-
clearable:
|
|
1476
|
-
fullWidth:
|
|
1496
|
+
status: c,
|
|
1497
|
+
clearable: v,
|
|
1498
|
+
fullWidth: k = !0,
|
|
1477
1499
|
label: D,
|
|
1478
|
-
labelPosition:
|
|
1479
|
-
required:
|
|
1480
|
-
optional:
|
|
1481
|
-
description:
|
|
1482
|
-
helperText:
|
|
1500
|
+
labelPosition: b,
|
|
1501
|
+
required: f,
|
|
1502
|
+
optional: s,
|
|
1503
|
+
description: x,
|
|
1504
|
+
helperText: N,
|
|
1483
1505
|
errorText: h
|
|
1484
|
-
},
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1487
|
-
r ? (
|
|
1488
|
-
}, [r]),
|
|
1489
|
-
t &&
|
|
1490
|
-
}, [t]),
|
|
1491
|
-
t ||
|
|
1492
|
-
}, [
|
|
1493
|
-
|
|
1494
|
-
}, [
|
|
1495
|
-
const
|
|
1496
|
-
if (M.current &&
|
|
1497
|
-
const
|
|
1498
|
-
window.innerWidth <
|
|
1506
|
+
}, m) => {
|
|
1507
|
+
const F = h ? "error" : c, { ref: i, isComponentVisible: w, setIsComponentVisible: L } = an(!1), M = J(null), [T, Y] = j("days"), [E, S] = j(/* @__PURE__ */ new Date()), [C, z] = j(/* @__PURE__ */ new Date());
|
|
1508
|
+
I(() => {
|
|
1509
|
+
r ? (S(r), z(r)) : (S(/* @__PURE__ */ new Date()), z(/* @__PURE__ */ new Date()));
|
|
1510
|
+
}, [r]), I(() => {
|
|
1511
|
+
t && Y(t);
|
|
1512
|
+
}, [t]), I(() => {
|
|
1513
|
+
t || Y("days");
|
|
1514
|
+
}, [w]), I(() => {
|
|
1515
|
+
o || L(!0);
|
|
1516
|
+
}, [o]);
|
|
1517
|
+
const A = () => r ? t === "days" ? P(E) : t === "months" ? `${W[E.getMonth()]} ${E.getFullYear()}` : t === "years" ? E.getFullYear() : P(E) : "", V = () => {
|
|
1518
|
+
if (M.current && i.current && o) {
|
|
1519
|
+
const y = i.current.getBoundingClientRect(), B = M.current.getBoundingClientRect();
|
|
1520
|
+
window.innerWidth < y.left + B.width ? M.current.style.left = `${y.left - B.width + y.width}px` : M.current.style.left = `${y.left}px`, y.top + B.height > window.innerHeight ? M.current.style.top = `${y.y - (y.height + B.height - 28)}px` : M.current.style.top = `${y.y + y.height}px`;
|
|
1499
1521
|
}
|
|
1500
1522
|
};
|
|
1501
|
-
|
|
1502
|
-
M.current &&
|
|
1503
|
-
}, [M,
|
|
1504
|
-
const
|
|
1505
|
-
return
|
|
1506
|
-
|
|
1523
|
+
I(() => {
|
|
1524
|
+
M.current && i.current && o && V();
|
|
1525
|
+
}, [M, i, w]), I(() => {
|
|
1526
|
+
const y = m == null ? void 0 : m.current;
|
|
1527
|
+
return y && y.addEventListener("scroll", V), window.addEventListener("scroll", V), () => {
|
|
1528
|
+
y && y.removeEventListener("scroll", V), window.removeEventListener("scroll", V);
|
|
1507
1529
|
};
|
|
1508
1530
|
}, []);
|
|
1509
|
-
const U = /* @__PURE__ */
|
|
1531
|
+
const U = /* @__PURE__ */ $(
|
|
1510
1532
|
"div",
|
|
1511
1533
|
{
|
|
1512
1534
|
className: "sa-calendar-wrapper",
|
|
1513
|
-
style: { height:
|
|
1514
|
-
ref:
|
|
1535
|
+
style: { height: o ? "auto" : "100%" },
|
|
1536
|
+
ref: o ? i : null,
|
|
1515
1537
|
children: [
|
|
1516
|
-
|
|
1538
|
+
o ? /* @__PURE__ */ a(
|
|
1517
1539
|
mn,
|
|
1518
1540
|
{
|
|
1519
|
-
value:
|
|
1520
|
-
onClick: () =>
|
|
1541
|
+
value: A(),
|
|
1542
|
+
onClick: () => L(!0),
|
|
1521
1543
|
onChange: () => {
|
|
1522
1544
|
},
|
|
1523
|
-
placeholder:
|
|
1545
|
+
placeholder: p,
|
|
1524
1546
|
disabled: l,
|
|
1525
|
-
size:
|
|
1547
|
+
size: g,
|
|
1526
1548
|
variant: n,
|
|
1527
|
-
status:
|
|
1549
|
+
status: F,
|
|
1528
1550
|
inputMode: "none",
|
|
1529
|
-
clearable:
|
|
1551
|
+
clearable: v,
|
|
1530
1552
|
onClear: () => e(void 0)
|
|
1531
1553
|
}
|
|
1532
1554
|
) : null,
|
|
1533
|
-
|
|
1555
|
+
w ? /* @__PURE__ */ $(
|
|
1534
1556
|
"div",
|
|
1535
1557
|
{
|
|
1536
|
-
className: `sa-calendar sa-calendar-size-${
|
|
1558
|
+
className: `sa-calendar sa-calendar-size-${g || "md"} ${o ? "" : "sa-calendar-no-input"}`,
|
|
1537
1559
|
ref: M,
|
|
1538
1560
|
children: [
|
|
1539
1561
|
/* @__PURE__ */ a(
|
|
1540
1562
|
xn,
|
|
1541
1563
|
{
|
|
1542
|
-
setViews:
|
|
1543
|
-
views:
|
|
1564
|
+
setViews: Y,
|
|
1565
|
+
views: T,
|
|
1544
1566
|
filter: t,
|
|
1545
1567
|
previewDate: C,
|
|
1546
1568
|
setPreviewDate: z,
|
|
1547
|
-
isComponentVisible:
|
|
1569
|
+
isComponentVisible: w
|
|
1548
1570
|
}
|
|
1549
1571
|
),
|
|
1550
|
-
/* @__PURE__ */ a("div", { className: "sa-calendar-body", children:
|
|
1572
|
+
/* @__PURE__ */ a("div", { className: "sa-calendar-body", children: T === "days" ? /* @__PURE__ */ a(
|
|
1551
1573
|
vn,
|
|
1552
1574
|
{
|
|
1553
1575
|
date: E,
|
|
1554
|
-
setDate:
|
|
1576
|
+
setDate: S,
|
|
1555
1577
|
previewDate: C,
|
|
1556
1578
|
setPreviewDate: z,
|
|
1557
|
-
setIsComponentVisible:
|
|
1558
|
-
input:
|
|
1559
|
-
minDate:
|
|
1579
|
+
setIsComponentVisible: L,
|
|
1580
|
+
input: o,
|
|
1581
|
+
minDate: u,
|
|
1560
1582
|
maxDate: d,
|
|
1561
1583
|
onChange: e
|
|
1562
1584
|
}
|
|
1563
|
-
) :
|
|
1585
|
+
) : T === "months" ? /* @__PURE__ */ a(
|
|
1564
1586
|
yn,
|
|
1565
1587
|
{
|
|
1566
1588
|
date: E,
|
|
1567
|
-
setDate:
|
|
1589
|
+
setDate: S,
|
|
1568
1590
|
previewDate: C,
|
|
1569
1591
|
setPreviewDate: z,
|
|
1570
1592
|
filter: t,
|
|
1571
|
-
setViews:
|
|
1593
|
+
setViews: Y,
|
|
1572
1594
|
onChange: e,
|
|
1573
|
-
minDate:
|
|
1595
|
+
minDate: u,
|
|
1574
1596
|
maxDate: d,
|
|
1575
|
-
input:
|
|
1597
|
+
input: o
|
|
1576
1598
|
}
|
|
1577
1599
|
) : /* @__PURE__ */ a(
|
|
1578
1600
|
wn,
|
|
1579
1601
|
{
|
|
1580
1602
|
date: E,
|
|
1581
|
-
setDate:
|
|
1603
|
+
setDate: S,
|
|
1582
1604
|
previewDate: C,
|
|
1583
1605
|
setPreviewDate: z,
|
|
1584
1606
|
filter: t,
|
|
1585
|
-
setViews:
|
|
1607
|
+
setViews: Y,
|
|
1586
1608
|
onChange: e,
|
|
1587
|
-
minDate:
|
|
1609
|
+
minDate: u,
|
|
1588
1610
|
maxDate: d,
|
|
1589
|
-
input:
|
|
1611
|
+
input: o
|
|
1590
1612
|
}
|
|
1591
1613
|
) })
|
|
1592
1614
|
]
|
|
@@ -1599,13 +1621,13 @@ const Mn = Z(
|
|
|
1599
1621
|
sn,
|
|
1600
1622
|
{
|
|
1601
1623
|
label: D,
|
|
1602
|
-
labelPosition:
|
|
1603
|
-
required:
|
|
1604
|
-
optional:
|
|
1605
|
-
description:
|
|
1606
|
-
helperText:
|
|
1624
|
+
labelPosition: b,
|
|
1625
|
+
required: f,
|
|
1626
|
+
optional: s,
|
|
1627
|
+
description: x,
|
|
1628
|
+
helperText: N,
|
|
1607
1629
|
errorText: h,
|
|
1608
|
-
fullWidth:
|
|
1630
|
+
fullWidth: k,
|
|
1609
1631
|
children: U
|
|
1610
1632
|
}
|
|
1611
1633
|
);
|
|
@@ -1615,48 +1637,48 @@ const Mn = Z(
|
|
|
1615
1637
|
value: r,
|
|
1616
1638
|
onChange: e,
|
|
1617
1639
|
filter: t,
|
|
1618
|
-
input:
|
|
1640
|
+
input: o = !0,
|
|
1619
1641
|
rangedDate: l,
|
|
1620
|
-
disabled:
|
|
1642
|
+
disabled: u,
|
|
1621
1643
|
minDate: d,
|
|
1622
|
-
maxDate:
|
|
1623
|
-
placeholder:
|
|
1644
|
+
maxDate: p,
|
|
1645
|
+
placeholder: g,
|
|
1624
1646
|
size: n,
|
|
1625
|
-
variant:
|
|
1626
|
-
status:
|
|
1627
|
-
clearable:
|
|
1647
|
+
variant: c,
|
|
1648
|
+
status: v,
|
|
1649
|
+
clearable: k,
|
|
1628
1650
|
fullWidth: D,
|
|
1629
|
-
label:
|
|
1630
|
-
labelPosition:
|
|
1631
|
-
required:
|
|
1632
|
-
optional:
|
|
1633
|
-
description:
|
|
1651
|
+
label: b,
|
|
1652
|
+
labelPosition: f,
|
|
1653
|
+
required: s,
|
|
1654
|
+
optional: x,
|
|
1655
|
+
description: N,
|
|
1634
1656
|
helperText: h,
|
|
1635
|
-
errorText:
|
|
1636
|
-
},
|
|
1637
|
-
const
|
|
1657
|
+
errorText: m
|
|
1658
|
+
}, F) => {
|
|
1659
|
+
const i = {
|
|
1638
1660
|
onChange: e,
|
|
1639
1661
|
value: r,
|
|
1640
|
-
input:
|
|
1662
|
+
input: o,
|
|
1641
1663
|
filter: t,
|
|
1642
|
-
disabled:
|
|
1664
|
+
disabled: u,
|
|
1643
1665
|
minDate: d,
|
|
1644
|
-
maxDate:
|
|
1645
|
-
placeholder:
|
|
1666
|
+
maxDate: p,
|
|
1667
|
+
placeholder: g,
|
|
1646
1668
|
size: n,
|
|
1647
|
-
variant:
|
|
1648
|
-
status:
|
|
1649
|
-
clearable:
|
|
1669
|
+
variant: c,
|
|
1670
|
+
status: v,
|
|
1671
|
+
clearable: k,
|
|
1650
1672
|
fullWidth: D,
|
|
1651
|
-
label:
|
|
1652
|
-
labelPosition:
|
|
1653
|
-
required:
|
|
1654
|
-
optional:
|
|
1655
|
-
description:
|
|
1673
|
+
label: b,
|
|
1674
|
+
labelPosition: f,
|
|
1675
|
+
required: s,
|
|
1676
|
+
optional: x,
|
|
1677
|
+
description: N,
|
|
1656
1678
|
helperText: h,
|
|
1657
|
-
errorText:
|
|
1679
|
+
errorText: m
|
|
1658
1680
|
};
|
|
1659
|
-
return /* @__PURE__ */ a(nn, { children: l ? /* @__PURE__ */ a(fn, { ...
|
|
1681
|
+
return /* @__PURE__ */ a(nn, { children: l ? /* @__PURE__ */ a(fn, { ...i, ref: F }) : /* @__PURE__ */ a(Mn, { ...i, ref: F }) });
|
|
1660
1682
|
}
|
|
1661
1683
|
);
|
|
1662
1684
|
export {
|