@locusgraph/components 0.1.1 → 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 (116) 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 +71 -18
  5. package/dist/display/avatar.js +118 -7
  6. package/dist/display/badge.d.ts +1 -1
  7. package/dist/display/badge.js +74 -17
  8. package/dist/display/chart/chart-container.js +205 -45
  9. package/dist/display/chart/chart-legend.js +79 -14
  10. package/dist/display/chart/chart-tooltip.js +211 -40
  11. package/dist/display/chat/attachment/attachment-parts.js +222 -13
  12. package/dist/display/chat/attachment/attachment.js +210 -28
  13. package/dist/display/chat/bubble.js +225 -37
  14. package/dist/display/chat/marker.js +143 -15
  15. package/dist/display/chat/message-scroller.js +277 -15
  16. package/dist/display/chat/message.js +238 -13
  17. package/dist/display/content/item.js +448 -47
  18. package/dist/display/content/kbd.js +78 -5
  19. package/dist/display/media/aspect-ratio.js +27 -3
  20. package/dist/display/media/carousel-controls.js +163 -12
  21. package/dist/display/media/carousel.js +325 -65
  22. package/dist/display/rule-grid/rule-grid.d.ts +3 -1
  23. package/dist/display/rule-grid/rule-grid.js +311 -25
  24. package/dist/display/separator.js +56 -3
  25. package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
  26. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +83 -0
  27. package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
  28. package/dist/display/skeletons/layouts/skeleton-table.js +174 -0
  29. package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
  30. package/dist/display/skeletons/shapes/skeleton-avatar.js +102 -0
  31. package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
  32. package/dist/display/skeletons/shapes/skeleton-button.js +102 -0
  33. package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
  34. package/dist/display/skeletons/shapes/skeleton-text.js +84 -0
  35. package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
  36. package/dist/display/skeletons/skeleton-parts.js +68 -0
  37. package/dist/display/status/alert.d.ts +1 -1
  38. package/dist/display/status/alert.js +137 -17
  39. package/dist/display/status/empty.js +250 -22
  40. package/dist/display/status/progress.d.ts +5 -1
  41. package/dist/display/status/progress.js +120 -3
  42. package/dist/display/status/skeleton.js +40 -3
  43. package/dist/display/status/spinner.js +42 -4
  44. package/dist/display/table.js +310 -17
  45. package/dist/feedback/toaster.d.ts +1 -1
  46. package/dist/feedback/toaster.js +100 -25
  47. package/dist/form/advanced/calendar-day-button.js +89 -12
  48. package/dist/form/advanced/calendar.js +349 -56
  49. package/dist/form/advanced/combobox/combobox-chips.js +152 -9
  50. package/dist/form/advanced/combobox/combobox-items.js +240 -15
  51. package/dist/form/advanced/combobox/combobox.js +387 -14
  52. package/dist/form/advanced/input-otp.js +202 -12
  53. package/dist/form/choice/checkbox.js +59 -4
  54. package/dist/form/choice/radio-group.js +95 -6
  55. package/dist/form/choice/select.js +479 -25
  56. package/dist/form/choice/slider.js +118 -4
  57. package/dist/form/choice/switch.js +53 -3
  58. package/dist/form/field/field-error.js +117 -14
  59. package/dist/form/field/field-separator.js +70 -3
  60. package/dist/form/field/field-set.js +85 -5
  61. package/dist/form/field/field-text.js +116 -7
  62. package/dist/form/field/field.js +138 -26
  63. package/dist/form/hook-form/form.js +338 -40
  64. package/dist/form/input-group.js +297 -47
  65. package/dist/form/input.js +47 -3
  66. package/dist/form/label.js +42 -3
  67. package/dist/form/native-select.js +148 -8
  68. package/dist/form/textarea.js +41 -3
  69. package/dist/index.d.ts +6 -0
  70. package/dist/index.js +6 -0
  71. package/dist/layout/accordion.js +166 -9
  72. package/dist/layout/collapsible.js +75 -7
  73. package/dist/layout/resizable.js +123 -8
  74. package/dist/layout/scroll/direction.js +25 -3
  75. package/dist/layout/scroll/scroll-area.d.ts +1 -1
  76. package/dist/layout/scroll/scroll-area.js +138 -5
  77. package/dist/layout/sidebar/sidebar-context.js +184 -51
  78. package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
  79. package/dist/layout/sidebar/sidebar-menu.js +319 -38
  80. package/dist/layout/sidebar/sidebar-sections.js +369 -22
  81. package/dist/layout/sidebar/sidebar.js +385 -29
  82. package/dist/layout/tabs.js +183 -18
  83. package/dist/layout/use-mobile.js +23 -10
  84. package/dist/navigation/breadcrumb.js +302 -18
  85. package/dist/navigation/menubar/menubar-items.js +323 -17
  86. package/dist/navigation/menubar/menubar-sub.js +126 -8
  87. package/dist/navigation/menubar/menubar.js +213 -13
  88. package/dist/navigation/navigation-menu.js +367 -19
  89. package/dist/navigation/pagination.js +329 -20
  90. package/dist/overlay/alert-dialog.js +485 -26
  91. package/dist/overlay/context-menu/context-menu-items.js +323 -17
  92. package/dist/overlay/context-menu/context-menu-sub.js +126 -8
  93. package/dist/overlay/context-menu/context-menu.js +140 -11
  94. package/dist/overlay/dialog.js +406 -25
  95. package/dist/overlay/floating/command.js +424 -21
  96. package/dist/overlay/floating/drawer.js +354 -22
  97. package/dist/overlay/floating/hover-card.js +107 -7
  98. package/dist/overlay/menu/dropdown-menu-choice.js +150 -8
  99. package/dist/overlay/menu/dropdown-menu-item.js +174 -9
  100. package/dist/overlay/menu/dropdown-menu-sub.js +125 -8
  101. package/dist/overlay/menu/dropdown-menu.js +147 -12
  102. package/dist/overlay/popover.js +106 -7
  103. package/dist/overlay/sheet.js +380 -27
  104. package/dist/overlay/tooltip.js +145 -9
  105. package/dist/shell/app-header.js +81 -5
  106. package/dist/shell/app-shell.js +58 -3
  107. package/dist/shell/breadcrumbs.js +102 -12
  108. package/dist/shell/docs/docs-header.js +211 -11
  109. package/dist/shell/docs/docs-shell.js +100 -3
  110. package/dist/shell/docs/docs-sidebar.js +88 -7
  111. package/dist/shell/docs/on-this-page.js +78 -7
  112. package/dist/shell/docs/use-active-section.js +88 -42
  113. package/dist/shell/navigation/app-sidebar.js +188 -6
  114. package/dist/shell/navigation/nav-group.js +161 -10
  115. package/dist/shell/theme-toggle.js +52 -5
  116. package/package.json +5 -5
@@ -1,33 +1,261 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "cn";
4
- function Empty({ className, ...props }) {
5
- return (_jsx("div", { "data-slot": "empty", className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", className), ...props }));
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ function Empty(t0) {
6
+ const $ = _c(8);
7
+ let className;
8
+ let props;
9
+ if ($[0] !== t0) {
10
+ ({
11
+ className,
12
+ ...props
13
+ } = t0);
14
+ $[0] = t0;
15
+ $[1] = className;
16
+ $[2] = props;
17
+ } else {
18
+ className = $[1];
19
+ props = $[2];
20
+ }
21
+ let t1;
22
+ if ($[3] !== className) {
23
+ t1 = cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 p-6 text-center text-balance md:p-12", className);
24
+ $[3] = className;
25
+ $[4] = t1;
26
+ } else {
27
+ t1 = $[4];
28
+ }
29
+ let t2;
30
+ if ($[5] !== props || $[6] !== t1) {
31
+ t2 = /*#__PURE__*/_jsx("div", {
32
+ "data-slot": "empty",
33
+ className: t1,
34
+ ...props
35
+ });
36
+ $[5] = props;
37
+ $[6] = t1;
38
+ $[7] = t2;
39
+ } else {
40
+ t2 = $[7];
41
+ }
42
+ return t2;
6
43
  }
7
- function EmptyHeader({ className, ...props }) {
8
- return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className), ...props }));
44
+ function EmptyHeader(t0) {
45
+ const $ = _c(8);
46
+ let className;
47
+ let props;
48
+ if ($[0] !== t0) {
49
+ ({
50
+ className,
51
+ ...props
52
+ } = t0);
53
+ $[0] = t0;
54
+ $[1] = className;
55
+ $[2] = props;
56
+ } else {
57
+ className = $[1];
58
+ props = $[2];
59
+ }
60
+ let t1;
61
+ if ($[3] !== className) {
62
+ t1 = cn("flex max-w-sm flex-col items-center gap-2 text-center", className);
63
+ $[3] = className;
64
+ $[4] = t1;
65
+ } else {
66
+ t1 = $[4];
67
+ }
68
+ let t2;
69
+ if ($[5] !== props || $[6] !== t1) {
70
+ t2 = /*#__PURE__*/_jsx("div", {
71
+ "data-slot": "empty-header",
72
+ className: t1,
73
+ ...props
74
+ });
75
+ $[5] = props;
76
+ $[6] = t1;
77
+ $[7] = t2;
78
+ } else {
79
+ t2 = $[7];
80
+ }
81
+ return t2;
9
82
  }
10
83
  const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
11
- variants: {
12
- variant: {
13
- default: "bg-transparent",
14
- icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6",
15
- },
16
- },
17
- defaultVariants: {
18
- variant: "default",
19
- },
84
+ variants: {
85
+ variant: {
86
+ default: "bg-transparent",
87
+ icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
88
+ }
89
+ },
90
+ defaultVariants: {
91
+ variant: "default"
92
+ }
20
93
  });
21
- function EmptyMedia({ className, variant = "default", ...props }) {
22
- return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props }));
94
+ function EmptyMedia(t0) {
95
+ const $ = _c(11);
96
+ let className;
97
+ let props;
98
+ let t1;
99
+ if ($[0] !== t0) {
100
+ ({
101
+ className,
102
+ variant: t1,
103
+ ...props
104
+ } = t0);
105
+ $[0] = t0;
106
+ $[1] = className;
107
+ $[2] = props;
108
+ $[3] = t1;
109
+ } else {
110
+ className = $[1];
111
+ props = $[2];
112
+ t1 = $[3];
113
+ }
114
+ const variant = t1 === undefined ? "default" : t1;
115
+ let t2;
116
+ if ($[4] !== className || $[5] !== variant) {
117
+ t2 = cn(emptyMediaVariants({
118
+ variant,
119
+ className
120
+ }));
121
+ $[4] = className;
122
+ $[5] = variant;
123
+ $[6] = t2;
124
+ } else {
125
+ t2 = $[6];
126
+ }
127
+ let t3;
128
+ if ($[7] !== props || $[8] !== t2 || $[9] !== variant) {
129
+ t3 = /*#__PURE__*/_jsx("div", {
130
+ "data-slot": "empty-icon",
131
+ "data-variant": variant,
132
+ className: t2,
133
+ ...props
134
+ });
135
+ $[7] = props;
136
+ $[8] = t2;
137
+ $[9] = variant;
138
+ $[10] = t3;
139
+ } else {
140
+ t3 = $[10];
141
+ }
142
+ return t3;
23
143
  }
24
- function EmptyTitle({ className, ...props }) {
25
- return (_jsx("div", { "data-slot": "empty-title", className: cn("text-lg font-medium tracking-tight", className), ...props }));
144
+ function EmptyTitle(t0) {
145
+ const $ = _c(8);
146
+ let className;
147
+ let props;
148
+ if ($[0] !== t0) {
149
+ ({
150
+ className,
151
+ ...props
152
+ } = t0);
153
+ $[0] = t0;
154
+ $[1] = className;
155
+ $[2] = props;
156
+ } else {
157
+ className = $[1];
158
+ props = $[2];
159
+ }
160
+ let t1;
161
+ if ($[3] !== className) {
162
+ t1 = cn("text-lg font-medium tracking-tight", className);
163
+ $[3] = className;
164
+ $[4] = t1;
165
+ } else {
166
+ t1 = $[4];
167
+ }
168
+ let t2;
169
+ if ($[5] !== props || $[6] !== t1) {
170
+ t2 = /*#__PURE__*/_jsx("div", {
171
+ "data-slot": "empty-title",
172
+ className: t1,
173
+ ...props
174
+ });
175
+ $[5] = props;
176
+ $[6] = t1;
177
+ $[7] = t2;
178
+ } else {
179
+ t2 = $[7];
180
+ }
181
+ return t2;
26
182
  }
27
- function EmptyDescription({ className, ...props }) {
28
- return (_jsx("div", { "data-slot": "empty-description", className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
183
+ function EmptyDescription(t0) {
184
+ const $ = _c(8);
185
+ let className;
186
+ let props;
187
+ if ($[0] !== t0) {
188
+ ({
189
+ className,
190
+ ...props
191
+ } = t0);
192
+ $[0] = t0;
193
+ $[1] = className;
194
+ $[2] = props;
195
+ } else {
196
+ className = $[1];
197
+ props = $[2];
198
+ }
199
+ let t1;
200
+ if ($[3] !== className) {
201
+ t1 = cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className);
202
+ $[3] = className;
203
+ $[4] = t1;
204
+ } else {
205
+ t1 = $[4];
206
+ }
207
+ let t2;
208
+ if ($[5] !== props || $[6] !== t1) {
209
+ t2 = /*#__PURE__*/_jsx("div", {
210
+ "data-slot": "empty-description",
211
+ className: t1,
212
+ ...props
213
+ });
214
+ $[5] = props;
215
+ $[6] = t1;
216
+ $[7] = t2;
217
+ } else {
218
+ t2 = $[7];
219
+ }
220
+ return t2;
29
221
  }
30
- function EmptyContent({ className, ...props }) {
31
- return (_jsx("div", { "data-slot": "empty-content", className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className), ...props }));
222
+ function EmptyContent(t0) {
223
+ const $ = _c(8);
224
+ let className;
225
+ let props;
226
+ if ($[0] !== t0) {
227
+ ({
228
+ className,
229
+ ...props
230
+ } = t0);
231
+ $[0] = t0;
232
+ $[1] = className;
233
+ $[2] = props;
234
+ } else {
235
+ className = $[1];
236
+ props = $[2];
237
+ }
238
+ let t1;
239
+ if ($[3] !== className) {
240
+ t1 = cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className);
241
+ $[3] = className;
242
+ $[4] = t1;
243
+ } else {
244
+ t1 = $[4];
245
+ }
246
+ let t2;
247
+ if ($[5] !== props || $[6] !== t1) {
248
+ t2 = /*#__PURE__*/_jsx("div", {
249
+ "data-slot": "empty-content",
250
+ className: t1,
251
+ ...props
252
+ });
253
+ $[5] = props;
254
+ $[6] = t1;
255
+ $[7] = t2;
256
+ } else {
257
+ t2 = $[7];
258
+ }
259
+ return t2;
32
260
  }
33
261
  export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -1,4 +1,8 @@
1
1
  import * as ProgressPrimitive from "radix-ui/progress";
2
2
  import * as React from "react";
3
- declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>): React.JSX.Element;
3
+ type ProgressTone = "default" | "good" | "warn" | "destructive" | "auto";
4
+ declare function Progress({ className, value, max, tone, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root> & {
5
+ tone?: ProgressTone;
6
+ }): React.JSX.Element;
7
+ export type { ProgressTone };
4
8
  export { Progress };
@@ -1,8 +1,125 @@
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 * as ProgressPrimitive from "radix-ui/progress";
5
- function Progress({ className, value, ...props }) {
6
- return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "h-full w-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
6
+ import * as React from "react";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ const indicatorToneClass = {
9
+ default: "bg-primary",
10
+ good: "bg-good",
11
+ warn: "bg-warn",
12
+ destructive: "bg-destructive"
13
+ };
14
+ function resolveTone(tone, percent) {
15
+ if (tone !== "auto") return tone;
16
+ if (percent >= 100) return "destructive";
17
+ if (percent >= 80) return "warn";
18
+ return "default";
19
+ }
20
+ function Progress(t0) {
21
+ const $ = _c(25);
22
+ let className;
23
+ let props;
24
+ let t1;
25
+ let t2;
26
+ let value;
27
+ if ($[0] !== t0) {
28
+ ({
29
+ className,
30
+ value,
31
+ max: t1,
32
+ tone: t2,
33
+ ...props
34
+ } = t0);
35
+ $[0] = t0;
36
+ $[1] = className;
37
+ $[2] = props;
38
+ $[3] = t1;
39
+ $[4] = t2;
40
+ $[5] = value;
41
+ } else {
42
+ className = $[1];
43
+ props = $[2];
44
+ t1 = $[3];
45
+ t2 = $[4];
46
+ value = $[5];
47
+ }
48
+ const max = t1 === undefined ? 100 : t1;
49
+ const tone = t2 === undefined ? "default" : t2;
50
+ const percent = max > 0 ? (value ?? 0) / max * 100 : 0;
51
+ let t3;
52
+ if ($[6] !== percent || $[7] !== tone) {
53
+ t3 = resolveTone(tone, percent);
54
+ $[6] = percent;
55
+ $[7] = tone;
56
+ $[8] = t3;
57
+ } else {
58
+ t3 = $[8];
59
+ }
60
+ const resolvedTone = t3;
61
+ let t4;
62
+ if ($[9] !== className) {
63
+ t4 = cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className);
64
+ $[9] = className;
65
+ $[10] = t4;
66
+ } else {
67
+ t4 = $[10];
68
+ }
69
+ const t5 = indicatorToneClass[resolvedTone];
70
+ let t6;
71
+ if ($[11] !== t5) {
72
+ t6 = cn("h-full w-full flex-1 transition-all", t5);
73
+ $[11] = t5;
74
+ $[12] = t6;
75
+ } else {
76
+ t6 = $[12];
77
+ }
78
+ const t7 = `translateX(-${100 - Math.min(percent, 100)}%)`;
79
+ let t8;
80
+ if ($[13] !== t7) {
81
+ t8 = {
82
+ transform: t7
83
+ };
84
+ $[13] = t7;
85
+ $[14] = t8;
86
+ } else {
87
+ t8 = $[14];
88
+ }
89
+ let t9;
90
+ if ($[15] !== t6 || $[16] !== t8) {
91
+ t9 = /*#__PURE__*/_jsx(ProgressPrimitive.Indicator, {
92
+ "data-slot": "progress-indicator",
93
+ className: t6,
94
+ style: t8
95
+ });
96
+ $[15] = t6;
97
+ $[16] = t8;
98
+ $[17] = t9;
99
+ } else {
100
+ t9 = $[17];
101
+ }
102
+ let t10;
103
+ if ($[18] !== max || $[19] !== props || $[20] !== resolvedTone || $[21] !== t4 || $[22] !== t9 || $[23] !== value) {
104
+ t10 = /*#__PURE__*/_jsx(ProgressPrimitive.Root, {
105
+ "data-slot": "progress",
106
+ "data-tone": resolvedTone,
107
+ value: value,
108
+ max: max,
109
+ className: t4,
110
+ ...props,
111
+ children: t9
112
+ });
113
+ $[18] = max;
114
+ $[19] = props;
115
+ $[20] = resolvedTone;
116
+ $[21] = t4;
117
+ $[22] = t9;
118
+ $[23] = value;
119
+ $[24] = t10;
120
+ } else {
121
+ t10 = $[24];
122
+ }
123
+ return t10;
7
124
  }
8
125
  export { Progress };
@@ -1,6 +1,43 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn } from "cn";
3
- function Skeleton({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-accent", className), ...props }));
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ function Skeleton(t0) {
5
+ const $ = _c(8);
6
+ let className;
7
+ let props;
8
+ if ($[0] !== t0) {
9
+ ({
10
+ className,
11
+ ...props
12
+ } = t0);
13
+ $[0] = t0;
14
+ $[1] = className;
15
+ $[2] = props;
16
+ } else {
17
+ className = $[1];
18
+ props = $[2];
19
+ }
20
+ let t1;
21
+ if ($[3] !== className) {
22
+ t1 = cn("animate-pulse rounded-md bg-skeleton", className);
23
+ $[3] = className;
24
+ $[4] = t1;
25
+ } else {
26
+ t1 = $[4];
27
+ }
28
+ let t2;
29
+ if ($[5] !== props || $[6] !== t1) {
30
+ t2 = /*#__PURE__*/_jsx("div", {
31
+ "data-slot": "skeleton",
32
+ className: t1,
33
+ ...props
34
+ });
35
+ $[5] = props;
36
+ $[6] = t1;
37
+ $[7] = t2;
38
+ } else {
39
+ t2 = $[7];
40
+ }
41
+ return t2;
5
42
  }
6
43
  export { Skeleton };
@@ -1,7 +1,45 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { InProgress as Loader2Icon } from "@carbon/icons-react";
2
3
  import { cn } from "cn";
3
- import { Loader2Icon } from "lucide-react";
4
- function Spinner({ className, ...props }) {
5
- return (_jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props }));
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ function Spinner(t0) {
6
+ const $ = _c(8);
7
+ let className;
8
+ let props;
9
+ if ($[0] !== t0) {
10
+ ({
11
+ className,
12
+ ...props
13
+ } = t0);
14
+ $[0] = t0;
15
+ $[1] = className;
16
+ $[2] = props;
17
+ } else {
18
+ className = $[1];
19
+ props = $[2];
20
+ }
21
+ let t1;
22
+ if ($[3] !== className) {
23
+ t1 = cn("size-4 animate-spin", className);
24
+ $[3] = className;
25
+ $[4] = t1;
26
+ } else {
27
+ t1 = $[4];
28
+ }
29
+ let t2;
30
+ if ($[5] !== props || $[6] !== t1) {
31
+ t2 = /*#__PURE__*/_jsx(Loader2Icon, {
32
+ role: "status",
33
+ "aria-label": "Loading",
34
+ className: t1,
35
+ ...props
36
+ });
37
+ $[5] = props;
38
+ $[6] = t1;
39
+ $[7] = t2;
40
+ } else {
41
+ t2 = $[7];
42
+ }
43
+ return t2;
6
44
  }
7
45
  export { Spinner };