meticulous-ui 2.2.8 → 2.2.9
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 +83 -82
- package/components/Dropdown/styles.js +4 -4
- package/components/Glass/Glass.js +6 -0
- package/components/Glass/index.js +4 -0
- package/components/Glass/styles.js +73 -0
- package/components/Icons/Add/index.js +4 -0
- package/components/Icons/MediaPauseFilled/index.js +4 -0
- package/components/Icons/MediaPlayFilled/index.js +4 -0
- package/components/Icons/MediaStopFilled/index.js +4 -0
- package/components/Input/Checkbox/Checkbox.js +39 -0
- package/components/Input/Checkbox/helpers.js +28 -0
- package/components/Input/Checkbox/index.js +4 -0
- package/components/Input/Checkbox/styles.js +30 -0
- package/components/Input/Radio/Radio.js +26 -0
- package/components/Input/Radio/styles.js +45 -0
- package/components/Input/RadioGroup/RadioGroup.js +27 -0
- package/components/Input/RadioGroup/index.js +4 -0
- package/components/Input/RadioGroup/styles.js +18 -0
- package/components/Input/Textarea/styles.js +4 -4
- package/components/MenuItem/styles.js +4 -4
- package/components/OtpInput/OtpInput.js +30 -29
- package/components/Pagination/styles.js +6 -6
- package/components/Spinner/Spinner.js +11 -10
- package/components/Timer/Timer.js +64 -0
- package/components/Timer/components/TimerRing/TimerRing.js +42 -0
- package/components/Timer/components/TimerRing/styles.js +7 -0
- package/components/Timer/constants.js +25 -0
- package/components/Timer/index.js +4 -0
- package/components/Timer/styles.js +164 -0
- package/components/Typography/Headings/H1.js +9 -0
- package/components/Typography/Headings/H2.js +9 -0
- package/components/Typography/Headings/H3.js +9 -0
- package/components/Typography/Headings/H4.js +9 -0
- package/components/Typography/Headings/H5.js +9 -0
- package/components/Typography/Headings/H6.js +9 -0
- package/components/VideoPlayer/VideoPlayer.js +34 -0
- package/components/VideoPlayer/components/Volumebar/Volumebar.js +13 -0
- package/components/VideoPlayer/components/Volumebar/styles.js +38 -0
- package/components/VideoPlayer/index.js +4 -0
- package/components/VideoPlayer/styles.js +34 -0
- package/components/VideoPlayer/useSpacebarToggle.js +37 -0
- package/components/VideoPlayer/useVolumeOverlay.js +10 -0
- package/index.js +38 -16
- package/package.json +9 -6
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
import { j as r } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as C, useRef as S, useMemo as
|
|
3
|
-
import
|
|
2
|
+
import { useState as C, useRef as S, useMemo as ee, useEffect as d, useLayoutEffect as te, useCallback as ne, createElement as re } from "react";
|
|
3
|
+
import se from "../../node_modules/lodash-es/get.js";
|
|
4
4
|
import I from "../../colors/grey.js";
|
|
5
5
|
import oe from "../MenuItem/MenuItem.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { DropdownWrapper as
|
|
10
|
-
const
|
|
11
|
-
if (typeof
|
|
12
|
-
if (
|
|
13
|
-
if (
|
|
14
|
-
const E = parseFloat(
|
|
6
|
+
import ie from "../../colors/index.js";
|
|
7
|
+
import ce from "../../colors/blue.js";
|
|
8
|
+
import P from "../Spinner/Spinner.js";
|
|
9
|
+
import { DropdownWrapper as le, Box as fe, PWrapper as ue, ChevronDownWrapper as pe, OptionWrapper as ae, SearchContainer as de, SearchIcon as me, SearchInput as he, OptionsList as xe, LoadMoreSentinel as be, SpinnerWrapper as ge } from "./styles.js";
|
|
10
|
+
const we = (s) => {
|
|
11
|
+
if (typeof s != "string") return s;
|
|
12
|
+
if (s.endsWith("px")) return parseFloat(s);
|
|
13
|
+
if (s.endsWith("rem")) {
|
|
14
|
+
const E = parseFloat(s), i = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
15
15
|
return E * i;
|
|
16
16
|
}
|
|
17
|
-
return parseFloat(
|
|
18
|
-
},
|
|
19
|
-
options:
|
|
17
|
+
return parseFloat(s);
|
|
18
|
+
}, De = ({
|
|
19
|
+
options: s,
|
|
20
20
|
onChange: E,
|
|
21
21
|
value: i,
|
|
22
22
|
width: m = "20rem",
|
|
23
23
|
menuHeight: O = "20rem",
|
|
24
|
-
placeholder:
|
|
25
|
-
theme:
|
|
24
|
+
placeholder: A,
|
|
25
|
+
theme: B = "blue",
|
|
26
26
|
isLoading: $,
|
|
27
27
|
isDisabled: v,
|
|
28
28
|
loaderColor: y,
|
|
29
29
|
searchable: h = !1,
|
|
30
|
-
onLoadMore:
|
|
30
|
+
onLoadMore: c,
|
|
31
31
|
hasMore: x = !1,
|
|
32
|
-
isLoadingMore:
|
|
33
|
-
searchPh:
|
|
32
|
+
isLoadingMore: p = !1,
|
|
33
|
+
searchPh: H = "Search..."
|
|
34
34
|
}) => {
|
|
35
|
-
|
|
35
|
+
var F;
|
|
36
|
+
const [n, j] = C(!1), [V, K] = C("bottom"), [b, D] = C(""), [f, a] = C(-1), g = S(null), w = S(null), k = S(null), R = S(null), Q = S(!0), q = () => j((e) => !e), z = (e) => {
|
|
36
37
|
e !== i && (E(e), j(!1));
|
|
37
|
-
},
|
|
38
|
-
if (!h || !b.trim()) return
|
|
38
|
+
}, l = ee(() => {
|
|
39
|
+
if (!h || !b.trim()) return s;
|
|
39
40
|
const e = b.toLowerCase();
|
|
40
|
-
return
|
|
41
|
-
}, [
|
|
41
|
+
return s.filter(({ label: t }) => t.toLowerCase().includes(e));
|
|
42
|
+
}, [s, b, h]);
|
|
42
43
|
d(() => {
|
|
43
44
|
if (n) {
|
|
44
|
-
const e =
|
|
45
|
-
if (e !== -1 && !
|
|
46
|
-
|
|
45
|
+
const e = l.findIndex((t) => t.value === i);
|
|
46
|
+
if (e !== -1 && !l[e].disabled)
|
|
47
|
+
a(e);
|
|
47
48
|
else {
|
|
48
|
-
const t =
|
|
49
|
-
|
|
49
|
+
const t = l.findIndex((o) => !o.disabled);
|
|
50
|
+
a(t);
|
|
50
51
|
}
|
|
51
52
|
} else
|
|
52
|
-
D(""),
|
|
53
|
-
}, [n, b,
|
|
53
|
+
D(""), a(-1);
|
|
54
|
+
}, [n, b, l, i]), d(() => {
|
|
54
55
|
if (n && f !== -1 && w.current) {
|
|
55
56
|
const e = w.current.children[f];
|
|
56
57
|
e && e.scrollIntoView({
|
|
@@ -61,63 +62,63 @@ const ge = (o) => {
|
|
|
61
62
|
}, [f, n]), d(() => {
|
|
62
63
|
n && h && k.current && k.current.focus();
|
|
63
64
|
}, [n, h]), d(() => {
|
|
64
|
-
n || (
|
|
65
|
+
n || (Q.current = !0);
|
|
65
66
|
}, [n]), d(() => {
|
|
66
67
|
const e = (t) => {
|
|
67
68
|
g.current && !g.current.contains(t.target) && j(!1);
|
|
68
69
|
};
|
|
69
70
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
70
|
-
}, []),
|
|
71
|
+
}, []), te(() => {
|
|
71
72
|
if (n && w.current && g.current) {
|
|
72
|
-
const e = g.current.getBoundingClientRect(), t = window.innerHeight,
|
|
73
|
-
|
|
74
|
-
u <
|
|
73
|
+
const e = g.current.getBoundingClientRect(), t = window.innerHeight, o = we(O), u = t - e.bottom;
|
|
74
|
+
K(
|
|
75
|
+
u < o + 8 && e.top > u ? "top" : "bottom"
|
|
75
76
|
);
|
|
76
77
|
}
|
|
77
78
|
}, [n, O]);
|
|
78
|
-
const
|
|
79
|
+
const N = (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
|
+
}, U = (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
|
+
}, G = (e) => {
|
|
93
94
|
if (n)
|
|
94
95
|
switch (e.key) {
|
|
95
96
|
case "ArrowDown":
|
|
96
97
|
e.preventDefault();
|
|
97
|
-
const t =
|
|
98
|
-
t === f && x && !
|
|
98
|
+
const t = N(f);
|
|
99
|
+
t === f && x && !p && (c == null || c()), a(t);
|
|
99
100
|
break;
|
|
100
101
|
case "ArrowUp":
|
|
101
|
-
e.preventDefault(),
|
|
102
|
+
e.preventDefault(), a((u) => U(u));
|
|
102
103
|
break;
|
|
103
104
|
case "Enter":
|
|
104
105
|
e.preventDefault();
|
|
105
|
-
const
|
|
106
|
-
|
|
106
|
+
const o = l[f];
|
|
107
|
+
o && !o.disabled && z(o.value);
|
|
107
108
|
break;
|
|
108
109
|
case "Escape":
|
|
109
110
|
j(!1);
|
|
110
111
|
break;
|
|
111
112
|
}
|
|
112
|
-
}, W =
|
|
113
|
-
x && !
|
|
114
|
-
}, [x,
|
|
113
|
+
}, W = ne(() => {
|
|
114
|
+
x && !p && c && c();
|
|
115
|
+
}, [x, p, c]);
|
|
115
116
|
d(() => {
|
|
116
117
|
const e = R.current;
|
|
117
|
-
if (!e || !
|
|
118
|
+
if (!e || !c || !x) return;
|
|
118
119
|
const t = new IntersectionObserver(
|
|
119
|
-
([
|
|
120
|
-
|
|
120
|
+
([o]) => {
|
|
121
|
+
o.isIntersecting && !p && W();
|
|
121
122
|
},
|
|
122
123
|
{
|
|
123
124
|
root: w.current,
|
|
@@ -128,70 +129,70 @@ const ge = (o) => {
|
|
|
128
129
|
}
|
|
129
130
|
);
|
|
130
131
|
return t.observe(e), () => t.disconnect();
|
|
131
|
-
}, [W,
|
|
132
|
+
}, [W, c, x, p]);
|
|
132
133
|
const {
|
|
133
|
-
m50:
|
|
134
|
-
m100:
|
|
135
|
-
m200:
|
|
136
|
-
m500:
|
|
137
|
-
} =
|
|
134
|
+
m50: J,
|
|
135
|
+
m100: T,
|
|
136
|
+
m200: X,
|
|
137
|
+
m500: Y
|
|
138
|
+
} = se(ie, B, ce), Z = (e, t) => () => !e && a(t), _ = ({ value: e, label: t, disabled: o }, u) => /* @__PURE__ */ re(
|
|
138
139
|
oe,
|
|
139
140
|
{
|
|
140
141
|
value: e,
|
|
141
142
|
label: t,
|
|
142
|
-
isDisabled:
|
|
143
|
+
isDisabled: o,
|
|
143
144
|
onSelect: z,
|
|
144
|
-
onMouseEnter:
|
|
145
|
+
onMouseEnter: Z(o, u),
|
|
145
146
|
isSelected: e === i,
|
|
146
147
|
isHighlighted: u === f,
|
|
147
148
|
key: e,
|
|
148
149
|
width: m,
|
|
149
|
-
selectedColor:
|
|
150
|
-
hoverColor:
|
|
151
|
-
activeColor:
|
|
150
|
+
selectedColor: X,
|
|
151
|
+
hoverColor: J,
|
|
152
|
+
activeColor: T
|
|
152
153
|
}
|
|
153
|
-
),
|
|
154
|
+
), L = (e) => {
|
|
154
155
|
D(e.target.value);
|
|
155
|
-
},
|
|
156
|
+
}, M = (e) => {
|
|
156
157
|
e.stopPropagation();
|
|
157
158
|
};
|
|
158
159
|
return /* @__PURE__ */ r.jsxs(
|
|
159
|
-
|
|
160
|
+
le,
|
|
160
161
|
{
|
|
161
162
|
ref: g,
|
|
162
163
|
$width: m,
|
|
163
164
|
tabIndex: v ? -1 : 0,
|
|
164
|
-
onKeyDown:
|
|
165
|
+
onKeyDown: G,
|
|
165
166
|
$isLoading: $,
|
|
166
167
|
$isDisabled: v,
|
|
167
168
|
children: [
|
|
168
|
-
/* @__PURE__ */ r.jsxs(
|
|
169
|
-
/* @__PURE__ */ r.jsx(
|
|
170
|
-
/* @__PURE__ */ r.jsx(
|
|
169
|
+
/* @__PURE__ */ r.jsxs(fe, { $width: m, onClick: q, $isOpen: n, $border: Y, children: [
|
|
170
|
+
/* @__PURE__ */ r.jsx(ue, { $width: m, color: i ? I.m700 : I.m500, size: "1.2rem", children: i ? (F = s.find(({ value: e }) => i === e)) == null ? void 0 : F.label : A }),
|
|
171
|
+
/* @__PURE__ */ r.jsx(pe, { color: I.m500, size: 22, $isOpen: n })
|
|
171
172
|
] }),
|
|
172
|
-
/* @__PURE__ */ r.jsxs(ae, { $isOpen: n, $width: m, $height: O, $top:
|
|
173
|
-
h && /* @__PURE__ */ r.jsxs(
|
|
174
|
-
/* @__PURE__ */ r.jsx(
|
|
173
|
+
/* @__PURE__ */ r.jsxs(ae, { $isOpen: n, $width: m, $height: O, $top: V === "top", children: [
|
|
174
|
+
h && /* @__PURE__ */ r.jsxs(de, { onClick: M, children: [
|
|
175
|
+
/* @__PURE__ */ r.jsx(me, { size: 20, color: I.m600 }),
|
|
175
176
|
/* @__PURE__ */ r.jsx(
|
|
176
|
-
|
|
177
|
+
he,
|
|
177
178
|
{
|
|
178
179
|
ref: k,
|
|
179
180
|
value: b,
|
|
180
|
-
onChange:
|
|
181
|
-
placeholder:
|
|
181
|
+
onChange: L,
|
|
182
|
+
placeholder: H
|
|
182
183
|
}
|
|
183
184
|
)
|
|
184
185
|
] }),
|
|
185
|
-
/* @__PURE__ */ r.jsxs(
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
/* @__PURE__ */ r.jsxs(xe, { ref: w, children: [
|
|
187
|
+
l.map(_),
|
|
188
|
+
c && /* @__PURE__ */ r.jsx(be, { ref: R, children: p && /* @__PURE__ */ r.jsx(P, { size: "small", color: y }) })
|
|
188
189
|
] })
|
|
189
190
|
] }),
|
|
190
|
-
$ && /* @__PURE__ */ r.jsx(
|
|
191
|
+
$ && /* @__PURE__ */ r.jsx(ge, { children: /* @__PURE__ */ r.jsx(P, { size: "small", color: y }) })
|
|
191
192
|
]
|
|
192
193
|
}
|
|
193
194
|
);
|
|
194
195
|
};
|
|
195
196
|
export {
|
|
196
|
-
|
|
197
|
+
De as default
|
|
197
198
|
};
|
|
@@ -114,9 +114,9 @@ const c = n`
|
|
|
114
114
|
&::placeholder {
|
|
115
115
|
color: ${t.m400};
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`, E = e(d)`
|
|
118
118
|
margin: 0 0.8rem;
|
|
119
|
-
`,
|
|
119
|
+
`, L = e.div`
|
|
120
120
|
display: flex;
|
|
121
121
|
justify-content: center;
|
|
122
122
|
align-items: center;
|
|
@@ -128,12 +128,12 @@ export {
|
|
|
128
128
|
$ as Box,
|
|
129
129
|
S as ChevronDownWrapper,
|
|
130
130
|
w as DropdownWrapper,
|
|
131
|
-
|
|
131
|
+
L as LoadMoreSentinel,
|
|
132
132
|
k as OptionWrapper,
|
|
133
133
|
D as OptionsList,
|
|
134
134
|
y as PWrapper,
|
|
135
135
|
z as SearchContainer,
|
|
136
|
-
|
|
136
|
+
E as SearchIcon,
|
|
137
137
|
C as SearchInput,
|
|
138
138
|
W as SpinnerWrapper
|
|
139
139
|
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import a from "../../node_modules/styled-components/dist/styled-components.browser.esm.js";
|
|
2
|
+
const e = a.div`
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
border-radius: ${({ $borderRadius: r }) => r};
|
|
6
|
+
position: relative;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
|
|
10
|
+
background:
|
|
11
|
+
radial-gradient(
|
|
12
|
+
60rem 22rem at 50% 45%,
|
|
13
|
+
rgba(20, 40, 20, 0.06),
|
|
14
|
+
rgba(10, 25, 10, 0.02) 50%,
|
|
15
|
+
transparent 70%
|
|
16
|
+
),
|
|
17
|
+
linear-gradient(
|
|
18
|
+
180deg,
|
|
19
|
+
rgba(255, 255, 255, 0.18) 0%,
|
|
20
|
+
rgba(255, 255, 255, 0.06) 40%,
|
|
21
|
+
rgba(255, 255, 255, 0.03) 100%
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
box-shadow:
|
|
25
|
+
0 3rem 6rem rgba(7, 22, 10, 0.3),
|
|
26
|
+
0 2px 0 rgba(255, 255, 255, 0.03) inset;
|
|
27
|
+
|
|
28
|
+
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
29
|
+
color: rgba(8, 34, 16, 0.95);
|
|
30
|
+
|
|
31
|
+
::before {
|
|
32
|
+
content: '';
|
|
33
|
+
position: absolute;
|
|
34
|
+
left: -12%;
|
|
35
|
+
top: -24%;
|
|
36
|
+
width: 62%;
|
|
37
|
+
height: 62%;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
background: radial-gradient(
|
|
40
|
+
circle,
|
|
41
|
+
rgba(255, 255, 255, 0.24),
|
|
42
|
+
rgba(255, 255, 255, 0.06) 40%,
|
|
43
|
+
transparent 60%
|
|
44
|
+
);
|
|
45
|
+
filter: blur(4.6rem);
|
|
46
|
+
opacity: 0.85;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
transform: translateZ(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
::after {
|
|
52
|
+
content: '';
|
|
53
|
+
position: absolute;
|
|
54
|
+
right: -6%;
|
|
55
|
+
bottom: -18%;
|
|
56
|
+
width: 68%;
|
|
57
|
+
height: 68%;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
background: radial-gradient(
|
|
60
|
+
circle at 30% 40%,
|
|
61
|
+
rgba(255, 255, 255, 0.08),
|
|
62
|
+
rgba(255, 255, 255, 0.01) 40%,
|
|
63
|
+
transparent 70%
|
|
64
|
+
);
|
|
65
|
+
filter: blur(5.4rem);
|
|
66
|
+
opacity: 0.45;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
transform: translateZ(0);
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
export {
|
|
72
|
+
e as GlassWrapper
|
|
73
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { j as o } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import m from "../../../node_modules/lodash-es/get.js";
|
|
3
|
+
import f from "../../../colors/grey.js";
|
|
4
|
+
import x from "../../Typography/P/P.js";
|
|
5
|
+
import u from "../../../colors/white.js";
|
|
6
|
+
import c from "../../../colors/blue.js";
|
|
7
|
+
import { Wrapper as j, Box as k } from "./styles.js";
|
|
8
|
+
import { getColor as g } from "./helpers.js";
|
|
9
|
+
const E = ({ label: s, value: r, color: n = "blue", textColor: p = f.m700, disabled: e, onChange: t }) => {
|
|
10
|
+
const h = () => {
|
|
11
|
+
e || t(!r);
|
|
12
|
+
}, i = g(n), a = m(i, "m500", c.m500), l = m(i, "m800", c.m800);
|
|
13
|
+
return /* @__PURE__ */ o.jsxs(j, { onClick: h, $disabled: e, children: [
|
|
14
|
+
/* @__PURE__ */ o.jsx(
|
|
15
|
+
"input",
|
|
16
|
+
{
|
|
17
|
+
type: "checkbox",
|
|
18
|
+
checked: r,
|
|
19
|
+
onChange: (d) => t(d.target.checked),
|
|
20
|
+
disabled: e,
|
|
21
|
+
style: { position: "absolute", opacity: 0, width: 0, height: 0 }
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ o.jsx(
|
|
25
|
+
k,
|
|
26
|
+
{
|
|
27
|
+
$value: r,
|
|
28
|
+
size: 6,
|
|
29
|
+
color: u,
|
|
30
|
+
$innerShade: a,
|
|
31
|
+
$outerShade: l
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ o.jsx(x, { color: p, size: "1.2rem", children: s })
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
E as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import m from "../../../node_modules/lodash-es/get.js";
|
|
2
|
+
import o from "../../../colors/blue.js";
|
|
3
|
+
import t from "../../../colors/green.js";
|
|
4
|
+
import p from "../../../colors/red.js";
|
|
5
|
+
import i from "../../../colors/yellow.js";
|
|
6
|
+
import e from "../../../colors/orange.js";
|
|
7
|
+
import f from "../../../colors/black.js";
|
|
8
|
+
import l from "../../../colors/grey.js";
|
|
9
|
+
import g from "../../../colors/violet.js";
|
|
10
|
+
import n from "../../../colors/teal.js";
|
|
11
|
+
import a from "../../../colors/purple.js";
|
|
12
|
+
import c from "../../../colors/pink.js";
|
|
13
|
+
const b = {
|
|
14
|
+
blue: o,
|
|
15
|
+
green: t,
|
|
16
|
+
red: p,
|
|
17
|
+
yellow: i,
|
|
18
|
+
orange: e,
|
|
19
|
+
black: f,
|
|
20
|
+
grey: l,
|
|
21
|
+
violet: g,
|
|
22
|
+
teal: n,
|
|
23
|
+
purple: a,
|
|
24
|
+
pink: c
|
|
25
|
+
}, D = (r) => m(b, r, o.m500);
|
|
26
|
+
export {
|
|
27
|
+
D as getColor
|
|
28
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import t, { css as e } from "../../../node_modules/styled-components/dist/styled-components.browser.esm.js";
|
|
2
|
+
import i from "../../Icons/Check/Check.js";
|
|
3
|
+
import n from "../../../colors/grey.js";
|
|
4
|
+
const m = t.div`
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 0.8rem;
|
|
9
|
+
width: max-content;
|
|
10
|
+
|
|
11
|
+
${({ $disabled: r }) => r && e`
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
opacity: 0.7;
|
|
14
|
+
`}
|
|
15
|
+
`, c = t(i)`
|
|
16
|
+
width: 1.2rem;
|
|
17
|
+
height: 1.2rem;
|
|
18
|
+
border: 1px solid ${({ $value: r, $outerShade: o }) => r ? o : n.m800};
|
|
19
|
+
border-radius: 0.2rem;
|
|
20
|
+
background-color: ${({ $value: r, $innerShade: o }) => r ? o : "transparent"};
|
|
21
|
+
transition: background-color 0.35s ease;
|
|
22
|
+
|
|
23
|
+
path {
|
|
24
|
+
stroke-width: 3;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
export {
|
|
28
|
+
c as Box,
|
|
29
|
+
m as Wrapper
|
|
30
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import s from "../../../node_modules/lodash-es/get.js";
|
|
3
|
+
import j from "../../Typography/P/P.js";
|
|
4
|
+
import i from "../../../colors/blue.js";
|
|
5
|
+
import { Wrapper as l, HiddenInput as f, CircleBorder as u, Circle as $ } from "./styles.js";
|
|
6
|
+
const b = ({ label: m, value: o, name: d, color: t, textColor: a, isSelected: e, disabled: n, onChange: c }) => {
|
|
7
|
+
const p = s(t, "m500", i.m500), h = s(t, "m800", i.m800), x = () => c(o);
|
|
8
|
+
return /* @__PURE__ */ r.jsxs(l, { $disabled: n, children: [
|
|
9
|
+
/* @__PURE__ */ r.jsx(
|
|
10
|
+
f,
|
|
11
|
+
{
|
|
12
|
+
type: "radio",
|
|
13
|
+
name: d,
|
|
14
|
+
value: o,
|
|
15
|
+
checked: e,
|
|
16
|
+
disabled: n,
|
|
17
|
+
onChange: x
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ r.jsx(u, { $isSelected: e, $shade: h, children: /* @__PURE__ */ r.jsx($, { $isSelected: e, $shade: p }) }),
|
|
21
|
+
/* @__PURE__ */ r.jsx(j, { color: a, size: "1.2rem", children: m })
|
|
22
|
+
] });
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
b as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import t, { css as o } from "../../../node_modules/styled-components/dist/styled-components.browser.esm.js";
|
|
2
|
+
import i from "../../../colors/grey.js";
|
|
3
|
+
const a = t.div`
|
|
4
|
+
position: absolute;
|
|
5
|
+
width: 0.7rem;
|
|
6
|
+
height: 0.7rem;
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
left: 50%;
|
|
9
|
+
top: 50%;
|
|
10
|
+
transform: translate(-50%, -50%);
|
|
11
|
+
background-color: ${({ $isSelected: r, $shade: e }) => r ? e : "transparent"};
|
|
12
|
+
transition: background-color 0.35s ease;
|
|
13
|
+
`, p = t.div`
|
|
14
|
+
width: 1.1rem;
|
|
15
|
+
height: 1.1rem;
|
|
16
|
+
border: 1px solid ${({ $isSelected: r, $shade: e }) => r ? e : i.m900};
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
position: relative;
|
|
19
|
+
`, d = t.input`
|
|
20
|
+
position: absolute;
|
|
21
|
+
opacity: 0;
|
|
22
|
+
width: 0;
|
|
23
|
+
height: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
`, c = t.label`
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 0.8rem;
|
|
30
|
+
width: max-content;
|
|
31
|
+
|
|
32
|
+
${({ $disabled: r }) => r ? o`
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
opacity: 0.4;
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
` : o`
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
`}
|
|
39
|
+
`;
|
|
40
|
+
export {
|
|
41
|
+
a as Circle,
|
|
42
|
+
p as CircleBorder,
|
|
43
|
+
d as HiddenInput,
|
|
44
|
+
c as Wrapper
|
|
45
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { j as i } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { createElement as f } from "react";
|
|
3
|
+
import { getColor as u } from "../Checkbox/helpers.js";
|
|
4
|
+
import x from "../Radio/Radio.js";
|
|
5
|
+
import { Wrapper as h } from "./styles.js";
|
|
6
|
+
const C = ({ options: n, color: s = "blue", value: e, onChange: m, isHorizonatal: a, label: o, name: c }) => {
|
|
7
|
+
const d = u(s), l = (r) => {
|
|
8
|
+
r !== e && m(r);
|
|
9
|
+
}, t = (r) => /* @__PURE__ */ f(
|
|
10
|
+
x,
|
|
11
|
+
{
|
|
12
|
+
...r,
|
|
13
|
+
key: r == null ? void 0 : r.value,
|
|
14
|
+
name: c,
|
|
15
|
+
color: d,
|
|
16
|
+
isSelected: e === (r == null ? void 0 : r.value),
|
|
17
|
+
onChange: l
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ i.jsxs(h, { $isHorizonatal: a, children: [
|
|
21
|
+
o && /* @__PURE__ */ i.jsx("legend", { children: o }),
|
|
22
|
+
n.map(t)
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
C as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import t, { css as r } from "../../../node_modules/styled-components/dist/styled-components.browser.esm.js";
|
|
2
|
+
const o = t.fieldset`
|
|
3
|
+
border: none;
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: ${({ $isHorizonatal: e }) => e ? "row" : "column"};
|
|
8
|
+
|
|
9
|
+
${({ $isHorizonatal: e }) => e ? r`
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
` : r`
|
|
13
|
+
gap: 1.2rem;
|
|
14
|
+
`};
|
|
15
|
+
`;
|
|
16
|
+
export {
|
|
17
|
+
o as Wrapper
|
|
18
|
+
};
|
|
@@ -54,7 +54,7 @@ const b = o.textarea`
|
|
|
54
54
|
`, h = o.div`
|
|
55
55
|
position: relative;
|
|
56
56
|
width: fit-content;
|
|
57
|
-
`,
|
|
57
|
+
`, g = o.div`
|
|
58
58
|
position: absolute;
|
|
59
59
|
top: -0.4rem;
|
|
60
60
|
left: 0.5rem;
|
|
@@ -83,13 +83,13 @@ const b = o.textarea`
|
|
|
83
83
|
left: 0.5rem;
|
|
84
84
|
font-size: 1.4rem;
|
|
85
85
|
`}
|
|
86
|
-
`,
|
|
86
|
+
`, u = o.div`
|
|
87
87
|
overflow: hidden;
|
|
88
88
|
`;
|
|
89
89
|
export {
|
|
90
90
|
w as HelperText,
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
g as Label,
|
|
92
|
+
u as Parent,
|
|
93
93
|
b as TextareaBox,
|
|
94
94
|
h as Wrapper
|
|
95
95
|
};
|