@arthurzakharov/ui-kit 2.4.1 → 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/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.js +3 -4
- 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/text-DYEJSFKw.css +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { Content as
|
|
5
|
-
import '../../assets/text-
|
|
6
|
-
Lined:
|
|
7
|
-
Left:
|
|
8
|
-
Center:
|
|
9
|
-
Right:
|
|
10
|
-
Light:
|
|
11
|
-
Regular:
|
|
12
|
-
Medium:
|
|
13
|
-
Bold:
|
|
14
|
-
BodyExtraSmall:
|
|
15
|
-
BodySmall:
|
|
1
|
+
import { jsx as G } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as L } from "react";
|
|
3
|
+
import { clsx as u } from "../../utils/functions/functions.util.js";
|
|
4
|
+
import { Content as x } from "../../utils/content/content.component.js";
|
|
5
|
+
import '../../assets/text-C982pFA7.css';const b = "_Lined_1wt8w_1", S = "_Left_1wt8w_7", f = "_Center_1wt8w_11", T = "_Right_1wt8w_15", B = "_Light_1wt8w_21", H = "_Regular_1wt8w_25", R = "_Medium_1wt8w_29", P = "_Bold_1wt8w_33", v = "_BodyExtraSmall_1wt8w_39", z = "_BodySmall_1wt8w_44", A = "_Body_1wt8w_39", U = "_BodyLarge_1wt8w_54", E = "_HL1_1wt8w_59", C = "_HL2_1wt8w_64", k = "_HL3_1wt8w_69", M = "_HL4_1wt8w_74", F = "_HL5_1wt8w_79", $ = "_TextPrimary_1wt8w_86", N = "_TextSecondary_1wt8w_90", j = "_AccentPrimary_1wt8w_94", W = "_AccentSecondary_1wt8w_98", q = "_ThemePrimary_1wt8w_102", D = "_ThemeSecondary_1wt8w_106", I = "_Success_1wt8w_114", J = "_Focus_1wt8w_118", K = "_Link_1wt8w_122", O = "_Grey950_1wt8w_126", Q = "_Grey900_1wt8w_130", V = "_Grey800_1wt8w_134", X = "_Grey700_1wt8w_138", Y = "_Grey600_1wt8w_142", Z = "_Grey500_1wt8w_146", ee = "_Grey400_1wt8w_150", te = "_Grey300_1wt8w_154", re = "_Grey200_1wt8w_158", oe = "_Grey100_1wt8w_162", ne = "_Grey50_1wt8w_146", ye = "_UnderSubmit_1wt8w_172", ie = "_UnderSubmitLight_1wt8w_173", e = {
|
|
6
|
+
Lined: b,
|
|
7
|
+
Left: S,
|
|
8
|
+
Center: f,
|
|
9
|
+
Right: T,
|
|
10
|
+
Light: B,
|
|
11
|
+
Regular: H,
|
|
12
|
+
Medium: R,
|
|
13
|
+
Bold: P,
|
|
14
|
+
BodyExtraSmall: v,
|
|
15
|
+
BodySmall: z,
|
|
16
16
|
Body: A,
|
|
17
17
|
BodyLarge: U,
|
|
18
18
|
HL1: E,
|
|
@@ -26,7 +26,7 @@ import '../../assets/text-DYEJSFKw.css';const x = "_Lined_zitvv_1", b = "_Left_z
|
|
|
26
26
|
AccentSecondary: W,
|
|
27
27
|
ThemePrimary: q,
|
|
28
28
|
ThemeSecondary: D,
|
|
29
|
-
Error: "
|
|
29
|
+
Error: "_Error_1wt8w_110",
|
|
30
30
|
Success: I,
|
|
31
31
|
Focus: J,
|
|
32
32
|
Link: K,
|
|
@@ -40,9 +40,9 @@ import '../../assets/text-DYEJSFKw.css';const x = "_Lined_zitvv_1", b = "_Left_z
|
|
|
40
40
|
Grey300: te,
|
|
41
41
|
Grey200: re,
|
|
42
42
|
Grey100: oe,
|
|
43
|
-
Grey50:
|
|
44
|
-
UnderSubmit:
|
|
45
|
-
UnderSubmitLight:
|
|
43
|
+
Grey50: ne,
|
|
44
|
+
UnderSubmit: ye,
|
|
45
|
+
UnderSubmitLight: ie
|
|
46
46
|
}, ce = {
|
|
47
47
|
"page-info": { tag: "p", weight: "light", size: "body", color: "text-secondary" },
|
|
48
48
|
"page-subtitle": { tag: "h6", weight: "regular", size: "body", color: "text-primary" },
|
|
@@ -51,43 +51,43 @@ import '../../assets/text-DYEJSFKw.css';const x = "_Lined_zitvv_1", b = "_Left_z
|
|
|
51
51
|
"step-title": { tag: "h2", weight: "bold", size: "hl4", color: "text-primary" },
|
|
52
52
|
"under-submit": { tag: "p", weight: "regular", size: "body-small", color: "text-secondary" },
|
|
53
53
|
"under-submit-light": { tag: "p", weight: "light", size: "body-small", color: "text-secondary" }
|
|
54
|
-
}, _e =
|
|
54
|
+
}, _e = L(
|
|
55
55
|
({
|
|
56
|
-
children:
|
|
56
|
+
children: w,
|
|
57
57
|
className: m,
|
|
58
58
|
preset: o,
|
|
59
59
|
lined: g = !1,
|
|
60
|
-
align:
|
|
60
|
+
align: i = "left",
|
|
61
61
|
tag: c = "p",
|
|
62
62
|
weight: _ = "regular",
|
|
63
63
|
size: s = "body",
|
|
64
64
|
color: a = "text-primary",
|
|
65
65
|
...l
|
|
66
66
|
}, h) => {
|
|
67
|
-
let d = c,
|
|
67
|
+
let d = c, y = _, r = s, t = a;
|
|
68
68
|
if (o) {
|
|
69
|
-
const
|
|
70
|
-
c !== "p" && c !==
|
|
69
|
+
const n = ce[o];
|
|
70
|
+
c !== "p" && c !== n.tag && console.warn(
|
|
71
71
|
`Text component: 'tag' prop will be overridden by 'preset="${o}"'. Remove explicit 'tag' prop if not intended.`
|
|
72
|
-
), _ !== "regular" && _ !==
|
|
72
|
+
), _ !== "regular" && _ !== n.weight && console.warn(
|
|
73
73
|
`Text component: 'weight' prop will be overridden by 'preset="${o}"'. Remove explicit 'weight' prop if not intended.`
|
|
74
|
-
), s !== "body" && s !==
|
|
74
|
+
), s !== "body" && s !== n.size && console.warn(
|
|
75
75
|
`Text component: 'size' prop will be overridden by 'preset="${o}"'. Remove explicit 'size' prop if not intended.`
|
|
76
|
-
), a !== "text-primary" && a !==
|
|
76
|
+
), a !== "text-primary" && a !== n.color && console.warn(
|
|
77
77
|
`Text component: 'color' prop will be overridden by 'preset="${o}"'. Remove explicit 'color' prop if not intended.`
|
|
78
|
-
), d =
|
|
78
|
+
), d = n.tag, y = n.weight, r = n.size, t = n.color;
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const p = u(m, {
|
|
81
81
|
[e.Lined]: g,
|
|
82
82
|
// ALIGNMENTS
|
|
83
|
-
[e.Left]:
|
|
84
|
-
[e.Center]:
|
|
85
|
-
[e.Right]:
|
|
83
|
+
[e.Left]: i === "left",
|
|
84
|
+
[e.Center]: i === "center",
|
|
85
|
+
[e.Right]: i === "right",
|
|
86
86
|
// FONT WEIGHTS
|
|
87
|
-
[e.Light]:
|
|
88
|
-
[e.Regular]:
|
|
89
|
-
[e.Medium]:
|
|
90
|
-
[e.Bold]:
|
|
87
|
+
[e.Light]: y === "light",
|
|
88
|
+
[e.Regular]: y === "regular",
|
|
89
|
+
[e.Medium]: y === "medium",
|
|
90
|
+
[e.Bold]: y === "bold",
|
|
91
91
|
// FONT SIZES
|
|
92
92
|
[e.BodyExtraSmall]: r === "body-extra-small",
|
|
93
93
|
[e.BodySmall]: r === "body-small",
|
|
@@ -124,16 +124,16 @@ import '../../assets/text-DYEJSFKw.css';const x = "_Lined_zitvv_1", b = "_Left_z
|
|
|
124
124
|
[e.UnderSubmit]: o === "under-submit",
|
|
125
125
|
[e.UnderSubmitLight]: o === "under-submit-light"
|
|
126
126
|
});
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
|
|
127
|
+
return /* @__PURE__ */ G(
|
|
128
|
+
x,
|
|
129
129
|
{
|
|
130
130
|
ref: h,
|
|
131
131
|
"data-testid": l["data-testid"] || "content",
|
|
132
132
|
tag: d,
|
|
133
133
|
alwaysRender: !1,
|
|
134
|
-
className:
|
|
134
|
+
className: p,
|
|
135
135
|
...l,
|
|
136
|
-
children:
|
|
136
|
+
children: w
|
|
137
137
|
}
|
|
138
138
|
);
|
|
139
139
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Pencil as d } from "lucide-react";
|
|
3
|
-
import p from "
|
|
3
|
+
import { clsx as p, baseProps as o } from "../../utils/functions/functions.util.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { baseProps as o } from "../../utils/functions/functions.util.js";
|
|
6
5
|
import "../../utils/content/content.component.js";
|
|
7
6
|
import "usehooks-ts";
|
|
8
7
|
import "../../controls/primitives/box/box.component.js";
|
|
@@ -11,18 +10,18 @@ import '../../assets/user-panel-SauszbHl.css';const _ = "_UserPanel_zes0v_1", u
|
|
|
11
10
|
UserPanel: _,
|
|
12
11
|
Head: u,
|
|
13
12
|
Info: P
|
|
14
|
-
},
|
|
13
|
+
}, j = ({ title: a, button: i, data: n, onClick: l, ...r }) => /* @__PURE__ */ s(
|
|
15
14
|
"div",
|
|
16
15
|
{
|
|
17
16
|
"data-testid": o(r, "data-testid", "user-panel"),
|
|
18
17
|
className: p(t.UserPanel, o(r, "className")),
|
|
19
18
|
children: [
|
|
20
19
|
/* @__PURE__ */ s("div", { className: t.Head, children: [
|
|
21
|
-
/* @__PURE__ */ e("span", { "data-testid": "user-panel-title", children:
|
|
20
|
+
/* @__PURE__ */ e("span", { "data-testid": "user-panel-title", children: a }),
|
|
22
21
|
/* @__PURE__ */ e(
|
|
23
22
|
f,
|
|
24
23
|
{
|
|
25
|
-
text:
|
|
24
|
+
text: i,
|
|
26
25
|
preventDefault: !0,
|
|
27
26
|
blurAfterClick: !0,
|
|
28
27
|
icon: /* @__PURE__ */ e(d, {}),
|
|
@@ -38,5 +37,5 @@ import '../../assets/user-panel-SauszbHl.css';const _ = "_UserPanel_zes0v_1", u
|
|
|
38
37
|
}
|
|
39
38
|
);
|
|
40
39
|
export {
|
|
41
|
-
|
|
40
|
+
j as UserPanel
|
|
42
41
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import i from "
|
|
3
|
-
import { Content as
|
|
4
|
-
import { isHtmlString as h, baseProps as e } from "../../utils/functions/functions.util.js";
|
|
2
|
+
import { isHtmlString as h, clsx as i, baseProps as l } from "../../utils/functions/functions.util.js";
|
|
3
|
+
import { Content as e } from "../../utils/content/content.component.js";
|
|
5
4
|
import '../../assets/warranty-8YaLpEkj.css';const o = "_Warranty_1gdgm_1", d = "_Icon_1gdgm_16", m = "_Main_1gdgm_22", g = "_Title_1gdgm_29", _ = "_Text_1gdgm_34", t = {
|
|
6
5
|
Warranty: o,
|
|
7
6
|
Icon: d,
|
|
@@ -30,21 +29,21 @@ import '../../assets/warranty-8YaLpEkj.css';const o = "_Warranty_1gdgm_1", d = "
|
|
|
30
29
|
] })
|
|
31
30
|
]
|
|
32
31
|
}
|
|
33
|
-
),
|
|
32
|
+
), x = ({ title: s, text: n, ...r }) => /* @__PURE__ */ c(
|
|
34
33
|
"div",
|
|
35
34
|
{
|
|
36
|
-
"data-testid":
|
|
37
|
-
className: i(t.Warranty,
|
|
35
|
+
"data-testid": l(r, "data-testid", "warranty"),
|
|
36
|
+
className: i(t.Warranty, l(r, "className")),
|
|
38
37
|
children: [
|
|
39
38
|
/* @__PURE__ */ a(v, {}),
|
|
40
39
|
/* @__PURE__ */ c("div", { className: t.Main, children: [
|
|
41
40
|
h(n),
|
|
42
|
-
/* @__PURE__ */ a(
|
|
43
|
-
/* @__PURE__ */ a(
|
|
41
|
+
/* @__PURE__ */ a(e, { "data-testid": "warranty-title", className: t.Title, children: s }),
|
|
42
|
+
/* @__PURE__ */ a(e, { "data-testid": "warranty-text", className: t.Text, children: n })
|
|
44
43
|
] })
|
|
45
44
|
]
|
|
46
45
|
}
|
|
47
46
|
);
|
|
48
47
|
export {
|
|
49
|
-
|
|
48
|
+
x as Warranty
|
|
50
49
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsxs as d, jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as x } from "react";
|
|
3
|
-
import u from "
|
|
4
|
-
import { FadeScale as
|
|
5
|
-
import { Loader as
|
|
6
|
-
import { Content as
|
|
7
|
-
import { withControl as v, baseProps as m } from "../../../utils/functions/functions.util.js";
|
|
3
|
+
import { clsx as u, withControl as U, baseProps as m } from "../../../utils/functions/functions.util.js";
|
|
4
|
+
import { FadeScale as b } from "../../../animations/fade-scale/fade-scale.component.js";
|
|
5
|
+
import { Loader as w } from "../../../components/loader/loader.component.js";
|
|
6
|
+
import { Content as v } from "../../../utils/content/content.component.js";
|
|
8
7
|
import '../../../assets/button-BMjMeK04.css';const C = "_Button_14or2_1", T = "_SM_14or2_19", S = "_LG_14or2_24", k = "_Tertiary_14or2_24", N = "_Text_14or2_28", D = "_MD_14or2_34", G = "_Primary_14or2_62", P = "_Info_14or2_71", I = "_Secondary_14or2_75", g = "_Loading_14or2_111", $ = "_FullWidth_14or2_119", j = "_FullWidthUntil768_14or2_123", E = "_FullWidthUntil1024_14or2_124", q = "_FullWidthUntil1200_14or2_125", A = "_FullWidthFrom768_14or2_147", H = "_FullWidthFrom1024_14or2_148", J = "_FullWidthFrom1200_14or2_149", K = "_Content_14or2_171", O = "_Loader_14or2_202", t = {
|
|
9
8
|
Button: C,
|
|
10
9
|
SM: T,
|
|
@@ -25,7 +24,7 @@ import '../../../assets/button-BMjMeK04.css';const C = "_Button_14or2_1", T = "_
|
|
|
25
24
|
FullWidthFrom1200: J,
|
|
26
25
|
Content: K,
|
|
27
26
|
Loader: O
|
|
28
|
-
},
|
|
27
|
+
}, z = ({
|
|
29
28
|
text: F,
|
|
30
29
|
color: i = "primary",
|
|
31
30
|
textSize: l = "md",
|
|
@@ -80,12 +79,12 @@ import '../../../assets/button-BMjMeK04.css';const C = "_Button_14or2_1", T = "_
|
|
|
80
79
|
[t.FullWidthFrom1200]: o && !r && e === 1200,
|
|
81
80
|
[t.Loading]: s
|
|
82
81
|
}),
|
|
83
|
-
onClick:
|
|
82
|
+
onClick: U(f, { prevent: W, blur: L }),
|
|
84
83
|
onFocus: () => B?.(),
|
|
85
84
|
onBlur: () => M?.(),
|
|
86
85
|
children: [
|
|
87
86
|
s && /* @__PURE__ */ _(
|
|
88
|
-
|
|
87
|
+
w,
|
|
89
88
|
{
|
|
90
89
|
size: "xs",
|
|
91
90
|
color: (() => {
|
|
@@ -101,10 +100,10 @@ import '../../../assets/button-BMjMeK04.css';const C = "_Button_14or2_1", T = "_
|
|
|
101
100
|
className: t.Loader
|
|
102
101
|
}
|
|
103
102
|
),
|
|
104
|
-
/* @__PURE__ */ d(
|
|
103
|
+
/* @__PURE__ */ d(b, { name: "content", keepMount: !0, condition: !s, className: t.Content, children: [
|
|
105
104
|
/* @__PURE__ */ _("span", { className: t.Text, children: F }),
|
|
106
105
|
/* @__PURE__ */ _(
|
|
107
|
-
|
|
106
|
+
v,
|
|
108
107
|
{
|
|
109
108
|
className: u(t.Info, {
|
|
110
109
|
[t.SM]: a === "sm",
|
|
@@ -120,5 +119,5 @@ import '../../../assets/button-BMjMeK04.css';const C = "_Button_14or2_1", T = "_
|
|
|
120
119
|
);
|
|
121
120
|
};
|
|
122
121
|
export {
|
|
123
|
-
|
|
122
|
+
z as Button
|
|
124
123
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as B } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as g } from "react";
|
|
3
3
|
import { useHover as v, useToggle as k } from "usehooks-ts";
|
|
4
|
-
import L from "
|
|
4
|
+
import { clsx as L, baseProps as i } from "../../../utils/functions/functions.util.js";
|
|
5
5
|
import { Box as N } from "../../primitives/box/box.component.js";
|
|
6
6
|
import { Caption as h } from "../../primitives/caption/caption.component.js";
|
|
7
7
|
import "lucide-react";
|
|
8
|
-
import { baseProps as l } from "../../../utils/functions/functions.util.js";
|
|
9
8
|
import "../../../utils/content/content.component.js";
|
|
10
9
|
import { Svg as y } from "../../../utils/svg/svg.component.js";
|
|
11
10
|
import '../../../assets/button-card-B-nlEbJU.css';const F = "_ButtonCard_10os6_1", j = "_Icon_10os6_10", z = "_IconTop_10os6_14", D = "_Text_10os6_21", H = "_IconLeft_10os6_25", o = {
|
|
@@ -14,7 +13,7 @@ import '../../../assets/button-card-B-nlEbJU.css';const F = "_ButtonCard_10os6_1
|
|
|
14
13
|
IconTop: z,
|
|
15
14
|
Text: D,
|
|
16
15
|
IconLeft: H
|
|
17
|
-
},
|
|
16
|
+
}, J = (f) => {
|
|
18
17
|
const {
|
|
19
18
|
text: u,
|
|
20
19
|
textSize: m = "body",
|
|
@@ -33,12 +32,12 @@ import '../../../assets/button-card-B-nlEbJU.css';const F = "_ButtonCard_10os6_1
|
|
|
33
32
|
return /* @__PURE__ */ t(
|
|
34
33
|
N,
|
|
35
34
|
{
|
|
36
|
-
"data-testid":
|
|
35
|
+
"data-testid": i(c, "data-testid", "button-card"),
|
|
37
36
|
ref: r,
|
|
38
37
|
checked: n || T,
|
|
39
38
|
state: "idle",
|
|
40
39
|
focused: C,
|
|
41
|
-
className:
|
|
40
|
+
className: i(c, "className"),
|
|
42
41
|
children: /* @__PURE__ */ B(
|
|
43
42
|
"button",
|
|
44
43
|
{
|
|
@@ -48,8 +47,8 @@ import '../../../assets/button-card-B-nlEbJU.css';const F = "_ButtonCard_10os6_1
|
|
|
48
47
|
[o.IconTop]: e === "top",
|
|
49
48
|
[o.IconLeft]: e === "left"
|
|
50
49
|
}),
|
|
51
|
-
onClick: (
|
|
52
|
-
d &&
|
|
50
|
+
onClick: (l) => {
|
|
51
|
+
d && l.preventDefault(), _ && l.currentTarget.blur(), x?.();
|
|
53
52
|
},
|
|
54
53
|
onFocus: () => {
|
|
55
54
|
a(), I?.();
|
|
@@ -77,5 +76,5 @@ import '../../../assets/button-card-B-nlEbJU.css';const F = "_ButtonCard_10os6_1
|
|
|
77
76
|
);
|
|
78
77
|
};
|
|
79
78
|
export {
|
|
80
|
-
|
|
79
|
+
J as ButtonCard
|
|
81
80
|
};
|
|
@@ -4,7 +4,6 @@ import { useHover as N, useToggle as g } from "usehooks-ts";
|
|
|
4
4
|
import { Box as B } from "../../primitives/box/box.component.js";
|
|
5
5
|
import { Caption as H } from "../../primitives/caption/caption.component.js";
|
|
6
6
|
import "lucide-react";
|
|
7
|
-
import "clsx";
|
|
8
7
|
import { baseProps as d } from "../../../utils/functions/functions.util.js";
|
|
9
8
|
import "../../../utils/content/content.component.js";
|
|
10
9
|
import { Status as C } from "../../primitives/status/status.component.js";
|
|
@@ -15,7 +14,7 @@ import '../../../assets/button-radio-CPeNePW2.css';const T = "_ButtonRadio_iwy6t
|
|
|
15
14
|
Content: W,
|
|
16
15
|
Text: k,
|
|
17
16
|
Hint: L
|
|
18
|
-
},
|
|
17
|
+
}, E = ({
|
|
19
18
|
text: m,
|
|
20
19
|
textSize: u = "body",
|
|
21
20
|
active: n = !1,
|
|
@@ -82,5 +81,5 @@ import '../../../assets/button-radio-CPeNePW2.css';const T = "_ButtonRadio_iwy6t
|
|
|
82
81
|
);
|
|
83
82
|
};
|
|
84
83
|
export {
|
|
85
|
-
|
|
84
|
+
E as ButtonRadio
|
|
86
85
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ControlButtonSize, ControlButtonType, ControlButtonTypeColor } from '../../utils';
|
|
2
2
|
import { SvgProps } from '../../../utils/svg';
|
|
3
|
-
import { Base, FontWeight } from '../../../utils/types';
|
|
3
|
+
import { Base, ButtonTextPreset, FontWeight } from '../../../utils/types';
|
|
4
4
|
export interface ButtonTextProps extends Base {
|
|
5
5
|
text: string;
|
|
6
|
+
preset?: ButtonTextPreset;
|
|
6
7
|
color?: ControlButtonTypeColor;
|
|
7
8
|
size?: ControlButtonSize;
|
|
8
9
|
type?: ControlButtonType;
|
|
@@ -17,4 +18,4 @@ export interface ButtonTextProps extends Base {
|
|
|
17
18
|
onFocus?: () => void;
|
|
18
19
|
onBlur?: () => void;
|
|
19
20
|
}
|
|
20
|
-
export declare const ButtonText: ({ text, size, color, weight, type, icon, iconPosition, underlined, disabled, preventDefault, blurAfterClick, onClick, onFocus, onBlur, ...base }: ButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const ButtonText: ({ text, preset, size, color, weight, type, icon, iconPosition, underlined, disabled, preventDefault, blurAfterClick, onClick, onFocus, onBlur, ...base }: ButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,91 +1,113 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Left:
|
|
15
|
-
Right:
|
|
16
|
-
Icon:
|
|
17
|
-
SM:
|
|
18
|
-
MD:
|
|
19
|
-
LG:
|
|
20
|
-
Content:
|
|
21
|
-
WithIcon:
|
|
22
|
-
Light:
|
|
23
|
-
Regular:
|
|
24
|
-
Medium:
|
|
25
|
-
Bold:
|
|
26
|
-
Underlined:
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
size:
|
|
30
|
-
color:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { jsxs as v, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as y, withControl as B, baseProps as h } from "../../../utils/functions/functions.util.js";
|
|
3
|
+
import { Svg as M } from "../../../utils/svg/svg.component.js";
|
|
4
|
+
import '../../../assets/button-text-BkR57fNF.css';const P = "_ButtonText_m1p2l_1", k = "_TextPrimary_m1p2l_15", R = "_TextSecondary_m1p2l_19", U = "_AccentPrimary_m1p2l_23", A = "_AccentSecondary_m1p2l_27", I = "_ThemePrimary_m1p2l_31", z = "_ThemeSecondary_m1p2l_35", C = "_Link_m1p2l_39", W = "_UnderSubmit_m1p2l_43", $ = "_Left_m1p2l_48", D = "_Right_m1p2l_52", G = "_Icon_m1p2l_56", N = "_SM_m1p2l_60", j = "_MD_m1p2l_65", F = "_LG_m1p2l_70", q = "_Content_m1p2l_75", E = "_WithIcon_m1p2l_80", H = "_Light_m1p2l_106", J = "_Regular_m1p2l_110", K = "_Medium_m1p2l_114", O = "_Bold_m1p2l_118", Q = "_Underlined_m1p2l_122", e = {
|
|
5
|
+
ButtonText: P,
|
|
6
|
+
TextPrimary: k,
|
|
7
|
+
TextSecondary: R,
|
|
8
|
+
AccentPrimary: U,
|
|
9
|
+
AccentSecondary: A,
|
|
10
|
+
ThemePrimary: I,
|
|
11
|
+
ThemeSecondary: z,
|
|
12
|
+
Link: C,
|
|
13
|
+
UnderSubmit: W,
|
|
14
|
+
Left: $,
|
|
15
|
+
Right: D,
|
|
16
|
+
Icon: G,
|
|
17
|
+
SM: N,
|
|
18
|
+
MD: j,
|
|
19
|
+
LG: F,
|
|
20
|
+
Content: q,
|
|
21
|
+
WithIcon: E,
|
|
22
|
+
Light: H,
|
|
23
|
+
Regular: J,
|
|
24
|
+
Medium: K,
|
|
25
|
+
Bold: O,
|
|
26
|
+
Underlined: Q
|
|
27
|
+
}, V = {
|
|
28
|
+
"body-small-link": { size: "sm", color: "link", weight: "regular", underlined: !1 },
|
|
29
|
+
"body-small-under-submit": { size: "sm", color: "under-submit", weight: "regular", underlined: !0 },
|
|
30
|
+
"body-link": { size: "md", color: "link", weight: "regular", underlined: !1 },
|
|
31
|
+
"body-underline-link": { size: "md", color: "link", weight: "medium", underlined: !0 }
|
|
32
|
+
}, ee = ({
|
|
33
|
+
text: x,
|
|
34
|
+
preset: o,
|
|
35
|
+
size: l = "md",
|
|
36
|
+
color: m = "text-primary",
|
|
37
|
+
weight: c = "medium",
|
|
38
|
+
type: g = "button",
|
|
39
|
+
icon: s = null,
|
|
40
|
+
iconPosition: a = "left",
|
|
41
|
+
underlined: d = !1,
|
|
42
|
+
disabled: T = !1,
|
|
43
|
+
preventDefault: b = !1,
|
|
44
|
+
blurAfterClick: f = !1,
|
|
45
|
+
onClick: S = () => {
|
|
40
46
|
},
|
|
41
|
-
onFocus:
|
|
47
|
+
onFocus: L = () => {
|
|
42
48
|
},
|
|
43
|
-
onBlur:
|
|
49
|
+
onBlur: w = () => {
|
|
44
50
|
},
|
|
45
51
|
// Base props
|
|
46
|
-
...
|
|
47
|
-
}) =>
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
[t.TextPrimary]: e === "text-primary",
|
|
61
|
-
[t.TextSecondary]: e === "text-secondary",
|
|
62
|
-
[t.AccentPrimary]: e === "accent-primary",
|
|
63
|
-
[t.AccentSecondary]: e === "accent-secondary",
|
|
64
|
-
[t.ThemePrimary]: e === "theme-primary",
|
|
65
|
-
[t.ThemeSecondary]: e === "theme-secondary",
|
|
66
|
-
[t.Link]: e === "link"
|
|
67
|
-
}),
|
|
68
|
-
onClick: L(h, { prevent: y, blur: l }),
|
|
69
|
-
onFocus: () => x(),
|
|
70
|
-
onBlur: () => T(),
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ _(f, { icon: c, className: t.Icon }),
|
|
73
|
-
/* @__PURE__ */ _(
|
|
74
|
-
"span",
|
|
75
|
-
{
|
|
76
|
-
className: a(t.Content, {
|
|
77
|
-
[t.Light]: n === "light",
|
|
78
|
-
[t.Regular]: n === "regular",
|
|
79
|
-
[t.Medium]: n === "medium",
|
|
80
|
-
[t.Bold]: n === "bold",
|
|
81
|
-
[t.Underlined]: u
|
|
82
|
-
}),
|
|
83
|
-
children: i
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
]
|
|
52
|
+
..._
|
|
53
|
+
}) => {
|
|
54
|
+
let i = l, t = m, r = c, p = d;
|
|
55
|
+
if (o) {
|
|
56
|
+
const n = V[o];
|
|
57
|
+
l !== "md" && l !== n.size && console.warn(
|
|
58
|
+
`ButtonText component: 'size' prop will be overridden by 'preset="${o}"'. Remove explicit 'size' prop if not intended.`
|
|
59
|
+
), m !== "text-primary" && m !== n.color && console.warn(
|
|
60
|
+
`ButtonText component: 'color' prop will be overridden by 'preset="${o}"'. Remove explicit 'color' prop if not intended.`
|
|
61
|
+
), c !== "medium" && c !== n.weight && console.warn(
|
|
62
|
+
`ButtonText component: 'weight' prop will be overridden by 'preset="${o}"'. Remove explicit 'weight' prop if not intended.`
|
|
63
|
+
), d !== !1 && d !== n.underlined && console.warn(
|
|
64
|
+
`ButtonText component: 'underlined' prop will be overridden by 'preset="${o}"'. Remove explicit 'underlined' prop if not intended.`
|
|
65
|
+
), i = n.size, t = n.color, r = n.weight, p = n.underlined;
|
|
87
66
|
}
|
|
88
|
-
|
|
67
|
+
return /* @__PURE__ */ v(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
"data-testid": h(_, "data-testid", "button-text"),
|
|
71
|
+
type: g,
|
|
72
|
+
disabled: T,
|
|
73
|
+
className: y(e.ButtonText, h(_, "className"), {
|
|
74
|
+
[e.WithIcon]: !!s,
|
|
75
|
+
[e.Left]: a === "left",
|
|
76
|
+
[e.Right]: a === "right",
|
|
77
|
+
[e.SM]: i === "sm",
|
|
78
|
+
[e.MD]: i === "md",
|
|
79
|
+
[e.LG]: i === "lg",
|
|
80
|
+
[e.TextPrimary]: t === "text-primary",
|
|
81
|
+
[e.TextSecondary]: t === "text-secondary",
|
|
82
|
+
[e.AccentPrimary]: t === "accent-primary",
|
|
83
|
+
[e.AccentSecondary]: t === "accent-secondary",
|
|
84
|
+
[e.ThemePrimary]: t === "theme-primary",
|
|
85
|
+
[e.ThemeSecondary]: t === "theme-secondary",
|
|
86
|
+
[e.Link]: t === "link",
|
|
87
|
+
[e.UnderSubmit]: t === "under-submit"
|
|
88
|
+
}),
|
|
89
|
+
onClick: B(S, { prevent: b, blur: f }),
|
|
90
|
+
onFocus: () => L(),
|
|
91
|
+
onBlur: () => w(),
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ u(M, { icon: s, className: e.Icon }),
|
|
94
|
+
/* @__PURE__ */ u(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
className: y(e.Content, {
|
|
98
|
+
[e.Light]: r === "light",
|
|
99
|
+
[e.Regular]: r === "regular",
|
|
100
|
+
[e.Medium]: r === "medium",
|
|
101
|
+
[e.Bold]: r === "bold",
|
|
102
|
+
[e.Underlined]: p
|
|
103
|
+
}),
|
|
104
|
+
children: x
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
};
|
|
89
111
|
export {
|
|
90
|
-
|
|
112
|
+
ee as ButtonText
|
|
91
113
|
};
|