@locusgraph/components 0.2.0 → 0.2.1

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 (102) hide show
  1. package/dist/action/button-group.js +148 -17
  2. package/dist/action/button.js +91 -27
  3. package/dist/action/toggle-group.js +176 -12
  4. package/dist/action/toggle.js +70 -17
  5. package/dist/display/avatar.js +118 -7
  6. package/dist/display/badge.js +74 -20
  7. package/dist/display/chart/chart-container.js +205 -45
  8. package/dist/display/chart/chart-legend.js +79 -14
  9. package/dist/display/chart/chart-tooltip.js +211 -40
  10. package/dist/display/chat/attachment/attachment-parts.js +222 -13
  11. package/dist/display/chat/attachment/attachment.js +210 -28
  12. package/dist/display/chat/bubble.js +225 -37
  13. package/dist/display/chat/marker.js +143 -15
  14. package/dist/display/chat/message-scroller.js +276 -14
  15. package/dist/display/chat/message.js +238 -13
  16. package/dist/display/content/item.js +448 -47
  17. package/dist/display/content/kbd.js +78 -5
  18. package/dist/display/media/aspect-ratio.js +27 -3
  19. package/dist/display/media/carousel-controls.js +162 -11
  20. package/dist/display/media/carousel.js +325 -65
  21. package/dist/display/rule-grid/rule-grid.js +309 -29
  22. package/dist/display/separator.js +56 -3
  23. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +79 -6
  24. package/dist/display/skeletons/layouts/skeleton-table.js +163 -5
  25. package/dist/display/skeletons/shapes/skeleton-avatar.js +95 -13
  26. package/dist/display/skeletons/shapes/skeleton-button.js +95 -13
  27. package/dist/display/skeletons/shapes/skeleton-text.js +78 -7
  28. package/dist/display/skeletons/skeleton-parts.js +63 -6
  29. package/dist/display/status/alert.js +136 -18
  30. package/dist/display/status/empty.js +250 -22
  31. package/dist/display/status/progress.js +116 -16
  32. package/dist/display/status/skeleton.js +40 -3
  33. package/dist/display/status/spinner.js +41 -3
  34. package/dist/display/table.js +310 -17
  35. package/dist/feedback/toaster.js +98 -21
  36. package/dist/form/advanced/calendar-day-button.js +89 -12
  37. package/dist/form/advanced/calendar.js +349 -56
  38. package/dist/form/advanced/combobox/combobox-chips.js +151 -8
  39. package/dist/form/advanced/combobox/combobox-items.js +239 -14
  40. package/dist/form/advanced/combobox/combobox.js +386 -13
  41. package/dist/form/advanced/input-otp.js +201 -11
  42. package/dist/form/choice/checkbox.js +58 -3
  43. package/dist/form/choice/radio-group.js +94 -5
  44. package/dist/form/choice/select.js +479 -25
  45. package/dist/form/choice/slider.js +118 -4
  46. package/dist/form/choice/switch.js +53 -3
  47. package/dist/form/field/field-error.js +117 -14
  48. package/dist/form/field/field-separator.js +70 -3
  49. package/dist/form/field/field-set.js +85 -5
  50. package/dist/form/field/field-text.js +116 -7
  51. package/dist/form/field/field.js +137 -25
  52. package/dist/form/hook-form/form.js +338 -40
  53. package/dist/form/input-group.js +297 -47
  54. package/dist/form/input.js +47 -3
  55. package/dist/form/label.js +42 -3
  56. package/dist/form/native-select.js +147 -7
  57. package/dist/form/textarea.js +41 -3
  58. package/dist/layout/accordion.js +165 -8
  59. package/dist/layout/collapsible.js +75 -7
  60. package/dist/layout/resizable.js +122 -7
  61. package/dist/layout/scroll/direction.js +25 -3
  62. package/dist/layout/scroll/scroll-area.js +138 -5
  63. package/dist/layout/sidebar/sidebar-context.js +184 -51
  64. package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
  65. package/dist/layout/sidebar/sidebar-menu.js +319 -38
  66. package/dist/layout/sidebar/sidebar-sections.js +369 -22
  67. package/dist/layout/sidebar/sidebar.js +384 -28
  68. package/dist/layout/tabs.js +183 -18
  69. package/dist/layout/use-mobile.js +23 -10
  70. package/dist/navigation/breadcrumb.js +301 -17
  71. package/dist/navigation/menubar/menubar-items.js +322 -16
  72. package/dist/navigation/menubar/menubar-sub.js +125 -7
  73. package/dist/navigation/menubar/menubar.js +213 -13
  74. package/dist/navigation/navigation-menu.js +366 -18
  75. package/dist/navigation/pagination.js +328 -20
  76. package/dist/overlay/alert-dialog.js +485 -26
  77. package/dist/overlay/context-menu/context-menu-items.js +322 -16
  78. package/dist/overlay/context-menu/context-menu-sub.js +125 -7
  79. package/dist/overlay/context-menu/context-menu.js +140 -11
  80. package/dist/overlay/dialog.js +405 -24
  81. package/dist/overlay/floating/command.js +423 -20
  82. package/dist/overlay/floating/drawer.js +354 -22
  83. package/dist/overlay/floating/hover-card.js +107 -7
  84. package/dist/overlay/menu/dropdown-menu-choice.js +149 -7
  85. package/dist/overlay/menu/dropdown-menu-item.js +174 -9
  86. package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
  87. package/dist/overlay/menu/dropdown-menu.js +147 -12
  88. package/dist/overlay/popover.js +106 -7
  89. package/dist/overlay/sheet.js +379 -26
  90. package/dist/overlay/tooltip.js +145 -9
  91. package/dist/shell/app-header.js +81 -5
  92. package/dist/shell/app-shell.js +58 -3
  93. package/dist/shell/breadcrumbs.js +102 -12
  94. package/dist/shell/docs/docs-header.js +210 -10
  95. package/dist/shell/docs/docs-shell.js +100 -3
  96. package/dist/shell/docs/docs-sidebar.js +88 -7
  97. package/dist/shell/docs/on-this-page.js +78 -7
  98. package/dist/shell/docs/use-active-section.js +88 -42
  99. package/dist/shell/navigation/app-sidebar.js +188 -6
  100. package/dist/shell/navigation/nav-group.js +161 -10
  101. package/dist/shell/theme-toggle.js +51 -4
  102. package/package.json +2 -2
@@ -1,19 +1,170 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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
- function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
8
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
9
- return (_jsxs(Button, { "data-slot": "carousel-previous", variant: variant, size: size, className: cn("absolute size-8 rounded-full", orientation === "horizontal"
10
- ? "top-1/2 -left-12 -translate-y-1/2"
11
- : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [_jsx(ArrowLeft, {}), _jsx("span", { className: "sr-only", children: "Previous slide" })] }));
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({ className, variant = "outline", size = "icon", ...props }) {
14
- const { orientation, scrollNext, canScrollNext } = useCarousel();
15
- return (_jsxs(Button, { "data-slot": "carousel-next", variant: variant, size: size, className: cn("absolute size-8 rounded-full", orientation === "horizontal"
16
- ? "top-1/2 -right-12 -translate-y-1/2"
17
- : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [_jsx(ArrowRight, {}), _jsx("span", { className: "sr-only", children: "Next slide" })] }));
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
- import { jsx as _jsx } from "react/jsx-runtime";
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
- const context = React.useContext(CarouselContext);
9
- if (!context) {
10
- throw new Error("useCarousel must be used within a <Carousel />");
11
- }
12
- return context;
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({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
15
- const [carouselRef, api] = useEmblaCarousel({
16
- ...opts,
17
- axis: orientation === "horizontal" ? "x" : "y",
18
- }, plugins);
19
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
20
- const [canScrollNext, setCanScrollNext] = React.useState(false);
21
- const onSelect = React.useCallback((api) => {
22
- if (!api)
23
- return;
24
- setCanScrollPrev(api.canScrollPrev());
25
- setCanScrollNext(api.canScrollNext());
26
- }, []);
27
- const scrollPrev = React.useCallback(() => {
28
- api?.scrollPrev();
29
- }, [api]);
30
- const scrollNext = React.useCallback(() => {
31
- api?.scrollNext();
32
- }, [api]);
33
- const handleKeyDown = React.useCallback((event) => {
34
- if (event.key === "ArrowLeft") {
35
- event.preventDefault();
36
- scrollPrev();
37
- }
38
- else if (event.key === "ArrowRight") {
39
- event.preventDefault();
40
- scrollNext();
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
- }, [scrollPrev, scrollNext]);
43
- React.useEffect(() => {
44
- if (!api || !setApi)
45
- return;
46
- setApi(api);
47
- }, [api, setApi]);
48
- React.useEffect(() => {
49
- if (!api)
50
- return;
51
- onSelect(api);
52
- api.on("reInit", onSelect);
53
- api.on("select", onSelect);
54
- return () => {
55
- api?.off("select", onSelect);
56
- };
57
- }, [api, onSelect]);
58
- return (_jsx(CarouselContext.Provider, { value: {
59
- carouselRef,
60
- api: api,
61
- opts,
62
- orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
63
- scrollPrev,
64
- scrollNext,
65
- canScrollPrev,
66
- canScrollNext,
67
- }, children: _jsx("div", { onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription": "carousel", "data-slot": "carousel", ...props, children: children }) }));
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({ className, ...props }) {
70
- const { carouselRef, orientation } = useCarousel();
71
- return (_jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: _jsx("div", { className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className), ...props }) }));
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({ className, ...props }) {
74
- const { orientation } = useCarousel();
75
- return (_jsx("div", { role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className), ...props }));
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 };