@arthurzakharov/ui-kit 2.4.0 → 2.5.1
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/animations/fade-grow/fade-grow.component.js +1 -1
- package/dist/animations/fade-scale/fade-scale.component.js +1 -1
- package/dist/animations/fade-slide/fade-slide.component.js +1 -1
- package/dist/assets/button-text-BkR57fNF.css +1 -0
- package/dist/assets/message-ByzpMD6r.css +1 -0
- package/dist/assets/text-C982pFA7.css +1 -0
- package/dist/components/accordion-table/accordion-table.component.js +18 -19
- package/dist/components/bottom-bar/bottom-bar.component.js +8 -9
- package/dist/components/certifications/certifications.component.js +3 -4
- package/dist/components/data-protected-label/data-protected-label.component.js +10 -11
- package/dist/components/dialog/dialog.component.js +1 -1
- package/dist/components/dialog-article/dialog-article.component.js +8 -9
- package/dist/components/expenses/expenses.component.js +6 -7
- package/dist/components/footer/footer.component.js +3 -4
- package/dist/components/form-row/form-row.component.js +6 -7
- package/dist/components/header/header.component.js +1 -1
- package/dist/components/info-panel/info-panel.component.js +6 -7
- package/dist/components/information/information.component.js +13 -14
- package/dist/components/layout/layout.component.js +1 -1
- package/dist/components/loader/loader.component.js +9 -10
- package/dist/components/main-attachment/main-attachment.component.js +1 -1
- package/dist/components/message/message.component.d.ts +4 -4
- package/dist/components/message/message.component.js +45 -31
- package/dist/components/message-block/message-block.component.js +3 -4
- package/dist/components/not-found/not-found.component.js +3 -4
- package/dist/components/payment/components/glass/glass.component.js +10 -11
- package/dist/components/payment/components/info/info.component.js +12 -13
- package/dist/components/sidebar/sidebar.component.d.ts +1 -1
- package/dist/components/sidebar/sidebar.component.js +34 -35
- package/dist/components/signature/signature.component.js +8 -9
- package/dist/components/text/text.component.js +41 -41
- package/dist/components/user-panel/user-panel.component.js +5 -6
- package/dist/components/warranty/warranty.component.js +8 -9
- package/dist/controls/buttons/button/button.component.js +10 -11
- package/dist/controls/buttons/button-card/button-card.component.js +7 -8
- package/dist/controls/buttons/button-radio/button-radio.component.js +2 -3
- package/dist/controls/buttons/button-text/button-text.component.d.ts +3 -2
- package/dist/controls/buttons/button-text/button-text.component.js +106 -84
- package/dist/controls/interactives/card-image/card-image.component.js +16 -17
- package/dist/controls/interactives/card-text/card-text.component.js +17 -18
- package/dist/controls/interactives/checkbox/checkbox.component.js +7 -8
- package/dist/controls/interactives/dropdown/dropdown.component.js +8 -9
- package/dist/controls/interactives/input/input.component.js +11 -12
- package/dist/controls/interactives/radio/radio.component.js +7 -8
- package/dist/controls/interactives/text-area/text-area.component.js +7 -8
- package/dist/controls/interactives/text-field/text-field.component.js +7 -8
- package/dist/controls/primitives/box/box.component.js +15 -16
- package/dist/controls/primitives/caption/caption.component.js +7 -8
- package/dist/controls/primitives/choice/choice.component.js +10 -11
- package/dist/controls/primitives/error-message/error-message.component.js +3 -4
- package/dist/controls/primitives/hidden-input/hidden-input.component.js +18 -19
- package/dist/controls/primitives/label/label.component.js +17 -18
- package/dist/controls/primitives/radio-label/radio-label.component.js +7 -8
- package/dist/controls/primitives/status/status.component.js +13 -14
- package/dist/controls/utils/types.d.ts +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +3 -1
- package/dist/utils/functions/functions.util.d.ts +9 -0
- package/dist/utils/functions/functions.util.js +35 -15
- package/dist/utils/functions/index.js +5 -4
- package/dist/utils/svg/svg.component.js +1 -1
- package/dist/utils/types.d.ts +3 -1
- package/package.json +1 -3
- package/dist/assets/button-text-NCcWZ-LB.css +0 -1
- package/dist/assets/message-CgGyIv5e.css +0 -1
- package/dist/assets/text-DYEJSFKw.css +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import b from "
|
|
2
|
+
import { clsx as b, baseProps as C } from "../../../utils/functions/functions.util.js";
|
|
3
3
|
import { Box as j } from "../../primitives/box/box.component.js";
|
|
4
4
|
import { Caption as z } from "../../primitives/caption/caption.component.js";
|
|
5
5
|
import { Choice as $ } from "../../primitives/choice/choice.component.js";
|
|
6
6
|
import "../../../utils/content/content.component.js";
|
|
7
|
-
import { baseProps as C } from "../../../utils/functions/functions.util.js";
|
|
8
7
|
import { HiddenInput as F } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
9
8
|
import { RadioLabel as H } from "../../primitives/radio-label/radio-label.component.js";
|
|
10
9
|
import "lucide-react";
|
|
@@ -17,15 +16,15 @@ import '../../../assets/card-image-LY9zvE8g.css';const R = "_CardImage_nc2yn_1",
|
|
|
17
16
|
Top: w,
|
|
18
17
|
Wrap: A,
|
|
19
18
|
Bottom: D
|
|
20
|
-
},
|
|
19
|
+
}, k = ({
|
|
21
20
|
// Interactive props
|
|
22
21
|
id: a,
|
|
23
|
-
value:
|
|
22
|
+
value: m,
|
|
24
23
|
disabled: s = !1,
|
|
25
24
|
state: _ = "idle",
|
|
26
25
|
onChange: g,
|
|
27
|
-
onFocus:
|
|
28
|
-
onBlur:
|
|
26
|
+
onFocus: u,
|
|
27
|
+
onBlur: f,
|
|
29
28
|
// CardImage props
|
|
30
29
|
sprite: v,
|
|
31
30
|
choices: I,
|
|
@@ -34,27 +33,27 @@ import '../../../assets/card-image-LY9zvE8g.css';const R = "_CardImage_nc2yn_1",
|
|
|
34
33
|
// Base props
|
|
35
34
|
...i
|
|
36
35
|
}) => {
|
|
37
|
-
const { type:
|
|
36
|
+
const { type: l, onChoiceChange: x } = P(m, a, g);
|
|
38
37
|
return /* @__PURE__ */ o(
|
|
39
38
|
"div",
|
|
40
39
|
{
|
|
41
40
|
"data-testid": C(i, "data-testid", "card-image"),
|
|
42
41
|
className: b(n.CardImage, C(i, "className")),
|
|
43
42
|
children: I.map((t, B, N) => {
|
|
44
|
-
const
|
|
45
|
-
return /* @__PURE__ */ o(H, { id:
|
|
43
|
+
const e = L(a, t.value, B);
|
|
44
|
+
return /* @__PURE__ */ o(H, { id: e, value: m, state: _, choice: t, choices: N, children: ({ focused: p, hovered: T, checked: r, state: d }) => /* @__PURE__ */ o(j, { state: d, checked: r, focused: p, children: /* @__PURE__ */ c("div", { className: n.Content, children: [
|
|
46
45
|
/* @__PURE__ */ o(
|
|
47
46
|
F,
|
|
48
47
|
{
|
|
49
|
-
type:
|
|
50
|
-
id:
|
|
48
|
+
type: l,
|
|
49
|
+
id: e,
|
|
51
50
|
name: a,
|
|
52
51
|
value: t.value,
|
|
53
52
|
checked: r,
|
|
54
53
|
disabled: s,
|
|
55
54
|
onChange: (E, W) => x(t.value, W),
|
|
56
|
-
onFocus: () =>
|
|
57
|
-
onBlur: () =>
|
|
55
|
+
onFocus: () => u?.(a),
|
|
56
|
+
onBlur: () => f?.(a)
|
|
58
57
|
}
|
|
59
58
|
),
|
|
60
59
|
/* @__PURE__ */ o("div", { className: n.Top, children: /* @__PURE__ */ o("div", { "data-image": t.icon, style: { backgroundImage: `url(${v})` }, className: n.Wrap }) }),
|
|
@@ -62,22 +61,22 @@ import '../../../assets/card-image-LY9zvE8g.css';const R = "_CardImage_nc2yn_1",
|
|
|
62
61
|
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
63
62
|
$,
|
|
64
63
|
{
|
|
65
|
-
type:
|
|
64
|
+
type: l,
|
|
66
65
|
size: y,
|
|
67
66
|
state: d,
|
|
68
67
|
checked: r,
|
|
69
|
-
focused:
|
|
68
|
+
focused: p,
|
|
70
69
|
hovered: T,
|
|
71
70
|
disabled: s
|
|
72
71
|
}
|
|
73
72
|
) }),
|
|
74
73
|
/* @__PURE__ */ o(z, { text: t.label, size: h, checked: r })
|
|
75
74
|
] })
|
|
76
|
-
] }) }) },
|
|
75
|
+
] }) }) }, e);
|
|
77
76
|
})
|
|
78
77
|
}
|
|
79
78
|
);
|
|
80
79
|
};
|
|
81
80
|
export {
|
|
82
|
-
|
|
81
|
+
k as CardImage
|
|
83
82
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as o, jsxs as w } from "react/jsx-runtime";
|
|
2
|
-
import I from "
|
|
2
|
+
import { clsx as I, baseProps as p } from "../../../utils/functions/functions.util.js";
|
|
3
3
|
import { Box as j } from "../../primitives/box/box.component.js";
|
|
4
4
|
import { Caption as y } from "../../primitives/caption/caption.component.js";
|
|
5
5
|
import { Choice as z } from "../../primitives/choice/choice.component.js";
|
|
6
6
|
import "../../../utils/content/content.component.js";
|
|
7
|
-
import { baseProps as d } from "../../../utils/functions/functions.util.js";
|
|
8
7
|
import { HiddenInput as B } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
9
8
|
import { RadioLabel as $ } from "../../primitives/radio-label/radio-label.component.js";
|
|
10
9
|
import "lucide-react";
|
|
@@ -15,31 +14,31 @@ import '../../../assets/card-text-sR2uSJyo.css';const P = "_CardText_1uv8w_1", R
|
|
|
15
14
|
CardText: P,
|
|
16
15
|
Label: R,
|
|
17
16
|
Choice: q
|
|
18
|
-
},
|
|
17
|
+
}, X = ({
|
|
19
18
|
// Interactive props
|
|
20
19
|
id: t,
|
|
21
|
-
value:
|
|
22
|
-
disabled:
|
|
20
|
+
value: s,
|
|
21
|
+
disabled: m = !1,
|
|
23
22
|
state: C = "idle",
|
|
24
23
|
onChange: x,
|
|
25
24
|
onBlur: h,
|
|
26
25
|
onFocus: u,
|
|
27
26
|
// CardText props
|
|
28
|
-
choices:
|
|
29
|
-
iconSize:
|
|
27
|
+
choices: _,
|
|
28
|
+
iconSize: f = "md",
|
|
30
29
|
textSize: v = "body",
|
|
31
30
|
// Base props
|
|
32
31
|
...n
|
|
33
32
|
}) => {
|
|
34
|
-
const { type: l, onChoiceChange: b } = H(
|
|
33
|
+
const { type: l, onChoiceChange: b } = H(s, t, x);
|
|
35
34
|
return /* @__PURE__ */ o(
|
|
36
35
|
"div",
|
|
37
36
|
{
|
|
38
|
-
"data-testid":
|
|
39
|
-
className: I(i.CardText,
|
|
40
|
-
children:
|
|
37
|
+
"data-testid": p(n, "data-testid", "card-text"),
|
|
38
|
+
className: I(i.CardText, p(n, "className")),
|
|
39
|
+
children: _.map((e, L, T) => {
|
|
41
40
|
const a = F(t, e.value, L);
|
|
42
|
-
return /* @__PURE__ */ o($, { id: a, value:
|
|
41
|
+
return /* @__PURE__ */ o($, { id: a, value: s, state: C, choice: e, choices: T, children: ({ focused: c, hovered: N, checked: r, state: d }) => /* @__PURE__ */ o(j, { state: d, checked: r, focused: c, children: /* @__PURE__ */ w("div", { className: i.Label, children: [
|
|
43
42
|
/* @__PURE__ */ o(
|
|
44
43
|
B,
|
|
45
44
|
{
|
|
@@ -48,7 +47,7 @@ import '../../../assets/card-text-sR2uSJyo.css';const P = "_CardText_1uv8w_1", R
|
|
|
48
47
|
name: t,
|
|
49
48
|
value: e.value,
|
|
50
49
|
checked: r,
|
|
51
|
-
disabled:
|
|
50
|
+
disabled: m,
|
|
52
51
|
onChange: (A, g) => b(e.value, g),
|
|
53
52
|
onFocus: () => u?.(t),
|
|
54
53
|
onBlur: () => h?.(t)
|
|
@@ -58,12 +57,12 @@ import '../../../assets/card-text-sR2uSJyo.css';const P = "_CardText_1uv8w_1", R
|
|
|
58
57
|
z,
|
|
59
58
|
{
|
|
60
59
|
type: l,
|
|
61
|
-
size:
|
|
62
|
-
state:
|
|
60
|
+
size: f,
|
|
61
|
+
state: d,
|
|
63
62
|
checked: r,
|
|
64
|
-
focused:
|
|
63
|
+
focused: c,
|
|
65
64
|
hovered: N,
|
|
66
|
-
disabled:
|
|
65
|
+
disabled: m
|
|
67
66
|
}
|
|
68
67
|
) }),
|
|
69
68
|
/* @__PURE__ */ o(y, { text: e.label, size: v, checked: r })
|
|
@@ -73,5 +72,5 @@ import '../../../assets/card-text-sR2uSJyo.css';const P = "_CardText_1uv8w_1", R
|
|
|
73
72
|
);
|
|
74
73
|
};
|
|
75
74
|
export {
|
|
76
|
-
|
|
75
|
+
X as CardText
|
|
77
76
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as M } from "react";
|
|
3
3
|
import { useHover as N } from "usehooks-ts";
|
|
4
|
-
import p from "
|
|
4
|
+
import { clsx as p, baseProps as _ } from "../../../utils/functions/functions.util.js";
|
|
5
5
|
import { FadeSlide as S } from "../../../animations/fade-slide/fade-slide.component.js";
|
|
6
6
|
import "../../primitives/box/box.component.js";
|
|
7
7
|
import "../../../utils/content/content.component.js";
|
|
8
|
-
import { baseProps as _ } from "../../../utils/functions/functions.util.js";
|
|
9
8
|
import { Choice as v } from "../../primitives/choice/choice.component.js";
|
|
10
9
|
import { ErrorMessage as F } from "../../primitives/error-message/error-message.component.js";
|
|
11
10
|
import { HiddenInput as L } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
@@ -20,7 +19,7 @@ import '../../../assets/checkbox-bwnjS9qO.css';const H = "_Checkbox_d6btg_1", I
|
|
|
20
19
|
Body: R,
|
|
21
20
|
BodySmall: T,
|
|
22
21
|
ErrorMessage: q
|
|
23
|
-
},
|
|
22
|
+
}, Z = ({
|
|
24
23
|
// Interactive props
|
|
25
24
|
id: t,
|
|
26
25
|
value: r = !1,
|
|
@@ -32,11 +31,11 @@ import '../../../assets/checkbox-bwnjS9qO.css';const H = "_Checkbox_d6btg_1", I
|
|
|
32
31
|
// Checkbox props
|
|
33
32
|
iconSize: x = "md",
|
|
34
33
|
textSize: a = "body-small",
|
|
35
|
-
message:
|
|
34
|
+
message: l = "",
|
|
36
35
|
// PropsWithChildren
|
|
37
36
|
children: y,
|
|
38
37
|
// Base props
|
|
39
|
-
...
|
|
38
|
+
...m
|
|
40
39
|
}) => {
|
|
41
40
|
const d = M(null), k = N(d), { focused: i, emitChange: h, handleFocus: B, handleBlur: u } = $({
|
|
42
41
|
id: t,
|
|
@@ -45,7 +44,7 @@ import '../../../assets/checkbox-bwnjS9qO.css';const H = "_Checkbox_d6btg_1", I
|
|
|
45
44
|
onFocus: f,
|
|
46
45
|
onBlur: g
|
|
47
46
|
});
|
|
48
|
-
return /* @__PURE__ */ b("div", { "data-testid": _(
|
|
47
|
+
return /* @__PURE__ */ b("div", { "data-testid": _(m, "data-testid", "checkbox"), className: p(o.Checkbox, _(m, "className")), children: [
|
|
49
48
|
/* @__PURE__ */ b(
|
|
50
49
|
"label",
|
|
51
50
|
{
|
|
@@ -98,9 +97,9 @@ import '../../../assets/checkbox-bwnjS9qO.css';const H = "_Checkbox_d6btg_1", I
|
|
|
98
97
|
]
|
|
99
98
|
}
|
|
100
99
|
),
|
|
101
|
-
/* @__PURE__ */ e(S, { name: "text-message", condition: n === "error" && !!
|
|
100
|
+
/* @__PURE__ */ e(S, { name: "text-message", condition: n === "error" && !!l, children: /* @__PURE__ */ e(F, { text: l, className: o.ErrorMessage }) })
|
|
102
101
|
] });
|
|
103
102
|
};
|
|
104
103
|
export {
|
|
105
|
-
|
|
104
|
+
Z as Checkbox
|
|
106
105
|
};
|
|
@@ -2,13 +2,12 @@ import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as u, useState as f, useEffect as y, useMemo as K } from "react";
|
|
3
3
|
import { useBoolean as M, useResizeObserver as E, useOnClickOutside as P } from "usehooks-ts";
|
|
4
4
|
import { ChevronDown as T, Search as q } from "lucide-react";
|
|
5
|
-
import k from "
|
|
5
|
+
import { clsx as k, baseProps as R } from "../../../utils/functions/functions.util.js";
|
|
6
6
|
import { Button as J } from "../../buttons/button/button.component.js";
|
|
7
|
-
import { Box as
|
|
7
|
+
import { Box as H } from "../../primitives/box/box.component.js";
|
|
8
8
|
import { Caption as x } from "../../primitives/caption/caption.component.js";
|
|
9
9
|
import { Choice as Q } from "../../primitives/choice/choice.component.js";
|
|
10
10
|
import "../../../utils/content/content.component.js";
|
|
11
|
-
import { baseProps as H } from "../../../utils/functions/functions.util.js";
|
|
12
11
|
import { Label as U } from "../../primitives/label/label.component.js";
|
|
13
12
|
import { clickHasNode as X } from "../../utils/functions/functions.util.js";
|
|
14
13
|
import { Converter as Y } from "../../../utils/converter/converter.util.js";
|
|
@@ -30,7 +29,7 @@ import '../../../assets/dropdown-DLhCAHEx.css';const Z = "_Dropdown_1kidn_1", ee
|
|
|
30
29
|
Choices: me,
|
|
31
30
|
Choice: Ce,
|
|
32
31
|
ChoiceNoResult: pe
|
|
33
|
-
},
|
|
32
|
+
}, He = ({
|
|
34
33
|
choices: v = [],
|
|
35
34
|
value: d = [],
|
|
36
35
|
label: z = "",
|
|
@@ -65,10 +64,10 @@ import '../../../assets/dropdown-DLhCAHEx.css';const Z = "_Dropdown_1kidn_1", ee
|
|
|
65
64
|
return /* @__PURE__ */ i(
|
|
66
65
|
"div",
|
|
67
66
|
{
|
|
68
|
-
"data-testid":
|
|
69
|
-
className: k(o.Dropdown,
|
|
67
|
+
"data-testid": R(S, "data-testid", "dropdown"),
|
|
68
|
+
className: k(o.Dropdown, R(S, "className")),
|
|
70
69
|
children: [
|
|
71
|
-
/* @__PURE__ */ s(
|
|
70
|
+
/* @__PURE__ */ s(H, { ref: b, onClick: L, children: /* @__PURE__ */ i("div", { className: o.Border, children: [
|
|
72
71
|
/* @__PURE__ */ i("div", { className: o.Content, children: [
|
|
73
72
|
/* @__PURE__ */ s(U, { text: z, position: "active" }),
|
|
74
73
|
/* @__PURE__ */ s(
|
|
@@ -83,7 +82,7 @@ import '../../../assets/dropdown-DLhCAHEx.css';const Z = "_Dropdown_1kidn_1", ee
|
|
|
83
82
|
] }),
|
|
84
83
|
/* @__PURE__ */ s("div", { className: o.ChevronWrap, children: /* @__PURE__ */ s(T, { "data-open": l, className: o.Chevron }) })
|
|
85
84
|
] }) }),
|
|
86
|
-
/* @__PURE__ */ s(
|
|
85
|
+
/* @__PURE__ */ s(H, { ref: _, className: l ? o.BoxVisible : o.BoxHidden, children: /* @__PURE__ */ i("div", { className: o.Box, children: [
|
|
87
86
|
/* @__PURE__ */ i("div", { className: k(o.Search, I ? o.SearchHidden : o.SearchVisible), children: [
|
|
88
87
|
/* @__PURE__ */ s(
|
|
89
88
|
"input",
|
|
@@ -133,5 +132,5 @@ import '../../../assets/dropdown-DLhCAHEx.css';const Z = "_Dropdown_1kidn_1", ee
|
|
|
133
132
|
);
|
|
134
133
|
};
|
|
135
134
|
export {
|
|
136
|
-
|
|
135
|
+
He as Dropdown
|
|
137
136
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as M } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as d, useState as O, useLayoutEffect as Q, useCallback as R, useEffect as W } from "react";
|
|
3
|
-
import K from "
|
|
4
|
-
import { compareStrings as X, isDigit as Y, getFirstNotEnteredCharIndex as
|
|
3
|
+
import { clsx as K, baseProps as h } from "../../../utils/functions/functions.util.js";
|
|
4
|
+
import { compareStrings as X, isDigit as Y, getFirstNotEnteredCharIndex as P, replaceCharByIndex as b, getNextChar as T, isSeparator as m, getPreviousChar as Z, applyMask as k } from "./input.utils.js";
|
|
5
5
|
import { useControlInteraction as tt } from "../../utils/hooks/use-control-interaction/use-control-interaction.hook.js";
|
|
6
|
-
import { baseProps as h } from "../../../utils/functions/functions.util.js";
|
|
7
6
|
import '../../../assets/input-D66hMzHc.css';const et = "_Input_gfvsr_1", nt = "_Placeholder_gfvsr_45", w = {
|
|
8
7
|
Input: et,
|
|
9
8
|
Placeholder: nt
|
|
10
|
-
},
|
|
9
|
+
}, at = ({
|
|
11
10
|
// Interactive props
|
|
12
11
|
id: u,
|
|
13
12
|
value: y = "",
|
|
@@ -41,15 +40,15 @@ import '../../../assets/input-D66hMzHc.css';const et = "_Input_gfvsr_1", nt = "_
|
|
|
41
40
|
o.current.setSelectionRange(t, t), a.current = null;
|
|
42
41
|
}, [r, n]);
|
|
43
42
|
const F = () => {
|
|
44
|
-
const t = o.current?.value || "", c =
|
|
43
|
+
const t = o.current?.value || "", c = P(t, n);
|
|
45
44
|
c !== t.length && i(c);
|
|
46
45
|
}, G = R(() => {
|
|
47
46
|
const t = o.current?.value || "", c = X(r, t);
|
|
48
47
|
if (!Y(c)) return;
|
|
49
|
-
const e = o.current?.selectionEnd || 0,
|
|
50
|
-
if (
|
|
51
|
-
const p = t.slice(0, e - 1),
|
|
52
|
-
I(J), i(
|
|
48
|
+
const e = o.current?.selectionEnd || 0, x = P(t, n) === t.length, l = b(r, e - 1, c), f = P(l, n);
|
|
49
|
+
if (x) {
|
|
50
|
+
const p = t.slice(0, e - 1), v = t.slice(e - 1, e), B = t.slice(e), J = b(p + B, e - 1, v), _ = T(p + B, e) || "";
|
|
51
|
+
I(J), i(m(_, n) && _ ? e + 1 : e);
|
|
53
52
|
} else
|
|
54
53
|
I(l), i(f);
|
|
55
54
|
}, [r, n]), H = R(
|
|
@@ -73,8 +72,8 @@ import '../../../assets/input-D66hMzHc.css';const et = "_Input_gfvsr_1", nt = "_
|
|
|
73
72
|
t.preventDefault();
|
|
74
73
|
const e = o.current?.selectionEnd || 0;
|
|
75
74
|
if (e) {
|
|
76
|
-
const A = Z(r, e),
|
|
77
|
-
I(
|
|
75
|
+
const A = Z(r, e), x = T(r, e - 1), l = m(A, n), f = m(x, n), p = e - (l || f ? 2 : 1), v = k(r, n, e - (f ? 2 : 1));
|
|
76
|
+
I(v), i(p);
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
},
|
|
@@ -139,5 +138,5 @@ import '../../../assets/input-D66hMzHc.css';const et = "_Input_gfvsr_1", nt = "_
|
|
|
139
138
|
);
|
|
140
139
|
};
|
|
141
140
|
export {
|
|
142
|
-
|
|
141
|
+
at as Input
|
|
143
142
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import p from "
|
|
2
|
+
import { clsx as p, baseProps as _ } from "../../../utils/functions/functions.util.js";
|
|
3
3
|
import { FadeSlide as k } from "../../../animations/fade-slide/fade-slide.component.js";
|
|
4
4
|
import "../../primitives/box/box.component.js";
|
|
5
5
|
import { Caption as I } from "../../primitives/caption/caption.component.js";
|
|
@@ -7,7 +7,6 @@ import { Choice as V } from "../../primitives/choice/choice.component.js";
|
|
|
7
7
|
import { ErrorMessage as y } from "../../primitives/error-message/error-message.component.js";
|
|
8
8
|
import { HiddenInput as F } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
9
9
|
import "../../../utils/content/content.component.js";
|
|
10
|
-
import { baseProps as _ } from "../../../utils/functions/functions.util.js";
|
|
11
10
|
import { RadioLabel as j } from "../../primitives/radio-label/radio-label.component.js";
|
|
12
11
|
import "lucide-react";
|
|
13
12
|
import { getChoiceId as B } from "../../utils/functions/functions.util.js";
|
|
@@ -19,13 +18,13 @@ import '../../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Co
|
|
|
19
18
|
Vertical: A,
|
|
20
19
|
Label: D,
|
|
21
20
|
ErrorMessage: G
|
|
22
|
-
},
|
|
21
|
+
}, ar = ({
|
|
23
22
|
// Interactive props
|
|
24
23
|
id: e,
|
|
25
|
-
value:
|
|
24
|
+
value: u = "",
|
|
26
25
|
disabled: a = !1,
|
|
27
26
|
state: s = "idle",
|
|
28
|
-
onChange:
|
|
27
|
+
onChange: f,
|
|
29
28
|
onFocus: C,
|
|
30
29
|
onBlur: g,
|
|
31
30
|
// Radio props
|
|
@@ -40,7 +39,7 @@ import '../../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Co
|
|
|
40
39
|
const { emitChange: w, handleFocus: x, handleBlur: E } = $({
|
|
41
40
|
id: e,
|
|
42
41
|
disabled: a,
|
|
43
|
-
onChange:
|
|
42
|
+
onChange: f,
|
|
44
43
|
onFocus: C,
|
|
45
44
|
onBlur: g
|
|
46
45
|
});
|
|
@@ -63,7 +62,7 @@ import '../../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Co
|
|
|
63
62
|
j,
|
|
64
63
|
{
|
|
65
64
|
id: i,
|
|
66
|
-
value:
|
|
65
|
+
value: u,
|
|
67
66
|
state: s,
|
|
68
67
|
choice: t,
|
|
69
68
|
choices: R,
|
|
@@ -108,5 +107,5 @@ import '../../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Co
|
|
|
108
107
|
);
|
|
109
108
|
};
|
|
110
109
|
export {
|
|
111
|
-
|
|
110
|
+
ar as Radio
|
|
112
111
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsxs as M, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import N from "
|
|
2
|
+
import { baseProps as t, clsx as N } from "../../../utils/functions/functions.util.js";
|
|
3
3
|
import { FadeSlide as _ } from "../../../animations/fade-slide/fade-slide.component.js";
|
|
4
4
|
import { Box as I } from "../../primitives/box/box.component.js";
|
|
5
5
|
import "../../../utils/content/content.component.js";
|
|
6
|
-
import { baseProps as t } from "../../../utils/functions/functions.util.js";
|
|
7
6
|
import "lucide-react";
|
|
8
7
|
import { ErrorMessage as C } from "../../primitives/error-message/error-message.component.js";
|
|
9
8
|
import "usehooks-ts";
|
|
@@ -11,13 +10,13 @@ import { useControlInteraction as k } from "../../utils/hooks/use-control-intera
|
|
|
11
10
|
import '../../../assets/text-area-Dgc2jHSx.css';const B = "_Input_11gck_6", F = "_ErrorMessage_11gck_28", a = {
|
|
12
11
|
Input: B,
|
|
13
12
|
ErrorMessage: F
|
|
14
|
-
},
|
|
13
|
+
}, w = ({
|
|
15
14
|
// Interactive props
|
|
16
15
|
id: o,
|
|
17
|
-
value:
|
|
16
|
+
value: c,
|
|
18
17
|
disabled: s = !1,
|
|
19
18
|
state: n = "idle",
|
|
20
|
-
onChange:
|
|
19
|
+
onChange: i,
|
|
21
20
|
onFocus: l,
|
|
22
21
|
onBlur: d,
|
|
23
22
|
// TextArea props
|
|
@@ -30,7 +29,7 @@ import '../../../assets/text-area-Dgc2jHSx.css';const B = "_Input_11gck_6", F =
|
|
|
30
29
|
const { focused: g, emitChange: x, handleFocus: f, handleBlur: h } = k({
|
|
31
30
|
id: o,
|
|
32
31
|
disabled: s,
|
|
33
|
-
onChange:
|
|
32
|
+
onChange: i,
|
|
34
33
|
onFocus: l,
|
|
35
34
|
onBlur: d
|
|
36
35
|
});
|
|
@@ -48,7 +47,7 @@ import '../../../assets/text-area-Dgc2jHSx.css';const B = "_Input_11gck_6", F =
|
|
|
48
47
|
id: o,
|
|
49
48
|
rows: u,
|
|
50
49
|
placeholder: p,
|
|
51
|
-
value:
|
|
50
|
+
value: c,
|
|
52
51
|
className: a.Input,
|
|
53
52
|
onChange: (E) => x(E.target.value, "keyboard"),
|
|
54
53
|
onFocus: () => f(),
|
|
@@ -61,5 +60,5 @@ import '../../../assets/text-area-Dgc2jHSx.css';const B = "_Input_11gck_6", F =
|
|
|
61
60
|
);
|
|
62
61
|
};
|
|
63
62
|
export {
|
|
64
|
-
|
|
63
|
+
w as TextArea
|
|
65
64
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import c from "
|
|
2
|
+
import { clsx as c, baseProps as u } from "../../../utils/functions/functions.util.js";
|
|
3
3
|
import { useBoolean as f } from "usehooks-ts";
|
|
4
4
|
import { FadeScale as v } from "../../../animations/fade-scale/fade-scale.component.js";
|
|
5
5
|
import { FadeSlide as L } from "../../../animations/fade-slide/fade-slide.component.js";
|
|
6
6
|
import { Box as $ } from "../../primitives/box/box.component.js";
|
|
7
7
|
import "../../../utils/content/content.component.js";
|
|
8
|
-
import { baseProps as u } from "../../../utils/functions/functions.util.js";
|
|
9
8
|
import "lucide-react";
|
|
10
9
|
import { ErrorMessage as k } from "../../primitives/error-message/error-message.component.js";
|
|
11
10
|
import { Label as C } from "../../primitives/label/label.component.js";
|
|
@@ -23,7 +22,7 @@ import '../../../assets/text-field-ycFvAkxr.css';const D = "_TextField_diews_1",
|
|
|
23
22
|
ErrorMessage: K,
|
|
24
23
|
Input: Q,
|
|
25
24
|
MaskStart: R
|
|
26
|
-
},
|
|
25
|
+
}, le = ({
|
|
27
26
|
// Interactive props
|
|
28
27
|
id: d,
|
|
29
28
|
value: s = "",
|
|
@@ -39,9 +38,9 @@ import '../../../assets/text-field-ycFvAkxr.css';const D = "_TextField_diews_1",
|
|
|
39
38
|
message: m = "",
|
|
40
39
|
placeholder: _ = "",
|
|
41
40
|
// Base props
|
|
42
|
-
...
|
|
41
|
+
...x
|
|
43
42
|
}) => {
|
|
44
|
-
const { value:
|
|
43
|
+
const { value: p, setTrue: T, setFalse: A } = f(!1), { value: a, setTrue: S, setFalse: b } = f(!1), r = a || !!s || p, B = !i && !!_ && a && !s && !p, N = !!m && l === "error", g = (o) => {
|
|
45
44
|
S(), I?.(o);
|
|
46
45
|
}, E = (o) => {
|
|
47
46
|
b(), F?.(o);
|
|
@@ -49,8 +48,8 @@ import '../../../assets/text-field-ycFvAkxr.css';const D = "_TextField_diews_1",
|
|
|
49
48
|
return /* @__PURE__ */ n(
|
|
50
49
|
"div",
|
|
51
50
|
{
|
|
52
|
-
"data-testid": u(
|
|
53
|
-
className: c(e.TextField, u(
|
|
51
|
+
"data-testid": u(x, "data-testid", "text-field"),
|
|
52
|
+
className: c(e.TextField, u(x, "className")),
|
|
54
53
|
children: [
|
|
55
54
|
/* @__PURE__ */ n($, { state: l, focused: a, className: e.Box, children: [
|
|
56
55
|
/* @__PURE__ */ t(
|
|
@@ -102,5 +101,5 @@ import '../../../assets/text-field-ycFvAkxr.css';const D = "_TextField_diews_1",
|
|
|
102
101
|
);
|
|
103
102
|
};
|
|
104
103
|
export {
|
|
105
|
-
|
|
104
|
+
le as TextField
|
|
106
105
|
};
|
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as l } from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
Box: a,
|
|
3
|
+
import { clsx as a, baseProps as _ } from "../../../utils/functions/functions.util.js";
|
|
4
|
+
import '../../../assets/box-DOatBkTY.css';const i = "_Box_1nqm1_1", x = "_Checked_1nqm1_14", q = "_Idle_1nqm1_18", u = "_Focused_1nqm1_22", p = "_Success_1nqm1_31", o = {
|
|
5
|
+
Box: i,
|
|
7
6
|
Checked: x,
|
|
8
|
-
Idle:
|
|
9
|
-
Focused:
|
|
7
|
+
Idle: q,
|
|
8
|
+
Focused: u,
|
|
10
9
|
Error: "_Error_1nqm1_27",
|
|
11
|
-
Success:
|
|
12
|
-
},
|
|
10
|
+
Success: p
|
|
11
|
+
}, F = l(
|
|
13
12
|
({
|
|
14
|
-
children:
|
|
13
|
+
children: n,
|
|
15
14
|
state: c = "idle",
|
|
16
15
|
focused: s = !1,
|
|
17
16
|
checked: r = !1,
|
|
18
|
-
onClick:
|
|
17
|
+
onClick: d = () => {
|
|
19
18
|
},
|
|
20
19
|
// Base props
|
|
21
20
|
...e
|
|
22
|
-
},
|
|
21
|
+
}, m) => /* @__PURE__ */ t(
|
|
23
22
|
"div",
|
|
24
23
|
{
|
|
25
24
|
"data-testid": _(e, "data-testid", "box"),
|
|
26
|
-
ref:
|
|
27
|
-
className:
|
|
25
|
+
ref: m,
|
|
26
|
+
className: a(o.Box, _(e, "className"), {
|
|
28
27
|
[o.Idle]: c === "idle" && !s && !r,
|
|
29
28
|
[o.Error]: c === "error" && !s && !r,
|
|
30
29
|
[o.Success]: c === "success" && !s && !r,
|
|
31
30
|
[o.Focused]: s,
|
|
32
31
|
[o.Checked]: r
|
|
33
32
|
}),
|
|
34
|
-
onClick: () =>
|
|
35
|
-
children:
|
|
33
|
+
onClick: () => d(),
|
|
34
|
+
children: n
|
|
36
35
|
}
|
|
37
36
|
)
|
|
38
37
|
);
|
|
39
38
|
export {
|
|
40
|
-
|
|
39
|
+
F as Box
|
|
41
40
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import i from "
|
|
2
|
+
import { clsx as i, baseProps as o } from "../../../utils/functions/functions.util.js";
|
|
3
3
|
import { Content as _ } from "../../../utils/content/content.component.js";
|
|
4
|
-
import
|
|
5
|
-
import '../../../assets/caption-B28SGRY1.css';const m = "_Caption_cifud_1", s = "_TextPrimary_cifud_8", l = "_Content_cifud_8", x = "_TextSecondary_cifud_12", f = "_AccentPrimary_cifud_16", p = "_AccentSecondary_cifud_20", B = "_BodyExtraSmall_cifud_24", S = "_BodySmall_cifud_29", C = "_Body_cifud_24", u = "_BodyLarge_cifud_39", P = "_OneLine_cifud_44", A = "_Checked_cifud_49", t = {
|
|
4
|
+
import '../../../assets/caption-B28SGRY1.css';const m = "_Caption_cifud_1", s = "_TextPrimary_cifud_8", l = "_Content_cifud_8", x = "_TextSecondary_cifud_12", f = "_AccentPrimary_cifud_16", B = "_AccentSecondary_cifud_20", S = "_BodyExtraSmall_cifud_24", p = "_BodySmall_cifud_29", C = "_Body_cifud_24", u = "_BodyLarge_cifud_39", P = "_OneLine_cifud_44", A = "_Checked_cifud_49", t = {
|
|
6
5
|
Caption: m,
|
|
7
6
|
TextPrimary: s,
|
|
8
7
|
Content: l,
|
|
9
8
|
TextSecondary: x,
|
|
10
9
|
AccentPrimary: f,
|
|
11
|
-
AccentSecondary:
|
|
12
|
-
BodyExtraSmall:
|
|
13
|
-
BodySmall:
|
|
10
|
+
AccentSecondary: B,
|
|
11
|
+
BodyExtraSmall: S,
|
|
12
|
+
BodySmall: p,
|
|
14
13
|
Body: C,
|
|
15
14
|
BodyLarge: u,
|
|
16
15
|
OneLine: P,
|
|
17
16
|
Checked: A
|
|
18
|
-
},
|
|
17
|
+
}, h = ({
|
|
19
18
|
// Caption props
|
|
20
19
|
text: d,
|
|
21
20
|
size: e = "body",
|
|
@@ -44,5 +43,5 @@ import '../../../assets/caption-B28SGRY1.css';const m = "_Caption_cifud_1", s =
|
|
|
44
43
|
}
|
|
45
44
|
);
|
|
46
45
|
export {
|
|
47
|
-
|
|
46
|
+
h as Caption
|
|
48
47
|
};
|