meticulous-ui 3.6.1 → 3.6.2
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/components/Button/Button.js +65 -44
- package/components/DatePicker/DatePicker.js +148 -122
- package/components/Dropdown/Dropdown.js +167 -128
- package/components/Input/Checkbox/Checkbox.js +61 -40
- package/components/Input/FileUploader/FileUploader.js +90 -61
- package/components/Input/RadioGroup/RadioGroup.js +54 -29
- package/components/Loader/Loader.js +28 -15
- package/components/Modal/Modal.js +69 -46
- package/components/OtpInput/OtpInput.js +48 -37
- package/components/RootComponent/RootComponent.js +9 -4
- package/components/Selectbox/Selectbox.js +162 -123
- package/components/Shimmer/Shimmer.js +27 -16
- package/components/Spinner/Spinner.js +18 -11
- package/components/Timer/Timer.js +113 -86
- package/components/Toast/Toast.js +90 -59
- package/components/Typography/Headings/H1.js +10 -3
- package/components/Typography/Headings/H2.js +10 -3
- package/components/Typography/Headings/H3.js +10 -3
- package/components/Typography/Headings/H4.js +10 -3
- package/components/Typography/Headings/H5.js +10 -3
- package/components/Typography/Headings/H6.js +10 -3
- package/components/Typography/P/P.js +13 -4
- package/package.json +1 -1
|
@@ -1,65 +1,86 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { blue as
|
|
6
|
-
import { ButtonWrapper as K, SpinnerWrapper as R, Content as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { MEDIUM as
|
|
11
|
-
|
|
1
|
+
import { jsxs as I, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as L } from "react";
|
|
3
|
+
import v from "../Spinner/Spinner.js";
|
|
4
|
+
import T from "../../colors/colorMap.js";
|
|
5
|
+
import { blue as g } from "../../colors/blue.js";
|
|
6
|
+
import { ButtonWrapper as K, SpinnerWrapper as R, Content as z, ButtonContainer as B } from "./styles.js";
|
|
7
|
+
import E from "../Ripple/Ripple.js";
|
|
8
|
+
import P from "../../colors/white.js";
|
|
9
|
+
import S from "../../colors/grey.js";
|
|
10
|
+
import { MEDIUM as j, SIZE as k } from "./constants.js";
|
|
11
|
+
import o from "../../_virtual/index.js";
|
|
12
|
+
const M = ({ theme: t, children: n }) => /* @__PURE__ */ e(E, { rippleColor: t.m100, children: n }), W = (t) => {
|
|
12
13
|
const {
|
|
13
|
-
children:
|
|
14
|
-
theme:
|
|
15
|
-
size: u =
|
|
16
|
-
width:
|
|
17
|
-
leftIcon:
|
|
14
|
+
children: n,
|
|
15
|
+
theme: l = g,
|
|
16
|
+
size: u = j,
|
|
17
|
+
width: s,
|
|
18
|
+
leftIcon: O,
|
|
18
19
|
rightIcon: U,
|
|
19
|
-
isLoading:
|
|
20
|
-
textColor:
|
|
20
|
+
isLoading: r,
|
|
21
|
+
textColor: d,
|
|
21
22
|
onKeyDown: w,
|
|
22
|
-
...
|
|
23
|
-
} = t || {},
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
|
|
23
|
+
...y
|
|
24
|
+
} = t || {}, m = L(0), C = (i) => {
|
|
25
|
+
if (i.key === "Enter" || i.key === " ") {
|
|
26
|
+
const f = Date.now();
|
|
27
|
+
if (f - m.current < 500) {
|
|
28
|
+
i.preventDefault(), i.stopPropagation();
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
m.current = f;
|
|
31
32
|
}
|
|
32
|
-
w?.(
|
|
33
|
-
}, { m400:
|
|
33
|
+
w?.(i);
|
|
34
|
+
}, { m400: $, m500: b, m600: x } = T[l] ?? g, { height: p, width: c, font: D } = k[u] || {}, h = ["white", "yellow"].includes(l) ? S.m600 : P, a = /* @__PURE__ */ I(
|
|
34
35
|
K,
|
|
35
36
|
{
|
|
36
37
|
type: "button",
|
|
37
|
-
...
|
|
38
|
-
onKeyDown:
|
|
39
|
-
$hoverColor:
|
|
40
|
-
$activeColor:
|
|
41
|
-
$selectedColor:
|
|
42
|
-
$height:
|
|
43
|
-
$width:
|
|
38
|
+
...y,
|
|
39
|
+
onKeyDown: C,
|
|
40
|
+
$hoverColor: b,
|
|
41
|
+
$activeColor: x,
|
|
42
|
+
$selectedColor: $,
|
|
43
|
+
$height: p,
|
|
44
|
+
$width: s || c,
|
|
44
45
|
disabled: t.disabled,
|
|
45
|
-
$isLoading:
|
|
46
|
+
$isLoading: r,
|
|
46
47
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ e(R, { $isLoading: r, children: /* @__PURE__ */ e(v, { size: "small", color: d || h }) }),
|
|
49
|
+
/* @__PURE__ */ e(z, { $isLoading: r, $textColor: d || h, $font: D, children: n })
|
|
49
50
|
]
|
|
50
51
|
}
|
|
51
52
|
);
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
53
|
+
return /* @__PURE__ */ e(
|
|
54
|
+
B,
|
|
54
55
|
{
|
|
55
|
-
$height:
|
|
56
|
-
$width:
|
|
56
|
+
$height: p,
|
|
57
|
+
$width: s || c,
|
|
57
58
|
disabled: t.disabled,
|
|
58
|
-
$isLoading:
|
|
59
|
-
children:
|
|
59
|
+
$isLoading: r,
|
|
60
|
+
children: r ? a : /* @__PURE__ */ e(M, { theme: l, children: a })
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
63
|
};
|
|
64
|
+
W.propTypes = {
|
|
65
|
+
/** Button label or content */
|
|
66
|
+
children: o.node,
|
|
67
|
+
/** Color theme key from the meticulous-ui color map. Defaults to `'blue'` */
|
|
68
|
+
theme: o.string,
|
|
69
|
+
/** Button size variant: `'small'`, `'medium'`, `'large'`, or `'ex-large'` */
|
|
70
|
+
size: o.string,
|
|
71
|
+
/** Override the button width */
|
|
72
|
+
width: o.oneOfType([o.string, o.number]),
|
|
73
|
+
/** Icon component rendered to the left of the label */
|
|
74
|
+
leftIcon: o.elementType,
|
|
75
|
+
/** Icon component rendered to the right of the label */
|
|
76
|
+
rightIcon: o.elementType,
|
|
77
|
+
/** Shows a spinner and disables interaction while true */
|
|
78
|
+
isLoading: o.bool,
|
|
79
|
+
/** Override the label and icon color */
|
|
80
|
+
textColor: o.string,
|
|
81
|
+
/** Disables the button */
|
|
82
|
+
disabled: o.bool
|
|
83
|
+
};
|
|
63
84
|
export {
|
|
64
|
-
|
|
85
|
+
W as default
|
|
65
86
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as Ce, useState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { jsxs as s, jsx as n, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as Ce, useState as d, useCallback as Le, useEffect as Ge } from "react";
|
|
3
|
+
import c from "../../_virtual/index.js";
|
|
4
|
+
import Me from "../../colors/colorMap.js";
|
|
5
|
+
import { blue as $e } from "../../colors/blue.js";
|
|
6
|
+
import { MODE as t, MONTHS as U, DAYS_SHORT as be } from "./constants.js";
|
|
7
|
+
import { buildCalendarGrid as we, formatDate as H, isToday as Te, isSameDay as X, isRangeStart as Ye, isRangeEnd as Oe, isInRange as Ie } from "./utils.js";
|
|
8
|
+
import { Wrapper as Pe, SelectedDisplay as _e, DateChip as B, RangeArrow as xe, ModeToggle as He, ModeBtn as Z, Nav as Be, NavBtn as ee, MonthLabel as ne, Footer as je, ActionBtn as re, Grid as Fe, DayHeader as We, DayCell as Ve, DayBtn as qe, PickerGrid as ze, PickerItem as te, YearScroll as Je } from "./styles.js";
|
|
9
|
+
const Ke = () => /* @__PURE__ */ n(
|
|
9
10
|
"svg",
|
|
10
11
|
{
|
|
11
12
|
width: "16",
|
|
@@ -18,7 +19,7 @@ const qe = () => /* @__PURE__ */ n(
|
|
|
18
19
|
strokeLinejoin: "round",
|
|
19
20
|
children: /* @__PURE__ */ n("polyline", { points: "15 18 9 12 15 6" })
|
|
20
21
|
}
|
|
21
|
-
),
|
|
22
|
+
), Qe = () => /* @__PURE__ */ n(
|
|
22
23
|
"svg",
|
|
23
24
|
{
|
|
24
25
|
width: "16",
|
|
@@ -31,193 +32,218 @@ const qe = () => /* @__PURE__ */ n(
|
|
|
31
32
|
strokeLinejoin: "round",
|
|
32
33
|
children: /* @__PURE__ */ n("polyline", { points: "9 18 15 12 9 6" })
|
|
33
34
|
}
|
|
34
|
-
),
|
|
35
|
-
{ length:
|
|
36
|
-
(L,
|
|
37
|
-
),
|
|
35
|
+
), o = { CALENDAR: "calendar", MONTH: "month", YEAR: "year" }, Ue = /* @__PURE__ */ new Date(), le = 1924, Xe = Ue.getFullYear() + 20, Ze = Array.from(
|
|
36
|
+
{ length: Xe - le + 1 },
|
|
37
|
+
(L, f) => le + f
|
|
38
|
+
), en = ({
|
|
38
39
|
theme: L = "blue",
|
|
39
|
-
mode:
|
|
40
|
-
value:
|
|
41
|
-
rangeValue:
|
|
42
|
-
onChange:
|
|
43
|
-
minDate:
|
|
44
|
-
maxDate:
|
|
40
|
+
mode: f = t.SINGLE,
|
|
41
|
+
value: oe,
|
|
42
|
+
rangeValue: j,
|
|
43
|
+
onChange: m,
|
|
44
|
+
minDate: G,
|
|
45
|
+
maxDate: M,
|
|
45
46
|
showModeToggle: ie = !0,
|
|
46
|
-
showFooter:
|
|
47
|
+
showFooter: $ = !0,
|
|
48
|
+
...se
|
|
47
49
|
}) => {
|
|
48
|
-
const
|
|
49
|
-
(e) => !!(!e ||
|
|
50
|
-
[
|
|
51
|
-
),
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
if (!(!e ||
|
|
57
|
-
if (
|
|
58
|
-
|
|
50
|
+
const b = Ce(() => Me[L] ?? $e, [L]), i = b.m500, w = b.m700, N = b.m100, T = { $primary: i, $primaryDark: w, $primaryLight: N }, F = /* @__PURE__ */ new Date(), [l, ce] = d(f), [Y, O] = d(F.getFullYear()), [g, A] = d(F.getMonth()), [p, S] = d(o.CALENDAR), [R, I] = d(oe ?? null), [r, P] = d(j?.[0] ?? null), [h, k] = d(j?.[1] ?? null), [D, v] = d(null), [y, C] = d(!1), ae = we(Y, g), W = Le(
|
|
51
|
+
(e) => !!(!e || G && e < G || M && e > M),
|
|
52
|
+
[G, M]
|
|
53
|
+
), de = () => {
|
|
54
|
+
g === 0 ? (A(11), O((e) => e - 1)) : A((e) => e - 1);
|
|
55
|
+
}, he = () => {
|
|
56
|
+
g === 11 ? (A(0), O((e) => e + 1)) : A((e) => e + 1);
|
|
57
|
+
}, ue = (e) => {
|
|
58
|
+
if (!(!e || W(e))) {
|
|
59
|
+
if (l === t.SINGLE) {
|
|
60
|
+
I(e), $ || m?.(e);
|
|
59
61
|
return;
|
|
60
62
|
}
|
|
61
|
-
!
|
|
63
|
+
!y || !r ? (P(e), k(null), C(!0)) : (k(e), C(!1), $ || m?.([
|
|
62
64
|
e <= r ? e : r,
|
|
63
65
|
e <= r ? r : e
|
|
64
66
|
]));
|
|
65
67
|
}
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
}, _ = (e) => {
|
|
69
|
+
ce(e), I(null), P(null), k(null), C(!1), v(null);
|
|
70
|
+
};
|
|
71
|
+
Ge(() => {
|
|
72
|
+
_(f);
|
|
73
|
+
}, [f]);
|
|
74
|
+
const pe = () => {
|
|
75
|
+
if (l === t.SINGLE)
|
|
76
|
+
m?.(R);
|
|
77
|
+
else if (r && h) {
|
|
78
|
+
const [e, E] = r <= h ? [r, h] : [h, r];
|
|
79
|
+
m?.([e, E]);
|
|
74
80
|
}
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
r ? r <= (
|
|
79
|
-
),
|
|
80
|
-
|
|
81
|
+
}, Ee = () => {
|
|
82
|
+
I(null), P(null), k(null), C(!1), v(null), m?.(l === t.SINGLE ? null : [null, null]);
|
|
83
|
+
}, u = y && D ? D : h, V = (e) => l === t.RANGE && Ye(e, r, u), q = (e) => l === t.RANGE && Oe(e, r, u), fe = (e) => l === t.RANGE && Ie(e, r, u), me = (e) => l === t.SINGLE ? X(e, R) : V(e) || q(e), z = l === t.SINGLE ? H(R) : H(
|
|
84
|
+
r ? r <= (u ?? r) ? r : u : null
|
|
85
|
+
), ge = l === t.RANGE ? H(u ? u >= r ? u : r : null) : null, Ae = l === t.SINGLE ? !R : !r || !h, Re = () => /* @__PURE__ */ n(ze, { children: U.map((e, E) => /* @__PURE__ */ n(
|
|
86
|
+
te,
|
|
81
87
|
{
|
|
82
|
-
$active:
|
|
83
|
-
...
|
|
88
|
+
$active: E === g,
|
|
89
|
+
...T,
|
|
84
90
|
onClick: () => {
|
|
85
|
-
|
|
91
|
+
A(E), S(o.CALENDAR);
|
|
86
92
|
},
|
|
87
93
|
children: e.slice(0, 3)
|
|
88
94
|
},
|
|
89
95
|
e
|
|
90
|
-
)) }),
|
|
91
|
-
|
|
96
|
+
)) }), Ne = () => /* @__PURE__ */ n(Je, { children: Ze.map((e) => /* @__PURE__ */ n(
|
|
97
|
+
te,
|
|
92
98
|
{
|
|
93
|
-
$active: e ===
|
|
94
|
-
...
|
|
99
|
+
$active: e === Y,
|
|
100
|
+
...T,
|
|
95
101
|
onClick: () => {
|
|
96
|
-
|
|
102
|
+
O(e), S(o.CALENDAR);
|
|
97
103
|
},
|
|
98
104
|
children: e
|
|
99
105
|
},
|
|
100
106
|
e
|
|
101
|
-
)) }),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
107
|
+
)) }), Se = () => /* @__PURE__ */ s(Fe, { children: [
|
|
108
|
+
be.map((e) => /* @__PURE__ */ n(We, { children: e }, e)),
|
|
109
|
+
ae.map((e, E) => {
|
|
110
|
+
const a = !e, J = W(e), x = !a && me(e), ke = !a && Te(e), K = !a && V(e), Q = !a && q(e), De = !a && fe(e), ve = !a && D && X(e, D);
|
|
105
111
|
return /* @__PURE__ */ n(
|
|
106
|
-
|
|
112
|
+
Ve,
|
|
107
113
|
{
|
|
108
|
-
$inRange:
|
|
109
|
-
$rangeStart:
|
|
110
|
-
$rangeEnd:
|
|
111
|
-
$primaryLight:
|
|
114
|
+
$inRange: De || K || Q,
|
|
115
|
+
$rangeStart: K,
|
|
116
|
+
$rangeEnd: Q,
|
|
117
|
+
$primaryLight: N,
|
|
112
118
|
children: /* @__PURE__ */ n(
|
|
113
|
-
|
|
119
|
+
qe,
|
|
114
120
|
{
|
|
115
|
-
$empty:
|
|
116
|
-
$selected:
|
|
117
|
-
$today:
|
|
118
|
-
$hovered:
|
|
119
|
-
disabled:
|
|
120
|
-
...
|
|
121
|
-
onClick: () =>
|
|
122
|
-
onMouseEnter: () => !
|
|
123
|
-
onMouseLeave: () =>
|
|
121
|
+
$empty: a,
|
|
122
|
+
$selected: x,
|
|
123
|
+
$today: ke,
|
|
124
|
+
$hovered: ve && !x,
|
|
125
|
+
disabled: J,
|
|
126
|
+
...T,
|
|
127
|
+
onClick: () => ue(e),
|
|
128
|
+
onMouseEnter: () => !a && v(e),
|
|
129
|
+
onMouseLeave: () => v(null),
|
|
124
130
|
"aria-label": e ? e.toDateString() : void 0,
|
|
125
|
-
"aria-pressed":
|
|
126
|
-
tabIndex:
|
|
131
|
+
"aria-pressed": x,
|
|
132
|
+
tabIndex: a || J ? -1 : 0,
|
|
127
133
|
children: e?.getDate()
|
|
128
134
|
}
|
|
129
135
|
)
|
|
130
136
|
},
|
|
131
|
-
|
|
137
|
+
E
|
|
132
138
|
);
|
|
133
139
|
})
|
|
134
140
|
] });
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */ n(
|
|
137
|
-
/* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ s(Pe, { ...se, children: [
|
|
142
|
+
/* @__PURE__ */ n(_e, { children: l === t.RANGE ? /* @__PURE__ */ s(ye, { children: [
|
|
143
|
+
/* @__PURE__ */ s(B, { $active: y || !r && !h, $primary: i, children: [
|
|
138
144
|
/* @__PURE__ */ n("span", { children: "From" }),
|
|
139
|
-
|
|
145
|
+
z
|
|
140
146
|
] }),
|
|
141
|
-
/* @__PURE__ */ n(
|
|
142
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ n(xe, { children: "→" }),
|
|
148
|
+
/* @__PURE__ */ s(B, { $active: !y && !!h, $primary: i, children: [
|
|
143
149
|
/* @__PURE__ */ n("span", { children: "To" }),
|
|
144
|
-
|
|
150
|
+
ge
|
|
145
151
|
] })
|
|
146
|
-
] }) : /* @__PURE__ */
|
|
152
|
+
] }) : /* @__PURE__ */ s(B, { $active: !!R, $primary: i, style: { flex: "none", width: "100%" }, children: [
|
|
147
153
|
/* @__PURE__ */ n("span", { children: "Selected" }),
|
|
148
|
-
|
|
154
|
+
z
|
|
149
155
|
] }) }),
|
|
150
|
-
ie && /* @__PURE__ */
|
|
156
|
+
ie && /* @__PURE__ */ s(He, { children: [
|
|
151
157
|
/* @__PURE__ */ n(
|
|
152
|
-
|
|
158
|
+
Z,
|
|
153
159
|
{
|
|
154
|
-
$active:
|
|
155
|
-
$primary:
|
|
156
|
-
onClick: () =>
|
|
160
|
+
$active: l === t.SINGLE,
|
|
161
|
+
$primary: i,
|
|
162
|
+
onClick: () => _(t.SINGLE),
|
|
157
163
|
children: "Single"
|
|
158
164
|
}
|
|
159
165
|
),
|
|
160
166
|
/* @__PURE__ */ n(
|
|
161
|
-
|
|
167
|
+
Z,
|
|
162
168
|
{
|
|
163
|
-
$active:
|
|
164
|
-
$primary:
|
|
165
|
-
onClick: () =>
|
|
169
|
+
$active: l === t.RANGE,
|
|
170
|
+
$primary: i,
|
|
171
|
+
onClick: () => _(t.RANGE),
|
|
166
172
|
children: "Range"
|
|
167
173
|
}
|
|
168
174
|
)
|
|
169
175
|
] }),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */ n(
|
|
172
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ s(Be, { children: [
|
|
177
|
+
/* @__PURE__ */ n(ee, { $primary: i, onClick: de, "aria-label": "Previous month", children: /* @__PURE__ */ n(Ke, {}) }),
|
|
178
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", gap: 4 }, children: [
|
|
173
179
|
/* @__PURE__ */ n(
|
|
174
|
-
|
|
180
|
+
ne,
|
|
175
181
|
{
|
|
176
|
-
$primary:
|
|
177
|
-
onClick: () =>
|
|
178
|
-
children:
|
|
182
|
+
$primary: i,
|
|
183
|
+
onClick: () => S(p === o.MONTH ? o.CALENDAR : o.MONTH),
|
|
184
|
+
children: U[g]
|
|
179
185
|
}
|
|
180
186
|
),
|
|
181
187
|
/* @__PURE__ */ n(
|
|
182
|
-
|
|
188
|
+
ne,
|
|
183
189
|
{
|
|
184
|
-
$primary:
|
|
185
|
-
onClick: () =>
|
|
186
|
-
children:
|
|
190
|
+
$primary: i,
|
|
191
|
+
onClick: () => S(p === o.YEAR ? o.CALENDAR : o.YEAR),
|
|
192
|
+
children: Y
|
|
187
193
|
}
|
|
188
194
|
)
|
|
189
195
|
] }),
|
|
190
|
-
/* @__PURE__ */ n(
|
|
196
|
+
/* @__PURE__ */ n(ee, { $primary: i, onClick: he, "aria-label": "Next month", children: /* @__PURE__ */ n(Qe, {}) })
|
|
191
197
|
] }),
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
p === o.CALENDAR && Se(),
|
|
199
|
+
p === o.MONTH && Re(),
|
|
200
|
+
p === o.YEAR && Ne(),
|
|
201
|
+
$ && p === o.CALENDAR && /* @__PURE__ */ s(je, { children: [
|
|
196
202
|
/* @__PURE__ */ n(
|
|
197
|
-
|
|
203
|
+
re,
|
|
198
204
|
{
|
|
199
|
-
$primary:
|
|
200
|
-
$primaryDark:
|
|
201
|
-
$primaryLight:
|
|
202
|
-
onClick:
|
|
205
|
+
$primary: i,
|
|
206
|
+
$primaryDark: w,
|
|
207
|
+
$primaryLight: N,
|
|
208
|
+
onClick: Ee,
|
|
203
209
|
children: "Clear"
|
|
204
210
|
}
|
|
205
211
|
),
|
|
206
212
|
/* @__PURE__ */ n(
|
|
207
|
-
|
|
213
|
+
re,
|
|
208
214
|
{
|
|
209
215
|
$isPrimary: !0,
|
|
210
|
-
$primary:
|
|
211
|
-
$primaryDark:
|
|
212
|
-
$primaryLight:
|
|
213
|
-
disabled:
|
|
214
|
-
onClick:
|
|
216
|
+
$primary: i,
|
|
217
|
+
$primaryDark: w,
|
|
218
|
+
$primaryLight: N,
|
|
219
|
+
disabled: Ae,
|
|
220
|
+
onClick: pe,
|
|
215
221
|
children: "Apply"
|
|
216
222
|
}
|
|
217
223
|
)
|
|
218
224
|
] })
|
|
219
225
|
] });
|
|
220
226
|
};
|
|
227
|
+
en.propTypes = {
|
|
228
|
+
/** Color theme key from the meticulous-ui color map */
|
|
229
|
+
theme: c.string,
|
|
230
|
+
/** Initial selection mode. Can be switched via the built-in toggle unless `showModeToggle` is false. */
|
|
231
|
+
mode: c.oneOf(["single", "range"]),
|
|
232
|
+
/** Controlled selected date for single mode */
|
|
233
|
+
value: c.instanceOf(Date),
|
|
234
|
+
/** Controlled selected range for range mode — `[start, end]` */
|
|
235
|
+
rangeValue: c.arrayOf(c.instanceOf(Date)),
|
|
236
|
+
/** Called with a `Date` in single mode or `[Date, Date]` tuple in range mode */
|
|
237
|
+
onChange: c.func,
|
|
238
|
+
/** Dates before this value are disabled */
|
|
239
|
+
minDate: c.instanceOf(Date),
|
|
240
|
+
/** Dates after this value are disabled */
|
|
241
|
+
maxDate: c.instanceOf(Date),
|
|
242
|
+
/** Shows or hides the Single / Range mode toggle pill */
|
|
243
|
+
showModeToggle: c.bool,
|
|
244
|
+
/** Shows or hides the Clear / Apply footer. When false, `onChange` fires immediately on each click. */
|
|
245
|
+
showFooter: c.bool
|
|
246
|
+
};
|
|
221
247
|
export {
|
|
222
|
-
|
|
248
|
+
en as default
|
|
223
249
|
};
|