@arthurzakharov/ui-kit 1.5.2 → 1.5.4

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 (281) hide show
  1. package/dist/animations/fade-grow/fade-grow.component.d.ts +2 -0
  2. package/dist/animations/{animation-fade-grow/animation-fade-grow.component.js → fade-grow/fade-grow.component.js} +9 -9
  3. package/dist/animations/fade-grow/index.d.ts +1 -0
  4. package/dist/animations/fade-grow/index.js +4 -0
  5. package/dist/animations/fade-scale/fade-scale.component.d.ts +2 -0
  6. package/dist/animations/{animation-fade-scale/animation-fade-scale.component.js → fade-scale/fade-scale.component.js} +10 -10
  7. package/dist/animations/fade-scale/index.d.ts +1 -0
  8. package/dist/animations/fade-scale/index.js +4 -0
  9. package/dist/animations/fade-slide/fade-slide.component.d.ts +6 -0
  10. package/dist/animations/{animation-fade-slide/animation-fade-slide.component.js → fade-slide/fade-slide.component.js} +8 -8
  11. package/dist/animations/fade-slide/index.d.ts +1 -0
  12. package/dist/animations/fade-slide/index.js +4 -0
  13. package/dist/animations/rotate/index.d.ts +1 -0
  14. package/dist/animations/rotate/index.js +4 -0
  15. package/dist/animations/{animation-rotate/animation-rotate.component.d.ts → rotate/rotate.component.d.ts} +2 -2
  16. package/dist/animations/{animation-rotate/animation-rotate.component.js → rotate/rotate.component.js} +6 -6
  17. package/dist/animations/utils/default-props.d.ts +1 -1
  18. package/dist/assets/box-5bAcfszB.css +1 -0
  19. package/dist/assets/button-card-B-nlEbJU.css +1 -0
  20. package/dist/assets/button-radio-CPeNePW2.css +1 -0
  21. package/dist/assets/button-text-BKSERdhL.css +1 -0
  22. package/dist/assets/caption-B28SGRY1.css +1 -0
  23. package/dist/assets/card-image-LY9zvE8g.css +1 -0
  24. package/dist/assets/card-text-sR2uSJyo.css +1 -0
  25. package/dist/assets/checkbox-BzL5bg8o.css +1 -0
  26. package/dist/assets/choice-CcUo4Zvq.css +1 -0
  27. package/dist/assets/dropdown-DLhCAHEx.css +1 -0
  28. package/dist/assets/error-message-CQHYhXbt.css +1 -0
  29. package/dist/assets/hidden-input-DHJQHUKd.css +1 -0
  30. package/dist/assets/input-D66hMzHc.css +1 -0
  31. package/dist/assets/label-BKXQlPJi.css +1 -0
  32. package/dist/assets/radio-VoXwCoAp.css +1 -0
  33. package/dist/assets/radio-label-CZHWBUUt.css +1 -0
  34. package/dist/assets/signature-D9gYlpze.css +1 -0
  35. package/dist/assets/status-Cx_6Ibai.css +1 -0
  36. package/dist/assets/text-area-Dgc2jHSx.css +1 -0
  37. package/dist/assets/text-field-Bp4Ra0yN.css +1 -0
  38. package/dist/components/accordion-table/accordion-table.component.js +18 -18
  39. package/dist/components/bottom-bar/bottom-bar.component.d.ts +1 -1
  40. package/dist/components/bottom-bar/bottom-bar.component.js +25 -27
  41. package/dist/components/dialog/dialog.component.js +19108 -60
  42. package/dist/components/dialog-article/dialog-article.component.d.ts +0 -4
  43. package/dist/components/dialog-article/dialog-article.component.js +20 -20
  44. package/dist/components/footer/footer.component.d.ts +1 -1
  45. package/dist/components/footer/index.d.ts +1 -1
  46. package/dist/components/main-attachment/main-attachment.component.js +7 -7
  47. package/dist/components/payment/components/glass/glass.component.js +2 -2
  48. package/dist/components/sidebar/sidebar.component.d.ts +1 -1
  49. package/dist/components/sidebar/sidebar.component.js +14 -14
  50. package/dist/components/signature/signature.component.d.ts +1 -1
  51. package/dist/components/signature/signature.component.js +848 -783
  52. package/dist/components/text/text.component.d.ts +2 -2
  53. package/dist/components/user-panel/user-panel.component.js +13 -13
  54. package/dist/controls/box/box.component.d.ts +10 -0
  55. package/dist/controls/box/box.component.js +40 -0
  56. package/dist/controls/box/index.d.ts +1 -0
  57. package/dist/controls/box/index.js +4 -0
  58. package/dist/controls/{control-button/control-button.component.d.ts → button/button.component.d.ts} +5 -4
  59. package/dist/controls/button/button.component.js +82 -0
  60. package/dist/controls/button/index.d.ts +1 -0
  61. package/dist/controls/button/index.js +4 -0
  62. package/dist/controls/{control-button-card/control-button-card.component.d.ts → button-card/button-card.component.d.ts} +5 -4
  63. package/dist/controls/button-card/button-card.component.js +79 -0
  64. package/dist/controls/button-card/index.d.ts +1 -0
  65. package/dist/controls/button-card/index.js +4 -0
  66. package/dist/controls/button-radio/button-radio.component.d.ts +20 -0
  67. package/dist/controls/button-radio/button-radio.component.js +83 -0
  68. package/dist/controls/button-radio/index.d.ts +1 -0
  69. package/dist/controls/button-radio/index.js +4 -0
  70. package/dist/controls/{control-button-text/control-button-text.component.d.ts → button-text/button-text.component.d.ts} +4 -4
  71. package/dist/controls/button-text/button-text.component.js +87 -0
  72. package/dist/controls/button-text/index.d.ts +1 -0
  73. package/dist/controls/button-text/index.js +4 -0
  74. package/dist/controls/caption/caption.component.d.ts +10 -0
  75. package/dist/controls/caption/caption.component.js +48 -0
  76. package/dist/controls/caption/index.d.ts +1 -0
  77. package/dist/controls/caption/index.js +4 -0
  78. package/dist/controls/card-image/card-image.component.d.ts +10 -0
  79. package/dist/controls/card-image/card-image.component.js +81 -0
  80. package/dist/controls/card-image/index.d.ts +1 -0
  81. package/dist/controls/card-image/index.js +4 -0
  82. package/dist/controls/card-text/card-text.component.d.ts +9 -0
  83. package/dist/controls/card-text/card-text.component.js +75 -0
  84. package/dist/controls/card-text/index.d.ts +1 -0
  85. package/dist/controls/card-text/index.js +4 -0
  86. package/dist/controls/checkbox/checkbox.component.d.ts +10 -0
  87. package/dist/controls/checkbox/checkbox.component.js +103 -0
  88. package/dist/controls/checkbox/index.d.ts +1 -0
  89. package/dist/controls/checkbox/index.js +4 -0
  90. package/dist/controls/choice/choice.component.d.ts +12 -0
  91. package/dist/controls/choice/choice.component.js +65 -0
  92. package/dist/controls/choice/index.d.ts +1 -0
  93. package/dist/controls/choice/index.js +4 -0
  94. package/dist/controls/{control-dropdown/control-dropdown.component.d.ts → dropdown/dropdown.component.d.ts} +3 -3
  95. package/dist/controls/dropdown/dropdown.component.js +127 -0
  96. package/dist/controls/dropdown/index.d.ts +1 -0
  97. package/dist/controls/dropdown/index.js +4 -0
  98. package/dist/controls/error-message/error-message.component.d.ts +5 -0
  99. package/dist/controls/error-message/error-message.component.js +22 -0
  100. package/dist/controls/error-message/index.d.ts +1 -0
  101. package/dist/controls/error-message/index.js +4 -0
  102. package/dist/controls/hidden-input/hidden-input.component.d.ts +15 -0
  103. package/dist/controls/hidden-input/hidden-input.component.js +38 -0
  104. package/dist/controls/hidden-input/index.d.ts +1 -0
  105. package/dist/controls/hidden-input/index.js +4 -0
  106. package/dist/controls/hooks/index.d.ts +1 -0
  107. package/dist/controls/hooks/index.js +3 -1
  108. package/dist/controls/hooks/use-choice/use-choice.hook.d.ts +2 -2
  109. package/dist/controls/hooks/use-control-interaction/index.d.ts +1 -0
  110. package/dist/controls/hooks/use-control-interaction/index.js +4 -0
  111. package/dist/controls/hooks/use-control-interaction/use-control-interaction.hook.d.ts +7 -0
  112. package/dist/controls/hooks/use-control-interaction/use-control-interaction.hook.js +25 -0
  113. package/dist/controls/index.d.ts +22 -0
  114. package/dist/controls/index.js +50 -0
  115. package/dist/controls/input/index.d.ts +1 -0
  116. package/dist/controls/input/index.js +4 -0
  117. package/dist/controls/input/input.component.d.ts +9 -0
  118. package/dist/controls/input/input.component.js +143 -0
  119. package/dist/controls/input/input.utils.d.ts +10 -0
  120. package/dist/controls/input/input.utils.js +24 -0
  121. package/dist/controls/label/index.d.ts +1 -0
  122. package/dist/controls/label/index.js +4 -0
  123. package/dist/controls/label/label.component.d.ts +8 -0
  124. package/dist/controls/label/label.component.js +33 -0
  125. package/dist/controls/radio/index.d.ts +1 -0
  126. package/dist/controls/radio/index.js +4 -0
  127. package/dist/controls/radio/radio.component.d.ts +12 -0
  128. package/dist/controls/radio/radio.component.js +109 -0
  129. package/dist/controls/radio-label/index.d.ts +1 -0
  130. package/dist/controls/radio-label/index.js +4 -0
  131. package/dist/controls/radio-label/radio-label.component.d.ts +19 -0
  132. package/dist/controls/radio-label/radio-label.component.js +49 -0
  133. package/dist/controls/status/index.d.ts +1 -0
  134. package/dist/controls/status/index.js +4 -0
  135. package/dist/controls/status/status.component.d.ts +6 -0
  136. package/dist/controls/status/status.component.js +36 -0
  137. package/dist/controls/text-area/index.d.ts +1 -0
  138. package/dist/controls/text-area/index.js +4 -0
  139. package/dist/controls/text-area/text-area.component.d.ts +8 -0
  140. package/dist/controls/text-area/text-area.component.js +62 -0
  141. package/dist/controls/text-field/index.d.ts +1 -0
  142. package/dist/controls/text-field/index.js +4 -0
  143. package/dist/controls/text-field/text-field.component.d.ts +10 -0
  144. package/dist/controls/text-field/text-field.component.js +100 -0
  145. package/dist/controls/utils/functions/functions.util.d.ts +0 -1
  146. package/dist/controls/utils/functions/functions.util.js +3 -14
  147. package/dist/controls/utils/functions/index.js +3 -4
  148. package/dist/controls/utils/index.js +3 -4
  149. package/dist/controls/utils/types.d.ts +8 -5
  150. package/dist/{index-PfP8s0Qf.js → index-CPvYWadf.js} +1 -1
  151. package/dist/main.d.ts +26 -25
  152. package/dist/main.js +100 -98
  153. package/dist/{proxy-Cx6n7mT2.js → proxy-CmTphuYR.js} +1762 -1717
  154. package/dist/utils/converter/index.d.ts +1 -0
  155. package/dist/utils/converter/index.js +4 -0
  156. package/dist/utils/functions/functions.util.js +10 -10
  157. package/dist/utils/story/grey-box/grey-box.component.d.ts +9 -0
  158. package/dist/utils/story/grey-box/grey-box.component.js +24 -0
  159. package/dist/utils/story/grey-box/index.d.ts +1 -0
  160. package/dist/utils/story/grey-box/index.js +4 -0
  161. package/dist/utils/story/size-box/index.d.ts +1 -0
  162. package/dist/utils/story/size-box/index.js +4 -0
  163. package/dist/utils/story/size-box/size-box.component.d.ts +6 -0
  164. package/dist/utils/story/size-box/size-box.component.js +5 -0
  165. package/package.json +10 -18
  166. package/dist/_commonjsHelpers-CqEciG1_.js +0 -31
  167. package/dist/animations/animation-fade-grow/animation-fade-grow.component.d.ts +0 -2
  168. package/dist/animations/animation-fade-grow/index.d.ts +0 -1
  169. package/dist/animations/animation-fade-grow/index.js +0 -4
  170. package/dist/animations/animation-fade-scale/animation-fade-scale.component.d.ts +0 -2
  171. package/dist/animations/animation-fade-scale/index.d.ts +0 -1
  172. package/dist/animations/animation-fade-scale/index.js +0 -4
  173. package/dist/animations/animation-fade-slide/animation-fade-slide.component.d.ts +0 -6
  174. package/dist/animations/animation-fade-slide/index.d.ts +0 -1
  175. package/dist/animations/animation-fade-slide/index.js +0 -4
  176. package/dist/animations/animation-rotate/index.d.ts +0 -1
  177. package/dist/animations/animation-rotate/index.js +0 -4
  178. package/dist/assets/control-box-Dx-QKPgf.css +0 -1
  179. package/dist/assets/control-button-card-Cb8_vJbQ.css +0 -1
  180. package/dist/assets/control-button-radio-BodzD0rU.css +0 -1
  181. package/dist/assets/control-button-text-BbE_5ebO.css +0 -1
  182. package/dist/assets/control-card-image-BYT3bzTE.css +0 -1
  183. package/dist/assets/control-card-text-Cvv3bL2p.css +0 -1
  184. package/dist/assets/control-checkbox-uLtXjmYN.css +0 -1
  185. package/dist/assets/control-choice-BAHN-VTm.css +0 -1
  186. package/dist/assets/control-dropdown-DaS5KsvG.css +0 -1
  187. package/dist/assets/control-error-message-CKgqmo1U.css +0 -1
  188. package/dist/assets/control-hidden-input-BhMdNmnP.css +0 -1
  189. package/dist/assets/control-input-nR0XQHHp.css +0 -1
  190. package/dist/assets/control-label-C8pjaWEU.css +0 -1
  191. package/dist/assets/control-radio-Bo1rvcg2.css +0 -1
  192. package/dist/assets/control-radio-label-CgZ-FNj0.css +0 -1
  193. package/dist/assets/control-radio-text-S7MEO4a2.css +0 -1
  194. package/dist/assets/control-status-DPNvkGlM.css +0 -1
  195. package/dist/assets/control-text-n-qi7e2Y.css +0 -1
  196. package/dist/assets/control-textarea-B6gWlJs3.css +0 -1
  197. package/dist/assets/signature-EuXLu4YT.css +0 -1
  198. package/dist/controls/control-box/control-box.component.d.ts +0 -14
  199. package/dist/controls/control-box/control-box.component.js +0 -33
  200. package/dist/controls/control-box/index.d.ts +0 -2
  201. package/dist/controls/control-box/index.js +0 -4
  202. package/dist/controls/control-button/control-button.component.js +0 -84
  203. package/dist/controls/control-button/index.d.ts +0 -2
  204. package/dist/controls/control-button/index.js +0 -4
  205. package/dist/controls/control-button-card/control-button-card.component.js +0 -65
  206. package/dist/controls/control-button-card/index.d.ts +0 -2
  207. package/dist/controls/control-button-card/index.js +0 -4
  208. package/dist/controls/control-button-radio/control-button-radio.component.d.ts +0 -19
  209. package/dist/controls/control-button-radio/control-button-radio.component.js +0 -69
  210. package/dist/controls/control-button-radio/index.d.ts +0 -2
  211. package/dist/controls/control-button-radio/index.js +0 -4
  212. package/dist/controls/control-button-text/control-button-text.component.js +0 -87
  213. package/dist/controls/control-button-text/index.d.ts +0 -2
  214. package/dist/controls/control-button-text/index.js +0 -4
  215. package/dist/controls/control-card-image/control-card-image.component.d.ts +0 -8
  216. package/dist/controls/control-card-image/control-card-image.component.js +0 -53
  217. package/dist/controls/control-card-image/index.d.ts +0 -2
  218. package/dist/controls/control-card-image/index.js +0 -4
  219. package/dist/controls/control-card-text/control-card-text.component.d.ts +0 -7
  220. package/dist/controls/control-card-text/control-card-text.component.js +0 -48
  221. package/dist/controls/control-card-text/index.d.ts +0 -2
  222. package/dist/controls/control-card-text/index.js +0 -4
  223. package/dist/controls/control-checkbox/control-checkbox.component.d.ts +0 -11
  224. package/dist/controls/control-checkbox/control-checkbox.component.js +0 -97
  225. package/dist/controls/control-checkbox/index.d.ts +0 -2
  226. package/dist/controls/control-checkbox/index.js +0 -4
  227. package/dist/controls/control-choice/control-choice.component.d.ts +0 -12
  228. package/dist/controls/control-choice/control-choice.component.js +0 -64
  229. package/dist/controls/control-choice/index.d.ts +0 -2
  230. package/dist/controls/control-choice/index.js +0 -4
  231. package/dist/controls/control-dropdown/control-dropdown.component.js +0 -106
  232. package/dist/controls/control-dropdown/index.d.ts +0 -2
  233. package/dist/controls/control-dropdown/index.js +0 -4
  234. package/dist/controls/control-error-message/control-error-message.component.d.ts +0 -7
  235. package/dist/controls/control-error-message/control-error-message.component.js +0 -16
  236. package/dist/controls/control-error-message/index.d.ts +0 -1
  237. package/dist/controls/control-error-message/index.js +0 -4
  238. package/dist/controls/control-hidden-input/control-hidden-input.component.d.ts +0 -15
  239. package/dist/controls/control-hidden-input/control-hidden-input.component.js +0 -41
  240. package/dist/controls/control-hidden-input/index.d.ts +0 -2
  241. package/dist/controls/control-hidden-input/index.js +0 -4
  242. package/dist/controls/control-input/control-input.component.d.ts +0 -11
  243. package/dist/controls/control-input/control-input.component.js +0 -973
  244. package/dist/controls/control-input/index.d.ts +0 -2
  245. package/dist/controls/control-input/index.js +0 -4
  246. package/dist/controls/control-label/control-label.component.d.ts +0 -13
  247. package/dist/controls/control-label/control-label.component.js +0 -25
  248. package/dist/controls/control-label/index.d.ts +0 -1
  249. package/dist/controls/control-label/index.js +0 -4
  250. package/dist/controls/control-radio/control-radio.component.d.ts +0 -14
  251. package/dist/controls/control-radio/control-radio.component.js +0 -79
  252. package/dist/controls/control-radio/index.d.ts +0 -2
  253. package/dist/controls/control-radio/index.js +0 -4
  254. package/dist/controls/control-radio-label/control-radio-label.component.d.ts +0 -22
  255. package/dist/controls/control-radio-label/control-radio-label.component.js +0 -39
  256. package/dist/controls/control-radio-label/index.d.ts +0 -1
  257. package/dist/controls/control-radio-label/index.js +0 -4
  258. package/dist/controls/control-radio-text/control-radio-text.component.d.ts +0 -10
  259. package/dist/controls/control-radio-text/control-radio-text.component.js +0 -45
  260. package/dist/controls/control-radio-text/index.d.ts +0 -2
  261. package/dist/controls/control-radio-text/index.js +0 -4
  262. package/dist/controls/control-status/control-status.component.d.ts +0 -11
  263. package/dist/controls/control-status/control-status.component.js +0 -42
  264. package/dist/controls/control-status/index.d.ts +0 -1
  265. package/dist/controls/control-status/index.js +0 -4
  266. package/dist/controls/control-text/control-text.component.d.ts +0 -11
  267. package/dist/controls/control-text/control-text.component.js +0 -70
  268. package/dist/controls/control-text/index.d.ts +0 -2
  269. package/dist/controls/control-text/index.js +0 -4
  270. package/dist/controls/control-textarea/control-textarea.component.d.ts +0 -15
  271. package/dist/controls/control-textarea/control-textarea.component.js +0 -63
  272. package/dist/controls/control-textarea/index.d.ts +0 -1
  273. package/dist/controls/control-textarea/index.js +0 -4
  274. package/dist/index-D3EuHLHH.js +0 -19053
  275. /package/dist/animations/{hook → hooks}/index.d.ts +0 -0
  276. /package/dist/animations/{hook → hooks}/index.js +0 -0
  277. /package/dist/animations/{hook → hooks}/use-animation-lifecycle/index.d.ts +0 -0
  278. /package/dist/animations/{hook → hooks}/use-animation-lifecycle/index.js +0 -0
  279. /package/dist/animations/{hook → hooks}/use-animation-lifecycle/use-animation-lifecycle.hook.d.ts +0 -0
  280. /package/dist/animations/{hook → hooks}/use-animation-lifecycle/use-animation-lifecycle.hook.js +0 -0
  281. /package/dist/assets/{control-button-Tzg6F5Dp.css → button-Tzg6F5Dp.css} +0 -0
@@ -1,2 +0,0 @@
1
- export { ControlInput } from './control-input.component';
2
- export type { ControlInputProps } from './control-input.component';
@@ -1,4 +0,0 @@
1
- import { ControlInput as t } from "./control-input.component.js";
2
- export {
3
- t as ControlInput
4
- };
@@ -1,13 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { State } from '../utils/types';
3
- import { Base } from '../../utils/types';
4
- interface ControlLabelProps extends PropsWithChildren<Base> {
5
- state?: State;
6
- position?: 'idle' | 'active';
7
- }
8
- /**
9
- * `ControlLabel` renders field label text with active/idle positioning and validation color states.
10
- * Use it to keep label behavior and appearance consistent across inputs.
11
- */
12
- export declare const ControlLabel: ({ children, position, state, ...base }: ControlLabelProps) => import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,25 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import a from "clsx";
3
- import { baseProps as r } from "../../utils/functions/functions.util.js";
4
- import '../../assets/control-label-C8pjaWEU.css';const _ = "_ControlLabel_l2cwl_1", n = "_Idle_l2cwl_7", d = "_Active_l2cwl_12", i = "_Success_l2cwl_21", l = {
5
- ControlLabel: _,
6
- Idle: n,
7
- Active: d,
8
- Error: "_Error_l2cwl_17",
9
- Success: i
10
- }, u = ({ children: s, position: c = "idle", state: e = "idle", ...o }) => /* @__PURE__ */ t(
11
- "span",
12
- {
13
- "data-testid": r(o, "data-testid", "control-label"),
14
- className: a(l.ControlLabel, r(o, "className"), {
15
- [l.Idle]: c === "idle",
16
- [l.Active]: c === "active",
17
- [l.Error]: e === "error",
18
- [l.Success]: e === "success"
19
- }),
20
- children: s
21
- }
22
- );
23
- export {
24
- u as ControlLabel
25
- };
@@ -1 +0,0 @@
1
- export { ControlLabel } from './control-label.component';
@@ -1,4 +0,0 @@
1
- import { ControlLabel as e } from "./control-label.component.js";
2
- export {
3
- e as ControlLabel
4
- };
@@ -1,14 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Interactive, RadioChoice, State } from '../utils/types';
3
- import { ControlChoiceProps } from '../control-choice';
4
- import { ControlRadioTextProps } from '../control-radio-text';
5
- import { Base } from '../../utils/types';
6
- export interface ControlRadioProps extends Base, Interactive<string> {
7
- orientation?: 'horizontal' | 'vertical';
8
- choices: RadioChoice[];
9
- state?: State;
10
- iconSize?: ControlChoiceProps['size'];
11
- textSize?: ControlRadioTextProps['size'];
12
- message?: ReactNode;
13
- }
14
- export declare const ControlRadio: ({ id, value, choices, onChange, orientation, state, iconSize, textSize, message, disabled, onBlur, onFocus, className, }: ControlRadioProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,79 +0,0 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import _ from "clsx";
3
- import { ControlChoice as H } from "../control-choice/control-choice.component.js";
4
- import { ControlHiddenInput as L } from "../control-hidden-input/control-hidden-input.component.js";
5
- import { ControlRadioLabel as M } from "../control-radio-label/control-radio-label.component.js";
6
- import { ControlRadioText as V } from "../control-radio-text/control-radio-text.component.js";
7
- import { getChoiceId as y } from "../utils/functions/functions.util.js";
8
- import { AnimationFadeSlide as I } from "../../animations/animation-fade-slide/animation-fade-slide.component.js";
9
- import { ControlErrorMessage as N } from "../control-error-message/control-error-message.component.js";
10
- import '../../assets/control-radio-Bo1rvcg2.css';const j = "_ControlRadio_14a61_1", F = "_Content_14a61_6", A = "_Horizontal_14a61_10", B = "_Vertical_14a61_15", S = "_Label_14a61_20", T = "_ErrorMessage_14a61_33", r = {
11
- ControlRadio: j,
12
- Content: F,
13
- Horizontal: A,
14
- Vertical: B,
15
- Label: S,
16
- ErrorMessage: T
17
- }, Q = ({
18
- id: t,
19
- value: C,
20
- choices: p,
21
- onChange: f,
22
- orientation: l = "horizontal",
23
- state: i = "idle",
24
- iconSize: h = "md",
25
- textSize: u = "body",
26
- message: s = "",
27
- disabled: m = !1,
28
- onBlur: v = () => {
29
- },
30
- onFocus: z = () => {
31
- },
32
- className: d = ""
33
- }) => /* @__PURE__ */ c("div", { className: _(r.ControlRadio, d), children: [
34
- /* @__PURE__ */ o(
35
- "div",
36
- {
37
- className: _(r.Content, d, {
38
- [r.Horizontal]: l === "horizontal",
39
- [r.Vertical]: l === "vertical"
40
- }),
41
- children: p.map((a, g, R) => {
42
- const n = y(t, a.value, g);
43
- return /* @__PURE__ */ o(M, { id: n, value: C, state: i, choice: a, choices: R, children: ({ focused: b, hovered: x, checked: e, state: E }) => /* @__PURE__ */ c("div", { className: r.Label, children: [
44
- /* @__PURE__ */ o(
45
- H,
46
- {
47
- type: "radio",
48
- size: h,
49
- state: E,
50
- checked: e,
51
- focused: b,
52
- hovered: x,
53
- disabled: m
54
- }
55
- ),
56
- /* @__PURE__ */ o(
57
- L,
58
- {
59
- type: "radio",
60
- id: n,
61
- value: a.value,
62
- name: t,
63
- checked: e,
64
- disabled: m,
65
- onChange: () => f(a.value, t),
66
- onFocus: () => z(t),
67
- onBlur: () => v(t)
68
- }
69
- ),
70
- /* @__PURE__ */ o(V, { size: u, checked: e, children: a.label })
71
- ] }) }, n);
72
- })
73
- }
74
- ),
75
- /* @__PURE__ */ o(I, { name: "message", condition: i === "error" && !!s, children: /* @__PURE__ */ o(N, { className: r.ErrorMessage, children: s }) })
76
- ] });
77
- export {
78
- Q as ControlRadio
79
- };
@@ -1,2 +0,0 @@
1
- export { ControlRadio } from './control-radio.component';
2
- export type { ControlRadioProps } from './control-radio.component';
@@ -1,4 +0,0 @@
1
- import { ControlRadio as t } from "./control-radio.component.js";
2
- export {
3
- t as ControlRadio
4
- };
@@ -1,22 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { ChoiceValue, RadioChoice, State } from '../utils/types';
3
- import { Base } from '../../utils/types';
4
- interface ControlRadioLabelProps<T extends ChoiceValue> extends Base {
5
- id: string;
6
- value: T;
7
- choice: RadioChoice;
8
- choices?: RadioChoice[];
9
- state?: State;
10
- children: (props: {
11
- focused: boolean;
12
- hovered: boolean;
13
- checked: boolean;
14
- state?: State;
15
- }) => ReactNode;
16
- }
17
- /**
18
- * `ControlRadioLabel` provides a stateful wrapper for individual radio choices using the render props pattern.
19
- * It manages hover, focus, and checked states, passing them to child components. Use it to build custom radio UI implementations with consistent interaction behavior.
20
- */
21
- export declare const ControlRadioLabel: <T extends ChoiceValue>(props: ControlRadioLabelProps<T>) => import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,39 +0,0 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import { useToggle as s } from "usehooks-ts";
3
- import v from "clsx";
4
- import { baseProps as a } from "../../utils/functions/functions.util.js";
5
- import '../../assets/control-radio-label-CgZ-FNj0.css';const g = "_ControlRadioLabel_14ean_1", p = {
6
- ControlRadioLabel: g
7
- }, F = (c) => {
8
- const { children: n, id: i, value: e, choice: o, choices: d = [], state: u = "idle", ...r } = c, [m, t] = s(!1), [b, l] = s(!1);
9
- return /* @__PURE__ */ h(
10
- "label",
11
- {
12
- "data-testid": a(r, "data-testid", "control-radio-label"),
13
- htmlFor: i,
14
- className: v(p.ControlRadioLabel, a(r, "className")),
15
- onFocus: () => t(),
16
- onBlur: () => t(),
17
- onMouseEnter: () => l(),
18
- onMouseLeave: () => l(),
19
- children: n({
20
- focused: m,
21
- hovered: b,
22
- checked: typeof e == "string" ? e === o.value : e.includes(o.value),
23
- state: (() => {
24
- switch (u) {
25
- case "success":
26
- return "idle";
27
- case "error":
28
- return d.some((f) => f.value === e) ? e === o.value ? "error" : "idle" : "error";
29
- case "idle":
30
- return "idle";
31
- }
32
- })()
33
- })
34
- }
35
- );
36
- };
37
- export {
38
- F as ControlRadioLabel
39
- };
@@ -1 +0,0 @@
1
- export { ControlRadioLabel } from './control-radio-label.component';
@@ -1,4 +0,0 @@
1
- import { ControlRadioLabel as a } from "./control-radio-label.component.js";
2
- export {
3
- a as ControlRadioLabel
4
- };
@@ -1,10 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { Base } from '../../utils/types';
3
- import { ControlRadioTextColor, ControlRadioTextSize } from '../utils';
4
- export interface ControlRadioTextProps extends PropsWithChildren<Base> {
5
- size?: ControlRadioTextSize;
6
- color?: ControlRadioTextColor;
7
- checked?: boolean;
8
- oneLine?: boolean;
9
- }
10
- export declare const ControlRadioText: ({ children, size, color, checked, oneLine, className, }: ControlRadioTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,45 +0,0 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import y from "clsx";
3
- import { Content as _ } from "../../utils/content/content.component.js";
4
- import '../../assets/control-radio-text-S7MEO4a2.css';const l = "_ControlRadioText_wkqvo_1", m = "_TextPrimary_wkqvo_8", s = "_Content_wkqvo_8", x = "_TextSecondary_wkqvo_12", i = "_AccentPrimary_wkqvo_16", k = "_AccentSecondary_wkqvo_20", B = "_BodyExtraSmall_wkqvo_24", S = "_BodySmall_wkqvo_29", C = "_Body_wkqvo_24", v = "_BodyLarge_wkqvo_39", T = "_OneLine_wkqvo_44", q = "_Checked_wkqvo_49", o = {
5
- ControlRadioText: l,
6
- TextPrimary: m,
7
- Content: s,
8
- TextSecondary: x,
9
- AccentPrimary: i,
10
- AccentSecondary: k,
11
- BodyExtraSmall: B,
12
- BodySmall: S,
13
- Body: C,
14
- BodyLarge: v,
15
- OneLine: T,
16
- Checked: q
17
- }, L = ({
18
- children: a,
19
- size: t = "body",
20
- color: e = "text-primary",
21
- checked: r = !1,
22
- oneLine: c = !1,
23
- className: d = ""
24
- }) => /* @__PURE__ */ n(
25
- "div",
26
- {
27
- "data-testid": "control-radio-text",
28
- className: y(o.ControlRadioText, d, {
29
- [o.TextPrimary]: e === "text-primary",
30
- [o.TextSecondary]: e === "text-secondary",
31
- [o.AccentPrimary]: e === "accent-primary",
32
- [o.AccentSecondary]: e === "accent-secondary",
33
- [o.BodyExtraSmall]: t === "body-extra-small",
34
- [o.BodySmall]: t === "body-small",
35
- [o.Body]: t === "body",
36
- [o.BodyLarge]: t === "body-large",
37
- [o.OneLine]: c,
38
- [o.Checked]: r
39
- }),
40
- children: /* @__PURE__ */ n(_, { tag: "span", className: o.Content, children: a })
41
- }
42
- );
43
- export {
44
- L as ControlRadioText
45
- };
@@ -1,2 +0,0 @@
1
- export { ControlRadioText } from './control-radio-text.component';
2
- export type { ControlRadioTextProps } from './control-radio-text.component';
@@ -1,4 +0,0 @@
1
- import { ControlRadioText as t } from "./control-radio-text.component.js";
2
- export {
3
- t as ControlRadioText
4
- };
@@ -1,11 +0,0 @@
1
- import { State } from '../utils/types';
2
- import { Base } from '../../utils/types';
3
- interface ControlStatusProps extends Base {
4
- state: State;
5
- }
6
- /**
7
- * `ControlStatus` renders a compact visual marker that communicates validation result near a field.
8
- * Use it to show neutral (`idle`), success (`success`), or error (`error`) state consistently across form controls.
9
- */
10
- export declare const ControlStatus: ({ state, ...base }: ControlStatusProps) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,42 +0,0 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
- import { Circle as a, X as m, Check as l } from "lucide-react";
3
- import t from "clsx";
4
- import { AnimationFadeScale as r } from "../../animations/animation-fade-scale/animation-fade-scale.component.js";
5
- import { baseProps as i } from "../../utils/functions/functions.util.js";
6
- import '../../assets/control-status-DPNvkGlM.css';const _ = "_ControlStatus_hj1em_1", C = "_Circle_hj1em_6", h = "_Idle_hj1em_14", d = "_Success_hj1em_20", I = "_IconContent_hj1em_32", u = "_IconAnimate_hj1em_40", j = "_Check_hj1em_48", S = "_X_hj1em_49", c = {
7
- ControlStatus: _,
8
- Circle: C,
9
- Idle: h,
10
- Success: d,
11
- Error: "_Error_hj1em_26",
12
- IconContent: I,
13
- IconAnimate: u,
14
- Check: j,
15
- X: S
16
- }, f = ({ state: e = "idle", ...s }) => /* @__PURE__ */ n(
17
- "div",
18
- {
19
- "data-testid": i(s, "data-testid", "control-status"),
20
- className: t(c.ControlStatus, i(s, "className")),
21
- children: [
22
- /* @__PURE__ */ o(
23
- a,
24
- {
25
- size: 24,
26
- className: t(c.Circle, {
27
- [c.Idle]: e === "idle",
28
- [c.Success]: e === "success",
29
- [c.Error]: e === "error"
30
- })
31
- }
32
- ),
33
- /* @__PURE__ */ n("div", { className: c.IconContent, children: [
34
- /* @__PURE__ */ o(r, { name: "icon-x", condition: e === "error", className: c.IconAnimate, children: /* @__PURE__ */ o(m, { size: 14, className: c.X }) }),
35
- /* @__PURE__ */ o(r, { name: "icon-check", condition: e === "success", className: c.IconAnimate, children: /* @__PURE__ */ o(l, { size: 14, className: c.Check }) })
36
- ] })
37
- ]
38
- }
39
- );
40
- export {
41
- f as ControlStatus
42
- };
@@ -1 +0,0 @@
1
- export { ControlStatus } from './control-status.component';
@@ -1,4 +0,0 @@
1
- import { ControlStatus as r } from "./control-status.component.js";
2
- export {
3
- r as ControlStatus
4
- };
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { State } from '../utils/types';
3
- import { ControlInputProps } from '../control-input';
4
- import { Base } from '../../utils/types';
5
- export interface ControlTextProps extends Base, ControlInputProps {
6
- label: string;
7
- message?: ReactNode;
8
- placeholder?: string;
9
- state?: State;
10
- }
11
- export declare const ControlText: (props: ControlTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,70 +0,0 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import x from "clsx";
3
- import { useBoolean as h, useToggle as y } from "usehooks-ts";
4
- import { AnimationFadeScale as $ } from "../../animations/animation-fade-scale/animation-fade-scale.component.js";
5
- import { ControlBox as q } from "../control-box/control-box.component.js";
6
- import { ControlInput as z } from "../control-input/control-input.component.js";
7
- import { ControlLabel as D } from "../control-label/control-label.component.js";
8
- import { ControlErrorMessage as G } from "../control-error-message/control-error-message.component.js";
9
- import { AnimationFadeSlide as H } from "../../animations/animation-fade-slide/animation-fade-slide.component.js";
10
- import '../../assets/control-text-n-qi7e2Y.css';const J = "_ControlText_11mtx_1", K = "_Content_11mtx_14", O = "_Label_11mtx_26", Q = "_LabelIdle_11mtx_32", R = "_LabelActive_11mtx_37", U = "_Placeholder_11mtx_42", V = "_PlaceholderText_11mtx_49", W = "_ErrorMessage_11mtx_57", t = {
11
- ControlText: J,
12
- Content: K,
13
- Label: O,
14
- LabelIdle: Q,
15
- LabelActive: R,
16
- Placeholder: U,
17
- PlaceholderText: V,
18
- ErrorMessage: W
19
- }, ne = (_) => {
20
- const {
21
- label: f,
22
- message: n = "",
23
- placeholder: s = "",
24
- dateMask: p = !1,
25
- maxLength: b,
26
- state: a = "idle",
27
- type: C = "text",
28
- id: c,
29
- value: o,
30
- disabled: L = !1,
31
- onChange: g,
32
- onFocus: A,
33
- onBlur: v,
34
- className: T
35
- } = _, { value: l, setTrue: i, setFalse: m } = h(!0), { value: I, setTrue: F, setFalse: P } = h(!0), [M, d] = y(), N = !l || !!o, E = !!s && !l && !o && !I, k = !!n && a === "error", B = () => {
36
- F(), m();
37
- }, S = () => {
38
- o || (P(), i());
39
- }, j = (r) => {
40
- o || m(), d(), A?.call(null, r);
41
- }, w = (r) => {
42
- o || i(), d(), v?.call(null, r);
43
- };
44
- return /* @__PURE__ */ u("div", { className: x(t.ControlText, T), children: [
45
- /* @__PURE__ */ e(q, { state: a, focused: M, children: /* @__PURE__ */ u("label", { htmlFor: c, className: t.Content, children: [
46
- /* @__PURE__ */ e("div", { className: x(t.Label, N ? t.LabelActive : t.LabelIdle), children: /* @__PURE__ */ e(D, { position: l ? "idle" : "active", state: l ? "idle" : a, children: f }) }),
47
- /* @__PURE__ */ e($, { name: "text-placeholder", condition: E, className: t.Placeholder, children: /* @__PURE__ */ e("span", { className: t.PlaceholderText, children: s }) }),
48
- /* @__PURE__ */ e(
49
- z,
50
- {
51
- dateMask: p,
52
- maxLength: b,
53
- disabled: L,
54
- type: C,
55
- id: c,
56
- value: o,
57
- onChange: g,
58
- onAutofill: B,
59
- onAutofillCancel: S,
60
- onFocus: j,
61
- onBlur: w
62
- }
63
- )
64
- ] }) }),
65
- /* @__PURE__ */ e(H, { name: "text-message", condition: k, children: /* @__PURE__ */ e(G, { className: t.ErrorMessage, children: n }) })
66
- ] });
67
- };
68
- export {
69
- ne as ControlText
70
- };
@@ -1,2 +0,0 @@
1
- export { ControlText } from './control-text.component';
2
- export type { ControlTextProps } from './control-text.component';
@@ -1,4 +0,0 @@
1
- import { ControlText as t } from "./control-text.component.js";
2
- export {
3
- t as ControlText
4
- };
@@ -1,15 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Interactive, State } from '../utils/types';
3
- import { Base } from '../../utils/types';
4
- interface ControlTextareaProps extends Interactive<string>, Base {
5
- state?: State;
6
- placeholder?: string;
7
- rows?: number;
8
- message?: ReactNode;
9
- }
10
- /**
11
- * `ControlTextarea` renders a multi-line text input field with validation visual feedback. It handles focus states,
12
- * value changes, and displays error messages. Use it for longer text inputs like comments or descriptions.
13
- */
14
- export declare const ControlTextarea: ({ id, value, onChange, state, placeholder, rows, message, disabled, onFocus, onBlur, ...base }: ControlTextareaProps) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1,63 +0,0 @@
1
- import { jsxs as F, jsx as r } from "react/jsx-runtime";
2
- import M from "clsx";
3
- import { useBoolean as T, useToggle as B } from "usehooks-ts";
4
- import { AnimationFadeSlide as k } from "../../animations/animation-fade-slide/animation-fade-slide.component.js";
5
- import { ControlBox as A } from "../control-box/control-box.component.js";
6
- import { ControlErrorMessage as j } from "../control-error-message/control-error-message.component.js";
7
- import { baseProps as n } from "../../utils/functions/functions.util.js";
8
- import '../../assets/control-textarea-B6gWlJs3.css';const S = "_Input_rcp54_6", v = "_ErrorMessage_rcp54_52", o = {
9
- Input: S,
10
- "autofill-start": "_autofill-start_rcp54_1",
11
- "autofill-cancel": "_autofill-cancel_rcp54_1",
12
- ErrorMessage: v
13
- }, G = ({
14
- id: e,
15
- value: a,
16
- onChange: u,
17
- state: l = "idle",
18
- placeholder: f = "",
19
- rows: p = 5,
20
- message: i = "",
21
- disabled: x = !1,
22
- onFocus: _,
23
- onBlur: g,
24
- ...s
25
- }) => {
26
- const { value: N, setTrue: c, setFalse: m } = T(!0), [I, d] = B(!1), h = (t) => {
27
- t.animationName === o["autofill-start"] && m(), t.animationName === o["autofill-cancel"] && !a && c();
28
- }, C = (t) => {
29
- a || m(), d(), _?.(t);
30
- }, E = (t) => {
31
- a || c(), d(), g?.(t);
32
- };
33
- return /* @__PURE__ */ F(
34
- "div",
35
- {
36
- "data-testid": n(s, "data-testid", "control-textarea"),
37
- className: M(o.Container, n(s, "className")),
38
- children: [
39
- /* @__PURE__ */ r(A, { state: l, focused: I, className: n(s, "className"), children: /* @__PURE__ */ r(
40
- "textarea",
41
- {
42
- "data-testid": "control-textarea-input",
43
- "data-is-idle": N,
44
- disabled: x,
45
- id: e,
46
- rows: p,
47
- placeholder: f,
48
- value: a,
49
- className: o.Input,
50
- onChange: (t) => u(t.target.value, e, "keyboard"),
51
- onAnimationStart: h,
52
- onFocus: () => C(e),
53
- onBlur: () => E(e)
54
- }
55
- ) }),
56
- /* @__PURE__ */ r(k, { name: "text-message", condition: l === "error" && !!i, children: /* @__PURE__ */ r(j, { "data-testid": "control-textarea-error", className: o.ErrorMessage, children: i }) })
57
- ]
58
- }
59
- );
60
- };
61
- export {
62
- G as ControlTextarea
63
- };
@@ -1 +0,0 @@
1
- export { ControlTextarea } from './control-textarea.component';
@@ -1,4 +0,0 @@
1
- import { ControlTextarea as e } from "./control-textarea.component.js";
2
- export {
3
- e as ControlTextarea
4
- };