@konstructio/ui 0.0.12-alpha.1 → 0.0.12

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 (257) hide show
  1. package/dist/{index-BVppSRDQ.js → AlertDialogTrigger-D4Tm_9M0.js} +21 -19
  2. package/dist/{Combination-BQYb0Gw7.js → Combination-Cmu9JRkv.js} +72 -72
  3. package/dist/{Modal-W2GbkC_F.js → Modal-L73dmnHv.js} +246 -238
  4. package/dist/{chevron-up-DgLBQCKD.js → chevron-up-CvquEaNg.js} +1 -1
  5. package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
  6. package/dist/components/AlertDialog/AlertDialog.js +23 -20
  7. package/dist/components/AlertDialog/AlertDialog.types.d.ts +18 -0
  8. package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
  9. package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
  10. package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
  11. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +6 -3
  12. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +6 -0
  13. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +1 -0
  14. package/dist/components/AlertDialog/components/index.d.ts +1 -0
  15. package/dist/components/AlertDialog/components/index.js +1 -1
  16. package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
  17. package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
  18. package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
  19. package/dist/components/Autocomplete/Autocomplete.js +17 -15
  20. package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
  21. package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
  22. package/dist/components/Autocomplete/Autocomplete.variants.d.ts +8 -0
  23. package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
  24. package/dist/components/Autocomplete/components/List/List.js +7 -7
  25. package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
  26. package/dist/components/Autocomplete/components/List/List.types.js +1 -0
  27. package/dist/components/Autocomplete/components/List/List.variants.d.ts +16 -0
  28. package/dist/components/Autocomplete/components/index.d.ts +1 -0
  29. package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
  30. package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
  31. package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
  32. package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
  33. package/dist/components/Breadcrumb/Breadcrumb.js +69 -68
  34. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +11 -0
  35. package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
  36. package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +12 -0
  37. package/dist/components/Breadcrumb/Breadcrumb.variants.js +17 -16
  38. package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
  39. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +3 -2
  40. package/dist/components/Button/Button.d.ts +4 -0
  41. package/dist/components/Button/Button.js +16 -14
  42. package/dist/components/Button/Button.types.d.ts +7 -0
  43. package/dist/components/Button/Button.types.js +1 -0
  44. package/dist/components/Button/Button.variants.d.ts +7 -0
  45. package/dist/components/Card/Card.d.ts +4 -0
  46. package/dist/components/Card/Card.js +12 -10
  47. package/dist/components/Card/Card.types.d.ts +8 -0
  48. package/dist/components/Card/Card.types.js +1 -0
  49. package/dist/components/Card/Card.variants.d.ts +10 -0
  50. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  51. package/dist/components/Checkbox/Checkbox.js +15 -13
  52. package/dist/components/Checkbox/Checkbox.types.d.ts +14 -0
  53. package/dist/components/Checkbox/Checkbox.types.js +1 -0
  54. package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
  55. package/dist/components/Dropdown/Dropdown.d.ts +3 -0
  56. package/dist/components/Dropdown/Dropdown.js +6 -4
  57. package/dist/components/Dropdown/Dropdown.types.d.ts +16 -0
  58. package/dist/components/Dropdown/Dropdown.types.js +1 -0
  59. package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
  60. package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
  61. package/dist/components/Dropdown/components/List/List.d.ts +3 -0
  62. package/dist/components/Dropdown/components/List/List.js +10 -9
  63. package/dist/components/Dropdown/components/List/List.types.d.ts +6 -0
  64. package/dist/components/Dropdown/components/List/List.types.js +1 -0
  65. package/dist/components/Dropdown/components/List/List.variants.d.ts +3 -0
  66. package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
  67. package/dist/components/Dropdown/components/ListItem/ListItem.js +21 -20
  68. package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +4 -0
  69. package/dist/components/Dropdown/components/ListItem/ListItem.types.js +1 -0
  70. package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +3 -0
  71. package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
  72. package/dist/components/Dropdown/components/Wrapper.js +34 -31
  73. package/dist/components/Dropdown/components/index.d.ts +3 -0
  74. package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
  75. package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
  76. package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +5 -0
  77. package/dist/components/Dropdown/contexts/dropdown.provider.js +4 -4
  78. package/dist/components/Dropdown/contexts/index.d.ts +2 -0
  79. package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
  80. package/dist/components/Dropdown/hooks/useDropdown.js +14 -12
  81. package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
  82. package/dist/components/Dropdown/hooks/useNavigationList.js +10 -8
  83. package/dist/components/Input/Input.d.ts +3 -0
  84. package/dist/components/Input/Input.js +14 -12
  85. package/dist/components/Input/Input.types.d.ts +9 -0
  86. package/dist/components/Input/Input.types.js +1 -0
  87. package/dist/components/Input/Input.variants.d.ts +4 -0
  88. package/dist/components/Modal/Modal.d.ts +8 -0
  89. package/dist/components/Modal/Modal.js +3 -3
  90. package/dist/components/Modal/Modal.types.d.ts +12 -0
  91. package/dist/components/Modal/Modal.types.js +1 -0
  92. package/dist/components/Modal/components/Body/Body.d.ts +3 -0
  93. package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
  94. package/dist/components/Modal/components/Body/Body.types.js +1 -0
  95. package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
  96. package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
  97. package/dist/components/Modal/components/Footer/Footer.types.js +1 -0
  98. package/dist/components/Modal/components/Header/Header.d.ts +3 -0
  99. package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
  100. package/dist/components/Modal/components/Header/Header.types.js +1 -0
  101. package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
  102. package/dist/components/Modal/components/Wrapper/Wrapper.js +9 -7
  103. package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +7 -0
  104. package/dist/components/Modal/components/Wrapper/Wrapper.types.js +1 -0
  105. package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +6 -0
  106. package/dist/components/Modal/components/index.d.ts +4 -0
  107. package/dist/components/Modal/components/index.js +1 -1
  108. package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
  109. package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
  110. package/dist/components/Modal/contexts/Modal.provider.js +4 -4
  111. package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
  112. package/dist/components/Modal/contexts/Modal.types.js +1 -0
  113. package/dist/components/Modal/contexts/index.d.ts +1 -0
  114. package/dist/components/Modal/hooks/index.d.ts +1 -0
  115. package/dist/components/Modal/hooks/useModal.d.ts +9 -0
  116. package/dist/components/NumberInput/NumberInput.d.ts +3 -0
  117. package/dist/components/NumberInput/NumberInput.js +11 -9
  118. package/dist/components/NumberInput/NumberInput.types.d.ts +11 -0
  119. package/dist/components/NumberInput/NumberInput.types.js +1 -0
  120. package/dist/components/NumberInput/NumberInput.variants.d.ts +11 -0
  121. package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
  122. package/dist/components/ProgressBar/ProgressBar.js +16 -13
  123. package/dist/components/ProgressBar/ProgressBar.types.d.ts +8 -0
  124. package/dist/components/ProgressBar/ProgressBar.types.js +1 -0
  125. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +7 -0
  126. package/dist/components/Radio/Radio.d.ts +3 -0
  127. package/dist/components/Radio/Radio.js +37 -55
  128. package/dist/components/Radio/Radio.types.d.ts +12 -0
  129. package/dist/components/Radio/Radio.types.js +1 -0
  130. package/dist/components/Radio/Radio.variants.d.ts +3 -0
  131. package/dist/components/Radio/Radio.variants.js +16 -69
  132. package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
  133. package/dist/components/RadioGroup/RadioGroup.js +27 -37
  134. package/dist/components/RadioGroup/RadioGroup.types.d.ts +12 -0
  135. package/dist/components/RadioGroup/RadioGroup.types.js +1 -0
  136. package/dist/components/Range/Range.d.ts +3 -0
  137. package/dist/components/Range/Range.js +22 -20
  138. package/dist/components/Range/Range.types.d.ts +13 -0
  139. package/dist/components/Range/Range.types.js +1 -0
  140. package/dist/components/Range/Range.variants.d.ts +14 -0
  141. package/dist/components/Sidebar/Sidebar.d.ts +5 -0
  142. package/dist/components/Sidebar/Sidebar.js +22 -20
  143. package/dist/components/Sidebar/Sidebar.types.d.ts +18 -0
  144. package/dist/components/Sidebar/Sidebar.types.js +1 -0
  145. package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
  146. package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
  147. package/dist/components/Sidebar/components/Footer/Footer.js +12 -9
  148. package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
  149. package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
  150. package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
  151. package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
  152. package/dist/components/Sidebar/components/Logo/Logo.js +12 -9
  153. package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
  154. package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
  155. package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
  156. package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
  157. package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -12
  158. package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
  159. package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
  160. package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
  161. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
  162. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +26 -24
  163. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
  164. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
  165. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
  166. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
  167. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +20 -17
  168. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
  169. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
  170. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +4 -0
  171. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
  172. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +11 -8
  173. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
  174. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
  175. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
  176. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
  177. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +13 -10
  178. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
  179. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
  180. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
  181. package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
  182. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +27 -29
  183. package/dist/components/Sidebar/components/index.d.ts +15 -0
  184. package/dist/components/Slider/Slider.d.ts +3 -0
  185. package/dist/components/Slider/Slider.js +20 -18
  186. package/dist/components/Slider/Slider.types.d.ts +13 -0
  187. package/dist/components/Slider/Slider.types.js +1 -0
  188. package/dist/components/Slider/Slider.variants.d.ts +11 -0
  189. package/dist/components/Switch/Switch.d.ts +3 -0
  190. package/dist/components/Switch/Switch.js +21 -19
  191. package/dist/components/Switch/Switch.types.d.ts +10 -0
  192. package/dist/components/Switch/Switch.types.js +1 -0
  193. package/dist/components/Switch/Switch.variants.d.ts +6 -0
  194. package/dist/components/Tag/Tag.d.ts +3 -0
  195. package/dist/components/Tag/Tag.types.d.ts +4 -0
  196. package/dist/components/Tag/Tag.types.js +1 -0
  197. package/dist/components/Tag/Tag.variants.d.ts +3 -0
  198. package/dist/components/TagSelect/TagSelect.d.ts +3 -0
  199. package/dist/components/TagSelect/TagSelect.js +21 -19
  200. package/dist/components/TagSelect/TagSelect.types.d.ts +9 -0
  201. package/dist/components/TagSelect/TagSelect.types.js +1 -0
  202. package/dist/components/TagSelect/TagSelect.variants.d.ts +9 -0
  203. package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
  204. package/dist/components/TextArea/TextArea.d.ts +3 -0
  205. package/dist/components/TextArea/TextArea.js +19 -17
  206. package/dist/components/TextArea/TextArea.types.d.ts +10 -0
  207. package/dist/components/TextArea/TextArea.types.js +1 -0
  208. package/dist/components/TextArea/TextArea.variants.d.ts +3 -0
  209. package/dist/components/Toast/Toast.d.ts +3 -0
  210. package/dist/components/Toast/Toast.js +54 -52
  211. package/dist/components/Toast/Toast.types.d.ts +12 -0
  212. package/dist/components/Toast/Toast.types.js +1 -0
  213. package/dist/components/Toast/Toast.variants.d.ts +9 -0
  214. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  215. package/dist/components/Tooltip/Tooltip.js +12 -10
  216. package/dist/components/Tooltip/Tooltip.types.d.ts +8 -0
  217. package/dist/components/Tooltip/Tooltip.types.js +1 -0
  218. package/dist/components/Tooltip/Tooltip.variants.d.ts +8 -0
  219. package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
  220. package/dist/components/index.d.ts +21 -0
  221. package/dist/components/index.js +44 -50
  222. package/dist/contexts/index.d.ts +3 -0
  223. package/dist/contexts/theme.context.d.ts +6 -0
  224. package/dist/contexts/theme.hook.d.ts +7 -0
  225. package/dist/contexts/theme.provider.d.ts +6 -0
  226. package/dist/contexts/theme.provider.js +14 -84
  227. package/dist/hooks/index.d.ts +1 -0
  228. package/dist/hooks/useToggle.d.ts +1 -0
  229. package/dist/{index-1GLoikpT.js → index-BaNV0qac.js} +6585 -6555
  230. package/dist/{index-CoqDsznq.js → index-BedjZUuB.js} +1 -1
  231. package/dist/{index-KEdwcThH.js → index-BtibbG81.js} +1 -1
  232. package/dist/{index-C5psggHV.js → index-D68N8v8R.js} +17 -17
  233. package/dist/{index-CJsYodgi.js → index-z-AJyzdv.js} +10 -10
  234. package/dist/index.d.ts +4 -522
  235. package/dist/index.js +53 -59
  236. package/dist/js.cookie-OLEfuq_g.js +74 -0
  237. package/dist/package.json +1 -1
  238. package/dist/plugins/index.d.ts +1 -0
  239. package/dist/plugins/konstruct.d.ts +4 -0
  240. package/dist/plugins/konstruct.js +3 -3
  241. package/dist/plugins/utils/colors.d.ts +328 -0
  242. package/dist/styles.css +1 -1
  243. package/dist/styles.d.ts +0 -0
  244. package/dist/styles.js +1 -1
  245. package/dist/useBreadcrumb-DxYsZvj_.js +1398 -0
  246. package/dist/utils/index.d.ts +4 -0
  247. package/dist/{x-DU-Zw-L_.js → x-CRBgmX1Q.js} +1 -1
  248. package/package.json +1 -1
  249. package/dist/components/Breadcrumb/components/Item/Item.js +0 -61
  250. package/dist/components/Breadcrumb/components/Item/Item.variants.js +0 -90
  251. package/dist/components/Breadcrumb/components/index.js +0 -4
  252. package/dist/components/RadioCard/RadioCard.js +0 -41
  253. package/dist/components/RadioCard/RadioCard.variants.js +0 -19
  254. package/dist/components/RadioCardGroup/RadioCardGroup.js +0 -47
  255. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +0 -21
  256. package/dist/components/RadioGroup/RadioGroup.variants.js +0 -21
  257. package/dist/useBreadcrumb-CojbXFVD.js +0 -1279
@@ -1,65 +1,68 @@
1
- import { jsxs as f, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as F, useId as L, useRef as N, useImperativeHandle as $, useEffect as m } from "react";
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as F, useId as L, useRef as N, useImperativeHandle as $, useEffect as f } from "react";
3
3
  import { cn as R } from "../../../utils/index.js";
4
- import { dropdownVariants as A } from "../Dropdown.variants.js";
5
- import { useDropdown as H } from "../hooks/useDropdown.js";
6
- import { List as U } from "./List/List.js";
7
- import { C as W } from "../../../chevron-up-DgLBQCKD.js";
8
- import { useDropdownContext as q } from "../contexts/dropdown.hook.js";
9
- import { useTheme as z } from "../../../contexts/theme.hook.js";
10
- const X = F(
4
+ import "../../../contexts/theme.context.js";
5
+ import { useTheme as A } from "../../../contexts/theme.hook.js";
6
+ import "../../../js.cookie-OLEfuq_g.js";
7
+ import { dropdownVariants as H } from "../Dropdown.variants.js";
8
+ import { useDropdown as U } from "../hooks/useDropdown.js";
9
+ import { useDropdownContext as W } from "../contexts/dropdown.hook.js";
10
+ import "../contexts/dropdown.context.js";
11
+ import { List as q } from "./List/List.js";
12
+ import { C as z } from "../../../chevron-up-CvquEaNg.js";
13
+ const _ = F(
11
14
  ({ theme: g, label: p, placeholder: O, name: o, options: a, defaultValue: c }, j) => {
12
- const d = L(), r = N(null), u = N(null), { wrapperRef: n, wrapperInputRef: h, handleOpen: y, handleOpenIfClosed: E } = H({ ulRef: u }), { isOpen: x, value: e, setValue: w, toggleOpen: b } = q(), { theme: T } = z(), v = g ?? T, s = o ? `${d}-${o}` : d;
13
- $(j, () => r.current, [r]), m(() => {
15
+ const d = L(), r = N(null), u = N(null), { wrapperRef: n, wrapperInputRef: h, handleOpen: y, handleOpenIfClosed: E } = U({ ulRef: u }), { isOpen: x, value: e, setValue: w, toggleOpen: b } = W(), { theme: T } = A(), v = g ?? T, i = o ? `${d}-${o}` : d;
16
+ $(j, () => r.current, [r]), f(() => {
14
17
  r.current && (r.current.value = e ? e.value : "");
15
- }, [e]), m(() => {
18
+ }, [e]), f(() => {
16
19
  if (c) {
17
- const l = a.find(
18
- (i) => i.value === c
20
+ const s = a.find(
21
+ (l) => l.value === c
19
22
  );
20
- l && w(l);
23
+ s && w(s);
21
24
  }
22
- }, [c, a, w]), m(() => {
23
- var i;
24
- const l = new AbortController();
25
- return (i = n.current) == null || i.addEventListener("focusout", (D) => {
25
+ }, [c, a, w]), f(() => {
26
+ var l;
27
+ const s = new AbortController();
28
+ return (l = n.current) == null || l.addEventListener("focusout", (D) => {
26
29
  var I;
27
30
  const C = D.relatedTarget;
28
31
  (!C || !((I = n.current) != null && I.contains(C))) && b(!1);
29
32
  }), () => {
30
- l.abort();
33
+ s.abort();
31
34
  };
32
35
  }, [b, n]);
33
36
  const k = () => e != null && e.leftIcon ? /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null;
34
- return /* @__PURE__ */ f("div", { ref: n, className: "flex flex-col w-full relative", children: [
37
+ return /* @__PURE__ */ m("div", { ref: n, className: "flex flex-col w-full relative", children: [
35
38
  p ? /* @__PURE__ */ t(
36
39
  "label",
37
40
  {
38
- id: s,
41
+ id: i,
39
42
  className: "m-2 cursor-pointer",
40
- htmlFor: s,
43
+ htmlFor: i,
41
44
  onClick: E,
42
45
  children: p
43
46
  }
44
47
  ) : null,
45
- /* @__PURE__ */ f(
48
+ /* @__PURE__ */ m(
46
49
  "div",
47
50
  {
48
51
  ref: h,
49
- id: s,
50
- className: R(A({ theme: v })),
52
+ id: i,
53
+ className: R(H({ theme: v })),
51
54
  role: "combobox",
52
55
  onClick: y,
53
56
  "aria-expanded": x,
54
57
  tabIndex: 0,
55
- "aria-labelledby": s,
58
+ "aria-labelledby": i,
56
59
  children: [
57
- /* @__PURE__ */ t("span", { className: "text-base text-inherit", children: e ? /* @__PURE__ */ f("span", { className: "flex gap-3 items-center", children: [
60
+ /* @__PURE__ */ t("span", { className: "text-base text-inherit", children: e ? /* @__PURE__ */ m("span", { className: "flex gap-3 items-center", children: [
58
61
  k(),
59
62
  e.label
60
63
  ] }) : O }),
61
64
  /* @__PURE__ */ t(
62
- W,
65
+ z,
63
66
  {
64
67
  className: R(
65
68
  "w-4 h-4 text-inherit transition-all duration-50",
@@ -81,7 +84,7 @@ const X = F(
81
84
  }
82
85
  ),
83
86
  /* @__PURE__ */ t(
84
- U,
87
+ q,
85
88
  {
86
89
  ref: u,
87
90
  name: o,
@@ -95,5 +98,5 @@ const X = F(
95
98
  }
96
99
  );
97
100
  export {
98
- X as Wrapper
101
+ _ as Wrapper
99
102
  };
@@ -0,0 +1,3 @@
1
+ export * from './EmptyList';
2
+ export * from './List/List';
3
+ export * from './Wrapper';
@@ -0,0 +1,8 @@
1
+ import { Option } from '../Dropdown.types';
2
+ export type DropdownContextType = {
3
+ value: Option | null;
4
+ isOpen: boolean;
5
+ setValue: (value: Option) => void;
6
+ toggleOpen: (value?: boolean) => void;
7
+ };
8
+ export declare const DropdownContext: import('react').Context<DropdownContextType>;
@@ -0,0 +1,2 @@
1
+ import { DropdownContextType } from './dropdown.context';
2
+ export declare const useDropdownContext: () => DropdownContextType;
@@ -0,0 +1,5 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { DropdownProps } from '../Dropdown.types';
3
+ export declare const DropdownProvider: FC<PropsWithChildren & {
4
+ onChange?: DropdownProps['onChange'];
5
+ }>;
@@ -1,16 +1,16 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import { useState as i, useCallback as c } from "react";
3
- import { DropdownContext as d } from "./dropdown.context.js";
4
- import { useToggle as f } from "../../../hooks/useToggle.js";
3
+ import { useToggle as d } from "../../../hooks/useToggle.js";
4
+ import { DropdownContext as f } from "./dropdown.context.js";
5
5
  const w = ({ children: t, onChange: o }) => {
6
- const [e, s] = f(!1), [l, p] = i(null), m = c(
6
+ const [e, s] = d(!1), [l, p] = i(null), m = c(
7
7
  (r) => {
8
8
  o == null || o(r), p(r);
9
9
  },
10
10
  [o]
11
11
  );
12
12
  return /* @__PURE__ */ u(
13
- d.Provider,
13
+ f.Provider,
14
14
  {
15
15
  value: { value: l, isOpen: e, setValue: m, toggleOpen: s },
16
16
  children: t
@@ -0,0 +1,2 @@
1
+ export * from './dropdown.hook';
2
+ export * from './dropdown.provider';
@@ -0,0 +1,11 @@
1
+ import { ComponentRef, RefObject } from 'react';
2
+ type UseDropDownParams = {
3
+ ulRef: RefObject<ComponentRef<'ul'> | null>;
4
+ };
5
+ export declare const useDropdown: ({ ulRef }: UseDropDownParams) => {
6
+ wrapperRef: RefObject<HTMLDivElement | null>;
7
+ wrapperInputRef: RefObject<HTMLDivElement | null>;
8
+ handleOpen: () => void;
9
+ handleOpenIfClosed: () => void;
10
+ };
11
+ export {};
@@ -1,18 +1,20 @@
1
1
  import { useRef as u, useEffect as f, useCallback as p } from "react";
2
- import { useDropdownContext as m } from "../contexts/dropdown.hook.js";
3
- const E = ({ ulRef: i }) => {
4
- const l = u(null), o = u(null), { isOpen: c, toggleOpen: e } = m();
2
+ import { useDropdownContext as w } from "../contexts/dropdown.hook.js";
3
+ import "react/jsx-runtime";
4
+ import "../contexts/dropdown.context.js";
5
+ const k = ({ ulRef: a }) => {
6
+ const l = u(null), o = u(null), { isOpen: c, toggleOpen: e } = w();
5
7
  f(() => {
6
8
  var r;
7
9
  const n = new AbortController(), s = (t) => {
8
10
  t.key === "Escape" && e(!1);
9
- }, a = (t) => {
11
+ }, i = (t) => {
10
12
  var d;
11
13
  (d = l.current) != null && d.contains(t.target) || e(!1);
12
14
  };
13
15
  return document.addEventListener("keydown", s, {
14
16
  signal: n.signal
15
- }), document.addEventListener("mousedown", a, {
17
+ }), document.addEventListener("mousedown", i, {
16
18
  signal: n.signal
17
19
  }), document.addEventListener(
18
20
  "visibilitychange",
@@ -36,10 +38,10 @@ const E = ({ ulRef: i }) => {
36
38
  const n = new AbortController();
37
39
  return (s = o.current) == null || s.addEventListener(
38
40
  "keydown",
39
- (a) => {
41
+ (i) => {
40
42
  var r;
41
- if (a.key === "ArrowDown") {
42
- const t = (r = i.current) == null ? void 0 : r.querySelector("li");
43
+ if (i.key === "ArrowDown") {
44
+ const t = (r = a.current) == null ? void 0 : r.querySelector("li");
43
45
  t && t.focus();
44
46
  }
45
47
  },
@@ -47,17 +49,17 @@ const E = ({ ulRef: i }) => {
47
49
  ), () => {
48
50
  n.abort();
49
51
  };
50
- }, [o, i]);
51
- const g = p(() => e(!0), [e]), w = p(() => {
52
+ }, [o, a]);
53
+ const g = p(() => e(!0), [e]), m = p(() => {
52
54
  c || e(!1);
53
55
  }, [c, e]);
54
56
  return {
55
57
  wrapperRef: l,
56
58
  wrapperInputRef: o,
57
59
  handleOpen: g,
58
- handleOpenIfClosed: w
60
+ handleOpenIfClosed: m
59
61
  };
60
62
  };
61
63
  export {
62
- E as useDropdown
64
+ k as useDropdown
63
65
  };
@@ -0,0 +1,8 @@
1
+ import { ComponentRef, RefObject } from 'react';
2
+ type UseNavigationListProps = {
3
+ ulRef: RefObject<ComponentRef<'ul'> | null>;
4
+ wrapperRef: RefObject<ComponentRef<'div'> | null>;
5
+ wrapperInputRef: RefObject<ComponentRef<'div'> | null>;
6
+ };
7
+ export declare const useNavigationUlList: ({ ulRef, wrapperRef, wrapperInputRef, }: UseNavigationListProps) => void;
8
+ export {};
@@ -1,23 +1,25 @@
1
- import { useRef as m, useEffect as a } from "react";
1
+ import { useRef as k, useEffect as a } from "react";
2
2
  import { useDropdownContext as d } from "../contexts/dropdown.hook.js";
3
- const w = ({
3
+ import "react/jsx-runtime";
4
+ import "../contexts/dropdown.context.js";
5
+ const h = ({
4
6
  ulRef: n,
5
7
  wrapperRef: f,
6
8
  wrapperInputRef: u
7
9
  }) => {
8
- const r = m(0), { isOpen: b } = d();
10
+ const r = k(0), { isOpen: b } = d();
9
11
  a(() => {
10
- var s, g;
12
+ var s, m;
11
13
  const e = ((s = n.current) == null ? void 0 : s.querySelectorAll("li")) ?? [], c = new AbortController(), i = () => {
12
14
  r.current < e.length - 1 ? (r.current = r.current + 1, e[r.current].focus()) : (r.current = 0, e[0].focus());
13
15
  }, o = () => {
14
16
  var t;
15
17
  r.current > 0 ? (r.current = r.current - 1, e[r.current].focus()) : (r.current = 0, (t = u.current) == null || t.focus());
16
18
  };
17
- return (g = n.current) == null || g.addEventListener(
19
+ return (m = n.current) == null || m.addEventListener(
18
20
  "keydown",
19
21
  (t) => {
20
- var k;
22
+ var g;
21
23
  switch (t.preventDefault(), t.key) {
22
24
  case "ArrowDown": {
23
25
  i();
@@ -28,7 +30,7 @@ const w = ({
28
30
  break;
29
31
  }
30
32
  case "ArrowUp": {
31
- r.current === 0 ? (k = u.current) == null || k.focus() : o();
33
+ r.current === 0 ? (g = u.current) == null || g.focus() : o();
32
34
  break;
33
35
  }
34
36
  case "Enter": {
@@ -60,5 +62,5 @@ const w = ({
60
62
  }, [b]);
61
63
  };
62
64
  export {
63
- w as useNavigationUlList
65
+ h as useNavigationUlList
64
66
  };
@@ -0,0 +1,3 @@
1
+ import { InputProps } from './Input.types';
2
+ declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
3
+ export { Input };
@@ -1,9 +1,11 @@
1
1
  import { jsxs as y, jsx as a } from "react/jsx-runtime";
2
- import s, { forwardRef as u, useId as b } from "react";
2
+ import s, { forwardRef as m, useId as b } from "react";
3
3
  import { cn as w } from "../../utils/index.js";
4
- import { inputVariants as j } from "./Input.variants.js";
5
- import { P as l } from "../../index-C5psggHV.js";
6
- import { useTheme as N } from "../../contexts/theme.hook.js";
4
+ import "../../contexts/theme.context.js";
5
+ import { useTheme as j } from "../../contexts/theme.hook.js";
6
+ import "../../js.cookie-OLEfuq_g.js";
7
+ import { inputVariants as N } from "./Input.variants.js";
8
+ import { P as l } from "../../index-D68N8v8R.js";
7
9
  function p() {
8
10
  return p = Object.assign || function(e) {
9
11
  for (var o = 1; o < arguments.length; o++) {
@@ -31,7 +33,7 @@ function k(e, o) {
31
33
  n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
32
34
  return r;
33
35
  }
34
- var m = u(function(e, o) {
36
+ var u = m(function(e, o) {
35
37
  var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, c = P(e, ["color", "size"]);
36
38
  return /* @__PURE__ */ s.createElement("svg", p({
37
39
  ref: o,
@@ -60,11 +62,11 @@ var m = u(function(e, o) {
60
62
  y2: "16"
61
63
  }));
62
64
  });
63
- m.propTypes = {
65
+ u.propTypes = {
64
66
  color: l.string,
65
67
  size: l.oneOfType([l.string, l.number])
66
68
  };
67
- m.displayName = "AlertCircle";
69
+ u.displayName = "AlertCircle";
68
70
  function f() {
69
71
  return f = Object.assign || function(e) {
70
72
  for (var o = 1; o < arguments.length; o++) {
@@ -92,7 +94,7 @@ function z(e, o) {
92
94
  n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
93
95
  return r;
94
96
  }
95
- var h = u(function(e, o) {
97
+ var h = m(function(e, o) {
96
98
  var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, c = E(e, ["color", "size"]);
97
99
  return /* @__PURE__ */ s.createElement("svg", f({
98
100
  ref: o,
@@ -119,7 +121,7 @@ h.propTypes = {
119
121
  size: l.oneOfType([l.string, l.number])
120
122
  };
121
123
  h.displayName = "EyeOff";
122
- const _ = u(
124
+ const _ = m(
123
125
  ({
124
126
  className: e,
125
127
  error: o,
@@ -131,7 +133,7 @@ const _ = u(
131
133
  onClickIcon: g,
132
134
  ...d
133
135
  }, x) => {
134
- const v = b(), { theme: O } = N();
136
+ const v = b(), { theme: O } = j();
135
137
  return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
136
138
  r ? /* @__PURE__ */ a(
137
139
  "label",
@@ -149,7 +151,7 @@ const _ = u(
149
151
  ref: x,
150
152
  name: n,
151
153
  type: i,
152
- className: j({
154
+ className: N({
153
155
  className: e,
154
156
  theme: c ?? O,
155
157
  variant: o ? "error" : "default"
@@ -157,7 +159,7 @@ const _ = u(
157
159
  ...d
158
160
  }
159
161
  ),
160
- o ? /* @__PURE__ */ a("i", { className: "absolute right-2 text-red-600 top-0 translate-y-[40%]", children: /* @__PURE__ */ a(m, { className: "w-5 h-5" }) }) : null,
162
+ o ? /* @__PURE__ */ a("i", { className: "absolute right-2 text-red-600 top-0 translate-y-[40%]", children: /* @__PURE__ */ a(u, { className: "w-5 h-5" }) }) : null,
161
163
  i === "password" ? /* @__PURE__ */ a("i", { className: "absolute right-2 text-slate-400 top-0 translate-y-[40%]", children: /* @__PURE__ */ a(
162
164
  h,
163
165
  {
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { InputHTMLAttributes } from 'react';
3
+ import { inputVariants } from './Input.variants';
4
+ export interface InputProps extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
5
+ label?: string;
6
+ labelClassName?: string;
7
+ error?: string;
8
+ onClickIcon?: () => void;
9
+ }
@@ -0,0 +1,4 @@
1
+ export declare const inputVariants: (props?: ({
2
+ variant?: "default" | "error" | null | undefined;
3
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { ModalChildProps, ModalProps } from './Modal.types';
3
+ declare const Modal: FC<ModalProps> & {
4
+ Header: FC<ModalChildProps>;
5
+ Body: FC<ModalChildProps>;
6
+ Footer: FC<ModalChildProps>;
7
+ };
8
+ export { Modal };
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
- import "../../index-1GLoikpT.js";
3
- import { M as d } from "../../Modal-W2GbkC_F.js";
4
- import "./components/Header/Header.js";
2
+ import "../../index-BaNV0qac.js";
5
3
  import "./components/Body/Body.js";
6
4
  import "./components/Footer/Footer.js";
5
+ import "./components/Header/Header.js";
6
+ import { M as d } from "../../Modal-L73dmnHv.js";
7
7
  import "./hooks/useModal.js";
8
8
  export {
9
9
  d as Modal
@@ -0,0 +1,12 @@
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { modalVariants } from './components/Wrapper/Wrapper.variants';
4
+ export interface ModalProps extends PropsWithChildren, VariantProps<typeof modalVariants> {
5
+ className?: string;
6
+ buttonCloseClassName?: string;
7
+ }
8
+ export type ModalChildProps = {
9
+ children: ReactNode;
10
+ className?: string;
11
+ asChild?: boolean;
12
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { BodyProps } from './Body.types';
3
+ export declare const Body: FC<BodyProps>;
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export type BodyProps = PropsWithChildren & {
3
+ asChild?: boolean;
4
+ className?: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { FooterProps } from './Footer.types';
3
+ export declare const Footer: FC<FooterProps>;
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export type FooterProps = PropsWithChildren & {
3
+ asChild?: boolean;
4
+ className?: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { HeaderProps } from './Header.types';
3
+ export declare const Header: FC<HeaderProps>;
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export type HeaderProps = PropsWithChildren & {
3
+ asChild?: boolean;
4
+ className?: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { WrapperProps } from './Wrapper.types';
3
+ export declare const Wrapper: FC<WrapperProps>;
@@ -1,13 +1,15 @@
1
1
  import "react/jsx-runtime";
2
- import "../../../../index-KEdwcThH.js";
2
+ import "../../../../index-BtibbG81.js";
3
3
  import "react";
4
- import { W as x } from "../../../../Modal-W2GbkC_F.js";
5
- import "../../../../Combination-BQYb0Gw7.js";
4
+ import { W as c } from "../../../../Modal-L73dmnHv.js";
5
+ import "../../../../Combination-Cmu9JRkv.js";
6
+ import "../../../../contexts/theme.context.js";
7
+ import "../../../../contexts/theme.hook.js";
8
+ import "../../../../js.cookie-OLEfuq_g.js";
6
9
  import "../../../../utils/index.js";
7
- import "./Wrapper.variants.js";
8
10
  import "../../hooks/useModal.js";
9
- import "../../../../x-DU-Zw-L_.js";
10
- import "../../../../contexts/theme.hook.js";
11
+ import "./Wrapper.variants.js";
12
+ import "../../../../x-CRBgmX1Q.js";
11
13
  export {
12
- x as Wrapper
14
+ c as Wrapper
13
15
  };
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { modalVariants } from './Wrapper.variants';
4
+ export interface WrapperProps extends PropsWithChildren, VariantProps<typeof modalVariants> {
5
+ className?: string;
6
+ buttonCloseClassName?: string;
7
+ }
@@ -0,0 +1,6 @@
1
+ export declare const modalVariants: (props?: ({
2
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const buttonCloseVariants: (props?: ({
5
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,4 @@
1
+ export * from './Body/Body';
2
+ export * from './Footer/Footer';
3
+ export * from './Header/Header';
4
+ export * from './Wrapper/Wrapper';
@@ -1,7 +1,7 @@
1
1
  import { Body as e } from "./Body/Body.js";
2
2
  import { Footer as t } from "./Footer/Footer.js";
3
3
  import { Header as m } from "./Header/Header.js";
4
- import { W as a } from "../../../Modal-W2GbkC_F.js";
4
+ import { W as a } from "../../../Modal-L73dmnHv.js";
5
5
  export {
6
6
  e as Body,
7
7
  t as Footer,
@@ -0,0 +1,2 @@
1
+ import { State } from './Modal.types';
2
+ export declare const ModalContext: import('react').Context<State>;
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const ModalProvider: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { useState as t, useCallback as n } from "react";
3
- import { ModalContext as f } from "./Modal.context.js";
4
- import { useToggle as h } from "../../../hooks/useToggle.js";
3
+ import { useToggle as f } from "../../../hooks/useToggle.js";
4
+ import { ModalContext as h } from "./Modal.context.js";
5
5
  const x = ({ children: s }) => {
6
- const [r, l] = t(!0), [a, o] = h(!1), [u, c] = t(), e = n(() => o(!0), [o]), d = n(() => o(!1), [o]), p = (m, C = !0) => {
6
+ const [r, l] = t(!0), [a, o] = f(!1), [u, c] = t(), e = n(() => o(!0), [o]), d = n(() => o(!1), [o]), p = (m, C = !0) => {
7
7
  c(m), e(), l(C);
8
8
  };
9
9
  return /* @__PURE__ */ i(
10
- f.Provider,
10
+ h.Provider,
11
11
  {
12
12
  value: {
13
13
  content: u,
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export type State = {
3
+ isOpen: boolean;
4
+ content: string | ReactNode;
5
+ shouldShowClose: boolean;
6
+ onOpen: () => void;
7
+ onClose: () => void;
8
+ setContentAndOpen: (content: string | ReactNode, showCloseButton?: boolean) => void;
9
+ };
@@ -0,0 +1 @@
1
+ export * from './Modal.provider';
@@ -0,0 +1 @@
1
+ export * from './useModal';
@@ -0,0 +1,9 @@
1
+ export declare const useModal: () => {
2
+ closeBtnRef: import('react').RefObject<HTMLButtonElement | null>;
3
+ isOpen: boolean;
4
+ content: string | import('react').ReactNode;
5
+ shouldShowClose: boolean;
6
+ onOpen: () => void;
7
+ onClose: () => void;
8
+ setContentAndOpen: (content: string | import('react').ReactNode, showCloseButton?: boolean) => void;
9
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { NumberInputProps } from './NumberInput.types';
3
+ export declare const NumberInput: FC<NumberInputProps>;