@konstructio/ui 0.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 (256) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +19 -0
  3. package/dist/AlertDialogTrigger-BIbxXexQ.js +553 -0
  4. package/dist/Combination-Cmu9JRkv.js +479 -0
  5. package/dist/Modal-CO0_SnXD.js +909 -0
  6. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  7. package/dist/chevron-up-Cmu1oXfj.js +54 -0
  8. package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
  9. package/dist/components/AlertDialog/AlertDialog.js +54 -0
  10. package/dist/components/AlertDialog/AlertDialog.types.d.ts +13 -0
  11. package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
  12. package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
  13. package/dist/components/AlertDialog/AlertDialog.variants.js +16 -0
  14. package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
  15. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +10 -0
  16. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +6 -0
  17. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +1 -0
  18. package/dist/components/AlertDialog/components/index.d.ts +1 -0
  19. package/dist/components/AlertDialog/components/index.js +4 -0
  20. package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
  21. package/dist/components/AlertDialog/hooks/index.js +4 -0
  22. package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
  23. package/dist/components/AlertDialog/hooks/useAlertDialog.js +10 -0
  24. package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
  25. package/dist/components/Autocomplete/Autocomplete.js +84 -0
  26. package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
  27. package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
  28. package/dist/components/Autocomplete/Autocomplete.variants.d.ts +8 -0
  29. package/dist/components/Autocomplete/Autocomplete.variants.js +61 -0
  30. package/dist/components/Autocomplete/components/List.d.ts +3 -0
  31. package/dist/components/Autocomplete/components/List.js +57 -0
  32. package/dist/components/Autocomplete/components/List.types.d.ts +13 -0
  33. package/dist/components/Autocomplete/components/List.types.js +1 -0
  34. package/dist/components/Autocomplete/components/List.variants.d.ts +16 -0
  35. package/dist/components/Autocomplete/components/List.variants.js +81 -0
  36. package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
  37. package/dist/components/Autocomplete/hooks/index.js +6 -0
  38. package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
  39. package/dist/components/Autocomplete/hooks/useAutocomplete.js +81 -0
  40. package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
  41. package/dist/components/Autocomplete/hooks/useNavigationList.js +78 -0
  42. package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
  43. package/dist/components/Breadcrumb/Breadcrumb.js +460 -0
  44. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +11 -0
  45. package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
  46. package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +12 -0
  47. package/dist/components/Breadcrumb/Breadcrumb.variants.js +61 -0
  48. package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
  49. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +5 -0
  50. package/dist/components/Button/Button.d.ts +4 -0
  51. package/dist/components/Button/Button.js +42 -0
  52. package/dist/components/Button/Button.types.d.ts +7 -0
  53. package/dist/components/Button/Button.types.js +1 -0
  54. package/dist/components/Button/Button.variants.d.ts +6 -0
  55. package/dist/components/Button/Button.variants.js +102 -0
  56. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  57. package/dist/components/Checkbox/Checkbox.js +233 -0
  58. package/dist/components/Checkbox/Checkbox.types.d.ts +12 -0
  59. package/dist/components/Checkbox/Checkbox.types.js +1 -0
  60. package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
  61. package/dist/components/Checkbox/Checkbox.variants.js +82 -0
  62. package/dist/components/Dropdown/Dropdown.d.ts +3 -0
  63. package/dist/components/Dropdown/Dropdown.js +10 -0
  64. package/dist/components/Dropdown/Dropdown.types.d.ts +15 -0
  65. package/dist/components/Dropdown/Dropdown.types.js +1 -0
  66. package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
  67. package/dist/components/Dropdown/Dropdown.variants.js +45 -0
  68. package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
  69. package/dist/components/Dropdown/components/EmptyList.js +5 -0
  70. package/dist/components/Dropdown/components/List/List.d.ts +3 -0
  71. package/dist/components/Dropdown/components/List/List.js +25 -0
  72. package/dist/components/Dropdown/components/List/List.types.d.ts +8 -0
  73. package/dist/components/Dropdown/components/List/List.types.js +1 -0
  74. package/dist/components/Dropdown/components/List/List.variants.d.ts +3 -0
  75. package/dist/components/Dropdown/components/List/List.variants.js +34 -0
  76. package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
  77. package/dist/components/Dropdown/components/ListItem/ListItem.js +29 -0
  78. package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +4 -0
  79. package/dist/components/Dropdown/components/ListItem/ListItem.types.js +1 -0
  80. package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +3 -0
  81. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +19 -0
  82. package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
  83. package/dist/components/Dropdown/components/Wrapper.js +90 -0
  84. package/dist/components/Dropdown/components/index.d.ts +3 -0
  85. package/dist/components/Dropdown/components/index.js +8 -0
  86. package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
  87. package/dist/components/Dropdown/contexts/dropdown.context.js +14 -0
  88. package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
  89. package/dist/components/Dropdown/contexts/dropdown.hook.js +11 -0
  90. package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +2 -0
  91. package/dist/components/Dropdown/contexts/dropdown.provider.js +11 -0
  92. package/dist/components/Dropdown/contexts/index.d.ts +2 -0
  93. package/dist/components/Dropdown/contexts/index.js +6 -0
  94. package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
  95. package/dist/components/Dropdown/hooks/useDropdown.js +65 -0
  96. package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
  97. package/dist/components/Dropdown/hooks/useNavigationList.js +66 -0
  98. package/dist/components/Input/Input.d.ts +3 -0
  99. package/dist/components/Input/Input.js +178 -0
  100. package/dist/components/Input/Input.types.d.ts +9 -0
  101. package/dist/components/Input/Input.types.js +1 -0
  102. package/dist/components/Input/Input.variants.d.ts +4 -0
  103. package/dist/components/Input/Input.variants.js +43 -0
  104. package/dist/components/Modal/Modal.d.ts +8 -0
  105. package/dist/components/Modal/Modal.js +10 -0
  106. package/dist/components/Modal/Modal.types.d.ts +12 -0
  107. package/dist/components/Modal/Modal.types.js +1 -0
  108. package/dist/components/Modal/components/Body/Body.d.ts +3 -0
  109. package/dist/components/Modal/components/Body/Body.js +7 -0
  110. package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
  111. package/dist/components/Modal/components/Body/Body.types.js +1 -0
  112. package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
  113. package/dist/components/Modal/components/Footer/Footer.js +6 -0
  114. package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
  115. package/dist/components/Modal/components/Footer/Footer.types.js +1 -0
  116. package/dist/components/Modal/components/Header/Header.d.ts +3 -0
  117. package/dist/components/Modal/components/Header/Header.js +6 -0
  118. package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
  119. package/dist/components/Modal/components/Header/Header.types.js +1 -0
  120. package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
  121. package/dist/components/Modal/components/Wrapper/Wrapper.js +13 -0
  122. package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +7 -0
  123. package/dist/components/Modal/components/Wrapper/Wrapper.types.js +1 -0
  124. package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +6 -0
  125. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +48 -0
  126. package/dist/components/Modal/components/index.d.ts +4 -0
  127. package/dist/components/Modal/components/index.js +10 -0
  128. package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
  129. package/dist/components/Modal/contexts/Modal.context.js +20 -0
  130. package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
  131. package/dist/components/Modal/contexts/Modal.provider.js +26 -0
  132. package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
  133. package/dist/components/Modal/contexts/Modal.types.js +1 -0
  134. package/dist/components/Modal/contexts/index.d.ts +1 -0
  135. package/dist/components/Modal/contexts/index.js +4 -0
  136. package/dist/components/Modal/hooks/index.d.ts +1 -0
  137. package/dist/components/Modal/hooks/index.js +4 -0
  138. package/dist/components/Modal/hooks/useModal.d.ts +9 -0
  139. package/dist/components/Modal/hooks/useModal.js +27 -0
  140. package/dist/components/NumberInput/NumberInput.d.ts +3 -0
  141. package/dist/components/NumberInput/NumberInput.js +181 -0
  142. package/dist/components/NumberInput/NumberInput.types.d.ts +11 -0
  143. package/dist/components/NumberInput/NumberInput.types.js +1 -0
  144. package/dist/components/NumberInput/NumberInput.variants.d.ts +11 -0
  145. package/dist/components/NumberInput/NumberInput.variants.js +78 -0
  146. package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
  147. package/dist/components/ProgressBar/ProgressBar.js +37 -0
  148. package/dist/components/ProgressBar/ProgressBar.types.d.ts +8 -0
  149. package/dist/components/ProgressBar/ProgressBar.types.js +1 -0
  150. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +7 -0
  151. package/dist/components/ProgressBar/ProgressBar.variants.js +62 -0
  152. package/dist/components/Radio/Radio.d.ts +3 -0
  153. package/dist/components/Radio/Radio.js +58 -0
  154. package/dist/components/Radio/Radio.types.d.ts +12 -0
  155. package/dist/components/Radio/Radio.types.js +1 -0
  156. package/dist/components/Radio/Radio.variants.d.ts +3 -0
  157. package/dist/components/Radio/Radio.variants.js +49 -0
  158. package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
  159. package/dist/components/RadioGroup/RadioGroup.js +37 -0
  160. package/dist/components/RadioGroup/RadioGroup.types.d.ts +11 -0
  161. package/dist/components/RadioGroup/RadioGroup.types.js +1 -0
  162. package/dist/components/Range/Range.d.ts +3 -0
  163. package/dist/components/Range/Range.js +70 -0
  164. package/dist/components/Range/Range.types.d.ts +13 -0
  165. package/dist/components/Range/Range.types.js +1 -0
  166. package/dist/components/Range/Range.variants.d.ts +14 -0
  167. package/dist/components/Range/Range.variants.js +93 -0
  168. package/dist/components/Slider/Slider.d.ts +3 -0
  169. package/dist/components/Slider/Slider.js +52 -0
  170. package/dist/components/Slider/Slider.types.d.ts +13 -0
  171. package/dist/components/Slider/Slider.types.js +1 -0
  172. package/dist/components/Slider/Slider.variants.d.ts +11 -0
  173. package/dist/components/Slider/Slider.variants.js +69 -0
  174. package/dist/components/Switch/Switch.d.ts +3 -0
  175. package/dist/components/Switch/Switch.js +176 -0
  176. package/dist/components/Switch/Switch.types.d.ts +10 -0
  177. package/dist/components/Switch/Switch.types.js +1 -0
  178. package/dist/components/Switch/Switch.variants.d.ts +6 -0
  179. package/dist/components/Switch/Switch.variants.js +58 -0
  180. package/dist/components/Tag/Tag.d.ts +3 -0
  181. package/dist/components/Tag/Tag.js +6 -0
  182. package/dist/components/Tag/Tag.types.d.ts +4 -0
  183. package/dist/components/Tag/Tag.types.js +1 -0
  184. package/dist/components/Tag/Tag.variants.d.ts +3 -0
  185. package/dist/components/Tag/Tag.variants.js +31 -0
  186. package/dist/components/TagSelect/TagSelect.d.ts +3 -0
  187. package/dist/components/TagSelect/TagSelect.js +75 -0
  188. package/dist/components/TagSelect/TagSelect.types.d.ts +9 -0
  189. package/dist/components/TagSelect/TagSelect.types.js +1 -0
  190. package/dist/components/TagSelect/TagSelect.variants.d.ts +9 -0
  191. package/dist/components/TagSelect/TagSelect.variants.js +83 -0
  192. package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
  193. package/dist/components/TagSelect/hooks/useTagSelect.js +39 -0
  194. package/dist/components/TextArea/TextArea.d.ts +3 -0
  195. package/dist/components/TextArea/TextArea.js +34 -0
  196. package/dist/components/TextArea/TextArea.types.d.ts +10 -0
  197. package/dist/components/TextArea/TextArea.types.js +1 -0
  198. package/dist/components/TextArea/TextArea.variants.d.ts +3 -0
  199. package/dist/components/TextArea/TextArea.variants.js +34 -0
  200. package/dist/components/Toast/Toast.d.ts +3 -0
  201. package/dist/components/Toast/Toast.js +471 -0
  202. package/dist/components/Toast/Toast.types.d.ts +12 -0
  203. package/dist/components/Toast/Toast.types.js +1 -0
  204. package/dist/components/Toast/Toast.variants.d.ts +9 -0
  205. package/dist/components/Toast/Toast.variants.js +74 -0
  206. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  207. package/dist/components/Tooltip/Tooltip.js +42 -0
  208. package/dist/components/Tooltip/Tooltip.types.d.ts +8 -0
  209. package/dist/components/Tooltip/Tooltip.types.js +1 -0
  210. package/dist/components/Tooltip/Tooltip.variants.d.ts +8 -0
  211. package/dist/components/Tooltip/Tooltip.variants.js +93 -0
  212. package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
  213. package/dist/components/Tooltip/hooks/useTooltip.js +25 -0
  214. package/dist/components/index.d.ts +19 -0
  215. package/dist/components/index.js +40 -0
  216. package/dist/contexts/index.d.ts +3 -0
  217. package/dist/contexts/index.js +8 -0
  218. package/dist/contexts/theme.context.d.ts +6 -0
  219. package/dist/contexts/theme.context.js +10 -0
  220. package/dist/contexts/theme.hook.d.ts +7 -0
  221. package/dist/contexts/theme.hook.js +9 -0
  222. package/dist/contexts/theme.provider.d.ts +7 -0
  223. package/dist/contexts/theme.provider.js +17 -0
  224. package/dist/hooks/index.d.ts +1 -0
  225. package/dist/hooks/index.js +4 -0
  226. package/dist/hooks/useToggle.d.ts +1 -0
  227. package/dist/hooks/useToggle.js +11 -0
  228. package/dist/index-2K8qjK4R.js +145 -0
  229. package/dist/index-2hJuj4UN.js +19069 -0
  230. package/dist/index-4qm4jAkj.js +92 -0
  231. package/dist/index-8vgf-x5i.js +118 -0
  232. package/dist/index-BJ7FQg17.js +35 -0
  233. package/dist/index-B_GWswUP.js +71 -0
  234. package/dist/index-BqM_XclQ.js +94 -0
  235. package/dist/index-BwYCDOHZ.js +44 -0
  236. package/dist/index-BxeV34ij.js +32 -0
  237. package/dist/index-CCavb-1K.js +57 -0
  238. package/dist/index-DFbnnPzA.js +423 -0
  239. package/dist/index-DQMInta3.js +663 -0
  240. package/dist/index.d.ts +4 -0
  241. package/dist/index.js +50 -0
  242. package/dist/js.cookie-OLEfuq_g.js +74 -0
  243. package/dist/package.json +118 -0
  244. package/dist/plugins/index.d.ts +1 -0
  245. package/dist/plugins/index.js +4 -0
  246. package/dist/plugins/konstruct.d.ts +4 -0
  247. package/dist/plugins/konstruct.js +104 -0
  248. package/dist/plugins/utils/colors.d.ts +206 -0
  249. package/dist/plugins/utils/colors.js +626 -0
  250. package/dist/styles.css +1 -0
  251. package/dist/styles.d.ts +0 -0
  252. package/dist/styles.js +1 -0
  253. package/dist/useBreadcrumb-BSMnc4Fu.js +341 -0
  254. package/dist/utils/index.d.ts +4 -0
  255. package/dist/utils/index.js +2278 -0
  256. package/package.json +118 -0
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as g
6
+ };
@@ -0,0 +1,54 @@
1
+ import l, { forwardRef as c } from "react";
2
+ import { P as a } from "./index-DQMInta3.js";
3
+ function p() {
4
+ return p = Object.assign || function(e) {
5
+ for (var o = 1; o < arguments.length; o++) {
6
+ var t = arguments[o];
7
+ for (var r in t)
8
+ Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
9
+ }
10
+ return e;
11
+ }, p.apply(this, arguments);
12
+ }
13
+ function u(e, o) {
14
+ if (e == null) return {};
15
+ var t = v(e, o), r, n;
16
+ if (Object.getOwnPropertySymbols) {
17
+ var i = Object.getOwnPropertySymbols(e);
18
+ for (n = 0; n < i.length; n++)
19
+ r = i[n], !(o.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
20
+ }
21
+ return t;
22
+ }
23
+ function v(e, o) {
24
+ if (e == null) return {};
25
+ var t = {}, r = Object.keys(e), n, i;
26
+ for (i = 0; i < r.length; i++)
27
+ n = r[i], !(o.indexOf(n) >= 0) && (t[n] = e[n]);
28
+ return t;
29
+ }
30
+ var s = c(function(e, o) {
31
+ var t = e.color, r = t === void 0 ? "currentColor" : t, n = e.size, i = n === void 0 ? 24 : n, f = u(e, ["color", "size"]);
32
+ return /* @__PURE__ */ l.createElement("svg", p({
33
+ ref: o,
34
+ xmlns: "http://www.w3.org/2000/svg",
35
+ width: i,
36
+ height: i,
37
+ viewBox: "0 0 24 24",
38
+ fill: "none",
39
+ stroke: r,
40
+ strokeWidth: "2",
41
+ strokeLinecap: "round",
42
+ strokeLinejoin: "round"
43
+ }, f), /* @__PURE__ */ l.createElement("polyline", {
44
+ points: "18 15 12 9 6 15"
45
+ }));
46
+ });
47
+ s.propTypes = {
48
+ color: a.string,
49
+ size: a.oneOfType([a.string, a.number])
50
+ };
51
+ s.displayName = "ChevronUp";
52
+ export {
53
+ s as C
54
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { AlertDialogProps } from './AlertDialog.types';
3
+ export declare const AlertDialog: FC<AlertDialogProps>;
@@ -0,0 +1,54 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { R as h, A as f, P as x, O as g, C as u, T as C, D as b, a as y, b as O } from "../../AlertDialogTrigger-BIbxXexQ.js";
3
+ import "../../contexts/theme.context.js";
4
+ import { useTheme as A } from "../../contexts/theme.hook.js";
5
+ import "react";
6
+ import "../../js.cookie-OLEfuq_g.js";
7
+ import { Button as a } from "../Button/Button.js";
8
+ import { useAlertDialog as D } from "./hooks/useAlertDialog.js";
9
+ const B = ({
10
+ buttonText: l,
11
+ theme: n,
12
+ title: o,
13
+ description: i,
14
+ onConfirm: s
15
+ }) => {
16
+ const { theme: r } = A(), { isOpen: c, handleCancel: d, handleConfirm: m, handleOpen: p } = D({
17
+ onConfirm: s
18
+ });
19
+ return /* @__PURE__ */ t(h, { open: c, children: [
20
+ /* @__PURE__ */ e(f, { text: l, theme: n, onOpen: p }),
21
+ /* @__PURE__ */ t(x, { children: [
22
+ /* @__PURE__ */ e(g, { className: "bg-black opacity-75 inset-0 fixed" }),
23
+ /* @__PURE__ */ t(u, { className: "bg-white rounded-md fixed top-1/2 left-1/2 -translate-y-2/4 -translate-x-2/4 flex flex-col gap-8 p-6", children: [
24
+ /* @__PURE__ */ e(C, { className: "font-bold text-center text-2xl", children: o }),
25
+ /* @__PURE__ */ e(b, { children: i }),
26
+ /* @__PURE__ */ t("div", { className: "flex flex-row gap-5 justify-end", children: [
27
+ /* @__PURE__ */ e(y, { asChild: !0, children: /* @__PURE__ */ e(
28
+ a,
29
+ {
30
+ type: "button",
31
+ theme: n ?? r,
32
+ variant: "secondary",
33
+ onClick: d,
34
+ children: "Cancel"
35
+ }
36
+ ) }),
37
+ /* @__PURE__ */ e(O, { asChild: !0, children: /* @__PURE__ */ e(
38
+ a,
39
+ {
40
+ type: "button",
41
+ theme: n ?? r,
42
+ variant: "danger",
43
+ onClick: m,
44
+ children: "OK"
45
+ }
46
+ ) })
47
+ ] })
48
+ ] })
49
+ ] })
50
+ ] });
51
+ };
52
+ export {
53
+ B as AlertDialog
54
+ };
@@ -0,0 +1,13 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { buttonAlertDialogVariants } from './AlertDialog.variants';
4
+ export interface AlertDialogProps extends PropsWithChildren, VariantProps<typeof buttonAlertDialogVariants> {
5
+ className?: string;
6
+ buttonText?: string;
7
+ title?: string;
8
+ description?: string;
9
+ onConfirm?: () => void;
10
+ }
11
+ export type UseAlertiDialogProps = {
12
+ onConfirm: AlertDialogProps['onConfirm'];
13
+ };
@@ -0,0 +1,3 @@
1
+ export declare const buttonAlertDialogVariants: (props?: ({
2
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,16 @@
1
+ import { c as t } from "../../index-BwYCDOHZ.js";
2
+ const r = t([], {
3
+ variants: {
4
+ theme: {
5
+ colony: "",
6
+ kubefirst: "",
7
+ konstruct: ""
8
+ }
9
+ },
10
+ defaultVariants: {
11
+ theme: "kubefirst"
12
+ }
13
+ });
14
+ export {
15
+ r as buttonAlertDialogVariants
16
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { AlertDialogTriggerProps } from './AlertDialogTrigger.types';
3
+ export declare const AlertDialogTrigger: FC<AlertDialogTriggerProps>;
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import { A as a } from "../../../AlertDialogTrigger-BIbxXexQ.js";
3
+ import "../../../contexts/theme.context.js";
4
+ import "../../../contexts/theme.hook.js";
5
+ import "react";
6
+ import "../../../js.cookie-OLEfuq_g.js";
7
+ import "../../Button/Button.js";
8
+ export {
9
+ a as AlertDialogTrigger
10
+ };
@@ -0,0 +1,6 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { buttonAlertDialogVariants } from '../AlertDialog.variants';
3
+ export interface AlertDialogTriggerProps extends VariantProps<typeof buttonAlertDialogVariants> {
4
+ text?: string;
5
+ onOpen(): void;
6
+ }
@@ -0,0 +1 @@
1
+ export * from './AlertDialogTrigger';
@@ -0,0 +1,4 @@
1
+ import { A as g } from "../../../AlertDialogTrigger-BIbxXexQ.js";
2
+ export {
3
+ g as AlertDialogTrigger
4
+ };
@@ -0,0 +1 @@
1
+ export * from './useAlertDialog';
@@ -0,0 +1,4 @@
1
+ import { useAlertDialog as r } from "./useAlertDialog.js";
2
+ export {
3
+ r as useAlertDialog
4
+ };
@@ -0,0 +1,7 @@
1
+ import { UseAlertiDialogProps } from '../AlertDialog.types';
2
+ export declare const useAlertDialog: ({ onConfirm }: UseAlertiDialogProps) => {
3
+ isOpen: boolean;
4
+ handleCancel: () => void;
5
+ handleConfirm: () => void;
6
+ handleOpen: () => void;
7
+ };
@@ -0,0 +1,10 @@
1
+ import { useState as u, useCallback as t } from "react";
2
+ const d = ({ onConfirm: e }) => {
3
+ const [a, s] = u(!1), l = t(() => s(!0), []), c = t(() => s(!1), []), p = t(() => {
4
+ e == null || e(), s(!1);
5
+ }, [e]);
6
+ return { isOpen: a, handleCancel: c, handleConfirm: p, handleOpen: l };
7
+ };
8
+ export {
9
+ d as useAlertDialog
10
+ };
@@ -0,0 +1,3 @@
1
+ import { AutocompleteProps } from './Autocomplete.types';
2
+ declare const Autocomplete: import('react').ForwardRefExoticComponent<AutocompleteProps & import('react').RefAttributes<HTMLInputElement>>;
3
+ export { Autocomplete };
@@ -0,0 +1,84 @@
1
+ import { jsxs as C, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as R, useRef as i, useId as A, useImperativeHandle as T } from "react";
3
+ import "../../contexts/theme.context.js";
4
+ import { useTheme as V } from "../../contexts/theme.hook.js";
5
+ import "../../js.cookie-OLEfuq_g.js";
6
+ import { useAutocomplete as g } from "./hooks/useAutocomplete.js";
7
+ import { List as j } from "./components/List.js";
8
+ import { labelVariants as y, autocompleteVariants as I } from "./Autocomplete.variants.js";
9
+ const O = R(
10
+ ({
11
+ autoComplete: p = "off",
12
+ className: a,
13
+ label: n,
14
+ labelClassName: u,
15
+ name: l,
16
+ options: d,
17
+ placeHolderEmptyValues: h = "No values...",
18
+ placeHolderEmptyValuesClassName: f,
19
+ placeholder: x,
20
+ theme: N,
21
+ variant: r,
22
+ onChange: w
23
+ }, b) => {
24
+ const s = i(null), e = i(null), c = A(), { theme: v } = V(), m = N ?? v;
25
+ T(b, () => e.current, [e]);
26
+ const o = g({
27
+ options: d,
28
+ inputRef: e,
29
+ wrapperRef: s,
30
+ onChange: w
31
+ });
32
+ return /* @__PURE__ */ C("div", { ref: s, className: "relative flex flex-col", children: [
33
+ n ? /* @__PURE__ */ t(
34
+ "label",
35
+ {
36
+ htmlFor: l ?? c,
37
+ className: y({
38
+ theme: m,
39
+ variant: r,
40
+ className: u
41
+ }),
42
+ children: n
43
+ }
44
+ ) : null,
45
+ /* @__PURE__ */ t(
46
+ "input",
47
+ {
48
+ ref: e,
49
+ id: l ?? c,
50
+ type: "text",
51
+ name: l,
52
+ role: "combobox",
53
+ autoComplete: p,
54
+ className: I({
55
+ theme: m,
56
+ variant: r,
57
+ className: a
58
+ }),
59
+ onChange: o.handleChange,
60
+ value: o.value,
61
+ placeholder: x
62
+ }
63
+ ),
64
+ o.showOptions && /* @__PURE__ */ t("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm", children: /* @__PURE__ */ t(
65
+ j,
66
+ {
67
+ className: a,
68
+ inputRef: e,
69
+ wrapperRef: s,
70
+ options: o.newOptions,
71
+ placeholder: h,
72
+ placeholderClassName: f,
73
+ variant: r,
74
+ theme: m,
75
+ onClick: o.handleSelectValue
76
+ }
77
+ ) })
78
+ ] });
79
+ }
80
+ );
81
+ O.displayName = "Autocomplete";
82
+ export {
83
+ O as Autocomplete
84
+ };
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { autocompleteVariants } from './Autocomplete.variants';
4
+ export type Option = {
5
+ value: string;
6
+ };
7
+ export interface AutocompleteProps extends VariantProps<typeof autocompleteVariants> {
8
+ autoComplete?: 'off';
9
+ className?: string;
10
+ label?: string;
11
+ labelClassName?: string;
12
+ name?: string;
13
+ options: Option[];
14
+ placeHolderEmptyValues?: string | ReactNode;
15
+ placeHolderEmptyValuesClassName?: string;
16
+ placeholder?: string;
17
+ onChange(value: string): void;
18
+ }
@@ -0,0 +1,8 @@
1
+ export declare const autocompleteVariants: (props?: ({
2
+ variant?: "default" | null | undefined;
3
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
+ export declare const labelVariants: (props?: ({
6
+ variant?: "default" | null | undefined;
7
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
8
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,61 @@
1
+ import { c as t } from "../../index-BwYCDOHZ.js";
2
+ const r = t(
3
+ [
4
+ "flex",
5
+ "w-full",
6
+ "rounded-md",
7
+ "border",
8
+ "border-zinc-200",
9
+ "bg-transparent",
10
+ "text-base",
11
+ "text-zinc-700",
12
+ "transition-colors",
13
+ "placeholder:text-muted-foreground",
14
+ "focus-visible:outline-none",
15
+ "focus-visible:ring-1",
16
+ "focus-visible:ring-ring",
17
+ "disabled:cursor-not-allowed",
18
+ "disabled:opacity-50",
19
+ "shadow-sm",
20
+ "py-1",
21
+ "px-2"
22
+ ],
23
+ {
24
+ variants: {
25
+ variant: {
26
+ default: ""
27
+ },
28
+ theme: {
29
+ kubefirst: ["focus:ring-kubefirst-purple-light"],
30
+ konstruct: ["focus:focus:ring-orange-400"],
31
+ colony: ["focus:focus:ring-red-400"]
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ theme: "kubefirst",
36
+ variant: "default"
37
+ }
38
+ }
39
+ ), a = t(
40
+ ["pl-1", "mb-2", "text-base", "cursor-pointer"],
41
+ {
42
+ variants: {
43
+ variant: {
44
+ default: ""
45
+ },
46
+ theme: {
47
+ kubefirst: "",
48
+ konstruct: "",
49
+ colony: ""
50
+ }
51
+ },
52
+ defaultVariants: {
53
+ variant: "default",
54
+ theme: "kubefirst"
55
+ }
56
+ }
57
+ );
58
+ export {
59
+ r as autocompleteVariants,
60
+ a as labelVariants
61
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { Props } from './List.types';
3
+ export declare const List: FC<Props>;
@@ -0,0 +1,57 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useRef as f } from "react";
3
+ import { useNavigationUlList as p } from "../hooks/useNavigationList.js";
4
+ import { emptyListVariants as b, listVariants as N, listItemVariants as d, buttonVariants as x } from "./List.variants.js";
5
+ const y = ({
6
+ className: n,
7
+ inputRef: e,
8
+ options: l,
9
+ placeholder: a,
10
+ placeholderClassName: m,
11
+ variant: t,
12
+ theme: s,
13
+ wrapperRef: c,
14
+ onClick: u
15
+ }) => {
16
+ const o = f(null);
17
+ return p({ ulRef: o, inputRef: e, wrapperRef: c, options: l }), l.length === 0 ? /* @__PURE__ */ r(
18
+ "span",
19
+ {
20
+ className: b({
21
+ theme: s,
22
+ variant: t,
23
+ className: m
24
+ }),
25
+ children: a
26
+ }
27
+ ) : /* @__PURE__ */ r(
28
+ "ul",
29
+ {
30
+ ref: o,
31
+ role: "listbox",
32
+ className: N({ variant: t, theme: s, className: n }),
33
+ children: l.map(({ value: i }) => /* @__PURE__ */ r(
34
+ "li",
35
+ {
36
+ role: "option",
37
+ tabIndex: 0,
38
+ className: d({ theme: s, variant: t }),
39
+ children: /* @__PURE__ */ r(
40
+ "button",
41
+ {
42
+ type: "button",
43
+ role: "button",
44
+ className: x({ theme: s, variant: t }),
45
+ onClick: () => u(i),
46
+ children: i
47
+ }
48
+ )
49
+ },
50
+ i
51
+ ))
52
+ }
53
+ );
54
+ };
55
+ export {
56
+ y as List
57
+ };
@@ -0,0 +1,13 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { Option } from '../Autocomplete.types';
4
+ import { autocompleteVariants } from '../Autocomplete.variants';
5
+ export interface Props extends VariantProps<typeof autocompleteVariants> {
6
+ className?: string;
7
+ inputRef: RefObject<HTMLInputElement>;
8
+ wrapperRef: RefObject<HTMLDivElement>;
9
+ options: Option[];
10
+ placeholder: string | ReactNode;
11
+ placeholderClassName?: string;
12
+ onClick(value: string): void;
13
+ }
@@ -0,0 +1,16 @@
1
+ export declare const listVariants: (props?: ({
2
+ variant?: "default" | null | undefined;
3
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
+ export declare const emptyListVariants: (props?: ({
6
+ variant?: "default" | null | undefined;
7
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
8
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
+ export declare const listItemVariants: (props?: ({
10
+ variant?: "default" | null | undefined;
11
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
12
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
13
+ export declare const buttonVariants: (props?: ({
14
+ variant?: "default" | null | undefined;
15
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
16
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,81 @@
1
+ import { c as t } from "../../../index-BwYCDOHZ.js";
2
+ const a = t(["max-h-[250px]", "overflow-y-auto"], {
3
+ variants: {
4
+ variant: {
5
+ default: "bg-white"
6
+ },
7
+ theme: {
8
+ kubefirst: "",
9
+ konstruct: "",
10
+ colony: ""
11
+ }
12
+ },
13
+ defaultVariants: {
14
+ variant: "default",
15
+ theme: "kubefirst"
16
+ }
17
+ }), r = t(
18
+ ["p-1", "text-center", "w-full block", "bg-white"],
19
+ {
20
+ variants: {
21
+ variant: {
22
+ default: ""
23
+ },
24
+ theme: {
25
+ kubefirst: "",
26
+ konstruct: "",
27
+ colony: ""
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ variant: "default",
32
+ theme: "kubefirst"
33
+ }
34
+ }
35
+ ), o = t(["focus-visible:outline-none"], {
36
+ variants: {
37
+ variant: {
38
+ default: ""
39
+ },
40
+ theme: {
41
+ kubefirst: ["focus:bg-purple-100", "hover:bg-purple-100"],
42
+ konstruct: ["focus:bg-orange-100", "hover:bg-orange-100"],
43
+ colony: ["focus:bg-red-100", "hover:bg-red-100"]
44
+ }
45
+ },
46
+ defaultVariants: {
47
+ variant: "default",
48
+ theme: "kubefirst"
49
+ }
50
+ }), n = t(
51
+ [
52
+ "cursor-pointer",
53
+ "focus-visible:outline-none",
54
+ "px-3",
55
+ "py-1.5",
56
+ "w-full",
57
+ "text-left"
58
+ ],
59
+ {
60
+ variants: {
61
+ variant: {
62
+ default: ""
63
+ },
64
+ theme: {
65
+ kubefirst: ["focus:bg-purple-100", "hover:bg-purple-100"],
66
+ konstruct: ["focus:bg-orange-100", "hover:bg-orange-100"],
67
+ colony: ["focus:bg-red-100", "hover:bg-red-100"]
68
+ }
69
+ },
70
+ defaultVariants: {
71
+ variant: "default",
72
+ theme: "kubefirst"
73
+ }
74
+ }
75
+ );
76
+ export {
77
+ n as buttonVariants,
78
+ r as emptyListVariants,
79
+ o as listItemVariants,
80
+ a as listVariants
81
+ };
@@ -0,0 +1,2 @@
1
+ export * from './useAutocomplete';
2
+ export * from './useNavigationList';
@@ -0,0 +1,6 @@
1
+ import { useAutocomplete as t } from "./useAutocomplete.js";
2
+ import { useNavigationUlList as i } from "./useNavigationList.js";
3
+ export {
4
+ t as useAutocomplete,
5
+ i as useNavigationUlList
6
+ };
@@ -0,0 +1,17 @@
1
+ import { ChangeEvent, RefObject } from 'react';
2
+ import { Option } from '../Autocomplete.types';
3
+ type UseAutocompleteProps = {
4
+ options: Option[];
5
+ inputRef: RefObject<HTMLInputElement>;
6
+ wrapperRef: RefObject<HTMLDivElement>;
7
+ onChange(value: string): void;
8
+ };
9
+ export declare const useAutocomplete: ({ options, inputRef, wrapperRef, onChange, }: UseAutocompleteProps) => {
10
+ inputRef: RefObject<HTMLInputElement>;
11
+ newOptions: Option[];
12
+ showOptions: boolean;
13
+ value: string;
14
+ handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
15
+ handleSelectValue: (value: string) => void;
16
+ };
17
+ export {};