@luxonis/component-lib 1.0.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.js ADDED
@@ -0,0 +1,1227 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Accordion: () => Accordion,
34
+ AccordionContent: () => AccordionContent,
35
+ AccordionItem: () => AccordionItem,
36
+ AccordionTrigger: () => AccordionTrigger,
37
+ Badge: () => Badge,
38
+ Button: () => Button,
39
+ Card: () => Card,
40
+ Carousel: () => Carousel,
41
+ CarouselContent: () => CarouselContent,
42
+ CarouselItem: () => CarouselItem,
43
+ CarouselNext: () => CarouselNext,
44
+ CarouselPrevious: () => CarouselPrevious,
45
+ CodeBlock: () => CodeBlock,
46
+ Copyright: () => Copyright,
47
+ Description: () => Description,
48
+ FrostedCard: () => FrostedCard,
49
+ Hero: () => Hero,
50
+ HoverCard: () => HoverCard,
51
+ HoverCardContent: () => HoverCardContent,
52
+ HoverCardTrigger: () => HoverCardTrigger,
53
+ Input: () => Input,
54
+ Label: () => Label,
55
+ SearchBar: () => SearchBar,
56
+ Select: () => Select,
57
+ SelectContent: () => SelectContent,
58
+ SelectGroup: () => SelectGroup,
59
+ SelectItem: () => SelectItem,
60
+ SelectLabel: () => SelectLabel,
61
+ SelectScrollDownButton: () => SelectScrollDownButton,
62
+ SelectScrollUpButton: () => SelectScrollUpButton,
63
+ SelectSeparator: () => SelectSeparator,
64
+ SelectTrigger: () => SelectTrigger,
65
+ SelectValue: () => SelectValue,
66
+ Switch: () => Switch,
67
+ Table: () => Table,
68
+ TableBody: () => TableBody,
69
+ TableCaption: () => TableCaption,
70
+ TableCell: () => TableCell,
71
+ TableFooter: () => TableFooter,
72
+ TableHead: () => TableHead,
73
+ TableHeader: () => TableHeader,
74
+ TableRow: () => TableRow,
75
+ Text: () => Text,
76
+ Textarea: () => Textarea,
77
+ Video: () => Video,
78
+ badgeVariants: () => badgeVariants,
79
+ buttonVariants: () => buttonVariants,
80
+ parseNewLines: () => parseNewLines
81
+ });
82
+ module.exports = __toCommonJS(index_exports);
83
+
84
+ // src/Accordion.tsx
85
+ var React = __toESM(require("react"));
86
+ var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
87
+ var import_class_variance_authority = require("class-variance-authority");
88
+ var import_react = require("@iconify/react");
89
+ var import_jsx_runtime = require("react/jsx-runtime");
90
+ var Accordion = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionPrimitive.Root, { slot: "root", className: (0, import_class_variance_authority.cx)(className), ...props, ref }));
91
+ Accordion.displayName = "Accordion";
92
+ var AccordionItem = React.forwardRef(
93
+ ({ className, noStyle, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
94
+ AccordionPrimitive.Item,
95
+ {
96
+ ref,
97
+ className: (0, import_class_variance_authority.cx)(
98
+ !noStyle && "border px-4 rounded-md border-solid bg-white/10 border-white border-opacity-25",
99
+ className
100
+ ),
101
+ ...props
102
+ }
103
+ )
104
+ );
105
+ AccordionItem.displayName = "AccordionItem";
106
+ var AccordionTrigger = React.forwardRef(
107
+ ({ className, children, icon = "mdi:plus", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
108
+ AccordionPrimitive.Trigger,
109
+ {
110
+ ref,
111
+ className: (0, import_class_variance_authority.cx)(
112
+ "flex flex-1 items-center justify-between py-4 text-xxs md:text-xs font-medium transition-all [&[data-state=open]]:border-b border-mutedborder border-opacity-15 [&[data-state=open]>svg]:rotate-45",
113
+ className
114
+ ),
115
+ ...props,
116
+ children: [
117
+ children,
118
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Icon, { icon, width: "24", height: "24" })
119
+ ]
120
+ }
121
+ ) })
122
+ );
123
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
124
+ var AccordionContent = React.forwardRef(
125
+ ({ className, children, contentClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ AccordionPrimitive.Content,
127
+ {
128
+ ref,
129
+ className: (0, import_class_variance_authority.cx)(
130
+ "overflow-hidden text-sm p-4 transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
131
+ contentClassName
132
+ ),
133
+ ...props,
134
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_class_variance_authority.cx)("pb-4 pt-0", className), children })
135
+ }
136
+ )
137
+ );
138
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
139
+
140
+ // src/Badge.tsx
141
+ var import_class_variance_authority2 = require("class-variance-authority");
142
+ var import_jsx_runtime2 = require("react/jsx-runtime");
143
+ var badgeVariants = (0, import_class_variance_authority2.cva)(
144
+ "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
145
+ {
146
+ variants: {
147
+ variant: {
148
+ default: "text-primary-foreground border-transparent bg-primary hover:bg-primary/80",
149
+ secondary: "text-secondary-foreground border-transparent bg-secondary hover:bg-secondary/80",
150
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent",
151
+ outline: "text-foreground"
152
+ }
153
+ },
154
+ defaultVariants: {
155
+ variant: "default"
156
+ }
157
+ }
158
+ );
159
+ function Badge({ className, variant, ...props }) {
160
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_class_variance_authority2.cx)(badgeVariants({ variant }), className), ...props });
161
+ }
162
+
163
+ // src/Button.tsx
164
+ var import_react2 = require("react");
165
+ var import_class_variance_authority3 = require("class-variance-authority");
166
+ var import_react3 = require("@iconify/react");
167
+ var import_jsx_runtime3 = require("react/jsx-runtime");
168
+ var buttonVariants = (0, import_class_variance_authority3.cva)(
169
+ `flex items-center justify-center gap-1.5 text-nowrap rounded-full font-medium outline-none`,
170
+ {
171
+ variants: {
172
+ variant: {
173
+ primary: "bg-primary stroke-white text-white hover:bg-gradient-to-l hover:from-white/8 hover:to-white/8 disabled:bg-[#D0D0D0]",
174
+ primaryAlt: "bg-gray-100 stroke-white text-primary hover:bg-gradient-to-l hover:from-white/8 hover:to-white/8",
175
+ icon: "border border-primaryBorder bg-white fill-black stroke-black text-black hover:bg-secondary hover:stroke-primary hover:text-primary",
176
+ secondary: "bg-white fill-current stroke-black text-black hover:bg-secondary hover:stroke-primary hover:text-primary",
177
+ steps: "group flex-col gap-3 bg-transparent text-semimuted text-opacity-40 hover:text-opacity-60 aria-selected:text-black aria-selected:opacity-100 [&>div>div>svg]:hover:border-transparent [&>div>div]:hover:bg-primary [&>div>div]:hover:text-white sm:[&>div>div]:hover:opacity-45 ",
178
+ unstyled: ""
179
+ },
180
+ size: {
181
+ sm: "h-9 px-3.5 py-2.5",
182
+ xs: "px-3.5 py-2.5 text-sm",
183
+ lg: "h-[46px] px-7 py-3.5",
184
+ icon: "size-14 p-3.5",
185
+ unset: ""
186
+ }
187
+ },
188
+ defaultVariants: {
189
+ variant: "primary",
190
+ size: "lg"
191
+ }
192
+ }
193
+ );
194
+ var Button = (props) => {
195
+ const {
196
+ className,
197
+ variant,
198
+ size,
199
+ children,
200
+ icon,
201
+ role = "button",
202
+ onClick,
203
+ animate = role === "icon" || role === "steps" || variant === "unstyled" ? false : true,
204
+ ...rest
205
+ } = props;
206
+ const [circles, setCircles] = (0, import_react2.useState)([]);
207
+ const iconSize = variant === "steps" ? 24 : 20;
208
+ const handleClickAnimation = (event) => {
209
+ const { clientX: x, clientY: y } = event;
210
+ const buttonRect = event.currentTarget.getBoundingClientRect();
211
+ const buttonX = buttonRect.left;
212
+ const buttonY = buttonRect.top;
213
+ setCircles((prev) => [...prev, { top: y - buttonY - 15, left: x - buttonX - 15, key: Math.random() }]);
214
+ };
215
+ const handleAnimationEnd = (key) => {
216
+ setCircles((prev) => prev.filter((c) => c.key !== key));
217
+ };
218
+ const overWriteVariants = {
219
+ variant: role === "icon" ? "icon" : variant,
220
+ size: role === "icon" ? "icon" : size
221
+ };
222
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
223
+ "button",
224
+ {
225
+ onClick: (e) => {
226
+ if (onClick) {
227
+ onClick(e);
228
+ }
229
+ if (animate) {
230
+ handleClickAnimation(e);
231
+ }
232
+ },
233
+ className: (0, import_class_variance_authority3.cx)(buttonVariants({ ...overWriteVariants }), animate && "relative", className),
234
+ ...rest,
235
+ children: [
236
+ icon && (variant === "steps" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "z-[1] bg-white", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
237
+ import_react3.Icon,
238
+ {
239
+ icon,
240
+ width: iconSize,
241
+ height: iconSize,
242
+ className: (0, import_class_variance_authority3.cx)(
243
+ "flex w-10 h-10 justify-center items-center gap-2.5 border px-2.5 py-1 rounded-full border-solid border-muted",
244
+ props["aria-selected"] ? "bg-primary border-none text-white" : ""
245
+ )
246
+ }
247
+ ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react3.Icon, { icon, width: iconSize, height: iconSize })),
248
+ children,
249
+ circles.map((circle) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
250
+ "div",
251
+ {
252
+ className: (0, import_class_variance_authority3.cx)(
253
+ "pointer-events-none absolute animate-circle rounded-full bg-primary opacity-90",
254
+ size === "sm" ? "size-4" : "size-6"
255
+ ),
256
+ style: {
257
+ top: `${circle.top}px`,
258
+ left: `${circle.left}px`
259
+ },
260
+ onAnimationEnd: () => handleAnimationEnd(circle.key)
261
+ },
262
+ circle.key
263
+ )),
264
+ role === "continue" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex h-full w-fit items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react3.Icon, { icon: "ri:arrow-drop-right-line", width: 16, height: 16 }) })
265
+ ]
266
+ }
267
+ );
268
+ };
269
+ Button.displayName = "Button";
270
+
271
+ // src/Card.tsx
272
+ var import_class_variance_authority4 = require("class-variance-authority");
273
+ var import_jsx_runtime4 = require("react/jsx-runtime");
274
+ var cardVariants = (0, import_class_variance_authority4.cva)(``, {
275
+ variants: {
276
+ variant: {
277
+ fullpage: "w-full page-padding ",
278
+ fullwidth: "w-full",
279
+ default: ""
280
+ }
281
+ },
282
+ defaultVariants: {
283
+ variant: "default"
284
+ }
285
+ });
286
+ var Card = (props) => {
287
+ const { className, variant, children, outerStyles, ...rest } = props;
288
+ const cardStyles = (0, import_class_variance_authority4.cx)("rounded-xl", className);
289
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_class_variance_authority4.cx)(cardVariants({ variant }), outerStyles), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cardStyles, children }) });
290
+ };
291
+
292
+ // src/Carousel.tsx
293
+ var import_react4 = __toESM(require("react"));
294
+ var import_class_variance_authority5 = require("class-variance-authority");
295
+ var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
296
+ var import_jsx_runtime5 = require("react/jsx-runtime");
297
+ var CarouselContext = import_react4.default.createContext(null);
298
+ function useCarousel() {
299
+ const context = import_react4.default.useContext(CarouselContext);
300
+ if (!context) {
301
+ throw new Error("useCarousel must be used within a <Carousel />");
302
+ }
303
+ return context;
304
+ }
305
+ var Carousel = import_react4.default.forwardRef(
306
+ ({
307
+ orientation = "horizontal",
308
+ opts,
309
+ setApi,
310
+ plugins,
311
+ scrollable,
312
+ className,
313
+ children,
314
+ moveOnClick = false,
315
+ ...props
316
+ }, ref) => {
317
+ const [carouselRef, api] = (0, import_embla_carousel_react.default)(
318
+ {
319
+ ...opts,
320
+ axis: orientation === "horizontal" ? "x" : "y"
321
+ },
322
+ plugins
323
+ );
324
+ const [canScrollPrev, setCanScrollPrev] = (0, import_react4.useState)(false);
325
+ const [canScrollNext, setCanScrollNext] = (0, import_react4.useState)(false);
326
+ const [selectedIndex, setSelectedIndex] = (0, import_react4.useState)(0);
327
+ const carouselContainerRef = (0, import_react4.useRef)(null);
328
+ const onSelect = import_react4.default.useCallback((api2) => {
329
+ if (!api2) {
330
+ return;
331
+ }
332
+ setCanScrollPrev(api2.canScrollPrev());
333
+ setCanScrollNext(api2.canScrollNext());
334
+ setSelectedIndex(api2?.selectedScrollSnap());
335
+ }, []);
336
+ const scrollPrev = import_react4.default.useCallback(() => {
337
+ api?.scrollPrev();
338
+ }, [api]);
339
+ const scrollNext = import_react4.default.useCallback(() => {
340
+ api?.scrollNext();
341
+ }, [api]);
342
+ const handleKeyDown = import_react4.default.useCallback(
343
+ (event) => {
344
+ if (event.key === "ArrowLeft") {
345
+ event.preventDefault();
346
+ scrollPrev();
347
+ } else if (event.key === "ArrowRight") {
348
+ event.preventDefault();
349
+ scrollNext();
350
+ }
351
+ },
352
+ [scrollPrev, scrollNext]
353
+ );
354
+ const handleWheel = import_react4.default.useCallback(
355
+ (event) => {
356
+ if (!api) return;
357
+ const deltaY = event.deltaY;
358
+ if (deltaY < 0) {
359
+ if (api.canScrollPrev()) {
360
+ event.preventDefault();
361
+ api.scrollPrev();
362
+ }
363
+ } else if (deltaY > 0) {
364
+ if (api.canScrollNext()) {
365
+ event.preventDefault();
366
+ api.scrollNext();
367
+ }
368
+ }
369
+ },
370
+ [api]
371
+ );
372
+ (0, import_react4.useEffect)(() => {
373
+ if (!api || !setApi) {
374
+ return;
375
+ }
376
+ setApi(api);
377
+ }, [api, setApi]);
378
+ (0, import_react4.useEffect)(() => {
379
+ if (!api) {
380
+ return;
381
+ }
382
+ onSelect(api);
383
+ api.on("reInit", onSelect);
384
+ api.on("select", onSelect);
385
+ return () => {
386
+ api?.off("select", onSelect);
387
+ };
388
+ }, [api, onSelect]);
389
+ (0, import_react4.useEffect)(() => {
390
+ const carouselNode = carouselContainerRef.current;
391
+ if (!carouselNode) return;
392
+ if (!scrollable) return;
393
+ carouselNode.addEventListener("wheel", handleWheel, { passive: false });
394
+ return () => {
395
+ carouselNode.removeEventListener("wheel", handleWheel);
396
+ };
397
+ }, [carouselRef, handleWheel, scrollable]);
398
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
399
+ CarouselContext.Provider,
400
+ {
401
+ value: {
402
+ carouselRef,
403
+ api,
404
+ opts,
405
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
406
+ scrollPrev,
407
+ scrollNext,
408
+ canScrollPrev,
409
+ canScrollNext,
410
+ selectedIndex,
411
+ moveOnClick
412
+ },
413
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
414
+ "div",
415
+ {
416
+ onKeyDownCapture: handleKeyDown,
417
+ ref: (node) => {
418
+ if (node) carouselContainerRef.current = node;
419
+ if (ref) {
420
+ if (typeof ref === "function") ref(node);
421
+ else ref.current = node;
422
+ }
423
+ },
424
+ className: (0, import_class_variance_authority5.cx)("relative", className),
425
+ role: "region",
426
+ "aria-roledescription": "carousel",
427
+ ...props,
428
+ children
429
+ }
430
+ )
431
+ }
432
+ );
433
+ }
434
+ );
435
+ Carousel.displayName = "Carousel";
436
+ var CarouselContent = import_react4.default.forwardRef(
437
+ ({ className, ...props }, ref) => {
438
+ const { carouselRef, orientation } = useCarousel();
439
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref: carouselRef, className: `'overflow-hidden ${props.wrapperClassName ?? ""}'`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
440
+ "div",
441
+ {
442
+ ref,
443
+ className: (0, import_class_variance_authority5.cx)("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
444
+ ...props
445
+ }
446
+ ) });
447
+ }
448
+ );
449
+ CarouselContent.displayName = "CarouselContent";
450
+ var CarouselItem = import_react4.default.forwardRef((props, ref) => {
451
+ const { className, inActieStyles, activeStyles, index = 0, children, leftStyles, rightStyles, ...rest } = props;
452
+ const { selectedIndex, api, moveOnClick } = useCarousel();
453
+ const isActive = (api && selectedIndex % api?.scrollSnapList().length === index) ?? false;
454
+ const isLeftFromActive = (api && selectedIndex % api?.scrollSnapList().length === index - 1) ?? false;
455
+ const isRightFromActive = (api && selectedIndex % api?.scrollSnapList().length === index + 1) ?? false;
456
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
457
+ "div",
458
+ {
459
+ ref,
460
+ role: "group",
461
+ "aria-roledescription": "slide",
462
+ className: (0, import_class_variance_authority5.cx)(
463
+ className,
464
+ isActive && activeStyles,
465
+ isLeftFromActive && leftStyles,
466
+ isRightFromActive && rightStyles
467
+ ),
468
+ onClick: () => {
469
+ if (props.onClick) {
470
+ props.onClick;
471
+ }
472
+ if (moveOnClick) {
473
+ api?.scrollTo(index);
474
+ }
475
+ },
476
+ ...rest,
477
+ children
478
+ }
479
+ );
480
+ });
481
+ CarouselItem.displayName = "CarouselItem";
482
+ var CarouselPrevious = (props) => {
483
+ const { className, role, hideButtons = true, ...rest } = props;
484
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
485
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
486
+ Button,
487
+ {
488
+ role: "icon",
489
+ size: "sm",
490
+ icon: "ri:arrow-drop-left-line",
491
+ className: (0, import_class_variance_authority5.cx)(
492
+ "absolute rounded-full left-12",
493
+ orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2 -translate-x-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
494
+ className
495
+ ),
496
+ style: { display: hideButtons ? canScrollPrev ? "" : "none" : "" },
497
+ onClick: scrollPrev,
498
+ ...rest,
499
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "sr-only", children: "Previous slide" })
500
+ }
501
+ );
502
+ };
503
+ var CarouselNext = (props) => {
504
+ const { className, role, hideButtons = true, ...rest } = props;
505
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
506
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
507
+ Button,
508
+ {
509
+ role: "icon",
510
+ size: "sm",
511
+ icon: "ri:arrow-drop-right-line",
512
+ className: (0, import_class_variance_authority5.cx)(
513
+ "absolute rounded-full right-12",
514
+ orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2 translate-x-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
515
+ className
516
+ ),
517
+ style: { display: hideButtons ? canScrollNext ? "" : "none" : "" },
518
+ onClick: scrollNext,
519
+ ...rest,
520
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "sr-only", children: "Next slide" })
521
+ }
522
+ );
523
+ };
524
+
525
+ // src/CodeBlock.tsx
526
+ var import_jsx_runtime6 = require("react/jsx-runtime");
527
+ function CodeBlock(props) {
528
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("pre", { className: "bg-gray-300 rounded p-1 inline text-black whitespace-pre-wrap", children: props.children });
529
+ }
530
+
531
+ // src/Text.tsx
532
+ var import_class_variance_authority6 = require("class-variance-authority");
533
+ var import_react5 = __toESM(require("react"));
534
+ var import_jsx_runtime7 = require("react/jsx-runtime");
535
+ var styledText = (0, import_class_variance_authority6.cva)("block", {
536
+ variants: {
537
+ breakType: {
538
+ character: "break-all",
539
+ word: "break-words",
540
+ space: "whitespace-break-spaces",
541
+ none: "whitespace-nowrap"
542
+ },
543
+ size: {
544
+ "h1": "text-h1-mobile font-medium uppercase leading-110 sm:text-h1",
545
+ "h2": "text-h2-mobile font-medium uppercase leading-110 sm:text-h2",
546
+ "h3": "text-h3-mobile font-medium uppercase leading-110 sm:text-h3",
547
+ "h4": "text-h4-mobile font-medium leading-110 sm:text-h4",
548
+ "h5": "text-h5-mobile font-medium leading-110 sm:text-h5",
549
+ "2xl": "text-2xl-mobile leading-164 sm:text-2xl",
550
+ "xl": "text-xl-mobile leading-164 sm:text-xl",
551
+ "lg": "text-large-mobile leading-164 sm:text-large",
552
+ "md": "text-medium-mobile leading-164 sm:text-medium",
553
+ "sm": "text-sm-mobile leading-normal sm:text-sm",
554
+ "caption": "text-captions-mobile leading-164 sm:text-captions"
555
+ },
556
+ color: {
557
+ primary: "text-primary",
558
+ normal: "text-black",
559
+ default: "",
560
+ white: "text-white",
561
+ muted: "text-muted",
562
+ error: "text-red-500",
563
+ semimuted: "text-semimuted"
564
+ },
565
+ weight: {
566
+ medium: "font-medium",
567
+ semibold: "font-semibold",
568
+ bold: "font-bold",
569
+ normal: ""
570
+ },
571
+ fontStyle: {
572
+ italic: "italic",
573
+ uppercase: "uppercase",
574
+ capitalize: "capitalize",
575
+ normal: ""
576
+ },
577
+ spaces: {
578
+ trim: "overflow-hidden text-ellipsis",
579
+ preserve: "whitespace-pre-wrap",
580
+ normal: ""
581
+ },
582
+ align: {
583
+ center: "text-center",
584
+ left: "text-left",
585
+ right: "text-right",
586
+ normal: ""
587
+ }
588
+ },
589
+ defaultVariants: {
590
+ breakType: "word",
591
+ align: "normal",
592
+ spaces: "normal",
593
+ fontStyle: "normal",
594
+ weight: "normal",
595
+ color: "default"
596
+ }
597
+ });
598
+ var Text = import_react5.default.forwardRef((props, ref) => {
599
+ const { className, size, weight, fontStyle, spaces, align, breakType, text, color, ...rest } = props;
600
+ const styles = (0, import_class_variance_authority6.cx)(
601
+ styledText({
602
+ size,
603
+ weight,
604
+ fontStyle,
605
+ spaces,
606
+ align,
607
+ breakType,
608
+ color
609
+ }),
610
+ className
611
+ );
612
+ const textNode = parseNewLines(text);
613
+ switch (size) {
614
+ case "h1":
615
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: styles, ref, ...rest, children: textNode });
616
+ case "h2":
617
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: styles, ref, ...rest, children: textNode });
618
+ case "h3":
619
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: styles, ref, ...rest, children: textNode });
620
+ case "h4":
621
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h4", { className: styles, ref, ...rest, children: textNode });
622
+ case "h5":
623
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h5", { className: styles, ref, ...rest, children: textNode });
624
+ case "lg":
625
+ case "md":
626
+ case "caption":
627
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: styles, ref, ...rest, children: textNode });
628
+ default:
629
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: styles, ref, ...rest, children: textNode });
630
+ }
631
+ });
632
+ var parseNewLines = (text) => {
633
+ if (typeof text === "string") {
634
+ return text.split(/\\n|\n/gm).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react5.default.Fragment, { children: [
635
+ item,
636
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {})
637
+ ] }, index));
638
+ }
639
+ return text;
640
+ };
641
+ Text.displayName = "Text";
642
+
643
+ // src/Copyright.tsx
644
+ var import_jsx_runtime8 = require("react/jsx-runtime");
645
+ var Copyright = () => {
646
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "page-card-content flex flex-col justify-between gap-8 sm:flex-row sm:gap-2", children: [
647
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { text: `All Rights Reserved \xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} Luxonis`, size: "caption", color: "muted" }),
648
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-row gap-10 text-sm text-muted", children: [
649
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { className: "text-muted underline", href: "/privacy", children: "Privacy Policy" }),
650
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { className: "text-muted underline", href: "/terms-of-service", children: "Terms of Service" })
651
+ ] })
652
+ ] });
653
+ };
654
+
655
+ // src/Description.tsx
656
+ var import_class_variance_authority7 = require("class-variance-authority");
657
+ var import_jsx_runtime9 = require("react/jsx-runtime");
658
+ var DescriptionRecepie = (0, import_class_variance_authority7.cva)("flex flex-col ", {
659
+ variants: {
660
+ align: {
661
+ center: "items-start sm:items-center",
662
+ allwayscenter: "items-center",
663
+ left: "items-start",
664
+ leftCenterMobile: "items-start sm:items-center",
665
+ desktopCenterMobileLeft: "w-full items-start !text-left sm:items-center sm:!text-center",
666
+ desktopLeftMobileCenter: "w-full items-center !text-center lg:items-start lg:!text-left"
667
+ },
668
+ gap: {
669
+ lg: "gap-10",
670
+ normal: "gap-8",
671
+ none: "gap-0"
672
+ }
673
+ },
674
+ defaultVariants: {
675
+ gap: "lg",
676
+ align: "center"
677
+ }
678
+ });
679
+ var InnerGap = (0, import_class_variance_authority7.cva)("", {
680
+ variants: {
681
+ innerGap: {
682
+ lg: "gap-6",
683
+ normal: "gap-4"
684
+ }
685
+ },
686
+ defaultVariants: {
687
+ innerGap: "normal"
688
+ }
689
+ });
690
+ var Description = (props) => {
691
+ const {
692
+ description,
693
+ title,
694
+ subTitle,
695
+ className,
696
+ children,
697
+ align,
698
+ gap,
699
+ innerGap,
700
+ textStyle,
701
+ headingStyle,
702
+ descriptionStyle,
703
+ wrapperClassName
704
+ } = props;
705
+ const alingText = align === "left" || align === "desktopLeftMobileCenter" ? "left" : "center";
706
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_class_variance_authority7.cx)(DescriptionRecepie({ align, gap }), className), children: [
707
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_class_variance_authority7.cx)(`flex flex-col gap-4 sm:gap-6 w-full`, wrapperClassName ?? "", InnerGap({ innerGap })), children: [
708
+ subTitle && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
709
+ Text,
710
+ {
711
+ size: "md",
712
+ text: subTitle,
713
+ color: "muted",
714
+ fontStyle: "uppercase",
715
+ align: alingText,
716
+ className: (0, import_class_variance_authority7.cx)(DescriptionRecepie({ align }), textStyle)
717
+ }
718
+ ),
719
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
720
+ Text,
721
+ {
722
+ size: "h2",
723
+ text: title,
724
+ align: alingText,
725
+ className: (0, import_class_variance_authority7.cx)(DescriptionRecepie({ align }), textStyle, headingStyle)
726
+ }
727
+ ),
728
+ alingText === "center" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex w-full flex-row justify-center", children: description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
729
+ Text,
730
+ {
731
+ size: "lg",
732
+ text: description,
733
+ className: (0, import_class_variance_authority7.cx)(DescriptionRecepie({ align }), "max-w-105", textStyle, descriptionStyle),
734
+ align: alingText
735
+ }
736
+ ) }) : description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { size: "lg", text: description, className: (0, import_class_variance_authority7.cx)("max-w-105", textStyle), align: alingText })
737
+ ] }),
738
+ children
739
+ ] });
740
+ };
741
+
742
+ // src/FrostedCard.tsx
743
+ var import_class_variance_authority8 = require("class-variance-authority");
744
+ var import_jsx_runtime10 = require("react/jsx-runtime");
745
+ function FrostedCard(props) {
746
+ const { children, className } = props;
747
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_class_variance_authority8.cx)(`rounded-lg border border-white/30 bg-white/10 p-4 backdrop-blur-sm`, className), children });
748
+ }
749
+
750
+ // src/Hero.tsx
751
+ var import_class_variance_authority9 = require("class-variance-authority");
752
+ var import_jsx_runtime11 = require("react/jsx-runtime");
753
+ var Hero = (props) => {
754
+ const { title, description, button, bgImageLink, desctipionSize = "default" } = props;
755
+ const descriptionSize = () => {
756
+ if (desctipionSize === "lg") {
757
+ return (0, import_class_variance_authority9.cx)("lg:max-w-[525px] max-w-96");
758
+ }
759
+ return "lg:max-w-[350px] max-w-96";
760
+ };
761
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
762
+ "section",
763
+ {
764
+ style: {
765
+ backgroundImage: bgImageLink && `url(${bgImageLink})`,
766
+ backgroundPosition: "center",
767
+ backgroundRepeat: "no-repeat"
768
+ },
769
+ className: "page-card page-padding relative overflow-hidden !rounded-none bg-black bg-cover bg-center bg-no-repeat",
770
+ children: [
771
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "page-card-content relative size-full h-[810px] w-full sm:h-[914px]", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: " absolute inset-x-0 bottom-10 mx-auto flex w-full flex-col items-center justify-between gap-4 md:flex-row md:items-end ", children: [
772
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex w-full flex-row justify-center text-white md:justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { text: title, size: "h1", className: "z-[2] w-96 text-h4 sm:text-h4 xl:w-auto xl:text-h1" }) }),
773
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_class_variance_authority9.cx)("flex flex-col gap-8 md:gap-6 z-[2]", descriptionSize()), children: [
774
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { text: description, color: "white", size: "lg" }),
775
+ button
776
+ ] })
777
+ ] }) }),
778
+ props.children
779
+ ]
780
+ }
781
+ );
782
+ };
783
+
784
+ // src/HoverCard.tsx
785
+ var import_class_variance_authority10 = require("class-variance-authority");
786
+ var React5 = __toESM(require("react"));
787
+ var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"));
788
+ var import_jsx_runtime12 = require("react/jsx-runtime");
789
+ var HoverCard = HoverCardPrimitive.Root;
790
+ var HoverCardTrigger = HoverCardPrimitive.Trigger;
791
+ var HoverCardContent = React5.forwardRef(
792
+ ({ className, align = "start", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
793
+ HoverCardPrimitive.Content,
794
+ {
795
+ ref,
796
+ align,
797
+ sideOffset,
798
+ className: (0, import_class_variance_authority10.cx)(
799
+ "z-50 rounded-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",
800
+ className
801
+ ),
802
+ ...props
803
+ }
804
+ )
805
+ );
806
+ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
807
+
808
+ // src/Input.tsx
809
+ var import_react6 = require("react");
810
+ var import_class_variance_authority11 = require("class-variance-authority");
811
+ var import_jsx_runtime13 = require("react/jsx-runtime");
812
+ var Input = ({
813
+ className,
814
+ label,
815
+ labelPosition = "left",
816
+ errorMessage = "Invalid input",
817
+ onBlur,
818
+ validate = true,
819
+ onChange,
820
+ type,
821
+ ...rest
822
+ }) => {
823
+ const [isInvalid, setIsInvalid] = (0, import_react6.useState)(false);
824
+ const inputId = rest.id || "input-field";
825
+ const errorId = `${inputId}-error`;
826
+ const handleBlur = (e) => {
827
+ if (!validate) {
828
+ if (isInvalid) {
829
+ setIsInvalid(false);
830
+ }
831
+ return;
832
+ }
833
+ setIsInvalid(!e.target.validity.valid);
834
+ if (onBlur) {
835
+ onBlur(e);
836
+ }
837
+ };
838
+ const handleChange = (e) => {
839
+ if (e.target.validity.valid) {
840
+ setIsInvalid(false);
841
+ }
842
+ if (onChange) {
843
+ onChange(e);
844
+ }
845
+ };
846
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex w-full flex-col gap-1", children: [
847
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
848
+ "div",
849
+ {
850
+ className: (0, import_class_variance_authority11.cx)(
851
+ className,
852
+ "flex items-center gap-2 rounded-md bg-white px-4 py-2",
853
+ labelPosition === "left" ? "flex-row" : "flex-row-reverse"
854
+ ),
855
+ children: [
856
+ label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: inputId, className: "text-base text-gray-700", children: label }),
857
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
858
+ "input",
859
+ {
860
+ id: inputId,
861
+ className: (0, import_class_variance_authority11.cx)(
862
+ "peer w-full bg-transparent text-base font-normal leading-8 text-black outline-none placeholder:text-muted",
863
+ isInvalid && "border-red-500"
864
+ ),
865
+ "aria-invalid": isInvalid,
866
+ "aria-describedby": isInvalid ? errorId : void 0,
867
+ onBlur: handleBlur,
868
+ onChange: handleChange,
869
+ type,
870
+ ...rest
871
+ }
872
+ )
873
+ ]
874
+ }
875
+ ),
876
+ isInvalid && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { text: errorMessage, id: errorId, size: "caption", color: "error" })
877
+ ] });
878
+ };
879
+
880
+ // src/Label.tsx
881
+ var React7 = __toESM(require("react"));
882
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
883
+ var import_class_variance_authority12 = require("class-variance-authority");
884
+ var import_jsx_runtime14 = require("react/jsx-runtime");
885
+ var labelVariants = (0, import_class_variance_authority12.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
886
+ var Label = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LabelPrimitive.Root, { ref, className: (0, import_class_variance_authority12.cx)(labelVariants(), className), ...props }));
887
+ Label.displayName = LabelPrimitive.Root.displayName;
888
+
889
+ // src/SearchBar.tsx
890
+ var import_react7 = require("react");
891
+ var import_class_variance_authority13 = require("class-variance-authority");
892
+ var import_react8 = require("@iconify/react");
893
+ var import_jsx_runtime15 = require("react/jsx-runtime");
894
+ var SearchBar = (props) => {
895
+ const { className, placeholder = "Search our store...", setIsSearchOpen, isSearchOpen, ...rest } = props;
896
+ const searchRef = (0, import_react7.useRef)(null);
897
+ if (!isSearchOpen) {
898
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
899
+ Button,
900
+ {
901
+ variant: "unstyled",
902
+ className: "!h-[46px] text-white ",
903
+ icon: "cuida:search-outline",
904
+ onClick: () => {
905
+ setIsSearchOpen(true);
906
+ searchRef.current?.focus();
907
+ }
908
+ }
909
+ );
910
+ }
911
+ const onBlur = () => {
912
+ setTimeout(() => setIsSearchOpen(false), 100);
913
+ };
914
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
915
+ "div",
916
+ {
917
+ className: (0, import_class_variance_authority13.cx)(
918
+ "flex items-center w-full h-full justify-between rounded-full border border-solid bg-white px-4 font-medium text-primary",
919
+ className
920
+ ),
921
+ children: [
922
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
923
+ "input",
924
+ {
925
+ type: "text",
926
+ ref: searchRef,
927
+ onBlur,
928
+ placeholder: placeholder ?? "Search our store...",
929
+ className: "size-full h-[46px] bg-transparent py-2 text-sm text-black outline-none placeholder:text-muted",
930
+ ...rest
931
+ }
932
+ ),
933
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "submit", className: "z-10", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react8.Icon, { icon: "ri:search-line", width: 24, height: 24 }) })
934
+ ]
935
+ }
936
+ );
937
+ };
938
+
939
+ // src/Select.tsx
940
+ var React9 = __toESM(require("react"));
941
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
942
+ var import_class_variance_authority14 = require("class-variance-authority");
943
+ var import_react9 = require("@iconify/react");
944
+ var import_jsx_runtime16 = require("react/jsx-runtime");
945
+ var Select = SelectPrimitive.Root;
946
+ var SelectGroup = SelectPrimitive.Group;
947
+ var SelectValue = SelectPrimitive.Value;
948
+ var SelectTrigger = React9.forwardRef(({ className, noStyle, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
949
+ SelectPrimitive.Trigger,
950
+ {
951
+ ref,
952
+ className: (0, import_class_variance_authority14.cx)(
953
+ !noStyle && "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
954
+ className
955
+ ),
956
+ ...props,
957
+ children: [
958
+ children,
959
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react9.Icon, { icon: "ri:arrow-down", className: "size-4 opacity-50" }) })
960
+ ]
961
+ }
962
+ ));
963
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
964
+ var SelectScrollUpButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
965
+ SelectPrimitive.ScrollUpButton,
966
+ {
967
+ ref,
968
+ className: (0, import_class_variance_authority14.cx)("flex cursor-default items-center justify-center py-1", className),
969
+ ...props,
970
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react9.Icon, { icon: "ri:arrow-up-line", className: "size-4" })
971
+ }
972
+ ));
973
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
974
+ var SelectScrollDownButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
975
+ SelectPrimitive.ScrollDownButton,
976
+ {
977
+ ref,
978
+ className: (0, import_class_variance_authority14.cx)("flex cursor-default items-center justify-center py-1", className),
979
+ ...props,
980
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react9.Icon, { icon: "ri:arrow-down", className: "size-4" })
981
+ }
982
+ ));
983
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
984
+ var SelectContent = React9.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
985
+ SelectPrimitive.Content,
986
+ {
987
+ ref,
988
+ className: (0, import_class_variance_authority14.cx)(
989
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",
990
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
991
+ className
992
+ ),
993
+ position,
994
+ ...props,
995
+ children: [
996
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectScrollUpButton, {}),
997
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
998
+ SelectPrimitive.Viewport,
999
+ {
1000
+ className: (0, import_class_variance_authority14.cx)(
1001
+ "p-1",
1002
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
1003
+ ),
1004
+ children
1005
+ }
1006
+ ),
1007
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectScrollDownButton, {})
1008
+ ]
1009
+ }
1010
+ ) }));
1011
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
1012
+ var SelectLabel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Label, { ref, className: (0, import_class_variance_authority14.cx)("px-2 py-1.5 text-sm font-semibold", className), ...props }));
1013
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
1014
+ var SelectItem = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1015
+ SelectPrimitive.Item,
1016
+ {
1017
+ ref,
1018
+ className: (0, import_class_variance_authority14.cx)(
1019
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1020
+ className
1021
+ ),
1022
+ ...props,
1023
+ children: [
1024
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react9.Icon, { icon: "ri:check-line", className: "size-4" }) }) }),
1025
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ItemText, { children })
1026
+ ]
1027
+ }
1028
+ ));
1029
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
1030
+ var SelectSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Separator, { ref, className: (0, import_class_variance_authority14.cx)("-mx-1 my-1 h-px bg-muted", className), ...props }));
1031
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
1032
+
1033
+ // src/Switch.tsx
1034
+ var React10 = __toESM(require("react"));
1035
+ var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
1036
+ var import_class_variance_authority15 = require("class-variance-authority");
1037
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1038
+ var Switch = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1039
+ SwitchPrimitives.Root,
1040
+ {
1041
+ className: (0, import_class_variance_authority15.cx)(
1042
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
1043
+ className
1044
+ ),
1045
+ ...props,
1046
+ ref,
1047
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1048
+ SwitchPrimitives.Thumb,
1049
+ {
1050
+ className: (0, import_class_variance_authority15.cx)(
1051
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
1052
+ )
1053
+ }
1054
+ )
1055
+ }
1056
+ ));
1057
+ Switch.displayName = SwitchPrimitives.Root.displayName;
1058
+
1059
+ // src/Table.tsx
1060
+ var React11 = __toESM(require("react"));
1061
+ var import_class_variance_authority16 = require("class-variance-authority");
1062
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1063
+ var Table = React11.forwardRef(
1064
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("table", { ref, className: (0, import_class_variance_authority16.cx)("w-full caption-bottom text-sm", className), ...props }) })
1065
+ );
1066
+ Table.displayName = "Table";
1067
+ var TableHeader = React11.forwardRef(
1068
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { ref, className: (0, import_class_variance_authority16.cx)("[&_tr]:border-b", className), ...props })
1069
+ );
1070
+ TableHeader.displayName = "TableHeader";
1071
+ var TableBody = React11.forwardRef(
1072
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tbody", { ref, className: (0, import_class_variance_authority16.cx)("[&_tr:last-child]:border-0", className), ...props })
1073
+ );
1074
+ TableBody.displayName = "TableBody";
1075
+ var TableFooter = React11.forwardRef(
1076
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tfoot", { ref, className: (0, import_class_variance_authority16.cx)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
1077
+ );
1078
+ TableFooter.displayName = "TableFooter";
1079
+ var TableRow = React11.forwardRef(({ className, noStyle, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1080
+ "tr",
1081
+ {
1082
+ ref,
1083
+ className: (0, import_class_variance_authority16.cx)(!noStyle && "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
1084
+ ...props
1085
+ }
1086
+ ));
1087
+ TableRow.displayName = "TableRow";
1088
+ var TableHead = React11.forwardRef(
1089
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1090
+ "th",
1091
+ {
1092
+ ref,
1093
+ className: (0, import_class_variance_authority16.cx)(
1094
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
1095
+ className
1096
+ ),
1097
+ ...props
1098
+ }
1099
+ )
1100
+ );
1101
+ TableHead.displayName = "TableHead";
1102
+ var TableCell = React11.forwardRef(
1103
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("td", { ref, className: (0, import_class_variance_authority16.cx)("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
1104
+ );
1105
+ TableCell.displayName = "TableCell";
1106
+ var TableCaption = React11.forwardRef(
1107
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("caption", { ref, className: (0, import_class_variance_authority16.cx)("mt-4 text-sm text-muted-foreground", className), ...props })
1108
+ );
1109
+ TableCaption.displayName = "TableCaption";
1110
+
1111
+ // src/TextArea.tsx
1112
+ var React12 = __toESM(require("react"));
1113
+ var import_class_variance_authority17 = require("class-variance-authority");
1114
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1115
+ var Textarea = React12.forwardRef(
1116
+ ({ className, ...props }, ref) => {
1117
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1118
+ "textarea",
1119
+ {
1120
+ className: (0, import_class_variance_authority17.cx)(
1121
+ "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1122
+ className
1123
+ ),
1124
+ ref,
1125
+ ...props
1126
+ }
1127
+ );
1128
+ }
1129
+ );
1130
+ Textarea.displayName = "Textarea";
1131
+
1132
+ // src/Video.tsx
1133
+ var import_react10 = require("react");
1134
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1135
+ var Video = (0, import_react10.forwardRef)(({ src, className }, ref) => {
1136
+ const videoRef = (0, import_react10.useRef)(null);
1137
+ const [isPlaying, setIsPlaying] = (0, import_react10.useState)(false);
1138
+ (0, import_react10.useImperativeHandle)(ref, () => ({
1139
+ togglePlay: () => {
1140
+ if (videoRef.current) {
1141
+ if (videoRef.current.paused) {
1142
+ videoRef.current.play();
1143
+ setIsPlaying(true);
1144
+ } else {
1145
+ videoRef.current.pause();
1146
+ setIsPlaying(false);
1147
+ }
1148
+ }
1149
+ }
1150
+ }));
1151
+ const setPlaying = () => {
1152
+ if (videoRef.current) {
1153
+ if (videoRef.current.paused) {
1154
+ videoRef.current.play();
1155
+ setIsPlaying(true);
1156
+ } else {
1157
+ videoRef.current.pause();
1158
+ setIsPlaying(false);
1159
+ }
1160
+ }
1161
+ };
1162
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: `relative ${className}`, children: [
1163
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("video", { onClick: setPlaying, ref: videoRef, className: "size-full object-cover", src, loop: true, children: "Your browser does not support the video tag." }),
1164
+ !isPlaying && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1165
+ Button,
1166
+ {
1167
+ variant: "icon",
1168
+ icon: "mdi:play",
1169
+ role: "icon",
1170
+ onClick: () => setPlaying(),
1171
+ className: "absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white p-2 shadow-md"
1172
+ }
1173
+ )
1174
+ ] });
1175
+ });
1176
+ Video.displayName = "Video";
1177
+ // Annotate the CommonJS export names for ESM import in node:
1178
+ 0 && (module.exports = {
1179
+ Accordion,
1180
+ AccordionContent,
1181
+ AccordionItem,
1182
+ AccordionTrigger,
1183
+ Badge,
1184
+ Button,
1185
+ Card,
1186
+ Carousel,
1187
+ CarouselContent,
1188
+ CarouselItem,
1189
+ CarouselNext,
1190
+ CarouselPrevious,
1191
+ CodeBlock,
1192
+ Copyright,
1193
+ Description,
1194
+ FrostedCard,
1195
+ Hero,
1196
+ HoverCard,
1197
+ HoverCardContent,
1198
+ HoverCardTrigger,
1199
+ Input,
1200
+ Label,
1201
+ SearchBar,
1202
+ Select,
1203
+ SelectContent,
1204
+ SelectGroup,
1205
+ SelectItem,
1206
+ SelectLabel,
1207
+ SelectScrollDownButton,
1208
+ SelectScrollUpButton,
1209
+ SelectSeparator,
1210
+ SelectTrigger,
1211
+ SelectValue,
1212
+ Switch,
1213
+ Table,
1214
+ TableBody,
1215
+ TableCaption,
1216
+ TableCell,
1217
+ TableFooter,
1218
+ TableHead,
1219
+ TableHeader,
1220
+ TableRow,
1221
+ Text,
1222
+ Textarea,
1223
+ Video,
1224
+ badgeVariants,
1225
+ buttonVariants,
1226
+ parseNewLines
1227
+ });