meticulous-ui 2.6.2 → 2.7.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/components/Dropdown/Dropdown.js +56 -54
- package/components/Glass/Glass.js +4 -4
- package/components/Input/Checkbox/Checkbox.js +23 -22
- package/components/Input/Checkbox/styles.js +1 -1
- package/components/Input/FileUploader/FileUploader.js +22 -21
- package/components/Input/Radio/Radio.js +10 -10
- package/components/Input/RadioGroup/RadioGroup.js +19 -17
- package/components/Loader/Loader.js +12 -12
- package/components/MenuItem/MenuItem.js +10 -8
- package/components/OtpInput/OtpInput.js +16 -15
- package/components/Pagination/Pagination.js +17 -14
- package/components/Selectbox/Selectbox.js +48 -46
- package/components/Shimmer/Shimmer.js +3 -3
- package/components/Shimmer/styles.js +3 -3
- package/components/Spinner/Spinner.js +14 -13
- package/components/Timer/Timer.js +35 -34
- package/components/Toast/Toast.js +18 -18
- package/components/Typography/Headings/H1.js +5 -5
- package/components/Typography/Headings/H2.js +5 -5
- package/components/Typography/Headings/H3.js +5 -5
- package/components/Typography/Headings/H4.js +5 -5
- package/components/Typography/Headings/H5.js +5 -5
- package/components/Typography/Headings/H6.js +5 -5
- package/components/VideoPlayer/VideoPlayer.js +11 -11
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as C, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { useState as $, useId as
|
|
2
|
+
import { useState as $, useId as le, useRef as v, useMemo as ae, useEffect as h, useLayoutEffect as ue, useCallback as fe, createElement as de } from "react";
|
|
3
3
|
import E from "../../colors/grey.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import pe from "../MenuItem/MenuItem.js";
|
|
5
|
+
import me from "../../colors/index.js";
|
|
6
|
+
import he from "../../colors/blue.js";
|
|
7
7
|
import K from "../Spinner/Spinner.js";
|
|
8
|
-
import { DropdownWrapper as
|
|
9
|
-
const
|
|
8
|
+
import { DropdownWrapper as be, Box as we, PWrapper as xe, ChevronDownWrapper as ge, OptionWrapper as Ie, SearchContainer as ke, SearchIcon as Se, SearchInput as Ce, OptionsList as $e, LoadMoreSentinel as ve, SpinnerWrapper as ye } from "./styles.js";
|
|
9
|
+
const Ee = (n) => {
|
|
10
10
|
if (typeof n != "string") return n;
|
|
11
11
|
if (n.endsWith("px")) return parseFloat(n);
|
|
12
12
|
if (n.endsWith("rem")) {
|
|
@@ -14,7 +14,7 @@ const ye = (n) => {
|
|
|
14
14
|
return O * s;
|
|
15
15
|
}
|
|
16
16
|
return parseFloat(n);
|
|
17
|
-
},
|
|
17
|
+
}, He = ({
|
|
18
18
|
options: n,
|
|
19
19
|
onChange: O,
|
|
20
20
|
value: s,
|
|
@@ -29,12 +29,13 @@ const ye = (n) => {
|
|
|
29
29
|
onLoadMore: c,
|
|
30
30
|
hasMore: I = !1,
|
|
31
31
|
isLoadingMore: f = !1,
|
|
32
|
-
searchPh: R = "Search..."
|
|
32
|
+
searchPh: R = "Search...",
|
|
33
|
+
...q
|
|
33
34
|
}) => {
|
|
34
35
|
var j;
|
|
35
|
-
const [r, d] = $(!1), [
|
|
36
|
+
const [r, d] = $(!1), [N, W] = $(!1), [T, G] = $("bottom"), [k, A] = $(""), [i, p] = $(-1), y = le(), m = v(null), S = v(null), D = v(null), B = v(null), J = v(!0), X = () => !w && !x && d((e) => !e), P = (e) => {
|
|
36
37
|
e !== s && (O(e), d(!1));
|
|
37
|
-
}, l =
|
|
38
|
+
}, l = ae(() => {
|
|
38
39
|
if (!g || !k.trim()) return n;
|
|
39
40
|
const e = k.toLowerCase();
|
|
40
41
|
return n.filter(({ label: t }) => t.toLowerCase().includes(e));
|
|
@@ -61,35 +62,35 @@ const ye = (n) => {
|
|
|
61
62
|
}, [i, r]), h(() => {
|
|
62
63
|
r && g && D.current && D.current.focus();
|
|
63
64
|
}, [r, g]), h(() => {
|
|
64
|
-
r || (
|
|
65
|
+
r || (J.current = !0);
|
|
65
66
|
}, [r]), h(() => {
|
|
66
67
|
const e = (t) => {
|
|
67
68
|
m.current && !m.current.contains(t.target) && d(!1);
|
|
68
69
|
};
|
|
69
70
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
70
|
-
}, []),
|
|
71
|
+
}, []), ue(() => {
|
|
71
72
|
if (r && S.current && m.current) {
|
|
72
|
-
const e = m.current.getBoundingClientRect(), t = window.innerHeight, o =
|
|
73
|
-
|
|
73
|
+
const e = m.current.getBoundingClientRect(), t = window.innerHeight, o = Ee(F), a = t - e.bottom;
|
|
74
|
+
G(
|
|
74
75
|
a < o + 8 && e.top > a ? "top" : "bottom"
|
|
75
76
|
);
|
|
76
77
|
}
|
|
77
78
|
}, [r, F]);
|
|
78
|
-
const
|
|
79
|
+
const Y = (e) => {
|
|
79
80
|
let t = e + 1;
|
|
80
81
|
for (; t < l.length; ) {
|
|
81
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
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
95
|
if (!r) {
|
|
95
96
|
(e.key === " " || e.key === "Enter" || e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), d(!0));
|
|
@@ -98,11 +99,11 @@ const ye = (n) => {
|
|
|
98
99
|
switch (e.key) {
|
|
99
100
|
case "ArrowDown":
|
|
100
101
|
e.preventDefault();
|
|
101
|
-
const t =
|
|
102
|
+
const t = Y(i);
|
|
102
103
|
t === i && I && !f && (c == null || c()), p(t);
|
|
103
104
|
break;
|
|
104
105
|
case "ArrowUp":
|
|
105
|
-
e.preventDefault(), p((a) =>
|
|
106
|
+
e.preventDefault(), p((a) => Z(a));
|
|
106
107
|
break;
|
|
107
108
|
case "Enter":
|
|
108
109
|
e.preventDefault();
|
|
@@ -114,7 +115,7 @@ const ye = (n) => {
|
|
|
114
115
|
break;
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
}, H =
|
|
118
|
+
}, H = fe(() => {
|
|
118
119
|
I && !f && c && c();
|
|
119
120
|
}, [I, f, c]);
|
|
120
121
|
h(() => {
|
|
@@ -135,44 +136,45 @@ const ye = (n) => {
|
|
|
135
136
|
return t.observe(e), () => t.disconnect();
|
|
136
137
|
}, [H, c, I, f]);
|
|
137
138
|
const {
|
|
138
|
-
m50:
|
|
139
|
-
m100:
|
|
140
|
-
m200:
|
|
141
|
-
m500:
|
|
142
|
-
} =
|
|
143
|
-
|
|
139
|
+
m50: L,
|
|
140
|
+
m100: M,
|
|
141
|
+
m200: ee,
|
|
142
|
+
m500: te
|
|
143
|
+
} = me[U] ?? he, re = (e, t) => () => !e && p(t), V = (e) => `${y}-opt-${e}`, ne = ({ value: e, label: t, disabled: o }, a) => /* @__PURE__ */ de(
|
|
144
|
+
pe,
|
|
144
145
|
{
|
|
145
146
|
value: e,
|
|
146
147
|
label: t,
|
|
147
148
|
isDisabled: o,
|
|
148
149
|
onSelect: P,
|
|
149
|
-
onMouseEnter:
|
|
150
|
+
onMouseEnter: re(o, a),
|
|
150
151
|
isSelected: e === s,
|
|
151
152
|
isHighlighted: a === i,
|
|
152
153
|
key: e,
|
|
153
154
|
id: V(a),
|
|
154
155
|
width: b,
|
|
155
|
-
selectedColor:
|
|
156
|
-
hoverColor:
|
|
157
|
-
activeColor:
|
|
156
|
+
selectedColor: ee,
|
|
157
|
+
hoverColor: L,
|
|
158
|
+
activeColor: M
|
|
158
159
|
}
|
|
159
|
-
),
|
|
160
|
+
), oe = (e) => () => {
|
|
160
161
|
W(e);
|
|
161
|
-
},
|
|
162
|
+
}, se = (e) => {
|
|
162
163
|
var t;
|
|
163
164
|
W(!1), (t = m.current) != null && t.contains(e.relatedTarget) || d(!1);
|
|
164
|
-
}, se = (e) => {
|
|
165
|
-
A(e.target.value);
|
|
166
165
|
}, ce = (e) => {
|
|
166
|
+
A(e.target.value);
|
|
167
|
+
}, ie = (e) => {
|
|
167
168
|
e.stopPropagation();
|
|
168
169
|
};
|
|
169
170
|
return /* @__PURE__ */ C(
|
|
170
|
-
|
|
171
|
+
be,
|
|
171
172
|
{
|
|
172
173
|
ref: m,
|
|
173
174
|
$width: b,
|
|
175
|
+
...q,
|
|
174
176
|
tabIndex: x || w ? -1 : 0,
|
|
175
|
-
onKeyDown:
|
|
177
|
+
onKeyDown: _,
|
|
176
178
|
$isLoading: w,
|
|
177
179
|
$isDisabled: x,
|
|
178
180
|
role: "combobox",
|
|
@@ -181,32 +183,32 @@ const ye = (n) => {
|
|
|
181
183
|
"aria-controls": y,
|
|
182
184
|
"aria-disabled": x || void 0,
|
|
183
185
|
"aria-activedescendant": i !== -1 ? V(i) : void 0,
|
|
184
|
-
onFocus:
|
|
185
|
-
onBlur:
|
|
186
|
+
onFocus: oe(!0),
|
|
187
|
+
onBlur: se,
|
|
186
188
|
children: [
|
|
187
189
|
/* @__PURE__ */ C(
|
|
188
|
-
|
|
190
|
+
we,
|
|
189
191
|
{
|
|
190
192
|
$width: b,
|
|
191
|
-
onClick:
|
|
193
|
+
onClick: X,
|
|
192
194
|
$isOpen: r,
|
|
193
|
-
$border:
|
|
194
|
-
$isFocused:
|
|
195
|
+
$border: te,
|
|
196
|
+
$isFocused: N && !r,
|
|
195
197
|
children: [
|
|
196
|
-
/* @__PURE__ */ u(
|
|
197
|
-
/* @__PURE__ */ u(
|
|
198
|
+
/* @__PURE__ */ u(xe, { $width: b, color: s ? E.m700 : E.m500, size: "1.2rem", children: s ? (j = n.find(({ value: e }) => s === e)) == null ? void 0 : j.label : Q }),
|
|
199
|
+
/* @__PURE__ */ u(ge, { color: E.m500, size: 22, $isOpen: r, "aria-hidden": !0 })
|
|
198
200
|
]
|
|
199
201
|
}
|
|
200
202
|
),
|
|
201
|
-
/* @__PURE__ */ C(
|
|
202
|
-
g && /* @__PURE__ */ C(
|
|
203
|
-
/* @__PURE__ */ u(
|
|
203
|
+
/* @__PURE__ */ C(Ie, { $isOpen: r, $width: b, $height: F, $top: T === "top", children: [
|
|
204
|
+
g && /* @__PURE__ */ C(ke, { onClick: ie, children: [
|
|
205
|
+
/* @__PURE__ */ u(Se, { size: 20, color: E.m600, "aria-hidden": !0 }),
|
|
204
206
|
/* @__PURE__ */ u(
|
|
205
|
-
|
|
207
|
+
Ce,
|
|
206
208
|
{
|
|
207
209
|
ref: D,
|
|
208
210
|
value: k,
|
|
209
|
-
onChange:
|
|
211
|
+
onChange: ce,
|
|
210
212
|
placeholder: R,
|
|
211
213
|
"aria-label": R,
|
|
212
214
|
"aria-controls": y,
|
|
@@ -217,16 +219,16 @@ const ye = (n) => {
|
|
|
217
219
|
}
|
|
218
220
|
)
|
|
219
221
|
] }),
|
|
220
|
-
/* @__PURE__ */ C(
|
|
221
|
-
l.map(
|
|
222
|
-
c && /* @__PURE__ */ u(
|
|
222
|
+
/* @__PURE__ */ C($e, { ref: S, role: "listbox", id: y, tabIndex: -1, children: [
|
|
223
|
+
l.map(ne),
|
|
224
|
+
c && /* @__PURE__ */ u(ve, { ref: B, children: f && /* @__PURE__ */ u(K, { size: "small", color: z }) })
|
|
223
225
|
] })
|
|
224
226
|
] }),
|
|
225
|
-
w && /* @__PURE__ */ u(
|
|
227
|
+
w && /* @__PURE__ */ u(ye, { children: /* @__PURE__ */ u(K, { size: "small", color: z }) })
|
|
226
228
|
]
|
|
227
229
|
}
|
|
228
230
|
);
|
|
229
231
|
};
|
|
230
232
|
export {
|
|
231
|
-
|
|
233
|
+
He as default
|
|
232
234
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { GlassWrapper as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { GlassWrapper as e } from "./styles.js";
|
|
3
|
+
const d = ({ border: r = "none", borderRadius: o = 0, ...s }) => /* @__PURE__ */ a(e, { $border: r, $borderRadius: o, ...s });
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
d as default
|
|
6
6
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as $, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useRef as H } from "react";
|
|
3
|
+
import P from "../../../colors/grey.js";
|
|
4
|
+
import j from "../../Typography/P/P.js";
|
|
5
|
+
import z from "../../../colors/white.js";
|
|
6
6
|
import m from "../../../colors/blue.js";
|
|
7
|
-
import { Wrapper as
|
|
8
|
-
import { getColor as
|
|
9
|
-
const
|
|
7
|
+
import { Wrapper as B, CbInput as C, Box as E } from "./styles.js";
|
|
8
|
+
import { getColor as F } from "./helpers.js";
|
|
9
|
+
const J = ({
|
|
10
10
|
label: u,
|
|
11
11
|
value: o,
|
|
12
12
|
color: l = "blue",
|
|
13
|
-
textColor: p =
|
|
13
|
+
textColor: p = P.m700,
|
|
14
14
|
disabled: c,
|
|
15
15
|
onChange: t,
|
|
16
16
|
tabIndex: d,
|
|
17
17
|
innerShade: h,
|
|
18
|
-
outerShade: k
|
|
18
|
+
outerShade: k,
|
|
19
|
+
...y
|
|
19
20
|
}) => {
|
|
20
|
-
const [
|
|
21
|
+
const [S, n] = g(!1), r = F(l), b = h ?? (r == null ? void 0 : r.m500) ?? m.m500, x = k ?? (r == null ? void 0 : r.m600) ?? m.m600, a = H(0), w = (e) => t(e.target.checked), D = (e) => {
|
|
21
22
|
if (e.key === "Enter" || e.key === " ") {
|
|
22
23
|
const i = Date.now();
|
|
23
24
|
if (i - a.current < 500) {
|
|
@@ -32,14 +33,14 @@ const G = ({
|
|
|
32
33
|
}
|
|
33
34
|
e.key === "Escape" && n(!1);
|
|
34
35
|
}, f = (e) => () => n(e);
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ $(B, { as: "label", $disabled: c, ...y, children: [
|
|
36
37
|
/* @__PURE__ */ s(
|
|
37
|
-
|
|
38
|
+
C,
|
|
38
39
|
{
|
|
39
40
|
type: "checkbox",
|
|
40
41
|
checked: o,
|
|
41
|
-
onChange:
|
|
42
|
-
onKeyDown:
|
|
42
|
+
onChange: w,
|
|
43
|
+
onKeyDown: D,
|
|
43
44
|
onFocus: f(!0),
|
|
44
45
|
onBlur: f(!1),
|
|
45
46
|
disabled: c,
|
|
@@ -47,20 +48,20 @@ const G = ({
|
|
|
47
48
|
}
|
|
48
49
|
),
|
|
49
50
|
/* @__PURE__ */ s(
|
|
50
|
-
|
|
51
|
+
E,
|
|
51
52
|
{
|
|
52
53
|
$value: o,
|
|
53
|
-
$focused:
|
|
54
|
+
$focused: S,
|
|
54
55
|
size: 6,
|
|
55
|
-
color:
|
|
56
|
-
$innerShade:
|
|
57
|
-
$outerShade:
|
|
56
|
+
color: z,
|
|
57
|
+
$innerShade: b,
|
|
58
|
+
$outerShade: x,
|
|
58
59
|
"aria-hidden": "true"
|
|
59
60
|
}
|
|
60
61
|
),
|
|
61
|
-
/* @__PURE__ */ s(
|
|
62
|
+
/* @__PURE__ */ s(j, { color: p, size: "1.2rem", children: u })
|
|
62
63
|
] });
|
|
63
64
|
};
|
|
64
65
|
export {
|
|
65
|
-
|
|
66
|
+
J as default
|
|
66
67
|
};
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as C } from "react";
|
|
3
|
-
import { UploadBtnContainer as
|
|
4
|
-
import
|
|
3
|
+
import { UploadBtnContainer as j, Wrapper as M, HiddenInput as W, PWrapper as b } from "./styles.js";
|
|
4
|
+
import B from "../../../colors/white.js";
|
|
5
5
|
import x from "../../../colors/blue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { SIZE as
|
|
11
|
-
const
|
|
6
|
+
import F from "../../../colors/grey.js";
|
|
7
|
+
import H from "../../Icons/Link/Link.js";
|
|
8
|
+
import P from "../../../colors/index.js";
|
|
9
|
+
import Z from "../../Ripple/Ripple.js";
|
|
10
|
+
import { SIZE as q, MEDIUM as A } from "./constants.js";
|
|
11
|
+
const G = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m100, children: l }), oo = ({
|
|
12
12
|
label: e,
|
|
13
13
|
labelColor: l,
|
|
14
14
|
theme: p = x,
|
|
15
|
-
size: D =
|
|
15
|
+
size: D = A,
|
|
16
16
|
width: s,
|
|
17
17
|
isLoading: t,
|
|
18
18
|
disabled: r,
|
|
19
|
-
prefixIcon: c =
|
|
19
|
+
prefixIcon: c = H,
|
|
20
20
|
suffixIcon: m,
|
|
21
21
|
type: I = "file",
|
|
22
22
|
accept: R,
|
|
23
23
|
isMultiple: k,
|
|
24
|
-
onChange: z
|
|
24
|
+
onChange: z,
|
|
25
|
+
...K
|
|
25
26
|
}) => {
|
|
26
|
-
const u = C(null), { m400:
|
|
27
|
-
|
|
27
|
+
const u = C(null), { m400: v, m500: E, m600: U } = P[p] ?? x, { height: h, width: a, font: n } = q[D] || {}, f = l || ["white", "yellow"].includes(p) ? F.m600 : B, $ = C(0), w = /* @__PURE__ */ g(
|
|
28
|
+
M,
|
|
28
29
|
{
|
|
29
|
-
$selectedColor:
|
|
30
|
-
$hoverColor:
|
|
30
|
+
$selectedColor: v,
|
|
31
|
+
$hoverColor: E,
|
|
31
32
|
$height: h,
|
|
32
33
|
$width: s || a,
|
|
33
|
-
$activeColor:
|
|
34
|
+
$activeColor: U,
|
|
34
35
|
disabled: r,
|
|
35
36
|
$isLoading: t,
|
|
36
37
|
role: "button",
|
|
@@ -51,7 +52,7 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(P, { rippleColor: e.m
|
|
|
51
52
|
},
|
|
52
53
|
children: [
|
|
53
54
|
/* @__PURE__ */ o(
|
|
54
|
-
|
|
55
|
+
W,
|
|
55
56
|
{
|
|
56
57
|
ref: u,
|
|
57
58
|
type: I,
|
|
@@ -64,7 +65,7 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(P, { rippleColor: e.m
|
|
|
64
65
|
),
|
|
65
66
|
c && /* @__PURE__ */ o(c, { color: f, size: n + 19 }),
|
|
66
67
|
/* @__PURE__ */ o(
|
|
67
|
-
|
|
68
|
+
b,
|
|
68
69
|
{
|
|
69
70
|
color: f,
|
|
70
71
|
size: `${n}rem`,
|
|
@@ -79,8 +80,8 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(P, { rippleColor: e.m
|
|
|
79
80
|
]
|
|
80
81
|
}
|
|
81
82
|
);
|
|
82
|
-
return /* @__PURE__ */ o(
|
|
83
|
+
return /* @__PURE__ */ o(j, { $height: h, $width: s || a, disabled: r, $isLoading: t, ...K, children: t || r ? w : /* @__PURE__ */ o(G, { theme: p, children: w }) });
|
|
83
84
|
};
|
|
84
85
|
export {
|
|
85
|
-
|
|
86
|
+
oo as default
|
|
86
87
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import $ from "../../Typography/P/P.js";
|
|
3
3
|
import m from "../../../colors/blue.js";
|
|
4
|
-
import { Wrapper as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
return /* @__PURE__ */
|
|
4
|
+
import { Wrapper as y, HiddenInput as D, CircleBorder as w, Circle as x } from "./styles.js";
|
|
5
|
+
const C = ({ label: s, value: r, name: p, color: e, textColor: f, isSelected: d, disabled: t, onChange: i, ...c }) => {
|
|
6
|
+
const o = (e == null ? void 0 : e.m500) ?? m.m500, a = (e == null ? void 0 : e.m800) ?? m.m800;
|
|
7
|
+
return /* @__PURE__ */ u(y, { $disabled: t, $focusShade: a, ...c, children: [
|
|
8
8
|
/* @__PURE__ */ n(
|
|
9
|
-
|
|
9
|
+
D,
|
|
10
10
|
{
|
|
11
11
|
type: "radio",
|
|
12
12
|
name: p,
|
|
@@ -19,10 +19,10 @@ const k = ({ label: s, value: r, name: p, color: e, textColor: f, isSelected: d,
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
),
|
|
22
|
-
/* @__PURE__ */ n(
|
|
23
|
-
/* @__PURE__ */ n(
|
|
22
|
+
/* @__PURE__ */ n(w, { "aria-hidden": "true", $isSelected: d, $shade: a, children: /* @__PURE__ */ n(x, { $isSelected: d, $shade: o }) }),
|
|
23
|
+
/* @__PURE__ */ n($, { color: f, size: "1.2rem", children: s })
|
|
24
24
|
] });
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
C as default
|
|
28
28
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { getColor as
|
|
4
|
-
import
|
|
5
|
-
import { Wrapper as
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as u, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as h } from "react";
|
|
3
|
+
import { getColor as x } from "../Checkbox/helpers.js";
|
|
4
|
+
import j from "../Radio/Radio.js";
|
|
5
|
+
import { Wrapper as k } from "./styles.js";
|
|
6
|
+
const y = ({
|
|
7
7
|
options: i,
|
|
8
8
|
color: n = "blue",
|
|
9
9
|
value: o,
|
|
@@ -11,34 +11,36 @@ const v = ({
|
|
|
11
11
|
isHorizonatal: d,
|
|
12
12
|
label: e,
|
|
13
13
|
ariaLabel: m,
|
|
14
|
-
name: c
|
|
14
|
+
name: c,
|
|
15
|
+
...l
|
|
15
16
|
}) => {
|
|
16
|
-
const
|
|
17
|
+
const s = x(n), t = (r) => {
|
|
17
18
|
r !== o && a(r);
|
|
18
|
-
},
|
|
19
|
-
|
|
19
|
+
}, f = (r) => /* @__PURE__ */ h(
|
|
20
|
+
j,
|
|
20
21
|
{
|
|
21
22
|
...r,
|
|
22
23
|
key: r == null ? void 0 : r.value,
|
|
23
24
|
name: c,
|
|
24
|
-
color:
|
|
25
|
+
color: s,
|
|
25
26
|
isSelected: o === (r == null ? void 0 : r.value),
|
|
26
|
-
onChange:
|
|
27
|
+
onChange: t
|
|
27
28
|
}
|
|
28
29
|
);
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
30
|
+
return /* @__PURE__ */ u(
|
|
31
|
+
k,
|
|
31
32
|
{
|
|
32
33
|
role: "radiogroup",
|
|
33
34
|
"aria-label": e ? void 0 : m,
|
|
34
35
|
$isHorizonatal: d,
|
|
36
|
+
...l,
|
|
35
37
|
children: [
|
|
36
|
-
e && /* @__PURE__ */
|
|
37
|
-
i.map(
|
|
38
|
+
e && /* @__PURE__ */ g("legend", { children: e }),
|
|
39
|
+
i.map(f)
|
|
38
40
|
]
|
|
39
41
|
}
|
|
40
42
|
);
|
|
41
43
|
};
|
|
42
44
|
export {
|
|
43
|
-
|
|
45
|
+
y as default
|
|
44
46
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { LoaderWrapper as
|
|
3
|
-
import { SIZE as d, MEDIUM as c, THEME_SHADE as s, ANIMATION_DELAYS as
|
|
4
|
-
import { getTheme as
|
|
5
|
-
const
|
|
6
|
-
const { dot:
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */ a(
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as L, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { LoaderWrapper as g, VisuallyHidden as A, Dot as D } from "./styles.js";
|
|
3
|
+
import { SIZE as d, MEDIUM as c, THEME_SHADE as s, ANIMATION_DELAYS as I, BLUE as M } from "./constants.js";
|
|
4
|
+
import { getTheme as x } from "./helpers.js";
|
|
5
|
+
const B = ({ size: l = c, theme: n = M, isBounce: i, isMini: m, isMiniDark: p, ...E }) => {
|
|
6
|
+
const { dot: h, gap: u } = d[l] || d[c], t = x(n), r = I, $ = (p ? s.slice(2, 6) : m ? s.slice(0, 3) : s).map((o) => t[o] ?? t.m500), f = r.map(() => h);
|
|
7
|
+
return /* @__PURE__ */ L(g, { role: "status", $gap: u, ...E, children: [
|
|
8
|
+
/* @__PURE__ */ a(A, { children: "Loading" }),
|
|
9
|
+
f.map((o, e) => /* @__PURE__ */ a(
|
|
10
|
+
D,
|
|
11
11
|
{
|
|
12
12
|
"aria-hidden": "true",
|
|
13
13
|
$size: o,
|
|
14
|
-
$color:
|
|
14
|
+
$color: $[e],
|
|
15
15
|
$delay: r[e],
|
|
16
16
|
$isBounce: i
|
|
17
17
|
},
|
|
@@ -20,5 +20,5 @@ const j = ({ size: l = c, theme: n = I, isBounce: i, isMini: m, isMiniDark: p })
|
|
|
20
20
|
] });
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
B as default
|
|
24
24
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import i from "../../colors/grey.js";
|
|
3
3
|
import m from "../../colors/blue.js";
|
|
4
|
-
import
|
|
5
|
-
import { Wrapper as
|
|
6
|
-
const
|
|
4
|
+
import s from "../../colors/white.js";
|
|
5
|
+
import { Wrapper as k, PWrapper as v } from "./styles.js";
|
|
6
|
+
const w = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500, M = ({
|
|
7
7
|
id: o,
|
|
8
8
|
value: e,
|
|
9
9
|
label: l,
|
|
10
10
|
width: n = "20rem",
|
|
11
11
|
isSelected: t,
|
|
12
|
-
defaultColor: p =
|
|
12
|
+
defaultColor: p = s,
|
|
13
13
|
selectedColor: a = m.m200,
|
|
14
14
|
hoverColor: d = m.m50,
|
|
15
15
|
activeColor: f = m.m100,
|
|
@@ -17,9 +17,10 @@ const v = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500
|
|
|
17
17
|
size: $ = "1.2rem",
|
|
18
18
|
onSelect: u,
|
|
19
19
|
isDisabled: r,
|
|
20
|
-
onMouseEnter: C
|
|
20
|
+
onMouseEnter: C,
|
|
21
|
+
...g
|
|
21
22
|
}) => /* @__PURE__ */ c(
|
|
22
|
-
|
|
23
|
+
k,
|
|
23
24
|
{
|
|
24
25
|
$isSelected: t,
|
|
25
26
|
$width: n,
|
|
@@ -31,6 +32,7 @@ const v = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500
|
|
|
31
32
|
$isHighlighted: h,
|
|
32
33
|
id: o,
|
|
33
34
|
role: "option",
|
|
35
|
+
...g,
|
|
34
36
|
"aria-selected": t,
|
|
35
37
|
"aria-disabled": r || void 0,
|
|
36
38
|
onClick: () => {
|
|
@@ -38,9 +40,9 @@ const v = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500
|
|
|
38
40
|
},
|
|
39
41
|
onMouseEnter: C,
|
|
40
42
|
title: l,
|
|
41
|
-
children: /* @__PURE__ */ c(
|
|
43
|
+
children: /* @__PURE__ */ c(v, { size: $, color: w({ isSelected: t, isDisabled: r }), $width: n, children: l })
|
|
42
44
|
}
|
|
43
45
|
);
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
M as default
|
|
46
48
|
};
|