meticulous-ui 3.6.0 → 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/README.md +27 -27
- 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,131 +1,132 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as v, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useId as le, useRef as O, useMemo as ae, useEffect as b, useLayoutEffect as de, useCallback as ue, createElement as pe } from "react";
|
|
3
|
+
import r from "../../_virtual/index.js";
|
|
3
4
|
import E from "../../colors/grey.js";
|
|
4
5
|
import fe from "../MenuItem/MenuItem.js";
|
|
5
|
-
import
|
|
6
|
-
import { blue as
|
|
6
|
+
import me from "../../colors/colorMap.js";
|
|
7
|
+
import { blue as he } from "../../colors/blue.js";
|
|
7
8
|
import j from "../Spinner/Spinner.js";
|
|
8
|
-
import { DropdownWrapper as
|
|
9
|
-
const
|
|
10
|
-
if (typeof
|
|
11
|
-
if (
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
return
|
|
9
|
+
import { DropdownWrapper as be, Box as ge, PWrapper as we, ChevronDownWrapper as xe, OptionWrapper as Ie, SearchContainer as ye, SearchIcon as Ce, SearchInput as ke, OptionsList as ve, LoadMoreSentinel as Se, SpinnerWrapper as Oe } from "./styles.js";
|
|
10
|
+
const $e = (o) => {
|
|
11
|
+
if (typeof o != "string") return o;
|
|
12
|
+
if (o.endsWith("px")) return parseFloat(o);
|
|
13
|
+
if (o.endsWith("rem")) {
|
|
14
|
+
const D = parseFloat(o), i = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
15
|
+
return D * i;
|
|
15
16
|
}
|
|
16
|
-
return parseFloat(
|
|
17
|
-
},
|
|
18
|
-
options:
|
|
19
|
-
onChange:
|
|
20
|
-
value:
|
|
21
|
-
width:
|
|
17
|
+
return parseFloat(o);
|
|
18
|
+
}, Ee = ({
|
|
19
|
+
options: o,
|
|
20
|
+
onChange: D,
|
|
21
|
+
value: i,
|
|
22
|
+
width: g = "32rem",
|
|
22
23
|
menuHeight: F = "32rem",
|
|
23
24
|
placeholder: K,
|
|
24
25
|
theme: Q = "blue",
|
|
25
26
|
isLoading: w,
|
|
26
27
|
isDisabled: x,
|
|
27
|
-
loaderColor:
|
|
28
|
-
searchable:
|
|
28
|
+
loaderColor: R,
|
|
29
|
+
searchable: I = !1,
|
|
29
30
|
onLoadMore: u,
|
|
30
|
-
hasMore:
|
|
31
|
-
isLoadingMore:
|
|
32
|
-
searchPh:
|
|
31
|
+
hasMore: y = !1,
|
|
32
|
+
isLoadingMore: p = !1,
|
|
33
|
+
searchPh: W = "Search...",
|
|
33
34
|
...U
|
|
34
35
|
}) => {
|
|
35
|
-
const [
|
|
36
|
-
e !==
|
|
37
|
-
},
|
|
38
|
-
if (!
|
|
39
|
-
const e =
|
|
40
|
-
return
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
const e =
|
|
45
|
-
if (e !== -1 && !
|
|
46
|
-
|
|
36
|
+
const [n, f] = S(!1), [q, P] = S(!1), [N, G] = S("bottom"), [C, A] = S(""), [c, m] = S(-1), $ = le(), h = O(null), k = O(null), z = O(null), B = O(null), J = O(!0), X = () => !w && !x && f((e) => !e), H = (e) => {
|
|
37
|
+
e !== i && (D(e), f(!1));
|
|
38
|
+
}, l = ae(() => {
|
|
39
|
+
if (!I || !C.trim()) return o;
|
|
40
|
+
const e = C.toLowerCase();
|
|
41
|
+
return o.filter(({ label: t }) => t.toLowerCase().includes(e));
|
|
42
|
+
}, [o, C, I]);
|
|
43
|
+
b(() => {
|
|
44
|
+
if (n) {
|
|
45
|
+
const e = l.findIndex((t) => t.value === i);
|
|
46
|
+
if (e !== -1 && !l[e].disabled)
|
|
47
|
+
m(e);
|
|
47
48
|
else {
|
|
48
|
-
const t =
|
|
49
|
-
|
|
49
|
+
const t = l.findIndex((s) => !s.disabled);
|
|
50
|
+
m(t);
|
|
50
51
|
}
|
|
51
52
|
} else
|
|
52
|
-
A(""),
|
|
53
|
-
}, [
|
|
54
|
-
if (
|
|
55
|
-
const e =
|
|
53
|
+
A(""), m(-1);
|
|
54
|
+
}, [n, C, l, i]), b(() => {
|
|
55
|
+
if (n && c !== -1 && k.current) {
|
|
56
|
+
const e = k.current.children[c];
|
|
56
57
|
e && e.scrollIntoView({
|
|
57
58
|
block: "nearest",
|
|
58
59
|
behavior: "auto"
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
|
-
}, [c,
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
|
|
65
|
-
}, [
|
|
62
|
+
}, [c, n]), b(() => {
|
|
63
|
+
n && I && z.current && z.current.focus();
|
|
64
|
+
}, [n, I]), b(() => {
|
|
65
|
+
n || (J.current = !0);
|
|
66
|
+
}, [n]), b(() => {
|
|
66
67
|
const e = (t) => {
|
|
67
|
-
|
|
68
|
+
h.current && !h.current.contains(t.target) && f(!1);
|
|
68
69
|
};
|
|
69
70
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
70
|
-
}, []),
|
|
71
|
-
if (
|
|
72
|
-
const e =
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
}, []), de(() => {
|
|
72
|
+
if (n && k.current && h.current) {
|
|
73
|
+
const e = h.current.getBoundingClientRect(), t = window.innerHeight, s = $e(F), a = t - e.bottom;
|
|
74
|
+
G(
|
|
75
|
+
a < s + 8 && e.top > a ? "top" : "bottom"
|
|
75
76
|
);
|
|
76
77
|
}
|
|
77
|
-
}, [
|
|
78
|
-
const
|
|
78
|
+
}, [n, F]);
|
|
79
|
+
const Y = (e) => {
|
|
79
80
|
let t = e + 1;
|
|
80
|
-
for (; t <
|
|
81
|
-
if (!
|
|
81
|
+
for (; t < l.length; ) {
|
|
82
|
+
if (!l[t].disabled) return t;
|
|
82
83
|
t++;
|
|
83
84
|
}
|
|
84
85
|
return e;
|
|
85
|
-
},
|
|
86
|
+
}, Z = (e) => {
|
|
86
87
|
let t = e - 1;
|
|
87
88
|
for (; t >= 0; ) {
|
|
88
|
-
if (!
|
|
89
|
+
if (!l[t].disabled) return t;
|
|
89
90
|
t--;
|
|
90
91
|
}
|
|
91
92
|
return e;
|
|
92
|
-
},
|
|
93
|
+
}, _ = (e) => {
|
|
93
94
|
if (!(w || x)) {
|
|
94
|
-
if (!
|
|
95
|
+
if (!n) {
|
|
95
96
|
(e.key === " " || e.key === "Enter" || e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), f(!0));
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
99
|
switch (e.key) {
|
|
99
100
|
case "ArrowDown":
|
|
100
101
|
e.preventDefault();
|
|
101
|
-
const t =
|
|
102
|
-
t === c &&
|
|
102
|
+
const t = Y(c);
|
|
103
|
+
t === c && y && !p && u?.(), m(t);
|
|
103
104
|
break;
|
|
104
105
|
case "ArrowUp":
|
|
105
|
-
e.preventDefault(),
|
|
106
|
+
e.preventDefault(), m((a) => Z(a));
|
|
106
107
|
break;
|
|
107
108
|
case "Enter":
|
|
108
109
|
e.preventDefault();
|
|
109
|
-
const
|
|
110
|
-
|
|
110
|
+
const s = l[c];
|
|
111
|
+
s && !s.disabled && H(s.value);
|
|
111
112
|
break;
|
|
112
113
|
case "Escape":
|
|
113
114
|
f(!1);
|
|
114
115
|
break;
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
}, [
|
|
120
|
-
|
|
118
|
+
}, T = ue(() => {
|
|
119
|
+
y && !p && u && u();
|
|
120
|
+
}, [y, p, u]);
|
|
121
|
+
b(() => {
|
|
121
122
|
const e = B.current;
|
|
122
|
-
if (!e || !u || !
|
|
123
|
+
if (!e || !u || !y) return;
|
|
123
124
|
const t = new IntersectionObserver(
|
|
124
|
-
([
|
|
125
|
-
|
|
125
|
+
([s]) => {
|
|
126
|
+
s.isIntersecting && !p && T();
|
|
126
127
|
},
|
|
127
128
|
{
|
|
128
|
-
root:
|
|
129
|
+
root: k.current,
|
|
129
130
|
// Observe relative to the scrollable container
|
|
130
131
|
threshold: 0.1,
|
|
131
132
|
rootMargin: "20px"
|
|
@@ -133,100 +134,138 @@ const ye = (n) => {
|
|
|
133
134
|
}
|
|
134
135
|
);
|
|
135
136
|
return t.observe(e), () => t.disconnect();
|
|
136
|
-
}, [
|
|
137
|
+
}, [T, u, y, p]);
|
|
137
138
|
const {
|
|
138
|
-
m50:
|
|
139
|
-
m100:
|
|
140
|
-
m200:
|
|
141
|
-
m500:
|
|
142
|
-
} =
|
|
139
|
+
m50: L,
|
|
140
|
+
m100: M,
|
|
141
|
+
m200: ee,
|
|
142
|
+
m500: te
|
|
143
|
+
} = me[Q] ?? he, re = (e, t) => () => !e && m(t), V = (e) => `${$}-opt-${e}`, ne = ({ value: e, label: t, disabled: s }, a) => /* @__PURE__ */ pe(
|
|
143
144
|
fe,
|
|
144
145
|
{
|
|
145
146
|
value: e,
|
|
146
147
|
label: t,
|
|
147
|
-
isDisabled:
|
|
148
|
-
onSelect:
|
|
149
|
-
onMouseEnter:
|
|
150
|
-
isSelected: e ===
|
|
151
|
-
isHighlighted:
|
|
148
|
+
isDisabled: s,
|
|
149
|
+
onSelect: H,
|
|
150
|
+
onMouseEnter: re(s, a),
|
|
151
|
+
isSelected: e === i,
|
|
152
|
+
isHighlighted: a === c,
|
|
152
153
|
key: e,
|
|
153
|
-
id: V(
|
|
154
|
-
width:
|
|
155
|
-
selectedColor:
|
|
156
|
-
hoverColor:
|
|
157
|
-
activeColor:
|
|
154
|
+
id: V(a),
|
|
155
|
+
width: g,
|
|
156
|
+
selectedColor: ee,
|
|
157
|
+
hoverColor: L,
|
|
158
|
+
activeColor: M
|
|
158
159
|
}
|
|
159
|
-
),
|
|
160
|
-
|
|
161
|
-
}, oe = (e) => {
|
|
162
|
-
W(!1), m.current?.contains(e.relatedTarget) || f(!1);
|
|
160
|
+
), oe = (e) => () => {
|
|
161
|
+
P(e);
|
|
163
162
|
}, se = (e) => {
|
|
163
|
+
P(!1), h.current?.contains(e.relatedTarget) || f(!1);
|
|
164
|
+
}, ie = (e) => {
|
|
164
165
|
A(e.target.value);
|
|
165
166
|
}, ce = (e) => {
|
|
166
167
|
e.stopPropagation();
|
|
167
168
|
};
|
|
168
|
-
return /* @__PURE__ */
|
|
169
|
-
|
|
169
|
+
return /* @__PURE__ */ v(
|
|
170
|
+
be,
|
|
170
171
|
{
|
|
171
|
-
ref:
|
|
172
|
-
$width:
|
|
172
|
+
ref: h,
|
|
173
|
+
$width: g,
|
|
173
174
|
...U,
|
|
174
175
|
tabIndex: x || w ? -1 : 0,
|
|
175
|
-
onKeyDown:
|
|
176
|
+
onKeyDown: _,
|
|
176
177
|
$isLoading: w,
|
|
177
178
|
$isDisabled: x,
|
|
178
179
|
role: "combobox",
|
|
179
|
-
"aria-expanded":
|
|
180
|
+
"aria-expanded": n,
|
|
180
181
|
"aria-haspopup": "listbox",
|
|
181
|
-
"aria-controls":
|
|
182
|
+
"aria-controls": $,
|
|
182
183
|
"aria-disabled": x || void 0,
|
|
183
184
|
"aria-activedescendant": c !== -1 ? V(c) : void 0,
|
|
184
|
-
onFocus:
|
|
185
|
-
onBlur:
|
|
185
|
+
onFocus: oe(!0),
|
|
186
|
+
onBlur: se,
|
|
186
187
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
|
|
188
|
+
/* @__PURE__ */ v(
|
|
189
|
+
ge,
|
|
189
190
|
{
|
|
190
|
-
$width:
|
|
191
|
-
onClick:
|
|
192
|
-
$isOpen:
|
|
193
|
-
$border:
|
|
194
|
-
$isFocused: q && !
|
|
191
|
+
$width: g,
|
|
192
|
+
onClick: X,
|
|
193
|
+
$isOpen: n,
|
|
194
|
+
$border: te,
|
|
195
|
+
$isFocused: q && !n,
|
|
195
196
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ d(we, { $width: g, color: i ? E.m700 : E.m500, size: "1.92rem", children: i ? o.find(({ value: e }) => i === e)?.label : K }),
|
|
198
|
+
/* @__PURE__ */ d(xe, { color: E.m500, size: 22, $isOpen: n, "aria-hidden": !0 })
|
|
198
199
|
]
|
|
199
200
|
}
|
|
200
201
|
),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
202
|
+
/* @__PURE__ */ v(Ie, { $isOpen: n, $width: g, $height: F, $top: N === "top", children: [
|
|
203
|
+
I && /* @__PURE__ */ v(ye, { onClick: ce, children: [
|
|
204
|
+
/* @__PURE__ */ d(Ce, { size: 20, color: E.m600, "aria-hidden": !0 }),
|
|
205
|
+
/* @__PURE__ */ d(
|
|
206
|
+
ke,
|
|
206
207
|
{
|
|
207
|
-
ref:
|
|
208
|
-
value:
|
|
209
|
-
onChange:
|
|
210
|
-
placeholder:
|
|
211
|
-
"aria-label":
|
|
212
|
-
"aria-controls":
|
|
208
|
+
ref: z,
|
|
209
|
+
value: C,
|
|
210
|
+
onChange: ie,
|
|
211
|
+
placeholder: W,
|
|
212
|
+
"aria-label": W,
|
|
213
|
+
"aria-controls": $,
|
|
213
214
|
"aria-autocomplete": "list",
|
|
214
|
-
"aria-expanded":
|
|
215
|
+
"aria-expanded": n,
|
|
215
216
|
role: "combobox",
|
|
216
|
-
tabIndex:
|
|
217
|
+
tabIndex: n ? 0 : -1
|
|
217
218
|
}
|
|
218
219
|
)
|
|
219
220
|
] }),
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
|
|
222
|
-
u && /* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ v(ve, { ref: k, role: "listbox", id: $, tabIndex: -1, children: [
|
|
222
|
+
l.map(ne),
|
|
223
|
+
u && /* @__PURE__ */ d(Se, { ref: B, children: p && /* @__PURE__ */ d(j, { size: "small", color: R }) })
|
|
223
224
|
] })
|
|
224
225
|
] }),
|
|
225
|
-
w && /* @__PURE__ */
|
|
226
|
+
w && /* @__PURE__ */ d(Oe, { children: /* @__PURE__ */ d(j, { size: "small", color: R }) })
|
|
226
227
|
]
|
|
227
228
|
}
|
|
228
229
|
);
|
|
229
230
|
};
|
|
231
|
+
Ee.propTypes = {
|
|
232
|
+
/** Array of option objects: `{ value, label, disabled? }` */
|
|
233
|
+
options: r.arrayOf(
|
|
234
|
+
r.shape({
|
|
235
|
+
value: r.any,
|
|
236
|
+
label: r.string,
|
|
237
|
+
disabled: r.bool
|
|
238
|
+
})
|
|
239
|
+
),
|
|
240
|
+
/** Currently selected value (controlled) */
|
|
241
|
+
value: r.any,
|
|
242
|
+
/** Called with the selected value when an option is picked */
|
|
243
|
+
onChange: r.func,
|
|
244
|
+
/** CSS width of the dropdown trigger. Defaults to `'32rem'` */
|
|
245
|
+
width: r.string,
|
|
246
|
+
/** Maximum CSS height of the dropdown menu. Defaults to `'32rem'` */
|
|
247
|
+
menuHeight: r.string,
|
|
248
|
+
/** Placeholder text shown when no value is selected */
|
|
249
|
+
placeholder: r.string,
|
|
250
|
+
/** Color theme key. Defaults to `'blue'` */
|
|
251
|
+
theme: r.string,
|
|
252
|
+
/** Shows a spinner inside the trigger and disables interaction */
|
|
253
|
+
isLoading: r.bool,
|
|
254
|
+
/** Disables the dropdown */
|
|
255
|
+
isDisabled: r.bool,
|
|
256
|
+
/** Color key for the loading spinner */
|
|
257
|
+
loaderColor: r.string,
|
|
258
|
+
/** Adds a search input inside the dropdown menu */
|
|
259
|
+
searchable: r.bool,
|
|
260
|
+
/** Placeholder text for the search input. Defaults to `'Search...'` */
|
|
261
|
+
searchPh: r.string,
|
|
262
|
+
/** Called when the user scrolls to the bottom of the list (infinite scroll) */
|
|
263
|
+
onLoadMore: r.func,
|
|
264
|
+
/** Whether more options are available to load */
|
|
265
|
+
hasMore: r.bool,
|
|
266
|
+
/** Shows a spinner at the bottom while loading more options */
|
|
267
|
+
isLoadingMore: r.bool
|
|
268
|
+
};
|
|
230
269
|
export {
|
|
231
|
-
|
|
270
|
+
Ee as default
|
|
232
271
|
};
|
|
@@ -1,67 +1,88 @@
|
|
|
1
|
-
import { jsxs as $, jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as $, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as C, useRef as P } from "react";
|
|
3
|
+
import r from "../../../_virtual/index.js";
|
|
4
|
+
import H from "../../../colors/grey.js";
|
|
4
5
|
import j from "../../Typography/P/P.js";
|
|
5
6
|
import z from "../../../colors/white.js";
|
|
6
|
-
import { blue as
|
|
7
|
-
import { Wrapper as B, CbInput as
|
|
8
|
-
import { getColor as
|
|
9
|
-
const
|
|
10
|
-
label:
|
|
11
|
-
value:
|
|
12
|
-
color:
|
|
13
|
-
textColor:
|
|
14
|
-
disabled:
|
|
15
|
-
onChange:
|
|
16
|
-
tabIndex:
|
|
17
|
-
innerShade:
|
|
18
|
-
outerShade:
|
|
19
|
-
...
|
|
7
|
+
import { blue as u } from "../../../colors/blue.js";
|
|
8
|
+
import { Wrapper as B, CbInput as E, Box as F } from "./styles.js";
|
|
9
|
+
import { getColor as I } from "./helpers.js";
|
|
10
|
+
const K = ({
|
|
11
|
+
label: d,
|
|
12
|
+
value: o,
|
|
13
|
+
color: m = "blue",
|
|
14
|
+
textColor: p = H.m700,
|
|
15
|
+
disabled: a,
|
|
16
|
+
onChange: t,
|
|
17
|
+
tabIndex: h,
|
|
18
|
+
innerShade: b,
|
|
19
|
+
outerShade: y,
|
|
20
|
+
...g
|
|
20
21
|
}) => {
|
|
21
|
-
const [
|
|
22
|
+
const [k, n] = C(!1), c = I(m), S = b ?? c?.m500 ?? u.m500, x = y ?? c?.m600 ?? u.m600, i = P(0), w = (e) => t(e.target.checked), D = (e) => {
|
|
22
23
|
if (e.key === "Enter" || e.key === " ") {
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
24
|
+
const f = Date.now();
|
|
25
|
+
if (f - i.current < 500) {
|
|
25
26
|
e.preventDefault(), e.stopPropagation();
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
|
-
if (
|
|
29
|
-
e.preventDefault(),
|
|
29
|
+
if (i.current = f, e.key === " ") {
|
|
30
|
+
e.preventDefault(), t(!o);
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
t(!o), n(!1);
|
|
33
34
|
}
|
|
34
|
-
e.key === "Escape" &&
|
|
35
|
-
},
|
|
36
|
-
return /* @__PURE__ */ $(B, { as: "label", $disabled:
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
35
|
+
e.key === "Escape" && n(!1);
|
|
36
|
+
}, l = (e) => () => n(e);
|
|
37
|
+
return /* @__PURE__ */ $(B, { as: "label", $disabled: a, ...g, children: [
|
|
38
|
+
/* @__PURE__ */ s(
|
|
39
|
+
E,
|
|
39
40
|
{
|
|
40
41
|
type: "checkbox",
|
|
41
|
-
checked:
|
|
42
|
+
checked: o,
|
|
42
43
|
onChange: w,
|
|
43
44
|
onKeyDown: D,
|
|
44
|
-
onFocus:
|
|
45
|
-
onBlur:
|
|
46
|
-
disabled:
|
|
47
|
-
tabIndex:
|
|
45
|
+
onFocus: l(!0),
|
|
46
|
+
onBlur: l(!1),
|
|
47
|
+
disabled: a,
|
|
48
|
+
tabIndex: h
|
|
48
49
|
}
|
|
49
50
|
),
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
51
|
+
/* @__PURE__ */ s(
|
|
52
|
+
F,
|
|
52
53
|
{
|
|
53
|
-
$value:
|
|
54
|
-
$focused:
|
|
54
|
+
$value: o,
|
|
55
|
+
$focused: k,
|
|
55
56
|
size: 6,
|
|
56
57
|
color: z,
|
|
57
|
-
$innerShade:
|
|
58
|
+
$innerShade: S,
|
|
58
59
|
$outerShade: x,
|
|
59
60
|
"aria-hidden": "true"
|
|
60
61
|
}
|
|
61
62
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ s(j, { color: p, size: "1.92rem", children: d })
|
|
63
64
|
] });
|
|
64
65
|
};
|
|
66
|
+
K.propTypes = {
|
|
67
|
+
/** Text label rendered next to the checkbox */
|
|
68
|
+
label: r.string,
|
|
69
|
+
/** Controlled checked state */
|
|
70
|
+
value: r.bool,
|
|
71
|
+
/** Color theme key for the checkbox accent. Defaults to 'blue' */
|
|
72
|
+
color: r.string,
|
|
73
|
+
/** Color of the label text */
|
|
74
|
+
textColor: r.string,
|
|
75
|
+
/** Disables the checkbox */
|
|
76
|
+
disabled: r.bool,
|
|
77
|
+
/** Called with the new boolean value on change */
|
|
78
|
+
onChange: r.func,
|
|
79
|
+
/** Tab order index for the checkbox input */
|
|
80
|
+
tabIndex: r.number,
|
|
81
|
+
/** Override the inner fill color (checked state) */
|
|
82
|
+
innerShade: r.string,
|
|
83
|
+
/** Override the outer border/ring color (checked state) */
|
|
84
|
+
outerShade: r.string
|
|
85
|
+
};
|
|
65
86
|
export {
|
|
66
|
-
|
|
87
|
+
K as default
|
|
67
88
|
};
|