@arolariu/components 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/cjs/components/ui/carousel.js +1 -1
  2. package/dist/cjs/components/ui/menubar.js +1 -1
  3. package/dist/cjs/components/ui/pagination.js +1 -1
  4. package/dist/cjs/components/ui/popover.js +1 -1
  5. package/dist/cjs/components/ui/scroll-area.js +1 -1
  6. package/dist/es/components/ui/accordion.js +8 -50
  7. package/dist/es/components/ui/alert-dialog.js +22 -118
  8. package/dist/es/components/ui/alert.js +14 -52
  9. package/dist/es/components/ui/aspect-ratio.js +2 -4
  10. package/dist/es/components/ui/avatar.js +6 -42
  11. package/dist/es/components/ui/badge.js +13 -28
  12. package/dist/es/components/ui/breadcrumb.js +10 -78
  13. package/dist/es/components/ui/button.js +21 -37
  14. package/dist/es/components/ui/calendar.js +29 -52
  15. package/dist/es/components/ui/card.js +6 -51
  16. package/dist/es/components/ui/carousel.js +32 -142
  17. package/dist/es/components/ui/chart.js +42 -169
  18. package/dist/es/components/ui/checkbox.js +2 -23
  19. package/dist/es/components/ui/collapsible.js +6 -24
  20. package/dist/es/components/ui/command.js +18 -136
  21. package/dist/es/components/ui/context-menu.js +30 -187
  22. package/dist/es/components/ui/dialog.js +18 -100
  23. package/dist/es/components/ui/drawer.js +18 -98
  24. package/dist/es/components/ui/dropdown-menu.js +30 -195
  25. package/dist/es/components/ui/form.js +8 -59
  26. package/dist/es/components/ui/hover-card.js +9 -30
  27. package/dist/es/components/ui/input-otp.js +6 -47
  28. package/dist/es/components/ui/input.js +1 -14
  29. package/dist/es/components/ui/label.js +2 -15
  30. package/dist/es/components/ui/menubar.js +47 -228
  31. package/dist/es/components/ui/navigation-menu.js +17 -146
  32. package/dist/es/components/ui/pagination.js +15 -96
  33. package/dist/es/components/ui/popover.js +10 -33
  34. package/dist/es/components/ui/progress.js +2 -24
  35. package/dist/es/components/ui/radio-group.js +4 -35
  36. package/dist/es/components/ui/resizable.js +6 -36
  37. package/dist/es/components/ui/scroll-area.js +4 -51
  38. package/dist/es/components/ui/select.js +21 -142
  39. package/dist/es/components/ui/separator.js +2 -19
  40. package/dist/es/components/ui/sheet.js +17 -99
  41. package/dist/es/components/ui/sidebar.js +112 -512
  42. package/dist/es/components/ui/skeleton.js +1 -8
  43. package/dist/es/components/ui/slider.js +4 -56
  44. package/dist/es/components/ui/sonner.js +7 -15
  45. package/dist/es/components/ui/switch.js +2 -24
  46. package/dist/es/components/ui/table.js +9 -87
  47. package/dist/es/components/ui/tabs.js +8 -54
  48. package/dist/es/components/ui/textarea.js +1 -11
  49. package/dist/es/components/ui/toggle-group.js +9 -48
  50. package/dist/es/components/ui/toggle.js +16 -31
  51. package/dist/es/components/ui/tooltip.js +11 -45
  52. package/dist/umd/arolariu-components.umd.js +2 -2
  53. package/package.json +105 -96
  54. package/readme.md +169 -0
@@ -2,46 +2,30 @@ import { jsx as i } from "react/jsx-runtime";
2
2
  import { Slot as d } from "@radix-ui/react-slot";
3
3
  import { cva as o } from "class-variance-authority";
4
4
  import { cn as s } from "../../lib/utils.js";
5
- const l = o(
6
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
7
- {
8
- variants: {
9
- variant: {
10
- default: "bg-neutral-900 text-neutral-50 shadow-xs hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",
11
- destructive: "bg-red-500 text-white shadow-xs hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-900 dark:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40",
12
- outline: "border border-neutral-200 bg-white shadow-xs hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
13
- secondary: "bg-neutral-100 text-neutral-900 shadow-xs hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
14
- ghost: "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
15
- link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"
16
- },
17
- size: {
18
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
19
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
20
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
21
- icon: "size-9"
22
- }
5
+ const l = o("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900", {
6
+ variants: {
7
+ variant: {
8
+ default: "bg-neutral-900 text-neutral-50 shadow-xs hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",
9
+ destructive: "bg-red-500 text-white shadow-xs hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-900 dark:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40",
10
+ outline: "border border-neutral-200 bg-white shadow-xs hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
11
+ secondary: "bg-neutral-100 text-neutral-900 shadow-xs hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
12
+ ghost: "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
13
+ link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"
23
14
  },
24
- defaultVariants: {
25
- variant: "default",
26
- size: "default"
15
+ size: {
16
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
17
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
18
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
19
+ icon: "size-9"
27
20
  }
21
+ },
22
+ defaultVariants: {
23
+ variant: "default",
24
+ size: "default"
28
25
  }
29
- );
30
- function k({
31
- className: r,
32
- variant: e,
33
- size: a,
34
- asChild: t = !1,
35
- ...n
36
- }) {
37
- return /* @__PURE__ */ i(
38
- t ? d : "button",
39
- {
40
- "data-slot": "button",
41
- className: s(l({ variant: e, size: a, className: r })),
42
- ...n
43
- }
44
- );
26
+ });
27
+ function k({ className: r, variant: e, size: a, asChild: t = !1, ...n }) {
28
+ return i(t ? d : "button", { "data-slot": "button", className: s(l({ variant: e, size: a, className: r })), ...n });
45
29
  }
46
30
  export {
47
31
  k as Button,
@@ -3,58 +3,35 @@ import { ChevronRight as o, ChevronLeft as i } from "lucide-react";
3
3
  import { DayPicker as c } from "react-day-picker";
4
4
  import { cn as e } from "../../lib/utils.js";
5
5
  import { buttonVariants as n } from "./button.js";
6
- function h({
7
- className: d,
8
- classNames: s,
9
- showOutsideDays: u = !0,
10
- ...l
11
- }) {
12
- return /* @__PURE__ */ r(
13
- c,
14
- {
15
- showOutsideDays: u,
16
- className: e("p-3", d),
17
- classNames: {
18
- months: "flex flex-col sm:flex-row gap-2",
19
- month: "flex flex-col gap-4",
20
- caption: "flex justify-center pt-1 relative items-center w-full",
21
- caption_label: "text-sm font-medium",
22
- nav: "flex items-center gap-1",
23
- nav_button: e(
24
- n({ variant: "outline" }),
25
- "size-7 bg-transparent p-0 opacity-50 hover:opacity-100"
26
- ),
27
- nav_button_previous: "absolute left-1",
28
- nav_button_next: "absolute right-1",
29
- table: "w-full border-collapse space-x-1",
30
- head_row: "flex",
31
- head_cell: "text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400",
32
- row: "flex w-full mt-2",
33
- cell: e(
34
- "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800",
35
- l.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
36
- ),
37
- day: e(
38
- n({ variant: "ghost" }),
39
- "size-8 p-0 font-normal aria-selected:opacity-100"
40
- ),
41
- day_range_start: "day-range-start aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
42
- day_range_end: "day-range-end aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
43
- day_selected: "bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900",
44
- day_today: "bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50",
45
- day_outside: "day-outside text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400",
46
- day_disabled: "text-neutral-500 opacity-50 dark:text-neutral-400",
47
- day_range_middle: "aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50",
48
- day_hidden: "invisible",
49
- ...s
50
- },
51
- components: {
52
- IconLeft: ({ className: a, ...t }) => /* @__PURE__ */ r(i, { className: e("size-4", a), ...t }),
53
- IconRight: ({ className: a, ...t }) => /* @__PURE__ */ r(o, { className: e("size-4", a), ...t })
54
- },
55
- ...l
56
- }
57
- );
6
+ function h({ className: d, classNames: s, showOutsideDays: u = !0, ...l }) {
7
+ return r(c, { showOutsideDays: u, className: e("p-3", d), classNames: {
8
+ months: "flex flex-col sm:flex-row gap-2",
9
+ month: "flex flex-col gap-4",
10
+ caption: "flex justify-center pt-1 relative items-center w-full",
11
+ caption_label: "text-sm font-medium",
12
+ nav: "flex items-center gap-1",
13
+ nav_button: e(n({ variant: "outline" }), "size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
14
+ nav_button_previous: "absolute left-1",
15
+ nav_button_next: "absolute right-1",
16
+ table: "w-full border-collapse space-x-1",
17
+ head_row: "flex",
18
+ head_cell: "text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400",
19
+ row: "flex w-full mt-2",
20
+ cell: e("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800", l.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"),
21
+ day: e(n({ variant: "ghost" }), "size-8 p-0 font-normal aria-selected:opacity-100"),
22
+ day_range_start: "day-range-start aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
23
+ day_range_end: "day-range-end aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
24
+ day_selected: "bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900",
25
+ day_today: "bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50",
26
+ day_outside: "day-outside text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400",
27
+ day_disabled: "text-neutral-500 opacity-50 dark:text-neutral-400",
28
+ day_range_middle: "aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50",
29
+ day_hidden: "invisible",
30
+ ...s
31
+ }, components: {
32
+ IconLeft: ({ className: t, ...a }) => r(i, { className: e("size-4", t), ...a }),
33
+ IconRight: ({ className: t, ...a }) => r(o, { className: e("size-4", t), ...a })
34
+ }, ...l });
58
35
  }
59
36
  export {
60
37
  h as Calendar
@@ -1,67 +1,22 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  function o({ className: t, ...r }) {
4
- return /* @__PURE__ */ a(
5
- "div",
6
- {
7
- "data-slot": "card",
8
- className: e(
9
- "bg-white text-neutral-950 flex flex-col gap-6 rounded-xl border border-neutral-200 py-6 shadow-sm dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
10
- t
11
- ),
12
- ...r
13
- }
14
- );
4
+ return a("div", { "data-slot": "card", className: e("bg-white text-neutral-950 flex flex-col gap-6 rounded-xl border border-neutral-200 py-6 shadow-sm dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800", t), ...r });
15
5
  }
16
6
  function l({ className: t, ...r }) {
17
- return /* @__PURE__ */ a(
18
- "div",
19
- {
20
- "data-slot": "card-header",
21
- className: e("flex flex-col gap-1.5 px-6", t),
22
- ...r
23
- }
24
- );
7
+ return a("div", { "data-slot": "card-header", className: e("flex flex-col gap-1.5 px-6", t), ...r });
25
8
  }
26
9
  function s({ className: t, ...r }) {
27
- return /* @__PURE__ */ a(
28
- "div",
29
- {
30
- "data-slot": "card-title",
31
- className: e("leading-none font-semibold", t),
32
- ...r
33
- }
34
- );
10
+ return a("div", { "data-slot": "card-title", className: e("leading-none font-semibold", t), ...r });
35
11
  }
36
12
  function c({ className: t, ...r }) {
37
- return /* @__PURE__ */ a(
38
- "div",
39
- {
40
- "data-slot": "card-description",
41
- className: e("text-neutral-500 text-sm dark:text-neutral-400", t),
42
- ...r
43
- }
44
- );
13
+ return a("div", { "data-slot": "card-description", className: e("text-neutral-500 text-sm dark:text-neutral-400", t), ...r });
45
14
  }
46
15
  function i({ className: t, ...r }) {
47
- return /* @__PURE__ */ a(
48
- "div",
49
- {
50
- "data-slot": "card-content",
51
- className: e("px-6", t),
52
- ...r
53
- }
54
- );
16
+ return a("div", { "data-slot": "card-content", className: e("px-6", t), ...r });
55
17
  }
56
18
  function u({ className: t, ...r }) {
57
- return /* @__PURE__ */ a(
58
- "div",
59
- {
60
- "data-slot": "card-footer",
61
- className: e("flex items-center px-6", t),
62
- ...r
63
- }
64
- );
19
+ return a("div", { "data-slot": "card-footer", className: e("flex items-center px-6", t), ...r });
65
20
  }
66
21
  export {
67
22
  o as Card,
@@ -1,43 +1,29 @@
1
1
  import { jsx as n, jsxs as h } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
- import z from "embla-carousel-react";
4
- import { ArrowLeft as g, ArrowRight as p } from "lucide-react";
3
+ import k from "embla-carousel-react";
4
+ import { ArrowLeft as p, ArrowRight as g } from "lucide-react";
5
5
  import { cn as d } from "../../lib/utils.js";
6
6
  import { Button as v } from "./button.js";
7
7
  const N = l.createContext(null);
8
8
  function m() {
9
- const o = l.useContext(N);
10
- if (!o)
9
+ const r = l.useContext(N);
10
+ if (!r)
11
11
  throw new Error("useCarousel must be used within a <Carousel />");
12
- return o;
12
+ return r;
13
13
  }
14
- function I({
15
- orientation: o = "horizontal",
16
- opts: r,
17
- setApi: t,
18
- plugins: s,
19
- className: c,
20
- children: i,
21
- ...u
22
- }) {
23
- const [b, e] = z(
24
- {
25
- ...r,
26
- axis: o === "horizontal" ? "x" : "y"
27
- },
28
- s
29
- ), [w, S] = l.useState(!1), [y, P] = l.useState(!1), f = l.useCallback((a) => {
30
- a && (S(a.canScrollPrev()), P(a.canScrollNext()));
14
+ function I({ orientation: r = "horizontal", opts: o, setApi: t, plugins: s, className: c, children: i, ...u }) {
15
+ const [b, e] = k({
16
+ ...o,
17
+ axis: r === "horizontal" ? "x" : "y"
18
+ }, s), [w, z] = l.useState(!1), [S, y] = l.useState(!1), f = l.useCallback((a) => {
19
+ a && (z(a.canScrollPrev()), y(a.canScrollNext()));
31
20
  }, []), x = l.useCallback(() => {
32
21
  e == null || e.scrollPrev();
33
22
  }, [e]), C = l.useCallback(() => {
34
23
  e == null || e.scrollNext();
35
- }, [e]), k = l.useCallback(
36
- (a) => {
37
- a.key === "ArrowLeft" ? (a.preventDefault(), x()) : a.key === "ArrowRight" && (a.preventDefault(), C());
38
- },
39
- [x, C]
40
- );
24
+ }, [e]), P = l.useCallback((a) => {
25
+ a.key === "ArrowLeft" ? (a.preventDefault(), x()) : a.key === "ArrowRight" && (a.preventDefault(), C());
26
+ }, [x, C]);
41
27
  return l.useEffect(() => {
42
28
  !e || !t || t(e);
43
29
  }, [e, t]), l.useEffect(() => {
@@ -45,128 +31,32 @@ function I({
45
31
  return f(e), e.on("reInit", f), e.on("select", f), () => {
46
32
  e == null || e.off("select", f);
47
33
  };
48
- }, [e, f]), /* @__PURE__ */ n(
49
- N.Provider,
50
- {
51
- value: {
52
- carouselRef: b,
53
- api: e,
54
- opts: r,
55
- orientation: o || ((r == null ? void 0 : r.axis) === "y" ? "vertical" : "horizontal"),
56
- scrollPrev: x,
57
- scrollNext: C,
58
- canScrollPrev: w,
59
- canScrollNext: y
60
- },
61
- children: /* @__PURE__ */ n(
62
- "div",
63
- {
64
- onKeyDownCapture: k,
65
- className: d("relative", c),
66
- role: "region",
67
- "aria-roledescription": "carousel",
68
- "data-slot": "carousel",
69
- ...u,
70
- children: i
71
- }
72
- )
73
- }
74
- );
34
+ }, [e, f]), n(N.Provider, { value: {
35
+ carouselRef: b,
36
+ api: e,
37
+ opts: o,
38
+ orientation: r || ((o == null ? void 0 : o.axis) === "y" ? "vertical" : "horizontal"),
39
+ scrollPrev: x,
40
+ scrollNext: C,
41
+ canScrollPrev: w,
42
+ canScrollNext: S
43
+ }, children: n("div", { onKeyDownCapture: P, className: d("relative", c), role: "region", "aria-roledescription": "carousel", "data-slot": "carousel", ...u, children: i }) });
75
44
  }
76
- function K({ className: o, ...r }) {
45
+ function K({ className: r, ...o }) {
77
46
  const { carouselRef: t, orientation: s } = m();
78
- return /* @__PURE__ */ n(
79
- "div",
80
- {
81
- ref: t,
82
- className: "overflow-hidden",
83
- "data-slot": "carousel-content",
84
- children: /* @__PURE__ */ n(
85
- "div",
86
- {
87
- className: d(
88
- "flex",
89
- s === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
90
- o
91
- ),
92
- ...r
93
- }
94
- )
95
- }
96
- );
47
+ return n("div", { ref: t, className: "overflow-hidden", "data-slot": "carousel-content", children: n("div", { className: d("flex", s === "horizontal" ? "-ml-4" : "-mt-4 flex-col", r), ...o }) });
97
48
  }
98
- function L({ className: o, ...r }) {
49
+ function L({ className: r, ...o }) {
99
50
  const { orientation: t } = m();
100
- return /* @__PURE__ */ n(
101
- "div",
102
- {
103
- role: "group",
104
- "aria-roledescription": "slide",
105
- "data-slot": "carousel-item",
106
- className: d(
107
- "min-w-0 shrink-0 grow-0 basis-full",
108
- t === "horizontal" ? "pl-4" : "pt-4",
109
- o
110
- ),
111
- ...r
112
- }
113
- );
51
+ return n("div", { role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: d("min-w-0 shrink-0 grow-0 basis-full", t === "horizontal" ? "pl-4" : "pt-4", r), ...o });
114
52
  }
115
- function B({
116
- className: o,
117
- variant: r = "outline",
118
- size: t = "icon",
119
- ...s
120
- }) {
53
+ function B({ className: r, variant: o = "outline", size: t = "icon", ...s }) {
121
54
  const { orientation: c, scrollPrev: i, canScrollPrev: u } = m();
122
- return /* @__PURE__ */ h(
123
- v,
124
- {
125
- "data-slot": "carousel-previous",
126
- variant: r,
127
- size: t,
128
- className: d(
129
- "absolute size-8 rounded-full",
130
- c === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
131
- o
132
- ),
133
- disabled: !u,
134
- onClick: i,
135
- ...s,
136
- children: [
137
- /* @__PURE__ */ n(g, {}),
138
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Previous slide" })
139
- ]
140
- }
141
- );
55
+ return h(v, { "data-slot": "carousel-previous", variant: o, size: t, className: d("absolute size-8 rounded-full", c === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", r), disabled: !u, onClick: i, ...s, children: [n(p, {}), n("span", { className: "sr-only", children: "Previous slide" })] });
142
56
  }
143
- function q({
144
- className: o,
145
- variant: r = "outline",
146
- size: t = "icon",
147
- ...s
148
- }) {
57
+ function q({ className: r, variant: o = "outline", size: t = "icon", ...s }) {
149
58
  const { orientation: c, scrollNext: i, canScrollNext: u } = m();
150
- return /* @__PURE__ */ h(
151
- v,
152
- {
153
- "data-slot": "carousel-next",
154
- variant: r,
155
- size: t,
156
- className: d(
157
- "absolute size-8 rounded-full",
158
- c === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
159
- o
160
- ),
161
- disabled: !u,
162
- onClick: i,
163
- ...s,
164
- children: [
165
- /* @__PURE__ */ n(p, {}),
166
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Next slide" })
167
- ]
168
- }
169
- );
59
+ return h(v, { "data-slot": "carousel-next", variant: o, size: t, className: d("absolute size-8 rounded-full", c === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", r), disabled: !u, onClick: i, ...s, children: [n(g, {}), n("span", { className: "sr-only", children: "Next slide" })] });
170
60
  }
171
61
  export {
172
62
  I as Carousel,