@arthurzakharov/ui-kit 2.4.1 → 2.5.2

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 (63) 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/text-C982pFA7.css +1 -0
  6. package/dist/components/accordion-table/accordion-table.component.js +18 -19
  7. package/dist/components/bottom-bar/bottom-bar.component.js +8 -9
  8. package/dist/components/certifications/certifications.component.js +3 -4
  9. package/dist/components/data-protected-label/data-protected-label.component.js +10 -11
  10. package/dist/components/dialog/dialog.component.js +1 -1
  11. package/dist/components/dialog-article/dialog-article.component.js +8 -9
  12. package/dist/components/expenses/expenses.component.js +6 -7
  13. package/dist/components/footer/footer.component.js +3 -4
  14. package/dist/components/form-row/form-row.component.js +6 -7
  15. package/dist/components/header/header.component.js +1 -1
  16. package/dist/components/info-panel/info-panel.component.js +6 -7
  17. package/dist/components/information/information.component.js +13 -14
  18. package/dist/components/layout/layout.component.js +1 -1
  19. package/dist/components/loader/loader.component.js +9 -10
  20. package/dist/components/main-attachment/main-attachment.component.js +1 -1
  21. package/dist/components/message/message.component.js +3 -4
  22. package/dist/components/message-block/message-block.component.js +3 -4
  23. package/dist/components/not-found/not-found.component.js +3 -4
  24. package/dist/components/payment/components/glass/glass.component.js +10 -11
  25. package/dist/components/payment/components/info/info.component.js +12 -13
  26. package/dist/components/sidebar/sidebar.component.d.ts +1 -1
  27. package/dist/components/sidebar/sidebar.component.js +34 -35
  28. package/dist/components/signature/signature.component.js +8 -9
  29. package/dist/components/text/text.component.js +41 -41
  30. package/dist/components/user-panel/user-panel.component.js +5 -6
  31. package/dist/components/warranty/warranty.component.js +8 -9
  32. package/dist/controls/buttons/button/button.component.js +10 -11
  33. package/dist/controls/buttons/button-card/button-card.component.js +7 -8
  34. package/dist/controls/buttons/button-radio/button-radio.component.js +2 -3
  35. package/dist/controls/buttons/button-text/button-text.component.d.ts +3 -2
  36. package/dist/controls/buttons/button-text/button-text.component.js +106 -84
  37. package/dist/controls/interactives/card-image/card-image.component.js +16 -17
  38. package/dist/controls/interactives/card-text/card-text.component.js +17 -18
  39. package/dist/controls/interactives/checkbox/checkbox.component.js +7 -8
  40. package/dist/controls/interactives/dropdown/dropdown.component.js +8 -9
  41. package/dist/controls/interactives/input/input.component.js +11 -12
  42. package/dist/controls/interactives/radio/radio.component.js +7 -8
  43. package/dist/controls/interactives/text-area/text-area.component.js +7 -8
  44. package/dist/controls/interactives/text-field/text-field.component.js +7 -8
  45. package/dist/controls/primitives/box/box.component.js +15 -16
  46. package/dist/controls/primitives/caption/caption.component.js +7 -8
  47. package/dist/controls/primitives/choice/choice.component.js +10 -11
  48. package/dist/controls/primitives/error-message/error-message.component.js +3 -4
  49. package/dist/controls/primitives/hidden-input/hidden-input.component.js +18 -19
  50. package/dist/controls/primitives/label/label.component.js +17 -18
  51. package/dist/controls/primitives/radio-label/radio-label.component.js +7 -8
  52. package/dist/controls/primitives/status/status.component.js +13 -14
  53. package/dist/controls/utils/types.d.ts +1 -1
  54. package/dist/main.d.ts +1 -0
  55. package/dist/main.js +3 -1
  56. package/dist/utils/functions/functions.util.d.ts +9 -0
  57. package/dist/utils/functions/functions.util.js +35 -15
  58. package/dist/utils/functions/index.js +5 -4
  59. package/dist/utils/svg/svg.component.js +1 -1
  60. package/dist/utils/types.d.ts +3 -1
  61. package/package.json +1 -3
  62. package/dist/assets/button-text-NCcWZ-LB.css +0 -1
  63. package/dist/assets/text-DYEJSFKw.css +0 -1
@@ -1,16 +1,15 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { Check as l } from "lucide-react";
3
- import n from "clsx";
4
- import { baseProps as d } from "../../../utils/functions/functions.util.js";
5
- import '../../../assets/choice-j496CvVc.css';const h = "_Choice_2ykst_1", x = "_Focused_2ykst_20", y = "_Disabled_2ykst_20", L = "_Hovered_2ykst_24", S = "_Idle_2ykst_24", m = "_Success_2ykst_36", C = "_Mark_2ykst_44", M = "_Radio_2ykst_59", b = "_Checked_2ykst_63", u = "_XXS_2ykst_77", D = "_XS_2ykst_82", f = "_SM_2ykst_87", v = "_MD_2ykst_92", F = "_LG_2ykst_97", G = "_XL_2ykst_102", H = "_XXL_2ykst_107", I = "_XXXL_2ykst_112", N = "_Checkbox_2ykst_124", s = {
3
+ import { clsx as n, baseProps as d } from "../../../utils/functions/functions.util.js";
4
+ import '../../../assets/choice-j496CvVc.css';const h = "_Choice_2ykst_1", x = "_Focused_2ykst_20", y = "_Disabled_2ykst_20", L = "_Hovered_2ykst_24", S = "_Idle_2ykst_24", C = "_Success_2ykst_36", m = "_Mark_2ykst_44", M = "_Radio_2ykst_59", b = "_Checked_2ykst_63", u = "_XXS_2ykst_77", D = "_XS_2ykst_82", f = "_SM_2ykst_87", v = "_MD_2ykst_92", F = "_LG_2ykst_97", G = "_XL_2ykst_102", H = "_XXL_2ykst_107", I = "_XXXL_2ykst_112", N = "_Checkbox_2ykst_124", s = {
6
5
  Choice: h,
7
6
  Focused: x,
8
7
  Disabled: y,
9
8
  Hovered: L,
10
9
  Idle: S,
11
- Success: m,
10
+ Success: C,
12
11
  Error: "_Error_2ykst_40",
13
- Mark: C,
12
+ Mark: m,
14
13
  Radio: M,
15
14
  Checked: b,
16
15
  XXS: u,
@@ -22,15 +21,15 @@ import '../../../assets/choice-j496CvVc.css';const h = "_Choice_2ykst_1", x = "_
22
21
  XXL: H,
23
22
  XXXL: I,
24
23
  Checkbox: N
25
- }, g = ({
24
+ }, p = ({
26
25
  // Choice props
27
26
  type: o,
28
27
  checked: k,
29
28
  state: _ = "idle",
30
29
  size: c = "md",
31
30
  focused: X = !1,
32
- hovered: r = !1,
33
- disabled: a = !1,
31
+ hovered: a = !1,
32
+ disabled: r = !1,
34
33
  // Base props
35
34
  ...e
36
35
  }) => /* @__PURE__ */ i(
@@ -40,8 +39,8 @@ import '../../../assets/choice-j496CvVc.css';const h = "_Choice_2ykst_1", x = "_
40
39
  className: n(s.Choice, d(e, "className"), {
41
40
  [s.Checked]: k,
42
41
  [s.Focused]: X,
43
- [s.Hovered]: r,
44
- [s.Disabled]: a,
42
+ [s.Hovered]: a,
43
+ [s.Disabled]: r,
45
44
  [s.Radio]: o === "radio",
46
45
  [s.Checkbox]: o === "checkbox",
47
46
  [s.Idle]: _ === "idle",
@@ -63,5 +62,5 @@ import '../../../assets/choice-j496CvVc.css';const h = "_Choice_2ykst_1", x = "_
63
62
  }
64
63
  );
65
64
  export {
66
- g as Choice
65
+ p as Choice
67
66
  };
@@ -1,10 +1,9 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import t from "clsx";
2
+ import { clsx as t, baseProps as s } from "../../../utils/functions/functions.util.js";
3
3
  import { Content as a } from "../../../utils/content/content.component.js";
4
- import { baseProps as s } from "../../../utils/functions/functions.util.js";
5
4
  import '../../../assets/error-message-CQHYhXbt.css';const m = "_ErrorMessage_dqn66_1", c = {
6
5
  ErrorMessage: m
7
- }, p = ({
6
+ }, i = ({
8
7
  // ErrorMessage props
9
8
  text: e,
10
9
  // Base props
@@ -18,5 +17,5 @@ import '../../../assets/error-message-CQHYhXbt.css';const m = "_ErrorMessage_dqn
18
17
  }
19
18
  );
20
19
  export {
21
- p as ErrorMessage
20
+ i as ErrorMessage
22
21
  };
@@ -1,38 +1,37 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import l from "clsx";
3
- import { baseProps as d } from "../../../utils/functions/functions.util.js";
4
- import '../../../assets/hidden-input-DHJQHUKd.css';const f = "_HiddenInput_bej3d_1", v = {
5
- HiddenInput: f
6
- }, g = ({
7
- type: i,
8
- id: a,
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { clsx as l, baseProps as d } from "../../../utils/functions/functions.util.js";
3
+ import '../../../assets/hidden-input-DHJQHUKd.css';const v = "_HiddenInput_bej3d_1", H = {
4
+ HiddenInput: v
5
+ }, b = ({
6
+ type: a,
7
+ id: i,
9
8
  name: p,
10
- value: r,
11
- disabled: s,
9
+ value: s,
10
+ disabled: r,
12
11
  checked: o,
13
12
  onChange: n,
14
13
  onFocus: u,
15
- onBlur: m,
14
+ onBlur: c,
16
15
  // Base props
17
16
  ...e
18
- }) => /* @__PURE__ */ c(
17
+ }) => /* @__PURE__ */ m(
19
18
  "input",
20
19
  {
21
20
  "data-testid": d(e, "data-testid", "hidden-input"),
22
- type: i,
23
- id: a,
21
+ type: a,
22
+ id: i,
24
23
  name: p,
25
- value: r,
24
+ value: s,
26
25
  checked: o,
27
- disabled: s,
28
- className: l(v.HiddenInput, d(e, "className")),
26
+ disabled: r,
27
+ className: l(H.HiddenInput, d(e, "className")),
29
28
  onChange: (t) => {
30
29
  t.preventDefault(), t.nativeEvent?.pageX || t.nativeEvent.pageY ? (t.currentTarget.blur(), n(t, "mouse")) : n(t, "keyboard");
31
30
  },
32
31
  onFocus: u,
33
- onBlur: m
32
+ onBlur: c
34
33
  }
35
34
  );
36
35
  export {
37
- g as HiddenInput
36
+ b as HiddenInput
38
37
  };
@@ -1,36 +1,35 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import i from "clsx";
3
- import { Content as _ } from "../../../utils/content/content.component.js";
4
- import { baseProps as o } from "../../../utils/functions/functions.util.js";
5
- import '../../../assets/label-BKXQlPJi.css';const d = "_Label_85kr5_1", n = "_Idle_85kr5_7", m = "_Active_85kr5_12", p = "_Success_85kr5_21", e = {
2
+ import { clsx as _, baseProps as t } from "../../../utils/functions/functions.util.js";
3
+ import { Content as i } from "../../../utils/content/content.component.js";
4
+ import '../../../assets/label-BKXQlPJi.css';const d = "_Label_85kr5_1", n = "_Idle_85kr5_7", m = "_Active_85kr5_12", b = "_Success_85kr5_21", e = {
6
5
  Label: d,
7
6
  Idle: n,
8
7
  Active: m,
9
8
  Error: "_Error_85kr5_17",
10
- Success: p
11
- }, L = ({
9
+ Success: b
10
+ }, v = ({
12
11
  // Label props
13
- text: t,
14
- state: r = "idle",
15
- position: c = "idle",
12
+ text: o,
13
+ state: c = "idle",
14
+ position: r = "idle",
16
15
  // Base props
17
16
  ...s
18
17
  }) => /* @__PURE__ */ a(
19
- _,
18
+ i,
20
19
  {
21
- "data-testid": o(s, "data-testid", "label"),
22
- className: i(e.Label, o(s, "className"), {
23
- [e.Idle]: c === "idle",
24
- [e.Active]: c === "active",
25
- [e.Error]: r === "error",
26
- [e.Success]: r === "success"
20
+ "data-testid": t(s, "data-testid", "label"),
21
+ className: _(e.Label, t(s, "className"), {
22
+ [e.Idle]: r === "idle",
23
+ [e.Active]: r === "active",
24
+ [e.Error]: c === "error",
25
+ [e.Success]: c === "success"
27
26
  }),
28
27
  onClick: (l) => {
29
28
  l.stopPropagation();
30
29
  },
31
- children: t
30
+ children: o
32
31
  }
33
32
  );
34
33
  export {
35
- L as Label
34
+ v as Label
36
35
  };
@@ -1,16 +1,15 @@
1
1
  import { jsx as b } from "react/jsx-runtime";
2
2
  import { useToggle as a } from "usehooks-ts";
3
- import g from "clsx";
4
- import { baseProps as l } from "../../../utils/functions/functions.util.js";
3
+ import { clsx as g, baseProps as l } from "../../../utils/functions/functions.util.js";
5
4
  import '../../../assets/radio-label-CZHWBUUt.css';const p = "_RadioLabel_1q9rv_1", L = {
6
5
  RadioLabel: p
7
- }, F = ({
6
+ }, x = ({
8
7
  // RadioLabel props
9
8
  id: d,
10
9
  value: e,
11
10
  choice: r,
12
- choices: i = [],
13
- state: n = "idle",
11
+ choices: n = [],
12
+ state: i = "idle",
14
13
  children: c,
15
14
  // Base props
16
15
  ...o
@@ -31,11 +30,11 @@ import '../../../assets/radio-label-CZHWBUUt.css';const p = "_RadioLabel_1q9rv_1
31
30
  hovered: m,
32
31
  checked: typeof e == "string" ? e === r.value : e.includes(r.value),
33
32
  state: (() => {
34
- switch (n) {
33
+ switch (i) {
35
34
  case "success":
36
35
  return "idle";
37
36
  case "error":
38
- return i.some((f) => f.value === e) ? e === r.value ? "error" : "idle" : "error";
37
+ return n.some((f) => f.value === e) ? e === r.value ? "error" : "idle" : "error";
39
38
  case "idle":
40
39
  return "idle";
41
40
  }
@@ -45,5 +44,5 @@ import '../../../assets/radio-label-CZHWBUUt.css';const p = "_RadioLabel_1q9rv_1
45
44
  );
46
45
  };
47
46
  export {
48
- F as RadioLabel
47
+ x as RadioLabel
49
48
  };
@@ -1,16 +1,15 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { Circle as o, X as a, Check as _ } from "lucide-react";
3
- import i from "clsx";
4
- import { baseProps as t } from "../../../utils/functions/functions.util.js";
5
- import '../../../assets/status-ZxxbM9u1.css';const m = "_Status_rlg1f_1", C = "_Idle_rlg1f_6", d = "_Circle_rlg1f_6", f = "_Success_rlg1f_12", u = "_Check_rlg1f_34", n = "_X_rlg1f_35", s = {
6
- Status: m,
7
- Idle: C,
8
- Circle: d,
9
- Success: f,
2
+ import { Circle as a, X as _, Check as o } from "lucide-react";
3
+ import { clsx as i, baseProps as t } from "../../../utils/functions/functions.util.js";
4
+ import '../../../assets/status-ZxxbM9u1.css';const C = "_Status_rlg1f_1", d = "_Idle_rlg1f_6", m = "_Circle_rlg1f_6", u = "_Success_rlg1f_12", f = "_Check_rlg1f_34", n = "_X_rlg1f_35", s = {
5
+ Status: C,
6
+ Idle: d,
7
+ Circle: m,
8
+ Success: u,
10
9
  Error: "_Error_rlg1f_18",
11
- Check: u,
10
+ Check: f,
12
11
  X: n
13
- }, p = ({
12
+ }, k = ({
14
13
  // Status props
15
14
  state: c,
16
15
  // Base props
@@ -25,12 +24,12 @@ import '../../../assets/status-ZxxbM9u1.css';const m = "_Status_rlg1f_1", C = "_
25
24
  [s.Error]: c === "error"
26
25
  }),
27
26
  children: [
28
- /* @__PURE__ */ r(o, { className: s.Circle }),
29
- /* @__PURE__ */ r(a, { className: s.X }),
30
- /* @__PURE__ */ r(_, { className: s.Check })
27
+ /* @__PURE__ */ r(a, { className: s.Circle }),
28
+ /* @__PURE__ */ r(_, { className: s.X }),
29
+ /* @__PURE__ */ r(o, { className: s.Check })
31
30
  ]
32
31
  }
33
32
  );
34
33
  export {
35
- p as Status
34
+ k as Status
36
35
  };
@@ -23,7 +23,7 @@ export type ControlLabelPosition = 'idle' | 'active';
23
23
  export type ControlCaptionSize = Extract<FontSize, 'body-extra-small' | 'body-small' | 'body' | 'body-large'>;
24
24
  export type ControlCaptionColor = Extract<FontColor, 'text-primary' | 'text-secondary' | 'accent-primary' | 'accent-secondary'>;
25
25
  export type ControlButtonColor = 'primary' | 'secondary' | 'tertiary';
26
- export type ControlButtonTypeColor = Extract<FontColor, 'text-primary' | 'text-secondary' | 'accent-primary' | 'accent-secondary' | 'theme-primary' | 'theme-secondary' | 'link'>;
26
+ export type ControlButtonTypeColor = Extract<FontColor, 'text-primary' | 'text-secondary' | 'accent-primary' | 'accent-secondary' | 'theme-primary' | 'theme-secondary' | 'link' | 'under-submit'>;
27
27
  export type ControlButtonSize = 'sm' | 'md' | 'lg';
28
28
  export type ControlButtonType = 'submit' | 'reset' | 'button';
29
29
  export type QuestionPath = string[];
package/dist/main.d.ts CHANGED
@@ -49,3 +49,4 @@ export { Svg, type SvgProps } from './utils/svg/svg.component';
49
49
  export { Text, type TextProps } from './components/text';
50
50
  export { UserPanel } from './components/user-panel';
51
51
  export { Warranty, type WarrantyProps } from './components/warranty';
52
+ export { clsx } from './utils/functions';
package/dist/main.js CHANGED
@@ -49,6 +49,7 @@ import { Svg as qo } from "./utils/svg/svg.component.js";
49
49
  import { Text as Jo } from "./components/text/text.component.js";
50
50
  import { UserPanel as Oo } from "./components/user-panel/user-panel.component.js";
51
51
  import { Warranty as Vo } from "./components/warranty/warranty.component.js";
52
+ import { clsx as Yo } from "./utils/functions/functions.util.js";
52
53
  import './assets/main-DZmlIs7j.css';export {
53
54
  Z as AccordionTable,
54
55
  $ as BottomBar,
@@ -99,5 +100,6 @@ import './assets/main-DZmlIs7j.css';export {
99
100
  w as TextArea,
100
101
  k as TextField,
101
102
  Oo as UserPanel,
102
- Vo as Warranty
103
+ Vo as Warranty,
104
+ Yo as clsx
103
105
  };
@@ -28,4 +28,13 @@ export declare const withControl: <E extends SyntheticEvent<HTMLElement>>(handle
28
28
  * A helper function to extract a specific prop from a Base object, with an optional default value.
29
29
  */
30
30
  export declare function baseProps(base: Base, key: keyof Base, or?: Base[keyof Base]): string | undefined;
31
+ type ClsxClassDictionary = Record<string, unknown>;
32
+ type ClsxClassArray = ClsxClassValue[];
33
+ type ClsxClassValue = ClsxClassArray | ClsxClassDictionary | string | number | bigint | null | boolean | undefined;
34
+ /**
35
+ * Conditional class-name joiner. Drop-in replacement for the `clsx` npm package.
36
+ * Accepts strings, numbers, bigints, arrays (recursively), and dictionaries (truthy values' keys are included).
37
+ * Falsy values (`null`, `undefined`, `false`, `0`, `0n`, `''`) are skipped.
38
+ */
39
+ export declare const clsx: (...inputs: ClsxClassValue[]) => string;
31
40
  export {};
@@ -1,23 +1,43 @@
1
- function i(t) {
2
- return typeof t == "string";
1
+ function o(n) {
2
+ return typeof n == "string";
3
3
  }
4
- function e(t) {
5
- const n = /<\/?[a-z][\s\S]*>/i, r = /&(?:[a-z][a-z0-9]+|#\d+|#x[\da-f]+);/i;
6
- return n.test(t) || r.test(t);
4
+ function e(n) {
5
+ const i = /<\/?[a-z][\s\S]*>/i, t = /&(?:[a-z][a-z0-9]+|#\d+|#x[\da-f]+);/i;
6
+ return i.test(n) || t.test(n);
7
7
  }
8
- function o(t) {
9
- return i(t) && e(t);
8
+ function f(n) {
9
+ return o(n) && e(n);
10
10
  }
11
- const s = (t, n) => (r) => {
12
- n?.prevent && r.preventDefault(), n?.stop && r.stopPropagation(), n?.blur && r.currentTarget.blur(), n?.withEvent ? t(r) : t();
11
+ const u = (n, i) => (t) => {
12
+ i?.prevent && t.preventDefault(), i?.stop && t.stopPropagation(), i?.blur && t.currentTarget.blur(), i?.withEvent ? n(t) : n();
13
13
  };
14
- function u(t, n, r) {
15
- return t[n] ? t[n] : r;
14
+ function c(n, i, t) {
15
+ return n[i] ? n[i] : t;
16
16
  }
17
+ const s = (...n) => {
18
+ const i = [];
19
+ for (const t of n)
20
+ if (t) {
21
+ if (typeof t == "string" || typeof t == "number" || typeof t == "bigint") {
22
+ i.push(String(t));
23
+ continue;
24
+ }
25
+ if (Array.isArray(t)) {
26
+ const r = s(...t);
27
+ r && i.push(r);
28
+ continue;
29
+ }
30
+ if (typeof t == "object")
31
+ for (const r in t)
32
+ t[r] && i.push(r);
33
+ }
34
+ return i.join(" ");
35
+ };
17
36
  export {
18
- u as baseProps,
37
+ c as baseProps,
38
+ s as clsx,
19
39
  e as containsHtml,
20
- o as isHtmlString,
21
- i as isString,
22
- s as withControl
40
+ f as isHtmlString,
41
+ o as isString,
42
+ u as withControl
23
43
  };
@@ -1,8 +1,9 @@
1
- import { baseProps as o, containsHtml as r, isHtmlString as n, isString as s, withControl as l } from "./functions.util.js";
1
+ import { baseProps as o, clsx as r, containsHtml as s, isHtmlString as n, isString as l, withControl as m } from "./functions.util.js";
2
2
  export {
3
3
  o as baseProps,
4
- r as containsHtml,
4
+ r as clsx,
5
+ s as containsHtml,
5
6
  n as isHtmlString,
6
- s as isString,
7
- l as withControl
7
+ l as isString,
8
+ m as withControl
8
9
  };
@@ -1,5 +1,5 @@
1
1
  import { isValidElement as m, cloneElement as r } from "react";
2
- import t from "clsx";
2
+ import { clsx as t } from "../functions/functions.util.js";
3
3
  const a = (e) => {
4
4
  const { icon: s = null, className: l = "", ...o } = e;
5
5
  return m(s) ? r(s, {
@@ -6,7 +6,7 @@ export declare const FONT_WEIGHT: readonly ["light", "regular", "medium", "bold"
6
6
  export type FontWeight = (typeof FONT_WEIGHT)[number];
7
7
  export declare const FONT_SIZE: readonly ["body-extra-small", "body-small", "body", "body-large", "hl5", "hl4", "hl3", "hl2", "hl1"];
8
8
  export type FontSize = (typeof FONT_SIZE)[number];
9
- export declare const FONT_COLOR: readonly ["text-primary", "text-secondary", "accent-primary", "accent-secondary", "theme-primary", "theme-secondary", "error", "success", "focus", "link", "grey-950", "grey-900", "grey-800", "grey-700", "grey-600", "grey-500", "grey-400", "grey-300", "grey-200", "grey-100", "grey-50"];
9
+ export declare const FONT_COLOR: readonly ["text-primary", "text-secondary", "accent-primary", "accent-secondary", "theme-primary", "theme-secondary", "error", "success", "focus", "link", "grey-950", "grey-900", "grey-800", "grey-700", "grey-600", "grey-500", "grey-400", "grey-300", "grey-200", "grey-100", "grey-50", "under-submit"];
10
10
  export type FontColor = (typeof FONT_COLOR)[number];
11
11
  export interface Base {
12
12
  className?: string;
@@ -14,4 +14,6 @@ export interface Base {
14
14
  }
15
15
  export declare const TEXT_PRESET: readonly ["page-info", "page-subtitle", "page-title", "sidebar-title", "step-title", "under-submit", "under-submit-light"];
16
16
  export type TextPreset = (typeof TEXT_PRESET)[number];
17
+ export declare const BUTTON_TEXT_PRESET: readonly ["body-small-link", "body-link", "body-underline-link", "body-small-under-submit"];
18
+ export type ButtonTextPreset = (typeof BUTTON_TEXT_PRESET)[number];
17
19
  export type TagNames = keyof HTMLElementTagNameMap;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "2.4.1",
4
+ "version": "2.5.2",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -29,7 +29,6 @@
29
29
  "test-storybook:coverage": "vitest --project=storybook --coverage"
30
30
  },
31
31
  "peerDependencies": {
32
- "clsx": "^2.1.1",
33
32
  "lucide-react": "^0.562.0",
34
33
  "motion": "^12.26.1",
35
34
  "react": "^18.3.1",
@@ -54,7 +53,6 @@
54
53
  "@vitejs/plugin-react": "^5.1.2",
55
54
  "@vitest/browser-playwright": "^4.0.16",
56
55
  "@vitest/coverage-v8": "^4.0.18",
57
- "clsx": "^2.1.1",
58
56
  "es-toolkit": "^1.44.0",
59
57
  "eslint": "^9.39.2",
60
58
  "eslint-plugin-react-hooks": "^7.0.1",
@@ -1 +0,0 @@
1
- ._ButtonText_ruqqq_1{display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:var(--rm-ui-padding-xs);border-radius:var(--rm-ui-border-radius-sm)}._TextPrimary_ruqqq_10{color:var(--rm-ui-color-text-primary)}._TextSecondary_ruqqq_14{color:var(--rm-ui-color-text-secondary)}._AccentPrimary_ruqqq_18{color:var(--rm-ui-color-accent-primary)}._AccentSecondary_ruqqq_22{color:var(--rm-ui-color-accent-secondary)}._ThemePrimary_ruqqq_26{color:var(--rm-ui-color-theme-primary)}._ThemeSecondary_ruqqq_30{color:var(--rm-ui-color-theme-secondary)}._Link_ruqqq_34{color:var(--rm-ui-color-link)}._Left_ruqqq_38{flex-direction:row}._Right_ruqqq_42{flex-direction:row-reverse}._Icon_ruqqq_46{stroke-width:1.5}._SM_ruqqq_50 ._Icon_ruqqq_46{width:20px;height:20px}._MD_ruqqq_55 ._Icon_ruqqq_46{width:24px;height:24px}._LG_ruqqq_60 ._Icon_ruqqq_46{width:26px;height:26px}._SM_ruqqq_50 ._Content_ruqqq_65{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._SM_ruqqq_50._WithIcon_ruqqq_70 ._Content_ruqqq_65{line-height:calc(var(--rm-ui-line-height-body-small) - var(--rm-ui-padding-xxs) * 2)}._MD_ruqqq_55 ._Content_ruqqq_65{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._MD_ruqqq_55._WithIcon_ruqqq_70 ._Content_ruqqq_65{line-height:calc(var(--rm-ui-line-height-body) - var(--rm-ui-padding-xxs) * 2)}._LG_ruqqq_60 ._Content_ruqqq_65{font-size:var(--rm-ui-font-size-hl4);line-height:var(--rm-ui-line-height-hl4)}._LG_ruqqq_60._WithIcon_ruqqq_70 ._Content_ruqqq_65{line-height:calc(var(--rm-ui-line-height-hl4) - var(--rm-ui-padding-xxs) * 2)}._Content_ruqqq_65{text-decoration:none}._Light_ruqqq_96{font-weight:var(--rm-ui-font-weight-light)}._Regular_ruqqq_100{font-weight:var(--rm-ui-font-weight-regular)}._Medium_ruqqq_104{font-weight:var(--rm-ui-font-weight-medium)}._Bold_ruqqq_108{font-weight:var(--rm-ui-font-weight-bold)}._Underlined_ruqqq_112{text-decoration:underline}
@@ -1 +0,0 @@
1
- ._Lined_zitvv_1{text-decoration:underline}._Left_zitvv_7{text-align:left}._Center_zitvv_11{text-align:center}._Right_zitvv_15{text-align:right}._Light_zitvv_21{font-weight:var(--rm-ui-font-weight-light)}._Regular_zitvv_25{font-weight:var(--rm-ui-font-weight-regular)}._Medium_zitvv_29{font-weight:var(--rm-ui-font-weight-medium)}._Bold_zitvv_33{font-weight:var(--rm-ui-font-weight-bold)}._BodyExtraSmall_zitvv_39{font-size:var(--rm-ui-font-size-body-extra-small);line-height:var(--rm-ui-line-height-body-extra-small)}._BodySmall_zitvv_44{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._Body_zitvv_39{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._BodyLarge_zitvv_54{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._HL1_zitvv_59{font-size:var(--rm-ui-font-size-hl1);line-height:var(--rm-ui-line-height-hl1)}._HL2_zitvv_64{font-size:var(--rm-ui-font-size-hl2);line-height:var(--rm-ui-line-height-hl2)}._HL3_zitvv_69{font-size:var(--rm-ui-font-size-hl3);line-height:var(--rm-ui-line-height-hl3)}._HL4_zitvv_74{font-size:var(--rm-ui-font-size-hl4);line-height:var(--rm-ui-line-height-hl4)}._HL5_zitvv_79{font-size:var(--rm-ui-font-size-hl5);line-height:var(--rm-ui-line-height-hl5)}._TextPrimary_zitvv_86{color:var(--rm-ui-color-text-primary)}._TextSecondary_zitvv_90{color:var(--rm-ui-color-text-secondary)}._AccentPrimary_zitvv_94{color:var(--rm-ui-color-accent-primary)}._AccentSecondary_zitvv_98{color:var(--rm-ui-color-accent-secondary)}._ThemePrimary_zitvv_102{color:var(--rm-ui-color-theme-primary)}._ThemeSecondary_zitvv_106{color:var(--rm-ui-color-theme-secondary)}._Error_zitvv_110{color:var(--rm-ui-color-error)}._Success_zitvv_114{color:var(--rm-ui-color-success)}._Focus_zitvv_118{color:var(--rm-ui-color-focus)}._Link_zitvv_122{color:var(--rm-ui-color-link)}._Grey950_zitvv_126{color:var(--rm-ui-grey-950)}._Grey900_zitvv_130{color:var(--rm-ui-grey-900)}._Grey800_zitvv_134{color:var(--rm-ui-grey-800)}._Grey700_zitvv_138{color:var(--rm-ui-grey-700)}._Grey600_zitvv_142{color:var(--rm-ui-grey-600)}._Grey500_zitvv_146{color:var(--rm-ui-grey-500)}._Grey400_zitvv_150{color:var(--rm-ui-grey-400)}._Grey300_zitvv_154{color:var(--rm-ui-grey-300)}._Grey200_zitvv_158{color:var(--rm-ui-grey-200)}._Grey100_zitvv_162{color:var(--rm-ui-grey-100)}._Grey50_zitvv_146{color:var(--rm-ui-grey-50)}._UnderSubmit_zitvv_172,._UnderSubmitLight_zitvv_173{text-align:center}._UnderSubmit_zitvv_172 button,._UnderSubmit_zitvv_172 *[role=button]{color:var(--rm-ui-color-link);opacity:.7;outline-offset:2px}._UnderSubmit_zitvv_172 button:hover,._UnderSubmit_zitvv_172 *[role=button]:hover{text-decoration:underline}._UnderSubmit_zitvv_172 button:focus-visible,._UnderSubmit_zitvv_172 *[role=button]:focus-visible{outline-color:var(--rm-ui-color-focus)}._UnderSubmitLight_zitvv_173{color:var(--rm-ui-color-text-under-submit)}._UnderSubmitLight_zitvv_173 button,._UnderSubmitLight_zitvv_173 *[role=button]{color:var(--rm-ui-color-button-under-submit);opacity:.7;outline-offset:2px}._UnderSubmitLight_zitvv_173 button:hover,._UnderSubmitLight_zitvv_173 *[role=button]:hover{text-decoration:underline}._UnderSubmitLight_zitvv_173 button:focus-visible,._UnderSubmitLight_zitvv_173 *[role=button]:focus-visible{outline-color:var(--rm-ui-color-focus)}