@jackbernnie/hiyf 0.1.0

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 (245) hide show
  1. package/LICENSE +191 -0
  2. package/NOTICE +12 -0
  3. package/README.md +47 -0
  4. package/dist/components/Accordion.d.ts +38 -0
  5. package/dist/components/Accordion.js +38 -0
  6. package/dist/components/Alert.d.ts +29 -0
  7. package/dist/components/Alert.js +39 -0
  8. package/dist/components/AlertDialog.d.ts +37 -0
  9. package/dist/components/AlertDialog.js +38 -0
  10. package/dist/components/AspectRatio.d.ts +15 -0
  11. package/dist/components/AspectRatio.js +15 -0
  12. package/dist/components/Avatar.d.ts +26 -0
  13. package/dist/components/Avatar.js +13 -0
  14. package/dist/components/Badge.d.ts +18 -0
  15. package/dist/components/Badge.js +17 -0
  16. package/dist/components/Box.d.ts +13 -0
  17. package/dist/components/Box.js +52 -0
  18. package/dist/components/Breadcrumb.d.ts +33 -0
  19. package/dist/components/Breadcrumb.js +16 -0
  20. package/dist/components/Button.d.ts +40 -0
  21. package/dist/components/Button.js +33 -0
  22. package/dist/components/ButtonGroup.d.ts +18 -0
  23. package/dist/components/ButtonGroup.js +8 -0
  24. package/dist/components/Card.d.ts +46 -0
  25. package/dist/components/Card.js +24 -0
  26. package/dist/components/Carousel.d.ts +27 -0
  27. package/dist/components/Carousel.js +13 -0
  28. package/dist/components/Chart.d.ts +17 -0
  29. package/dist/components/Chart.js +94 -0
  30. package/dist/components/Checkbox.d.ts +26 -0
  31. package/dist/components/Checkbox.js +9 -0
  32. package/dist/components/Collapsible.d.ts +27 -0
  33. package/dist/components/Collapsible.js +26 -0
  34. package/dist/components/Combobox.d.ts +36 -0
  35. package/dist/components/Combobox.js +41 -0
  36. package/dist/components/Command.d.ts +37 -0
  37. package/dist/components/Command.js +32 -0
  38. package/dist/components/ContextMenu.d.ts +34 -0
  39. package/dist/components/ContextMenu.js +23 -0
  40. package/dist/components/Dialog.d.ts +20 -0
  41. package/dist/components/Dialog.js +34 -0
  42. package/dist/components/Drawer.d.ts +28 -0
  43. package/dist/components/Drawer.js +25 -0
  44. package/dist/components/DropdownMenu.d.ts +42 -0
  45. package/dist/components/DropdownMenu.js +32 -0
  46. package/dist/components/Empty.d.ts +28 -0
  47. package/dist/components/Empty.js +15 -0
  48. package/dist/components/Field.d.ts +30 -0
  49. package/dist/components/Field.js +13 -0
  50. package/dist/components/Grid.d.ts +32 -0
  51. package/dist/components/Grid.js +37 -0
  52. package/dist/components/GridItem.d.ts +30 -0
  53. package/dist/components/GridItem.js +40 -0
  54. package/dist/components/HoverCard.d.ts +22 -0
  55. package/dist/components/HoverCard.js +12 -0
  56. package/dist/components/Input.d.ts +34 -0
  57. package/dist/components/Input.js +8 -0
  58. package/dist/components/InputGroup.d.ts +28 -0
  59. package/dist/components/InputGroup.js +13 -0
  60. package/dist/components/InputOTP.d.ts +26 -0
  61. package/dist/components/InputOTP.js +25 -0
  62. package/dist/components/Kbd.d.ts +26 -0
  63. package/dist/components/Kbd.js +11 -0
  64. package/dist/components/Label.d.ts +20 -0
  65. package/dist/components/Label.js +17 -0
  66. package/dist/components/Menubar.d.ts +35 -0
  67. package/dist/components/Menubar.js +19 -0
  68. package/dist/components/NativeSelect.d.ts +33 -0
  69. package/dist/components/NativeSelect.js +37 -0
  70. package/dist/components/NavigationMenu.d.ts +32 -0
  71. package/dist/components/NavigationMenu.js +14 -0
  72. package/dist/components/Pagination.d.ts +28 -0
  73. package/dist/components/Pagination.js +62 -0
  74. package/dist/components/Popover.d.ts +28 -0
  75. package/dist/components/Popover.js +19 -0
  76. package/dist/components/Progress.d.ts +25 -0
  77. package/dist/components/Progress.js +37 -0
  78. package/dist/components/RadioGroup.d.ts +35 -0
  79. package/dist/components/RadioGroup.js +44 -0
  80. package/dist/components/Resizable.d.ts +31 -0
  81. package/dist/components/Resizable.js +17 -0
  82. package/dist/components/ScrollArea.d.ts +8 -0
  83. package/dist/components/ScrollArea.js +14 -0
  84. package/dist/components/Select.d.ts +35 -0
  85. package/dist/components/Select.js +33 -0
  86. package/dist/components/Separator.d.ts +10 -0
  87. package/dist/components/Separator.js +30 -0
  88. package/dist/components/Sheet.d.ts +31 -0
  89. package/dist/components/Sheet.js +26 -0
  90. package/dist/components/Sidebar.d.ts +52 -0
  91. package/dist/components/Sidebar.js +96 -0
  92. package/dist/components/Skeleton.d.ts +40 -0
  93. package/dist/components/Skeleton.js +42 -0
  94. package/dist/components/Slider.d.ts +26 -0
  95. package/dist/components/Slider.js +9 -0
  96. package/dist/components/Spinner.d.ts +7 -0
  97. package/dist/components/Spinner.js +13 -0
  98. package/dist/components/Status.d.ts +30 -0
  99. package/dist/components/Status.js +27 -0
  100. package/dist/components/Switch.d.ts +27 -0
  101. package/dist/components/Switch.js +9 -0
  102. package/dist/components/Table.d.ts +39 -0
  103. package/dist/components/Table.js +22 -0
  104. package/dist/components/Tabs.d.ts +32 -0
  105. package/dist/components/Tabs.js +21 -0
  106. package/dist/components/Text.d.ts +2 -0
  107. package/dist/components/Text.js +5 -0
  108. package/dist/components/Textarea.d.ts +32 -0
  109. package/dist/components/Textarea.js +15 -0
  110. package/dist/components/Toaster.d.ts +30 -0
  111. package/dist/components/Toaster.js +9 -0
  112. package/dist/components/Toggle.d.ts +34 -0
  113. package/dist/components/Toggle.js +31 -0
  114. package/dist/components/ToggleGroup.d.ts +46 -0
  115. package/dist/components/ToggleGroup.js +26 -0
  116. package/dist/components/Tooltip.d.ts +25 -0
  117. package/dist/components/Tooltip.js +12 -0
  118. package/dist/components/ui/accordion.d.ts +7 -0
  119. package/dist/components/ui/accordion.js +81 -0
  120. package/dist/components/ui/alert-dialog.d.ts +18 -0
  121. package/dist/components/ui/alert-dialog.js +154 -0
  122. package/dist/components/ui/alert.d.ts +10 -0
  123. package/dist/components/ui/alert.js +64 -0
  124. package/dist/components/ui/aspect-ratio.d.ts +3 -0
  125. package/dist/components/ui/aspect-ratio.js +11 -0
  126. package/dist/components/ui/avatar.d.ts +11 -0
  127. package/dist/components/ui/avatar.js +57 -0
  128. package/dist/components/ui/badge.d.ts +9 -0
  129. package/dist/components/ui/badge.js +42 -0
  130. package/dist/components/ui/breadcrumb.d.ts +11 -0
  131. package/dist/components/ui/breadcrumb.js +87 -0
  132. package/dist/components/ui/button-group.d.ts +11 -0
  133. package/dist/components/ui/button-group.js +37 -0
  134. package/dist/components/ui/button.d.ts +10 -0
  135. package/dist/components/ui/button.js +55 -0
  136. package/dist/components/ui/card.d.ts +11 -0
  137. package/dist/components/ui/card.js +82 -0
  138. package/dist/components/ui/carousel.d.ts +28 -0
  139. package/dist/components/ui/carousel.js +196 -0
  140. package/dist/components/ui/chart.d.ts +44 -0
  141. package/dist/components/ui/chart.js +198 -0
  142. package/dist/components/ui/checkbox.d.ts +4 -0
  143. package/dist/components/ui/checkbox.js +33 -0
  144. package/dist/components/ui/collapsible.d.ts +5 -0
  145. package/dist/components/ui/collapsible.js +33 -0
  146. package/dist/components/ui/combobox.d.ts +24 -0
  147. package/dist/components/ui/combobox.js +160 -0
  148. package/dist/components/ui/command.d.ts +18 -0
  149. package/dist/components/ui/command.js +142 -0
  150. package/dist/components/ui/context-menu.d.ts +31 -0
  151. package/dist/components/ui/context-menu.js +73 -0
  152. package/dist/components/ui/dialog.d.ts +17 -0
  153. package/dist/components/ui/dialog.js +138 -0
  154. package/dist/components/ui/direction.d.ts +7 -0
  155. package/dist/components/ui/direction.js +14 -0
  156. package/dist/components/ui/drawer.d.ts +13 -0
  157. package/dist/components/ui/drawer.js +101 -0
  158. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  159. package/dist/components/ui/dropdown-menu.js +98 -0
  160. package/dist/components/ui/empty.d.ts +11 -0
  161. package/dist/components/ui/empty.js +97 -0
  162. package/dist/components/ui/field.d.ts +24 -0
  163. package/dist/components/ui/field.js +110 -0
  164. package/dist/components/ui/hover-card.d.ts +6 -0
  165. package/dist/components/ui/hover-card.js +37 -0
  166. package/dist/components/ui/input-group.d.ts +16 -0
  167. package/dist/components/ui/input-group.js +111 -0
  168. package/dist/components/ui/input-otp.d.ts +11 -0
  169. package/dist/components/ui/input-otp.js +66 -0
  170. package/dist/components/ui/input.d.ts +3 -0
  171. package/dist/components/ui/input.js +19 -0
  172. package/dist/components/ui/item.d.ts +23 -0
  173. package/dist/components/ui/item.js +181 -0
  174. package/dist/components/ui/kbd.d.ts +3 -0
  175. package/dist/components/ui/kbd.js +28 -0
  176. package/dist/components/ui/label.d.ts +4 -0
  177. package/dist/components/ui/label.js +23 -0
  178. package/dist/components/ui/menubar.d.ts +30 -0
  179. package/dist/components/ui/menubar.js +119 -0
  180. package/dist/components/ui/native-select.d.ts +8 -0
  181. package/dist/components/ui/native-select.js +49 -0
  182. package/dist/components/ui/navigation-menu.d.ts +14 -0
  183. package/dist/components/ui/navigation-menu.js +139 -0
  184. package/dist/components/ui/pagination.d.ts +17 -0
  185. package/dist/components/ui/pagination.js +120 -0
  186. package/dist/components/ui/popover.d.ts +10 -0
  187. package/dist/components/ui/popover.js +37 -0
  188. package/dist/components/ui/progress.d.ts +4 -0
  189. package/dist/components/ui/radio-group.d.ts +5 -0
  190. package/dist/components/ui/radio-group.js +44 -0
  191. package/dist/components/ui/resizable.d.ts +7 -0
  192. package/dist/components/ui/resizable.js +44 -0
  193. package/dist/components/ui/scroll-area.d.ts +5 -0
  194. package/dist/components/ui/scroll-area.js +59 -0
  195. package/dist/components/ui/select.d.ts +15 -0
  196. package/dist/components/ui/select.js +131 -0
  197. package/dist/components/ui/separator.d.ts +4 -0
  198. package/dist/components/ui/separator.js +27 -0
  199. package/dist/components/ui/sheet.d.ts +14 -0
  200. package/dist/components/ui/sheet.js +113 -0
  201. package/dist/components/ui/sidebar.d.ts +69 -0
  202. package/dist/components/ui/sidebar.js +459 -0
  203. package/dist/components/ui/skeleton.d.ts +2 -0
  204. package/dist/components/ui/slider.d.ts +4 -0
  205. package/dist/components/ui/slider.js +60 -0
  206. package/dist/components/ui/sonner.d.ts +3 -0
  207. package/dist/components/ui/sonner.js +38 -0
  208. package/dist/components/ui/spinner.d.ts +2 -0
  209. package/dist/components/ui/spinner.js +13 -0
  210. package/dist/components/ui/switch.d.ts +6 -0
  211. package/dist/components/ui/switch.js +32 -0
  212. package/dist/components/ui/table.d.ts +10 -0
  213. package/dist/components/ui/table.js +95 -0
  214. package/dist/components/ui/tabs.d.ts +11 -0
  215. package/dist/components/ui/tabs.js +87 -0
  216. package/dist/components/ui/textarea.d.ts +3 -0
  217. package/dist/components/ui/textarea.js +18 -0
  218. package/dist/components/ui/toggle-group.d.ts +10 -0
  219. package/dist/components/ui/toggle-group.js +76 -0
  220. package/dist/components/ui/toggle.d.ts +9 -0
  221. package/dist/components/ui/toggle.js +43 -0
  222. package/dist/components/ui/tooltip.d.ts +7 -0
  223. package/dist/components/ui/tooltip.js +53 -0
  224. package/dist/hooks/use-mobile.d.ts +1 -0
  225. package/dist/hooks/use-mobile.js +18 -0
  226. package/dist/index.d.ts +122 -0
  227. package/dist/index.js +61 -0
  228. package/dist/lib/utils.d.ts +2 -0
  229. package/dist/lib/utils.js +8 -0
  230. package/dist/primitives/createText.d.ts +103 -0
  231. package/dist/primitives/createText.js +183 -0
  232. package/dist/primitives/resolveProperties.d.ts +17 -0
  233. package/dist/stylex.css +1450 -0
  234. package/dist/tokens/animations.d.ts +126 -0
  235. package/dist/tokens/animations.js +61 -0
  236. package/dist/tokens/tokens.stylex.d.ts +85 -0
  237. package/dist/tokens/tokens.stylex.js +81 -0
  238. package/dist/utils/box-styles.d.ts +1117 -0
  239. package/dist/utils/box-styles.js +1455 -0
  240. package/dist/utils/grid.d.ts +4 -0
  241. package/dist/utils/resolvers.d.ts +10 -0
  242. package/dist/utils/resolvers.js +356 -0
  243. package/dist/utils/types.d.ts +133 -0
  244. package/package.json +80 -0
  245. package/src/theme.css +206 -0
@@ -0,0 +1,198 @@
1
+ 'use client';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import * as RechartsPrimitive from 'recharts';
5
+ import { cn } from '../../lib/utils.js';
6
+
7
+ const THEMES = { light: "", dark: ".dark" };
8
+ const INITIAL_DIMENSION = { width: 320, height: 200 };
9
+ const ChartContext = React.createContext(null);
10
+ function useChart() {
11
+ const context = React.useContext(ChartContext);
12
+ if (!context) {
13
+ throw new Error("useChart must be used within a <ChartContainer />");
14
+ }
15
+ return context;
16
+ }
17
+ function ChartContainer({
18
+ id,
19
+ className,
20
+ children,
21
+ config,
22
+ initialDimension = INITIAL_DIMENSION,
23
+ ...props
24
+ }) {
25
+ const uniqueId = React.useId();
26
+ const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
27
+ return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
28
+ "div",
29
+ {
30
+ "data-slot": "chart",
31
+ "data-chart": chartId,
32
+ className: cn(
33
+ "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
34
+ className
35
+ ),
36
+ ...props,
37
+ children: [
38
+ /* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
39
+ /* @__PURE__ */ jsx(
40
+ RechartsPrimitive.ResponsiveContainer,
41
+ {
42
+ initialDimension,
43
+ children
44
+ }
45
+ )
46
+ ]
47
+ }
48
+ ) });
49
+ }
50
+ const ChartStyle = ({ id, config }) => {
51
+ const colorConfig = Object.entries(config).filter(
52
+ ([, config2]) => config2.theme ?? config2.color
53
+ );
54
+ if (!colorConfig.length) {
55
+ return null;
56
+ }
57
+ return /* @__PURE__ */ jsx(
58
+ "style",
59
+ {
60
+ dangerouslySetInnerHTML: {
61
+ __html: Object.entries(THEMES).map(
62
+ ([theme, prefix]) => `
63
+ ${prefix} [data-chart=${id}] {
64
+ ${colorConfig.map(([key, itemConfig]) => {
65
+ const color = itemConfig.theme?.[theme] ?? itemConfig.color;
66
+ return color ? ` --color-${key}: ${color};` : null;
67
+ }).join("\n")}
68
+ }
69
+ `
70
+ ).join("\n")
71
+ }
72
+ }
73
+ );
74
+ };
75
+ const ChartTooltip = RechartsPrimitive.Tooltip;
76
+ function ChartTooltipContent({
77
+ active,
78
+ payload,
79
+ className,
80
+ indicator = "dot",
81
+ hideLabel = false,
82
+ hideIndicator = false,
83
+ label,
84
+ labelFormatter,
85
+ labelClassName,
86
+ formatter,
87
+ color,
88
+ nameKey,
89
+ labelKey
90
+ }) {
91
+ const { config } = useChart();
92
+ const tooltipLabel = React.useMemo(() => {
93
+ if (hideLabel || !payload?.length) {
94
+ return null;
95
+ }
96
+ const [item] = payload;
97
+ const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
98
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
99
+ const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
100
+ if (labelFormatter) {
101
+ return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
102
+ }
103
+ if (!value) {
104
+ return null;
105
+ }
106
+ return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
107
+ }, [
108
+ label,
109
+ labelFormatter,
110
+ payload,
111
+ hideLabel,
112
+ labelClassName,
113
+ config,
114
+ labelKey
115
+ ]);
116
+ if (!active || !payload?.length) {
117
+ return null;
118
+ }
119
+ const nestLabel = payload.length === 1 && indicator !== "dot";
120
+ return /* @__PURE__ */ jsxs(
121
+ "div",
122
+ {
123
+ className: cn(
124
+ "grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
125
+ className
126
+ ),
127
+ children: [
128
+ !nestLabel ? tooltipLabel : null,
129
+ /* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
130
+ const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
131
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
132
+ const indicatorColor = color ?? item.payload?.fill ?? item.color;
133
+ return /* @__PURE__ */ jsx(
134
+ "div",
135
+ {
136
+ className: cn(
137
+ "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
138
+ indicator === "dot" && "items-center"
139
+ ),
140
+ children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
141
+ itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
142
+ "div",
143
+ {
144
+ className: cn(
145
+ "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
146
+ {
147
+ "h-2.5 w-2.5": indicator === "dot",
148
+ "w-1": indicator === "line",
149
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
150
+ "my-0.5": nestLabel && indicator === "dashed"
151
+ }
152
+ ),
153
+ style: {
154
+ "--color-bg": indicatorColor,
155
+ "--color-border": indicatorColor
156
+ }
157
+ }
158
+ ),
159
+ /* @__PURE__ */ jsxs(
160
+ "div",
161
+ {
162
+ className: cn(
163
+ "flex flex-1 justify-between leading-none",
164
+ nestLabel ? "items-end" : "items-center"
165
+ ),
166
+ children: [
167
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
168
+ nestLabel ? tooltipLabel : null,
169
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })
170
+ ] }),
171
+ item.value != null && /* @__PURE__ */ jsx("span", { className: "font-mono font-medium text-foreground tabular-nums", children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value) })
172
+ ]
173
+ }
174
+ )
175
+ ] })
176
+ },
177
+ index
178
+ );
179
+ }) })
180
+ ]
181
+ }
182
+ );
183
+ }
184
+ function getPayloadConfigFromPayload(config, payload, key) {
185
+ if (typeof payload !== "object" || payload === null) {
186
+ return void 0;
187
+ }
188
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
189
+ let configLabelKey = key;
190
+ if (key in payload && typeof payload[key] === "string") {
191
+ configLabelKey = payload[key];
192
+ } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
193
+ configLabelKey = payloadPayload[key];
194
+ }
195
+ return configLabelKey in config ? config[configLabelKey] : config[key];
196
+ }
197
+
198
+ export { ChartContainer, ChartStyle, ChartTooltip, ChartTooltipContent };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { Checkbox as CheckboxPrimitive } from "radix-ui";
3
+ declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,33 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { Checkbox as Checkbox$1 } from 'radix-ui';
4
+ import { cn } from '../../lib/utils.js';
5
+ import { HugeiconsIcon } from '@hugeicons/react';
6
+ import { Tick02Icon } from '@hugeicons/core-free-icons';
7
+
8
+ function Checkbox({
9
+ className,
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsx(
13
+ Checkbox$1.Root,
14
+ {
15
+ "data-slot": "checkbox",
16
+ className: cn(
17
+ "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
18
+ className
19
+ ),
20
+ ...props,
21
+ children: /* @__PURE__ */ jsx(
22
+ Checkbox$1.Indicator,
23
+ {
24
+ "data-slot": "checkbox-indicator",
25
+ className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
26
+ children: /* @__PURE__ */ jsx(HugeiconsIcon, { icon: Tick02Icon, strokeWidth: 2 })
27
+ }
28
+ )
29
+ }
30
+ );
31
+ }
32
+
33
+ export { Checkbox };
@@ -0,0 +1,5 @@
1
+ import { Collapsible as CollapsiblePrimitive } from "radix-ui";
2
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
3
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
4
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,33 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { Collapsible as Collapsible$1 } from 'radix-ui';
4
+
5
+ function Collapsible({
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(Collapsible$1.Root, { "data-slot": "collapsible", ...props });
9
+ }
10
+ function CollapsibleTrigger({
11
+ ...props
12
+ }) {
13
+ return /* @__PURE__ */ jsx(
14
+ Collapsible$1.CollapsibleTrigger,
15
+ {
16
+ "data-slot": "collapsible-trigger",
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function CollapsibleContent({
22
+ ...props
23
+ }) {
24
+ return /* @__PURE__ */ jsx(
25
+ Collapsible$1.CollapsibleContent,
26
+ {
27
+ "data-slot": "collapsible-content",
28
+ ...props
29
+ }
30
+ );
31
+ }
32
+
33
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,24 @@
1
+ import * as React from "react";
2
+ import { Combobox as ComboboxPrimitive } from "@base-ui/react";
3
+ declare const Combobox: typeof ComboboxPrimitive.Root;
4
+ declare function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props): React.JSX.Element;
5
+ declare function ComboboxTrigger({ className, children, ...props }: ComboboxPrimitive.Trigger.Props): React.JSX.Element;
6
+ declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: ComboboxPrimitive.Input.Props & {
7
+ showTrigger?: boolean;
8
+ showClear?: boolean;
9
+ }): React.JSX.Element;
10
+ declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: ComboboxPrimitive.Popup.Props & Pick<ComboboxPrimitive.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">): React.JSX.Element;
11
+ declare function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props): React.JSX.Element;
12
+ declare function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props): React.JSX.Element;
13
+ declare function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props): React.JSX.Element;
14
+ declare function ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props): React.JSX.Element;
15
+ declare function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props): React.JSX.Element;
16
+ declare function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props): React.JSX.Element;
17
+ declare function ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props): React.JSX.Element;
18
+ declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> & ComboboxPrimitive.Chips.Props): React.JSX.Element;
19
+ declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
20
+ showRemove?: boolean;
21
+ }): React.JSX.Element;
22
+ declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props): React.JSX.Element;
23
+ declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
24
+ export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
@@ -0,0 +1,160 @@
1
+ 'use client';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { Combobox } from '@base-ui/react';
5
+ import { cn } from '../../lib/utils.js';
6
+ import './button.js';
7
+ import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupButton } from './input-group.js';
8
+ import { HugeiconsIcon } from '@hugeicons/react';
9
+ import { Tick02Icon, ArrowDown01Icon, Cancel01Icon } from '@hugeicons/core-free-icons';
10
+
11
+ Combobox.Root;
12
+ function ComboboxTrigger({
13
+ className,
14
+ children,
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsxs(
18
+ Combobox.Trigger,
19
+ {
20
+ "data-slot": "combobox-trigger",
21
+ className: cn("[&_svg:not([class*='size-'])]:size-4", className),
22
+ ...props,
23
+ children: [
24
+ children,
25
+ /* @__PURE__ */ jsx(HugeiconsIcon, { icon: ArrowDown01Icon, strokeWidth: 2, className: "pointer-events-none size-4 text-muted-foreground" })
26
+ ]
27
+ }
28
+ );
29
+ }
30
+ function ComboboxClear({ className, ...props }) {
31
+ return /* @__PURE__ */ jsx(
32
+ Combobox.Clear,
33
+ {
34
+ "data-slot": "combobox-clear",
35
+ render: /* @__PURE__ */ jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }),
36
+ className: cn(className),
37
+ ...props,
38
+ children: /* @__PURE__ */ jsx(HugeiconsIcon, { icon: Cancel01Icon, strokeWidth: 2, className: "pointer-events-none" })
39
+ }
40
+ );
41
+ }
42
+ function ComboboxInput({
43
+ className,
44
+ children,
45
+ disabled = false,
46
+ showTrigger = true,
47
+ showClear = false,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsxs(InputGroup, { className: cn("w-auto", className), children: [
51
+ /* @__PURE__ */ jsx(
52
+ Combobox.Input,
53
+ {
54
+ render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
55
+ ...props
56
+ }
57
+ ),
58
+ /* @__PURE__ */ jsxs(InputGroupAddon, { align: "inline-end", children: [
59
+ showTrigger && /* @__PURE__ */ jsx(
60
+ InputGroupButton,
61
+ {
62
+ size: "icon-xs",
63
+ variant: "ghost",
64
+ asChild: true,
65
+ "data-slot": "input-group-button",
66
+ className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
67
+ disabled,
68
+ children: /* @__PURE__ */ jsx(ComboboxTrigger, {})
69
+ }
70
+ ),
71
+ showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })
72
+ ] }),
73
+ children
74
+ ] });
75
+ }
76
+ function ComboboxContent({
77
+ className,
78
+ side = "bottom",
79
+ sideOffset = 6,
80
+ align = "start",
81
+ alignOffset = 0,
82
+ anchor,
83
+ ...props
84
+ }) {
85
+ return /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(
86
+ Combobox.Positioner,
87
+ {
88
+ side,
89
+ sideOffset,
90
+ align,
91
+ alignOffset,
92
+ anchor,
93
+ className: "isolate z-50",
94
+ children: /* @__PURE__ */ jsx(
95
+ Combobox.Popup,
96
+ {
97
+ "data-slot": "combobox-content",
98
+ "data-chips": !!anchor,
99
+ className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
100
+ ...props
101
+ }
102
+ )
103
+ }
104
+ ) });
105
+ }
106
+ function ComboboxList({ className, ...props }) {
107
+ return /* @__PURE__ */ jsx(
108
+ Combobox.List,
109
+ {
110
+ "data-slot": "combobox-list",
111
+ className: cn(
112
+ "no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",
113
+ className
114
+ ),
115
+ ...props
116
+ }
117
+ );
118
+ }
119
+ function ComboboxItem({
120
+ className,
121
+ children,
122
+ ...props
123
+ }) {
124
+ return /* @__PURE__ */ jsxs(
125
+ Combobox.Item,
126
+ {
127
+ "data-slot": "combobox-item",
128
+ className: cn(
129
+ "relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
130
+ className
131
+ ),
132
+ ...props,
133
+ children: [
134
+ children,
135
+ /* @__PURE__ */ jsx(
136
+ Combobox.ItemIndicator,
137
+ {
138
+ render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
139
+ children: /* @__PURE__ */ jsx(HugeiconsIcon, { icon: Tick02Icon, strokeWidth: 2, className: "pointer-events-none" })
140
+ }
141
+ )
142
+ ]
143
+ }
144
+ );
145
+ }
146
+ function ComboboxEmpty({ className, ...props }) {
147
+ return /* @__PURE__ */ jsx(
148
+ Combobox.Empty,
149
+ {
150
+ "data-slot": "combobox-empty",
151
+ className: cn(
152
+ "hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
153
+ className
154
+ ),
155
+ ...props
156
+ }
157
+ );
158
+ }
159
+
160
+ export { ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger };
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "./dialog";
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
12
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
13
+ declare function CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
14
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
15
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
16
+ declare function CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
17
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
18
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,142 @@
1
+ 'use client';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { Command as Command$1 } from 'cmdk';
4
+ import { cn } from '../../lib/utils.js';
5
+ import 'radix-ui';
6
+ import './button.js';
7
+ import { HugeiconsIcon } from '@hugeicons/react';
8
+ import { SearchIcon, Tick02Icon } from '@hugeicons/core-free-icons';
9
+ import { InputGroup, InputGroupAddon } from './input-group.js';
10
+
11
+ function Command({
12
+ className,
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsx(
16
+ Command$1,
17
+ {
18
+ "data-slot": "command",
19
+ className: cn(
20
+ "flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
21
+ className
22
+ ),
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ function CommandInput({
28
+ className,
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs(InputGroup, { className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
32
+ /* @__PURE__ */ jsx(
33
+ Command$1.Input,
34
+ {
35
+ "data-slot": "command-input",
36
+ className: cn(
37
+ "w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
38
+ className
39
+ ),
40
+ ...props
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(HugeiconsIcon, { icon: SearchIcon, strokeWidth: 2, className: "size-4 shrink-0 opacity-50" }) })
44
+ ] }) });
45
+ }
46
+ function CommandList({
47
+ className,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsx(
51
+ Command$1.List,
52
+ {
53
+ "data-slot": "command-list",
54
+ className: cn(
55
+ "no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ function CommandEmpty({
63
+ className,
64
+ ...props
65
+ }) {
66
+ return /* @__PURE__ */ jsx(
67
+ Command$1.Empty,
68
+ {
69
+ "data-slot": "command-empty",
70
+ className: cn("py-6 text-center text-sm", className),
71
+ ...props
72
+ }
73
+ );
74
+ }
75
+ function CommandGroup({
76
+ className,
77
+ ...props
78
+ }) {
79
+ return /* @__PURE__ */ jsx(
80
+ Command$1.Group,
81
+ {
82
+ "data-slot": "command-group",
83
+ className: cn(
84
+ "overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
85
+ className
86
+ ),
87
+ ...props
88
+ }
89
+ );
90
+ }
91
+ function CommandSeparator({
92
+ className,
93
+ ...props
94
+ }) {
95
+ return /* @__PURE__ */ jsx(
96
+ Command$1.Separator,
97
+ {
98
+ "data-slot": "command-separator",
99
+ className: cn("-mx-1 h-px w-auto bg-border", className),
100
+ ...props
101
+ }
102
+ );
103
+ }
104
+ function CommandItem({
105
+ className,
106
+ children,
107
+ ...props
108
+ }) {
109
+ return /* @__PURE__ */ jsxs(
110
+ Command$1.Item,
111
+ {
112
+ "data-slot": "command-item",
113
+ className: cn(
114
+ "group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:**:[svg]:text-foreground",
115
+ className
116
+ ),
117
+ ...props,
118
+ children: [
119
+ children,
120
+ /* @__PURE__ */ jsx(HugeiconsIcon, { icon: Tick02Icon, strokeWidth: 2, className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
121
+ ]
122
+ }
123
+ );
124
+ }
125
+ function CommandShortcut({
126
+ className,
127
+ ...props
128
+ }) {
129
+ return /* @__PURE__ */ jsx(
130
+ "span",
131
+ {
132
+ "data-slot": "command-shortcut",
133
+ className: cn(
134
+ "ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
135
+ className
136
+ ),
137
+ ...props
138
+ }
139
+ );
140
+ }
141
+
142
+ export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
3
+ declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): React.JSX.Element;
4
+ declare function ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
5
+ declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): React.JSX.Element;
6
+ declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): React.JSX.Element;
7
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): React.JSX.Element;
8
+ declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): React.JSX.Element;
9
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {
10
+ side?: "top" | "right" | "bottom" | "left";
11
+ }): React.JSX.Element;
12
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
13
+ inset?: boolean;
14
+ variant?: "default" | "destructive";
15
+ }): React.JSX.Element;
16
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
17
+ inset?: boolean;
18
+ }): React.JSX.Element;
19
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): React.JSX.Element;
20
+ declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {
21
+ inset?: boolean;
22
+ }): React.JSX.Element;
23
+ declare function ContextMenuRadioItem({ className, children, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {
24
+ inset?: boolean;
25
+ }): React.JSX.Element;
26
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
27
+ inset?: boolean;
28
+ }): React.JSX.Element;
29
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): React.JSX.Element;
30
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
31
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };