@konstructio/ui 0.0.12-alpha.1 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/{index-BVppSRDQ.js → AlertDialogTrigger-D4Tm_9M0.js} +21 -19
  2. package/dist/{Combination-BQYb0Gw7.js → Combination-Cmu9JRkv.js} +72 -72
  3. package/dist/{Modal-W2GbkC_F.js → Modal-L73dmnHv.js} +246 -238
  4. package/dist/{chevron-up-DgLBQCKD.js → chevron-up-CvquEaNg.js} +1 -1
  5. package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
  6. package/dist/components/AlertDialog/AlertDialog.js +23 -20
  7. package/dist/components/AlertDialog/AlertDialog.types.d.ts +18 -0
  8. package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
  9. package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
  10. package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
  11. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +6 -3
  12. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +6 -0
  13. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +1 -0
  14. package/dist/components/AlertDialog/components/index.d.ts +1 -0
  15. package/dist/components/AlertDialog/components/index.js +1 -1
  16. package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
  17. package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
  18. package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
  19. package/dist/components/Autocomplete/Autocomplete.js +17 -15
  20. package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
  21. package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
  22. package/dist/components/Autocomplete/Autocomplete.variants.d.ts +8 -0
  23. package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
  24. package/dist/components/Autocomplete/components/List/List.js +7 -7
  25. package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
  26. package/dist/components/Autocomplete/components/List/List.types.js +1 -0
  27. package/dist/components/Autocomplete/components/List/List.variants.d.ts +16 -0
  28. package/dist/components/Autocomplete/components/index.d.ts +1 -0
  29. package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
  30. package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
  31. package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
  32. package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
  33. package/dist/components/Breadcrumb/Breadcrumb.js +69 -68
  34. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +11 -0
  35. package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
  36. package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +12 -0
  37. package/dist/components/Breadcrumb/Breadcrumb.variants.js +17 -16
  38. package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
  39. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +3 -2
  40. package/dist/components/Button/Button.d.ts +4 -0
  41. package/dist/components/Button/Button.js +16 -14
  42. package/dist/components/Button/Button.types.d.ts +7 -0
  43. package/dist/components/Button/Button.types.js +1 -0
  44. package/dist/components/Button/Button.variants.d.ts +7 -0
  45. package/dist/components/Card/Card.d.ts +4 -0
  46. package/dist/components/Card/Card.js +12 -10
  47. package/dist/components/Card/Card.types.d.ts +8 -0
  48. package/dist/components/Card/Card.types.js +1 -0
  49. package/dist/components/Card/Card.variants.d.ts +10 -0
  50. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  51. package/dist/components/Checkbox/Checkbox.js +15 -13
  52. package/dist/components/Checkbox/Checkbox.types.d.ts +14 -0
  53. package/dist/components/Checkbox/Checkbox.types.js +1 -0
  54. package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
  55. package/dist/components/Dropdown/Dropdown.d.ts +3 -0
  56. package/dist/components/Dropdown/Dropdown.js +6 -4
  57. package/dist/components/Dropdown/Dropdown.types.d.ts +16 -0
  58. package/dist/components/Dropdown/Dropdown.types.js +1 -0
  59. package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
  60. package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
  61. package/dist/components/Dropdown/components/List/List.d.ts +3 -0
  62. package/dist/components/Dropdown/components/List/List.js +10 -9
  63. package/dist/components/Dropdown/components/List/List.types.d.ts +6 -0
  64. package/dist/components/Dropdown/components/List/List.types.js +1 -0
  65. package/dist/components/Dropdown/components/List/List.variants.d.ts +3 -0
  66. package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
  67. package/dist/components/Dropdown/components/ListItem/ListItem.js +21 -20
  68. package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +4 -0
  69. package/dist/components/Dropdown/components/ListItem/ListItem.types.js +1 -0
  70. package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +3 -0
  71. package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
  72. package/dist/components/Dropdown/components/Wrapper.js +34 -31
  73. package/dist/components/Dropdown/components/index.d.ts +3 -0
  74. package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
  75. package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
  76. package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +5 -0
  77. package/dist/components/Dropdown/contexts/dropdown.provider.js +4 -4
  78. package/dist/components/Dropdown/contexts/index.d.ts +2 -0
  79. package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
  80. package/dist/components/Dropdown/hooks/useDropdown.js +14 -12
  81. package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
  82. package/dist/components/Dropdown/hooks/useNavigationList.js +10 -8
  83. package/dist/components/Input/Input.d.ts +3 -0
  84. package/dist/components/Input/Input.js +14 -12
  85. package/dist/components/Input/Input.types.d.ts +9 -0
  86. package/dist/components/Input/Input.types.js +1 -0
  87. package/dist/components/Input/Input.variants.d.ts +4 -0
  88. package/dist/components/Modal/Modal.d.ts +8 -0
  89. package/dist/components/Modal/Modal.js +3 -3
  90. package/dist/components/Modal/Modal.types.d.ts +12 -0
  91. package/dist/components/Modal/Modal.types.js +1 -0
  92. package/dist/components/Modal/components/Body/Body.d.ts +3 -0
  93. package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
  94. package/dist/components/Modal/components/Body/Body.types.js +1 -0
  95. package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
  96. package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
  97. package/dist/components/Modal/components/Footer/Footer.types.js +1 -0
  98. package/dist/components/Modal/components/Header/Header.d.ts +3 -0
  99. package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
  100. package/dist/components/Modal/components/Header/Header.types.js +1 -0
  101. package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
  102. package/dist/components/Modal/components/Wrapper/Wrapper.js +9 -7
  103. package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +7 -0
  104. package/dist/components/Modal/components/Wrapper/Wrapper.types.js +1 -0
  105. package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +6 -0
  106. package/dist/components/Modal/components/index.d.ts +4 -0
  107. package/dist/components/Modal/components/index.js +1 -1
  108. package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
  109. package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
  110. package/dist/components/Modal/contexts/Modal.provider.js +4 -4
  111. package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
  112. package/dist/components/Modal/contexts/Modal.types.js +1 -0
  113. package/dist/components/Modal/contexts/index.d.ts +1 -0
  114. package/dist/components/Modal/hooks/index.d.ts +1 -0
  115. package/dist/components/Modal/hooks/useModal.d.ts +9 -0
  116. package/dist/components/NumberInput/NumberInput.d.ts +3 -0
  117. package/dist/components/NumberInput/NumberInput.js +11 -9
  118. package/dist/components/NumberInput/NumberInput.types.d.ts +11 -0
  119. package/dist/components/NumberInput/NumberInput.types.js +1 -0
  120. package/dist/components/NumberInput/NumberInput.variants.d.ts +11 -0
  121. package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
  122. package/dist/components/ProgressBar/ProgressBar.js +16 -13
  123. package/dist/components/ProgressBar/ProgressBar.types.d.ts +8 -0
  124. package/dist/components/ProgressBar/ProgressBar.types.js +1 -0
  125. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +7 -0
  126. package/dist/components/Radio/Radio.d.ts +3 -0
  127. package/dist/components/Radio/Radio.js +37 -55
  128. package/dist/components/Radio/Radio.types.d.ts +12 -0
  129. package/dist/components/Radio/Radio.types.js +1 -0
  130. package/dist/components/Radio/Radio.variants.d.ts +3 -0
  131. package/dist/components/Radio/Radio.variants.js +16 -69
  132. package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
  133. package/dist/components/RadioGroup/RadioGroup.js +27 -37
  134. package/dist/components/RadioGroup/RadioGroup.types.d.ts +12 -0
  135. package/dist/components/RadioGroup/RadioGroup.types.js +1 -0
  136. package/dist/components/Range/Range.d.ts +3 -0
  137. package/dist/components/Range/Range.js +22 -20
  138. package/dist/components/Range/Range.types.d.ts +13 -0
  139. package/dist/components/Range/Range.types.js +1 -0
  140. package/dist/components/Range/Range.variants.d.ts +14 -0
  141. package/dist/components/Sidebar/Sidebar.d.ts +5 -0
  142. package/dist/components/Sidebar/Sidebar.js +22 -20
  143. package/dist/components/Sidebar/Sidebar.types.d.ts +18 -0
  144. package/dist/components/Sidebar/Sidebar.types.js +1 -0
  145. package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
  146. package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
  147. package/dist/components/Sidebar/components/Footer/Footer.js +12 -9
  148. package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
  149. package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
  150. package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
  151. package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
  152. package/dist/components/Sidebar/components/Logo/Logo.js +12 -9
  153. package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
  154. package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
  155. package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
  156. package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
  157. package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -12
  158. package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
  159. package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
  160. package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
  161. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
  162. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +26 -24
  163. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
  164. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
  165. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
  166. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
  167. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +20 -17
  168. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
  169. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
  170. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +4 -0
  171. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
  172. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +11 -8
  173. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
  174. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
  175. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
  176. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
  177. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +13 -10
  178. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
  179. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
  180. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
  181. package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
  182. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +27 -29
  183. package/dist/components/Sidebar/components/index.d.ts +15 -0
  184. package/dist/components/Slider/Slider.d.ts +3 -0
  185. package/dist/components/Slider/Slider.js +20 -18
  186. package/dist/components/Slider/Slider.types.d.ts +13 -0
  187. package/dist/components/Slider/Slider.types.js +1 -0
  188. package/dist/components/Slider/Slider.variants.d.ts +11 -0
  189. package/dist/components/Switch/Switch.d.ts +3 -0
  190. package/dist/components/Switch/Switch.js +21 -19
  191. package/dist/components/Switch/Switch.types.d.ts +10 -0
  192. package/dist/components/Switch/Switch.types.js +1 -0
  193. package/dist/components/Switch/Switch.variants.d.ts +6 -0
  194. package/dist/components/Tag/Tag.d.ts +3 -0
  195. package/dist/components/Tag/Tag.types.d.ts +4 -0
  196. package/dist/components/Tag/Tag.types.js +1 -0
  197. package/dist/components/Tag/Tag.variants.d.ts +3 -0
  198. package/dist/components/TagSelect/TagSelect.d.ts +3 -0
  199. package/dist/components/TagSelect/TagSelect.js +21 -19
  200. package/dist/components/TagSelect/TagSelect.types.d.ts +9 -0
  201. package/dist/components/TagSelect/TagSelect.types.js +1 -0
  202. package/dist/components/TagSelect/TagSelect.variants.d.ts +9 -0
  203. package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
  204. package/dist/components/TextArea/TextArea.d.ts +3 -0
  205. package/dist/components/TextArea/TextArea.js +19 -17
  206. package/dist/components/TextArea/TextArea.types.d.ts +10 -0
  207. package/dist/components/TextArea/TextArea.types.js +1 -0
  208. package/dist/components/TextArea/TextArea.variants.d.ts +3 -0
  209. package/dist/components/Toast/Toast.d.ts +3 -0
  210. package/dist/components/Toast/Toast.js +54 -52
  211. package/dist/components/Toast/Toast.types.d.ts +12 -0
  212. package/dist/components/Toast/Toast.types.js +1 -0
  213. package/dist/components/Toast/Toast.variants.d.ts +9 -0
  214. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  215. package/dist/components/Tooltip/Tooltip.js +12 -10
  216. package/dist/components/Tooltip/Tooltip.types.d.ts +8 -0
  217. package/dist/components/Tooltip/Tooltip.types.js +1 -0
  218. package/dist/components/Tooltip/Tooltip.variants.d.ts +8 -0
  219. package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
  220. package/dist/components/index.d.ts +21 -0
  221. package/dist/components/index.js +44 -50
  222. package/dist/contexts/index.d.ts +3 -0
  223. package/dist/contexts/theme.context.d.ts +6 -0
  224. package/dist/contexts/theme.hook.d.ts +7 -0
  225. package/dist/contexts/theme.provider.d.ts +6 -0
  226. package/dist/contexts/theme.provider.js +14 -84
  227. package/dist/hooks/index.d.ts +1 -0
  228. package/dist/hooks/useToggle.d.ts +1 -0
  229. package/dist/{index-1GLoikpT.js → index-BaNV0qac.js} +6585 -6555
  230. package/dist/{index-CoqDsznq.js → index-BedjZUuB.js} +1 -1
  231. package/dist/{index-KEdwcThH.js → index-BtibbG81.js} +1 -1
  232. package/dist/{index-C5psggHV.js → index-D68N8v8R.js} +17 -17
  233. package/dist/{index-CJsYodgi.js → index-z-AJyzdv.js} +10 -10
  234. package/dist/index.d.ts +4 -522
  235. package/dist/index.js +53 -59
  236. package/dist/js.cookie-OLEfuq_g.js +74 -0
  237. package/dist/package.json +1 -1
  238. package/dist/plugins/index.d.ts +1 -0
  239. package/dist/plugins/konstruct.d.ts +4 -0
  240. package/dist/plugins/konstruct.js +3 -3
  241. package/dist/plugins/utils/colors.d.ts +328 -0
  242. package/dist/styles.css +1 -1
  243. package/dist/styles.d.ts +0 -0
  244. package/dist/styles.js +1 -1
  245. package/dist/useBreadcrumb-DxYsZvj_.js +1398 -0
  246. package/dist/utils/index.d.ts +4 -0
  247. package/dist/{x-DU-Zw-L_.js → x-CRBgmX1Q.js} +1 -1
  248. package/package.json +1 -1
  249. package/dist/components/Breadcrumb/components/Item/Item.js +0 -61
  250. package/dist/components/Breadcrumb/components/Item/Item.variants.js +0 -90
  251. package/dist/components/Breadcrumb/components/index.js +0 -4
  252. package/dist/components/RadioCard/RadioCard.js +0 -41
  253. package/dist/components/RadioCard/RadioCard.variants.js +0 -19
  254. package/dist/components/RadioCardGroup/RadioCardGroup.js +0 -47
  255. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +0 -21
  256. package/dist/components/RadioGroup/RadioGroup.variants.js +0 -21
  257. package/dist/useBreadcrumb-CojbXFVD.js +0 -1279
@@ -1,10 +1,12 @@
1
1
  import { jsxs as y, jsx as u } from "react/jsx-runtime";
2
- import { R as j } from "../../index-KEdwcThH.js";
2
+ import { R as j } from "../../index-BtibbG81.js";
3
3
  import p, { forwardRef as d, useId as E, useState as T, useCallback as x } from "react";
4
+ import "../../contexts/theme.context.js";
5
+ import { useTheme as $ } from "../../contexts/theme.hook.js";
6
+ import "../../js.cookie-OLEfuq_g.js";
4
7
  import { cn as h } from "../../utils/index.js";
5
- import { labelVariants as $, buttonVariants as P, numberInputVariants as L } from "./NumberInput.variants.js";
6
- import { P as a } from "../../index-C5psggHV.js";
7
- import { useTheme as W } from "../../contexts/theme.hook.js";
8
+ import { labelVariants as L, buttonVariants as P, numberInputVariants as W } from "./NumberInput.variants.js";
9
+ import { P as a } from "../../index-D68N8v8R.js";
8
10
  function v() {
9
11
  return v = Object.assign || function(e) {
10
12
  for (var o = 1; o < arguments.length; o++) {
@@ -114,7 +116,7 @@ g.propTypes = {
114
116
  size: a.oneOfType([a.string, a.number])
115
117
  };
116
118
  g.displayName = "Plus";
117
- const J = d(
119
+ const Q = d(
118
120
  ({
119
121
  className: e,
120
122
  init: o,
@@ -125,7 +127,7 @@ const J = d(
125
127
  theme: f,
126
128
  onChange: s
127
129
  }, k) => {
128
- const { theme: I } = W(), m = f ?? I, N = E(), [c, w] = T(() => o || 0), z = x(() => {
130
+ const { theme: I } = $(), m = f ?? I, N = E(), [c, w] = T(() => o || 0), z = x(() => {
129
131
  let l = 0;
130
132
  n === 1 / 0 ? l = c - 1 : l = Math.max(n, c - 1), w(l), s == null || s(l);
131
133
  }, [c, n, s]), _ = x(() => {
@@ -138,7 +140,7 @@ const J = d(
138
140
  {
139
141
  htmlFor: i ?? N,
140
142
  className: h(
141
- $({
143
+ L({
142
144
  theme: m
143
145
  })
144
146
  ),
@@ -168,7 +170,7 @@ const J = d(
168
170
  value: c,
169
171
  name: i,
170
172
  className: h(
171
- L({ className: e, theme: m })
173
+ W({ className: e, theme: m })
172
174
  ),
173
175
  readOnly: !0,
174
176
  "aria-label": r
@@ -193,5 +195,5 @@ const J = d(
193
195
  }
194
196
  );
195
197
  export {
196
- J as NumberInput
198
+ Q as NumberInput
197
199
  };
@@ -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" | "colony" | "civo" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const buttonVariants: (props?: ({
5
+ theme?: "kubefirst" | "colony" | "civo" | 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" | "colony" | "civo" | null | undefined;
11
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ProgressBarProps } from './ProgressBar.types';
3
+ export declare const ProgressBar: FC<ProgressBarProps>;
@@ -1,27 +1,30 @@
1
- import { jsxs as r, jsx as i } from "react/jsx-runtime";
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";
2
6
  import { cn as o } from "../../utils/index.js";
3
- import { progressBarVariants as l, progressBarProgress as d } from "./ProgressBar.variants.js";
4
- import { useTheme as c } from "../../contexts/theme.hook.js";
5
- const p = ({
6
- label: e,
7
+ import { progressBarVariants as d, progressBarProgress as c } from "./ProgressBar.variants.js";
8
+ const j = ({
9
+ label: r,
7
10
  theme: m,
8
11
  percent: s,
9
12
  status: n
10
13
  }) => {
11
- const { theme: a } = c(), t = m ?? a;
12
- return /* @__PURE__ */ r("div", { className: "w-full", children: [
13
- /* @__PURE__ */ r("div", { className: o("flex", e ? "justify-between" : "justify-end"), children: [
14
- e ? /* @__PURE__ */ i("label", { className: "font-semibold", children: e }) : null,
15
- /* @__PURE__ */ r("span", { className: "font-semibold", children: [
14
+ const { theme: a } = l(), t = m ?? a;
15
+ return /* @__PURE__ */ e("div", { className: "w-full", children: [
16
+ /* @__PURE__ */ e("div", { className: o("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: [
16
19
  s,
17
20
  "%"
18
21
  ] })
19
22
  ] }),
20
- /* @__PURE__ */ i("div", { className: o(l({ theme: t })), children: /* @__PURE__ */ i(
23
+ /* @__PURE__ */ i("div", { className: o(d({ theme: t })), children: /* @__PURE__ */ i(
21
24
  "div",
22
25
  {
23
26
  className: o(
24
- d({ theme: t, status: n }),
27
+ c({ theme: t, status: n }),
25
28
  s > 0 && s < 99 ? "transition-width duration-500" : "transition-colors duration-0"
26
29
  ),
27
30
  style: { width: `${s}%` }
@@ -30,5 +33,5 @@ const p = ({
30
33
  ] });
31
34
  };
32
35
  export {
33
- p as ProgressBar
36
+ j as ProgressBar
34
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" | "colony" | "civo" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const progressBarProgress: (props?: ({
5
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
6
+ status?: "progress" | "error" | "success" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { RadioProps } from './Radio.types';
3
+ export declare const Radio: FC<RadioProps>;
@@ -1,79 +1,61 @@
1
- import { jsxs as T, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as V, useId as j, useCallback as w } from "react";
3
- import { cn as r } from "../../utils/index.js";
4
- import { wrapperRadioVariants as F, radioVariants as $, labelRadioVariants as y } from "./Radio.variants.js";
5
- import { useTheme as I } from "../../contexts/theme.hook.js";
6
- const D = V(
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 { cn as F } from "../../utils/index.js";
7
+ import { radioVariants as R } from "./Radio.variants.js";
8
+ const q = x(
7
9
  ({
8
- checked: t = !1,
9
- className: c,
10
- defaultChecked: o,
11
- disabled: a,
12
- label: d,
13
- labelTextClassName: p,
14
- name: i,
15
- theme: n,
16
- value: m,
17
- wrapperClassName: f,
18
- onChange: s
19
- }, h) => {
20
- const N = j(), { theme: u } = I(), l = `${N}-${i}`, x = n ?? u, R = w(
21
- (b) => {
22
- s == null || s(b);
10
+ checked: m = !1,
11
+ className: i,
12
+ defaultChecked: a,
13
+ label: c,
14
+ name: t,
15
+ theme: l,
16
+ value: s,
17
+ onChange: e
18
+ }, p) => {
19
+ const d = N(), { theme: n } = j(), o = `${d}-${t}`, f = b(
20
+ (h) => {
21
+ e == null || e(h);
23
22
  },
24
- [s]
23
+ [e]
25
24
  );
26
- return /* @__PURE__ */ T(
25
+ return /* @__PURE__ */ u(
27
26
  "label",
28
27
  {
29
- htmlFor: l,
30
- className: r(
31
- F({
32
- className: f,
33
- disabled: a || !1
34
- })
35
- ),
28
+ htmlFor: o,
29
+ className: "inline-flex items-center cursor-pointer",
36
30
  children: [
37
- /* @__PURE__ */ e(
31
+ /* @__PURE__ */ r(
38
32
  "input",
39
33
  {
40
- ref: h,
41
- id: l,
34
+ ref: p,
35
+ id: o,
42
36
  type: "radio",
43
- name: i,
44
- value: m,
45
- checked: t,
46
- defaultChecked: o,
37
+ name: t,
38
+ value: s,
39
+ checked: m,
40
+ defaultChecked: a,
47
41
  className: "hidden peer",
48
- onChange: () => R(m),
49
- disabled: a
42
+ onChange: () => f(s)
50
43
  }
51
44
  ),
52
- /* @__PURE__ */ e(
45
+ /* @__PURE__ */ r(
53
46
  "span",
54
47
  {
55
- className: r(
56
- $({
57
- className: c,
58
- theme: x,
59
- disabled: a || !1,
60
- checked: t || o || !1
61
- })
48
+ className: F(
49
+ R({ className: i, theme: l ?? n })
62
50
  )
63
51
  }
64
52
  ),
65
- /* @__PURE__ */ e(
66
- "span",
67
- {
68
- className: r(y({ className: p })),
69
- children: d
70
- }
71
- )
53
+ /* @__PURE__ */ r("span", { className: "ml-2", children: c })
72
54
  ]
73
55
  }
74
56
  );
75
57
  }
76
58
  );
77
59
  export {
78
- D as Radio
60
+ q as Radio
79
61
  };
@@ -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" | "colony" | "civo" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,25 +1,14 @@
1
1
  import { c as e } from "../../index-BNmRGtA6.js";
2
- const a = e(
3
- ["inline-flex", "items-center", "cursor-pointer", "gap-2", "w-max"],
4
- {
5
- variants: {
6
- disabled: {
7
- true: ["cursor-not-allowed"],
8
- false: ["cursor-pointer"]
9
- }
10
- },
11
- defaultVariants: {
12
- disabled: !1
13
- }
14
- }
15
- ), o = e(
2
+ const o = e(
16
3
  [
17
- "border",
18
- "border-zinc-400",
4
+ "border-2",
5
+ "border-gray-400",
19
6
  "duration-300",
7
+ "h-4",
20
8
  "inline-block",
21
9
  "rounded-full",
22
10
  "transition-all",
11
+ "w-4",
23
12
  "flex",
24
13
  "flex-col",
25
14
  "items-center",
@@ -30,70 +19,28 @@ const a = e(
30
19
  "before:h-0",
31
20
  "before:duration-100",
32
21
  "before:transition-all",
33
- "h-4",
34
- "w-4",
35
22
  "peer-checked:before:h-[70%]",
36
23
  "peer-checked:before:w-[70%]"
37
24
  ],
38
25
  {
39
26
  variants: {
40
27
  theme: {
41
- colony: "",
42
- kubefirst: "",
43
- civo: ""
44
- },
45
- disabled: {
46
- true: "",
47
- false: ""
48
- },
49
- checked: {
50
- true: "",
51
- false: ""
52
- }
53
- },
54
- compoundVariants: [
55
- {
56
- theme: "kubefirst",
57
- disabled: !1,
58
- checked: [!0, !1],
59
- class: [
28
+ colony: [
29
+ "peer-checked:border-red-700",
30
+ "peer-checked:before:bg-red-700"
31
+ ],
32
+ kubefirst: [
60
33
  "peer-checked:border-kubefirst-primary",
61
34
  "peer-checked:before:bg-kubefirst-primary"
62
- ]
63
- },
64
- {
65
- theme: "kubefirst",
66
- disabled: !0,
67
- checked: !0,
68
- class: [
69
- "peer-checked:border-zinc-400",
70
- "peer-checked:before:bg-zinc-400",
71
- "cursor-not-allowed",
72
- "[&+span]:cursor-not-allowed"
73
- ]
74
- },
75
- {
76
- theme: "kubefirst",
77
- disabled: !0,
78
- checked: !1,
79
- class: [
80
- "peer-checked:border-zinc-300",
81
- "peer-checked:border-zinc-300",
82
- "peer-checked:before:bg-zinc-300",
83
- "cursor-not-allowed",
84
- "[&+span]:cursor-not-allowed",
85
- "bg-zinc-50"
86
- ]
35
+ ],
36
+ civo: ""
87
37
  }
88
- ],
38
+ },
89
39
  defaultVariants: {
90
- theme: "kubefirst",
91
- disabled: !1
40
+ theme: "kubefirst"
92
41
  }
93
42
  }
94
- ), t = e(["text-sm", "text-zinc-700"]);
43
+ );
95
44
  export {
96
- t as labelRadioVariants,
97
- o as radioVariants,
98
- a as wrapperRadioVariants
45
+ o as radioVariants
99
46
  };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { RadioGroupProps } from './RadioGroup.types';
3
+ export declare const RadioGroup: FC<RadioGroupProps>;
@@ -1,51 +1,41 @@
1
- import { jsx as o, Fragment as k } from "react/jsx-runtime";
2
- import { S as G } from "../../index-DoOsnuB6.js";
3
- import { useState as R, useCallback as T } from "react";
4
- import { cn as r } from "../../utils/index.js";
5
- import { Radio as b } from "../Radio/Radio.js";
6
- import { radioGroupVariants as j } from "./RadioGroup.variants.js";
7
- import { useTheme as F } from "../../contexts/theme.hook.js";
8
- const E = ({
9
- asChild: e,
10
- className: s,
11
- defaultChecked: c,
1
+ import { jsx as o, Fragment as N } from "react/jsx-runtime";
2
+ import { S as R } from "../../index-DoOsnuB6.js";
3
+ import { useState as T, useCallback as a } from "react";
4
+ import "../../contexts/theme.context.js";
5
+ import { useTheme as b } from "../../contexts/theme.hook.js";
6
+ import "../../js.cookie-OLEfuq_g.js";
7
+ import { cn as e } from "../../utils/index.js";
8
+ import { Radio as j } from "../Radio/Radio.js";
9
+ const D = ({
10
+ asChild: r,
11
+ className: c,
12
+ defaultValue: s,
12
13
  name: i,
13
14
  options: p,
14
15
  theme: d,
15
16
  wrapperClassName: f,
16
- direction: a,
17
17
  onValueChange: m
18
18
  }) => {
19
- const n = e ? G : "div", { theme: S } = F(), [h, l] = R(
20
- () => c
21
- ), x = T(
19
+ const S = r ? R : "div", { theme: h } = b(), [n, x] = T(s), l = a(
22
20
  (t) => {
23
- l(t), m == null || m(t);
21
+ x(t), m == null || m(t);
24
22
  },
25
23
  [m]
26
24
  );
27
- return /* @__PURE__ */ o(
28
- n,
25
+ return /* @__PURE__ */ o(S, { className: e("flex gap-2", f), children: /* @__PURE__ */ o(N, { children: p.map(({ value: t, ...k }) => /* @__PURE__ */ o(
26
+ j,
29
27
  {
30
- className: r(
31
- j({ className: f, direction: a })
32
- ),
33
- children: /* @__PURE__ */ o(k, { children: p.map(({ value: t, ...N }) => /* @__PURE__ */ o(
34
- b,
35
- {
36
- value: t,
37
- theme: d ?? S,
38
- name: i,
39
- className: r(s),
40
- checked: h === t,
41
- onChange: () => x(t),
42
- ...N
43
- },
44
- t
45
- )) })
46
- }
47
- );
28
+ value: t,
29
+ theme: d ?? h,
30
+ name: i,
31
+ className: e(c),
32
+ checked: n === t,
33
+ onChange: () => l(t),
34
+ ...k
35
+ },
36
+ t
37
+ )) }) });
48
38
  };
49
39
  export {
50
- E as RadioGroup
40
+ D as RadioGroup
51
41
  };
@@ -0,0 +1,12 @@
1
+ import { RadioProps } from '../Radio/Radio.types';
2
+ export interface RadioGroupProps {
3
+ asChild?: boolean;
4
+ className?: RadioProps['className'];
5
+ defaultValue?: string;
6
+ label?: string;
7
+ name: string;
8
+ options: Omit<RadioProps, 'name'>[];
9
+ theme?: RadioProps['theme'];
10
+ wrapperClassName?: string;
11
+ onValueChange?: (value: string) => void;
12
+ }
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { RangeProps } from './Range.types';
3
+ export declare const Range: FC<RangeProps>;
@@ -1,20 +1,22 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { R as V, T as v, b as T, a as c } from "../../index-CJsYodgi.js";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { R as V, T as v, a as T, b as c } from "../../index-z-AJyzdv.js";
3
3
  import { forwardRef as b, useRef as j, useState as k, useImperativeHandle as w, useEffect as y, useCallback as C } from "react";
4
+ import "../../contexts/theme.context.js";
5
+ import { useTheme as S } from "../../contexts/theme.hook.js";
6
+ import "../../js.cookie-OLEfuq_g.js";
4
7
  import { cn as t } from "../../utils/index.js";
5
- import { rangeVariants as S, trackVariants as $, rangeOutsideVariants as E, thumbVariants as i } from "./Range.variants.js";
6
- import { useTheme as H } from "../../contexts/theme.hook.js";
7
- const F = b(
8
+ import { rangeVariants as $, trackVariants as E, rangeOutsideVariants as H, thumbVariants as i } from "./Range.variants.js";
9
+ const J = b(
8
10
  ({
9
- label: l,
11
+ label: m,
10
12
  defaultValue: o = [0, 100],
11
13
  name: u,
12
14
  theme: h,
13
- size: m,
15
+ size: l,
14
16
  showValue: f,
15
17
  ...d
16
18
  }, p) => {
17
- const a = j(null), [s, x] = k(o), { theme: N } = H(), n = h ?? N;
19
+ const a = j(null), [s, x] = k(o), { theme: N } = S(), r = h ?? N;
18
20
  w(p, () => a.current, [a]), y(() => {
19
21
  a.current && (a.current.value = `[${s.toString()}]`);
20
22
  }, [s]);
@@ -22,17 +24,17 @@ const F = b(
22
24
  (R) => x(R),
23
25
  []
24
26
  );
25
- return /* @__PURE__ */ r("div", { className: "w-full relative flex flex-col gap-3", children: [
26
- /* @__PURE__ */ r(
27
+ return /* @__PURE__ */ n("div", { className: "w-full relative flex flex-col gap-3", children: [
28
+ /* @__PURE__ */ n(
27
29
  "div",
28
30
  {
29
31
  className: t(
30
32
  "flex items-center",
31
- l ? "justify-between" : "justify-end"
33
+ m ? "justify-between" : "justify-end"
32
34
  ),
33
35
  children: [
34
- l ? /* @__PURE__ */ e("label", { children: l }) : null,
35
- f ? /* @__PURE__ */ r("span", { className: "text-xs", children: [
36
+ m ? /* @__PURE__ */ e("label", { children: m }) : null,
37
+ f ? /* @__PURE__ */ n("span", { className: "text-xs", children: [
36
38
  s[0],
37
39
  " - ",
38
40
  s[1]
@@ -41,22 +43,22 @@ const F = b(
41
43
  }
42
44
  ),
43
45
  /* @__PURE__ */ e("input", { ref: a, name: u, className: "hidden", type: "text" }),
44
- /* @__PURE__ */ r(
46
+ /* @__PURE__ */ n(
45
47
  V,
46
48
  {
47
49
  value: s,
48
- className: t(S({ theme: n })),
50
+ className: t($({ theme: r })),
49
51
  onValueChange: g,
50
52
  ...d,
51
53
  children: [
52
- /* @__PURE__ */ e(v, { className: t($({ theme: n, size: m })), children: /* @__PURE__ */ e(
54
+ /* @__PURE__ */ e(v, { className: t(E({ theme: r, size: l })), children: /* @__PURE__ */ e(
53
55
  T,
54
56
  {
55
- className: t(E({ theme: n }))
57
+ className: t(H({ theme: r }))
56
58
  }
57
59
  ) }),
58
- /* @__PURE__ */ e(c, { className: t(i({ theme: n, size: m })) }),
59
- /* @__PURE__ */ e(c, { className: t(i({ theme: n, size: m })) })
60
+ /* @__PURE__ */ e(c, { className: t(i({ theme: r, size: l })) }),
61
+ /* @__PURE__ */ e(c, { className: t(i({ theme: r, size: l })) })
60
62
  ]
61
63
  }
62
64
  )
@@ -64,5 +66,5 @@ const F = b(
64
66
  }
65
67
  );
66
68
  export {
67
- F as Range
69
+ J as Range
68
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" | "colony" | "civo" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const rangeOutsideVariants: (props?: ({
5
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export declare const trackVariants: (props?: ({
8
+ theme?: "kubefirst" | "colony" | "civo" | 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" | "colony" | "civo" | null | undefined;
13
+ size?: "sm" | "lg" | "md" | null | undefined;
14
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;