@locusgraph/components 0.2.0 → 0.2.2
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/action/button-group.js +45 -17
- package/dist/action/button.js +44 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +70 -17
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.js +33 -20
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +56 -13
- package/dist/display/chat/attachment/attachment.js +70 -28
- package/dist/display/chat/bubble.js +80 -37
- package/dist/display/chat/marker.js +44 -15
- package/dist/display/chat/message-scroller.js +276 -14
- package/dist/display/chat/message.js +58 -13
- package/dist/display/content/item.js +134 -47
- package/dist/display/content/kbd.js +19 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +162 -11
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.js +86 -29
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +30 -6
- package/dist/display/skeletons/layouts/skeleton-table.js +44 -6
- package/dist/display/skeletons/shapes/skeleton-avatar.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-button.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-text.js +25 -7
- package/dist/display/skeletons/skeleton-parts.js +22 -6
- package/dist/display/status/alert.js +44 -18
- package/dist/display/status/empty.js +69 -22
- package/dist/display/status/progress.js +116 -16
- package/dist/display/status/skeleton.js +10 -3
- package/dist/display/status/spinner.js +11 -3
- package/dist/display/table.js +77 -17
- package/dist/feedback/toaster.js +98 -21
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +151 -8
- package/dist/form/advanced/combobox/combobox-items.js +239 -14
- package/dist/form/advanced/combobox/combobox.js +386 -13
- package/dist/form/advanced/input-otp.js +201 -11
- package/dist/form/choice/checkbox.js +58 -3
- package/dist/form/choice/radio-group.js +94 -5
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +34 -14
- package/dist/form/field/field-separator.js +19 -3
- package/dist/form/field/field-set.js +21 -5
- package/dist/form/field/field-text.js +28 -7
- package/dist/form/field/field.js +43 -25
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +13 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +39 -7
- package/dist/form/textarea.js +11 -3
- package/dist/layout/accordion.js +165 -8
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +122 -7
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +384 -28
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +11 -11
- package/dist/navigation/breadcrumb.js +82 -17
- package/dist/navigation/menubar/menubar-items.js +322 -16
- package/dist/navigation/menubar/menubar-sub.js +125 -7
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +90 -18
- package/dist/navigation/pagination.js +91 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +322 -16
- package/dist/overlay/context-menu/context-menu-sub.js +125 -7
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +405 -24
- package/dist/overlay/floating/command.js +423 -20
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +149 -7
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +379 -26
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +29 -5
- package/dist/shell/app-shell.js +19 -3
- package/dist/shell/breadcrumbs.js +46 -14
- package/dist/shell/docs/docs-header.js +210 -10
- package/dist/shell/docs/docs-shell.js +36 -3
- package/dist/shell/docs/docs-sidebar.js +41 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +44 -42
- package/dist/shell/navigation/app-sidebar.js +66 -6
- package/dist/shell/navigation/nav-group.js +53 -11
- package/dist/shell/theme-toggle.js +51 -4
- package/package.json +2 -2
|
@@ -1,19 +1,170 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { ArrowLeft, ArrowRight } from "@carbon/icons-react";
|
|
4
5
|
import { cn } from "cn";
|
|
6
|
+
import * as React from "react";
|
|
5
7
|
import { Button } from "../../action/button.js";
|
|
6
8
|
import { useCarousel } from "./carousel.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
function CarouselPrevious(t0) {
|
|
11
|
+
const $ = _c(17);
|
|
12
|
+
let className;
|
|
13
|
+
let props;
|
|
14
|
+
let t1;
|
|
15
|
+
let t2;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({
|
|
18
|
+
className,
|
|
19
|
+
variant: t1,
|
|
20
|
+
size: t2,
|
|
21
|
+
...props
|
|
22
|
+
} = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = className;
|
|
25
|
+
$[2] = props;
|
|
26
|
+
$[3] = t1;
|
|
27
|
+
$[4] = t2;
|
|
28
|
+
} else {
|
|
29
|
+
className = $[1];
|
|
30
|
+
props = $[2];
|
|
31
|
+
t1 = $[3];
|
|
32
|
+
t2 = $[4];
|
|
33
|
+
}
|
|
34
|
+
const variant = t1 === undefined ? "outline" : t1;
|
|
35
|
+
const size = t2 === undefined ? "icon" : t2;
|
|
36
|
+
const {
|
|
37
|
+
orientation,
|
|
38
|
+
scrollPrev,
|
|
39
|
+
canScrollPrev
|
|
40
|
+
} = useCarousel();
|
|
41
|
+
const t3 = orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90";
|
|
42
|
+
let t4;
|
|
43
|
+
if ($[5] !== className || $[6] !== t3) {
|
|
44
|
+
t4 = cn("absolute size-8 rounded-full", t3, className);
|
|
45
|
+
$[5] = className;
|
|
46
|
+
$[6] = t3;
|
|
47
|
+
$[7] = t4;
|
|
48
|
+
} else {
|
|
49
|
+
t4 = $[7];
|
|
50
|
+
}
|
|
51
|
+
const t5 = !canScrollPrev;
|
|
52
|
+
let t6;
|
|
53
|
+
let t7;
|
|
54
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
55
|
+
t6 = /*#__PURE__*/_jsx(ArrowLeft, {});
|
|
56
|
+
t7 = /*#__PURE__*/_jsx("span", {
|
|
57
|
+
className: "sr-only",
|
|
58
|
+
children: "Previous slide"
|
|
59
|
+
});
|
|
60
|
+
$[8] = t6;
|
|
61
|
+
$[9] = t7;
|
|
62
|
+
} else {
|
|
63
|
+
t6 = $[8];
|
|
64
|
+
t7 = $[9];
|
|
65
|
+
}
|
|
66
|
+
let t8;
|
|
67
|
+
if ($[10] !== props || $[11] !== scrollPrev || $[12] !== size || $[13] !== t4 || $[14] !== t5 || $[15] !== variant) {
|
|
68
|
+
t8 = /*#__PURE__*/_jsxs(Button, {
|
|
69
|
+
"data-slot": "carousel-previous",
|
|
70
|
+
variant: variant,
|
|
71
|
+
size: size,
|
|
72
|
+
className: t4,
|
|
73
|
+
disabled: t5,
|
|
74
|
+
onClick: scrollPrev,
|
|
75
|
+
...props,
|
|
76
|
+
children: [t6, t7]
|
|
77
|
+
});
|
|
78
|
+
$[10] = props;
|
|
79
|
+
$[11] = scrollPrev;
|
|
80
|
+
$[12] = size;
|
|
81
|
+
$[13] = t4;
|
|
82
|
+
$[14] = t5;
|
|
83
|
+
$[15] = variant;
|
|
84
|
+
$[16] = t8;
|
|
85
|
+
} else {
|
|
86
|
+
t8 = $[16];
|
|
87
|
+
}
|
|
88
|
+
return t8;
|
|
12
89
|
}
|
|
13
|
-
function CarouselNext(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
90
|
+
function CarouselNext(t0) {
|
|
91
|
+
const $ = _c(17);
|
|
92
|
+
let className;
|
|
93
|
+
let props;
|
|
94
|
+
let t1;
|
|
95
|
+
let t2;
|
|
96
|
+
if ($[0] !== t0) {
|
|
97
|
+
({
|
|
98
|
+
className,
|
|
99
|
+
variant: t1,
|
|
100
|
+
size: t2,
|
|
101
|
+
...props
|
|
102
|
+
} = t0);
|
|
103
|
+
$[0] = t0;
|
|
104
|
+
$[1] = className;
|
|
105
|
+
$[2] = props;
|
|
106
|
+
$[3] = t1;
|
|
107
|
+
$[4] = t2;
|
|
108
|
+
} else {
|
|
109
|
+
className = $[1];
|
|
110
|
+
props = $[2];
|
|
111
|
+
t1 = $[3];
|
|
112
|
+
t2 = $[4];
|
|
113
|
+
}
|
|
114
|
+
const variant = t1 === undefined ? "outline" : t1;
|
|
115
|
+
const size = t2 === undefined ? "icon" : t2;
|
|
116
|
+
const {
|
|
117
|
+
orientation,
|
|
118
|
+
scrollNext,
|
|
119
|
+
canScrollNext
|
|
120
|
+
} = useCarousel();
|
|
121
|
+
const t3 = orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90";
|
|
122
|
+
let t4;
|
|
123
|
+
if ($[5] !== className || $[6] !== t3) {
|
|
124
|
+
t4 = cn("absolute size-8 rounded-full", t3, className);
|
|
125
|
+
$[5] = className;
|
|
126
|
+
$[6] = t3;
|
|
127
|
+
$[7] = t4;
|
|
128
|
+
} else {
|
|
129
|
+
t4 = $[7];
|
|
130
|
+
}
|
|
131
|
+
const t5 = !canScrollNext;
|
|
132
|
+
let t6;
|
|
133
|
+
let t7;
|
|
134
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
135
|
+
t6 = /*#__PURE__*/_jsx(ArrowRight, {});
|
|
136
|
+
t7 = /*#__PURE__*/_jsx("span", {
|
|
137
|
+
className: "sr-only",
|
|
138
|
+
children: "Next slide"
|
|
139
|
+
});
|
|
140
|
+
$[8] = t6;
|
|
141
|
+
$[9] = t7;
|
|
142
|
+
} else {
|
|
143
|
+
t6 = $[8];
|
|
144
|
+
t7 = $[9];
|
|
145
|
+
}
|
|
146
|
+
let t8;
|
|
147
|
+
if ($[10] !== props || $[11] !== scrollNext || $[12] !== size || $[13] !== t4 || $[14] !== t5 || $[15] !== variant) {
|
|
148
|
+
t8 = /*#__PURE__*/_jsxs(Button, {
|
|
149
|
+
"data-slot": "carousel-next",
|
|
150
|
+
variant: variant,
|
|
151
|
+
size: size,
|
|
152
|
+
className: t4,
|
|
153
|
+
disabled: t5,
|
|
154
|
+
onClick: scrollNext,
|
|
155
|
+
...props,
|
|
156
|
+
children: [t6, t7]
|
|
157
|
+
});
|
|
158
|
+
$[10] = props;
|
|
159
|
+
$[11] = scrollNext;
|
|
160
|
+
$[12] = size;
|
|
161
|
+
$[13] = t4;
|
|
162
|
+
$[14] = t5;
|
|
163
|
+
$[15] = variant;
|
|
164
|
+
$[16] = t8;
|
|
165
|
+
} else {
|
|
166
|
+
t8 = $[16];
|
|
167
|
+
}
|
|
168
|
+
return t8;
|
|
18
169
|
}
|
|
19
170
|
export { CarouselNext, CarouselPrevious };
|
|
@@ -1,77 +1,337 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { cn } from "cn";
|
|
4
5
|
import useEmblaCarousel from "embla-carousel-react";
|
|
5
6
|
import * as React from "react";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
8
|
const CarouselContext = React.createContext(null);
|
|
7
9
|
function useCarousel() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const context = React.useContext(CarouselContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
13
15
|
}
|
|
14
|
-
function Carousel(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
16
|
+
function Carousel(t0) {
|
|
17
|
+
const $ = _c(45);
|
|
18
|
+
let children;
|
|
19
|
+
let className;
|
|
20
|
+
let opts;
|
|
21
|
+
let plugins;
|
|
22
|
+
let props;
|
|
23
|
+
let setApi;
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[0] !== t0) {
|
|
26
|
+
({
|
|
27
|
+
orientation: t1,
|
|
28
|
+
opts,
|
|
29
|
+
setApi,
|
|
30
|
+
plugins,
|
|
31
|
+
className,
|
|
32
|
+
children,
|
|
33
|
+
...props
|
|
34
|
+
} = t0);
|
|
35
|
+
$[0] = t0;
|
|
36
|
+
$[1] = children;
|
|
37
|
+
$[2] = className;
|
|
38
|
+
$[3] = opts;
|
|
39
|
+
$[4] = plugins;
|
|
40
|
+
$[5] = props;
|
|
41
|
+
$[6] = setApi;
|
|
42
|
+
$[7] = t1;
|
|
43
|
+
} else {
|
|
44
|
+
children = $[1];
|
|
45
|
+
className = $[2];
|
|
46
|
+
opts = $[3];
|
|
47
|
+
plugins = $[4];
|
|
48
|
+
props = $[5];
|
|
49
|
+
setApi = $[6];
|
|
50
|
+
t1 = $[7];
|
|
51
|
+
}
|
|
52
|
+
const orientation = t1 === undefined ? "horizontal" : t1;
|
|
53
|
+
const t2 = orientation === "horizontal" ? "x" : "y";
|
|
54
|
+
let t3;
|
|
55
|
+
if ($[8] !== opts || $[9] !== t2) {
|
|
56
|
+
t3 = {
|
|
57
|
+
...opts,
|
|
58
|
+
axis: t2
|
|
59
|
+
};
|
|
60
|
+
$[8] = opts;
|
|
61
|
+
$[9] = t2;
|
|
62
|
+
$[10] = t3;
|
|
63
|
+
} else {
|
|
64
|
+
t3 = $[10];
|
|
65
|
+
}
|
|
66
|
+
const [carouselRef, api] = useEmblaCarousel(t3, plugins);
|
|
67
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
68
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
69
|
+
let t4;
|
|
70
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
71
|
+
t4 = api_0 => {
|
|
72
|
+
if (!api_0) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
setCanScrollPrev(api_0.canScrollPrev());
|
|
76
|
+
setCanScrollNext(api_0.canScrollNext());
|
|
77
|
+
};
|
|
78
|
+
$[11] = t4;
|
|
79
|
+
} else {
|
|
80
|
+
t4 = $[11];
|
|
81
|
+
}
|
|
82
|
+
const onSelect = t4;
|
|
83
|
+
let t5;
|
|
84
|
+
if ($[12] !== api) {
|
|
85
|
+
t5 = () => {
|
|
86
|
+
api?.scrollPrev();
|
|
87
|
+
};
|
|
88
|
+
$[12] = api;
|
|
89
|
+
$[13] = t5;
|
|
90
|
+
} else {
|
|
91
|
+
t5 = $[13];
|
|
92
|
+
}
|
|
93
|
+
const scrollPrev = t5;
|
|
94
|
+
let t6;
|
|
95
|
+
if ($[14] !== api) {
|
|
96
|
+
t6 = () => {
|
|
97
|
+
api?.scrollNext();
|
|
98
|
+
};
|
|
99
|
+
$[14] = api;
|
|
100
|
+
$[15] = t6;
|
|
101
|
+
} else {
|
|
102
|
+
t6 = $[15];
|
|
103
|
+
}
|
|
104
|
+
const scrollNext = t6;
|
|
105
|
+
let t7;
|
|
106
|
+
if ($[16] !== scrollNext || $[17] !== scrollPrev) {
|
|
107
|
+
t7 = event => {
|
|
108
|
+
if (event.key === "ArrowLeft") {
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
scrollPrev();
|
|
111
|
+
} else {
|
|
112
|
+
if (event.key === "ArrowRight") {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
scrollNext();
|
|
41
115
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
$[16] = scrollNext;
|
|
119
|
+
$[17] = scrollPrev;
|
|
120
|
+
$[18] = t7;
|
|
121
|
+
} else {
|
|
122
|
+
t7 = $[18];
|
|
123
|
+
}
|
|
124
|
+
const handleKeyDown = t7;
|
|
125
|
+
let t8;
|
|
126
|
+
let t9;
|
|
127
|
+
if ($[19] !== api || $[20] !== setApi) {
|
|
128
|
+
t8 = () => {
|
|
129
|
+
if (!api || !setApi) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
setApi(api);
|
|
133
|
+
};
|
|
134
|
+
t9 = [api, setApi];
|
|
135
|
+
$[19] = api;
|
|
136
|
+
$[20] = setApi;
|
|
137
|
+
$[21] = t8;
|
|
138
|
+
$[22] = t9;
|
|
139
|
+
} else {
|
|
140
|
+
t8 = $[21];
|
|
141
|
+
t9 = $[22];
|
|
142
|
+
}
|
|
143
|
+
React.useEffect(t8, t9);
|
|
144
|
+
let t10;
|
|
145
|
+
let t11;
|
|
146
|
+
if ($[23] !== api) {
|
|
147
|
+
t10 = () => {
|
|
148
|
+
if (!api) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
onSelect(api);
|
|
152
|
+
api.on("reInit", onSelect);
|
|
153
|
+
api.on("select", onSelect);
|
|
154
|
+
return () => {
|
|
155
|
+
api?.off("select", onSelect);
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
t11 = [api, onSelect];
|
|
159
|
+
$[23] = api;
|
|
160
|
+
$[24] = t10;
|
|
161
|
+
$[25] = t11;
|
|
162
|
+
} else {
|
|
163
|
+
t10 = $[24];
|
|
164
|
+
t11 = $[25];
|
|
165
|
+
}
|
|
166
|
+
React.useEffect(t10, t11);
|
|
167
|
+
const t12 = orientation || (opts?.axis === "y" ? "vertical" : "horizontal");
|
|
168
|
+
let t13;
|
|
169
|
+
if ($[26] !== api || $[27] !== canScrollNext || $[28] !== canScrollPrev || $[29] !== carouselRef || $[30] !== opts || $[31] !== scrollNext || $[32] !== scrollPrev || $[33] !== t12) {
|
|
170
|
+
t13 = {
|
|
171
|
+
carouselRef,
|
|
172
|
+
api,
|
|
173
|
+
opts,
|
|
174
|
+
orientation: t12,
|
|
175
|
+
scrollPrev,
|
|
176
|
+
scrollNext,
|
|
177
|
+
canScrollPrev,
|
|
178
|
+
canScrollNext
|
|
179
|
+
};
|
|
180
|
+
$[26] = api;
|
|
181
|
+
$[27] = canScrollNext;
|
|
182
|
+
$[28] = canScrollPrev;
|
|
183
|
+
$[29] = carouselRef;
|
|
184
|
+
$[30] = opts;
|
|
185
|
+
$[31] = scrollNext;
|
|
186
|
+
$[32] = scrollPrev;
|
|
187
|
+
$[33] = t12;
|
|
188
|
+
$[34] = t13;
|
|
189
|
+
} else {
|
|
190
|
+
t13 = $[34];
|
|
191
|
+
}
|
|
192
|
+
let t14;
|
|
193
|
+
if ($[35] !== className) {
|
|
194
|
+
t14 = cn("relative", className);
|
|
195
|
+
$[35] = className;
|
|
196
|
+
$[36] = t14;
|
|
197
|
+
} else {
|
|
198
|
+
t14 = $[36];
|
|
199
|
+
}
|
|
200
|
+
let t15;
|
|
201
|
+
if ($[37] !== children || $[38] !== handleKeyDown || $[39] !== props || $[40] !== t14) {
|
|
202
|
+
t15 = /*#__PURE__*/_jsx("div", {
|
|
203
|
+
onKeyDownCapture: handleKeyDown,
|
|
204
|
+
className: t14,
|
|
205
|
+
role: "region",
|
|
206
|
+
"aria-roledescription": "carousel",
|
|
207
|
+
"data-slot": "carousel",
|
|
208
|
+
...props,
|
|
209
|
+
children: children
|
|
210
|
+
});
|
|
211
|
+
$[37] = children;
|
|
212
|
+
$[38] = handleKeyDown;
|
|
213
|
+
$[39] = props;
|
|
214
|
+
$[40] = t14;
|
|
215
|
+
$[41] = t15;
|
|
216
|
+
} else {
|
|
217
|
+
t15 = $[41];
|
|
218
|
+
}
|
|
219
|
+
let t16;
|
|
220
|
+
if ($[42] !== t13 || $[43] !== t15) {
|
|
221
|
+
t16 = /*#__PURE__*/_jsx(CarouselContext.Provider, {
|
|
222
|
+
value: t13,
|
|
223
|
+
children: t15
|
|
224
|
+
});
|
|
225
|
+
$[42] = t13;
|
|
226
|
+
$[43] = t15;
|
|
227
|
+
$[44] = t16;
|
|
228
|
+
} else {
|
|
229
|
+
t16 = $[44];
|
|
230
|
+
}
|
|
231
|
+
return t16;
|
|
68
232
|
}
|
|
69
|
-
function CarouselContent(
|
|
70
|
-
|
|
71
|
-
|
|
233
|
+
function CarouselContent(t0) {
|
|
234
|
+
const $ = _c(12);
|
|
235
|
+
let className;
|
|
236
|
+
let props;
|
|
237
|
+
if ($[0] !== t0) {
|
|
238
|
+
({
|
|
239
|
+
className,
|
|
240
|
+
...props
|
|
241
|
+
} = t0);
|
|
242
|
+
$[0] = t0;
|
|
243
|
+
$[1] = className;
|
|
244
|
+
$[2] = props;
|
|
245
|
+
} else {
|
|
246
|
+
className = $[1];
|
|
247
|
+
props = $[2];
|
|
248
|
+
}
|
|
249
|
+
const {
|
|
250
|
+
carouselRef,
|
|
251
|
+
orientation
|
|
252
|
+
} = useCarousel();
|
|
253
|
+
const t1 = orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col";
|
|
254
|
+
let t2;
|
|
255
|
+
if ($[3] !== className || $[4] !== t1) {
|
|
256
|
+
t2 = cn("flex", t1, className);
|
|
257
|
+
$[3] = className;
|
|
258
|
+
$[4] = t1;
|
|
259
|
+
$[5] = t2;
|
|
260
|
+
} else {
|
|
261
|
+
t2 = $[5];
|
|
262
|
+
}
|
|
263
|
+
let t3;
|
|
264
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
265
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
266
|
+
className: t2,
|
|
267
|
+
...props
|
|
268
|
+
});
|
|
269
|
+
$[6] = props;
|
|
270
|
+
$[7] = t2;
|
|
271
|
+
$[8] = t3;
|
|
272
|
+
} else {
|
|
273
|
+
t3 = $[8];
|
|
274
|
+
}
|
|
275
|
+
let t4;
|
|
276
|
+
if ($[9] !== carouselRef || $[10] !== t3) {
|
|
277
|
+
t4 = /*#__PURE__*/_jsx("div", {
|
|
278
|
+
ref: carouselRef,
|
|
279
|
+
className: "overflow-hidden",
|
|
280
|
+
"data-slot": "carousel-content",
|
|
281
|
+
children: t3
|
|
282
|
+
});
|
|
283
|
+
$[9] = carouselRef;
|
|
284
|
+
$[10] = t3;
|
|
285
|
+
$[11] = t4;
|
|
286
|
+
} else {
|
|
287
|
+
t4 = $[11];
|
|
288
|
+
}
|
|
289
|
+
return t4;
|
|
72
290
|
}
|
|
73
|
-
function CarouselItem(
|
|
74
|
-
|
|
75
|
-
|
|
291
|
+
function CarouselItem(t0) {
|
|
292
|
+
const $ = _c(9);
|
|
293
|
+
let className;
|
|
294
|
+
let props;
|
|
295
|
+
if ($[0] !== t0) {
|
|
296
|
+
({
|
|
297
|
+
className,
|
|
298
|
+
...props
|
|
299
|
+
} = t0);
|
|
300
|
+
$[0] = t0;
|
|
301
|
+
$[1] = className;
|
|
302
|
+
$[2] = props;
|
|
303
|
+
} else {
|
|
304
|
+
className = $[1];
|
|
305
|
+
props = $[2];
|
|
306
|
+
}
|
|
307
|
+
const {
|
|
308
|
+
orientation
|
|
309
|
+
} = useCarousel();
|
|
310
|
+
const t1 = orientation === "horizontal" ? "pl-4" : "pt-4";
|
|
311
|
+
let t2;
|
|
312
|
+
if ($[3] !== className || $[4] !== t1) {
|
|
313
|
+
t2 = cn("min-w-0 shrink-0 grow-0 basis-full", t1, className);
|
|
314
|
+
$[3] = className;
|
|
315
|
+
$[4] = t1;
|
|
316
|
+
$[5] = t2;
|
|
317
|
+
} else {
|
|
318
|
+
t2 = $[5];
|
|
319
|
+
}
|
|
320
|
+
let t3;
|
|
321
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
322
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
323
|
+
role: "group",
|
|
324
|
+
"aria-roledescription": "slide",
|
|
325
|
+
"data-slot": "carousel-item",
|
|
326
|
+
className: t2,
|
|
327
|
+
...props
|
|
328
|
+
});
|
|
329
|
+
$[6] = props;
|
|
330
|
+
$[7] = t2;
|
|
331
|
+
$[8] = t3;
|
|
332
|
+
} else {
|
|
333
|
+
t3 = $[8];
|
|
334
|
+
}
|
|
335
|
+
return t3;
|
|
76
336
|
}
|
|
77
337
|
export { Carousel, CarouselContent, CarouselItem, useCarousel };
|