@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.
Files changed (66) hide show
  1. package/dist/animations/fade-grow/fade-grow.component.js +1 -1
  2. package/dist/animations/fade-scale/fade-scale.component.js +1 -1
  3. package/dist/animations/fade-slide/fade-slide.component.js +1 -1
  4. package/dist/assets/button-text-BkR57fNF.css +1 -0
  5. package/dist/assets/message-ByzpMD6r.css +1 -0
  6. package/dist/assets/text-C982pFA7.css +1 -0
  7. package/dist/components/accordion-table/accordion-table.component.js +18 -19
  8. package/dist/components/bottom-bar/bottom-bar.component.js +8 -9
  9. package/dist/components/certifications/certifications.component.js +3 -4
  10. package/dist/components/data-protected-label/data-protected-label.component.js +10 -11
  11. package/dist/components/dialog/dialog.component.js +1 -1
  12. package/dist/components/dialog-article/dialog-article.component.js +8 -9
  13. package/dist/components/expenses/expenses.component.js +6 -7
  14. package/dist/components/footer/footer.component.js +3 -4
  15. package/dist/components/form-row/form-row.component.js +6 -7
  16. package/dist/components/header/header.component.js +1 -1
  17. package/dist/components/info-panel/info-panel.component.js +6 -7
  18. package/dist/components/information/information.component.js +13 -14
  19. package/dist/components/layout/layout.component.js +1 -1
  20. package/dist/components/loader/loader.component.js +9 -10
  21. package/dist/components/main-attachment/main-attachment.component.js +1 -1
  22. package/dist/components/message/message.component.d.ts +4 -4
  23. package/dist/components/message/message.component.js +45 -31
  24. package/dist/components/message-block/message-block.component.js +3 -4
  25. package/dist/components/not-found/not-found.component.js +3 -4
  26. package/dist/components/payment/components/glass/glass.component.js +10 -11
  27. package/dist/components/payment/components/info/info.component.js +12 -13
  28. package/dist/components/sidebar/sidebar.component.d.ts +1 -1
  29. package/dist/components/sidebar/sidebar.component.js +34 -35
  30. package/dist/components/signature/signature.component.js +8 -9
  31. package/dist/components/text/text.component.js +41 -41
  32. package/dist/components/user-panel/user-panel.component.js +5 -6
  33. package/dist/components/warranty/warranty.component.js +8 -9
  34. package/dist/controls/buttons/button/button.component.js +10 -11
  35. package/dist/controls/buttons/button-card/button-card.component.js +7 -8
  36. package/dist/controls/buttons/button-radio/button-radio.component.js +2 -3
  37. package/dist/controls/buttons/button-text/button-text.component.d.ts +3 -2
  38. package/dist/controls/buttons/button-text/button-text.component.js +106 -84
  39. package/dist/controls/interactives/card-image/card-image.component.js +16 -17
  40. package/dist/controls/interactives/card-text/card-text.component.js +17 -18
  41. package/dist/controls/interactives/checkbox/checkbox.component.js +7 -8
  42. package/dist/controls/interactives/dropdown/dropdown.component.js +8 -9
  43. package/dist/controls/interactives/input/input.component.js +11 -12
  44. package/dist/controls/interactives/radio/radio.component.js +7 -8
  45. package/dist/controls/interactives/text-area/text-area.component.js +7 -8
  46. package/dist/controls/interactives/text-field/text-field.component.js +7 -8
  47. package/dist/controls/primitives/box/box.component.js +15 -16
  48. package/dist/controls/primitives/caption/caption.component.js +7 -8
  49. package/dist/controls/primitives/choice/choice.component.js +10 -11
  50. package/dist/controls/primitives/error-message/error-message.component.js +3 -4
  51. package/dist/controls/primitives/hidden-input/hidden-input.component.js +18 -19
  52. package/dist/controls/primitives/label/label.component.js +17 -18
  53. package/dist/controls/primitives/radio-label/radio-label.component.js +7 -8
  54. package/dist/controls/primitives/status/status.component.js +13 -14
  55. package/dist/controls/utils/types.d.ts +1 -1
  56. package/dist/main.d.ts +1 -0
  57. package/dist/main.js +3 -1
  58. package/dist/utils/functions/functions.util.d.ts +9 -0
  59. package/dist/utils/functions/functions.util.js +35 -15
  60. package/dist/utils/functions/index.js +5 -4
  61. package/dist/utils/svg/svg.component.js +1 -1
  62. package/dist/utils/types.d.ts +3 -1
  63. package/package.json +1 -3
  64. package/dist/assets/button-text-NCcWZ-LB.css +0 -1
  65. package/dist/assets/message-CgGyIv5e.css +0 -1
  66. package/dist/assets/text-DYEJSFKw.css +0 -1
@@ -2,11 +2,10 @@ import { jsxs as te, jsx as Y } from "react/jsx-runtime";
2
2
  import We, { useRef as ze, useState as oe, useCallback as re, useEffect as xe } from "react";
3
3
  import { useResizeObserver as Ne } from "usehooks-ts";
4
4
  import { RefreshCw as Fe, RotateCcw as qe, Check as Be } from "lucide-react";
5
- import fe from "clsx";
6
- import { Button as Pe } from "../../controls/buttons/button/button.component.js";
5
+ import { clsx as fe, baseProps as Pe } from "../../utils/functions/functions.util.js";
6
+ import { Button as Ee } from "../../controls/buttons/button/button.component.js";
7
7
  import "../../controls/primitives/box/box.component.js";
8
8
  import "../../utils/content/content.component.js";
9
- import { baseProps as Ee } from "../../utils/functions/functions.util.js";
10
9
  import { ButtonText as ie } from "../../controls/buttons/button-text/button-text.component.js";
11
10
  import { Loader as Ue } from "../loader/loader.component.js";
12
11
  import '../../assets/signature-CYVRZH6h.css';function He(e) {
@@ -1096,7 +1095,7 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1096
1095
  AutoPanelLabelText: Ct,
1097
1096
  AutoPanelError: Ot,
1098
1097
  AutoPanelErrorTitle: Rt
1099
- }, Ft = ({
1098
+ }, Nt = ({
1100
1099
  // Signature props
1101
1100
  auto: e,
1102
1101
  manual: a,
@@ -1153,8 +1152,8 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1153
1152
  return /* @__PURE__ */ te(
1154
1153
  "div",
1155
1154
  {
1156
- "data-testid": Ee(d, "data-testid", "signature"),
1157
- className: fe(U.Signature, Ee(d, "className")),
1155
+ "data-testid": Pe(d, "data-testid", "signature"),
1156
+ className: fe(U.Signature, Pe(d, "className")),
1158
1157
  children: [
1159
1158
  /* @__PURE__ */ te(
1160
1159
  "div",
@@ -1240,9 +1239,9 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1240
1239
  }
1241
1240
  ),
1242
1241
  H(["manual-blank", "manual-drawn"]) && /* @__PURE__ */ te("div", { className: U.Footer, children: [
1243
- /* @__PURE__ */ Y(Pe, { fullWidth: !0, blurAfterClick: !0, text: "Abbrechen", color: "tertiary", onClick: P }),
1242
+ /* @__PURE__ */ Y(Ee, { fullWidth: !0, blurAfterClick: !0, text: "Abbrechen", color: "tertiary", onClick: P }),
1244
1243
  /* @__PURE__ */ Y(
1245
- Pe,
1244
+ Ee,
1246
1245
  {
1247
1246
  fullWidth: !0,
1248
1247
  blurAfterClick: !0,
@@ -1258,5 +1257,5 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1258
1257
  );
1259
1258
  };
1260
1259
  export {
1261
- Ft as Signature
1260
+ Nt as Signature
1262
1261
  };
@@ -1,18 +1,18 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { forwardRef as G } from "react";
3
- import L from "clsx";
4
- import { Content as u } from "../../utils/content/content.component.js";
5
- import '../../assets/text-DYEJSFKw.css';const x = "_Lined_zitvv_1", b = "_Left_zitvv_7", S = "_Center_zitvv_11", f = "_Right_zitvv_15", T = "_Light_zitvv_21", B = "_Regular_zitvv_25", H = "_Medium_zitvv_29", w = "_Bold_zitvv_33", R = "_BodyExtraSmall_zitvv_39", P = "_BodySmall_zitvv_44", A = "_Body_zitvv_39", U = "_BodyLarge_zitvv_54", E = "_HL1_zitvv_59", C = "_HL2_zitvv_64", k = "_HL3_zitvv_69", M = "_HL4_zitvv_74", F = "_HL5_zitvv_79", $ = "_TextPrimary_zitvv_86", N = "_TextSecondary_zitvv_90", j = "_AccentPrimary_zitvv_94", W = "_AccentSecondary_zitvv_98", q = "_ThemePrimary_zitvv_102", D = "_ThemeSecondary_zitvv_106", I = "_Success_zitvv_114", J = "_Focus_zitvv_118", K = "_Link_zitvv_122", O = "_Grey950_zitvv_126", Q = "_Grey900_zitvv_130", V = "_Grey800_zitvv_134", X = "_Grey700_zitvv_138", Y = "_Grey600_zitvv_142", Z = "_Grey500_zitvv_146", ee = "_Grey400_zitvv_150", te = "_Grey300_zitvv_154", re = "_Grey200_zitvv_158", oe = "_Grey100_zitvv_162", ie = "_Grey50_zitvv_146", ne = "_UnderSubmit_zitvv_172", ye = "_UnderSubmitLight_zitvv_173", e = {
6
- Lined: x,
7
- Left: b,
8
- Center: S,
9
- Right: f,
10
- Light: T,
11
- Regular: B,
12
- Medium: H,
13
- Bold: w,
14
- BodyExtraSmall: R,
15
- BodySmall: P,
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: "_Error_zitvv_110",
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: ie,
44
- UnderSubmit: ne,
45
- UnderSubmitLight: ye
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 = G(
54
+ }, _e = L(
55
55
  ({
56
- children: v,
56
+ children: w,
57
57
  className: m,
58
58
  preset: o,
59
59
  lined: g = !1,
60
- align: y = "left",
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, n = _, r = s, t = a;
67
+ let d = c, y = _, r = s, t = a;
68
68
  if (o) {
69
- const i = ce[o];
70
- c !== "p" && c !== i.tag && console.warn(
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" && _ !== i.weight && console.warn(
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 !== i.size && console.warn(
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 !== i.color && console.warn(
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 = i.tag, n = i.weight, r = i.size, t = i.color;
78
+ ), d = n.tag, y = n.weight, r = n.size, t = n.color;
79
79
  }
80
- const z = L(m, {
80
+ const p = u(m, {
81
81
  [e.Lined]: g,
82
82
  // ALIGNMENTS
83
- [e.Left]: y === "left",
84
- [e.Center]: y === "center",
85
- [e.Right]: y === "right",
83
+ [e.Left]: i === "left",
84
+ [e.Center]: i === "center",
85
+ [e.Right]: i === "right",
86
86
  // FONT WEIGHTS
87
- [e.Light]: n === "light",
88
- [e.Regular]: n === "regular",
89
- [e.Medium]: n === "medium",
90
- [e.Bold]: n === "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__ */ p(
128
- u,
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: z,
134
+ className: p,
135
135
  ...l,
136
- children: v
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 "clsx";
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
- }, b = ({ title: i, button: a, data: n, onClick: l, ...r }) => /* @__PURE__ */ s(
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: i }),
20
+ /* @__PURE__ */ e("span", { "data-testid": "user-panel-title", children: a }),
22
21
  /* @__PURE__ */ e(
23
22
  f,
24
23
  {
25
- text: a,
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
- b as UserPanel
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 "clsx";
3
- import { Content as l } from "../../utils/content/content.component.js";
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
- ), Z = ({ title: s, text: n, ...r }) => /* @__PURE__ */ c(
32
+ ), x = ({ title: s, text: n, ...r }) => /* @__PURE__ */ c(
34
33
  "div",
35
34
  {
36
- "data-testid": e(r, "data-testid", "warranty"),
37
- className: i(t.Warranty, e(r, "className")),
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(l, { "data-testid": "warranty-title", className: t.Title, children: s }),
43
- /* @__PURE__ */ a(l, { "data-testid": "warranty-text", className: t.Text, children: n })
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
- Z as Warranty
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 "clsx";
4
- import { FadeScale as U } from "../../../animations/fade-scale/fade-scale.component.js";
5
- import { Loader as b } from "../../../components/loader/loader.component.js";
6
- import { Content as w } from "../../../utils/content/content.component.js";
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
- }, tt = ({
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: v(f, { prevent: W, blur: L }),
82
+ onClick: U(f, { prevent: W, blur: L }),
84
83
  onFocus: () => B?.(),
85
84
  onBlur: () => M?.(),
86
85
  children: [
87
86
  s && /* @__PURE__ */ _(
88
- b,
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(U, { name: "content", keepMount: !0, condition: !s, className: t.Content, children: [
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
- w,
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
- tt as Button
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 "clsx";
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
- }, K = (f) => {
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": l(c, "data-testid", "button-card"),
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: l(c, "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: (i) => {
52
- d && i.preventDefault(), _ && i.currentTarget.blur(), x?.();
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
- K as ButtonCard
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
- }, G = ({
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
- G as ButtonRadio
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 S, jsx as _ } from "react/jsx-runtime";
2
- import a from "clsx";
3
- import { withControl as L, baseProps as m } from "../../../utils/functions/functions.util.js";
4
- import { Svg as f } from "../../../utils/svg/svg.component.js";
5
- import '../../../assets/button-text-NCcWZ-LB.css';const g = "_ButtonText_ruqqq_1", p = "_TextPrimary_ruqqq_10", M = "_TextSecondary_ruqqq_14", P = "_AccentPrimary_ruqqq_18", B = "_AccentSecondary_ruqqq_22", A = "_ThemePrimary_ruqqq_26", I = "_ThemeSecondary_ruqqq_30", R = "_Link_ruqqq_34", k = "_Left_ruqqq_38", C = "_Right_ruqqq_42", b = "_Icon_ruqqq_46", D = "_SM_ruqqq_50", G = "_MD_ruqqq_55", N = "_LG_ruqqq_60", U = "_Content_ruqqq_65", W = "_WithIcon_ruqqq_70", j = "_Light_ruqqq_96", v = "_Regular_ruqqq_100", F = "_Medium_ruqqq_104", $ = "_Bold_ruqqq_108", E = "_Underlined_ruqqq_112", t = {
6
- ButtonText: g,
7
- TextPrimary: p,
8
- TextSecondary: M,
9
- AccentPrimary: P,
10
- AccentSecondary: B,
11
- ThemePrimary: A,
12
- ThemeSecondary: I,
13
- Link: R,
14
- Left: k,
15
- Right: C,
16
- Icon: b,
17
- SM: D,
18
- MD: G,
19
- LG: N,
20
- Content: U,
21
- WithIcon: W,
22
- Light: j,
23
- Regular: v,
24
- Medium: F,
25
- Bold: $,
26
- Underlined: E
27
- }, Q = ({
28
- text: i,
29
- size: r = "md",
30
- color: e = "text-primary",
31
- weight: n = "medium",
32
- type: s = "button",
33
- icon: c = null,
34
- iconPosition: o = "left",
35
- underlined: u = !1,
36
- disabled: d = !1,
37
- preventDefault: y = !1,
38
- blurAfterClick: l = !1,
39
- onClick: h = () => {
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: x = () => {
47
+ onFocus: L = () => {
42
48
  },
43
- onBlur: T = () => {
49
+ onBlur: w = () => {
44
50
  },
45
51
  // Base props
46
- ...q
47
- }) => /* @__PURE__ */ S(
48
- "button",
49
- {
50
- "data-testid": m(q, "data-testid", "button-text"),
51
- type: s,
52
- disabled: d,
53
- className: a(t.ButtonText, m(q, "className"), {
54
- [t.WithIcon]: !!c,
55
- [t.Left]: o === "left",
56
- [t.Right]: o === "right",
57
- [t.SM]: r === "sm",
58
- [t.MD]: r === "md",
59
- [t.LG]: r === "lg",
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
- Q as ButtonText
112
+ ee as ButtonText
91
113
  };