@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,78 @@
1
+ import { c as e } from "../../index-BwYCDOHZ.js";
2
+ const t = e(
3
+ [
4
+ "[&::-webkit-inner-spin-button]:appearance-none",
5
+ "[&::-webkit-outer-spin-button]:appearance-none",
6
+ "[-moz-appearance:textfield]",
7
+ "appearance-none",
8
+ "border",
9
+ "border-x-0",
10
+ "focus-visible:outline-none",
11
+ "focus-visible:ring-transparent",
12
+ "p-1",
13
+ "text-center"
14
+ ],
15
+ {
16
+ variants: {
17
+ theme: {
18
+ colony: ["border-red-700", "text-red-700"],
19
+ kubefirst: [
20
+ "border-kubefirst-purple-light",
21
+ "text-kubefirst-purple-light"
22
+ ],
23
+ konstruct: ["border-orange-500", "text-orange-500"]
24
+ }
25
+ },
26
+ defaultVariants: {
27
+ theme: "kubefirst"
28
+ }
29
+ }
30
+ ), n = e(
31
+ ["p-2", "items-center", "justify-center", "border"],
32
+ {
33
+ variants: {
34
+ theme: {
35
+ colony: ["border-red-700", "text-red-700", "hover:bg-red-50"],
36
+ kubefirst: [
37
+ "border-kubefirst-purple-light",
38
+ "text-kubefirst-purple-light",
39
+ "hover:text-kubefirst-purple-dark",
40
+ "hover:border-kubefirst-purple-dark",
41
+ "hover:bg-purple-100"
42
+ ],
43
+ konstruct: [
44
+ "border-orange-500",
45
+ "text-orange-500",
46
+ "hover:bg-orange-50"
47
+ ]
48
+ },
49
+ button: {
50
+ left: ["rounded-e-sm"],
51
+ rigth: ["rounded-s-sm"]
52
+ }
53
+ },
54
+ defaultVariants: {
55
+ theme: "kubefirst"
56
+ }
57
+ }
58
+ ), a = e(["pl-1", "text-base", "cursor-pointer"], {
59
+ variants: {
60
+ variant: {
61
+ default: ""
62
+ },
63
+ theme: {
64
+ kubefirst: "",
65
+ konstruct: "",
66
+ colony: ""
67
+ }
68
+ },
69
+ defaultVariants: {
70
+ variant: "default",
71
+ theme: "kubefirst"
72
+ }
73
+ });
74
+ export {
75
+ n as buttonVariants,
76
+ a as labelVariants,
77
+ t as numberInputVariants
78
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ProgressBarProps } from './ProgressBar.types';
3
+ export declare const ProgressBar: FC<ProgressBarProps>;
@@ -0,0 +1,37 @@
1
+ import { jsxs as e, jsx as i } from "react/jsx-runtime";
2
+ import "../../contexts/theme.context.js";
3
+ import { useTheme as l } from "../../contexts/theme.hook.js";
4
+ import "react";
5
+ import "../../js.cookie-OLEfuq_g.js";
6
+ import { cn as t } from "../../utils/index.js";
7
+ import { progressBarVariants as d, progressBarProgress as c } from "./ProgressBar.variants.js";
8
+ const j = ({
9
+ label: r,
10
+ theme: m,
11
+ percent: s,
12
+ status: n
13
+ }) => {
14
+ const { theme: a } = l(), o = m ?? a;
15
+ return /* @__PURE__ */ e("div", { className: "w-full", children: [
16
+ /* @__PURE__ */ e("div", { className: t("flex", r ? "justify-between" : "justify-end"), children: [
17
+ r ? /* @__PURE__ */ i("label", { className: "font-semibold", children: r }) : null,
18
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: [
19
+ s,
20
+ "%"
21
+ ] })
22
+ ] }),
23
+ /* @__PURE__ */ i("div", { className: d({ theme: o }), children: /* @__PURE__ */ i(
24
+ "div",
25
+ {
26
+ className: t(
27
+ c({ theme: o, status: n }),
28
+ s > 0 && s < 99 ? "transition-width duration-500" : "transition-colors duration-0"
29
+ ),
30
+ style: { width: `${s}%` }
31
+ }
32
+ ) })
33
+ ] });
34
+ };
35
+ export {
36
+ j as ProgressBar
37
+ };
@@ -0,0 +1,8 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { progressBarVariants } from './ProgressBar.variants';
3
+ export interface ProgressBarProps extends VariantProps<typeof progressBarVariants> {
4
+ className?: string;
5
+ label?: string;
6
+ percent: number;
7
+ status?: 'success' | 'progress';
8
+ }
@@ -0,0 +1,7 @@
1
+ export declare const progressBarVariants: (props?: ({
2
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const progressBarProgress: (props?: ({
5
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
6
+ status?: "progress" | "error" | "success" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,62 @@
1
+ import { c as s } from "../../index-BwYCDOHZ.js";
2
+ const e = s(
3
+ ["h-2", "rounded-full", "overflow-hidden", "mt-4", "bg-zinc-200"],
4
+ {
5
+ variants: {
6
+ theme: {
7
+ konstruct: "",
8
+ kubefirst: "",
9
+ colony: ""
10
+ }
11
+ },
12
+ defaultVariants: {
13
+ theme: "kubefirst"
14
+ }
15
+ }
16
+ ), r = s(
17
+ ["h-full", "bg-[length:100%_100%]", "animate-gradient-move"],
18
+ {
19
+ variants: {
20
+ theme: {
21
+ konstruct: "",
22
+ kubefirst: "",
23
+ colony: ""
24
+ },
25
+ status: {
26
+ success: "",
27
+ progress: "",
28
+ error: ""
29
+ }
30
+ },
31
+ compoundVariants: [
32
+ {
33
+ status: "progress",
34
+ theme: "kubefirst",
35
+ class: ["bg-kubefirst-gradient"]
36
+ },
37
+ {
38
+ status: "success",
39
+ theme: "kubefirst",
40
+ class: ["bg-[#81E2B4]"]
41
+ },
42
+ {
43
+ status: "progress",
44
+ theme: "konstruct",
45
+ class: ["bg-kubefirst-gradient"]
46
+ },
47
+ {
48
+ status: "progress",
49
+ theme: "colony",
50
+ class: ["bg-kubefirst-gradient"]
51
+ }
52
+ ],
53
+ defaultVariants: {
54
+ theme: "kubefirst",
55
+ status: "success"
56
+ }
57
+ }
58
+ );
59
+ export {
60
+ r as progressBarProgress,
61
+ e as progressBarVariants
62
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { RadioProps } from './Radio.types';
3
+ export declare const Radio: FC<RadioProps>;
@@ -0,0 +1,58 @@
1
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as x, useId as N, useCallback as b } from "react";
3
+ import "../../contexts/theme.context.js";
4
+ import { useTheme as j } from "../../contexts/theme.hook.js";
5
+ import "../../js.cookie-OLEfuq_g.js";
6
+ import { radioVariants as F } from "./Radio.variants.js";
7
+ const I = x(
8
+ ({
9
+ checked: i = !1,
10
+ className: m,
11
+ defaultChecked: a,
12
+ label: l,
13
+ name: s,
14
+ theme: c,
15
+ value: t,
16
+ onChange: e
17
+ }, d) => {
18
+ const p = N(), { theme: n } = j(), o = `${p}-${s}`, f = b(
19
+ (h) => {
20
+ e == null || e(h);
21
+ },
22
+ [e]
23
+ );
24
+ return /* @__PURE__ */ u(
25
+ "label",
26
+ {
27
+ htmlFor: o,
28
+ className: "inline-flex items-center cursor-pointer",
29
+ children: [
30
+ /* @__PURE__ */ r(
31
+ "input",
32
+ {
33
+ ref: d,
34
+ id: o,
35
+ type: "radio",
36
+ name: s,
37
+ value: t,
38
+ checked: i,
39
+ defaultChecked: a,
40
+ className: "hidden peer",
41
+ onChange: () => f(t)
42
+ }
43
+ ),
44
+ /* @__PURE__ */ r(
45
+ "span",
46
+ {
47
+ className: F({ className: m, theme: c ?? n })
48
+ }
49
+ ),
50
+ /* @__PURE__ */ r("span", { className: "ml-2", children: l })
51
+ ]
52
+ }
53
+ );
54
+ }
55
+ );
56
+ export {
57
+ I as Radio
58
+ };
@@ -0,0 +1,12 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { InputHTMLAttributes } from 'react';
3
+ import { radioVariants } from './Radio.variants';
4
+ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>, VariantProps<typeof radioVariants> {
5
+ checked?: boolean;
6
+ color?: string;
7
+ defaultChecked?: boolean;
8
+ label?: string;
9
+ name: string;
10
+ value: string;
11
+ onChange?: (value: string) => void;
12
+ }
@@ -0,0 +1,3 @@
1
+ export declare const radioVariants: (props?: ({
2
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,49 @@
1
+ import { c as e } from "../../index-BwYCDOHZ.js";
2
+ const o = e(
3
+ [
4
+ "border-2",
5
+ "border-gray-400",
6
+ "duration-300",
7
+ "h-4",
8
+ "inline-block",
9
+ "rounded-full",
10
+ "transition-all",
11
+ "w-4",
12
+ "flex",
13
+ "flex-col",
14
+ "items-center",
15
+ "justify-center",
16
+ "before:content-['']",
17
+ "before:rounded-full",
18
+ "before:w-0",
19
+ "before:h-0",
20
+ "before:duration-100",
21
+ "before:transition-all",
22
+ "peer-checked:before:h-[70%]",
23
+ "peer-checked:before:w-[70%]"
24
+ ],
25
+ {
26
+ variants: {
27
+ theme: {
28
+ colony: [
29
+ "peer-checked:border-red-700",
30
+ "peer-checked:before:bg-red-700"
31
+ ],
32
+ kubefirst: [
33
+ "peer-checked:border-kubefirst-purple-light",
34
+ "peer-checked:before:bg-kubefirst-purple-light"
35
+ ],
36
+ konstruct: [
37
+ "peer-checked:border-orange-600",
38
+ "peer-checked:before:bg-orange-600"
39
+ ]
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ theme: "kubefirst"
44
+ }
45
+ }
46
+ );
47
+ export {
48
+ o as radioVariants
49
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { RadioGroupProps } from './RadioGroup.types';
3
+ export declare const RadioGroup: FC<RadioGroupProps>;
@@ -0,0 +1,37 @@
1
+ import { jsx as m, Fragment as n } from "react/jsx-runtime";
2
+ import { useState as k, useCallback as l } from "react";
3
+ import { S as R } from "../../index-CCavb-1K.js";
4
+ import "../../contexts/theme.context.js";
5
+ import { useTheme as T } from "../../contexts/theme.hook.js";
6
+ import "../../js.cookie-OLEfuq_g.js";
7
+ import { Radio as b } from "../Radio/Radio.js";
8
+ const z = ({
9
+ options: o,
10
+ theme: r,
11
+ name: c,
12
+ asChild: s,
13
+ defaultValue: i,
14
+ onValueChange: e
15
+ }) => {
16
+ const p = s ? R : "div", { theme: d } = T(), [f, S] = k(i), h = l(
17
+ (t) => {
18
+ S(t), e == null || e(t);
19
+ },
20
+ [e]
21
+ );
22
+ return /* @__PURE__ */ m(p, { className: "flex gap-2", children: /* @__PURE__ */ m(n, { children: o.map(({ value: t, ...x }) => /* @__PURE__ */ m(
23
+ b,
24
+ {
25
+ value: t,
26
+ theme: r ?? d,
27
+ name: c,
28
+ checked: f === t,
29
+ onChange: () => h(t),
30
+ ...x
31
+ },
32
+ t
33
+ )) }) });
34
+ };
35
+ export {
36
+ z as RadioGroup
37
+ };
@@ -0,0 +1,11 @@
1
+ import { RadioProps } from '../Radio/Radio.types';
2
+ export interface RadioGroupProps {
3
+ label?: string;
4
+ name: string;
5
+ options: Omit<RadioProps, 'name'>[];
6
+ asChild?: boolean;
7
+ theme?: RadioProps['theme'];
8
+ className?: RadioProps['className'];
9
+ defaultValue?: string;
10
+ onValueChange?: (value: string) => void;
11
+ }
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { RangeProps } from './Range.types';
3
+ export declare const Range: FC<RangeProps>;
@@ -0,0 +1,70 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as R, useRef as V, useState as v, useImperativeHandle as T, useEffect as b, useCallback as j } from "react";
3
+ import { R as k, T as w, a as y, b as l } from "../../index-DFbnnPzA.js";
4
+ import { cn as C } from "../../utils/index.js";
5
+ import "../../contexts/theme.context.js";
6
+ import { useTheme as S } from "../../contexts/theme.hook.js";
7
+ import "../../js.cookie-OLEfuq_g.js";
8
+ import { rangeVariants as $, trackVariants as E, rangeOutsideVariants as H, thumbVariants as c } from "./Range.variants.js";
9
+ const J = R(
10
+ ({
11
+ label: n,
12
+ defaultValue: i = [0, 100],
13
+ name: o,
14
+ theme: u,
15
+ size: m,
16
+ showValue: h,
17
+ ...f
18
+ }, d) => {
19
+ const t = V(null), [a, p] = v(i), { theme: x } = S(), s = u ?? x;
20
+ T(d, () => t.current, [t]), b(() => {
21
+ t.current && (t.current.value = `[${a.toString()}]`);
22
+ }, [a]);
23
+ const N = j(
24
+ (g) => p(g),
25
+ []
26
+ );
27
+ return /* @__PURE__ */ r("div", { className: "w-full relative flex flex-col gap-3", children: [
28
+ /* @__PURE__ */ r(
29
+ "div",
30
+ {
31
+ className: C(
32
+ "flex items-center",
33
+ n ? "justify-between" : "justify-end"
34
+ ),
35
+ children: [
36
+ n ? /* @__PURE__ */ e("label", { children: n }) : null,
37
+ h ? /* @__PURE__ */ r("span", { className: "text-xs", children: [
38
+ a[0],
39
+ " - ",
40
+ a[1]
41
+ ] }) : null
42
+ ]
43
+ }
44
+ ),
45
+ /* @__PURE__ */ e("input", { ref: t, name: o, className: "hidden", type: "text" }),
46
+ /* @__PURE__ */ r(
47
+ k,
48
+ {
49
+ value: a,
50
+ className: $({ theme: s }),
51
+ onValueChange: N,
52
+ ...f,
53
+ children: [
54
+ /* @__PURE__ */ e(w, { className: E({ theme: s, size: m }), children: /* @__PURE__ */ e(
55
+ y,
56
+ {
57
+ className: H({ theme: s })
58
+ }
59
+ ) }),
60
+ /* @__PURE__ */ e(l, { className: c({ theme: s, size: m }) }),
61
+ /* @__PURE__ */ e(l, { className: c({ theme: s, size: m }) })
62
+ ]
63
+ }
64
+ )
65
+ ] });
66
+ }
67
+ );
68
+ export {
69
+ J as Range
70
+ };
@@ -0,0 +1,13 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { SliderProps as SliderPropsBase } from '@radix-ui/react-slider';
3
+ import { rangeVariants } from './Range.variants';
4
+ export interface RangeProps extends VariantProps<typeof rangeVariants> {
5
+ className?: string;
6
+ defaultValue?: SliderPropsBase['defaultValue'];
7
+ label?: string;
8
+ max?: SliderPropsBase['max'];
9
+ min?: SliderPropsBase['min'];
10
+ name?: string;
11
+ showValue?: boolean;
12
+ size?: 'sm' | 'md' | 'lg';
13
+ }
@@ -0,0 +1,14 @@
1
+ export declare const rangeVariants: (props?: ({
2
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const rangeOutsideVariants: (props?: ({
5
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export declare const trackVariants: (props?: ({
8
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
9
+ size?: "sm" | "lg" | "md" | null | undefined;
10
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
11
+ export declare const thumbVariants: (props?: ({
12
+ theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
13
+ size?: "sm" | "lg" | "md" | null | undefined;
14
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,93 @@
1
+ import { c as e } from "../../index-BwYCDOHZ.js";
2
+ const r = e(
3
+ [
4
+ "relative",
5
+ "flex",
6
+ "items-center",
7
+ "w-full",
8
+ "border",
9
+ "border-gray-200",
10
+ "rounded-full",
11
+ "shadow-sm"
12
+ ],
13
+ {
14
+ variants: {
15
+ theme: {
16
+ kubefirst: "",
17
+ konstruct: "",
18
+ colony: ""
19
+ }
20
+ },
21
+ defaultVariants: {
22
+ theme: "kubefirst"
23
+ }
24
+ }
25
+ ), s = e(["absolute", "h-full"], {
26
+ variants: {
27
+ theme: {
28
+ kubefirst: ["bg-kubefirst-purple-dark"],
29
+ konstruct: ["bg-orange-500"],
30
+ colony: ["bg-red-500"]
31
+ }
32
+ },
33
+ defaultVariants: {
34
+ theme: "kubefirst"
35
+ }
36
+ }), a = e(
37
+ ["relative", "flex-grow", "bg-gray-100", "rounded-full"],
38
+ {
39
+ variants: {
40
+ theme: {
41
+ kubefirst: "",
42
+ konstruct: "",
43
+ colony: ""
44
+ },
45
+ size: {
46
+ sm: ["h-1"],
47
+ md: ["h-2"],
48
+ lg: ["h-3"]
49
+ }
50
+ },
51
+ defaultVariants: {
52
+ theme: "kubefirst",
53
+ size: "md"
54
+ }
55
+ }
56
+ ), o = e(
57
+ [
58
+ "block",
59
+ "w-5",
60
+ "h-5",
61
+ "rounded-full",
62
+ "cursor-pointer",
63
+ "focus-visible:outline-none",
64
+ "shadow-md",
65
+ "bg-white",
66
+ "border",
67
+ "border-gray-300"
68
+ ],
69
+ {
70
+ variants: {
71
+ theme: {
72
+ kubefirst: "",
73
+ konstruct: "",
74
+ colony: ""
75
+ },
76
+ size: {
77
+ sm: ["w-5", "h-5"],
78
+ md: ["w-6", "h-6"],
79
+ lg: ["w-7", "h-7"]
80
+ }
81
+ },
82
+ defaultVariants: {
83
+ theme: "kubefirst",
84
+ size: "md"
85
+ }
86
+ }
87
+ );
88
+ export {
89
+ s as rangeOutsideVariants,
90
+ r as rangeVariants,
91
+ o as thumbVariants,
92
+ a as trackVariants
93
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { SliderProps } from './Slider.types';
3
+ export declare const Slider: FC<SliderProps>;
@@ -0,0 +1,52 @@
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as N, useRef as v, useState as T, useImperativeHandle as V, useEffect as b, useCallback as R } from "react";
3
+ import { R as g, T as j, b as k } from "../../index-DFbnnPzA.js";
4
+ import "../../contexts/theme.context.js";
5
+ import { useTheme as w } from "../../contexts/theme.hook.js";
6
+ import "../../js.cookie-OLEfuq_g.js";
7
+ import { cn as y } from "../../utils/index.js";
8
+ import { sliderVariants as C, trackVariants as S, thumbVariants as E } from "./Slider.variants.js";
9
+ const J = N(
10
+ ({ label: a, defaultValue: m = [0], name: i, theme: c, size: l, showValue: o, ...u }, f) => {
11
+ const e = v(null), [r, h] = T(m), { theme: d } = w(), s = c ?? d;
12
+ V(f, () => e.current, [e]), b(() => {
13
+ e.current && (e.current.value = r.toString());
14
+ }, [r]);
15
+ const p = R(
16
+ (x) => h(x),
17
+ []
18
+ );
19
+ return /* @__PURE__ */ n("div", { className: "w-full relative flex flex-col gap-3", children: [
20
+ /* @__PURE__ */ n(
21
+ "div",
22
+ {
23
+ className: y(
24
+ "flex items-center",
25
+ a ? "justify-between" : "justify-end"
26
+ ),
27
+ children: [
28
+ a ? /* @__PURE__ */ t("label", { children: a }) : null,
29
+ o ? /* @__PURE__ */ t("span", { className: "text-xs", children: r }) : null
30
+ ]
31
+ }
32
+ ),
33
+ /* @__PURE__ */ t("input", { ref: e, name: i, className: "hidden", type: "number" }),
34
+ /* @__PURE__ */ n(
35
+ g,
36
+ {
37
+ value: r,
38
+ className: C({ theme: s }),
39
+ onValueChange: p,
40
+ ...u,
41
+ children: [
42
+ /* @__PURE__ */ t(j, { className: S({ theme: s, size: l }) }),
43
+ /* @__PURE__ */ t(k, { className: E({ theme: s, size: l }) })
44
+ ]
45
+ }
46
+ )
47
+ ] });
48
+ }
49
+ );
50
+ export {
51
+ J as Slider
52
+ };
@@ -0,0 +1,13 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { SliderProps as SliderPropsBase } from '@radix-ui/react-slider';
3
+ import { sliderVariants } from './Slider.variants';
4
+ export interface SliderProps extends VariantProps<typeof sliderVariants> {
5
+ className?: string;
6
+ defaultValue?: SliderPropsBase['defaultValue'];
7
+ label?: string;
8
+ max?: SliderPropsBase['max'];
9
+ min?: SliderPropsBase['min'];
10
+ name?: string;
11
+ showValue?: boolean;
12
+ size?: 'sm' | 'md' | 'lg';
13
+ }