@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,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" | "konstruct" | "colony" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,43 @@
1
+ import { c as r } from "../../index-BwYCDOHZ.js";
2
+ const t = r(
3
+ [
4
+ "bg-transparent",
5
+ "border",
6
+ "border-zinc-200",
7
+ "disabled:cursor-not-allowed",
8
+ "disabled:opacity-50",
9
+ "flex",
10
+ "focus-visible:outline-none",
11
+ "focus-visible:ring-1",
12
+ "h-9",
13
+ "placeholder:text-muted-foreground",
14
+ "px-3",
15
+ "py-1",
16
+ "rounded-md",
17
+ "shadow-sm",
18
+ "text-base",
19
+ "text-zinc-700",
20
+ "transition-colors",
21
+ "w-full"
22
+ ],
23
+ {
24
+ variants: {
25
+ variant: {
26
+ default: "",
27
+ error: ["border-red-600", "pr-8", "focus-visible:ring-transparent"]
28
+ },
29
+ theme: {
30
+ kubefirst: "focus:ring-kubefirst-purple-light",
31
+ colony: "",
32
+ konstruct: ""
33
+ }
34
+ },
35
+ defaultVariants: {
36
+ variant: "default",
37
+ theme: "kubefirst"
38
+ }
39
+ }
40
+ );
41
+ export {
42
+ t as inputVariants
43
+ };
@@ -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 };
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import "../../index-2hJuj4UN.js";
3
+ import "./components/Body/Body.js";
4
+ import "./components/Footer/Footer.js";
5
+ import "./components/Header/Header.js";
6
+ import { M as d } from "../../Modal-CO0_SnXD.js";
7
+ import "./hooks/useModal.js";
8
+ export {
9
+ d as Modal
10
+ };
@@ -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,7 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { S as n } from "../../../../index-CCavb-1K.js";
3
+ import { cn as e } from "../../../../utils/index.js";
4
+ const i = ({ children: o, asChild: t, className: m }) => /* @__PURE__ */ r(t ? n : "div", { className: e("flex-1", m), children: o });
5
+ export {
6
+ i as Body
7
+ };
@@ -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,6 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { S as m } from "../../../../index-CCavb-1K.js";
3
+ const i = ({ children: o, asChild: t, className: r }) => /* @__PURE__ */ n(t ? m : "div", { className: r, children: o });
4
+ export {
5
+ i as Footer
6
+ };
@@ -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,6 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { S as e } from "../../../../index-CCavb-1K.js";
3
+ const i = ({ children: o, asChild: t, className: r }) => /* @__PURE__ */ n(t ? e : "div", { className: r, children: o });
4
+ export {
5
+ i as Header
6
+ };
@@ -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>;
@@ -0,0 +1,13 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import { W as x } from "../../../../Modal-CO0_SnXD.js";
4
+ import "../../../../Combination-Cmu9JRkv.js";
5
+ import "../../../../index-4qm4jAkj.js";
6
+ import "../../../../contexts/theme.context.js";
7
+ import "../../../../contexts/theme.hook.js";
8
+ import "../../../../js.cookie-OLEfuq_g.js";
9
+ import "../../hooks/useModal.js";
10
+ import "./Wrapper.variants.js";
11
+ export {
12
+ x as Wrapper
13
+ };
@@ -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" | "konstruct" | "colony" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const buttonCloseVariants: (props?: ({
5
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,48 @@
1
+ import { c as t } from "../../../../index-BwYCDOHZ.js";
2
+ const o = t(
3
+ [
4
+ "bg-metal-1000",
5
+ "bg-white",
6
+ "border-none",
7
+ "flex",
8
+ "flex-col",
9
+ "justify-between",
10
+ "min-h-[450px]",
11
+ "min-w-[500px]",
12
+ "overflow-auto",
13
+ "relative",
14
+ "rounded-md",
15
+ "shadow-xs",
16
+ "lg:overflow-hidden"
17
+ ],
18
+ {
19
+ variants: {
20
+ theme: {
21
+ colony: ["shadow-red-400"],
22
+ konstruct: ["shadow-orange-400"],
23
+ kubefirst: ["shadow-kubefirst-purple-light"]
24
+ }
25
+ },
26
+ defaultVariants: {
27
+ theme: "kubefirst"
28
+ }
29
+ }
30
+ ), r = t(
31
+ ["absolute", "right-1.5", "top-1.5", "text-inherit"],
32
+ {
33
+ variants: {
34
+ theme: {
35
+ kubefirst: ["text-kubefirst-purple-light"],
36
+ konstruct: ["text-orange-400"],
37
+ colony: ["text-red-400"]
38
+ }
39
+ },
40
+ defaultVariants: {
41
+ theme: "kubefirst"
42
+ }
43
+ }
44
+ );
45
+ export {
46
+ r as buttonCloseVariants,
47
+ o as modalVariants
48
+ };
@@ -0,0 +1,4 @@
1
+ export * from './Body/Body';
2
+ export * from './Footer/Footer';
3
+ export * from './Header/Header';
4
+ export * from './Wrapper/Wrapper';
@@ -0,0 +1,10 @@
1
+ import { Body as e } from "./Body/Body.js";
2
+ import { Footer as t } from "./Footer/Footer.js";
3
+ import { Header as m } from "./Header/Header.js";
4
+ import { W as a } from "../../../Modal-CO0_SnXD.js";
5
+ export {
6
+ e as Body,
7
+ t as Footer,
8
+ m as Header,
9
+ a as Wrapper
10
+ };
@@ -0,0 +1,2 @@
1
+ import { State } from './Modal.types';
2
+ export declare const ModalContext: import('react').Context<State>;
@@ -0,0 +1,20 @@
1
+ import { createContext as e } from "react";
2
+ const n = {
3
+ content: void 0,
4
+ isOpen: !1,
5
+ shouldShowClose: !0,
6
+ onOpen: () => {
7
+ throw new Error("onOpen not implemented");
8
+ },
9
+ onClose: () => {
10
+ throw new Error("onClose not implemented");
11
+ },
12
+ setContentAndOpen: () => {
13
+ throw new Error(
14
+ "ModalContext: setContentAndOpen function must be overridden"
15
+ );
16
+ }
17
+ }, t = e(n);
18
+ export {
19
+ t as ModalContext
20
+ };
@@ -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;
@@ -0,0 +1,26 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { useState as t, useCallback as n } from "react";
3
+ import { useToggle as f } from "../../../hooks/useToggle.js";
4
+ import { ModalContext as h } from "./Modal.context.js";
5
+ const x = ({ children: s }) => {
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
+ c(m), e(), l(C);
8
+ };
9
+ return /* @__PURE__ */ i(
10
+ h.Provider,
11
+ {
12
+ value: {
13
+ content: u,
14
+ isOpen: a,
15
+ shouldShowClose: r,
16
+ onClose: d,
17
+ onOpen: e,
18
+ setContentAndOpen: p
19
+ },
20
+ children: s
21
+ }
22
+ );
23
+ };
24
+ export {
25
+ x as ModalProvider
26
+ };
@@ -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,4 @@
1
+ import { ModalProvider as d } from "./Modal.provider.js";
2
+ export {
3
+ d as ModalProvider
4
+ };
@@ -0,0 +1 @@
1
+ export * from './useModal';
@@ -0,0 +1,4 @@
1
+ import { useModal as r } from "./useModal.js";
2
+ export {
3
+ r as useModal
4
+ };
@@ -0,0 +1,9 @@
1
+ export declare const useModal: () => {
2
+ closeBtnRef: import('react').RefObject<HTMLButtonElement>;
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,27 @@
1
+ import { useContext as l, useRef as u, useEffect as s } from "react";
2
+ import { ModalContext as a } from "../contexts/Modal.context.js";
3
+ const f = () => {
4
+ const t = l(a), n = u(null);
5
+ if (!t)
6
+ throw new Error("useModal must be used within a ModalProvider");
7
+ const { onClose: r } = t;
8
+ return s(() => {
9
+ var e;
10
+ const o = document.activeElement;
11
+ return (e = n.current) == null || e.focus(), () => {
12
+ o == null || o.focus();
13
+ };
14
+ }, []), s(() => {
15
+ const o = new AbortController(), e = (c) => {
16
+ c.code === "Escape" && r();
17
+ };
18
+ return window.addEventListener("keydown", e, {
19
+ signal: o.signal
20
+ }), () => {
21
+ o.abort();
22
+ };
23
+ }, [r]), { ...t, closeBtnRef: n };
24
+ };
25
+ export {
26
+ f as useModal
27
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { NumberInputProps } from './NumberInput.types';
3
+ export declare const NumberInput: FC<NumberInputProps>;
@@ -0,0 +1,181 @@
1
+ import { jsxs as g, jsx as c } from "react/jsx-runtime";
2
+ import p, { forwardRef as b, useId as I, useState as _, useCallback as w } from "react";
3
+ import "../../contexts/theme.context.js";
4
+ import { useTheme as E } from "../../contexts/theme.hook.js";
5
+ import "../../js.cookie-OLEfuq_g.js";
6
+ import { labelVariants as T, buttonVariants as j, numberInputVariants as $ } from "./NumberInput.variants.js";
7
+ import { P as a } from "../../index-DQMInta3.js";
8
+ function y() {
9
+ return y = Object.assign || function(t) {
10
+ for (var i = 1; i < arguments.length; i++) {
11
+ var n = arguments[i];
12
+ for (var e in n)
13
+ Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
14
+ }
15
+ return t;
16
+ }, y.apply(this, arguments);
17
+ }
18
+ function L(t, i) {
19
+ if (t == null) return {};
20
+ var n = W(t, i), e, r;
21
+ if (Object.getOwnPropertySymbols) {
22
+ var o = Object.getOwnPropertySymbols(t);
23
+ for (r = 0; r < o.length; r++)
24
+ e = o[r], !(i.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (n[e] = t[e]);
25
+ }
26
+ return n;
27
+ }
28
+ function W(t, i) {
29
+ if (t == null) return {};
30
+ var n = {}, e = Object.keys(t), r, o;
31
+ for (o = 0; o < e.length; o++)
32
+ r = e[o], !(i.indexOf(r) >= 0) && (n[r] = t[r]);
33
+ return n;
34
+ }
35
+ var h = b(function(t, i) {
36
+ var n = t.color, e = n === void 0 ? "currentColor" : n, r = t.size, o = r === void 0 ? 24 : r, f = L(t, ["color", "size"]);
37
+ return /* @__PURE__ */ p.createElement("svg", y({
38
+ ref: i,
39
+ xmlns: "http://www.w3.org/2000/svg",
40
+ width: o,
41
+ height: o,
42
+ viewBox: "0 0 24 24",
43
+ fill: "none",
44
+ stroke: e,
45
+ strokeWidth: "2",
46
+ strokeLinecap: "round",
47
+ strokeLinejoin: "round"
48
+ }, f), /* @__PURE__ */ p.createElement("line", {
49
+ x1: "5",
50
+ y1: "12",
51
+ x2: "19",
52
+ y2: "12"
53
+ }));
54
+ });
55
+ h.propTypes = {
56
+ color: a.string,
57
+ size: a.oneOfType([a.string, a.number])
58
+ };
59
+ h.displayName = "Minus";
60
+ function v() {
61
+ return v = Object.assign || function(t) {
62
+ for (var i = 1; i < arguments.length; i++) {
63
+ var n = arguments[i];
64
+ for (var e in n)
65
+ Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
66
+ }
67
+ return t;
68
+ }, v.apply(this, arguments);
69
+ }
70
+ function V(t, i) {
71
+ if (t == null) return {};
72
+ var n = M(t, i), e, r;
73
+ if (Object.getOwnPropertySymbols) {
74
+ var o = Object.getOwnPropertySymbols(t);
75
+ for (r = 0; r < o.length; r++)
76
+ e = o[r], !(i.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (n[e] = t[e]);
77
+ }
78
+ return n;
79
+ }
80
+ function M(t, i) {
81
+ if (t == null) return {};
82
+ var n = {}, e = Object.keys(t), r, o;
83
+ for (o = 0; o < e.length; o++)
84
+ r = e[o], !(i.indexOf(r) >= 0) && (n[r] = t[r]);
85
+ return n;
86
+ }
87
+ var d = b(function(t, i) {
88
+ var n = t.color, e = n === void 0 ? "currentColor" : n, r = t.size, o = r === void 0 ? 24 : r, f = V(t, ["color", "size"]);
89
+ return /* @__PURE__ */ p.createElement("svg", v({
90
+ ref: i,
91
+ xmlns: "http://www.w3.org/2000/svg",
92
+ width: o,
93
+ height: o,
94
+ viewBox: "0 0 24 24",
95
+ fill: "none",
96
+ stroke: e,
97
+ strokeWidth: "2",
98
+ strokeLinecap: "round",
99
+ strokeLinejoin: "round"
100
+ }, f), /* @__PURE__ */ p.createElement("line", {
101
+ x1: "12",
102
+ y1: "5",
103
+ x2: "12",
104
+ y2: "19"
105
+ }), /* @__PURE__ */ p.createElement("line", {
106
+ x1: "5",
107
+ y1: "12",
108
+ x2: "19",
109
+ y2: "12"
110
+ }));
111
+ });
112
+ d.propTypes = {
113
+ color: a.string,
114
+ size: a.oneOfType([a.string, a.number])
115
+ };
116
+ d.displayName = "Plus";
117
+ const G = b(
118
+ ({
119
+ className: t,
120
+ init: i,
121
+ label: n,
122
+ max: e = -1 / 0,
123
+ min: r = 1 / 0,
124
+ name: o,
125
+ theme: f,
126
+ onChange: s
127
+ }, x) => {
128
+ const { theme: P } = E(), m = f ?? P, k = I(), [u, O] = _(() => i || 0), N = w(() => {
129
+ let l = 0;
130
+ r === 1 / 0 ? l = u - 1 : l = Math.max(r, u - 1), O(l), s == null || s(l);
131
+ }, [u, r, s]), z = w(() => {
132
+ let l = 0;
133
+ e === -1 / 0 ? l = u + 1 : l = Math.min(e, u + 1), O(l), s == null || s(l);
134
+ }, [u, e, s]);
135
+ return /* @__PURE__ */ g("div", { className: "flex flex-col gap-1", children: [
136
+ n ? /* @__PURE__ */ c(
137
+ "label",
138
+ {
139
+ htmlFor: o ?? k,
140
+ className: T({
141
+ theme: m
142
+ }),
143
+ children: n
144
+ }
145
+ ) : null,
146
+ /* @__PURE__ */ g("div", { className: "flex items-center", children: [
147
+ /* @__PURE__ */ c(
148
+ "button",
149
+ {
150
+ type: "button",
151
+ onClick: N,
152
+ className: j({ theme: m, button: "rigth" }),
153
+ children: /* @__PURE__ */ c(h, { className: "w-4 h-4" })
154
+ }
155
+ ),
156
+ /* @__PURE__ */ c(
157
+ "input",
158
+ {
159
+ ref: x,
160
+ type: "number",
161
+ value: u,
162
+ className: $({ className: t, theme: m }),
163
+ readOnly: !0
164
+ }
165
+ ),
166
+ /* @__PURE__ */ c(
167
+ "button",
168
+ {
169
+ type: "button",
170
+ onClick: z,
171
+ className: j({ theme: m, button: "left" }),
172
+ children: /* @__PURE__ */ c(d, { className: "w-4 h-4" })
173
+ }
174
+ )
175
+ ] })
176
+ ] });
177
+ }
178
+ );
179
+ export {
180
+ G as NumberInput
181
+ };
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { numberInputVariants } from './NumberInput.variants';
3
+ export interface NumberInputProps extends VariantProps<typeof numberInputVariants> {
4
+ className?: string;
5
+ init?: number;
6
+ label?: string;
7
+ max?: number;
8
+ min?: number;
9
+ name?: string;
10
+ onChange?: (value: number) => void;
11
+ }
@@ -0,0 +1,11 @@
1
+ export declare const numberInputVariants: (props?: ({
2
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const buttonVariants: (props?: ({
5
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
6
+ button?: "left" | "rigth" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export declare const labelVariants: (props?: ({
9
+ variant?: "default" | null | undefined;
10
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
11
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;