@arthurzakharov/ui-kit 1.0.6 → 1.0.7
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/assets/card-image-DQ9c4G_r.css +1 -0
- package/dist/assets/card-text-fgHu9TyO.css +1 -0
- package/dist/assets/checkbox-n_3O8ZLW.css +1 -0
- package/dist/assets/dropdown-DKR8xas9.css +1 -0
- package/dist/assets/radio-BkD7BKk0.css +1 -0
- package/dist/assets/text-Dt0DeN-I.css +1 -0
- package/dist/assets/textarea-qkrRnSO5.css +1 -0
- package/dist/components/certifications/certifications.component.d.ts +5 -1
- package/dist/components/control/components/box/box.component.d.ts +9 -1
- package/dist/components/control/components/box/box.component.js +13 -13
- package/dist/components/control/components/button/button.component.d.ts +12 -1
- package/dist/components/control/components/button/button.component.js +26 -26
- package/dist/components/control/components/card-image/card-image.component.d.ts +6 -1
- package/dist/components/control/components/card-image/card-image.component.js +57 -5
- package/dist/components/control/components/card-text/card-text.component.d.ts +5 -1
- package/dist/components/control/components/card-text/card-text.component.js +45 -5
- package/dist/components/control/components/checkbox/checkbox.component.d.ts +5 -1
- package/dist/components/control/components/checkbox/checkbox.component.js +49 -5
- package/dist/components/control/components/choice/choice.component.d.ts +8 -1
- package/dist/components/control/components/dropdown/dropdown.component.d.ts +14 -1
- package/dist/components/control/components/dropdown/dropdown.component.js +95 -9
- package/dist/components/control/components/hidden-input/hidden-input.component.d.ts +11 -1
- package/dist/components/control/components/hidden-input/hidden-input.component.js +14 -15
- package/dist/components/control/components/input/input.component.d.ts +7 -1
- package/dist/components/control/components/input/input.component.js +25 -25
- package/dist/components/control/components/label/label.component.d.ts +6 -1
- package/dist/components/control/components/radio/radio.component.d.ts +6 -1
- package/dist/components/control/components/radio/radio.component.js +54 -5
- package/dist/components/control/components/radio-label/radio-label.component.d.ts +16 -2
- package/dist/components/control/components/radio-text/radio-text.component.d.ts +6 -1
- package/dist/components/control/components/text/text.component.d.ts +6 -1
- package/dist/components/control/components/text/text.component.js +47 -5
- package/dist/components/control/components/textarea/textarea.component.d.ts +8 -1
- package/dist/components/control/components/textarea/textarea.component.js +34 -4
- package/dist/components/control/control.component.d.ts +17 -0
- package/dist/components/control/control.component.js +35 -0
- package/dist/main.d.ts +2 -2
- package/dist/main.js +1 -1
- package/dist/utils/converter/converter.d.ts +2 -1
- package/package.json +12 -4
- package/dist/assets/index-CqamBlbE.css +0 -1
- package/dist/components/certifications/certifications.types.d.ts +0 -5
- package/dist/components/certifications/certifications.types.js +0 -1
- package/dist/components/certifications/index.d.ts +0 -1
- package/dist/components/certifications/index.js +0 -4
- package/dist/components/control/components/box/box.types.d.ts +0 -9
- package/dist/components/control/components/box/box.types.js +0 -1
- package/dist/components/control/components/box/index.d.ts +0 -1
- package/dist/components/control/components/box/index.js +0 -4
- package/dist/components/control/components/button/button.types.d.ts +0 -16
- package/dist/components/control/components/button/button.types.js +0 -1
- package/dist/components/control/components/button/index.d.ts +0 -1
- package/dist/components/control/components/button/index.js +0 -4
- package/dist/components/control/components/card-image/card-image.types.d.ts +0 -6
- package/dist/components/control/components/card-image/card-image.types.js +0 -1
- package/dist/components/control/components/card-image/index.d.ts +0 -1
- package/dist/components/control/components/card-image/index.js +0 -4
- package/dist/components/control/components/card-text/card-text.types.d.ts +0 -5
- package/dist/components/control/components/card-text/card-text.types.js +0 -1
- package/dist/components/control/components/card-text/index.d.ts +0 -1
- package/dist/components/control/components/card-text/index.js +0 -4
- package/dist/components/control/components/checkbox/checkbox.types.d.ts +0 -5
- package/dist/components/control/components/checkbox/checkbox.types.js +0 -1
- package/dist/components/control/components/checkbox/index.d.ts +0 -1
- package/dist/components/control/components/checkbox/index.js +0 -4
- package/dist/components/control/components/choice/choice.types.d.ts +0 -8
- package/dist/components/control/components/choice/choice.types.js +0 -1
- package/dist/components/control/components/choice/index.d.ts +0 -1
- package/dist/components/control/components/choice/index.js +0 -4
- package/dist/components/control/components/dropdown/dropdown.types.d.ts +0 -14
- package/dist/components/control/components/dropdown/dropdown.types.js +0 -1
- package/dist/components/control/components/dropdown/index.d.ts +0 -1
- package/dist/components/control/components/dropdown/index.js +0 -4
- package/dist/components/control/components/hidden-input/hidden-input.types.d.ts +0 -11
- package/dist/components/control/components/hidden-input/hidden-input.types.js +0 -1
- package/dist/components/control/components/hidden-input/index.d.ts +0 -1
- package/dist/components/control/components/hidden-input/index.js +0 -4
- package/dist/components/control/components/input/index.d.ts +0 -1
- package/dist/components/control/components/input/index.js +0 -4
- package/dist/components/control/components/input/input.types.d.ts +0 -7
- package/dist/components/control/components/input/input.types.js +0 -1
- package/dist/components/control/components/label/index.d.ts +0 -1
- package/dist/components/control/components/label/index.js +0 -4
- package/dist/components/control/components/label/label.types.d.ts +0 -8
- package/dist/components/control/components/label/label.types.js +0 -1
- package/dist/components/control/components/radio/index.d.ts +0 -1
- package/dist/components/control/components/radio/index.js +0 -4
- package/dist/components/control/components/radio/radio.types.d.ts +0 -6
- package/dist/components/control/components/radio/radio.types.js +0 -1
- package/dist/components/control/components/radio-label/index.d.ts +0 -1
- package/dist/components/control/components/radio-label/index.js +0 -4
- package/dist/components/control/components/radio-label/radio-label.types.d.ts +0 -17
- package/dist/components/control/components/radio-label/radio-label.types.js +0 -1
- package/dist/components/control/components/radio-text/index.d.ts +0 -1
- package/dist/components/control/components/radio-text/index.js +0 -4
- package/dist/components/control/components/radio-text/radio-text.types.d.ts +0 -6
- package/dist/components/control/components/radio-text/radio-text.types.js +0 -1
- package/dist/components/control/components/text/index.d.ts +0 -1
- package/dist/components/control/components/text/index.js +0 -4
- package/dist/components/control/components/text/text.types.d.ts +0 -6
- package/dist/components/control/components/text/text.types.js +0 -1
- package/dist/components/control/components/textarea/index.d.ts +0 -1
- package/dist/components/control/components/textarea/index.js +0 -4
- package/dist/components/control/components/textarea/textarea.types.d.ts +0 -8
- package/dist/components/control/components/textarea/textarea.types.js +0 -1
- package/dist/components/control/hooks/index.d.ts +0 -1
- package/dist/components/control/hooks/index.js +0 -4
- package/dist/components/control/hooks/useChoice/index.d.ts +0 -1
- package/dist/components/control/hooks/useChoice/index.js +0 -4
- package/dist/components/control/index.d.ts +0 -17
- package/dist/components/control/index.js +0 -12
- package/dist/components/control/types.js +0 -1
- package/dist/components/control/utils/index.d.ts +0 -1
- package/dist/components/control/utils/index.js +0 -6
- package/dist/enums.d.ts +0 -14
- package/dist/enums.js +0 -4
- package/dist/index-DtupH5zG.js +0 -405
- package/dist/types.d.ts +0 -3
- package/dist/types.js +0 -1
- package/dist/utils/converter/index.d.ts +0 -1
- package/dist/utils/converter/index.js +0 -4
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -6
- package/dist/utils/time/index.d.ts +0 -1
- package/dist/utils/time/index.js +0 -4
package/dist/index-DtupH5zG.js
DELETED
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
import { Box as X } from "./components/control/components/box/box.component.js";
|
|
2
|
-
import { Button as Y } from "./components/control/components/button/button.component.js";
|
|
3
|
-
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
4
|
-
import { useChoice as K } from "./components/control/hooks/useChoice/useChoice.hook.js";
|
|
5
|
-
import { getChoiceId as W, clickHasNode as Z } from "./components/control/utils/utils.js";
|
|
6
|
-
import { useToggle as H, useBoolean as q, useResizeObserver as ee, useOnClickOutside as oe } from "usehooks-ts";
|
|
7
|
-
import { Converter as P } from "./utils/converter/converter.js";
|
|
8
|
-
import { Choice as ne } from "./components/control/components/choice/choice.component.js";
|
|
9
|
-
import { useRef as $, useState as A, useEffect as E, useMemo as te } from "react";
|
|
10
|
-
import { ChevronDown as ae, Search as le } from "lucide-react";
|
|
11
|
-
import z from "clsx";
|
|
12
|
-
import { HiddenInput as re } from "./components/control/components/hidden-input/hidden-input.component.js";
|
|
13
|
-
import { Input as ie } from "./components/control/components/input/input.component.js";
|
|
14
|
-
import { Label as se } from "./components/control/components/label/label.component.js";
|
|
15
|
-
import { RadioLabel as de } from "./components/control/components/radio-label/radio-label.component.js";
|
|
16
|
-
import { RadioText as ce } from "./components/control/components/radio-text/radio-text.component.js";
|
|
17
|
-
import './assets/index-CqamBlbE.css';const he = "_CardImage_dw1xq_1", pe = "_CardImageContent_dw1xq_13", me = "_CardImageTop_dw1xq_27", Ce = "_CardImageWrap_dw1xq_32", ue = "_CardImageBottom_dw1xq_43", N = {
|
|
18
|
-
CardImage: he,
|
|
19
|
-
CardImageContent: pe,
|
|
20
|
-
CardImageTop: me,
|
|
21
|
-
CardImageWrap: Ce,
|
|
22
|
-
CardImageBottom: ue
|
|
23
|
-
}, _e = (_) => {
|
|
24
|
-
const { sprite: D, choices: b, state: i = "idle", id: o, value: n, disabled: p, onChange: m } = _, { type: a, onChoiceChange: l } = K(n, o, m);
|
|
25
|
-
return /* @__PURE__ */ e("div", { className: N.CardImage, children: b.map((s, x, d) => {
|
|
26
|
-
const C = W(o, s.value, x);
|
|
27
|
-
return /* @__PURE__ */ e(
|
|
28
|
-
t.RadioLabel,
|
|
29
|
-
{
|
|
30
|
-
id: C,
|
|
31
|
-
value: n,
|
|
32
|
-
state: i,
|
|
33
|
-
choice: s,
|
|
34
|
-
choices: d,
|
|
35
|
-
children: ({ focused: c, hovered: h, checked: w, state: g }) => /* @__PURE__ */ e(t.Box, { state: g, checked: w, focused: c, children: /* @__PURE__ */ f("div", { className: N.CardImageContent, children: [
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
-
t.HiddenInput,
|
|
38
|
-
{
|
|
39
|
-
type: a,
|
|
40
|
-
id: C,
|
|
41
|
-
name: o,
|
|
42
|
-
value: s.value,
|
|
43
|
-
checked: w,
|
|
44
|
-
disabled: p,
|
|
45
|
-
onChange: () => l(s.value)
|
|
46
|
-
}
|
|
47
|
-
),
|
|
48
|
-
/* @__PURE__ */ e("div", { className: N.CardImageTop, children: /* @__PURE__ */ e(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
"data-image": s.icon,
|
|
52
|
-
style: { backgroundImage: `url(${D})` },
|
|
53
|
-
className: N.CardImageWrap
|
|
54
|
-
}
|
|
55
|
-
) }),
|
|
56
|
-
/* @__PURE__ */ f("div", { className: N.CardImageBottom, children: [
|
|
57
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
58
|
-
t.Choice,
|
|
59
|
-
{
|
|
60
|
-
type: a,
|
|
61
|
-
state: g,
|
|
62
|
-
checked: w,
|
|
63
|
-
focused: c,
|
|
64
|
-
hovered: h,
|
|
65
|
-
disabled: p
|
|
66
|
-
}
|
|
67
|
-
) }),
|
|
68
|
-
/* @__PURE__ */ e(t.RadioText, { size: "md", checked: w, children: s.label })
|
|
69
|
-
] })
|
|
70
|
-
] }) })
|
|
71
|
-
},
|
|
72
|
-
C
|
|
73
|
-
);
|
|
74
|
-
}) });
|
|
75
|
-
}, xe = "_CardText_1eht8_1", we = "_CardTextLabel_1eht8_9", be = "_CardTextChoice_1eht8_24", F = {
|
|
76
|
-
CardText: xe,
|
|
77
|
-
CardTextLabel: we,
|
|
78
|
-
CardTextChoice: be
|
|
79
|
-
}, ve = (_) => {
|
|
80
|
-
const { choices: D, state: b = "idle", id: i, value: o, disabled: n = !1, onChange: p } = _, { type: m, onChoiceChange: a } = K(o, i, p);
|
|
81
|
-
return /* @__PURE__ */ e("div", { className: F.CardText, children: D.map((l, s, x) => {
|
|
82
|
-
const d = W(i, l.value, s);
|
|
83
|
-
return /* @__PURE__ */ e(
|
|
84
|
-
t.RadioLabel,
|
|
85
|
-
{
|
|
86
|
-
id: d,
|
|
87
|
-
value: o,
|
|
88
|
-
state: b,
|
|
89
|
-
choice: l,
|
|
90
|
-
choices: x,
|
|
91
|
-
children: ({ focused: C, hovered: c, checked: h, state: w }) => /* @__PURE__ */ e(t.Box, { state: w, checked: h, focused: C, children: /* @__PURE__ */ f("div", { className: F.CardTextLabel, children: [
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
-
t.HiddenInput,
|
|
94
|
-
{
|
|
95
|
-
type: m,
|
|
96
|
-
id: d,
|
|
97
|
-
name: i,
|
|
98
|
-
value: l.value,
|
|
99
|
-
checked: h,
|
|
100
|
-
disabled: n,
|
|
101
|
-
onChange: (g, v) => a(l.value, v)
|
|
102
|
-
}
|
|
103
|
-
),
|
|
104
|
-
/* @__PURE__ */ e("div", { className: F.CardTextChoice, children: /* @__PURE__ */ e(
|
|
105
|
-
t.Choice,
|
|
106
|
-
{
|
|
107
|
-
type: m,
|
|
108
|
-
state: w,
|
|
109
|
-
checked: h,
|
|
110
|
-
focused: C,
|
|
111
|
-
hovered: c,
|
|
112
|
-
disabled: n
|
|
113
|
-
}
|
|
114
|
-
) }),
|
|
115
|
-
/* @__PURE__ */ e(t.RadioText, { size: "lg", checked: h, children: l.label })
|
|
116
|
-
] }) })
|
|
117
|
-
},
|
|
118
|
-
d
|
|
119
|
-
);
|
|
120
|
-
}) });
|
|
121
|
-
}, De = "_Checkbox_1l6ko_1", ge = "_CheckboxChoice_1l6ko_14", fe = "_CheckboxContent_1l6ko_20", O = {
|
|
122
|
-
Checkbox: De,
|
|
123
|
-
CheckboxChoice: ge,
|
|
124
|
-
CheckboxContent: fe
|
|
125
|
-
}, Te = (_) => {
|
|
126
|
-
const { children: D, state: b = "idle", id: i, value: o, disabled: n = !1, onChange: p, onFocus: m, onBlur: a } = _, [l, s] = H(!1), [x, d] = H(!1), C = (g) => {
|
|
127
|
-
n || l || (g.preventDefault(), p(!o, i));
|
|
128
|
-
}, c = (g) => {
|
|
129
|
-
n || (g.stopPropagation(), p(!o, i));
|
|
130
|
-
}, h = () => {
|
|
131
|
-
n || (s(), m == null || m.call(null, i));
|
|
132
|
-
}, w = () => {
|
|
133
|
-
n || (s(), a == null || a.call(null, i));
|
|
134
|
-
};
|
|
135
|
-
return /* @__PURE__ */ f(
|
|
136
|
-
"label",
|
|
137
|
-
{
|
|
138
|
-
htmlFor: i,
|
|
139
|
-
className: O.Checkbox,
|
|
140
|
-
onClick: C,
|
|
141
|
-
onFocus: h,
|
|
142
|
-
onBlur: w,
|
|
143
|
-
onMouseEnter: () => d(),
|
|
144
|
-
onMouseLeave: () => d(),
|
|
145
|
-
children: [
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
-
t.HiddenInput,
|
|
148
|
-
{
|
|
149
|
-
type: "checkbox",
|
|
150
|
-
id: i,
|
|
151
|
-
name: i,
|
|
152
|
-
value: P.Boolean.ToBooleanString(o),
|
|
153
|
-
checked: o,
|
|
154
|
-
disabled: n,
|
|
155
|
-
onChange: c
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
/* @__PURE__ */ e("div", { className: O.CheckboxChoice, children: /* @__PURE__ */ e(
|
|
159
|
-
t.Choice,
|
|
160
|
-
{
|
|
161
|
-
type: "checkbox",
|
|
162
|
-
state: b,
|
|
163
|
-
checked: o,
|
|
164
|
-
focused: l,
|
|
165
|
-
hovered: x,
|
|
166
|
-
disabled: n
|
|
167
|
-
}
|
|
168
|
-
) }),
|
|
169
|
-
/* @__PURE__ */ e("div", { className: O.CheckboxContent, children: D })
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
);
|
|
173
|
-
}, Ie = "_Dropdown_152mp_1", Re = "_DropdownBorder_152mp_17", Be = "_DropdownContent_152mp_28", Ne = "_DropdownChevron_152mp_39", Le = "_DropdownChevronWrap_152mp_53", ke = "_DropdownBox_152mp_69", Se = "_DropdownBoxVisible_152mp_75", He = "_DropdownBoxHidden_152mp_79", ze = "_DropdownSearch_152mp_83", ye = "_DropdownSearchVisible_152mp_89", $e = "_DropdownSearchHidden_152mp_93", Ae = "_DropdownClose_152mp_97", Fe = "_DropdownInput_152mp_106", Oe = "_DropdownGlass_152mp_120", Ve = "_DropdownChoices_152mp_131", We = "_DropdownChoice_152mp_131", qe = "_DropdownChoiceNoResult_152mp_154", u = {
|
|
174
|
-
Dropdown: Ie,
|
|
175
|
-
DropdownBorder: Re,
|
|
176
|
-
DropdownContent: Be,
|
|
177
|
-
DropdownChevron: Ne,
|
|
178
|
-
DropdownChevronWrap: Le,
|
|
179
|
-
DropdownBox: ke,
|
|
180
|
-
DropdownBoxVisible: Se,
|
|
181
|
-
DropdownBoxHidden: He,
|
|
182
|
-
DropdownSearch: ze,
|
|
183
|
-
DropdownSearchVisible: ye,
|
|
184
|
-
DropdownSearchHidden: $e,
|
|
185
|
-
DropdownClose: Ae,
|
|
186
|
-
DropdownInput: Fe,
|
|
187
|
-
DropdownGlass: Oe,
|
|
188
|
-
DropdownChoices: Ve,
|
|
189
|
-
DropdownChoice: We,
|
|
190
|
-
DropdownChoiceNoResult: qe
|
|
191
|
-
}, Ge = (_) => {
|
|
192
|
-
const { choices: D = [], value: b = [], isSearchHidden: i = !1, multiple: o = !1, onChange: n, onOpen: p, onClose: m } = _, a = _.label || "", l = _.placeholder || "Wählen Sie Ihre private Krankenversicherung...", s = _.noResult || "Keine Versicherung gefunden.", x = _.closeButton || "Schließen", d = $(null), C = $(null), c = $(null), { value: h, setFalse: w, toggle: g } = q(!1), [v, T] = A(""), [I, J] = A({ width: 0, height: 0 }), [L, G] = A([]);
|
|
193
|
-
ee({
|
|
194
|
-
ref: C,
|
|
195
|
-
onResize: (r) => J({ width: r.width || 0, height: r.height || 0 })
|
|
196
|
-
}), oe(C, (r) => {
|
|
197
|
-
Z(r, d) || (o && n(L), w());
|
|
198
|
-
}), E(() => G(Array.isArray(b) ? b : []), [b]), E(() => {
|
|
199
|
-
var r;
|
|
200
|
-
h && I.width && I.height ? ((r = c.current) == null || r.focus(), p == null || p.call(null, I.height, I.width)) : m == null || m.call(null);
|
|
201
|
-
}, [h, I]);
|
|
202
|
-
const Q = (r, R) => {
|
|
203
|
-
G((B) => B.some(({ value: y }) => y === r) ? B.filter(({ value: y }) => y !== r) : [...B, { value: r, label: R }]);
|
|
204
|
-
}, U = () => {
|
|
205
|
-
w(), n(L);
|
|
206
|
-
}, M = te(
|
|
207
|
-
() => D.filter(({ label: r }) => r.toLowerCase().includes(v.toLowerCase())),
|
|
208
|
-
[v, D]
|
|
209
|
-
);
|
|
210
|
-
return /* @__PURE__ */ f("div", { className: u.Dropdown, children: [
|
|
211
|
-
/* @__PURE__ */ e(t.Box, { ref: d, onClick: g, children: /* @__PURE__ */ f("div", { className: u.DropdownBorder, children: [
|
|
212
|
-
/* @__PURE__ */ f("div", { className: u.DropdownContent, children: [
|
|
213
|
-
/* @__PURE__ */ e(t.Label, { position: "active", children: a }),
|
|
214
|
-
/* @__PURE__ */ e(t.RadioText, { size: "lg", checked: !0, oneLine: !0, children: P.Answer.FromArrayToMultiple(L.map(({ label: r }) => r)) || l })
|
|
215
|
-
] }),
|
|
216
|
-
/* @__PURE__ */ e("div", { className: u.DropdownChevronWrap, children: /* @__PURE__ */ e(ae, { "data-open": h, className: u.DropdownChevron }) })
|
|
217
|
-
] }) }),
|
|
218
|
-
/* @__PURE__ */ e(t.Box, { ref: C, className: h ? u.DropdownBoxVisible : u.DropdownBoxHidden, children: /* @__PURE__ */ f("div", { className: u.DropdownBox, children: [
|
|
219
|
-
/* @__PURE__ */ f("div", { className: z(u.DropdownSearch, i ? u.DropdownSearchHidden : u.DropdownSearchVisible), children: [
|
|
220
|
-
/* @__PURE__ */ e(
|
|
221
|
-
"input",
|
|
222
|
-
{
|
|
223
|
-
ref: c,
|
|
224
|
-
value: v,
|
|
225
|
-
type: "text",
|
|
226
|
-
className: u.DropdownInput,
|
|
227
|
-
onChange: (r) => T(r.target.value)
|
|
228
|
-
}
|
|
229
|
-
),
|
|
230
|
-
/* @__PURE__ */ e(le, { className: u.DropdownGlass })
|
|
231
|
-
] }),
|
|
232
|
-
/* @__PURE__ */ e("ul", { className: u.DropdownChoices, children: M.length ? M.map(({ value: r, label: R }, B) => /* @__PURE__ */ f(
|
|
233
|
-
"li",
|
|
234
|
-
{
|
|
235
|
-
className: u.DropdownChoice,
|
|
236
|
-
onClick: () => {
|
|
237
|
-
o ? Q(r, R) : (w(), n([{ value: r, label: R }]));
|
|
238
|
-
},
|
|
239
|
-
children: [
|
|
240
|
-
o && /* @__PURE__ */ e(
|
|
241
|
-
t.Choice,
|
|
242
|
-
{
|
|
243
|
-
type: "checkbox",
|
|
244
|
-
checked: L.some((j) => j.value === r)
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
/* @__PURE__ */ e(t.RadioText, { size: "lg", checked: !1, children: R })
|
|
248
|
-
]
|
|
249
|
-
},
|
|
250
|
-
r + B
|
|
251
|
-
)) : /* @__PURE__ */ e("li", { className: z(u.DropdownChoice, u.DropdownChoiceNoResult), children: /* @__PURE__ */ e(t.RadioText, { size: "lg", checked: !1, children: s }) }) }),
|
|
252
|
-
o && /* @__PURE__ */ e("div", { className: u.DropdownClose, children: /* @__PURE__ */ e(t.Button, { color: "next", size: "sm", type: "button", onClick: () => U(), children: x }) })
|
|
253
|
-
] }) })
|
|
254
|
-
] });
|
|
255
|
-
}, Me = "_Radio_1wc8m_1", je = "_RadioOrientationHorizontal_1wc8m_5", Ee = "_RadioOrientationVertical_1wc8m_10", Ke = "_RadioLabel_1wc8m_15", k = {
|
|
256
|
-
Radio: Me,
|
|
257
|
-
RadioOrientationHorizontal: je,
|
|
258
|
-
RadioOrientationVertical: Ee,
|
|
259
|
-
RadioLabel: Ke
|
|
260
|
-
}, Pe = (_) => {
|
|
261
|
-
const { orientation: D, choices: b, state: i = "idle", id: o, value: n, disabled: p = !1, onChange: m } = _;
|
|
262
|
-
return /* @__PURE__ */ e(
|
|
263
|
-
"div",
|
|
264
|
-
{
|
|
265
|
-
className: z(k.Radio, {
|
|
266
|
-
[k.RadioOrientationHorizontal]: D === "horizontal",
|
|
267
|
-
[k.RadioOrientationVertical]: D === "vertical"
|
|
268
|
-
}),
|
|
269
|
-
children: b.map((a, l, s) => {
|
|
270
|
-
const x = W(o, a.value, l);
|
|
271
|
-
return /* @__PURE__ */ e(
|
|
272
|
-
t.RadioLabel,
|
|
273
|
-
{
|
|
274
|
-
id: x,
|
|
275
|
-
value: n,
|
|
276
|
-
state: i,
|
|
277
|
-
choice: a,
|
|
278
|
-
choices: s,
|
|
279
|
-
children: ({ focused: d, hovered: C, checked: c, state: h }) => /* @__PURE__ */ f("div", { className: k.RadioLabel, children: [
|
|
280
|
-
/* @__PURE__ */ e(
|
|
281
|
-
t.Choice,
|
|
282
|
-
{
|
|
283
|
-
type: "radio",
|
|
284
|
-
state: h,
|
|
285
|
-
checked: c,
|
|
286
|
-
focused: d,
|
|
287
|
-
hovered: C,
|
|
288
|
-
disabled: p
|
|
289
|
-
}
|
|
290
|
-
),
|
|
291
|
-
/* @__PURE__ */ e(
|
|
292
|
-
t.HiddenInput,
|
|
293
|
-
{
|
|
294
|
-
type: "radio",
|
|
295
|
-
id: x,
|
|
296
|
-
value: a.value,
|
|
297
|
-
name: o,
|
|
298
|
-
checked: c,
|
|
299
|
-
disabled: p,
|
|
300
|
-
onChange: () => m(a.value, o)
|
|
301
|
-
}
|
|
302
|
-
),
|
|
303
|
-
/* @__PURE__ */ e(t.RadioText, { size: "lg", checked: c, children: a.label })
|
|
304
|
-
] })
|
|
305
|
-
},
|
|
306
|
-
x
|
|
307
|
-
);
|
|
308
|
-
})
|
|
309
|
-
}
|
|
310
|
-
);
|
|
311
|
-
}, Je = "_Text_1ble1_1", Qe = "_TextLabel_1ble1_17", Ue = "_TextLabelIdle_1ble1_23", Xe = "_TextLabelActive_1ble1_28", S = {
|
|
312
|
-
Text: Je,
|
|
313
|
-
TextLabel: Qe,
|
|
314
|
-
TextLabelIdle: Ue,
|
|
315
|
-
TextLabelActive: Xe
|
|
316
|
-
}, Ye = (_) => {
|
|
317
|
-
const { label: D, state: b = "idle", type: i = "text", id: o, value: n, disabled: p = !1, onChange: m, onFocus: a, onBlur: l } = _, { value: s, setTrue: x, setFalse: d } = q(!0), [C, c] = H(), h = () => {
|
|
318
|
-
d();
|
|
319
|
-
}, w = () => {
|
|
320
|
-
n || x();
|
|
321
|
-
}, g = (T) => {
|
|
322
|
-
n || d(), c(), a == null || a.call(null, T);
|
|
323
|
-
}, v = (T) => {
|
|
324
|
-
n || x(), c(), l == null || l.call(null, T);
|
|
325
|
-
};
|
|
326
|
-
return /* @__PURE__ */ e(t.Box, { state: b, focused: C, children: /* @__PURE__ */ f("label", { htmlFor: o, className: S.Text, children: [
|
|
327
|
-
/* @__PURE__ */ e(
|
|
328
|
-
"div",
|
|
329
|
-
{
|
|
330
|
-
"data-testid": "text-label",
|
|
331
|
-
className: z(S.TextLabel, !s || n ? S.TextLabelActive : S.TextLabelIdle),
|
|
332
|
-
children: /* @__PURE__ */ e(t.Label, { position: s ? "idle" : "active", state: s ? "idle" : b, children: D })
|
|
333
|
-
}
|
|
334
|
-
),
|
|
335
|
-
/* @__PURE__ */ e(
|
|
336
|
-
t.Input,
|
|
337
|
-
{
|
|
338
|
-
disabled: p,
|
|
339
|
-
type: i,
|
|
340
|
-
id: o,
|
|
341
|
-
value: n,
|
|
342
|
-
onChange: m,
|
|
343
|
-
onAutofill: h,
|
|
344
|
-
onAutofillCancel: w,
|
|
345
|
-
onFocus: g,
|
|
346
|
-
onBlur: v
|
|
347
|
-
}
|
|
348
|
-
)
|
|
349
|
-
] }) });
|
|
350
|
-
}, Ze = "_Textarea_1ltsl_1", V = {
|
|
351
|
-
Textarea: Ze,
|
|
352
|
-
"autofill-start": "_autofill-start_1ltsl_1",
|
|
353
|
-
"autofill-cancel": "_autofill-cancel_1ltsl_1"
|
|
354
|
-
}, eo = (_) => {
|
|
355
|
-
const { state: D = "idle", placeholder: b = "", rows: i = 5, id: o, value: n, disabled: p = !1, onChange: m, onFocus: a, onBlur: l } = _, { value: s, setTrue: x, setFalse: d } = q(!0), [C, c] = H(!1), h = (v) => {
|
|
356
|
-
v.animationName === V["autofill-start"] && d(), v.animationName === V["autofill-cancel"] && !n && x();
|
|
357
|
-
}, w = (v) => {
|
|
358
|
-
n || d(), c(), a == null || a.call(null, v);
|
|
359
|
-
}, g = (v) => {
|
|
360
|
-
n || x(), c(), l == null || l.call(null, v);
|
|
361
|
-
};
|
|
362
|
-
return /* @__PURE__ */ e(t.Box, { state: D, focused: C, children: /* @__PURE__ */ e(
|
|
363
|
-
"textarea",
|
|
364
|
-
{
|
|
365
|
-
"data-testid": "textarea",
|
|
366
|
-
"data-is-idle": s,
|
|
367
|
-
disabled: p,
|
|
368
|
-
id: o,
|
|
369
|
-
rows: i,
|
|
370
|
-
placeholder: b,
|
|
371
|
-
value: n,
|
|
372
|
-
className: V.Textarea,
|
|
373
|
-
onChange: (v) => m(v.target.value, o, "keyboard"),
|
|
374
|
-
onAnimationStart: h,
|
|
375
|
-
onFocus: () => w(o),
|
|
376
|
-
onBlur: () => g(o)
|
|
377
|
-
}
|
|
378
|
-
) });
|
|
379
|
-
}, t = {
|
|
380
|
-
Box: X,
|
|
381
|
-
Button: Y,
|
|
382
|
-
CardImage: _e,
|
|
383
|
-
CardText: ve,
|
|
384
|
-
Checkbox: Te,
|
|
385
|
-
Choice: ne,
|
|
386
|
-
Dropdown: Ge,
|
|
387
|
-
HiddenInput: re,
|
|
388
|
-
Input: ie,
|
|
389
|
-
Label: se,
|
|
390
|
-
Radio: Pe,
|
|
391
|
-
RadioLabel: de,
|
|
392
|
-
RadioText: ce,
|
|
393
|
-
Text: Ye,
|
|
394
|
-
Textarea: eo
|
|
395
|
-
};
|
|
396
|
-
export {
|
|
397
|
-
Te as C,
|
|
398
|
-
Ge as D,
|
|
399
|
-
Pe as R,
|
|
400
|
-
eo as T,
|
|
401
|
-
Ye as a,
|
|
402
|
-
ve as b,
|
|
403
|
-
_e as c,
|
|
404
|
-
t as d
|
|
405
|
-
};
|
package/dist/types.d.ts
DELETED
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Converter } from './converter';
|
package/dist/utils/index.d.ts
DELETED
package/dist/utils/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Time } from './time';
|
package/dist/utils/time/index.js
DELETED