@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,92 @@
1
+ import * as c from "react";
2
+ import l, { forwardRef as d } from "react";
3
+ import { P as a } from "./index-DQMInta3.js";
4
+ import { P as u } from "./index-BJ7FQg17.js";
5
+ import { jsx as y } from "react/jsx-runtime";
6
+ function s() {
7
+ return s = Object.assign || function(r) {
8
+ for (var t = 1; t < arguments.length; t++) {
9
+ var o = arguments[t];
10
+ for (var e in o)
11
+ Object.prototype.hasOwnProperty.call(o, e) && (r[e] = o[e]);
12
+ }
13
+ return r;
14
+ }, s.apply(this, arguments);
15
+ }
16
+ function v(r, t) {
17
+ if (r == null) return {};
18
+ var o = g(r, t), e, n;
19
+ if (Object.getOwnPropertySymbols) {
20
+ var i = Object.getOwnPropertySymbols(r);
21
+ for (n = 0; n < i.length; n++)
22
+ e = i[n], !(t.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(r, e) && (o[e] = r[e]);
23
+ }
24
+ return o;
25
+ }
26
+ function g(r, t) {
27
+ if (r == null) return {};
28
+ var o = {}, e = Object.keys(r), n, i;
29
+ for (i = 0; i < e.length; i++)
30
+ n = e[i], !(t.indexOf(n) >= 0) && (o[n] = r[n]);
31
+ return o;
32
+ }
33
+ var p = d(function(r, t) {
34
+ var o = r.color, e = o === void 0 ? "currentColor" : o, n = r.size, i = n === void 0 ? 24 : n, m = v(r, ["color", "size"]);
35
+ return /* @__PURE__ */ l.createElement("svg", s({
36
+ ref: t,
37
+ xmlns: "http://www.w3.org/2000/svg",
38
+ width: i,
39
+ height: i,
40
+ viewBox: "0 0 24 24",
41
+ fill: "none",
42
+ stroke: e,
43
+ strokeWidth: "2",
44
+ strokeLinecap: "round",
45
+ strokeLinejoin: "round"
46
+ }, m), /* @__PURE__ */ l.createElement("line", {
47
+ x1: "18",
48
+ y1: "6",
49
+ x2: "6",
50
+ y2: "18"
51
+ }), /* @__PURE__ */ l.createElement("line", {
52
+ x1: "6",
53
+ y1: "6",
54
+ x2: "18",
55
+ y2: "18"
56
+ }));
57
+ });
58
+ p.propTypes = {
59
+ color: a.string,
60
+ size: a.oneOfType([a.string, a.number])
61
+ };
62
+ p.displayName = "X";
63
+ var h = "VisuallyHidden", f = c.forwardRef(
64
+ (r, t) => /* @__PURE__ */ y(
65
+ u.span,
66
+ {
67
+ ...r,
68
+ ref: t,
69
+ style: {
70
+ // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
71
+ position: "absolute",
72
+ border: 0,
73
+ width: 1,
74
+ height: 1,
75
+ padding: 0,
76
+ margin: -1,
77
+ overflow: "hidden",
78
+ clip: "rect(0, 0, 0, 0)",
79
+ whiteSpace: "nowrap",
80
+ wordWrap: "normal",
81
+ ...r.style
82
+ }
83
+ }
84
+ )
85
+ );
86
+ f.displayName = h;
87
+ var x = f;
88
+ export {
89
+ x as R,
90
+ f as V,
91
+ p as X
92
+ };
@@ -0,0 +1,118 @@
1
+ import * as u from "react";
2
+ import { jsx as v } from "react/jsx-runtime";
3
+ function _(t, e) {
4
+ const n = u.createContext(e), s = (c) => {
5
+ const { children: r, ...i } = c, f = u.useMemo(() => i, Object.values(i));
6
+ return /* @__PURE__ */ v(n.Provider, { value: f, children: r });
7
+ };
8
+ s.displayName = t + "Provider";
9
+ function o(c) {
10
+ const r = u.useContext(n);
11
+ if (r) return r;
12
+ if (e !== void 0) return e;
13
+ throw new Error(`\`${c}\` must be used within \`${t}\``);
14
+ }
15
+ return [s, o];
16
+ }
17
+ function y(t, e = []) {
18
+ let n = [];
19
+ function s(c, r) {
20
+ const i = u.createContext(r), f = n.length;
21
+ n = [...n, r];
22
+ const a = (l) => {
23
+ var S;
24
+ const { scope: d, children: h, ...x } = l, m = ((S = d == null ? void 0 : d[t]) == null ? void 0 : S[f]) || i, p = u.useMemo(() => x, Object.values(x));
25
+ return /* @__PURE__ */ v(m.Provider, { value: p, children: h });
26
+ };
27
+ a.displayName = c + "Provider";
28
+ function C(l, d) {
29
+ var m;
30
+ const h = ((m = d == null ? void 0 : d[t]) == null ? void 0 : m[f]) || i, x = u.useContext(h);
31
+ if (x) return x;
32
+ if (r !== void 0) return r;
33
+ throw new Error(`\`${l}\` must be used within \`${c}\``);
34
+ }
35
+ return [a, C];
36
+ }
37
+ const o = () => {
38
+ const c = n.map((r) => u.createContext(r));
39
+ return function(i) {
40
+ const f = (i == null ? void 0 : i[t]) || c;
41
+ return u.useMemo(
42
+ () => ({ [`__scope${t}`]: { ...i, [t]: f } }),
43
+ [i, f]
44
+ );
45
+ };
46
+ };
47
+ return o.scopeName = t, [s, b(o, ...e)];
48
+ }
49
+ function b(...t) {
50
+ const e = t[0];
51
+ if (t.length === 1) return e;
52
+ const n = () => {
53
+ const s = t.map((o) => ({
54
+ useScope: o(),
55
+ scopeName: o.scopeName
56
+ }));
57
+ return function(c) {
58
+ const r = s.reduce((i, { useScope: f, scopeName: a }) => {
59
+ const l = f(c)[`__scope${a}`];
60
+ return { ...i, ...l };
61
+ }, {});
62
+ return u.useMemo(() => ({ [`__scope${e.scopeName}`]: r }), [r]);
63
+ };
64
+ };
65
+ return n.scopeName = e.scopeName, n;
66
+ }
67
+ function M(t, e, { checkForDefaultPrevented: n = !0 } = {}) {
68
+ return function(o) {
69
+ if (t == null || t(o), n === !1 || !o.defaultPrevented)
70
+ return e == null ? void 0 : e(o);
71
+ };
72
+ }
73
+ var R = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
74
+ };
75
+ function P(t) {
76
+ const e = u.useRef(t);
77
+ return u.useEffect(() => {
78
+ e.current = t;
79
+ }), u.useMemo(() => (...n) => {
80
+ var s;
81
+ return (s = e.current) == null ? void 0 : s.call(e, ...n);
82
+ }, []);
83
+ }
84
+ function j({
85
+ prop: t,
86
+ defaultProp: e,
87
+ onChange: n = () => {
88
+ }
89
+ }) {
90
+ const [s, o] = $({ defaultProp: e, onChange: n }), c = t !== void 0, r = c ? t : s, i = P(n), f = u.useCallback(
91
+ (a) => {
92
+ if (c) {
93
+ const l = typeof a == "function" ? a(t) : a;
94
+ l !== t && i(l);
95
+ } else
96
+ o(a);
97
+ },
98
+ [c, t, o, i]
99
+ );
100
+ return [r, f];
101
+ }
102
+ function $({
103
+ defaultProp: t,
104
+ onChange: e
105
+ }) {
106
+ const n = u.useState(t), [s] = n, o = u.useRef(s), c = P(e);
107
+ return u.useEffect(() => {
108
+ o.current !== s && (c(s), o.current = s);
109
+ }, [s, o, c]), n;
110
+ }
111
+ export {
112
+ j as a,
113
+ P as b,
114
+ y as c,
115
+ M as d,
116
+ _ as e,
117
+ R as u
118
+ };
@@ -0,0 +1,35 @@
1
+ import * as n from "react";
2
+ import { r as p } from "./index-2hJuj4UN.js";
3
+ import { S as f } from "./index-CCavb-1K.js";
4
+ import { jsx as d } from "react/jsx-runtime";
5
+ var u = [
6
+ "a",
7
+ "button",
8
+ "div",
9
+ "form",
10
+ "h2",
11
+ "h3",
12
+ "img",
13
+ "input",
14
+ "label",
15
+ "li",
16
+ "nav",
17
+ "ol",
18
+ "p",
19
+ "span",
20
+ "svg",
21
+ "ul"
22
+ ], h = u.reduce((r, i) => {
23
+ const o = n.forwardRef((t, e) => {
24
+ const { asChild: s, ...a } = t, m = s ? f : i;
25
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(m, { ...a, ref: e });
26
+ });
27
+ return o.displayName = `Primitive.${i}`, { ...r, [i]: o };
28
+ }, {});
29
+ function w(r, i) {
30
+ r && p.flushSync(() => r.dispatchEvent(i));
31
+ }
32
+ export {
33
+ h as P,
34
+ w as d
35
+ };
@@ -0,0 +1,71 @@
1
+ import * as a from "react";
2
+ import { u as T } from "./index-CCavb-1K.js";
3
+ import { u as A } from "./index-8vgf-x5i.js";
4
+ function E(n, e) {
5
+ return a.useReducer((r, t) => e[r][t] ?? r, n);
6
+ }
7
+ var R = (n) => {
8
+ const { present: e, children: r } = n, t = P(e), o = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = T(t.ref, v(o));
9
+ return typeof r == "function" || t.isPresent ? a.cloneElement(o, { ref: c }) : null;
10
+ };
11
+ R.displayName = "Presence";
12
+ function P(n) {
13
+ const [e, r] = a.useState(), t = a.useRef({}), o = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
14
+ mounted: {
15
+ UNMOUNT: "unmounted",
16
+ ANIMATION_OUT: "unmountSuspended"
17
+ },
18
+ unmountSuspended: {
19
+ MOUNT: "mounted",
20
+ ANIMATION_END: "unmounted"
21
+ },
22
+ unmounted: {
23
+ MOUNT: "mounted"
24
+ }
25
+ });
26
+ return a.useEffect(() => {
27
+ const i = l(t.current);
28
+ c.current = N === "mounted" ? i : "none";
29
+ }, [N]), A(() => {
30
+ const i = t.current, m = o.current;
31
+ if (m !== n) {
32
+ const f = c.current, u = l(i);
33
+ n ? s("MOUNT") : u === "none" || (i == null ? void 0 : i.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), o.current = n;
34
+ }
35
+ }, [n, s]), A(() => {
36
+ if (e) {
37
+ let i;
38
+ const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
+ const g = l(t.current).includes(u.animationName);
40
+ if (u.target === e && g && (s("ANIMATION_END"), !o.current)) {
41
+ const O = e.style.animationFillMode;
42
+ e.style.animationFillMode = "forwards", i = m.setTimeout(() => {
43
+ e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
44
+ });
45
+ }
46
+ }, f = (u) => {
47
+ u.target === e && (c.current = l(t.current));
48
+ };
49
+ return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
+ m.clearTimeout(i), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
+ };
52
+ } else
53
+ s("ANIMATION_END");
54
+ }, [e, s]), {
55
+ isPresent: ["mounted", "unmountSuspended"].includes(N),
56
+ ref: a.useCallback((i) => {
57
+ i && (t.current = getComputedStyle(i)), r(i);
58
+ }, [])
59
+ };
60
+ }
61
+ function l(n) {
62
+ return (n == null ? void 0 : n.animationName) || "none";
63
+ }
64
+ function v(n) {
65
+ var t, o;
66
+ let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
67
+ return r ? n.ref : (e = (o = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
68
+ }
69
+ export {
70
+ R as P
71
+ };
@@ -0,0 +1,94 @@
1
+ import * as R from "react";
2
+ import S from "react";
3
+ import { jsx as I } from "react/jsx-runtime";
4
+ import { u as P, S as A } from "./index-CCavb-1K.js";
5
+ function h(t, i = []) {
6
+ let u = [];
7
+ function M(c, o) {
8
+ const n = R.createContext(o), s = u.length;
9
+ u = [...u, o];
10
+ function C(m) {
11
+ const { scope: a, children: r, ...e } = m, d = (a == null ? void 0 : a[t][s]) || n, l = R.useMemo(() => e, Object.values(e));
12
+ return /* @__PURE__ */ I(d.Provider, { value: l, children: r });
13
+ }
14
+ function _(m, a) {
15
+ const r = (a == null ? void 0 : a[t][s]) || n, e = R.useContext(r);
16
+ if (e) return e;
17
+ if (o !== void 0) return o;
18
+ throw new Error(`\`${m}\` must be used within \`${c}\``);
19
+ }
20
+ return C.displayName = c + "Provider", [C, _];
21
+ }
22
+ const f = () => {
23
+ const c = u.map((o) => R.createContext(o));
24
+ return function(n) {
25
+ const s = (n == null ? void 0 : n[t]) || c;
26
+ return R.useMemo(
27
+ () => ({ [`__scope${t}`]: { ...n, [t]: s } }),
28
+ [n, s]
29
+ );
30
+ };
31
+ };
32
+ return f.scopeName = t, [M, O(f, ...i)];
33
+ }
34
+ function O(...t) {
35
+ const i = t[0];
36
+ if (t.length === 1) return i;
37
+ const u = () => {
38
+ const M = t.map((f) => ({
39
+ useScope: f(),
40
+ scopeName: f.scopeName
41
+ }));
42
+ return function(c) {
43
+ const o = M.reduce((n, { useScope: s, scopeName: C }) => {
44
+ const m = s(c)[`__scope${C}`];
45
+ return { ...n, ...m };
46
+ }, {});
47
+ return R.useMemo(() => ({ [`__scope${i.scopeName}`]: o }), [o]);
48
+ };
49
+ };
50
+ return u.scopeName = i.scopeName, u;
51
+ }
52
+ function $(t) {
53
+ const i = t + "CollectionProvider", [u, M] = h(i), [f, c] = u(
54
+ i,
55
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
56
+ ), o = (r) => {
57
+ const { scope: e, children: d } = r, l = S.useRef(null), p = S.useRef(/* @__PURE__ */ new Map()).current;
58
+ return /* @__PURE__ */ I(f, { scope: e, itemMap: p, collectionRef: l, children: d });
59
+ };
60
+ o.displayName = i;
61
+ const n = t + "CollectionSlot", s = S.forwardRef(
62
+ (r, e) => {
63
+ const { scope: d, children: l } = r, p = c(n, d), x = P(e, p.collectionRef);
64
+ return /* @__PURE__ */ I(A, { ref: x, children: l });
65
+ }
66
+ );
67
+ s.displayName = n;
68
+ const C = t + "CollectionItemSlot", _ = "data-radix-collection-item", m = S.forwardRef(
69
+ (r, e) => {
70
+ const { scope: d, children: l, ...p } = r, x = S.useRef(null), N = P(e, x), v = c(C, d);
71
+ return S.useEffect(() => (v.itemMap.set(x, { ref: x, ...p }), () => void v.itemMap.delete(x))), /* @__PURE__ */ I(A, { [_]: "", ref: N, children: l });
72
+ }
73
+ );
74
+ m.displayName = C;
75
+ function a(r) {
76
+ const e = c(t + "CollectionConsumer", r);
77
+ return S.useCallback(() => {
78
+ const l = e.collectionRef.current;
79
+ if (!l) return [];
80
+ const p = Array.from(l.querySelectorAll(`[${_}]`));
81
+ return Array.from(e.itemMap.values()).sort(
82
+ (v, E) => p.indexOf(v.ref.current) - p.indexOf(E.ref.current)
83
+ );
84
+ }, [e.collectionRef, e.itemMap]);
85
+ }
86
+ return [
87
+ { Provider: o, Slot: s, ItemSlot: m },
88
+ a,
89
+ M
90
+ ];
91
+ }
92
+ export {
93
+ $ as c
94
+ };
@@ -0,0 +1,44 @@
1
+ function m(n) {
2
+ var e, t, l = "";
3
+ if (typeof n == "string" || typeof n == "number") l += n;
4
+ else if (typeof n == "object") if (Array.isArray(n)) for (e = 0; e < n.length; e++) n[e] && (t = m(n[e])) && (l && (l += " "), l += t);
5
+ else for (e in n) n[e] && (l && (l += " "), l += e);
6
+ return l;
7
+ }
8
+ function j() {
9
+ for (var n, e, t = 0, l = ""; t < arguments.length; ) (n = arguments[t++]) && (e = m(n)) && (l && (l += " "), l += e);
10
+ return l;
11
+ }
12
+ const f = (n) => typeof n == "boolean" ? "".concat(n) : n === 0 ? "0" : n, y = j, A = (n, e) => (t) => {
13
+ var l;
14
+ if ((e == null ? void 0 : e.variants) == null) return y(n, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
15
+ const { variants: d, defaultVariants: u } = e, N = Object.keys(d).map((a) => {
16
+ const r = t == null ? void 0 : t[a], s = u == null ? void 0 : u[a];
17
+ if (r === null) return null;
18
+ const i = f(r) || f(s);
19
+ return d[a][i];
20
+ }), v = t && Object.entries(t).reduce((a, r) => {
21
+ let [s, i] = r;
22
+ return i === void 0 || (a[s] = i), a;
23
+ }, {}), V = e == null || (l = e.compoundVariants) === null || l === void 0 ? void 0 : l.reduce((a, r) => {
24
+ let { class: s, className: i, ...b } = r;
25
+ return Object.entries(b).every((C) => {
26
+ let [c, o] = C;
27
+ return Array.isArray(o) ? o.includes({
28
+ ...u,
29
+ ...v
30
+ }[c]) : {
31
+ ...u,
32
+ ...v
33
+ }[c] === o;
34
+ }) ? [
35
+ ...a,
36
+ s,
37
+ i
38
+ ] : a;
39
+ }, []);
40
+ return y(n, N, V, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
41
+ };
42
+ export {
43
+ A as c
44
+ };
@@ -0,0 +1,32 @@
1
+ import * as f from "react";
2
+ import { u as a } from "./index-8vgf-x5i.js";
3
+ function h(r) {
4
+ const e = f.useRef({ value: r, previous: r });
5
+ return f.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
6
+ }
7
+ function z(r) {
8
+ const [e, i] = f.useState(void 0);
9
+ return a(() => {
10
+ if (r) {
11
+ i({ width: r.offsetWidth, height: r.offsetHeight });
12
+ const n = new ResizeObserver((o) => {
13
+ if (!Array.isArray(o) || !o.length)
14
+ return;
15
+ const c = o[0];
16
+ let t, s;
17
+ if ("borderBoxSize" in c) {
18
+ const u = c.borderBoxSize, b = Array.isArray(u) ? u[0] : u;
19
+ t = b.inlineSize, s = b.blockSize;
20
+ } else
21
+ t = r.offsetWidth, s = r.offsetHeight;
22
+ i({ width: t, height: s });
23
+ });
24
+ return n.observe(r, { box: "border-box" }), () => n.unobserve(r);
25
+ } else
26
+ i(void 0);
27
+ }, [r]), e;
28
+ }
29
+ export {
30
+ z as a,
31
+ h as u
32
+ };
@@ -0,0 +1,57 @@
1
+ import * as l from "react";
2
+ import { jsx as c, Fragment as d } from "react/jsx-runtime";
3
+ function m(e, n) {
4
+ typeof e == "function" ? e(n) : e != null && (e.current = n);
5
+ }
6
+ function p(...e) {
7
+ return (n) => e.forEach((r) => m(r, n));
8
+ }
9
+ function S(...e) {
10
+ return l.useCallback(p(...e), e);
11
+ }
12
+ var y = l.forwardRef((e, n) => {
13
+ const { children: r, ...t } = e, o = l.Children.toArray(r), i = o.find(h);
14
+ if (i) {
15
+ const s = i.props.children, a = o.map((u) => u === i ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : u);
16
+ return /* @__PURE__ */ c(f, { ...t, ref: n, children: l.isValidElement(s) ? l.cloneElement(s, void 0, a) : null });
17
+ }
18
+ return /* @__PURE__ */ c(f, { ...t, ref: n, children: r });
19
+ });
20
+ y.displayName = "Slot";
21
+ var f = l.forwardRef((e, n) => {
22
+ const { children: r, ...t } = e;
23
+ if (l.isValidElement(r)) {
24
+ const o = R(r);
25
+ return l.cloneElement(r, {
26
+ ...C(t, r.props),
27
+ // @ts-ignore
28
+ ref: n ? p(n, o) : o
29
+ });
30
+ }
31
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
32
+ });
33
+ f.displayName = "SlotClone";
34
+ var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
35
+ function h(e) {
36
+ return l.isValidElement(e) && e.type === g;
37
+ }
38
+ function C(e, n) {
39
+ const r = { ...n };
40
+ for (const t in n) {
41
+ const o = e[t], i = n[t];
42
+ /^on[A-Z]/.test(t) ? o && i ? r[t] = (...a) => {
43
+ i(...a), o(...a);
44
+ } : o && (r[t] = o) : t === "style" ? r[t] = { ...o, ...i } : t === "className" && (r[t] = [o, i].filter(Boolean).join(" "));
45
+ }
46
+ return { ...e, ...r };
47
+ }
48
+ function R(e) {
49
+ var t, o;
50
+ let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
51
+ return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
52
+ }
53
+ export {
54
+ y as S,
55
+ g as a,
56
+ S as u
57
+ };