@vritti/quantum-ui 0.2.7 → 0.2.9

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 (207) hide show
  1. package/README.md +7 -7
  2. package/dist/Alert.js +110 -0
  3. package/dist/Alert.js.map +1 -0
  4. package/dist/Avatar.js +219 -0
  5. package/dist/Avatar.js.map +1 -0
  6. package/dist/Badge.js +32 -0
  7. package/dist/Badge.js.map +1 -0
  8. package/dist/Button2.js +2 -2
  9. package/dist/Chart.js +19003 -0
  10. package/dist/Chart.js.map +1 -0
  11. package/dist/Checkbox.js +6 -26
  12. package/dist/Checkbox.js.map +1 -1
  13. package/dist/Combination.js +3856 -0
  14. package/dist/Combination.js.map +1 -0
  15. package/dist/DatePicker.js +15 -3886
  16. package/dist/DatePicker.js.map +1 -1
  17. package/dist/DropdownMenu.js +1522 -0
  18. package/dist/DropdownMenu.js.map +1 -0
  19. package/dist/Form.js +34 -23
  20. package/dist/Form.js.map +1 -1
  21. package/dist/Label.js +1 -1
  22. package/dist/OTPField.js +16 -5
  23. package/dist/OTPField.js.map +1 -1
  24. package/dist/PhoneField.js +14 -6
  25. package/dist/PhoneField.js.map +1 -1
  26. package/dist/Progress.js +116 -0
  27. package/dist/Progress.js.map +1 -0
  28. package/dist/SelectField.js +1351 -0
  29. package/dist/SelectField.js.map +1 -0
  30. package/dist/Separator.js +6 -0
  31. package/dist/Separator.js.map +1 -0
  32. package/dist/Sonner.js +3 -38
  33. package/dist/Sonner.js.map +1 -1
  34. package/dist/Spinner.js +1 -9
  35. package/dist/Spinner.js.map +1 -1
  36. package/dist/Switch.js +210 -0
  37. package/dist/Switch.js.map +1 -0
  38. package/dist/ThemeContext.js +57 -0
  39. package/dist/ThemeContext.js.map +1 -0
  40. package/dist/ThemeToggle.js +4 -15
  41. package/dist/ThemeToggle.js.map +1 -1
  42. package/dist/Toggle.js +69 -0
  43. package/dist/Toggle.js.map +1 -0
  44. package/dist/_commonjsHelpers.js +6 -0
  45. package/dist/_commonjsHelpers.js.map +1 -0
  46. package/dist/assets/quantum-ui.css +18 -0
  47. package/dist/axios.js.map +1 -1
  48. package/dist/check.js +15 -0
  49. package/dist/check.js.map +1 -0
  50. package/dist/chevron-down.js +15 -0
  51. package/dist/chevron-down.js.map +1 -0
  52. package/dist/chevron-right.js +15 -0
  53. package/dist/chevron-right.js.map +1 -0
  54. package/dist/components/Alert.js +2 -0
  55. package/dist/components/Alert.js.map +1 -0
  56. package/dist/components/Avatar.js +2 -0
  57. package/dist/components/Avatar.js.map +1 -0
  58. package/dist/components/Badge.js +2 -0
  59. package/dist/components/Badge.js.map +1 -0
  60. package/dist/components/Chart.js +2 -0
  61. package/dist/components/Chart.js.map +1 -0
  62. package/dist/components/DropdownMenu.js +2 -0
  63. package/dist/components/DropdownMenu.js.map +1 -0
  64. package/dist/components/Progress.js +1 -174
  65. package/dist/components/Progress.js.map +1 -1
  66. package/dist/components/SelectField.js +2 -0
  67. package/dist/components/SelectField.js.map +1 -0
  68. package/dist/components/Separator.js +2 -0
  69. package/dist/components/Separator.js.map +1 -0
  70. package/dist/components/Switch.js +2 -0
  71. package/dist/components/Switch.js.map +1 -0
  72. package/dist/components/Toggle.js +2 -0
  73. package/dist/components/Toggle.js.map +1 -0
  74. package/dist/context/index.js +2 -0
  75. package/dist/context/index.js.map +1 -0
  76. package/dist/field.js +2 -49
  77. package/dist/field.js.map +1 -1
  78. package/dist/hooks/index.js +2 -0
  79. package/dist/hooks/index.js.map +1 -0
  80. package/dist/index.js +12 -0
  81. package/dist/index.js.map +1 -1
  82. package/dist/index10.js +105 -0
  83. package/dist/index10.js.map +1 -0
  84. package/dist/index11.js +79 -0
  85. package/dist/index11.js.map +1 -0
  86. package/dist/index12.js +101 -0
  87. package/dist/index12.js.map +1 -0
  88. package/dist/index13.js +205 -0
  89. package/dist/index13.js.map +1 -0
  90. package/dist/index14.js +199 -0
  91. package/dist/index14.js.map +1 -0
  92. package/dist/index2.js +55 -130
  93. package/dist/index2.js.map +1 -1
  94. package/dist/index3.js +10 -42
  95. package/dist/index3.js.map +1 -1
  96. package/dist/index4.js +125 -35
  97. package/dist/index4.js.map +1 -1
  98. package/dist/index5.js +26 -414
  99. package/dist/index5.js.map +1 -1
  100. package/dist/index6.js +8 -0
  101. package/dist/index6.js.map +1 -0
  102. package/dist/index7.js +16 -0
  103. package/dist/index7.js.map +1 -0
  104. package/dist/index8.js +45 -0
  105. package/dist/index8.js.map +1 -0
  106. package/dist/index9.js +41 -0
  107. package/dist/index9.js.map +1 -0
  108. package/dist/lib/components/Alert/Alert.d.ts +10 -0
  109. package/dist/lib/components/Alert/Alert.d.ts.map +1 -0
  110. package/dist/lib/components/Alert/index.d.ts +2 -0
  111. package/dist/lib/components/Alert/index.d.ts.map +1 -0
  112. package/dist/lib/components/Avatar/Avatar.d.ts +8 -0
  113. package/dist/lib/components/Avatar/Avatar.d.ts.map +1 -0
  114. package/dist/lib/components/Avatar/index.d.ts +2 -0
  115. package/dist/lib/components/Avatar/index.d.ts.map +1 -0
  116. package/dist/lib/components/Badge/Badge.d.ts +5 -0
  117. package/dist/lib/components/Badge/Badge.d.ts.map +1 -0
  118. package/dist/lib/components/Badge/index.d.ts +3 -0
  119. package/dist/lib/components/Badge/index.d.ts.map +1 -0
  120. package/dist/lib/components/Button/index.d.ts +1 -1
  121. package/dist/lib/components/Button/index.d.ts.map +1 -1
  122. package/dist/lib/components/Chart/Chart.d.ts +13 -0
  123. package/dist/lib/components/Chart/Chart.d.ts.map +1 -0
  124. package/dist/lib/components/Chart/index.d.ts +3 -0
  125. package/dist/lib/components/Chart/index.d.ts.map +1 -0
  126. package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts +28 -0
  127. package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
  128. package/dist/lib/components/DropdownMenu/index.d.ts +3 -0
  129. package/dist/lib/components/DropdownMenu/index.d.ts.map +1 -0
  130. package/dist/lib/components/DropdownMenu/types.d.ts +72 -0
  131. package/dist/lib/components/DropdownMenu/types.d.ts.map +1 -0
  132. package/dist/lib/components/Form/Form.d.ts +1 -1
  133. package/dist/lib/components/Form/Form.d.ts.map +1 -1
  134. package/dist/lib/components/OTPField/OTPField.d.ts.map +1 -1
  135. package/dist/lib/components/PhoneField/PhoneField.d.ts.map +1 -1
  136. package/dist/lib/components/SelectField/SelectField.d.ts +24 -0
  137. package/dist/lib/components/SelectField/SelectField.d.ts.map +1 -0
  138. package/dist/lib/components/SelectField/index.d.ts +3 -0
  139. package/dist/lib/components/SelectField/index.d.ts.map +1 -0
  140. package/dist/lib/components/Separator/Separator.d.ts +3 -0
  141. package/dist/lib/components/Separator/Separator.d.ts.map +1 -0
  142. package/dist/lib/components/Separator/index.d.ts +2 -0
  143. package/dist/lib/components/Separator/index.d.ts.map +1 -0
  144. package/dist/lib/components/Switch/Switch.d.ts +9 -0
  145. package/dist/lib/components/Switch/Switch.d.ts.map +1 -0
  146. package/dist/lib/components/Switch/index.d.ts +3 -0
  147. package/dist/lib/components/Switch/index.d.ts.map +1 -0
  148. package/dist/lib/components/ThemeToggle/ThemeToggle.d.ts.map +1 -1
  149. package/dist/lib/components/Toggle/Toggle.d.ts +7 -0
  150. package/dist/lib/components/Toggle/Toggle.d.ts.map +1 -0
  151. package/dist/lib/components/Toggle/index.d.ts +2 -0
  152. package/dist/lib/components/Toggle/index.d.ts.map +1 -0
  153. package/dist/lib/components/index.d.ts +10 -0
  154. package/dist/lib/components/index.d.ts.map +1 -1
  155. package/dist/lib/context/ThemeContext.d.ts +18 -0
  156. package/dist/lib/context/ThemeContext.d.ts.map +1 -0
  157. package/dist/lib/context/index.d.ts +2 -0
  158. package/dist/lib/context/index.d.ts.map +1 -0
  159. package/dist/lib/hooks/index.d.ts +2 -0
  160. package/dist/lib/hooks/index.d.ts.map +1 -0
  161. package/dist/lib/hooks/useTheme.d.ts +8 -0
  162. package/dist/lib/hooks/useTheme.d.ts.map +1 -0
  163. package/dist/lib/index.d.ts +2 -0
  164. package/dist/lib/index.d.ts.map +1 -1
  165. package/dist/lib/theme/index.d.ts +13 -0
  166. package/dist/lib/theme/index.d.ts.map +1 -0
  167. package/dist/lib/utils/axios.d.ts +1 -0
  168. package/dist/lib/utils/axios.d.ts.map +1 -1
  169. package/dist/lib/utils/formHelpers.d.ts +7 -3
  170. package/dist/lib/utils/formHelpers.d.ts.map +1 -1
  171. package/dist/separator2.js +53 -0
  172. package/dist/separator2.js.map +1 -0
  173. package/dist/shadcn/index.d.ts +1 -1
  174. package/dist/shadcn/index.d.ts.map +1 -1
  175. package/dist/shadcn/shadcnAlert/alert.d.ts +11 -0
  176. package/dist/shadcn/shadcnAlert/alert.d.ts.map +1 -0
  177. package/dist/shadcn/shadcnAlert/index.d.ts +2 -0
  178. package/dist/shadcn/shadcnAlert/index.d.ts.map +1 -0
  179. package/dist/shadcn/shadcnAvatar/Avatar.d.ts +12 -0
  180. package/dist/shadcn/shadcnAvatar/Avatar.d.ts.map +1 -0
  181. package/dist/shadcn/shadcnAvatar/index.d.ts +2 -0
  182. package/dist/shadcn/shadcnAvatar/index.d.ts.map +1 -0
  183. package/dist/shadcn/shadcnBadge/Badge.d.ts +11 -0
  184. package/dist/shadcn/shadcnBadge/Badge.d.ts.map +1 -0
  185. package/dist/shadcn/shadcnBadge/index.d.ts +3 -0
  186. package/dist/shadcn/shadcnBadge/index.d.ts.map +1 -0
  187. package/dist/shadcn/shadcnButton/Button.d.ts +2 -2
  188. package/dist/shadcn/shadcnChart/Chart.d.ts +58 -0
  189. package/dist/shadcn/shadcnChart/Chart.d.ts.map +1 -0
  190. package/dist/shadcn/shadcnChart/index.d.ts +3 -0
  191. package/dist/shadcn/shadcnChart/index.d.ts.map +1 -0
  192. package/dist/shadcn/shadcnSpinner/Spinner.d.ts.map +1 -1
  193. package/dist/shadcn/shadcnSwitch/Switch.d.ts +7 -0
  194. package/dist/shadcn/shadcnSwitch/Switch.d.ts.map +1 -0
  195. package/dist/shadcn/shadcnSwitch/index.d.ts +2 -0
  196. package/dist/shadcn/shadcnSwitch/index.d.ts.map +1 -0
  197. package/dist/shadcn/shadcnToggle/Toggle.d.ts +10 -0
  198. package/dist/shadcn/shadcnToggle/Toggle.d.ts.map +1 -0
  199. package/dist/shadcn/shadcnToggle/index.d.ts +2 -0
  200. package/dist/shadcn/shadcnToggle/index.d.ts.map +1 -0
  201. package/dist/theme/index.js +11 -0
  202. package/dist/theme/index.js.map +1 -0
  203. package/dist/triangle-alert.js +40 -0
  204. package/dist/triangle-alert.js.map +1 -0
  205. package/dist/useTheme.js +15 -0
  206. package/dist/useTheme.js.map +1 -0
  207. package/package.json +59 -6
package/dist/check.js ADDED
@@ -0,0 +1,15 @@
1
+ import { c as createLucideIcon } from './createLucideIcon.js';
2
+
3
+ /**
4
+ * @license lucide-react v0.562.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+
11
+ const __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
12
+ const Check = createLucideIcon("check", __iconNode);
13
+
14
+ export { Check as C };
15
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sources":["../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/check.js"],"sourcesContent":["/**\n * @license lucide-react v0.562.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]];\nconst Check = createLucideIcon(\"check\", __iconNode);\n\nexport { __iconNode, Check as default };\n//# sourceMappingURL=check.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,iBAAiB,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AACjE,MAAC,KAAK,GAAG,gBAAgB,CAAC,OAAO,EAAE,UAAU;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,15 @@
1
+ import { c as createLucideIcon } from './createLucideIcon.js';
2
+
3
+ /**
4
+ * @license lucide-react v0.562.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+
11
+ const __iconNode = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
12
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode);
13
+
14
+ export { ChevronDown as C };
15
+ //# sourceMappingURL=chevron-down.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chevron-down.js","sources":["../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js"],"sourcesContent":["/**\n * @license lucide-react v0.562.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]];\nconst ChevronDown = createLucideIcon(\"chevron-down\", __iconNode);\n\nexport { __iconNode, ChevronDown as default };\n//# sourceMappingURL=chevron-down.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC9D,MAAC,WAAW,GAAG,gBAAgB,CAAC,cAAc,EAAE,UAAU;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,15 @@
1
+ import { c as createLucideIcon } from './createLucideIcon.js';
2
+
3
+ /**
4
+ * @license lucide-react v0.562.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+
11
+ const __iconNode = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
12
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode);
13
+
14
+ export { ChevronRight as C };
15
+ //# sourceMappingURL=chevron-right.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chevron-right.js","sources":["../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js"],"sourcesContent":["/**\n * @license lucide-react v0.562.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]];\nconst ChevronRight = createLucideIcon(\"chevron-right\", __iconNode);\n\nexport { __iconNode, ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC/D,MAAC,YAAY,GAAG,gBAAgB,CAAC,eAAe,EAAE,UAAU;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ export { A as Alert } from '../Alert.js';
2
+ //# sourceMappingURL=Alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { A as Avatar, a as AvatarBadge, b as AvatarFallback, c as AvatarGroup, d as AvatarGroupCount, e as AvatarImage } from '../Avatar.js';
2
+ //# sourceMappingURL=Avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { B as Badge, b as badgeVariants } from '../Badge.js';
2
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { C as ChartContainer, a as ChartLegend, b as ChartLegendContent, c as ChartStyle, d as ChartTooltip, e as ChartTooltipContent, u as useChart } from '../Chart.js';
2
+ //# sourceMappingURL=Chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chart.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { o as DropdownMenu, a as DropdownMenuCheckboxItem, b as DropdownMenuContent, c as DropdownMenuGroup, d as DropdownMenuItem, e as DropdownMenuLabel, f as DropdownMenuPortal, g as DropdownMenuRadioGroup, h as DropdownMenuRadioItem, D as DropdownMenuRoot, i as DropdownMenuSeparator, j as DropdownMenuShortcut, k as DropdownMenuSub, l as DropdownMenuSubContent, m as DropdownMenuSubTrigger, n as DropdownMenuTrigger } from '../DropdownMenu.js';
2
+ //# sourceMappingURL=DropdownMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,175 +1,2 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { P as Primitive } from '../index4.js';
4
- import { c as cn } from '../utils.js';
5
-
6
- // src/create-context.tsx
7
- function createContextScope(scopeName, createContextScopeDeps = []) {
8
- let defaultContexts = [];
9
- function createContext3(rootComponentName, defaultContext) {
10
- const BaseContext = React.createContext(defaultContext);
11
- BaseContext.displayName = rootComponentName + "Context";
12
- const index = defaultContexts.length;
13
- defaultContexts = [...defaultContexts, defaultContext];
14
- const Provider = (props) => {
15
- const { scope, children, ...context } = props;
16
- const Context = scope?.[scopeName]?.[index] || BaseContext;
17
- const value = React.useMemo(() => context, Object.values(context));
18
- return /* @__PURE__ */ jsx(Context.Provider, { value, children });
19
- };
20
- Provider.displayName = rootComponentName + "Provider";
21
- function useContext2(consumerName, scope) {
22
- const Context = scope?.[scopeName]?.[index] || BaseContext;
23
- const context = React.useContext(Context);
24
- if (context) return context;
25
- if (defaultContext !== void 0) return defaultContext;
26
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
27
- }
28
- return [Provider, useContext2];
29
- }
30
- const createScope = () => {
31
- const scopeContexts = defaultContexts.map((defaultContext) => {
32
- return React.createContext(defaultContext);
33
- });
34
- return function useScope(scope) {
35
- const contexts = scope?.[scopeName] || scopeContexts;
36
- return React.useMemo(
37
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
38
- [scope, contexts]
39
- );
40
- };
41
- };
42
- createScope.scopeName = scopeName;
43
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
44
- }
45
- function composeContextScopes(...scopes) {
46
- const baseScope = scopes[0];
47
- if (scopes.length === 1) return baseScope;
48
- const createScope = () => {
49
- const scopeHooks = scopes.map((createScope2) => ({
50
- useScope: createScope2(),
51
- scopeName: createScope2.scopeName
52
- }));
53
- return function useComposedScopes(overrideScopes) {
54
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
55
- const scopeProps = useScope(overrideScopes);
56
- const currentScope = scopeProps[`__scope${scopeName}`];
57
- return { ...nextScopes2, ...currentScope };
58
- }, {});
59
- return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
60
- };
61
- };
62
- createScope.scopeName = baseScope.scopeName;
63
- return createScope;
64
- }
65
-
66
- var PROGRESS_NAME = "Progress";
67
- var DEFAULT_MAX = 100;
68
- var [createProgressContext] = createContextScope(PROGRESS_NAME);
69
- var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
70
- var Progress$2 = React.forwardRef(
71
- (props, forwardedRef) => {
72
- const {
73
- __scopeProgress,
74
- value: valueProp = null,
75
- max: maxProp,
76
- getValueLabel = defaultGetValueLabel,
77
- ...progressProps
78
- } = props;
79
- if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {
80
- console.error(getInvalidMaxError(`${maxProp}`, "Progress"));
81
- }
82
- const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
83
- if (valueProp !== null && !isValidValueNumber(valueProp, max)) {
84
- console.error(getInvalidValueError(`${valueProp}`, "Progress"));
85
- }
86
- const value = isValidValueNumber(valueProp, max) ? valueProp : null;
87
- const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
88
- return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(
89
- Primitive.div,
90
- {
91
- "aria-valuemax": max,
92
- "aria-valuemin": 0,
93
- "aria-valuenow": isNumber(value) ? value : void 0,
94
- "aria-valuetext": valueLabel,
95
- role: "progressbar",
96
- "data-state": getProgressState(value, max),
97
- "data-value": value ?? void 0,
98
- "data-max": max,
99
- ...progressProps,
100
- ref: forwardedRef
101
- }
102
- ) });
103
- }
104
- );
105
- Progress$2.displayName = PROGRESS_NAME;
106
- var INDICATOR_NAME = "ProgressIndicator";
107
- var ProgressIndicator = React.forwardRef(
108
- (props, forwardedRef) => {
109
- const { __scopeProgress, ...indicatorProps } = props;
110
- const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
111
- return /* @__PURE__ */ jsx(
112
- Primitive.div,
113
- {
114
- "data-state": getProgressState(context.value, context.max),
115
- "data-value": context.value ?? void 0,
116
- "data-max": context.max,
117
- ...indicatorProps,
118
- ref: forwardedRef
119
- }
120
- );
121
- }
122
- );
123
- ProgressIndicator.displayName = INDICATOR_NAME;
124
- function defaultGetValueLabel(value, max) {
125
- return `${Math.round(value / max * 100)}%`;
126
- }
127
- function getProgressState(value, maxValue) {
128
- return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
129
- }
130
- function isNumber(value) {
131
- return typeof value === "number";
132
- }
133
- function isValidMaxNumber(max) {
134
- return isNumber(max) && !isNaN(max) && max > 0;
135
- }
136
- function isValidValueNumber(value, max) {
137
- return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
138
- }
139
- function getInvalidMaxError(propValue, componentName) {
140
- return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`;
141
- }
142
- function getInvalidValueError(propValue, componentName) {
143
- return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be:
144
- - a positive number
145
- - less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set)
146
- - \`null\` or \`undefined\` if the progress is indeterminate.
147
-
148
- Defaulting to \`null\`.`;
149
- }
150
- var Root = Progress$2;
151
- var Indicator = ProgressIndicator;
152
-
153
- const Progress$1 = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
154
- Root,
155
- {
156
- ref,
157
- "data-slot": "progress",
158
- className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
159
- ...props,
160
- children: /* @__PURE__ */ jsx(
161
- Indicator,
162
- {
163
- "data-slot": "progress-indicator",
164
- className: "bg-primary h-full w-full flex-1 transition-all",
165
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
166
- }
167
- )
168
- }
169
- ));
170
- Progress$1.displayName = Root.displayName;
171
-
172
- const Progress = Progress$1;
173
-
174
- export { Progress };
1
+ export { P as Progress } from '../Progress.js';
175
2
  //# sourceMappingURL=Progress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.js","sources":["../../node_modules/.pnpm/@radix-ui+react-context@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-context/dist/index.mjs","../../node_modules/.pnpm/@radix-ui+react-progress@1.1.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+reac_f510cdfcbddd733ee422ca097120c019/node_modules/@radix-ui/react-progress/dist/index.mjs","../../shadcn/shadcnProgress/Progress.tsx","../../lib/components/Progress/Progress.tsx"],"sourcesContent":["// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/progress.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PROGRESS_NAME = \"Progress\";\nvar DEFAULT_MAX = 100;\nvar [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\nvar [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);\nvar Progress = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, \"Progress\"));\n }\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, \"Progress\"));\n }\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;\n return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-valuemax\": max,\n \"aria-valuemin\": 0,\n \"aria-valuenow\": isNumber(value) ? value : void 0,\n \"aria-valuetext\": valueLabel,\n role: \"progressbar\",\n \"data-state\": getProgressState(value, max),\n \"data-value\": value ?? void 0,\n \"data-max\": max,\n ...progressProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nProgress.displayName = PROGRESS_NAME;\nvar INDICATOR_NAME = \"ProgressIndicator\";\nvar ProgressIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getProgressState(context.value, context.max),\n \"data-value\": context.value ?? void 0,\n \"data-max\": context.max,\n ...indicatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nProgressIndicator.displayName = INDICATOR_NAME;\nfunction defaultGetValueLabel(value, max) {\n return `${Math.round(value / max * 100)}%`;\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nfunction getInvalidMaxError(propValue, componentName) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\nfunction getInvalidValueError(propValue, componentName) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\nvar Root = Progress;\nvar Indicator = ProgressIndicator;\nexport {\n Indicator,\n Progress,\n ProgressIndicator,\n Root,\n createProgressScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport * as React from 'react';\n\nimport { cn } from '../utils';\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n data-slot=\"progress\"\n className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\n\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n","import { Progress as ShadcnProgress } from '../../../shadcn/shadcnProgress/Progress';\n\nexport const Progress = ShadcnProgress;\n"],"names":["Progress","ProgressPrimitive.Root","ProgressPrimitive.Indicator","ShadcnProgress"],"mappings":";;;;;AAAA;AAoBA,SAAS,kBAAkB,CAAC,SAAS,EAAE,sBAAsB,GAAG,EAAE,EAAE;AACpE,EAAE,IAAI,eAAe,GAAG,EAAE;AAC1B,EAAE,SAAS,cAAc,CAAC,iBAAiB,EAAE,cAAc,EAAE;AAC7D,IAAI,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;AAC3D,IAAI,WAAW,CAAC,WAAW,GAAG,iBAAiB,GAAG,SAAS;AAC3D,IAAI,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM;AACxC,IAAI,eAAe,GAAG,CAAC,GAAG,eAAe,EAAE,cAAc,CAAC;AAC1D,IAAI,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;AAChC,MAAM,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK;AACnD,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC,GAAG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A,UAAQ;AACnB,IAAI,SAAS,GAAG,iBAAiB;;ACrFjC,MAAMA,UAAA,GAAW,KAAA,CAAM,UAAA,CAGrB,CAAC,EAAE,WAAW,KAAA,EAAO,GAAG,KAAA,EAAM,EAAG,GAAA,qBACjC,GAAA;AAAA,EAACC,IAAkB;AAAA,EAAlB;AAAA,IACC,GAAA;AAAA,IACA,WAAA,EAAU,UAAA;AAAA,IACV,SAAA,EAAW,EAAA,CAAG,gEAAA,EAAkE,SAAS,CAAA;AAAA,IACxF,GAAG,KAAA;AAAA,IAEJ,QAAA,kBAAA,GAAA;AAAA,MAACC,SAAkB;AAAA,MAAlB;AAAA,QACC,WAAA,EAAU,oBAAA;AAAA,QACV,SAAA,EAAU,gDAAA;AAAA,QACV,OAAO,EAAE,SAAA,EAAW,eAAe,GAAA,IAAO,KAAA,IAAS,EAAE,CAAA,EAAA,CAAA;AAAK;AAAA;AAC5D;AACF,CACD,CAAA;AAEDF,UAAA,CAAS,WAAA,GAAcC,IAAkB,CAAK,WAAA;;ACvBvC,MAAM,QAAA,GAAWE;;;;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"Progress.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { S as SelectField } from '../SelectField.js';
2
+ //# sourceMappingURL=SelectField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectField.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { S as Separator } from '../Separator.js';
2
+ //# sourceMappingURL=Separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { S as Switch } from '../Switch.js';
2
+ //# sourceMappingURL=Switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { T as Toggle, t as toggleVariants } from '../Toggle.js';
2
+ //# sourceMappingURL=Toggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toggle.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { T as ThemeContext, a as ThemeProvider } from '../ThemeContext.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/field.js CHANGED
@@ -1,56 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { c as cva } from './index3.js';
3
- import * as React from 'react';
2
+ import { c as cva } from './index8.js';
4
3
  import { useMemo } from 'react';
5
4
  import { c as cn } from './utils.js';
6
5
  import { L as Label } from './Label.js';
7
- import { P as Primitive } from './index4.js';
8
-
9
- // src/separator.tsx
10
- var NAME = "Separator";
11
- var DEFAULT_ORIENTATION = "horizontal";
12
- var ORIENTATIONS = ["horizontal", "vertical"];
13
- var Separator$1 = React.forwardRef((props, forwardedRef) => {
14
- const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
15
- const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
16
- const ariaOrientation = orientation === "vertical" ? orientation : void 0;
17
- const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
18
- return /* @__PURE__ */ jsx(
19
- Primitive.div,
20
- {
21
- "data-orientation": orientation,
22
- ...semanticProps,
23
- ...domProps,
24
- ref: forwardedRef
25
- }
26
- );
27
- });
28
- Separator$1.displayName = NAME;
29
- function isValidOrientation(orientation) {
30
- return ORIENTATIONS.includes(orientation);
31
- }
32
- var Root = Separator$1;
33
-
34
- function Separator({
35
- className,
36
- orientation = "horizontal",
37
- decorative = true,
38
- ...props
39
- }) {
40
- return /* @__PURE__ */ jsx(
41
- Root,
42
- {
43
- "data-slot": "separator",
44
- decorative,
45
- orientation,
46
- className: cn(
47
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
48
- className
49
- ),
50
- ...props
51
- }
52
- );
53
- }
6
+ import { S as Separator } from './separator2.js';
54
7
 
55
8
  function FieldSet({ className, ...props }) {
56
9
  return /* @__PURE__ */ jsx(
package/dist/field.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../node_modules/.pnpm/@radix-ui+react-separator@1.1.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_610c174170e89e4f500bc8cdca6da62a/node_modules/@radix-ui/react-separator/dist/index.mjs","../shadcn/shadcnSeparator/separator.tsx","../shadcn/shadcnField/field.tsx"],"sourcesContent":["// src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n","import * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport type * as React from 'react';\n\nimport { cn } from '../utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useMemo } from 'react';\nimport { Label } from '../shadcnLabel';\nimport { Separator } from '../shadcnSeparator';\nimport { cn } from '../utils';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-4',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium', 'data-[variant=legend]:text-base', 'data-[variant=label]:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-2 data-[slot=checkbox-group]:gap-1 [&>[data-slot=field-group]]:gap-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', {\n variants: {\n orientation: {\n vertical: ['flex-col [&>*]:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n '[&>[data-slot=field-label]]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto',\n '@md/field-group:[&>[data-slot=field-label]]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn('group/field-content flex flex-1 flex-col gap-1.5 leading-snug', className)}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>;\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length === 1) {\n return errors[0]?.message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map((error) => error?.message && <li key={error.message}>{error.message}</li>)}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n};\n"],"names":["Separator","SeparatorPrimitive.Root"],"mappings":";;;;;;;;AAAA;AAIA,IAAI,IAAI,GAAG,WAAW;AACtB,IAAI,mBAAmB,GAAG,YAAY;AACtC,IAAI,YAAY,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC;AAC7C,IAAIA,WAAS,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK;AAC1D,EAAE,MAAM,EAAE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A,EAAO,OAAA,wBAAY,IAAA,EAAA,EAAwB,QAAA,EAAA,KAAA,CAAM,WAAtB,KAAA,CAAM,OAAwB,CAAK,CAAA,EACvF,CAAA;AAAA,EAEJ,CAAA,EAAG,CAAC,QAAA,EAAU,MAAM,CAAC,CAAA;AAErB,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,OAAA;AAAA,MACL,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,sCAAA,EAAwC,SAAS,CAAA;AAAA,MAC9D,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"field.js","sources":["../shadcn/shadcnField/field.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useMemo } from 'react';\nimport { Label } from '../shadcnLabel';\nimport { Separator } from '../shadcnSeparator';\nimport { cn } from '../utils';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-4',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium', 'data-[variant=legend]:text-base', 'data-[variant=label]:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-2 data-[slot=checkbox-group]:gap-1 [&>[data-slot=field-group]]:gap-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', {\n variants: {\n orientation: {\n vertical: ['flex-col [&>*]:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n '[&>[data-slot=field-label]]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto',\n '@md/field-group:[&>[data-slot=field-label]]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn('group/field-content flex flex-1 flex-col gap-1.5 leading-snug', className)}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>;\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length === 1) {\n return errors[0]?.message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map((error) => error?.message && <li key={error.message}>{error.message}</li>)}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n F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AAQ,WAAW,CAAA,EAAG;AACxB,MAAA,OAAO,MAAA,CAAO,CAAC,CAAA,EAAG,OAAA;AAAA,IACpB;AAEA,IAAA,2BACG,IAAA,EAAA,EAAG,SAAA,EAAU,oCAAA,EACX,QAAA,EAAA,MAAA,CAAO,IAAI,CAAC,KAAA,KAAU,KAAA,EAAO,OAAA,wBAAY,IAAA,EAAA,EAAwB,QAAA,EAAA,KAAA,CAAM,WAAtB,KAAA,CAAM,OAAwB,CAAK,CAAA,EACvF,CAAA;AAAA,EAEJ,CAAA,EAAG,CAAC,QAAA,EAAU,MAAM,CAAC,CAAA;AAErB,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,OAAA;AAAA,MACL,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,sCAAA,EAAwC,SAAS,CAAA;AAAA,MAC9D,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
@@ -0,0 +1,2 @@
1
+ export { u as useTheme } from '../useTheme.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,21 +1,33 @@
1
1
  export { c as cn } from './utils.js';
2
+ export { u as useTheme } from './useTheme.js';
3
+ export { T as ThemeContext, a as ThemeProvider } from './ThemeContext.js';
2
4
  export { a as axios, b as cancelTokenRefresh, e as clearCsrfToken, f as clearToken, c as configureQuantumUI, d as defineConfig, g as getConfig, h as getCsrfToken, i as getToken, j as recoverToken, r as resetConfig, s as scheduleTokenRefresh, k as setCsrfToken, l as setToken } from './axios.js';
5
+ export { A as Alert } from './Alert.js';
6
+ export { A as Avatar, a as AvatarBadge, b as AvatarFallback, c as AvatarGroup, d as AvatarGroupCount, e as AvatarImage } from './Avatar.js';
7
+ export { B as Badge, b as badgeVariants } from './Badge.js';
3
8
  export { B as Button } from './Button.js';
4
9
  export { b as buttonVariants } from './Button2.js';
5
10
  export { C as Card, a as CardContent, b as CardDescription, c as CardFooter, d as CardHeader, e as CardTitle } from './Card.js';
11
+ export { C as ChartContainer, a as ChartLegend, b as ChartLegendContent, c as ChartStyle, d as ChartTooltip, e as ChartTooltipContent, u as useChart } from './Chart.js';
6
12
  export { C as Checkbox } from './Checkbox.js';
7
13
  export { D as DatePicker } from './DatePicker.js';
14
+ export { o as DropdownMenu, a as DropdownMenuCheckboxItem, b as DropdownMenuContent, c as DropdownMenuGroup, d as DropdownMenuItem, e as DropdownMenuLabel, f as DropdownMenuPortal, g as DropdownMenuRadioGroup, h as DropdownMenuRadioItem, D as DropdownMenuRoot, i as DropdownMenuSeparator, j as DropdownMenuShortcut, k as DropdownMenuSub, l as DropdownMenuSubContent, m as DropdownMenuSubTrigger, n as DropdownMenuTrigger } from './DropdownMenu.js';
8
15
  export { F as Field, a as FieldContent, b as FieldDescription, c as FieldError, d as FieldGroup, e as FieldLabel, f as FieldLegend, g as FieldSeparator, h as FieldSet, i as FieldTitle } from './field.js';
9
16
  export { C as Controller, F as Form } from './Form.js';
10
17
  export { O as OTPField } from './OTPField.js';
11
18
  export { P as PasswordField } from './PasswordField.js';
12
19
  export { P as PhoneField, i as isValidPhoneNumber } from './PhoneField.js';
20
+ export { P as Progress } from './Progress.js';
21
+ export { S as SelectField } from './SelectField.js';
22
+ export { S as Separator } from './Separator.js';
13
23
  export { S as Skeleton } from './Skeleton.js';
14
24
  export { T as Toaster } from './Sonner.js';
15
25
  export { g as generateToastId, t as toast } from './toast.js';
16
26
  export { S as Spinner } from './Spinner.js';
27
+ export { S as Switch } from './Switch.js';
17
28
  export { T as TextArea } from './TextArea.js';
18
29
  export { T as TextField } from './TextField.js';
19
30
  export { T as ThemeToggle } from './ThemeToggle.js';
31
+ export { T as Toggle, t as toggleVariants } from './Toggle.js';
20
32
  export { T as Typography } from './Typography.js';
21
33
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,105 @@
1
+ import * as React from 'react';
2
+ import { c as composeRefs } from './index5.js';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ // src/slot.tsx
6
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
7
+ var use = React[" use ".trim().toString()];
8
+ function isPromiseLike(value) {
9
+ return typeof value === "object" && value !== null && "then" in value;
10
+ }
11
+ function isLazyComponent(element) {
12
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
13
+ }
14
+ // @__NO_SIDE_EFFECTS__
15
+ function createSlot(ownerName) {
16
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
17
+ const Slot2 = React.forwardRef((props, forwardedRef) => {
18
+ let { children, ...slotProps } = props;
19
+ if (isLazyComponent(children) && typeof use === "function") {
20
+ children = use(children._payload);
21
+ }
22
+ const childrenArray = React.Children.toArray(children);
23
+ const slottable = childrenArray.find(isSlottable);
24
+ if (slottable) {
25
+ const newElement = slottable.props.children;
26
+ const newChildren = childrenArray.map((child) => {
27
+ if (child === slottable) {
28
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
29
+ return React.isValidElement(newElement) ? newElement.props.children : null;
30
+ } else {
31
+ return child;
32
+ }
33
+ });
34
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
35
+ }
36
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
37
+ });
38
+ Slot2.displayName = `${ownerName}.Slot`;
39
+ return Slot2;
40
+ }
41
+ var Slot = /* @__PURE__ */ createSlot("Slot");
42
+ // @__NO_SIDE_EFFECTS__
43
+ function createSlotClone(ownerName) {
44
+ const SlotClone = React.forwardRef((props, forwardedRef) => {
45
+ let { children, ...slotProps } = props;
46
+ if (isLazyComponent(children) && typeof use === "function") {
47
+ children = use(children._payload);
48
+ }
49
+ if (React.isValidElement(children)) {
50
+ const childrenRef = getElementRef(children);
51
+ const props2 = mergeProps(slotProps, children.props);
52
+ if (children.type !== React.Fragment) {
53
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
54
+ }
55
+ return React.cloneElement(children, props2);
56
+ }
57
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
58
+ });
59
+ SlotClone.displayName = `${ownerName}.SlotClone`;
60
+ return SlotClone;
61
+ }
62
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
63
+ function isSlottable(child) {
64
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
65
+ }
66
+ function mergeProps(slotProps, childProps) {
67
+ const overrideProps = { ...childProps };
68
+ for (const propName in childProps) {
69
+ const slotPropValue = slotProps[propName];
70
+ const childPropValue = childProps[propName];
71
+ const isHandler = /^on[A-Z]/.test(propName);
72
+ if (isHandler) {
73
+ if (slotPropValue && childPropValue) {
74
+ overrideProps[propName] = (...args) => {
75
+ const result = childPropValue(...args);
76
+ slotPropValue(...args);
77
+ return result;
78
+ };
79
+ } else if (slotPropValue) {
80
+ overrideProps[propName] = slotPropValue;
81
+ }
82
+ } else if (propName === "style") {
83
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
84
+ } else if (propName === "className") {
85
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
86
+ }
87
+ }
88
+ return { ...slotProps, ...overrideProps };
89
+ }
90
+ function getElementRef(element) {
91
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
92
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
93
+ if (mayWarn) {
94
+ return element.ref;
95
+ }
96
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
97
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
98
+ if (mayWarn) {
99
+ return element.props.ref;
100
+ }
101
+ return element.props.ref || element.ref;
102
+ }
103
+
104
+ export { Slot as S, createSlot as c };
105
+ //# sourceMappingURL=index10.js.map