@velumweb/ui-kit 1.0.0

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 (267) hide show
  1. package/.storybook/main.ts +14 -0
  2. package/.storybook/manager.ts +32 -0
  3. package/.storybook/preview.ts +14 -0
  4. package/dist/Button/Button.d.ts +32 -0
  5. package/dist/Button/Button.stories.d.ts +15 -0
  6. package/dist/Button/index.d.ts +1 -0
  7. package/dist/Container/Box.d.ts +33 -0
  8. package/dist/Container/index.d.ts +1 -0
  9. package/dist/Input/Input.d.ts +38 -0
  10. package/dist/Input/Input.stories.d.ts +14 -0
  11. package/dist/Input/index.d.ts +1 -0
  12. package/dist/Modal/Modal.d.ts +29 -0
  13. package/dist/Modal/Modal.stories.d.ts +13 -0
  14. package/dist/Modal/index.d.ts +1 -0
  15. package/dist/Toggle/Toggle.d.ts +18 -0
  16. package/dist/Toggle/Toggle.stories.d.ts +13 -0
  17. package/dist/Toggle/index.d.ts +1 -0
  18. package/dist/assets/svg-lib/3-dots-horizontal-svgrepo-com.svg +5 -0
  19. package/dist/assets/svg-lib/about-empty-page-svgrepo-com.svg +5 -0
  20. package/dist/assets/svg-lib/alert-square.svg +26 -0
  21. package/dist/assets/svg-lib/arrow-bottom-svgrepo-com.svg +9 -0
  22. package/dist/assets/svg-lib/arrow-left-svgrepo-com.svg +5 -0
  23. package/dist/assets/svg-lib/arrow-right-svgrepo-com.svg +5 -0
  24. package/dist/assets/svg-lib/arrow-top-svgrepo-com.svg +9 -0
  25. package/dist/assets/svg-lib/checkmark-svgrepo-com.svg +5 -0
  26. package/dist/assets/svg-lib/clock-svgrepo-com.svg +5 -0
  27. package/dist/assets/svg-lib/cross-svgrepo-com.svg +12 -0
  28. package/dist/assets/svg-lib/download-svgrepo-com.svg +5 -0
  29. package/dist/assets/svg-lib/edit-pen-svgrepo-com.svg +5 -0
  30. package/dist/assets/svg-lib/favorite-svgrepo-com.svg +5 -0
  31. package/dist/assets/svg-lib/forbiden-svgrepo-com.svg +9 -0
  32. package/dist/assets/svg-lib/input-svgrepo-com.svg +5 -0
  33. package/dist/assets/svg-lib/link-svgrepo-com.svg +5 -0
  34. package/dist/assets/svg-lib/messages-alert-svgrepo-com.svg +6 -0
  35. package/dist/assets/svg-lib/messages-svgrepo-com.svg +5 -0
  36. package/dist/assets/svg-lib/mic-off-svgrepo-com.svg +6 -0
  37. package/dist/assets/svg-lib/mic-svgrepo-com.svg +5 -0
  38. package/dist/assets/svg-lib/music-svgrepo-com.svg +6 -0
  39. package/dist/assets/svg-lib/next-long-arrow-right-svgrepo-com.svg +5 -0
  40. package/dist/assets/svg-lib/notification-alert-svgrepo-com.svg +6 -0
  41. package/dist/assets/svg-lib/notification-svgrepo-com.svg +5 -0
  42. package/dist/assets/svg-lib/notifications-off-svgrepo-com.svg +6 -0
  43. package/dist/assets/svg-lib/party-simple-colored-svgrepo-com.svg +11 -0
  44. package/dist/assets/svg-lib/pattern-circles-svgrepo-com.svg +5 -0
  45. package/dist/assets/svg-lib/play-button-simple-svgrepo-com.svg +5 -0
  46. package/dist/assets/svg-lib/plus-outlined-svgrepo-com.svg +5 -0
  47. package/dist/assets/svg-lib/previous-long-arrow-left-svgrepo-com.svg +5 -0
  48. package/dist/assets/svg-lib/queue-listing-cards-svgrepo-com.svg +6 -0
  49. package/dist/assets/svg-lib/queue-remove-svgrepo-com.svg +5 -0
  50. package/dist/assets/svg-lib/recent-svgrepo-com.svg +5 -0
  51. package/dist/assets/svg-lib/remove-svgrepo-com.svg +5 -0
  52. package/dist/assets/svg-lib/repeat-svgrepo-com.svg +5 -0
  53. package/dist/assets/svg-lib/schedule-add-svgrepo-com.svg +5 -0
  54. package/dist/assets/svg-lib/schedule-alert-svgrepo-com.svg +6 -0
  55. package/dist/assets/svg-lib/schedule-remove-svgrepo-com.svg +6 -0
  56. package/dist/assets/svg-lib/schedule-svgrepo-com.svg +5 -0
  57. package/dist/assets/svg-lib/search-svgrepo-com.svg +5 -0
  58. package/dist/assets/svg-lib/session-abandon-svgrepo-com.svg +5 -0
  59. package/dist/assets/svg-lib/session-join-svgrepo-com.svg +5 -0
  60. package/dist/assets/svg-lib/session-leave-svgrepo-com.svg +5 -0
  61. package/dist/assets/svg-lib/settings-svgrepo-com.svg +5 -0
  62. package/dist/assets/svg-lib/share-svgrepo-com.svg +5 -0
  63. package/dist/assets/svg-lib/sound-off-svgrepo-com.svg +6 -0
  64. package/dist/assets/svg-lib/sound-svgrepo-com.svg +5 -0
  65. package/dist/assets/svg-lib/spectacles-svgrepo-com.svg +5 -0
  66. package/dist/assets/svg-lib/star-svgrepo-com.svg +5 -0
  67. package/dist/assets/svg-lib/user-avatar-with-alert-svgrepo-com.svg +6 -0
  68. package/dist/assets/svg-lib/user-banned-svgrepo-com.svg +6 -0
  69. package/dist/assets/svg-lib/user-svgrepo-com.svg +5 -0
  70. package/dist/assets/svglist.png +0 -0
  71. package/dist/index.d.ts +5 -0
  72. package/dist/index.es.d.ts +2 -0
  73. package/dist/index.es.js +569 -0
  74. package/dist/index.umd.js +6 -0
  75. package/dist/ui-kit.css +1 -0
  76. package/docs/Button/Button.d.ts +32 -0
  77. package/docs/Button/Button.stories.d.ts +15 -0
  78. package/docs/Button/index.d.ts +1 -0
  79. package/docs/CNAME +1 -0
  80. package/docs/Container/Box.d.ts +33 -0
  81. package/docs/Container/index.d.ts +1 -0
  82. package/docs/Input/Input.d.ts +38 -0
  83. package/docs/Input/Input.stories.d.ts +14 -0
  84. package/docs/Input/index.d.ts +1 -0
  85. package/docs/Modal/Modal.d.ts +29 -0
  86. package/docs/Modal/Modal.stories.d.ts +13 -0
  87. package/docs/Modal/index.d.ts +1 -0
  88. package/docs/Toggle/Toggle.d.ts +18 -0
  89. package/docs/Toggle/Toggle.stories.d.ts +13 -0
  90. package/docs/Toggle/index.d.ts +1 -0
  91. package/docs/assets/Button-CfaZpHIg.css +1 -0
  92. package/docs/assets/Button-DBH2W8EG.js +1 -0
  93. package/docs/assets/Button.stories-uPwy2cWr.js +34 -0
  94. package/docs/assets/Input-D117xj27.js +1 -0
  95. package/docs/assets/Input-RjFZkyU_.css +1 -0
  96. package/docs/assets/Input.stories-Ck4AyV-4.js +21 -0
  97. package/docs/assets/Modal-CWKTs3Ep.css +1 -0
  98. package/docs/assets/Modal.stories-3HMpRqSx.js +7 -0
  99. package/docs/assets/Toggle-BmcBtVup.css +1 -0
  100. package/docs/assets/Toggle-DiHagfS3.js +1 -0
  101. package/docs/assets/Toggle.stories-d01loxLD.js +9 -0
  102. package/docs/assets/iframe-D7bwIom8.js +1062 -0
  103. package/docs/assets/jsx-runtime-u17CrQMm.js +1 -0
  104. package/docs/assets/preload-helper-PPVm8Dsz.js +1 -0
  105. package/docs/assets/react-18-CW3OMC0n.js +9 -0
  106. package/docs/assets/svg-lib/3-dots-horizontal-svgrepo-com.svg +5 -0
  107. package/docs/assets/svg-lib/about-empty-page-svgrepo-com.svg +5 -0
  108. package/docs/assets/svg-lib/alert-square.svg +26 -0
  109. package/docs/assets/svg-lib/arrow-bottom-svgrepo-com.svg +9 -0
  110. package/docs/assets/svg-lib/arrow-left-svgrepo-com.svg +5 -0
  111. package/docs/assets/svg-lib/arrow-right-svgrepo-com.svg +5 -0
  112. package/docs/assets/svg-lib/arrow-top-svgrepo-com.svg +9 -0
  113. package/docs/assets/svg-lib/checkmark-svgrepo-com.svg +5 -0
  114. package/docs/assets/svg-lib/clock-svgrepo-com.svg +5 -0
  115. package/docs/assets/svg-lib/cross-svgrepo-com.svg +12 -0
  116. package/docs/assets/svg-lib/download-svgrepo-com.svg +5 -0
  117. package/docs/assets/svg-lib/edit-pen-svgrepo-com.svg +5 -0
  118. package/docs/assets/svg-lib/favorite-svgrepo-com.svg +5 -0
  119. package/docs/assets/svg-lib/forbiden-svgrepo-com.svg +9 -0
  120. package/docs/assets/svg-lib/input-svgrepo-com.svg +5 -0
  121. package/docs/assets/svg-lib/link-svgrepo-com.svg +5 -0
  122. package/docs/assets/svg-lib/messages-alert-svgrepo-com.svg +6 -0
  123. package/docs/assets/svg-lib/messages-svgrepo-com.svg +5 -0
  124. package/docs/assets/svg-lib/mic-off-svgrepo-com.svg +6 -0
  125. package/docs/assets/svg-lib/mic-svgrepo-com.svg +5 -0
  126. package/docs/assets/svg-lib/music-svgrepo-com.svg +6 -0
  127. package/docs/assets/svg-lib/next-long-arrow-right-svgrepo-com.svg +5 -0
  128. package/docs/assets/svg-lib/notification-alert-svgrepo-com.svg +6 -0
  129. package/docs/assets/svg-lib/notification-svgrepo-com.svg +5 -0
  130. package/docs/assets/svg-lib/notifications-off-svgrepo-com.svg +6 -0
  131. package/docs/assets/svg-lib/party-simple-colored-svgrepo-com.svg +11 -0
  132. package/docs/assets/svg-lib/pattern-circles-svgrepo-com.svg +5 -0
  133. package/docs/assets/svg-lib/play-button-simple-svgrepo-com.svg +5 -0
  134. package/docs/assets/svg-lib/plus-outlined-svgrepo-com.svg +5 -0
  135. package/docs/assets/svg-lib/previous-long-arrow-left-svgrepo-com.svg +5 -0
  136. package/docs/assets/svg-lib/queue-listing-cards-svgrepo-com.svg +6 -0
  137. package/docs/assets/svg-lib/queue-remove-svgrepo-com.svg +5 -0
  138. package/docs/assets/svg-lib/recent-svgrepo-com.svg +5 -0
  139. package/docs/assets/svg-lib/remove-svgrepo-com.svg +5 -0
  140. package/docs/assets/svg-lib/repeat-svgrepo-com.svg +5 -0
  141. package/docs/assets/svg-lib/schedule-add-svgrepo-com.svg +5 -0
  142. package/docs/assets/svg-lib/schedule-alert-svgrepo-com.svg +6 -0
  143. package/docs/assets/svg-lib/schedule-remove-svgrepo-com.svg +6 -0
  144. package/docs/assets/svg-lib/schedule-svgrepo-com.svg +5 -0
  145. package/docs/assets/svg-lib/search-svgrepo-com.svg +5 -0
  146. package/docs/assets/svg-lib/session-abandon-svgrepo-com.svg +5 -0
  147. package/docs/assets/svg-lib/session-join-svgrepo-com.svg +5 -0
  148. package/docs/assets/svg-lib/session-leave-svgrepo-com.svg +5 -0
  149. package/docs/assets/svg-lib/settings-svgrepo-com.svg +5 -0
  150. package/docs/assets/svg-lib/share-svgrepo-com.svg +5 -0
  151. package/docs/assets/svg-lib/sound-off-svgrepo-com.svg +6 -0
  152. package/docs/assets/svg-lib/sound-svgrepo-com.svg +5 -0
  153. package/docs/assets/svg-lib/spectacles-svgrepo-com.svg +5 -0
  154. package/docs/assets/svg-lib/star-svgrepo-com.svg +5 -0
  155. package/docs/assets/svg-lib/user-avatar-with-alert-svgrepo-com.svg +6 -0
  156. package/docs/assets/svg-lib/user-banned-svgrepo-com.svg +6 -0
  157. package/docs/assets/svg-lib/user-svgrepo-com.svg +5 -0
  158. package/docs/assets/svglist.png +0 -0
  159. package/docs/favicon-wrapper.svg +46 -0
  160. package/docs/favicon.svg +1 -0
  161. package/docs/iframe.html +686 -0
  162. package/docs/index.d.ts +5 -0
  163. package/docs/index.html +137 -0
  164. package/docs/index.json +1 -0
  165. package/docs/makeColors.ts +37 -0
  166. package/docs/notes.txt +11 -0
  167. package/docs/nunito-sans-bold-italic.woff2 +0 -0
  168. package/docs/nunito-sans-bold.woff2 +0 -0
  169. package/docs/nunito-sans-italic.woff2 +0 -0
  170. package/docs/nunito-sans-regular.woff2 +0 -0
  171. package/docs/project.json +1 -0
  172. package/docs/sb-addons/storybook-1/manager-bundle.js +3 -0
  173. package/docs/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +628 -0
  174. package/docs/sb-common-assets/favicon-wrapper.svg +46 -0
  175. package/docs/sb-common-assets/favicon.svg +1 -0
  176. package/docs/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  177. package/docs/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  178. package/docs/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  179. package/docs/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  180. package/docs/sb-manager/globals-runtime.js +75597 -0
  181. package/docs/sb-manager/globals.js +24 -0
  182. package/docs/sb-manager/manager-stores.js +23 -0
  183. package/docs/sb-manager/runtime.js +19698 -0
  184. package/docs/style_setter.js +19 -0
  185. package/docs/vite-inject-mocker-entry.js +2 -0
  186. package/index.html +7 -0
  187. package/package.json +37 -0
  188. package/public/assets/svg-lib/3-dots-horizontal-svgrepo-com.svg +5 -0
  189. package/public/assets/svg-lib/about-empty-page-svgrepo-com.svg +5 -0
  190. package/public/assets/svg-lib/alert-square.svg +26 -0
  191. package/public/assets/svg-lib/arrow-bottom-svgrepo-com.svg +9 -0
  192. package/public/assets/svg-lib/arrow-left-svgrepo-com.svg +5 -0
  193. package/public/assets/svg-lib/arrow-right-svgrepo-com.svg +5 -0
  194. package/public/assets/svg-lib/arrow-top-svgrepo-com.svg +9 -0
  195. package/public/assets/svg-lib/checkmark-svgrepo-com.svg +5 -0
  196. package/public/assets/svg-lib/clock-svgrepo-com.svg +5 -0
  197. package/public/assets/svg-lib/cross-svgrepo-com.svg +12 -0
  198. package/public/assets/svg-lib/download-svgrepo-com.svg +5 -0
  199. package/public/assets/svg-lib/edit-pen-svgrepo-com.svg +5 -0
  200. package/public/assets/svg-lib/favorite-svgrepo-com.svg +5 -0
  201. package/public/assets/svg-lib/forbiden-svgrepo-com.svg +9 -0
  202. package/public/assets/svg-lib/input-svgrepo-com.svg +5 -0
  203. package/public/assets/svg-lib/link-svgrepo-com.svg +5 -0
  204. package/public/assets/svg-lib/messages-alert-svgrepo-com.svg +6 -0
  205. package/public/assets/svg-lib/messages-svgrepo-com.svg +5 -0
  206. package/public/assets/svg-lib/mic-off-svgrepo-com.svg +6 -0
  207. package/public/assets/svg-lib/mic-svgrepo-com.svg +5 -0
  208. package/public/assets/svg-lib/music-svgrepo-com.svg +6 -0
  209. package/public/assets/svg-lib/next-long-arrow-right-svgrepo-com.svg +5 -0
  210. package/public/assets/svg-lib/notification-alert-svgrepo-com.svg +6 -0
  211. package/public/assets/svg-lib/notification-svgrepo-com.svg +5 -0
  212. package/public/assets/svg-lib/notifications-off-svgrepo-com.svg +6 -0
  213. package/public/assets/svg-lib/party-simple-colored-svgrepo-com.svg +11 -0
  214. package/public/assets/svg-lib/pattern-circles-svgrepo-com.svg +5 -0
  215. package/public/assets/svg-lib/play-button-simple-svgrepo-com.svg +5 -0
  216. package/public/assets/svg-lib/plus-outlined-svgrepo-com.svg +5 -0
  217. package/public/assets/svg-lib/previous-long-arrow-left-svgrepo-com.svg +5 -0
  218. package/public/assets/svg-lib/queue-listing-cards-svgrepo-com.svg +6 -0
  219. package/public/assets/svg-lib/queue-remove-svgrepo-com.svg +5 -0
  220. package/public/assets/svg-lib/recent-svgrepo-com.svg +5 -0
  221. package/public/assets/svg-lib/remove-svgrepo-com.svg +5 -0
  222. package/public/assets/svg-lib/repeat-svgrepo-com.svg +5 -0
  223. package/public/assets/svg-lib/schedule-add-svgrepo-com.svg +5 -0
  224. package/public/assets/svg-lib/schedule-alert-svgrepo-com.svg +6 -0
  225. package/public/assets/svg-lib/schedule-remove-svgrepo-com.svg +6 -0
  226. package/public/assets/svg-lib/schedule-svgrepo-com.svg +5 -0
  227. package/public/assets/svg-lib/search-svgrepo-com.svg +5 -0
  228. package/public/assets/svg-lib/session-abandon-svgrepo-com.svg +5 -0
  229. package/public/assets/svg-lib/session-join-svgrepo-com.svg +5 -0
  230. package/public/assets/svg-lib/session-leave-svgrepo-com.svg +5 -0
  231. package/public/assets/svg-lib/settings-svgrepo-com.svg +5 -0
  232. package/public/assets/svg-lib/share-svgrepo-com.svg +5 -0
  233. package/public/assets/svg-lib/sound-off-svgrepo-com.svg +6 -0
  234. package/public/assets/svg-lib/sound-svgrepo-com.svg +5 -0
  235. package/public/assets/svg-lib/spectacles-svgrepo-com.svg +5 -0
  236. package/public/assets/svg-lib/star-svgrepo-com.svg +5 -0
  237. package/public/assets/svg-lib/user-avatar-with-alert-svgrepo-com.svg +6 -0
  238. package/public/assets/svg-lib/user-banned-svgrepo-com.svg +6 -0
  239. package/public/assets/svg-lib/user-svgrepo-com.svg +5 -0
  240. package/public/assets/svglist.png +0 -0
  241. package/readme.md +9 -0
  242. package/src/components/Button/Button.stories.ts +64 -0
  243. package/src/components/Button/Button.tsx +99 -0
  244. package/src/components/Button/button.scss +147 -0
  245. package/src/components/Button/index.ts +1 -0
  246. package/src/components/Container/Box.tsx +83 -0
  247. package/src/components/Container/box.scss +41 -0
  248. package/src/components/Container/index.ts +1 -0
  249. package/src/components/Input/Input.stories.ts +49 -0
  250. package/src/components/Input/Input.tsx +172 -0
  251. package/src/components/Input/index.ts +1 -0
  252. package/src/components/Input/input.scss +69 -0
  253. package/src/components/Modal/Modal.stories.ts +33 -0
  254. package/src/components/Modal/Modal.tsx +125 -0
  255. package/src/components/Modal/index.ts +1 -0
  256. package/src/components/Modal/modal.scss +54 -0
  257. package/src/components/Toggle/Toggle.stories.ts +35 -0
  258. package/src/components/Toggle/Toggle.tsx +60 -0
  259. package/src/components/Toggle/index.ts +1 -0
  260. package/src/components/Toggle/toggle.scss +97 -0
  261. package/src/components/index.ts +5 -0
  262. package/src/main.scss +46 -0
  263. package/tsconfig.json +15 -0
  264. package/utils/makeColors.ts +37 -0
  265. package/utils/notes.txt +11 -0
  266. package/utils/style_setter.js +19 -0
  267. package/vite.config.ts +32 -0
@@ -0,0 +1,569 @@
1
+ import se, { useRef as oe, useState as W, useEffect as H, useId as ee } from "react";
2
+ var C = { exports: {} }, N = {};
3
+ var Z;
4
+ function ie() {
5
+ if (Z) return N;
6
+ Z = 1;
7
+ var f = Symbol.for("react.transitional.element"), p = Symbol.for("react.fragment");
8
+ function k(i, a, l) {
9
+ var s = null;
10
+ if (l !== void 0 && (s = "" + l), a.key !== void 0 && (s = "" + a.key), "key" in a) {
11
+ l = {};
12
+ for (var m in a)
13
+ m !== "key" && (l[m] = a[m]);
14
+ } else l = a;
15
+ return a = l.ref, {
16
+ $$typeof: f,
17
+ type: i,
18
+ key: s,
19
+ ref: a !== void 0 ? a : null,
20
+ props: l
21
+ };
22
+ }
23
+ return N.Fragment = p, N.jsx = k, N.jsxs = k, N;
24
+ }
25
+ var S = {};
26
+ var Q;
27
+ function le() {
28
+ return Q || (Q = 1, process.env.NODE_ENV !== "production" && (function() {
29
+ function f(e) {
30
+ if (e == null) return null;
31
+ if (typeof e == "function")
32
+ return e.$$typeof === te ? null : e.displayName || e.name || null;
33
+ if (typeof e == "string") return e;
34
+ switch (e) {
35
+ case R:
36
+ return "Fragment";
37
+ case A:
38
+ return "Profiler";
39
+ case y:
40
+ return "StrictMode";
41
+ case U:
42
+ return "Suspense";
43
+ case O:
44
+ return "SuspenseList";
45
+ case re:
46
+ return "Activity";
47
+ }
48
+ if (typeof e == "object")
49
+ switch (typeof e.tag == "number" && console.error(
50
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
51
+ ), e.$$typeof) {
52
+ case j:
53
+ return "Portal";
54
+ case I:
55
+ return e.displayName || "Context";
56
+ case w:
57
+ return (e._context.displayName || "Context") + ".Consumer";
58
+ case Y:
59
+ var t = e.render;
60
+ return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
61
+ case P:
62
+ return t = e.displayName || null, t !== null ? t : f(e.type) || "Memo";
63
+ case _:
64
+ t = e._payload, e = e._init;
65
+ try {
66
+ return f(e(t));
67
+ } catch {
68
+ }
69
+ }
70
+ return null;
71
+ }
72
+ function p(e) {
73
+ return "" + e;
74
+ }
75
+ function k(e) {
76
+ try {
77
+ p(e);
78
+ var t = !1;
79
+ } catch {
80
+ t = !0;
81
+ }
82
+ if (t) {
83
+ t = console;
84
+ var n = t.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
85
+ return n.call(
86
+ t,
87
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
88
+ u
89
+ ), p(e);
90
+ }
91
+ }
92
+ function i(e) {
93
+ if (e === R) return "<>";
94
+ if (typeof e == "object" && e !== null && e.$$typeof === _)
95
+ return "<...>";
96
+ try {
97
+ var t = f(e);
98
+ return t ? "<" + t + ">" : "<...>";
99
+ } catch {
100
+ return "<...>";
101
+ }
102
+ }
103
+ function a() {
104
+ var e = F.A;
105
+ return e === null ? null : e.getOwner();
106
+ }
107
+ function l() {
108
+ return Error("react-stack-top-frame");
109
+ }
110
+ function s(e) {
111
+ if (V.call(e, "key")) {
112
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
113
+ if (t && t.isReactWarning) return !1;
114
+ }
115
+ return e.key !== void 0;
116
+ }
117
+ function m(e, t) {
118
+ function n() {
119
+ q || (q = !0, console.error(
120
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
121
+ t
122
+ ));
123
+ }
124
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
125
+ get: n,
126
+ configurable: !0
127
+ });
128
+ }
129
+ function v() {
130
+ var e = f(this.type);
131
+ return B[e] || (B[e] = !0, console.error(
132
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
133
+ )), e = this.props.ref, e !== void 0 ? e : null;
134
+ }
135
+ function g(e, t, n, u, $, M) {
136
+ var d = n.ref;
137
+ return e = {
138
+ $$typeof: E,
139
+ type: e,
140
+ key: t,
141
+ props: n,
142
+ _owner: u
143
+ }, (d !== void 0 ? d : null) !== null ? Object.defineProperty(e, "ref", {
144
+ enumerable: !1,
145
+ get: v
146
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
147
+ configurable: !1,
148
+ enumerable: !1,
149
+ writable: !0,
150
+ value: 0
151
+ }), Object.defineProperty(e, "_debugInfo", {
152
+ configurable: !1,
153
+ enumerable: !1,
154
+ writable: !0,
155
+ value: null
156
+ }), Object.defineProperty(e, "_debugStack", {
157
+ configurable: !1,
158
+ enumerable: !1,
159
+ writable: !0,
160
+ value: $
161
+ }), Object.defineProperty(e, "_debugTask", {
162
+ configurable: !1,
163
+ enumerable: !1,
164
+ writable: !0,
165
+ value: M
166
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
167
+ }
168
+ function x(e, t, n, u, $, M) {
169
+ var d = t.children;
170
+ if (d !== void 0)
171
+ if (u)
172
+ if (ne(d)) {
173
+ for (u = 0; u < d.length; u++)
174
+ b(d[u]);
175
+ Object.freeze && Object.freeze(d);
176
+ } else
177
+ console.error(
178
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
179
+ );
180
+ else b(d);
181
+ if (V.call(t, "key")) {
182
+ d = f(e);
183
+ var T = Object.keys(t).filter(function(ae) {
184
+ return ae !== "key";
185
+ });
186
+ u = 0 < T.length ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}", X[d + u] || (T = 0 < T.length ? "{" + T.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ `A props object containing a "key" prop is being spread into JSX:
188
+ let props = %s;
189
+ <%s {...props} />
190
+ React keys must be passed directly to JSX without using spread:
191
+ let props = %s;
192
+ <%s key={someKey} {...props} />`,
193
+ u,
194
+ d,
195
+ T,
196
+ d
197
+ ), X[d + u] = !0);
198
+ }
199
+ if (d = null, n !== void 0 && (k(n), d = "" + n), s(t) && (k(t.key), d = "" + t.key), "key" in t) {
200
+ n = {};
201
+ for (var L in t)
202
+ L !== "key" && (n[L] = t[L]);
203
+ } else n = t;
204
+ return d && m(
205
+ n,
206
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
207
+ ), g(
208
+ e,
209
+ d,
210
+ n,
211
+ a(),
212
+ $,
213
+ M
214
+ );
215
+ }
216
+ function b(e) {
217
+ o(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === _ && (e._payload.status === "fulfilled" ? o(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
+ }
219
+ function o(e) {
220
+ return typeof e == "object" && e !== null && e.$$typeof === E;
221
+ }
222
+ var c = se, E = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), I = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), re = Symbol.for("react.activity"), te = Symbol.for("react.client.reference"), F = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, ne = Array.isArray, D = console.createTask ? console.createTask : function() {
223
+ return null;
224
+ };
225
+ c = {
226
+ react_stack_bottom_frame: function(e) {
227
+ return e();
228
+ }
229
+ };
230
+ var q, B = {}, J = c.react_stack_bottom_frame.bind(
231
+ c,
232
+ l
233
+ )(), G = D(i(l)), X = {};
234
+ S.Fragment = R, S.jsx = function(e, t, n) {
235
+ var u = 1e4 > F.recentlyCreatedOwnerStacks++;
236
+ return x(
237
+ e,
238
+ t,
239
+ n,
240
+ !1,
241
+ u ? Error("react-stack-top-frame") : J,
242
+ u ? D(i(e)) : G
243
+ );
244
+ }, S.jsxs = function(e, t, n) {
245
+ var u = 1e4 > F.recentlyCreatedOwnerStacks++;
246
+ return x(
247
+ e,
248
+ t,
249
+ n,
250
+ !0,
251
+ u ? Error("react-stack-top-frame") : J,
252
+ u ? D(i(e)) : G
253
+ );
254
+ };
255
+ })()), S;
256
+ }
257
+ var K;
258
+ function ce() {
259
+ return K || (K = 1, process.env.NODE_ENV === "production" ? C.exports = ie() : C.exports = le()), C.exports;
260
+ }
261
+ var r = ce();
262
+ const h = ({
263
+ direction: f = "row",
264
+ align: p = "center",
265
+ justify: k = "center",
266
+ wrapContent: i = !1,
267
+ cls: a = "",
268
+ gap: l = 8,
269
+ margin: s = [0],
270
+ padding: m = [0],
271
+ parent: v = "div",
272
+ mask: g = !1,
273
+ // TODO loader
274
+ children: x,
275
+ ...b
276
+ }) => {
277
+ const o = v, c = s?.map((j) => j + "px").join(" "), E = m?.map((j) => j + "px").join(" ");
278
+ return /* @__PURE__ */ r.jsx(
279
+ o,
280
+ {
281
+ className: [
282
+ "kit-box",
283
+ `kit-box--${f}`,
284
+ `kit-box--align-${p}`,
285
+ `kit-box--justify-${k}`,
286
+ i && "kit-box--wrap",
287
+ a
288
+ ].join(" "),
289
+ style: { gap: `${l}px`, margin: `${c}`, padding: `${E}` },
290
+ ...b,
291
+ children: x
292
+ }
293
+ );
294
+ }, z = ({
295
+ type: f = "primary",
296
+ size: p = "medium",
297
+ corners: k = "standard",
298
+ disabled: i = !1,
299
+ staticIcon: a = !1,
300
+ cls: l = "",
301
+ text: s = "",
302
+ iconPath: m = "",
303
+ labelAlign: v = "",
304
+ onClick: g,
305
+ ...x
306
+ }) => {
307
+ const b = m != "" && s === "" ? "kit-btn--icon" : "";
308
+ let o;
309
+ const c = () => m ? /* @__PURE__ */ r.jsx(
310
+ "div",
311
+ {
312
+ className: "kit-btn--svg",
313
+ style: {
314
+ maskImage: `url(assets/${m})`,
315
+ WebkitMaskImage: `url(assets/${m})`
316
+ }
317
+ }
318
+ ) : null;
319
+ switch (v) {
320
+ case "right":
321
+ o = () => /* @__PURE__ */ r.jsxs(h, { direction: "row", children: [
322
+ /* @__PURE__ */ r.jsx(c, {}),
323
+ s
324
+ ] });
325
+ break;
326
+ case "left":
327
+ o = () => /* @__PURE__ */ r.jsxs(h, { direction: "row", children: [
328
+ s,
329
+ /* @__PURE__ */ r.jsx(c, {})
330
+ ] });
331
+ break;
332
+ case "top":
333
+ o = () => /* @__PURE__ */ r.jsxs(h, { direction: "column", children: [
334
+ s,
335
+ /* @__PURE__ */ r.jsx(c, {})
336
+ ] });
337
+ break;
338
+ case "bottom":
339
+ o = () => /* @__PURE__ */ r.jsxs(h, { direction: "column", children: [
340
+ /* @__PURE__ */ r.jsx(c, {}),
341
+ s
342
+ ] });
343
+ break;
344
+ default:
345
+ o = () => /* @__PURE__ */ r.jsx(h, { direction: "row", children: b ? /* @__PURE__ */ r.jsx(c, {}) : s });
346
+ break;
347
+ }
348
+ return /* @__PURE__ */ r.jsx(
349
+ "button",
350
+ {
351
+ type: "button",
352
+ onClick: i || !g ? null : g,
353
+ className: [
354
+ "kit-btn",
355
+ `kit-btn--${p}`,
356
+ `kit-btn--${k}`,
357
+ `kit-btn--${f}`,
358
+ i ? "kit-btn--disabled" : "",
359
+ a ? "kit-icon" : "",
360
+ b,
361
+ l
362
+ ].join(" "),
363
+ ...x,
364
+ children: /* @__PURE__ */ r.jsx(o, {})
365
+ }
366
+ );
367
+ }, de = ({
368
+ width: f = "auto",
369
+ corners: p = "standard",
370
+ background: k = "blackout",
371
+ isOpen: i = !1,
372
+ closeButton: a = !0,
373
+ title: l = "",
374
+ cls: s = "",
375
+ children: m,
376
+ onClose: v,
377
+ ...g
378
+ }) => {
379
+ const x = oe(null), [b, o] = W(i);
380
+ function c() {
381
+ o(!1), v && v();
382
+ }
383
+ return H(() => {
384
+ o(i);
385
+ }, [i]), H(() => {
386
+ if (!b) return;
387
+ function E(R) {
388
+ R.key === "Escape" && c();
389
+ }
390
+ document.addEventListener("keydown", E);
391
+ const j = document.body.style.overflow;
392
+ return document.body.style.overflow = "hidden", () => {
393
+ document.body.style.overflow = j, document.removeEventListener("keydown", E);
394
+ };
395
+ }, [b, c]), /* @__PURE__ */ r.jsx(r.Fragment, { children: b ? /* @__PURE__ */ r.jsx(
396
+ "div",
397
+ {
398
+ className: "kit-modal--overlay",
399
+ onClick: (E) => {
400
+ E.target === x.current && c();
401
+ },
402
+ ref: x,
403
+ children: /* @__PURE__ */ r.jsx(
404
+ "div",
405
+ {
406
+ className: [
407
+ "kit-modal",
408
+ `kit-modal--${p}`,
409
+ `kit-modal--bg-${k}`,
410
+ s
411
+ ].join(" "),
412
+ style: { width: isNaN(f) ? "fit-content" : `${f}px` },
413
+ ...g,
414
+ children: /* @__PURE__ */ r.jsxs(h, { padding: [8, 16], direction: "column", children: [
415
+ /* @__PURE__ */ r.jsx(h, { justify: "end", margin: [0, -16], children: /* @__PURE__ */ r.jsx(
416
+ z,
417
+ {
418
+ type: "transparent",
419
+ size: "large",
420
+ onClick: c,
421
+ iconPath: "svg-lib/cross-svgrepo-com.svg",
422
+ cls: "kit-modal-close"
423
+ }
424
+ ) }),
425
+ /* @__PURE__ */ r.jsx(h, { justify: "start", children: m })
426
+ ] })
427
+ }
428
+ )
429
+ }
430
+ ) : /* @__PURE__ */ r.jsx(r.Fragment, {}) });
431
+ }, fe = ({
432
+ value: f = "",
433
+ type: p = "text",
434
+ corners: k = "standard",
435
+ disabled: i = !1,
436
+ label: a = "",
437
+ bottomText: l = "",
438
+ placeholder: s = "",
439
+ errorText: m = "",
440
+ live: v = !1,
441
+ isSearch: g = !1,
442
+ mask: x,
443
+ width: b,
444
+ onChange: o,
445
+ cls: c,
446
+ ...E
447
+ }) => {
448
+ const [j, R] = W(f), [y, A] = W(""), w = ee(), I = (P) => {
449
+ let _ = P.target.value;
450
+ p === "number" && (_ = _.toString().replace(/\D/g, "")), x && !x.test(_.toString()) ? A(m || "Некорректное значение") : A(""), R(_), v && o && o(_);
451
+ }, Y = () => {
452
+ R("");
453
+ }, O = {
454
+ value: j,
455
+ placeholder: s,
456
+ onChange: I,
457
+ onBlur: (P) => {
458
+ !v && o && o(j);
459
+ },
460
+ className: [
461
+ "kit-input",
462
+ `kit-input--${k}`,
463
+ i ? "kit-input--disabled" : "",
464
+ y ? "kit-input--error" : "",
465
+ c
466
+ ].join(" ").trim()
467
+ };
468
+ return /* @__PURE__ */ r.jsxs("div", { className: "kit-input--wrapper", children: [
469
+ a && /* @__PURE__ */ r.jsx("div", { className: "w5rem", children: /* @__PURE__ */ r.jsx(
470
+ "label",
471
+ {
472
+ for: w,
473
+ className: "kit-input--label kit-input-secondary-text",
474
+ children: a
475
+ }
476
+ ) }),
477
+ /* @__PURE__ */ r.jsxs(
478
+ "div",
479
+ {
480
+ className: "kit-input--container",
481
+ style: { width: b ? `${b}px` : "auto" },
482
+ children: [
483
+ p === "textarea" ? /* @__PURE__ */ r.jsx(
484
+ "textarea",
485
+ {
486
+ id: w,
487
+ ...O
488
+ }
489
+ ) : /* @__PURE__ */ r.jsx(
490
+ "input",
491
+ {
492
+ ...O,
493
+ type: p,
494
+ id: w
495
+ }
496
+ ),
497
+ /* @__PURE__ */ r.jsxs("div", { className: "kit-input--icon-container", children: [
498
+ j && /* @__PURE__ */ r.jsx(
499
+ z,
500
+ {
501
+ type: "transparent",
502
+ iconPath: "svg-lib/input-svgrepo-com.svg",
503
+ size: "small",
504
+ onClick: Y,
505
+ cls: "kit-input--icon"
506
+ }
507
+ ),
508
+ g && /* @__PURE__ */ r.jsx(
509
+ z,
510
+ {
511
+ type: "transparent",
512
+ iconPath: "svg-lib/search-svgrepo-com.svg",
513
+ size: "small",
514
+ staticIcon: v,
515
+ onClick: () => o && o(j),
516
+ cls: "kit-input--icon"
517
+ }
518
+ )
519
+ ] })
520
+ ]
521
+ }
522
+ ),
523
+ !y && l && /* @__PURE__ */ r.jsx("div", { className: "kit-input-bottomtext kit-input-secondary-text", children: l }),
524
+ y && /* @__PURE__ */ r.jsx("div", { className: "kit-input-errortext kit-input-secondary-text", children: y })
525
+ ] });
526
+ }, me = ({
527
+ size: f = "medium",
528
+ disabled: p = !1,
529
+ cls: k = "",
530
+ text: i = "",
531
+ onClick: a,
532
+ ...l
533
+ }) => {
534
+ const s = ee();
535
+ return /* @__PURE__ */ r.jsxs(
536
+ "label",
537
+ {
538
+ htmlFor: s,
539
+ className: [
540
+ "kit-toggle",
541
+ p ? "kit-toggle--disabled" : "",
542
+ `kit-toggle--${f}`,
543
+ k
544
+ ].join(" "),
545
+ children: [
546
+ /* @__PURE__ */ r.jsx(
547
+ "input",
548
+ {
549
+ id: s,
550
+ type: "checkbox",
551
+ className: "kit-toggle--input",
552
+ disabled: p,
553
+ defaultChecked: !1,
554
+ onChange: (m) => a?.(m.target.checked)
555
+ }
556
+ ),
557
+ /* @__PURE__ */ r.jsx("span", { className: "kit-toggle--slider", "aria-hidden": "true" }),
558
+ i && /* @__PURE__ */ r.jsx("span", { className: "kit-toggle--label", children: i })
559
+ ]
560
+ }
561
+ );
562
+ };
563
+ export {
564
+ h as Box,
565
+ z as Button,
566
+ fe as Input,
567
+ de as Modal,
568
+ me as Toggle
569
+ };
@@ -0,0 +1,6 @@
1
+ (function(E,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],v):(E=typeof globalThis<"u"?globalThis:E||self,v(E.velumUIkit={},E.React))})(this,(function(E,v){"use strict";var A={exports:{}},S={};var B;function ee(){if(B)return S;B=1;var f=Symbol.for("react.transitional.element"),p=Symbol.for("react.fragment");function k(i,a,l){var s=null;if(l!==void 0&&(s=""+l),a.key!==void 0&&(s=""+a.key),"key"in a){l={};for(var m in a)m!=="key"&&(l[m]=a[m])}else l=a;return a=l.ref,{$$typeof:f,type:i,key:s,ref:a!==void 0?a:null,props:l}}return S.Fragment=p,S.jsx=k,S.jsxs=k,S}var O={};var V;function te(){return V||(V=1,process.env.NODE_ENV!=="production"&&(function(){function f(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case I:return"Profiler";case w:return"StrictMode";case G:return"Suspense";case Y:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case g:return"Portal";case $:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case D:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return r=e.displayName||null,r!==null?r:f(e.type)||"Memo";case y:r=e._payload,e=e._init;try{return f(e(r))}catch{}}return null}function p(e){return""+e}function k(e){try{p(e);var r=!1}catch{r=!0}if(r){r=console;var n=r.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),p(e)}}function i(e){if(e===T)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===y)return"<...>";try{var r=f(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function a(){var e=L.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function s(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function m(e,r){function n(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function j(){var e=f(this.type);return Z[e]||(Z[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function h(e,r,n,u,M,U){var d=n.ref;return e={$$typeof:_,type:e,key:r,props:n,_owner:u},(d!==void 0?d:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:j}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function x(e,r,n,u,M,U){var d=r.children;if(d!==void 0)if(u)if(le(d)){for(u=0;u<d.length;u++)b(d[u]);Object.freeze&&Object.freeze(d)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(d);if(X.call(r,"key")){d=f(e);var N=Object.keys(r).filter(function(ce){return ce!=="key"});u=0<N.length?"{key: someKey, "+N.join(": ..., ")+": ...}":"{key: someKey}",K[d+u]||(N=0<N.length?"{"+N.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,u,d,N,d),K[d+u]=!0)}if(d=null,n!==void 0&&(k(n),d=""+n),s(r)&&(k(r.key),d=""+r.key),"key"in r){n={};for(var z in r)z!=="key"&&(n[z]=r[z])}else n=r;return d&&m(n,typeof e=="function"?e.displayName||e.name||"Unknown":e),h(e,d,n,a(),M,U)}function b(e){o(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===y&&(e._payload.status==="fulfilled"?o(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function o(e){return typeof e=="object"&&e!==null&&e.$$typeof===_}var c=v,_=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),$=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ie=Symbol.for("react.client.reference"),L=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,le=Array.isArray,W=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(e){return e()}};var H,Z={},Q=c.react_stack_bottom_frame.bind(c,l)(),q=W(i(l)),K={};O.Fragment=T,O.jsx=function(e,r,n){var u=1e4>L.recentlyCreatedOwnerStacks++;return x(e,r,n,!1,u?Error("react-stack-top-frame"):Q,u?W(i(e)):q)},O.jsxs=function(e,r,n){var u=1e4>L.recentlyCreatedOwnerStacks++;return x(e,r,n,!0,u?Error("react-stack-top-frame"):Q,u?W(i(e)):q)}})()),O}var J;function re(){return J||(J=1,process.env.NODE_ENV==="production"?A.exports=ee():A.exports=te()),A.exports}var t=re();const R=({direction:f="row",align:p="center",justify:k="center",wrapContent:i=!1,cls:a="",gap:l=8,margin:s=[0],padding:m=[0],parent:j="div",mask:h=!1,children:x,...b})=>{const o=j,c=s?.map(g=>g+"px").join(" "),_=m?.map(g=>g+"px").join(" ");return t.jsx(o,{className:["kit-box",`kit-box--${f}`,`kit-box--align-${p}`,`kit-box--justify-${k}`,i&&"kit-box--wrap",a].join(" "),style:{gap:`${l}px`,margin:`${c}`,padding:`${_}`},...b,children:x})},C=({type:f="primary",size:p="medium",corners:k="standard",disabled:i=!1,staticIcon:a=!1,cls:l="",text:s="",iconPath:m="",labelAlign:j="",onClick:h,...x})=>{const b=m!=""&&s===""?"kit-btn--icon":"";let o;const c=()=>m?t.jsx("div",{className:"kit-btn--svg",style:{maskImage:`url(assets/${m})`,WebkitMaskImage:`url(assets/${m})`}}):null;switch(j){case"right":o=()=>t.jsxs(R,{direction:"row",children:[t.jsx(c,{}),s]});break;case"left":o=()=>t.jsxs(R,{direction:"row",children:[s,t.jsx(c,{})]});break;case"top":o=()=>t.jsxs(R,{direction:"column",children:[s,t.jsx(c,{})]});break;case"bottom":o=()=>t.jsxs(R,{direction:"column",children:[t.jsx(c,{}),s]});break;default:o=()=>t.jsx(R,{direction:"row",children:b?t.jsx(c,{}):s});break}return t.jsx("button",{type:"button",onClick:i||!h?null:h,className:["kit-btn",`kit-btn--${p}`,`kit-btn--${k}`,`kit-btn--${f}`,i?"kit-btn--disabled":"",a?"kit-icon":"",b,l].join(" "),...x,children:t.jsx(o,{})})},ne=({width:f="auto",corners:p="standard",background:k="blackout",isOpen:i=!1,closeButton:a=!0,title:l="",cls:s="",children:m,onClose:j,...h})=>{const x=v.useRef(null),[b,o]=v.useState(i);function c(){o(!1),j&&j()}return v.useEffect(()=>{o(i)},[i]),v.useEffect(()=>{if(!b)return;function _(T){T.key==="Escape"&&c()}document.addEventListener("keydown",_);const g=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=g,document.removeEventListener("keydown",_)}},[b,c]),t.jsx(t.Fragment,{children:b?t.jsx("div",{className:"kit-modal--overlay",onClick:_=>{_.target===x.current&&c()},ref:x,children:t.jsx("div",{className:["kit-modal",`kit-modal--${p}`,`kit-modal--bg-${k}`,s].join(" "),style:{width:isNaN(f)?"fit-content":`${f}px`},...h,children:t.jsxs(R,{padding:[8,16],direction:"column",children:[t.jsx(R,{justify:"end",margin:[0,-16],children:t.jsx(C,{type:"transparent",size:"large",onClick:c,iconPath:"svg-lib/cross-svgrepo-com.svg",cls:"kit-modal-close"})}),t.jsx(R,{justify:"start",children:m})]})})}):t.jsx(t.Fragment,{})})},ae=({value:f="",type:p="text",corners:k="standard",disabled:i=!1,label:a="",bottomText:l="",placeholder:s="",errorText:m="",live:j=!1,isSearch:h=!1,mask:x,width:b,onChange:o,cls:c,..._})=>{const[g,T]=v.useState(f),[w,I]=v.useState(""),P=v.useId(),$=F=>{let y=F.target.value;p==="number"&&(y=y.toString().replace(/\D/g,"")),x&&!x.test(y.toString())?I(m||"Некорректное значение"):I(""),T(y),j&&o&&o(y)},D=()=>{T("")},Y={value:g,placeholder:s,onChange:$,onBlur:F=>{!j&&o&&o(g)},className:["kit-input",`kit-input--${k}`,i?"kit-input--disabled":"",w?"kit-input--error":"",c].join(" ").trim()};return t.jsxs("div",{className:"kit-input--wrapper",children:[a&&t.jsx("div",{className:"w5rem",children:t.jsx("label",{for:P,className:"kit-input--label kit-input-secondary-text",children:a})}),t.jsxs("div",{className:"kit-input--container",style:{width:b?`${b}px`:"auto"},children:[p==="textarea"?t.jsx("textarea",{id:P,...Y}):t.jsx("input",{...Y,type:p,id:P}),t.jsxs("div",{className:"kit-input--icon-container",children:[g&&t.jsx(C,{type:"transparent",iconPath:"svg-lib/input-svgrepo-com.svg",size:"small",onClick:D,cls:"kit-input--icon"}),h&&t.jsx(C,{type:"transparent",iconPath:"svg-lib/search-svgrepo-com.svg",size:"small",staticIcon:j,onClick:()=>o&&o(g),cls:"kit-input--icon"})]})]}),!w&&l&&t.jsx("div",{className:"kit-input-bottomtext kit-input-secondary-text",children:l}),w&&t.jsx("div",{className:"kit-input-errortext kit-input-secondary-text",children:w})]})},se=({size:f="medium",disabled:p=!1,cls:k="",text:i="",onClick:a,...l})=>{const s=v.useId();return t.jsxs("label",{htmlFor:s,className:["kit-toggle",p?"kit-toggle--disabled":"",`kit-toggle--${f}`,k].join(" "),children:[t.jsx("input",{id:s,type:"checkbox",className:"kit-toggle--input",disabled:p,defaultChecked:!1,onChange:m=>a?.(m.target.checked)}),t.jsx("span",{className:"kit-toggle--slider","aria-hidden":"true"}),i&&t.jsx("span",{className:"kit-toggle--label",children:i})]})};E.Box=R,E.Button=C,E.Input=ae,E.Modal=ne,E.Toggle=se,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.kit-box{margin:0;padding:0;display:flex;width:100%;flex-wrap:nowrap}.kit-box--row{flex-direction:row}.kit-box--column{flex-direction:column}.kit-box--align-top{align-items:flex-start}.kit-box--align-center{align-items:center}.kit-box--align-bottom{align-items:flex-end}.kit-box--justify-start{justify-content:flex-start}.kit-box--justify-end{justify-content:flex-end}.kit-box--justify-center{justify-content:center}.kit-box--justify-space{justify-content:space-between}.kit-box--wrap{flex-wrap:wrap}.kit-btn{display:inline-block;cursor:pointer;border:0;font-weight:700;line-height:1;font-family:var(--font-family);transition:background-color .3s ease;padding:8px 16px}.kit-btn>.kit-box{width:fit-content}.kit-btn:active{transform:translateY(.5px);box-shadow:0 0 5px #0000004d inset}.kit-btn.kit-icon{pointer-events:none}.kit-btn.kit-btn--disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none}.kit-btn--primary{background-color:var(--primary-btn-color);color:var(--secondary-btn-color)}.kit-btn--primary>div>.kit-btn--svg{background-color:var(--secondary-btn-color)}.kit-btn--primary:hover{background-color:var(--hover-btn-color)}.kit-btn--secondary{border:1px var(--primary-btn-color) solid;background-color:transparent;color:var(--primary-btn-color)}.kit-btn--secondary>div>.kit-btn--svg{background-color:var(--primary-btn-color)}.kit-btn--secondary:hover{background-color:var(--hover-btn-color);color:var(--secondary-btn-color);border:1px var(--hover-btn-color) solid}.kit-btn--secondary:hover>div>.kit-btn--svg{background-color:var(--secondary-btn-color)}.kit-btn--transparent{border:none;background-color:transparent;color:var(--primary-btn-color)}.kit-btn--transparent>div>.kit-btn--svg{background-color:var(--primary-btn-color)}.kit-btn--transparent:hover{color:var(--hover-btn-color)}.kit-btn--transparent:hover>div>.kit-btn--svg{background-color:var(--hover-btn-color)}.kit-btn--transparent:active{box-shadow:unset}.kit-btn--small{font-size:12px}.kit-btn--small>div>.kit-btn--svg{width:20px;height:20px}.kit-btn--small:not(.kit-btn--icon)>.kit-container--h>.kit-btn--svg{width:16px;height:16px}.kit-btn--small:not(.kit-btn--icon)>.kit-container--v>.kit-btn--svg{width:24px;height:24px}.kit-btn--medium{font-size:14px}.kit-btn--medium>div>.kit-btn--svg{width:24px;height:24px}.kit-btn--medium:not(.kit-btn--icon)>.kit-container--h>.kit-btn--svg{width:20px;height:20px}.kit-btn--medium:not(.kit-btn--icon)>.kit-container--v>.kit-btn--svg{width:28px;height:28px}.kit-btn--large{font-size:16px}.kit-btn--large>div>.kit-btn--svg{width:32px;height:32px}.kit-btn--large:not(.kit-btn--icon)>.kit-container--h>.kit-btn--svg{width:24px;height:24px}.kit-btn--large:not(.kit-btn--icon)>.kit-container--v>.kit-btn--svg{width:32px;height:32px}.kit-btn--standard{border-radius:var(--corners-standard)}.kit-btn--round{border-radius:var(--corners-round)}.kit-btn--square{border-radius:var(--corners-square)}.kit-btn--icon{padding:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.kit-btn--svg{background-repeat:no-repeat;background-position:center;background-size:contain;mask-size:contain;mask-repeat:no-repeat;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat}.kit-modal--overlay{position:fixed;inset:0;width:100%;height:100%;background:#000c;z-index:9999;display:flex;align-items:center;justify-content:center;animation:fadeInOverlay .2s ease-out}.kit-modal{background-color:var(--bg-color);position:relative;max-width:420px;width:100%;min-height:200px;box-shadow:0 10px 30px #00000026;animation:fadeInModal .2s ease-out}.kit-modal>div{width:auto}.kit-modal-close{margin:-4px -16px 0 0}.kit-modal--standard{border-radius:var(--corners-standard)}.kit-modal--round{border-radius:var(--corners-round)}.kit-modal--square{border-radius:var(--corners-square)}@keyframes fadeInOverlay{0%{opacity:0}to{opacity:1}}@keyframes fadeInModal{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.kit-input--container{display:flex;line-height:30px;align-items:center;position:relative}.kit-input{width:100%;height:36px;line-height:30px;padding:0 .6rem;border:1px solid var(--primary-btn-color);outline:none;background-color:#efefef;color:var(--text-color);transition:.3s ease}.kit-input.kit-input--disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none}.kit-input--error{border:1px solid var(--error-color)}.kit-input--standard{border-radius:var(--corners-standard)}.kit-input--round{border-radius:var(--corners-round)}.kit-input--square{border-radius:var(--corners-square)}.kit-input-secondary-text{font-size:12px;line-height:24px;margin-left:.8rem}.kit-input::placeholder,.kit-input-bottomtext{color:var(--text-color-secondary)}.kit-input-errortext{color:var(--error-color)}.kit-input--label{color:var(--text-color)}.kit-input:focus,.kit-input:hover{outline:none}.kit-input--icon-container{position:absolute;right:.4rem;fill:none;display:flex}.kit-input--icon{padding:4px}:root{--font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;--text-color: #2e3242;--text-color-secondary: #94a3b8;--error-color: #ef4949;--bg-color: #fff;--primary-btn-color: #7C3AED;--secondary-btn-color: #FFFFFF;--hover-btn-color: #6D28D9;--corners-standard: .65em;--corners-round: 3em;--corners-square: 0}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box;font-family:var(--font-family)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.kit-toggle{display:inline-flex;align-items:center;gap:12px;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:system-ui,sans-serif}.kit-toggle--input{position:absolute;opacity:0;pointer-events:none}.kit-toggle--slider{position:relative;border-radius:999px;transition:background .25s ease;background:#d1d5db}.kit-toggle--slider:before{content:"";position:absolute;top:3px;left:3px;border-radius:50%;transition:transform .25s ease,box-shadow .25s ease;box-shadow:0 2px 6px #00000026;background:#fff}.kit-toggle--input:checked+.kit-toggle--slider{background:var(--primary-btn-color)}.kit-toggle--input:checked+.kit-toggle--slider:before{transform:translate(20px)}.kit-toggle--input:focus-visible+.kit-toggle--slider{outline:2px solid var(--primary-btn-color);outline-offset:2px}.kit-toggle--disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none}.kit-toggle--disabled .kit-toggle--slider{background:#9ca3af}.kit-toggle--label{color:var(--text-color)}.kit-toggle--small>.kit-toggle--slider{width:38px;height:18px}.kit-toggle--small>.kit-toggle--slider:before{width:12px;height:12px}.kit-toggle--small>.kit-toggle--label{font-size:14px}.kit-toggle--medium>.kit-toggle--slider{width:42px;height:22px}.kit-toggle--medium>.kit-toggle--slider:before{width:16px;height:16px}.kit-toggle--medium>.kit-toggle--label{font-size:16px}.kit-toggle--large>.kit-toggle--slider{width:46px;height:26px}.kit-toggle--large>.kit-toggle--slider:before{width:20px;height:20px}.kit-toggle--large>.kit-toggle--label{font-size:18px}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Компонент кнопки
3
+ * - разные состояния
4
+ * - разные типы
5
+ * - разные размеры
6
+ * - разные углы
7
+ * - добавление иконки
8
+ */
9
+ export interface ButtonProps {
10
+ /** Основная / Только текст / Вспомогательная */
11
+ type: 'primary' | 'transparent' | 'secondary';
12
+ /** Маленькая / Средняя / Большая */
13
+ size?: 'small' | 'medium' | 'large';
14
+ /** Углы прямые / Закругленные / Круглые */
15
+ corners?: 'square' | 'standard' | 'round';
16
+ /** Доступность кнопки */
17
+ disabled?: boolean;
18
+ /** Текст кнопки */
19
+ text?: string;
20
+ /** Событие при нажатии */
21
+ onClick?: (e?: MouseEvent) => void;
22
+ /** Дополнительные классы */
23
+ cls?: string;
24
+ /** Путь до иконки из assets */
25
+ iconPath?: string;
26
+ /** Расположение текста относительно иконки */
27
+ labelAlign?: 'right' | 'left' | 'bottom' | 'top';
28
+ /** Это просто информационная иконка */
29
+ staticIcon?: boolean;
30
+ }
31
+ /** Элемент кнопки */
32
+ export declare const Button: ({ type, size, corners, disabled, staticIcon, cls, text, iconPath, labelAlign, onClick, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ type, size, corners, disabled, staticIcon, cls, text, iconPath, labelAlign, onClick, ...props }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ decorators: ((Story: any) => any)[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const CustomButton: Story;
14
+ export declare const IconButton: Story;
15
+ export declare const Icon: Story;
@@ -0,0 +1 @@
1
+ export * from './Button';
package/docs/CNAME ADDED
@@ -0,0 +1 @@
1
+ uikit.velumweb.ru