@bgunnarsson/react-primitives 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.
package/dist/index.cjs ADDED
@@ -0,0 +1,1131 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/components/Button/Button.tsx
2
+ var _jsxruntime = require('react/jsx-runtime');
3
+ var Button = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { className, ...props });
4
+
5
+ // src/components/Text/Text.tsx
6
+
7
+ var Text = ({ as: Tag = "p", className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tag, { className, ...props });
8
+
9
+ // src/components/Input/Input.tsx
10
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
11
+
12
+ var Input = _react2.default.forwardRef(
13
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { ref, className, ...props })
14
+ );
15
+ Input.displayName = "Input";
16
+
17
+ // src/components/Label/Label.tsx
18
+
19
+ var Label = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className, ...props });
20
+
21
+ // src/components/Badge/Badge.tsx
22
+
23
+ var Badge = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { ...props });
24
+
25
+ // src/components/Dialog/Dialog.tsx
26
+
27
+ var _reactdialog = require('@radix-ui/react-dialog'); var RadixDialog = _interopRequireWildcard(_reactdialog); var RadixDialog2 = _interopRequireWildcard(_reactdialog);
28
+
29
+ var Dialog = RadixDialog.Root;
30
+ var DialogTrigger = RadixDialog.Trigger;
31
+ var DialogPortal = RadixDialog.Portal;
32
+ var DialogClose = RadixDialog.Close;
33
+ var DialogTitle = RadixDialog.Title;
34
+ var DialogDescription = RadixDialog.Description;
35
+ var DialogOverlay = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDialog.Overlay, { ref, className, ...props }));
36
+ DialogOverlay.displayName = "DialogOverlay";
37
+ var DialogContent = _react2.default.forwardRef(({ className, overlayClassName, overlayStyle, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogPortal, { children: [
38
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogOverlay, { className: overlayClassName, style: overlayStyle }),
39
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDialog.Content, { ref, className, ...props, children })
40
+ ] }));
41
+ DialogContent.displayName = "DialogContent";
42
+
43
+ // src/components/Link/Link.tsx
44
+
45
+ var Link = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { className, ...props });
46
+
47
+ // src/components/Textarea/Textarea.tsx
48
+
49
+
50
+ var Textarea = _react2.default.forwardRef(
51
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "textarea", { ref, className, ...props })
52
+ );
53
+ Textarea.displayName = "Textarea";
54
+
55
+ // src/components/Card/Card.tsx
56
+
57
+ var Card = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
58
+ var CardContent = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
59
+
60
+ // src/components/Alert/Alert.tsx
61
+
62
+ var Alert = ({ as: headingLevel, heading, description, children, ...props }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { role: "alert", ...props, children: [
63
+ heading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertTitle, { as: headingLevel, children: heading }),
64
+ description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: description }),
65
+ children
66
+ ] });
67
+ var AlertTitle = ({ as: Tag = "h5", ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tag, { ...props });
68
+ var AlertDescription = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ...props });
69
+
70
+ // src/components/Skeleton/Skeleton.tsx
71
+
72
+ var Skeleton = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "aria-hidden": "true", className, ...props });
73
+
74
+ // src/components/Spinner/Spinner.tsx
75
+
76
+ var Spinner = ({ className, size = 24, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
77
+ "svg",
78
+ {
79
+ xmlns: "http://www.w3.org/2000/svg",
80
+ width: size,
81
+ height: size,
82
+ viewBox: "0 0 24 24",
83
+ fill: "none",
84
+ stroke: "currentColor",
85
+ strokeWidth: 2,
86
+ strokeLinecap: "round",
87
+ strokeLinejoin: "round",
88
+ "aria-label": "Loading",
89
+ role: "status",
90
+ className,
91
+ ...props,
92
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
93
+ }
94
+ );
95
+
96
+ // src/components/Separator/Separator.tsx
97
+
98
+ var _reactseparator = require('@radix-ui/react-separator'); var RadixSeparator = _interopRequireWildcard(_reactseparator);
99
+
100
+ var Separator = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSeparator.Root, { ref, className, ...props }));
101
+ Separator.displayName = "Separator";
102
+
103
+ // src/components/Checkbox/Checkbox.tsx
104
+
105
+ var _reactcheckbox = require('@radix-ui/react-checkbox'); var RadixCheckbox = _interopRequireWildcard(_reactcheckbox);
106
+
107
+ var Checkbox = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixCheckbox.Root, { ref, className, ...props, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixCheckbox.Indicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M1 4L3.5 6.5L9 1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) }));
108
+ Checkbox.displayName = "Checkbox";
109
+
110
+ // src/components/RadioGroup/RadioGroup.tsx
111
+
112
+ var _reactradiogroup = require('@radix-ui/react-radio-group'); var RadixRadioGroup = _interopRequireWildcard(_reactradiogroup);
113
+
114
+ var RadioGroup = _react2.default.forwardRef(
115
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixRadioGroup.Root, { ref, className, ...props })
116
+ );
117
+ RadioGroup.displayName = "RadioGroup";
118
+ var RadioGroupItem = _react2.default.forwardRef(
119
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixRadioGroup.Item, { ref, className, ...props, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixRadioGroup.Indicator, {}) })
120
+ );
121
+ RadioGroupItem.displayName = "RadioGroupItem";
122
+
123
+ // src/components/Switch/Switch.tsx
124
+
125
+ var _reactswitch = require('@radix-ui/react-switch'); var RadixSwitch = _interopRequireWildcard(_reactswitch);
126
+
127
+ var Switch = _react2.default.forwardRef(
128
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSwitch.Root, { ref, className, ...props, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSwitch.Thumb, {}) })
129
+ );
130
+ Switch.displayName = "Switch";
131
+
132
+ // src/components/Select/Select.tsx
133
+
134
+ var _reactselect = require('@radix-ui/react-select'); var RadixSelect = _interopRequireWildcard(_reactselect);
135
+
136
+ var Select = RadixSelect.Root;
137
+ var SelectGroup = RadixSelect.Group;
138
+ var SelectValue = RadixSelect.Value;
139
+ var SelectTrigger = _react2.default.forwardRef(
140
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixSelect.Trigger, { ref, className, ...props, children: [
141
+ children,
142
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.Icon, {})
143
+ ] })
144
+ );
145
+ SelectTrigger.displayName = "SelectTrigger";
146
+ var SelectContent = _react2.default.forwardRef(
147
+ ({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.Content, { ref, position, className, ...props, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.Viewport, { children }) }) })
148
+ );
149
+ SelectContent.displayName = "SelectContent";
150
+ var SelectItem = _react2.default.forwardRef(
151
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixSelect.Item, { ref, className, ...props, children: [
152
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.ItemText, { children }),
153
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.ItemIndicator, {})
154
+ ] })
155
+ );
156
+ SelectItem.displayName = "SelectItem";
157
+ var SelectLabel = _react2.default.forwardRef(
158
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.Label, { ref, className, ...props })
159
+ );
160
+ SelectLabel.displayName = "SelectLabel";
161
+ var SelectSeparator = _react2.default.forwardRef(
162
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSelect.Separator, { ref, className, ...props })
163
+ );
164
+ SelectSeparator.displayName = "SelectSeparator";
165
+
166
+ // src/components/Tabs/Tabs.tsx
167
+
168
+ var _reacttabs = require('@radix-ui/react-tabs'); var RadixTabs = _interopRequireWildcard(_reacttabs);
169
+
170
+ var Tabs = RadixTabs.Root;
171
+ var TabsList = _react2.default.forwardRef(
172
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixTabs.List, { ref, className, ...props })
173
+ );
174
+ TabsList.displayName = "TabsList";
175
+ var TabsTrigger = _react2.default.forwardRef(
176
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixTabs.Trigger, { ref, className, ...props })
177
+ );
178
+ TabsTrigger.displayName = "TabsTrigger";
179
+ var TabsContent = _react2.default.forwardRef(
180
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixTabs.Content, { ref, className, ...props })
181
+ );
182
+ TabsContent.displayName = "TabsContent";
183
+
184
+ // src/components/Accordion/Accordion.tsx
185
+
186
+ var _reactaccordion = require('@radix-ui/react-accordion'); var RadixAccordion = _interopRequireWildcard(_reactaccordion);
187
+
188
+ var Accordion = RadixAccordion.Root;
189
+ var AccordionItem = _react2.default.forwardRef(
190
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAccordion.Item, { ref, ...props })
191
+ );
192
+ AccordionItem.displayName = "AccordionItem";
193
+ var AccordionTrigger = _react2.default.forwardRef(
194
+ ({ children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAccordion.Header, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAccordion.Trigger, { ref, ...props, children }) })
195
+ );
196
+ AccordionTrigger.displayName = "AccordionTrigger";
197
+ var AccordionContent = _react2.default.forwardRef(
198
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAccordion.Content, { ref, ...props })
199
+ );
200
+ AccordionContent.displayName = "AccordionContent";
201
+
202
+ // src/components/Tooltip/Tooltip.tsx
203
+
204
+ var _reacttooltip = require('@radix-ui/react-tooltip'); var RadixTooltip = _interopRequireWildcard(_reacttooltip);
205
+
206
+ var Tooltip = ({ delayDuration = 200, children, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixTooltip.Provider, { delayDuration, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixTooltip.Root, { ...props, children }) });
207
+ var TooltipTrigger = RadixTooltip.Trigger;
208
+ var TooltipContent = _react2.default.forwardRef(
209
+ ({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixTooltip.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixTooltip.Content, { ref, sideOffset, className, ...props }) })
210
+ );
211
+ TooltipContent.displayName = "TooltipContent";
212
+
213
+ // src/components/Popover/Popover.tsx
214
+
215
+ var _reactpopover = require('@radix-ui/react-popover'); var RadixPopover = _interopRequireWildcard(_reactpopover);
216
+
217
+ var Popover = RadixPopover.Root;
218
+ var PopoverTrigger = RadixPopover.Trigger;
219
+ var PopoverClose = RadixPopover.Close;
220
+ var PopoverContent = _react2.default.forwardRef(
221
+ ({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixPopover.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixPopover.Content, { ref, align, sideOffset, className, ...props }) })
222
+ );
223
+ PopoverContent.displayName = "PopoverContent";
224
+
225
+ // src/components/DropdownMenu/DropdownMenu.tsx
226
+
227
+ var _reactdropdownmenu = require('@radix-ui/react-dropdown-menu'); var RadixDropdownMenu = _interopRequireWildcard(_reactdropdownmenu);
228
+
229
+ var DropdownMenu = RadixDropdownMenu.Root;
230
+ var DropdownMenuTrigger = RadixDropdownMenu.Trigger;
231
+ var DropdownMenuGroup = RadixDropdownMenu.Group;
232
+ var DropdownMenuSub = RadixDropdownMenu.Sub;
233
+ var DropdownMenuRadioGroup = RadixDropdownMenu.RadioGroup;
234
+ var DropdownMenuContent = _react2.default.forwardRef(
235
+ ({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.Content, { ref, sideOffset, className, ...props }) })
236
+ );
237
+ DropdownMenuContent.displayName = "DropdownMenuContent";
238
+ var DropdownMenuItem = _react2.default.forwardRef(
239
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.Item, { ref, className, ...props })
240
+ );
241
+ DropdownMenuItem.displayName = "DropdownMenuItem";
242
+ var DropdownMenuCheckboxItem = _react2.default.forwardRef(
243
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixDropdownMenu.CheckboxItem, { ref, className, ...props, children: [
244
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.ItemIndicator, {}),
245
+ children
246
+ ] })
247
+ );
248
+ DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
249
+ var DropdownMenuRadioItem = _react2.default.forwardRef(
250
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixDropdownMenu.RadioItem, { ref, className, ...props, children: [
251
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.ItemIndicator, {}),
252
+ children
253
+ ] })
254
+ );
255
+ DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
256
+ var DropdownMenuLabel = _react2.default.forwardRef(
257
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.Label, { ref, className, ...props })
258
+ );
259
+ DropdownMenuLabel.displayName = "DropdownMenuLabel";
260
+ var DropdownMenuSeparator = _react2.default.forwardRef(
261
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.Separator, { ref, className, ...props })
262
+ );
263
+ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
264
+ var DropdownMenuSubTrigger = _react2.default.forwardRef(
265
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.SubTrigger, { ref, className, ...props, children })
266
+ );
267
+ DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
268
+ var DropdownMenuSubContent = _react2.default.forwardRef(
269
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDropdownMenu.SubContent, { ref, className, ...props })
270
+ );
271
+ DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
272
+
273
+ // src/components/Avatar/Avatar.tsx
274
+
275
+ var _reactavatar = require('@radix-ui/react-avatar'); var RadixAvatar = _interopRequireWildcard(_reactavatar);
276
+
277
+ var Avatar = _react2.default.forwardRef(
278
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAvatar.Root, { ref, ...props })
279
+ );
280
+ Avatar.displayName = "Avatar";
281
+ var AvatarImage = _react2.default.forwardRef(
282
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAvatar.Image, { ref, ...props })
283
+ );
284
+ AvatarImage.displayName = "AvatarImage";
285
+ var AvatarFallback = _react2.default.forwardRef(
286
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAvatar.Fallback, { ref, ...props })
287
+ );
288
+ AvatarFallback.displayName = "AvatarFallback";
289
+
290
+ // src/components/Progress/Progress.tsx
291
+
292
+ var _reactprogress = require('@radix-ui/react-progress'); var RadixProgress = _interopRequireWildcard(_reactprogress);
293
+
294
+ var Progress = _react2.default.forwardRef(
295
+ ({ className, value, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixProgress.Root, { ref, value, className, ...props, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixProgress.Indicator, { style: { transform: `translateX(-${100 - (_nullishCoalesce(value, () => ( 0)))}%)` } }) })
296
+ );
297
+ Progress.displayName = "Progress";
298
+
299
+ // src/components/ScrollArea/ScrollArea.tsx
300
+
301
+ var _reactscrollarea = require('@radix-ui/react-scroll-area'); var RadixScrollArea = _interopRequireWildcard(_reactscrollarea);
302
+
303
+ var ScrollArea = _react2.default.forwardRef(
304
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixScrollArea.Root, { ref, className, ...props, children: [
305
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixScrollArea.Viewport, { children }),
306
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixScrollArea.Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixScrollArea.Thumb, {}) }),
307
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixScrollArea.Scrollbar, { orientation: "horizontal", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixScrollArea.Thumb, {}) }),
308
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixScrollArea.Corner, {})
309
+ ] })
310
+ );
311
+ ScrollArea.displayName = "ScrollArea";
312
+
313
+ // src/components/Collapsible/Collapsible.tsx
314
+
315
+ var _reactcollapsible = require('@radix-ui/react-collapsible'); var RadixCollapsible = _interopRequireWildcard(_reactcollapsible);
316
+
317
+ var Collapsible = RadixCollapsible.Root;
318
+ var CollapsibleTrigger = RadixCollapsible.Trigger;
319
+ var CollapsibleContent = _react2.default.forwardRef(
320
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixCollapsible.Content, { ref, className, ...props })
321
+ );
322
+ CollapsibleContent.displayName = "CollapsibleContent";
323
+
324
+ // src/components/Toggle/Toggle.tsx
325
+
326
+ var _reacttoggle = require('@radix-ui/react-toggle'); var RadixToggle = _interopRequireWildcard(_reacttoggle);
327
+
328
+ var Toggle = _react2.default.forwardRef(
329
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixToggle.Root, { ref, className, ...props })
330
+ );
331
+ Toggle.displayName = "Toggle";
332
+
333
+ // src/components/Table/Table.tsx
334
+
335
+ var Table = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "table", { className, ...props }) });
336
+ var TableHeader = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { className, ...props });
337
+ var TableBody = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { className, ...props });
338
+ var TableFooter = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tfoot", { className, ...props });
339
+ var TableRow = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className, ...props });
340
+ var TableHead = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { className, ...props });
341
+ var TableCell = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className, ...props });
342
+ var TableCaption = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "caption", { className, ...props });
343
+
344
+ // src/components/Nav/Nav.tsx
345
+
346
+ var Nav = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "nav", { className, ...props });
347
+ var NavList = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className, ...props });
348
+ var NavItem = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { className, ...props });
349
+
350
+ // src/components/Breadcrumb/Breadcrumb.tsx
351
+
352
+ var Breadcrumbs = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "nav", { "aria-label": "breadcrumb", ...props });
353
+ var BreadcrumbsList = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { ...props });
354
+ var BreadcrumbsItem = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...props });
355
+ var BreadcrumbsLink = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...props });
356
+ var BreadcrumbsPage = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "aria-current": "page", ...props });
357
+ var BreadcrumbsSeparator = ({
358
+ children = "\u2022",
359
+ ...props
360
+ }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "aria-hidden": "true", ...props, children });
361
+
362
+ // src/components/Sheet/Sheet.tsx
363
+
364
+
365
+
366
+ var Sheet = RadixDialog2.Root;
367
+ var SheetTrigger = RadixDialog2.Trigger;
368
+ var SheetPortal = RadixDialog2.Portal;
369
+ var SheetClose = RadixDialog2.Close;
370
+ var SheetTitle = RadixDialog2.Title;
371
+ var SheetDescription = RadixDialog2.Description;
372
+ var SheetOverlay = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDialog2.Overlay, { ref, className, ...props }));
373
+ SheetOverlay.displayName = "SheetOverlay";
374
+ var SheetContent = _react2.default.forwardRef(({ side = "right", className, overlayClassName, overlayStyle, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetPortal, { children: [
375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetOverlay, { className: overlayClassName, style: overlayStyle }),
376
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixDialog2.Content, { ref, "data-side": side, className, ...props, children })
377
+ ] }));
378
+ SheetContent.displayName = "SheetContent";
379
+
380
+ // src/components/AlertDialog/AlertDialog.tsx
381
+
382
+ var _reactalertdialog = require('@radix-ui/react-alert-dialog'); var RadixAlertDialog = _interopRequireWildcard(_reactalertdialog);
383
+
384
+ var AlertDialog = RadixAlertDialog.Root;
385
+ var AlertDialogTrigger = RadixAlertDialog.Trigger;
386
+ var AlertDialogPortal = RadixAlertDialog.Portal;
387
+ var AlertDialogTitle = RadixAlertDialog.Title;
388
+ var AlertDialogDescription = RadixAlertDialog.Description;
389
+ var AlertDialogAction = RadixAlertDialog.Action;
390
+ var AlertDialogCancel = RadixAlertDialog.Cancel;
391
+ var AlertDialogOverlay = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAlertDialog.Overlay, { ref, className, ...props }));
392
+ AlertDialogOverlay.displayName = "AlertDialogOverlay";
393
+ var AlertDialogContent = _react2.default.forwardRef(({ className, overlayClassName, overlayStyle, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogPortal, { children: [
394
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogOverlay, { className: overlayClassName, style: overlayStyle }),
395
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixAlertDialog.Content, { ref, className, ...props, children })
396
+ ] }));
397
+ AlertDialogContent.displayName = "AlertDialogContent";
398
+
399
+ // src/components/Toast/Toast.tsx
400
+ var _sonner = require('sonner');
401
+
402
+ // src/components/Carousel/Carousel.tsx
403
+
404
+ var _emblacarouselreact = require('embla-carousel-react'); var _emblacarouselreact2 = _interopRequireDefault(_emblacarouselreact);
405
+
406
+ var CarouselContext = _react2.default.createContext(null);
407
+ function useCarousel() {
408
+ const context = _react2.default.useContext(CarouselContext);
409
+ if (!context) throw new Error("useCarousel must be used within a Carousel");
410
+ return context;
411
+ }
412
+ var Carousel = _react2.default.forwardRef(
413
+ ({ opts, className, children, ...props }, ref) => {
414
+ const [carouselRef, api] = _emblacarouselreact2.default.call(void 0, opts);
415
+ const [canScrollPrev, setCanScrollPrev] = _react2.default.useState(false);
416
+ const [canScrollNext, setCanScrollNext] = _react2.default.useState(false);
417
+ const onSelect = _react2.default.useCallback((api2) => {
418
+ if (!api2) return;
419
+ setCanScrollPrev(api2.canScrollPrev());
420
+ setCanScrollNext(api2.canScrollNext());
421
+ }, []);
422
+ _react2.default.useEffect(() => {
423
+ if (!api) return;
424
+ onSelect(api);
425
+ api.on("reInit", onSelect);
426
+ api.on("select", onSelect);
427
+ return () => {
428
+ api.off("reInit", onSelect);
429
+ api.off("select", onSelect);
430
+ };
431
+ }, [api, onSelect]);
432
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
433
+ CarouselContext.Provider,
434
+ {
435
+ value: {
436
+ carouselRef,
437
+ api,
438
+ scrollPrev: () => _optionalChain([api, 'optionalAccess', _2 => _2.scrollPrev, 'call', _3 => _3()]),
439
+ scrollNext: () => _optionalChain([api, 'optionalAccess', _4 => _4.scrollNext, 'call', _5 => _5()]),
440
+ canScrollPrev,
441
+ canScrollNext
442
+ },
443
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, className, ...props, children })
444
+ }
445
+ );
446
+ }
447
+ );
448
+ Carousel.displayName = "Carousel";
449
+ var CarouselContent = _react2.default.forwardRef(
450
+ ({ className, ...props }, ref) => {
451
+ const { carouselRef } = useCarousel();
452
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: carouselRef, style: { overflow: "hidden" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, className, ...props }) });
453
+ }
454
+ );
455
+ CarouselContent.displayName = "CarouselContent";
456
+ var CarouselItem = _react2.default.forwardRef(
457
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, role: "group", "aria-roledescription": "slide", className, ...props })
458
+ );
459
+ CarouselItem.displayName = "CarouselItem";
460
+ var CarouselPrevious = _react2.default.forwardRef(
461
+ ({ className, onClick, ...props }, ref) => {
462
+ const { scrollPrev, canScrollPrev } = useCarousel();
463
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
464
+ "button",
465
+ {
466
+ ref,
467
+ className,
468
+ disabled: !canScrollPrev,
469
+ "aria-label": "Previous slide",
470
+ onClick: (e) => {
471
+ scrollPrev();
472
+ _optionalChain([onClick, 'optionalCall', _6 => _6(e)]);
473
+ },
474
+ ...props
475
+ }
476
+ );
477
+ }
478
+ );
479
+ CarouselPrevious.displayName = "CarouselPrevious";
480
+ var CarouselNext = _react2.default.forwardRef(
481
+ ({ className, onClick, ...props }, ref) => {
482
+ const { scrollNext, canScrollNext } = useCarousel();
483
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
484
+ "button",
485
+ {
486
+ ref,
487
+ className,
488
+ disabled: !canScrollNext,
489
+ "aria-label": "Next slide",
490
+ onClick: (e) => {
491
+ scrollNext();
492
+ _optionalChain([onClick, 'optionalCall', _7 => _7(e)]);
493
+ },
494
+ ...props
495
+ }
496
+ );
497
+ }
498
+ );
499
+ CarouselNext.displayName = "CarouselNext";
500
+
501
+ // src/components/Drawer/Drawer.tsx
502
+ var _vaul = require('vaul');
503
+ var Drawer = _vaul.Drawer.Root;
504
+ var DrawerTrigger = _vaul.Drawer.Trigger;
505
+ var DrawerPortal = _vaul.Drawer.Portal;
506
+ var DrawerOverlay = _vaul.Drawer.Overlay;
507
+ var DrawerContent = _vaul.Drawer.Content;
508
+ var DrawerHandle = _vaul.Drawer.Handle;
509
+ var DrawerClose = _vaul.Drawer.Close;
510
+ var DrawerTitle = _vaul.Drawer.Title;
511
+ var DrawerDescription = _vaul.Drawer.Description;
512
+
513
+ // src/components/Icon/Icon.tsx
514
+
515
+ var Icon2 = ({
516
+ name,
517
+ mode = "sprite",
518
+ spriteHref = "/icons.svg",
519
+ size = 24,
520
+ className,
521
+ ...props
522
+ }) => {
523
+ if (mode === "external") {
524
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
525
+ "img",
526
+ {
527
+ src: `/icons/${name}.svg`,
528
+ "aria-hidden": "true",
529
+ width: size,
530
+ height: size,
531
+ className
532
+ }
533
+ );
534
+ }
535
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
536
+ "svg",
537
+ {
538
+ width: size,
539
+ height: size,
540
+ "aria-hidden": "true",
541
+ className,
542
+ ...props,
543
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "use", { href: `${spriteHref}#${name}` })
544
+ }
545
+ );
546
+ };
547
+
548
+ // src/components/Picture/Picture.tsx
549
+
550
+ var Picture = ({
551
+ src,
552
+ alt,
553
+ sources = [],
554
+ loading = "lazy",
555
+ width,
556
+ height,
557
+ imgClassName,
558
+ className,
559
+ ...props
560
+ }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "picture", { className, ...props, children: [
561
+ sources.map((source, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "source", { ...source }, i)),
562
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
563
+ "img",
564
+ {
565
+ src,
566
+ alt,
567
+ loading,
568
+ width,
569
+ height,
570
+ className: imgClassName
571
+ }
572
+ )
573
+ ] });
574
+
575
+ // src/components/ToggleGroup/ToggleGroup.tsx
576
+
577
+ var _reacttogglegroup = require('@radix-ui/react-toggle-group'); var RadixToggleGroup = _interopRequireWildcard(_reacttogglegroup);
578
+
579
+ var ToggleGroup = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixToggleGroup.Root, { ref, className, ...props }));
580
+ ToggleGroup.displayName = "ToggleGroup";
581
+ var ToggleGroupItem = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixToggleGroup.Item, { ref, className, ...props }));
582
+ ToggleGroupItem.displayName = "ToggleGroupItem";
583
+
584
+ // src/components/Form/Form.tsx
585
+
586
+ var _reactslot = require('@radix-ui/react-slot');
587
+
588
+ var FormFieldContext = _react2.default.createContext({ id: "" });
589
+ var FormField = ({ id: idProp, error, children, className, ...props }) => {
590
+ const generatedId = _react2.default.useId();
591
+ const id = _nullishCoalesce(idProp, () => ( generatedId));
592
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldContext.Provider, { value: { id, error }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className, ...props, children }) });
593
+ };
594
+ var FormLabel = _react2.default.forwardRef(
595
+ ({ className, ...props }, ref) => {
596
+ const { id } = _react2.default.useContext(FormFieldContext);
597
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { ref, htmlFor: id, className, ...props });
598
+ }
599
+ );
600
+ FormLabel.displayName = "FormLabel";
601
+ var FormControl = _react2.default.forwardRef(
602
+ ({ ...props }, ref) => {
603
+ const { id, error } = _react2.default.useContext(FormFieldContext);
604
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
605
+ _reactslot.Slot,
606
+ {
607
+ ref,
608
+ id,
609
+ "aria-invalid": error ? true : void 0,
610
+ "aria-describedby": error ? `${id}-message` : void 0,
611
+ ...props
612
+ }
613
+ );
614
+ }
615
+ );
616
+ FormControl.displayName = "FormControl";
617
+ var FormMessage = _react2.default.forwardRef(
618
+ ({ className, children, ...props }, ref) => {
619
+ const { id, error } = _react2.default.useContext(FormFieldContext);
620
+ const message = _nullishCoalesce(error, () => ( children));
621
+ if (!message) return null;
622
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ref, id: `${id}-message`, role: "alert", className, ...props, children: message });
623
+ }
624
+ );
625
+ FormMessage.displayName = "FormMessage";
626
+
627
+ // src/components/VideoPlayer/VideoPlayer.tsx
628
+
629
+
630
+ var VideoPlayer = _react2.default.forwardRef(
631
+ ({ src, poster, className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "video", { ref, src, poster, className, ...props })
632
+ );
633
+ VideoPlayer.displayName = "VideoPlayer";
634
+
635
+ // src/components/Richtext/Richtext.tsx
636
+
637
+ var Richtext = ({ html, className, ...props }) => (
638
+ // eslint-disable-next-line react/no-danger
639
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { dangerouslySetInnerHTML: { __html: html }, className, ...props })
640
+ );
641
+
642
+ // src/components/HoverCard/HoverCard.tsx
643
+
644
+ var _reacthovercard = require('@radix-ui/react-hover-card'); var RadixHoverCard = _interopRequireWildcard(_reacthovercard);
645
+
646
+ var HoverCard = RadixHoverCard.Root;
647
+ var HoverCardTrigger = RadixHoverCard.Trigger;
648
+ var HoverCardContent = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixHoverCard.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixHoverCard.Content, { ref, className, ...props }) }));
649
+ HoverCardContent.displayName = "HoverCardContent";
650
+
651
+ // src/components/ContextMenu/ContextMenu.tsx
652
+
653
+ var _reactcontextmenu = require('@radix-ui/react-context-menu'); var RadixContextMenu = _interopRequireWildcard(_reactcontextmenu);
654
+
655
+ var ContextMenu = RadixContextMenu.Root;
656
+ var ContextMenuTrigger = RadixContextMenu.Trigger;
657
+ var ContextMenuGroup = RadixContextMenu.Group;
658
+ var ContextMenuSub = RadixContextMenu.Sub;
659
+ var ContextMenuRadioGroup = RadixContextMenu.RadioGroup;
660
+ var ContextMenuContent = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.Content, { ref, className, ...props }) }));
661
+ ContextMenuContent.displayName = "ContextMenuContent";
662
+ var ContextMenuItem = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.Item, { ref, className, ...props }));
663
+ ContextMenuItem.displayName = "ContextMenuItem";
664
+ var ContextMenuCheckboxItem = _react2.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixContextMenu.CheckboxItem, { ref, className, ...props, children: [
665
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.ItemIndicator, {}),
666
+ children
667
+ ] }));
668
+ ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
669
+ var ContextMenuRadioItem = _react2.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixContextMenu.RadioItem, { ref, className, ...props, children: [
670
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.ItemIndicator, {}),
671
+ children
672
+ ] }));
673
+ ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
674
+ var ContextMenuLabel = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.Label, { ref, className, ...props }));
675
+ ContextMenuLabel.displayName = "ContextMenuLabel";
676
+ var ContextMenuSeparator = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.Separator, { ref, className, ...props }));
677
+ ContextMenuSeparator.displayName = "ContextMenuSeparator";
678
+ var ContextMenuSubTrigger = _react2.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.SubTrigger, { ref, className, ...props, children }));
679
+ ContextMenuSubTrigger.displayName = "ContextMenuSubTrigger";
680
+ var ContextMenuSubContent = _react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixContextMenu.SubContent, { ref, className, ...props }) }));
681
+ ContextMenuSubContent.displayName = "ContextMenuSubContent";
682
+
683
+ // src/components/Lightbox/Lightbox.tsx
684
+ var _yetanotherreactlightbox = require('yet-another-react-lightbox'); var _yetanotherreactlightbox2 = _interopRequireDefault(_yetanotherreactlightbox);
685
+
686
+ var Lightbox = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _yetanotherreactlightbox2.default, { ...props });
687
+
688
+ // src/components/CheckboxGroup/CheckboxGroup.tsx
689
+
690
+
691
+ var CheckboxGroupContext = _react2.default.createContext(null);
692
+ function useCheckboxGroup() {
693
+ const ctx = _react2.default.useContext(CheckboxGroupContext);
694
+ if (!ctx) throw new Error("CheckboxGroupItem must be used within CheckboxGroup");
695
+ return ctx;
696
+ }
697
+ var CheckboxGroup = ({ name, value, onValueChange, disabled, children, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckboxGroupContext.Provider, { value: { name, value, onValueChange, disabled }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { role: "group", ...props, children }) });
698
+ var CheckboxGroupItem = ({ value, disabled, children, ...props }) => {
699
+ const ctx = useCheckboxGroup();
700
+ const id = `${ctx.name}-${value}`;
701
+ const isDisabled = _nullishCoalesce(disabled, () => ( ctx.disabled));
702
+ const checked = ctx.value.includes(value);
703
+ const handleCheckedChange = (checkedState) => {
704
+ if (checkedState === true) {
705
+ ctx.onValueChange([...ctx.value, value]);
706
+ } else {
707
+ ctx.onValueChange(ctx.value.filter((v) => v !== value));
708
+ }
709
+ };
710
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ...props, children: [
711
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
712
+ Checkbox,
713
+ {
714
+ id,
715
+ name: ctx.name,
716
+ value,
717
+ checked,
718
+ onCheckedChange: handleCheckedChange,
719
+ disabled: isDisabled
720
+ }
721
+ ),
722
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: id, children })
723
+ ] });
724
+ };
725
+
726
+ // src/components/Slider/Slider.tsx
727
+
728
+ var _reactslider = require('@radix-ui/react-slider'); var RadixSlider = _interopRequireWildcard(_reactslider);
729
+
730
+ var Slider = _react2.default.forwardRef(
731
+ ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadixSlider.Root, { ref, className, ...props, children: [
732
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSlider.Track, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSlider.Range, {}) }),
733
+ (_nullishCoalesce(_nullishCoalesce(props.defaultValue, () => ( props.value)), () => ( [0]))).map((_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadixSlider.Thumb, {}, i))
734
+ ] })
735
+ );
736
+ Slider.displayName = "Slider";
737
+
738
+ // src/components/NumberInput/NumberInput.tsx
739
+
740
+
741
+ var NumberInput = _react2.default.forwardRef(
742
+ ({ value, onChange, min, max, step = 1, disabled, className, ...props }, ref) => {
743
+ const clamp = (n) => {
744
+ let v = n;
745
+ if (min !== void 0) v = Math.max(min, v);
746
+ if (max !== void 0) v = Math.min(max, v);
747
+ return v;
748
+ };
749
+ const handleChange = (e) => {
750
+ const n = parseFloat(e.target.value);
751
+ if (!isNaN(n)) _optionalChain([onChange, 'optionalCall', _8 => _8(clamp(n))]);
752
+ };
753
+ const increment = () => _optionalChain([onChange, 'optionalCall', _9 => _9(clamp((_nullishCoalesce(value, () => ( 0))) + step))]);
754
+ const decrement = () => _optionalChain([onChange, 'optionalCall', _10 => _10(clamp((_nullishCoalesce(value, () => ( 0))) - step))]);
755
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-disabled": disabled || void 0, className, children: [
756
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: decrement, disabled: disabled || min !== void 0 && (_nullishCoalesce(value, () => ( 0))) <= min, tabIndex: -1, children: "\u2212" }),
757
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
758
+ "input",
759
+ {
760
+ ref,
761
+ type: "number",
762
+ value: _nullishCoalesce(value, () => ( "")),
763
+ onChange: handleChange,
764
+ min,
765
+ max,
766
+ step,
767
+ disabled,
768
+ ...props
769
+ }
770
+ ),
771
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: increment, disabled: disabled || max !== void 0 && (_nullishCoalesce(value, () => ( 0))) >= max, tabIndex: -1, children: "+" })
772
+ ] });
773
+ }
774
+ );
775
+ NumberInput.displayName = "NumberInput";
776
+
777
+ // src/components/FileInput/FileInput.tsx
778
+
779
+
780
+ var FileInput = _react2.default.forwardRef(
781
+ ({ accept, multiple, disabled, onFilesChange, children, className, ...props }, ref) => {
782
+ const inputRef = _react2.default.useRef(null);
783
+ const [isDragging, setIsDragging] = _react2.default.useState(false);
784
+ _react2.default.useImperativeHandle(ref, () => inputRef.current);
785
+ const handleFiles = (files) => {
786
+ if (!files) return;
787
+ _optionalChain([onFilesChange, 'optionalCall', _11 => _11(Array.from(files))]);
788
+ };
789
+ const handleDragOver = (e) => {
790
+ e.preventDefault();
791
+ if (!disabled) setIsDragging(true);
792
+ };
793
+ const handleDragLeave = () => setIsDragging(false);
794
+ const handleDrop = (e) => {
795
+ e.preventDefault();
796
+ setIsDragging(false);
797
+ if (!disabled) handleFiles(e.dataTransfer.files);
798
+ };
799
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
800
+ "div",
801
+ {
802
+ "data-dragging": isDragging || void 0,
803
+ "data-disabled": disabled || void 0,
804
+ className,
805
+ onDragOver: handleDragOver,
806
+ onDragLeave: handleDragLeave,
807
+ onDrop: handleDrop,
808
+ ...props,
809
+ children: [
810
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
811
+ "input",
812
+ {
813
+ ref: inputRef,
814
+ type: "file",
815
+ accept,
816
+ multiple,
817
+ disabled,
818
+ style: { display: "none" },
819
+ onChange: (e) => handleFiles(e.target.files)
820
+ }
821
+ ),
822
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", disabled, onClick: () => _optionalChain([inputRef, 'access', _12 => _12.current, 'optionalAccess', _13 => _13.click, 'call', _14 => _14()]), children: _nullishCoalesce(children, () => ( "Choose file")) })
823
+ ]
824
+ }
825
+ );
826
+ }
827
+ );
828
+ FileInput.displayName = "FileInput";
829
+
830
+ // src/components/Pagination/Pagination.tsx
831
+
832
+ var Pagination = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "nav", { "aria-label": "pagination", ...props });
833
+ var PaginationContent = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { ...props });
834
+ var PaginationItem = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...props });
835
+ var PaginationLink = ({ isActive, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { "aria-current": isActive ? "page" : void 0, "data-active": isActive || void 0, ...props });
836
+ var PaginationPrevious = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { "aria-label": "Go to previous page", ...props });
837
+ var PaginationNext = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { "aria-label": "Go to next page", ...props });
838
+ var PaginationEllipsis = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "aria-hidden": "true", ...props, children: _nullishCoalesce(props.children, () => ( "\u2026")) });
839
+
840
+ // src/components/Stepper/Stepper.tsx
841
+
842
+
843
+ var StepperContext = _react2.default.createContext({ value: 1, orientation: "horizontal" });
844
+ var Stepper = ({ value, orientation = "horizontal", ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StepperContext.Provider, { value: { value, orientation }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
845
+ "ol",
846
+ {
847
+ "data-orientation": orientation,
848
+ "aria-label": "Progress",
849
+ ...props
850
+ }
851
+ ) });
852
+ var StepperItemContext = _react2.default.createContext({ step: 1, state: "pending" });
853
+ var StepperItem = ({ step, ...props }) => {
854
+ const { value } = _react2.default.useContext(StepperContext);
855
+ const state = step === value ? "active" : step < value ? "completed" : "pending";
856
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StepperItemContext.Provider, { value: { step, state }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { "data-state": state, "data-step": step, ...props }) });
857
+ };
858
+ var StepperIndicator = (props) => {
859
+ const { step, state } = _react2.default.useContext(StepperItemContext);
860
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-state": state, "aria-hidden": "true", ...props, children: _nullishCoalesce(props.children, () => ( (state === "completed" ? "\u2713" : step))) });
861
+ };
862
+ var StepperTitle = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ...props });
863
+ var StepperDescription = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ...props });
864
+ var StepperSeparator = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "aria-hidden": "true", ...props });
865
+
866
+ // src/components/EmptyState/EmptyState.tsx
867
+
868
+ var EmptyState = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
869
+ var EmptyStateIcon = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
870
+ var EmptyStateTitle = ({ as: Tag = "h3", ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tag, { ...props });
871
+ var EmptyStateDescription = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ...props });
872
+ var EmptyStateAction = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
873
+
874
+ // src/components/Stat/Stat.tsx
875
+
876
+ var Stat = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
877
+ var StatLabel = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ...props });
878
+ var StatValue = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ...props });
879
+ var StatHelpText = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ...props });
880
+
881
+ // src/components/Combobox/Combobox.tsx
882
+
883
+ var _cmdk = require('cmdk');
884
+
885
+ var Combobox = ({ open, onOpenChange, children }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Popover, { open, onOpenChange, children });
886
+ var ComboboxTrigger = PopoverTrigger;
887
+ var ComboboxContent = _react2.default.forwardRef(
888
+ ({ align = "start", ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { ref, align, ...props })
889
+ );
890
+ ComboboxContent.displayName = "ComboboxContent";
891
+ var ComboboxInput = _react2.default.forwardRef(
892
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _cmdk.Command.Input, { ref, ...props })
893
+ );
894
+ ComboboxInput.displayName = "ComboboxInput";
895
+ var ComboboxList = _react2.default.forwardRef(
896
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _cmdk.Command.List, { ref, ...props })
897
+ );
898
+ ComboboxList.displayName = "ComboboxList";
899
+ var ComboboxItem = _react2.default.forwardRef(
900
+ (props, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _cmdk.Command.Item, { ref, ...props })
901
+ );
902
+ ComboboxItem.displayName = "ComboboxItem";
903
+ var ComboboxEmpty = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _cmdk.Command.Empty, { ...props });
904
+
905
+ // src/components/DatePicker/DatePicker.tsx
906
+
907
+ var _reactdaypicker = require('react-day-picker');
908
+
909
+ var DatePicker = ({
910
+ value,
911
+ onValueChange,
912
+ disabled,
913
+ placeholder = "Pick a date",
914
+ triggerClassName,
915
+ contentClassName,
916
+ calendarClassName
917
+ }) => {
918
+ const [open, setOpen] = _react2.default.useState(false);
919
+ const formatted = value ? value.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" }) : placeholder;
920
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, children: [
921
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { disabled, className: triggerClassName, children: formatted }),
922
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { className: contentClassName, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
923
+ _reactdaypicker.DayPicker,
924
+ {
925
+ mode: "single",
926
+ selected: value,
927
+ onSelect: (day) => {
928
+ _optionalChain([onValueChange, 'optionalCall', _15 => _15(day)]);
929
+ setOpen(false);
930
+ },
931
+ className: calendarClassName
932
+ }
933
+ ) })
934
+ ] });
935
+ };
936
+
937
+ // src/components/Grid/Grid.tsx
938
+
939
+ var Grid = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
940
+ var GridItem = (props) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...props });
941
+
942
+
943
+
944
+
945
+
946
+
947
+
948
+
949
+
950
+
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+
971
+
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+
987
+
988
+
989
+
990
+
991
+
992
+
993
+
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+
1109
+
1110
+
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+ exports.Accordion = Accordion; exports.AccordionContent = AccordionContent; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.Alert = Alert; exports.AlertDescription = AlertDescription; exports.AlertDialog = AlertDialog; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertTitle = AlertTitle; exports.Avatar = Avatar; exports.AvatarFallback = AvatarFallback; exports.AvatarImage = AvatarImage; exports.Badge = Badge; exports.Breadcrumbs = Breadcrumbs; exports.BreadcrumbsItem = BreadcrumbsItem; exports.BreadcrumbsLink = BreadcrumbsLink; exports.BreadcrumbsList = BreadcrumbsList; exports.BreadcrumbsPage = BreadcrumbsPage; exports.BreadcrumbsSeparator = BreadcrumbsSeparator; exports.Button = Button; exports.Card = Card; exports.CardContent = CardContent; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselNext = CarouselNext; exports.CarouselPrevious = CarouselPrevious; exports.Checkbox = Checkbox; exports.CheckboxGroup = CheckboxGroup; exports.CheckboxGroupItem = CheckboxGroupItem; exports.Collapsible = Collapsible; exports.CollapsibleContent = CollapsibleContent; exports.CollapsibleTrigger = CollapsibleTrigger; exports.Combobox = Combobox; exports.ComboboxCommand = _cmdk.Command; exports.ComboboxContent = ComboboxContent; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxInput = ComboboxInput; exports.ComboboxItem = ComboboxItem; exports.ComboboxList = ComboboxList; exports.ComboboxTrigger = ComboboxTrigger; exports.ContextMenu = ContextMenu; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuTrigger = ContextMenuTrigger; exports.DatePicker = DatePicker; exports.Dialog = Dialog; exports.DialogClose = DialogClose; exports.DialogContent = DialogContent; exports.DialogDescription = DialogDescription; exports.DialogOverlay = DialogOverlay; exports.DialogPortal = DialogPortal; exports.DialogTitle = DialogTitle; exports.DialogTrigger = DialogTrigger; exports.Drawer = Drawer; exports.DrawerClose = DrawerClose; exports.DrawerContent = DrawerContent; exports.DrawerDescription = DrawerDescription; exports.DrawerHandle = DrawerHandle; exports.DrawerOverlay = DrawerOverlay; exports.DrawerPortal = DrawerPortal; exports.DrawerTitle = DrawerTitle; exports.DrawerTrigger = DrawerTrigger; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.EmptyState = EmptyState; exports.EmptyStateAction = EmptyStateAction; exports.EmptyStateDescription = EmptyStateDescription; exports.EmptyStateIcon = EmptyStateIcon; exports.EmptyStateTitle = EmptyStateTitle; exports.FileInput = FileInput; exports.FormControl = FormControl; exports.FormField = FormField; exports.FormLabel = FormLabel; exports.FormMessage = FormMessage; exports.Grid = Grid; exports.GridItem = GridItem; exports.HoverCard = HoverCard; exports.HoverCardContent = HoverCardContent; exports.HoverCardTrigger = HoverCardTrigger; exports.Icon = Icon2; exports.Input = Input; exports.Label = Label; exports.Lightbox = Lightbox; exports.Link = Link; exports.Nav = Nav; exports.NavItem = NavItem; exports.NavList = NavList; exports.NumberInput = NumberInput; exports.Pagination = Pagination; exports.PaginationContent = PaginationContent; exports.PaginationEllipsis = PaginationEllipsis; exports.PaginationItem = PaginationItem; exports.PaginationLink = PaginationLink; exports.PaginationNext = PaginationNext; exports.PaginationPrevious = PaginationPrevious; exports.Picture = Picture; exports.Popover = Popover; exports.PopoverClose = PopoverClose; exports.PopoverContent = PopoverContent; exports.PopoverTrigger = PopoverTrigger; exports.Progress = Progress; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.Richtext = Richtext; exports.ScrollArea = ScrollArea; exports.Select = Select; exports.SelectContent = SelectContent; exports.SelectGroup = SelectGroup; exports.SelectItem = SelectItem; exports.SelectLabel = SelectLabel; exports.SelectSeparator = SelectSeparator; exports.SelectTrigger = SelectTrigger; exports.SelectValue = SelectValue; exports.Separator = Separator; exports.Sheet = Sheet; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetDescription = SheetDescription; exports.SheetOverlay = SheetOverlay; exports.SheetPortal = SheetPortal; exports.SheetTitle = SheetTitle; exports.SheetTrigger = SheetTrigger; exports.Skeleton = Skeleton; exports.Slider = Slider; exports.Spinner = Spinner; exports.Stat = Stat; exports.StatHelpText = StatHelpText; exports.StatLabel = StatLabel; exports.StatValue = StatValue; exports.Stepper = Stepper; exports.StepperDescription = StepperDescription; exports.StepperIndicator = StepperIndicator; exports.StepperItem = StepperItem; exports.StepperSeparator = StepperSeparator; exports.StepperTitle = StepperTitle; exports.Switch = Switch; exports.Table = Table; exports.TableBody = TableBody; exports.TableCaption = TableCaption; exports.TableCell = TableCell; exports.TableFooter = TableFooter; exports.TableHead = TableHead; exports.TableHeader = TableHeader; exports.TableRow = TableRow; exports.Tabs = Tabs; exports.TabsContent = TabsContent; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.Text = Text; exports.Textarea = Textarea; exports.Toaster = _sonner.Toaster; exports.Toggle = Toggle; exports.ToggleGroup = ToggleGroup; exports.ToggleGroupItem = ToggleGroupItem; exports.Tooltip = Tooltip; exports.TooltipContent = TooltipContent; exports.TooltipTrigger = TooltipTrigger; exports.VideoPlayer = VideoPlayer; exports.toast = _sonner.toast; exports.useCarousel = useCarousel;
1131
+ //# sourceMappingURL=index.cjs.map