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