@arthurzakharov/ui-kit 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/assets/box-DOatBkTY.css +1 -0
  2. package/dist/assets/{main-Dz2hrn4n.css → main-BrKLCio0.css} +1 -1
  3. package/dist/components/accordion-table/accordion-table.component.js +14 -12
  4. package/dist/components/bottom-bar/bottom-bar.component.js +5 -3
  5. package/dist/components/dialog-article/dialog-article.component.js +8 -6
  6. package/dist/components/sidebar/sidebar.component.js +24 -20
  7. package/dist/components/signature/signature.component.js +6 -5
  8. package/dist/components/user-panel/user-panel.component.js +18 -15
  9. package/dist/controls/{button → buttons/button}/button.component.d.ts +2 -2
  10. package/dist/controls/{button → buttons/button}/button.component.js +5 -5
  11. package/dist/controls/{button-card → buttons/button-card}/button-card.component.d.ts +2 -2
  12. package/dist/controls/{button-card → buttons/button-card}/button-card.component.js +12 -11
  13. package/dist/controls/{button-radio → buttons/button-radio}/button-radio.component.d.ts +1 -1
  14. package/dist/controls/{button-radio → buttons/button-radio}/button-radio.component.js +17 -15
  15. package/dist/controls/{button-text → buttons/button-text}/button-text.component.d.ts +3 -3
  16. package/dist/controls/{button-text → buttons/button-text}/button-text.component.js +3 -3
  17. package/dist/controls/buttons/index.d.ts +4 -0
  18. package/dist/controls/buttons/index.js +10 -0
  19. package/dist/controls/index.d.ts +3 -21
  20. package/dist/controls/index.js +48 -48
  21. package/dist/controls/{card-image → interactives/card-image}/card-image.component.d.ts +3 -3
  22. package/dist/controls/{card-image → interactives/card-image}/card-image.component.js +23 -21
  23. package/dist/controls/{card-text → interactives/card-text}/card-text.component.d.ts +3 -3
  24. package/dist/controls/interactives/card-text/card-text.component.js +77 -0
  25. package/dist/controls/{checkbox → interactives/checkbox}/checkbox.component.d.ts +3 -3
  26. package/dist/controls/{checkbox → interactives/checkbox}/checkbox.component.js +19 -17
  27. package/dist/controls/{dropdown → interactives/dropdown}/dropdown.component.d.ts +2 -2
  28. package/dist/controls/{dropdown → interactives/dropdown}/dropdown.component.js +9 -9
  29. package/dist/controls/interactives/index.d.ts +8 -0
  30. package/dist/controls/interactives/index.js +18 -0
  31. package/dist/controls/{input → interactives/input}/input.component.d.ts +2 -2
  32. package/dist/controls/{input → interactives/input}/input.component.js +3 -3
  33. package/dist/controls/{radio → interactives/radio}/radio.component.d.ts +3 -4
  34. package/dist/controls/{radio → interactives/radio}/radio.component.js +24 -21
  35. package/dist/controls/{text-area → interactives/text-area}/text-area.component.d.ts +2 -2
  36. package/dist/controls/interactives/text-area/text-area.component.js +65 -0
  37. package/dist/controls/{text-field → interactives/text-field}/text-field.component.d.ts +2 -2
  38. package/dist/controls/{text-field → interactives/text-field}/text-field.component.js +29 -27
  39. package/dist/controls/{box → primitives/box}/box.component.d.ts +2 -2
  40. package/dist/controls/primitives/box/box.component.js +41 -0
  41. package/dist/controls/{caption → primitives/caption}/caption.component.d.ts +2 -2
  42. package/dist/controls/{caption → primitives/caption}/caption.component.js +3 -3
  43. package/dist/controls/{choice → primitives/choice}/choice.component.d.ts +2 -2
  44. package/dist/controls/{choice → primitives/choice}/choice.component.js +2 -2
  45. package/dist/controls/{error-message → primitives/error-message}/error-message.component.d.ts +1 -1
  46. package/dist/controls/{error-message → primitives/error-message}/error-message.component.js +3 -3
  47. package/dist/controls/{hidden-input → primitives/hidden-input}/hidden-input.component.d.ts +2 -2
  48. package/dist/controls/{hidden-input → primitives/hidden-input}/hidden-input.component.js +2 -2
  49. package/dist/controls/primitives/index.d.ts +8 -0
  50. package/dist/controls/primitives/index.js +18 -0
  51. package/dist/controls/{label → primitives/label}/label.component.d.ts +2 -2
  52. package/dist/controls/{label → primitives/label}/label.component.js +3 -3
  53. package/dist/controls/{radio-label → primitives/radio-label}/radio-label.component.d.ts +2 -2
  54. package/dist/controls/{radio-label → primitives/radio-label}/radio-label.component.js +2 -2
  55. package/dist/controls/{status → primitives/status}/status.component.d.ts +2 -2
  56. package/dist/controls/{status → primitives/status}/status.component.js +2 -2
  57. package/dist/controls/{hooks → utils/hooks}/use-choice/use-choice.hook.d.ts +1 -1
  58. package/dist/controls/{hooks → utils/hooks}/use-control-interaction/use-control-interaction.hook.d.ts +1 -1
  59. package/dist/controls/utils/index.d.ts +1 -0
  60. package/dist/controls/utils/index.js +8 -4
  61. package/dist/main.d.ts +20 -20
  62. package/dist/main.js +102 -101
  63. package/package.json +8 -8
  64. package/dist/assets/box-5bAcfszB.css +0 -1
  65. package/dist/controls/box/box.component.js +0 -40
  66. package/dist/controls/card-text/card-text.component.js +0 -75
  67. package/dist/controls/text-area/text-area.component.js +0 -62
  68. /package/dist/controls/{button → buttons/button}/index.d.ts +0 -0
  69. /package/dist/controls/{button → buttons/button}/index.js +0 -0
  70. /package/dist/controls/{button-card → buttons/button-card}/index.d.ts +0 -0
  71. /package/dist/controls/{button-card → buttons/button-card}/index.js +0 -0
  72. /package/dist/controls/{button-radio → buttons/button-radio}/index.d.ts +0 -0
  73. /package/dist/controls/{button-radio → buttons/button-radio}/index.js +0 -0
  74. /package/dist/controls/{button-text → buttons/button-text}/index.d.ts +0 -0
  75. /package/dist/controls/{button-text → buttons/button-text}/index.js +0 -0
  76. /package/dist/controls/{card-image → interactives/card-image}/index.d.ts +0 -0
  77. /package/dist/controls/{card-image → interactives/card-image}/index.js +0 -0
  78. /package/dist/controls/{card-text → interactives/card-text}/index.d.ts +0 -0
  79. /package/dist/controls/{card-text → interactives/card-text}/index.js +0 -0
  80. /package/dist/controls/{checkbox → interactives/checkbox}/index.d.ts +0 -0
  81. /package/dist/controls/{checkbox → interactives/checkbox}/index.js +0 -0
  82. /package/dist/controls/{dropdown → interactives/dropdown}/index.d.ts +0 -0
  83. /package/dist/controls/{dropdown → interactives/dropdown}/index.js +0 -0
  84. /package/dist/controls/{input → interactives/input}/index.d.ts +0 -0
  85. /package/dist/controls/{input → interactives/input}/index.js +0 -0
  86. /package/dist/controls/{input → interactives/input}/input.utils.d.ts +0 -0
  87. /package/dist/controls/{input → interactives/input}/input.utils.js +0 -0
  88. /package/dist/controls/{radio → interactives/radio}/index.d.ts +0 -0
  89. /package/dist/controls/{radio → interactives/radio}/index.js +0 -0
  90. /package/dist/controls/{text-area → interactives/text-area}/index.d.ts +0 -0
  91. /package/dist/controls/{text-area → interactives/text-area}/index.js +0 -0
  92. /package/dist/controls/{text-field → interactives/text-field}/index.d.ts +0 -0
  93. /package/dist/controls/{text-field → interactives/text-field}/index.js +0 -0
  94. /package/dist/controls/{box → primitives/box}/index.d.ts +0 -0
  95. /package/dist/controls/{box → primitives/box}/index.js +0 -0
  96. /package/dist/controls/{caption → primitives/caption}/index.d.ts +0 -0
  97. /package/dist/controls/{caption → primitives/caption}/index.js +0 -0
  98. /package/dist/controls/{choice → primitives/choice}/index.d.ts +0 -0
  99. /package/dist/controls/{choice → primitives/choice}/index.js +0 -0
  100. /package/dist/controls/{error-message → primitives/error-message}/index.d.ts +0 -0
  101. /package/dist/controls/{error-message → primitives/error-message}/index.js +0 -0
  102. /package/dist/controls/{hidden-input → primitives/hidden-input}/index.d.ts +0 -0
  103. /package/dist/controls/{hidden-input → primitives/hidden-input}/index.js +0 -0
  104. /package/dist/controls/{label → primitives/label}/index.d.ts +0 -0
  105. /package/dist/controls/{label → primitives/label}/index.js +0 -0
  106. /package/dist/controls/{radio-label → primitives/radio-label}/index.d.ts +0 -0
  107. /package/dist/controls/{radio-label → primitives/radio-label}/index.js +0 -0
  108. /package/dist/controls/{status → primitives/status}/index.d.ts +0 -0
  109. /package/dist/controls/{status → primitives/status}/index.js +0 -0
  110. /package/dist/controls/{hooks → utils/hooks}/index.d.ts +0 -0
  111. /package/dist/controls/{hooks → utils/hooks}/index.js +0 -0
  112. /package/dist/controls/{hooks → utils/hooks}/use-choice/index.d.ts +0 -0
  113. /package/dist/controls/{hooks → utils/hooks}/use-choice/index.js +0 -0
  114. /package/dist/controls/{hooks → utils/hooks}/use-choice/use-choice.hook.js +0 -0
  115. /package/dist/controls/{hooks → utils/hooks}/use-control-interaction/index.d.ts +0 -0
  116. /package/dist/controls/{hooks → utils/hooks}/use-control-interaction/index.js +0 -0
  117. /package/dist/controls/{hooks → utils/hooks}/use-control-interaction/use-control-interaction.hook.js +0 -0
@@ -0,0 +1,65 @@
1
+ import { jsxs as M, jsx as r } from "react/jsx-runtime";
2
+ import N from "clsx";
3
+ import { FadeSlide as _ } from "../../../animations/fade-slide/fade-slide.component.js";
4
+ import { Box as I } from "../../primitives/box/box.component.js";
5
+ import "react";
6
+ import { baseProps as t } from "../../../utils/functions/functions.util.js";
7
+ import "lucide-react";
8
+ import { ErrorMessage as C } from "../../primitives/error-message/error-message.component.js";
9
+ import "usehooks-ts";
10
+ import { useControlInteraction as k } from "../../utils/hooks/use-control-interaction/use-control-interaction.hook.js";
11
+ import '../../../assets/text-area-Dgc2jHSx.css';const B = "_Input_11gck_6", F = "_ErrorMessage_11gck_28", a = {
12
+ Input: B,
13
+ ErrorMessage: F
14
+ }, z = ({
15
+ // Interactive props
16
+ id: o,
17
+ value: i,
18
+ disabled: s = !1,
19
+ state: n = "idle",
20
+ onChange: c,
21
+ onFocus: l,
22
+ onBlur: d,
23
+ // TextArea props
24
+ placeholder: p = "",
25
+ rows: u = 5,
26
+ message: m = "",
27
+ // Base props
28
+ ...e
29
+ }) => {
30
+ const { focused: g, emitChange: x, handleFocus: f, handleBlur: h } = k({
31
+ id: o,
32
+ disabled: s,
33
+ onChange: c,
34
+ onFocus: l,
35
+ onBlur: d
36
+ });
37
+ return /* @__PURE__ */ M(
38
+ "div",
39
+ {
40
+ "data-testid": t(e, "data-testid", "textarea"),
41
+ className: N(a.Container, t(e, "className")),
42
+ children: [
43
+ /* @__PURE__ */ r(I, { state: n, focused: g, className: t(e, "className"), children: /* @__PURE__ */ r(
44
+ "textarea",
45
+ {
46
+ "data-testid": "textarea-input",
47
+ disabled: s,
48
+ id: o,
49
+ rows: u,
50
+ placeholder: p,
51
+ value: i,
52
+ className: a.Input,
53
+ onChange: (E) => x(E.target.value, "keyboard"),
54
+ onFocus: () => f(),
55
+ onBlur: () => h()
56
+ }
57
+ ) }),
58
+ /* @__PURE__ */ r(_, { name: "text-message", condition: n === "error" && !!m, children: /* @__PURE__ */ r(C, { "data-testid": "textarea-error-message", text: m, className: a.ErrorMessage }) })
59
+ ]
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ z as TextArea
65
+ };
@@ -1,5 +1,5 @@
1
- import { Interactive } from '../utils';
2
- import { Base } from '../../utils/types';
1
+ import { Interactive } from '../../utils';
2
+ import { Base } from '../../../utils/types';
3
3
  export interface TextFieldProps extends Base, Interactive<string> {
4
4
  mask?: string;
5
5
  maxLength?: number;
@@ -1,14 +1,16 @@
1
1
  import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
- import c from "clsx";
2
+ import i from "clsx";
3
3
  import { useBoolean as p } from "usehooks-ts";
4
- import { FadeScale as k } from "../../animations/fade-scale/fade-scale.component.js";
5
- import { FadeSlide as B } from "../../animations/fade-slide/fade-slide.component.js";
6
- import { Box as C } from "../box/box.component.js";
7
- import { Input as $ } from "../input/input.component.js";
8
- import { Label as w } from "../label/label.component.js";
9
- import { ErrorMessage as j } from "../error-message/error-message.component.js";
10
- import { baseProps as f } from "../../utils/functions/functions.util.js";
11
- import '../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O = "_Content_14hxo_10", q = "_Label_14hxo_26", y = "_Idle_14hxo_32", z = "_Active_14hxo_37", G = "_Placeholder_14hxo_42", H = "_PlaceholderText_14hxo_49", J = "_ErrorMessage_14hxo_57", K = "_Input_14hxo_61", Q = "_MaskStart_14hxo_65", e = {
4
+ import { FadeScale as k } from "../../../animations/fade-scale/fade-scale.component.js";
5
+ import { FadeSlide as B } from "../../../animations/fade-slide/fade-slide.component.js";
6
+ import { Box as C } from "../../primitives/box/box.component.js";
7
+ import "react";
8
+ import { baseProps as f } from "../../../utils/functions/functions.util.js";
9
+ import "lucide-react";
10
+ import { ErrorMessage as $ } from "../../primitives/error-message/error-message.component.js";
11
+ import { Label as w } from "../../primitives/label/label.component.js";
12
+ import { Input as j } from "../input/input.component.js";
13
+ import '../../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O = "_Content_14hxo_10", q = "_Label_14hxo_26", y = "_Idle_14hxo_32", z = "_Active_14hxo_37", G = "_Placeholder_14hxo_42", H = "_PlaceholderText_14hxo_49", J = "_ErrorMessage_14hxo_57", K = "_Input_14hxo_61", Q = "_MaskStart_14hxo_65", e = {
12
14
  TextField: D,
13
15
  Content: O,
14
16
  Label: q,
@@ -19,10 +21,10 @@ import '../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O
19
21
  ErrorMessage: J,
20
22
  Input: K,
21
23
  MaskStart: Q
22
- }, se = ({
24
+ }, ae = ({
23
25
  // Interactive props
24
- id: i,
25
- value: s = "",
26
+ id: c,
27
+ value: r = "",
26
28
  disabled: u = !1,
27
29
  state: l = "idle",
28
30
  onChange: I,
@@ -37,7 +39,7 @@ import '../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O
37
39
  // Base props
38
40
  ...x
39
41
  }) => {
40
- const { value: _, setTrue: A, setFalse: S } = p(!1), { value: a, setTrue: b, setFalse: g } = p(!1), r = a || !!s || _, E = !n && !!m && a && !s && !_, N = !!d && l === "error", v = (o) => {
42
+ const { value: _, setTrue: A, setFalse: S } = p(!1), { value: s, setTrue: b, setFalse: g } = p(!1), a = s || !!r || _, E = !n && !!m && s && !r && !_, N = !!d && l === "error", v = (o) => {
41
43
  b(), F?.(o);
42
44
  }, L = (o) => {
43
45
  g(), M?.(o);
@@ -46,15 +48,15 @@ import '../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O
46
48
  "div",
47
49
  {
48
50
  "data-testid": f(x, "data-testid", "text-field"),
49
- className: c(e.TextField, f(x, "className")),
51
+ className: i(e.TextField, f(x, "className")),
50
52
  children: [
51
- /* @__PURE__ */ t(C, { state: l, focused: a, children: /* @__PURE__ */ h(
53
+ /* @__PURE__ */ t(C, { state: l, focused: s, children: /* @__PURE__ */ h(
52
54
  "label",
53
55
  {
54
- htmlFor: i,
56
+ htmlFor: c,
55
57
  className: e.Content,
56
58
  onPointerDown: (o) => {
57
- a && o.preventDefault();
59
+ s && o.preventDefault();
58
60
  },
59
61
  children: [
60
62
  /* @__PURE__ */ t(
@@ -62,23 +64,23 @@ import '../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O
62
64
  {
63
65
  "data-testid": "text-label",
64
66
  text: T,
65
- position: r ? "active" : "idle",
66
- state: r ? l : "idle",
67
- className: c(e.Label, r ? e.Active : e.Idle)
67
+ position: a ? "active" : "idle",
68
+ state: a ? l : "idle",
69
+ className: i(e.Label, a ? e.Active : e.Idle)
68
70
  }
69
71
  ),
70
72
  /* @__PURE__ */ t(k, { name: "text-placeholder", condition: E, className: e.Placeholder, children: /* @__PURE__ */ t("span", { "data-testid": "text-placeholder", className: e.PlaceholderText, children: m }) }),
71
73
  /* @__PURE__ */ t(
72
- $,
74
+ j,
73
75
  {
74
76
  "data-testid": "text-input",
75
77
  mask: n,
76
78
  maxLength: P,
77
79
  disabled: u,
78
- id: i,
79
- value: s,
80
- className: c(e.Input, {
81
- [e.MaskStart]: n && s === "" && !r
80
+ id: c,
81
+ value: r,
82
+ className: i(e.Input, {
83
+ [e.MaskStart]: n && r === "" && !a
82
84
  }),
83
85
  onAnimationStart: A,
84
86
  onAnimationEnd: S,
@@ -90,11 +92,11 @@ import '../../assets/text-field-Bp4Ra0yN.css';const D = "_TextField_14hxo_1", O
90
92
  ]
91
93
  }
92
94
  ) }),
93
- /* @__PURE__ */ t(B, { name: "text-message", direction: "ltr", condition: N, children: /* @__PURE__ */ t(j, { "data-testid": "text-error-message", text: d, className: e.ErrorMessage }) })
95
+ /* @__PURE__ */ t(B, { name: "text-message", direction: "ltr", condition: N, children: /* @__PURE__ */ t($, { "data-testid": "text-error-message", text: d, className: e.ErrorMessage }) })
94
96
  ]
95
97
  }
96
98
  );
97
99
  };
98
100
  export {
99
- se as TextField
101
+ ae as TextField
100
102
  };
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
- import { State } from '../utils';
3
- import { Base } from '../../utils/types';
2
+ import { State } from '../../utils';
3
+ import { Base } from '../../../utils/types';
4
4
  export interface BoxProps extends PropsWithChildren<Base> {
5
5
  state?: State;
6
6
  focused?: boolean;
@@ -0,0 +1,41 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as l } from "react";
3
+ import i from "clsx";
4
+ import { baseProps as _ } from "../../../utils/functions/functions.util.js";
5
+ import '../../../assets/box-DOatBkTY.css';const a = "_Box_1nqm1_1", x = "_Checked_1nqm1_14", p = "_Idle_1nqm1_18", q = "_Focused_1nqm1_22", u = "_Success_1nqm1_31", o = {
6
+ Box: a,
7
+ Checked: x,
8
+ Idle: p,
9
+ Focused: q,
10
+ Error: "_Error_1nqm1_27",
11
+ Success: u
12
+ }, I = l(
13
+ ({
14
+ children: m,
15
+ state: c = "idle",
16
+ focused: s = !1,
17
+ checked: r = !1,
18
+ onClick: n = () => {
19
+ },
20
+ // Base props
21
+ ...e
22
+ }, d) => /* @__PURE__ */ t(
23
+ "div",
24
+ {
25
+ "data-testid": _(e, "data-testid", "box"),
26
+ ref: d,
27
+ className: i(o.Box, _(e, "className"), {
28
+ [o.Idle]: c === "idle" && !s && !r,
29
+ [o.Error]: c === "error" && !s && !r,
30
+ [o.Success]: c === "success" && !s && !r,
31
+ [o.Focused]: s,
32
+ [o.Checked]: r
33
+ }),
34
+ onClick: () => n(),
35
+ children: m
36
+ }
37
+ )
38
+ );
39
+ export {
40
+ I as Box
41
+ };
@@ -1,5 +1,5 @@
1
- import { ControlCaptionColor, ControlCaptionSize } from '../utils';
2
- import { Base } from '../../utils/types';
1
+ import { ControlCaptionColor, ControlCaptionSize } from '../../utils';
2
+ import { Base } from '../../../utils/types';
3
3
  export interface CaptionProps extends Base {
4
4
  text: string;
5
5
  size?: ControlCaptionSize;
@@ -1,8 +1,8 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
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/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 = {
3
+ import { Content as _ } from "../../../utils/content/content.component.js";
4
+ import { baseProps as o } from "../../../utils/functions/functions.util.js";
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 = {
6
6
  Caption: m,
7
7
  TextPrimary: s,
8
8
  Content: l,
@@ -1,5 +1,5 @@
1
- import { ControlChoiceType, State } from '../utils';
2
- import { Base, Size } from '../../utils/types';
1
+ import { ControlChoiceType, State } from '../../utils';
2
+ import { Base, Size } from '../../../utils/types';
3
3
  export interface ChoiceProps extends Base {
4
4
  type: ControlChoiceType;
5
5
  checked: boolean;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { Check as l } from "lucide-react";
3
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 = {
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 = {
6
6
  Choice: h,
7
7
  Focused: x,
8
8
  Disabled: y,
@@ -1,4 +1,4 @@
1
- import { Base } from '../../utils/types';
1
+ import { Base } from '../../../utils/types';
2
2
  export interface ErrorMessageProps extends Base {
3
3
  text: string;
4
4
  }
@@ -1,8 +1,8 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import t from "clsx";
3
- import { Content as a } from "../../utils/content/content.component.js";
4
- import { baseProps as s } from "../../utils/functions/functions.util.js";
5
- import '../../assets/error-message-CQHYhXbt.css';const m = "_ErrorMessage_dqn66_1", c = {
3
+ import { Content as a } from "../../../utils/content/content.component.js";
4
+ import { baseProps as s } from "../../../utils/functions/functions.util.js";
5
+ import '../../../assets/error-message-CQHYhXbt.css';const m = "_ErrorMessage_dqn66_1", c = {
6
6
  ErrorMessage: m
7
7
  }, p = ({
8
8
  // ErrorMessage props
@@ -1,6 +1,6 @@
1
1
  import { ChangeEvent, FocusEvent } from 'react';
2
- import { ControlChoiceType, InputChangeSource } from '../utils';
3
- import { Base } from '../../utils/types';
2
+ import { ControlChoiceType, InputChangeSource } from '../../utils';
3
+ import { Base } from '../../../utils/types';
4
4
  export interface HiddenInputProps extends Base {
5
5
  id: string;
6
6
  value: string;
@@ -1,7 +1,7 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
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 = {
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
5
  HiddenInput: f
6
6
  }, g = ({
7
7
  type: i,
@@ -0,0 +1,8 @@
1
+ export * from './box';
2
+ export * from './caption';
3
+ export * from './choice';
4
+ export * from './error-message';
5
+ export * from './hidden-input';
6
+ export * from './label';
7
+ export * from './radio-label';
8
+ export * from './status';
@@ -0,0 +1,18 @@
1
+ import { Box as e } from "./box/box.component.js";
2
+ import { Caption as p } from "./caption/caption.component.js";
3
+ import { Choice as f } from "./choice/choice.component.js";
4
+ import { ErrorMessage as a } from "./error-message/error-message.component.js";
5
+ import { HiddenInput as d } from "./hidden-input/hidden-input.component.js";
6
+ import { Label as s } from "./label/label.component.js";
7
+ import { RadioLabel as l } from "./radio-label/radio-label.component.js";
8
+ import { Status as C } from "./status/status.component.js";
9
+ export {
10
+ e as Box,
11
+ p as Caption,
12
+ f as Choice,
13
+ a as ErrorMessage,
14
+ d as HiddenInput,
15
+ s as Label,
16
+ l as RadioLabel,
17
+ C as Status
18
+ };
@@ -1,5 +1,5 @@
1
- import { ControlLabelPosition, State } from '../utils';
2
- import { Base } from '../../utils/types';
1
+ import { ControlLabelPosition, State } from '../../utils';
2
+ import { Base } from '../../../utils/types';
3
3
  export interface LabelProps extends Base {
4
4
  text: string;
5
5
  state?: State;
@@ -1,8 +1,8 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import _ from "clsx";
3
- import { Content as a } from "../../utils/content/content.component.js";
4
- import { baseProps as t } from "../../utils/functions/functions.util.js";
5
- import '../../assets/label-BKXQlPJi.css';const i = "_Label_85kr5_1", d = "_Idle_85kr5_7", m = "_Active_85kr5_12", n = "_Success_85kr5_21", e = {
3
+ import { Content as a } from "../../../utils/content/content.component.js";
4
+ import { baseProps as t } from "../../../utils/functions/functions.util.js";
5
+ import '../../../assets/label-BKXQlPJi.css';const i = "_Label_85kr5_1", d = "_Idle_85kr5_7", m = "_Active_85kr5_12", n = "_Success_85kr5_21", e = {
6
6
  Label: i,
7
7
  Idle: d,
8
8
  Active: m,
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { ChoiceValue, RadioChoice, State } from '../utils';
3
- import { Base } from '../../utils/types';
2
+ import { ChoiceValue, RadioChoice, State } from '../../utils';
3
+ import { Base } from '../../../utils/types';
4
4
  type RadioLabelChildProps = {
5
5
  focused: boolean;
6
6
  hovered: boolean;
@@ -1,8 +1,8 @@
1
1
  import { jsx as b } from "react/jsx-runtime";
2
2
  import { useToggle as a } from "usehooks-ts";
3
3
  import g from "clsx";
4
- import { baseProps as l } from "../../utils/functions/functions.util.js";
5
- import '../../assets/radio-label-CZHWBUUt.css';const p = "_RadioLabel_1q9rv_1", L = {
4
+ import { baseProps as l } from "../../../utils/functions/functions.util.js";
5
+ import '../../../assets/radio-label-CZHWBUUt.css';const p = "_RadioLabel_1q9rv_1", L = {
6
6
  RadioLabel: p
7
7
  }, F = ({
8
8
  // RadioLabel props
@@ -1,5 +1,5 @@
1
- import { State } from '../utils';
2
- import { Base } from '../../utils/types';
1
+ import { State } from '../../utils';
2
+ import { Base } from '../../../utils/types';
3
3
  export interface StatusProps extends Base {
4
4
  state: State;
5
5
  }
@@ -1,8 +1,8 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import { Circle as o, X as a, Check as _ } from "lucide-react";
3
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 = {
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
6
  Status: m,
7
7
  Idle: C,
8
8
  Circle: d,
@@ -1,4 +1,4 @@
1
- import { ControlChoiceType, ChoiceValue, InputChangeSource, Interactive } from '../../utils';
1
+ import { ControlChoiceType, ChoiceValue, InputChangeSource, Interactive } from '../..';
2
2
  export declare const useChoice: (value: ChoiceValue, id: string, cb: Interactive<ChoiceValue>["onChange"]) => {
3
3
  type: ControlChoiceType;
4
4
  onChoiceChange: (newValue: string, source: InputChangeSource) => void;
@@ -1,4 +1,4 @@
1
- import { InputChangeSource, Interactive } from '../../utils';
1
+ import { InputChangeSource, Interactive } from '../..';
2
2
  export declare const useControlInteraction: <V>({ id, disabled, onChange, onFocus, onBlur, }: Pick<Interactive<V>, "id" | "disabled" | "onChange" | "onFocus" | "onBlur">) => {
3
3
  focused: boolean;
4
4
  emitChange: (value: V, source: InputChangeSource) => void;
@@ -1,2 +1,3 @@
1
1
  export * from './functions';
2
+ export * from './hooks';
2
3
  export * from './types';
@@ -1,6 +1,10 @@
1
- import { clickHasNode as e, containsHtml as t, getChoiceId as i } from "./functions/functions.util.js";
1
+ import { clickHasNode as t, containsHtml as r, getChoiceId as c } from "./functions/functions.util.js";
2
+ import { useChoice as n } from "./hooks/use-choice/use-choice.hook.js";
3
+ import { useControlInteraction as s } from "./hooks/use-control-interaction/use-control-interaction.hook.js";
2
4
  export {
3
- e as clickHasNode,
4
- t as containsHtml,
5
- i as getChoiceId
5
+ t as clickHasNode,
6
+ r as containsHtml,
7
+ c as getChoiceId,
8
+ n as useChoice,
9
+ s as useControlInteraction
6
10
  };
package/dist/main.d.ts CHANGED
@@ -3,26 +3,26 @@ export { FadeScale } from './animations/fade-scale';
3
3
  export { FadeSlide } from './animations/fade-slide';
4
4
  export { Rotate } from './animations/rotate';
5
5
  export { type InputChangeSource, type Interactive, type RadioChoice, type ControlChoiceType, type ChoiceValue, type State, type QuestionPath, type QuestionChoice, type Size, } from './controls/utils';
6
- export { Box, type BoxProps } from './controls/box';
7
- export { Button, type ButtonProps } from './controls/button';
8
- export { ButtonCard, type ButtonCardProps } from './controls/button-card';
9
- export { ButtonRadio, type ButtonRadioProps } from './controls/button-radio';
10
- export { ButtonText, type ButtonTextProps } from './controls/button-text';
11
- export { Caption, type CaptionProps } from './controls/caption';
12
- export { CardImage, type CardImageProps } from './controls/card-image';
13
- export { CardText, type CardTextProps } from './controls/card-text';
14
- export { Checkbox, type CheckboxProps } from './controls/checkbox';
15
- export { Choice, type ChoiceProps } from './controls/choice';
16
- export { Dropdown, type DropdownProps } from './controls/dropdown';
17
- export { ErrorMessage, type ErrorMessageProps } from './controls/error-message';
18
- export { HiddenInput, type HiddenInputProps } from './controls/hidden-input';
19
- export { Input, type InputProps } from './controls/input';
20
- export { Label, type LabelProps } from './controls/label';
21
- export { Radio, type RadioProps } from './controls/radio';
22
- export { RadioLabel, type RadioLabelProps } from './controls/radio-label';
23
- export { Status, type StatusProps } from './controls/status';
24
- export { TextArea, type TextAreaProps } from './controls/text-area';
25
- export { TextField, type TextFieldProps } from './controls/text-field';
6
+ export { Button, type ButtonProps } from './controls/buttons/button';
7
+ export { ButtonCard, type ButtonCardProps } from './controls/buttons/button-card';
8
+ export { ButtonRadio, type ButtonRadioProps } from './controls/buttons/button-radio';
9
+ export { ButtonText, type ButtonTextProps } from './controls/buttons/button-text';
10
+ export { CardImage, type CardImageProps } from './controls/interactives/card-image';
11
+ export { CardText, type CardTextProps } from './controls/interactives/card-text';
12
+ export { Checkbox, type CheckboxProps } from './controls/interactives/checkbox';
13
+ export { Dropdown, type DropdownProps } from './controls/interactives/dropdown';
14
+ export { Input, type InputProps } from './controls/interactives/input';
15
+ export { Radio, type RadioProps } from './controls/interactives/radio';
16
+ export { TextArea, type TextAreaProps } from './controls/interactives/text-area';
17
+ export { TextField, type TextFieldProps } from './controls/interactives/text-field';
18
+ export { Box, type BoxProps } from './controls/primitives/box';
19
+ export { Caption, type CaptionProps } from './controls/primitives/caption';
20
+ export { Choice, type ChoiceProps } from './controls/primitives/choice';
21
+ export { ErrorMessage, type ErrorMessageProps } from './controls/primitives/error-message';
22
+ export { HiddenInput, type HiddenInputProps } from './controls/primitives/hidden-input';
23
+ export { Label, type LabelProps } from './controls/primitives/label';
24
+ export { RadioLabel, type RadioLabelProps } from './controls/primitives/radio-label';
25
+ export { Status, type StatusProps } from './controls/primitives/status';
26
26
  export { AccordionTable, type AccordionTableProps } from './components/accordion-table/accordion-table.component';
27
27
  export { BottomBar } from './components/bottom-bar';
28
28
  export { Certifications, type CertificationsProps } from './components/certifications';