@velumweb/ui-kit 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/components/Button/Button.d.ts +32 -32
  2. package/dist/components/Button/Button.stories.d.ts +15 -15
  3. package/dist/components/Button/index.d.ts +1 -1
  4. package/dist/components/Container/Box.d.ts +33 -33
  5. package/dist/components/Container/index.d.ts +1 -1
  6. package/dist/components/Input/Input.d.ts +38 -38
  7. package/dist/components/Input/Input.stories.d.ts +14 -14
  8. package/dist/components/Input/index.d.ts +1 -1
  9. package/dist/components/Modal/Modal.d.ts +29 -29
  10. package/dist/components/Modal/Modal.stories.d.ts +13 -13
  11. package/dist/components/Modal/index.d.ts +1 -1
  12. package/dist/components/Toggle/Toggle.d.ts +18 -18
  13. package/dist/components/Toggle/Toggle.stories.d.ts +13 -13
  14. package/dist/components/Toggle/index.d.ts +1 -1
  15. package/dist/components/index.d.ts +6 -5
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.es.js +583 -569
  18. package/dist/index.es2.js +1 -1
  19. package/dist/theme.d.ts +2 -0
  20. package/dist/ui-kit.css +1 -1
  21. package/package.json +8 -3
  22. package/readme.md +19 -2
  23. package/.storybook/main.ts +0 -14
  24. package/.storybook/manager.ts +0 -32
  25. package/.storybook/preview.ts +0 -14
  26. package/CNAME +0 -1
  27. package/docs/CNAME +0 -1
  28. package/docs/assets/Button-CfaZpHIg.css +0 -1
  29. package/docs/assets/Button-DBH2W8EG.js +0 -1
  30. package/docs/assets/Button.stories-uPwy2cWr.js +0 -34
  31. package/docs/assets/Input-RjFZkyU_.css +0 -1
  32. package/docs/assets/Input.stories-BWPjJb-G.js +0 -21
  33. package/docs/assets/Modal-CWKTs3Ep.css +0 -1
  34. package/docs/assets/Modal.stories-eOcMgB-u.js +0 -7
  35. package/docs/assets/Toggle-BmcBtVup.css +0 -1
  36. package/docs/assets/Toggle.stories-MYi2irTa.js +0 -9
  37. package/docs/assets/iframe-CssGlRqL.js +0 -1062
  38. package/docs/assets/jsx-runtime-u17CrQMm.js +0 -1
  39. package/docs/assets/preload-helper-PPVm8Dsz.js +0 -1
  40. package/docs/assets/react-18-BQzlCVST.js +0 -9
  41. package/docs/assets/svg-lib/3-dots-horizontal-svgrepo-com.svg +0 -5
  42. package/docs/assets/svg-lib/about-empty-page-svgrepo-com.svg +0 -5
  43. package/docs/assets/svg-lib/alert-square.svg +0 -26
  44. package/docs/assets/svg-lib/arrow-bottom-svgrepo-com.svg +0 -9
  45. package/docs/assets/svg-lib/arrow-left-svgrepo-com.svg +0 -5
  46. package/docs/assets/svg-lib/arrow-right-svgrepo-com.svg +0 -5
  47. package/docs/assets/svg-lib/arrow-top-svgrepo-com.svg +0 -9
  48. package/docs/assets/svg-lib/checkmark-svgrepo-com.svg +0 -5
  49. package/docs/assets/svg-lib/clock-svgrepo-com.svg +0 -5
  50. package/docs/assets/svg-lib/cross-svgrepo-com.svg +0 -12
  51. package/docs/assets/svg-lib/download-svgrepo-com.svg +0 -5
  52. package/docs/assets/svg-lib/edit-pen-svgrepo-com.svg +0 -5
  53. package/docs/assets/svg-lib/favorite-svgrepo-com.svg +0 -5
  54. package/docs/assets/svg-lib/forbiden-svgrepo-com.svg +0 -9
  55. package/docs/assets/svg-lib/input-svgrepo-com.svg +0 -5
  56. package/docs/assets/svg-lib/link-svgrepo-com.svg +0 -5
  57. package/docs/assets/svg-lib/messages-alert-svgrepo-com.svg +0 -6
  58. package/docs/assets/svg-lib/messages-svgrepo-com.svg +0 -5
  59. package/docs/assets/svg-lib/mic-off-svgrepo-com.svg +0 -6
  60. package/docs/assets/svg-lib/mic-svgrepo-com.svg +0 -5
  61. package/docs/assets/svg-lib/music-svgrepo-com.svg +0 -6
  62. package/docs/assets/svg-lib/next-long-arrow-right-svgrepo-com.svg +0 -5
  63. package/docs/assets/svg-lib/notification-alert-svgrepo-com.svg +0 -6
  64. package/docs/assets/svg-lib/notification-svgrepo-com.svg +0 -5
  65. package/docs/assets/svg-lib/notifications-off-svgrepo-com.svg +0 -6
  66. package/docs/assets/svg-lib/party-simple-colored-svgrepo-com.svg +0 -11
  67. package/docs/assets/svg-lib/pattern-circles-svgrepo-com.svg +0 -5
  68. package/docs/assets/svg-lib/play-button-simple-svgrepo-com.svg +0 -5
  69. package/docs/assets/svg-lib/plus-outlined-svgrepo-com.svg +0 -5
  70. package/docs/assets/svg-lib/previous-long-arrow-left-svgrepo-com.svg +0 -5
  71. package/docs/assets/svg-lib/queue-listing-cards-svgrepo-com.svg +0 -6
  72. package/docs/assets/svg-lib/queue-remove-svgrepo-com.svg +0 -5
  73. package/docs/assets/svg-lib/recent-svgrepo-com.svg +0 -5
  74. package/docs/assets/svg-lib/remove-svgrepo-com.svg +0 -5
  75. package/docs/assets/svg-lib/repeat-svgrepo-com.svg +0 -5
  76. package/docs/assets/svg-lib/schedule-add-svgrepo-com.svg +0 -5
  77. package/docs/assets/svg-lib/schedule-alert-svgrepo-com.svg +0 -6
  78. package/docs/assets/svg-lib/schedule-remove-svgrepo-com.svg +0 -6
  79. package/docs/assets/svg-lib/schedule-svgrepo-com.svg +0 -5
  80. package/docs/assets/svg-lib/search-svgrepo-com.svg +0 -5
  81. package/docs/assets/svg-lib/session-abandon-svgrepo-com.svg +0 -5
  82. package/docs/assets/svg-lib/session-join-svgrepo-com.svg +0 -5
  83. package/docs/assets/svg-lib/session-leave-svgrepo-com.svg +0 -5
  84. package/docs/assets/svg-lib/settings-svgrepo-com.svg +0 -5
  85. package/docs/assets/svg-lib/share-svgrepo-com.svg +0 -5
  86. package/docs/assets/svg-lib/sound-off-svgrepo-com.svg +0 -6
  87. package/docs/assets/svg-lib/sound-svgrepo-com.svg +0 -5
  88. package/docs/assets/svg-lib/spectacles-svgrepo-com.svg +0 -5
  89. package/docs/assets/svg-lib/star-svgrepo-com.svg +0 -5
  90. package/docs/assets/svg-lib/user-avatar-with-alert-svgrepo-com.svg +0 -6
  91. package/docs/assets/svg-lib/user-banned-svgrepo-com.svg +0 -6
  92. package/docs/assets/svg-lib/user-svgrepo-com.svg +0 -5
  93. package/docs/assets/svglist.png +0 -0
  94. package/docs/components/Button/Button.d.ts +0 -32
  95. package/docs/components/Button/Button.stories.d.ts +0 -15
  96. package/docs/components/Button/index.d.ts +0 -1
  97. package/docs/components/Container/Box.d.ts +0 -33
  98. package/docs/components/Container/index.d.ts +0 -1
  99. package/docs/components/Input/Input.d.ts +0 -38
  100. package/docs/components/Input/Input.stories.d.ts +0 -14
  101. package/docs/components/Input/index.d.ts +0 -1
  102. package/docs/components/Modal/Modal.d.ts +0 -29
  103. package/docs/components/Modal/Modal.stories.d.ts +0 -13
  104. package/docs/components/Modal/index.d.ts +0 -1
  105. package/docs/components/Toggle/Toggle.d.ts +0 -18
  106. package/docs/components/Toggle/Toggle.stories.d.ts +0 -13
  107. package/docs/components/Toggle/index.d.ts +0 -1
  108. package/docs/components/index.d.ts +0 -5
  109. package/docs/favicon-wrapper.svg +0 -46
  110. package/docs/favicon.svg +0 -1
  111. package/docs/iframe.html +0 -686
  112. package/docs/index.d.ts +0 -1
  113. package/docs/index.html +0 -137
  114. package/docs/index.json +0 -1
  115. package/docs/makeColors.ts +0 -37
  116. package/docs/notes.txt +0 -11
  117. package/docs/nunito-sans-bold-italic.woff2 +0 -0
  118. package/docs/nunito-sans-bold.woff2 +0 -0
  119. package/docs/nunito-sans-italic.woff2 +0 -0
  120. package/docs/nunito-sans-regular.woff2 +0 -0
  121. package/docs/project.json +0 -1
  122. package/docs/sb-addons/storybook-1/manager-bundle.js +0 -3
  123. package/docs/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -628
  124. package/docs/sb-common-assets/favicon-wrapper.svg +0 -46
  125. package/docs/sb-common-assets/favicon.svg +0 -1
  126. package/docs/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  127. package/docs/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  128. package/docs/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  129. package/docs/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  130. package/docs/sb-manager/globals-runtime.js +0 -75597
  131. package/docs/sb-manager/globals.js +0 -24
  132. package/docs/sb-manager/manager-stores.js +0 -23
  133. package/docs/sb-manager/runtime.js +0 -19698
  134. package/docs/style_setter.js +0 -19
  135. package/docs/vite-inject-mocker-entry.js +0 -2
  136. package/index.html +0 -7
  137. package/public/assets/svg-lib/3-dots-horizontal-svgrepo-com.svg +0 -5
  138. package/public/assets/svg-lib/about-empty-page-svgrepo-com.svg +0 -5
  139. package/public/assets/svg-lib/alert-square.svg +0 -26
  140. package/public/assets/svg-lib/arrow-bottom-svgrepo-com.svg +0 -9
  141. package/public/assets/svg-lib/arrow-left-svgrepo-com.svg +0 -5
  142. package/public/assets/svg-lib/arrow-right-svgrepo-com.svg +0 -5
  143. package/public/assets/svg-lib/arrow-top-svgrepo-com.svg +0 -9
  144. package/public/assets/svg-lib/checkmark-svgrepo-com.svg +0 -5
  145. package/public/assets/svg-lib/clock-svgrepo-com.svg +0 -5
  146. package/public/assets/svg-lib/cross-svgrepo-com.svg +0 -12
  147. package/public/assets/svg-lib/download-svgrepo-com.svg +0 -5
  148. package/public/assets/svg-lib/edit-pen-svgrepo-com.svg +0 -5
  149. package/public/assets/svg-lib/favorite-svgrepo-com.svg +0 -5
  150. package/public/assets/svg-lib/forbiden-svgrepo-com.svg +0 -9
  151. package/public/assets/svg-lib/input-svgrepo-com.svg +0 -5
  152. package/public/assets/svg-lib/link-svgrepo-com.svg +0 -5
  153. package/public/assets/svg-lib/messages-alert-svgrepo-com.svg +0 -6
  154. package/public/assets/svg-lib/messages-svgrepo-com.svg +0 -5
  155. package/public/assets/svg-lib/mic-off-svgrepo-com.svg +0 -6
  156. package/public/assets/svg-lib/mic-svgrepo-com.svg +0 -5
  157. package/public/assets/svg-lib/music-svgrepo-com.svg +0 -6
  158. package/public/assets/svg-lib/next-long-arrow-right-svgrepo-com.svg +0 -5
  159. package/public/assets/svg-lib/notification-alert-svgrepo-com.svg +0 -6
  160. package/public/assets/svg-lib/notification-svgrepo-com.svg +0 -5
  161. package/public/assets/svg-lib/notifications-off-svgrepo-com.svg +0 -6
  162. package/public/assets/svg-lib/party-simple-colored-svgrepo-com.svg +0 -11
  163. package/public/assets/svg-lib/pattern-circles-svgrepo-com.svg +0 -5
  164. package/public/assets/svg-lib/play-button-simple-svgrepo-com.svg +0 -5
  165. package/public/assets/svg-lib/plus-outlined-svgrepo-com.svg +0 -5
  166. package/public/assets/svg-lib/previous-long-arrow-left-svgrepo-com.svg +0 -5
  167. package/public/assets/svg-lib/queue-listing-cards-svgrepo-com.svg +0 -6
  168. package/public/assets/svg-lib/queue-remove-svgrepo-com.svg +0 -5
  169. package/public/assets/svg-lib/recent-svgrepo-com.svg +0 -5
  170. package/public/assets/svg-lib/remove-svgrepo-com.svg +0 -5
  171. package/public/assets/svg-lib/repeat-svgrepo-com.svg +0 -5
  172. package/public/assets/svg-lib/schedule-add-svgrepo-com.svg +0 -5
  173. package/public/assets/svg-lib/schedule-alert-svgrepo-com.svg +0 -6
  174. package/public/assets/svg-lib/schedule-remove-svgrepo-com.svg +0 -6
  175. package/public/assets/svg-lib/schedule-svgrepo-com.svg +0 -5
  176. package/public/assets/svg-lib/search-svgrepo-com.svg +0 -5
  177. package/public/assets/svg-lib/session-abandon-svgrepo-com.svg +0 -5
  178. package/public/assets/svg-lib/session-join-svgrepo-com.svg +0 -5
  179. package/public/assets/svg-lib/session-leave-svgrepo-com.svg +0 -5
  180. package/public/assets/svg-lib/settings-svgrepo-com.svg +0 -5
  181. package/public/assets/svg-lib/share-svgrepo-com.svg +0 -5
  182. package/public/assets/svg-lib/sound-off-svgrepo-com.svg +0 -6
  183. package/public/assets/svg-lib/sound-svgrepo-com.svg +0 -5
  184. package/public/assets/svg-lib/spectacles-svgrepo-com.svg +0 -5
  185. package/public/assets/svg-lib/star-svgrepo-com.svg +0 -5
  186. package/public/assets/svg-lib/user-avatar-with-alert-svgrepo-com.svg +0 -6
  187. package/public/assets/svg-lib/user-banned-svgrepo-com.svg +0 -6
  188. package/public/assets/svg-lib/user-svgrepo-com.svg +0 -5
  189. package/public/assets/svglist.png +0 -0
  190. package/src/components/Button/Button.stories.ts +0 -64
  191. package/src/components/Button/Button.tsx +0 -99
  192. package/src/components/Button/button.scss +0 -147
  193. package/src/components/Button/index.ts +0 -1
  194. package/src/components/Container/Box.tsx +0 -83
  195. package/src/components/Container/box.scss +0 -41
  196. package/src/components/Container/index.ts +0 -1
  197. package/src/components/Input/Input.stories.ts +0 -49
  198. package/src/components/Input/Input.tsx +0 -172
  199. package/src/components/Input/index.ts +0 -1
  200. package/src/components/Input/input.scss +0 -69
  201. package/src/components/Modal/Modal.stories.ts +0 -33
  202. package/src/components/Modal/Modal.tsx +0 -125
  203. package/src/components/Modal/index.ts +0 -1
  204. package/src/components/Modal/modal.scss +0 -54
  205. package/src/components/Toggle/Toggle.stories.ts +0 -35
  206. package/src/components/Toggle/Toggle.tsx +0 -60
  207. package/src/components/Toggle/index.ts +0 -1
  208. package/src/components/Toggle/toggle.scss +0 -97
  209. package/src/components/index.ts +0 -5
  210. package/src/main.scss +0 -46
  211. package/src/style.ts +0 -1
  212. package/tsconfig.json +0 -15
  213. package/utils/makeColors.ts +0 -37
  214. package/utils/notes.txt +0 -11
  215. package/utils/style_setter.js +0 -19
  216. package/vite.config.ts +0 -42
package/dist/index.es.js CHANGED
@@ -1,569 +1,583 @@
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
- };
1
+ import oe, { useRef as se, useState as W, useEffect as H, useId as ee } from "react";
2
+ var C = { exports: {} }, N = {};
3
+ var Z;
4
+ function le() {
5
+ if (Z) return N;
6
+ Z = 1;
7
+ var i = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
8
+ function p(n, o, u) {
9
+ var s = null;
10
+ if (u !== void 0 && (s = "" + u), o.key !== void 0 && (s = "" + o.key), "key" in o) {
11
+ u = {};
12
+ for (var k in o)
13
+ k !== "key" && (u[k] = o[k]);
14
+ } else u = o;
15
+ return o = u.ref, {
16
+ $$typeof: i,
17
+ type: n,
18
+ key: s,
19
+ ref: o !== void 0 ? o : null,
20
+ props: u
21
+ };
22
+ }
23
+ return N.Fragment = c, N.jsx = p, N.jsxs = p, N;
24
+ }
25
+ var S = {};
26
+ var Q;
27
+ function ie() {
28
+ return Q || (Q = 1, process.env.NODE_ENV !== "production" && (function() {
29
+ function i(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 h:
36
+ return "Fragment";
37
+ case A:
38
+ return "Profiler";
39
+ case y:
40
+ return "StrictMode";
41
+ case U:
42
+ return "Suspense";
43
+ case P:
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 E:
53
+ return "Portal";
54
+ case I:
55
+ return e.displayName || "Context";
56
+ case w:
57
+ return (e._context.displayName || "Context") + ".Consumer";
58
+ case F:
59
+ var t = e.render;
60
+ return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
61
+ case O:
62
+ return t = e.displayName || null, t !== null ? t : i(e.type) || "Memo";
63
+ case _:
64
+ t = e._payload, e = e._init;
65
+ try {
66
+ return i(e(t));
67
+ } catch {
68
+ }
69
+ }
70
+ return null;
71
+ }
72
+ function c(e) {
73
+ return "" + e;
74
+ }
75
+ function p(e) {
76
+ try {
77
+ c(e);
78
+ var t = !1;
79
+ } catch {
80
+ t = !0;
81
+ }
82
+ if (t) {
83
+ t = console;
84
+ var a = t.error, f = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
85
+ return a.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
+ f
89
+ ), c(e);
90
+ }
91
+ }
92
+ function n(e) {
93
+ if (e === h) return "<>";
94
+ if (typeof e == "object" && e !== null && e.$$typeof === _)
95
+ return "<...>";
96
+ try {
97
+ var t = i(e);
98
+ return t ? "<" + t + ">" : "<...>";
99
+ } catch {
100
+ return "<...>";
101
+ }
102
+ }
103
+ function o() {
104
+ var e = Y.A;
105
+ return e === null ? null : e.getOwner();
106
+ }
107
+ function u() {
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 k(e, t) {
118
+ function a() {
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
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
125
+ get: a,
126
+ configurable: !0
127
+ });
128
+ }
129
+ function v() {
130
+ var e = i(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 j(e, t, a, f, $, M) {
136
+ var m = a.ref;
137
+ return e = {
138
+ $$typeof: g,
139
+ type: e,
140
+ key: t,
141
+ props: a,
142
+ _owner: f
143
+ }, (m !== void 0 ? m : 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, a, f, $, M) {
169
+ var m = t.children;
170
+ if (m !== void 0)
171
+ if (f)
172
+ if (ne(m)) {
173
+ for (f = 0; f < m.length; f++)
174
+ b(m[f]);
175
+ Object.freeze && Object.freeze(m);
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(m);
181
+ if (V.call(t, "key")) {
182
+ m = i(e);
183
+ var T = Object.keys(t).filter(function(ae) {
184
+ return ae !== "key";
185
+ });
186
+ f = 0 < T.length ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}", X[m + f] || (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
+ f,
194
+ m,
195
+ T,
196
+ m
197
+ ), X[m + f] = !0);
198
+ }
199
+ if (m = null, a !== void 0 && (p(a), m = "" + a), s(t) && (p(t.key), m = "" + t.key), "key" in t) {
200
+ a = {};
201
+ for (var L in t)
202
+ L !== "key" && (a[L] = t[L]);
203
+ } else a = t;
204
+ return m && k(
205
+ a,
206
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
207
+ ), j(
208
+ e,
209
+ m,
210
+ a,
211
+ o(),
212
+ $,
213
+ M
214
+ );
215
+ }
216
+ function b(e) {
217
+ l(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === _ && (e._payload.status === "fulfilled" ? l(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
+ }
219
+ function l(e) {
220
+ return typeof e == "object" && e !== null && e.$$typeof === g;
221
+ }
222
+ var d = oe, g = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), h = 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"), F = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), re = Symbol.for("react.activity"), te = Symbol.for("react.client.reference"), Y = d.__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
+ d = {
226
+ react_stack_bottom_frame: function(e) {
227
+ return e();
228
+ }
229
+ };
230
+ var q, B = {}, J = d.react_stack_bottom_frame.bind(
231
+ d,
232
+ u
233
+ )(), G = D(n(u)), X = {};
234
+ S.Fragment = h, S.jsx = function(e, t, a) {
235
+ var f = 1e4 > Y.recentlyCreatedOwnerStacks++;
236
+ return x(
237
+ e,
238
+ t,
239
+ a,
240
+ !1,
241
+ f ? Error("react-stack-top-frame") : J,
242
+ f ? D(n(e)) : G
243
+ );
244
+ }, S.jsxs = function(e, t, a) {
245
+ var f = 1e4 > Y.recentlyCreatedOwnerStacks++;
246
+ return x(
247
+ e,
248
+ t,
249
+ a,
250
+ !0,
251
+ f ? Error("react-stack-top-frame") : J,
252
+ f ? D(n(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 = le() : C.exports = ie()), C.exports;
260
+ }
261
+ var r = ce();
262
+ const R = ({
263
+ direction: i = "row",
264
+ align: c = "center",
265
+ justify: p = "center",
266
+ wrapContent: n = !1,
267
+ cls: o = "",
268
+ gap: u = 8,
269
+ margin: s = [0],
270
+ padding: k = [0],
271
+ parent: v = "div",
272
+ mask: j = !1,
273
+ // TODO loader
274
+ children: x,
275
+ ...b
276
+ }) => {
277
+ const l = v, d = s?.map((E) => E + "px").join(" "), g = k?.map((E) => E + "px").join(" ");
278
+ return /* @__PURE__ */ r.jsx(
279
+ l,
280
+ {
281
+ className: [
282
+ "kit-box",
283
+ `kit-box--${i}`,
284
+ `kit-box--align-${c}`,
285
+ `kit-box--justify-${p}`,
286
+ n && "kit-box--wrap",
287
+ o
288
+ ].join(" "),
289
+ style: { gap: `${u}px`, margin: `${d}`, padding: `${g}` },
290
+ ...b,
291
+ children: x
292
+ }
293
+ );
294
+ }, z = ({
295
+ type: i = "primary",
296
+ size: c = "medium",
297
+ corners: p = "standard",
298
+ disabled: n = !1,
299
+ staticIcon: o = !1,
300
+ cls: u = "",
301
+ text: s = "",
302
+ iconPath: k = "",
303
+ labelAlign: v = "",
304
+ onClick: j,
305
+ ...x
306
+ }) => {
307
+ const b = k != "" && s === "" ? "kit-btn--icon" : "";
308
+ let l;
309
+ const d = () => k ? /* @__PURE__ */ r.jsx(
310
+ "div",
311
+ {
312
+ className: "kit-btn--svg",
313
+ style: {
314
+ maskImage: `url(assets/${k})`,
315
+ WebkitMaskImage: `url(assets/${k})`
316
+ }
317
+ }
318
+ ) : null;
319
+ switch (v) {
320
+ case "right":
321
+ l = () => /* @__PURE__ */ r.jsxs(R, { direction: "row", children: [
322
+ /* @__PURE__ */ r.jsx(d, {}),
323
+ s
324
+ ] });
325
+ break;
326
+ case "left":
327
+ l = () => /* @__PURE__ */ r.jsxs(R, { direction: "row", children: [
328
+ s,
329
+ /* @__PURE__ */ r.jsx(d, {})
330
+ ] });
331
+ break;
332
+ case "top":
333
+ l = () => /* @__PURE__ */ r.jsxs(R, { direction: "column", children: [
334
+ s,
335
+ /* @__PURE__ */ r.jsx(d, {})
336
+ ] });
337
+ break;
338
+ case "bottom":
339
+ l = () => /* @__PURE__ */ r.jsxs(R, { direction: "column", children: [
340
+ /* @__PURE__ */ r.jsx(d, {}),
341
+ s
342
+ ] });
343
+ break;
344
+ default:
345
+ l = () => /* @__PURE__ */ r.jsx(R, { direction: "row", children: b ? /* @__PURE__ */ r.jsx(d, {}) : s });
346
+ break;
347
+ }
348
+ return /* @__PURE__ */ r.jsx(
349
+ "button",
350
+ {
351
+ type: "button",
352
+ onClick: n || !j ? null : j,
353
+ className: [
354
+ "kit-btn",
355
+ `kit-btn--${c}`,
356
+ `kit-btn--${p}`,
357
+ `kit-btn--${i}`,
358
+ n ? "kit-btn--disabled" : "",
359
+ o ? "kit-icon" : "",
360
+ b,
361
+ u
362
+ ].join(" "),
363
+ ...x,
364
+ children: /* @__PURE__ */ r.jsx(l, {})
365
+ }
366
+ );
367
+ }, fe = ({
368
+ width: i = "auto",
369
+ corners: c = "standard",
370
+ background: p = "blackout",
371
+ isOpen: n = !1,
372
+ closeButton: o = !0,
373
+ title: u = "",
374
+ cls: s = "",
375
+ children: k,
376
+ onClose: v,
377
+ ...j
378
+ }) => {
379
+ const x = se(null), [b, l] = W(n);
380
+ function d() {
381
+ l(!1), v && v();
382
+ }
383
+ return H(() => {
384
+ l(n);
385
+ }, [n]), H(() => {
386
+ if (!b) return;
387
+ function g(h) {
388
+ h.key === "Escape" && d();
389
+ }
390
+ document.addEventListener("keydown", g);
391
+ const E = document.body.style.overflow;
392
+ return document.body.style.overflow = "hidden", () => {
393
+ document.body.style.overflow = E, document.removeEventListener("keydown", g);
394
+ };
395
+ }, [b, d]), /* @__PURE__ */ r.jsx(r.Fragment, { children: b ? /* @__PURE__ */ r.jsx(
396
+ "div",
397
+ {
398
+ className: "kit-modal--overlay",
399
+ onClick: (g) => {
400
+ g.target === x.current && d();
401
+ },
402
+ ref: x,
403
+ children: /* @__PURE__ */ r.jsx(
404
+ "div",
405
+ {
406
+ className: [
407
+ "kit-modal",
408
+ `kit-modal--${c}`,
409
+ `kit-modal--bg-${p}`,
410
+ s
411
+ ].join(" "),
412
+ style: { width: isNaN(i) ? "fit-content" : `${i}px` },
413
+ ...j,
414
+ children: /* @__PURE__ */ r.jsxs(R, { padding: [8, 16], direction: "column", children: [
415
+ /* @__PURE__ */ r.jsx(R, { justify: "end", margin: [0, -16], children: /* @__PURE__ */ r.jsx(
416
+ z,
417
+ {
418
+ type: "transparent",
419
+ size: "large",
420
+ onClick: d,
421
+ iconPath: "svg-lib/cross-svgrepo-com.svg",
422
+ cls: "kit-modal-close"
423
+ }
424
+ ) }),
425
+ /* @__PURE__ */ r.jsx(R, { justify: "start", children: k })
426
+ ] })
427
+ }
428
+ )
429
+ }
430
+ ) : /* @__PURE__ */ r.jsx(r.Fragment, {}) });
431
+ }, me = ({
432
+ value: i = "",
433
+ type: c = "text",
434
+ corners: p = "standard",
435
+ disabled: n = !1,
436
+ label: o = "",
437
+ bottomText: u = "",
438
+ placeholder: s = "",
439
+ errorText: k = "",
440
+ live: v = !1,
441
+ isSearch: j = !1,
442
+ mask: x,
443
+ width: b,
444
+ onChange: l,
445
+ cls: d,
446
+ ...g
447
+ }) => {
448
+ const [E, h] = W(i), [y, A] = W(""), w = ee(), I = (O) => {
449
+ let _ = O.target.value;
450
+ c === "number" && (_ = _.toString().replace(/\D/g, "")), x && !x.test(_.toString()) ? A(k || "Некорректное значение") : A(""), h(_), v && l && l(_);
451
+ }, F = () => {
452
+ h("");
453
+ }, P = {
454
+ value: E,
455
+ placeholder: s,
456
+ onChange: I,
457
+ onBlur: (O) => {
458
+ !v && l && l(E);
459
+ },
460
+ className: [
461
+ "kit-input",
462
+ `kit-input--${p}`,
463
+ n ? "kit-input--disabled" : "",
464
+ y ? "kit-input--error" : "",
465
+ d
466
+ ].join(" ").trim()
467
+ };
468
+ return /* @__PURE__ */ r.jsxs("div", { className: "kit-input--wrapper", children: [
469
+ o && /* @__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: o
475
+ }
476
+ ) }),
477
+ /* @__PURE__ */ r.jsxs(
478
+ "div",
479
+ {
480
+ className: "kit-input--container",
481
+ style: { width: b ? `${b}px` : "auto" },
482
+ children: [
483
+ c === "textarea" ? /* @__PURE__ */ r.jsx(
484
+ "textarea",
485
+ {
486
+ id: w,
487
+ ...P
488
+ }
489
+ ) : /* @__PURE__ */ r.jsx(
490
+ "input",
491
+ {
492
+ ...P,
493
+ type: c,
494
+ id: w
495
+ }
496
+ ),
497
+ /* @__PURE__ */ r.jsxs("div", { className: "kit-input--icon-container", children: [
498
+ E && /* @__PURE__ */ r.jsx(
499
+ z,
500
+ {
501
+ type: "transparent",
502
+ iconPath: "svg-lib/input-svgrepo-com.svg",
503
+ size: "small",
504
+ onClick: F,
505
+ cls: "kit-input--icon"
506
+ }
507
+ ),
508
+ j && /* @__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: () => l && l(E),
516
+ cls: "kit-input--icon"
517
+ }
518
+ )
519
+ ] })
520
+ ]
521
+ }
522
+ ),
523
+ !y && u && /* @__PURE__ */ r.jsx("div", { className: "kit-input-bottomtext kit-input-secondary-text", children: u }),
524
+ y && /* @__PURE__ */ r.jsx("div", { className: "kit-input-errortext kit-input-secondary-text", children: y })
525
+ ] });
526
+ }, pe = ({
527
+ size: i = "medium",
528
+ disabled: c = !1,
529
+ cls: p = "",
530
+ text: n = "",
531
+ onClick: o,
532
+ ...u
533
+ }) => {
534
+ const s = ee();
535
+ return /* @__PURE__ */ r.jsxs(
536
+ "label",
537
+ {
538
+ htmlFor: s,
539
+ className: [
540
+ "kit-toggle",
541
+ c ? "kit-toggle--disabled" : "",
542
+ `kit-toggle--${i}`,
543
+ p
544
+ ].join(" "),
545
+ children: [
546
+ /* @__PURE__ */ r.jsx(
547
+ "input",
548
+ {
549
+ id: s,
550
+ type: "checkbox",
551
+ className: "kit-toggle--input",
552
+ disabled: c,
553
+ defaultChecked: !1,
554
+ onChange: (k) => o?.(k.target.checked)
555
+ }
556
+ ),
557
+ /* @__PURE__ */ r.jsx("span", { className: "kit-toggle--slider", "aria-hidden": "true" }),
558
+ n && /* @__PURE__ */ r.jsx("span", { className: "kit-toggle--label", children: n })
559
+ ]
560
+ }
561
+ );
562
+ }, ue = {
563
+ "--primary-btn-color": "#7C3AED",
564
+ "--secondary-btn-color": "#FFFFFF",
565
+ "--hover-btn-color": "#6D28D9",
566
+ "--bg-color": "#fff",
567
+ "--corners-standard": "0.65em",
568
+ "--corners-round": "3em",
569
+ "--corners-square": "0"
570
+ };
571
+ function ke(i = {}, c = document.documentElement) {
572
+ const p = { ...ue, ...i };
573
+ for (const n in p)
574
+ c.style.setProperty(n, p[n]);
575
+ }
576
+ export {
577
+ R as Box,
578
+ z as Button,
579
+ me as Input,
580
+ fe as Modal,
581
+ pe as Toggle,
582
+ ke as applyTheme
583
+ };