@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.
Files changed (102) hide show
  1. package/dist/action/button-group.js +45 -17
  2. package/dist/action/button.js +44 -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 +33 -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 +56 -13
  11. package/dist/display/chat/attachment/attachment.js +70 -28
  12. package/dist/display/chat/bubble.js +80 -37
  13. package/dist/display/chat/marker.js +44 -15
  14. package/dist/display/chat/message-scroller.js +276 -14
  15. package/dist/display/chat/message.js +58 -13
  16. package/dist/display/content/item.js +134 -47
  17. package/dist/display/content/kbd.js +19 -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 +86 -29
  22. package/dist/display/separator.js +56 -3
  23. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +30 -6
  24. package/dist/display/skeletons/layouts/skeleton-table.js +44 -6
  25. package/dist/display/skeletons/shapes/skeleton-avatar.js +31 -13
  26. package/dist/display/skeletons/shapes/skeleton-button.js +31 -13
  27. package/dist/display/skeletons/shapes/skeleton-text.js +25 -7
  28. package/dist/display/skeletons/skeleton-parts.js +22 -6
  29. package/dist/display/status/alert.js +44 -18
  30. package/dist/display/status/empty.js +69 -22
  31. package/dist/display/status/progress.js +116 -16
  32. package/dist/display/status/skeleton.js +10 -3
  33. package/dist/display/status/spinner.js +11 -3
  34. package/dist/display/table.js +77 -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 +34 -14
  48. package/dist/form/field/field-separator.js +19 -3
  49. package/dist/form/field/field-set.js +21 -5
  50. package/dist/form/field/field-text.js +28 -7
  51. package/dist/form/field/field.js +43 -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 +13 -3
  55. package/dist/form/label.js +42 -3
  56. package/dist/form/native-select.js +39 -7
  57. package/dist/form/textarea.js +11 -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 +11 -11
  70. package/dist/navigation/breadcrumb.js +82 -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 +90 -18
  75. package/dist/navigation/pagination.js +91 -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 +29 -5
  92. package/dist/shell/app-shell.js +19 -3
  93. package/dist/shell/breadcrumbs.js +46 -14
  94. package/dist/shell/docs/docs-header.js +210 -10
  95. package/dist/shell/docs/docs-shell.js +36 -3
  96. package/dist/shell/docs/docs-sidebar.js +41 -7
  97. package/dist/shell/docs/on-this-page.js +78 -7
  98. package/dist/shell/docs/use-active-section.js +44 -42
  99. package/dist/shell/navigation/app-sidebar.js +66 -6
  100. package/dist/shell/navigation/nav-group.js +53 -11
  101. package/dist/shell/theme-toggle.js +51 -4
  102. package/package.json +2 -2
@@ -1,25 +1,287 @@
1
1
  "use client";
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { ArrowDown as ArrowDownIcon } from "@carbon/icons-react";
4
- import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from "@shadcn/react/message-scroller";
5
+ import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
5
6
  import { cn } from "cn";
7
+ import * as React from "react";
6
8
  import { Button } from "../../action/button.js";
9
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
7
10
  function MessageScrollerProvider(props) {
8
- return _jsx(MessageScrollerPrimitive.Provider, { ...props });
11
+ const $ = _c(2);
12
+ let t0;
13
+ if ($[0] !== props) {
14
+ t0 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Provider, {
15
+ ...props
16
+ });
17
+ $[0] = props;
18
+ $[1] = t0;
19
+ } else {
20
+ t0 = $[1];
21
+ }
22
+ return t0;
9
23
  }
10
- function MessageScroller({ className, ...props }) {
11
- return (_jsx(MessageScrollerPrimitive.Root, { "data-slot": "message-scroller", className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className), ...props }));
24
+ function MessageScroller(t0) {
25
+ const $ = _c(8);
26
+ let className;
27
+ let props;
28
+ if ($[0] !== t0) {
29
+ ({
30
+ className,
31
+ ...props
32
+ } = t0);
33
+ $[0] = t0;
34
+ $[1] = className;
35
+ $[2] = props;
36
+ } else {
37
+ className = $[1];
38
+ props = $[2];
39
+ }
40
+ let t1;
41
+ if ($[3] !== className) {
42
+ t1 = cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className);
43
+ $[3] = className;
44
+ $[4] = t1;
45
+ } else {
46
+ t1 = $[4];
47
+ }
48
+ let t2;
49
+ if ($[5] !== props || $[6] !== t1) {
50
+ t2 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Root, {
51
+ "data-slot": "message-scroller",
52
+ className: t1,
53
+ ...props
54
+ });
55
+ $[5] = props;
56
+ $[6] = t1;
57
+ $[7] = t2;
58
+ } else {
59
+ t2 = $[7];
60
+ }
61
+ return t2;
12
62
  }
13
- function MessageScrollerViewport({ className, ...props }) {
14
- return (_jsx(MessageScrollerPrimitive.Viewport, { "data-slot": "message-scroller-viewport", className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-none data-pending-scroll:invisible", className), ...props }));
63
+ function MessageScrollerViewport(t0) {
64
+ const $ = _c(8);
65
+ let className;
66
+ let props;
67
+ if ($[0] !== t0) {
68
+ ({
69
+ className,
70
+ ...props
71
+ } = t0);
72
+ $[0] = t0;
73
+ $[1] = className;
74
+ $[2] = props;
75
+ } else {
76
+ className = $[1];
77
+ props = $[2];
78
+ }
79
+ let t1;
80
+ if ($[3] !== className) {
81
+ t1 = cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-none data-pending-scroll:invisible", className);
82
+ $[3] = className;
83
+ $[4] = t1;
84
+ } else {
85
+ t1 = $[4];
86
+ }
87
+ let t2;
88
+ if ($[5] !== props || $[6] !== t1) {
89
+ t2 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Viewport, {
90
+ "data-slot": "message-scroller-viewport",
91
+ className: t1,
92
+ ...props
93
+ });
94
+ $[5] = props;
95
+ $[6] = t1;
96
+ $[7] = t2;
97
+ } else {
98
+ t2 = $[7];
99
+ }
100
+ return t2;
15
101
  }
16
- function MessageScrollerContent({ className, ...props }) {
17
- return (_jsx(MessageScrollerPrimitive.Content, { "data-slot": "message-scroller-content", className: cn("flex h-max min-h-full flex-col gap-8", className), ...props }));
102
+ function MessageScrollerContent(t0) {
103
+ const $ = _c(8);
104
+ let className;
105
+ let props;
106
+ if ($[0] !== t0) {
107
+ ({
108
+ className,
109
+ ...props
110
+ } = t0);
111
+ $[0] = t0;
112
+ $[1] = className;
113
+ $[2] = props;
114
+ } else {
115
+ className = $[1];
116
+ props = $[2];
117
+ }
118
+ let t1;
119
+ if ($[3] !== className) {
120
+ t1 = cn("flex h-max min-h-full flex-col gap-8", className);
121
+ $[3] = className;
122
+ $[4] = t1;
123
+ } else {
124
+ t1 = $[4];
125
+ }
126
+ let t2;
127
+ if ($[5] !== props || $[6] !== t1) {
128
+ t2 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Content, {
129
+ "data-slot": "message-scroller-content",
130
+ className: t1,
131
+ ...props
132
+ });
133
+ $[5] = props;
134
+ $[6] = t1;
135
+ $[7] = t2;
136
+ } else {
137
+ t2 = $[7];
138
+ }
139
+ return t2;
18
140
  }
19
- function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
20
- return (_jsx(MessageScrollerPrimitive.Item, { "data-slot": "message-scroller-item", scrollAnchor: scrollAnchor, className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className), ...props }));
141
+ function MessageScrollerItem(t0) {
142
+ const $ = _c(10);
143
+ let className;
144
+ let props;
145
+ let t1;
146
+ if ($[0] !== t0) {
147
+ ({
148
+ className,
149
+ scrollAnchor: t1,
150
+ ...props
151
+ } = t0);
152
+ $[0] = t0;
153
+ $[1] = className;
154
+ $[2] = props;
155
+ $[3] = t1;
156
+ } else {
157
+ className = $[1];
158
+ props = $[2];
159
+ t1 = $[3];
160
+ }
161
+ const scrollAnchor = t1 === undefined ? false : t1;
162
+ let t2;
163
+ if ($[4] !== className) {
164
+ t2 = cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className);
165
+ $[4] = className;
166
+ $[5] = t2;
167
+ } else {
168
+ t2 = $[5];
169
+ }
170
+ let t3;
171
+ if ($[6] !== props || $[7] !== scrollAnchor || $[8] !== t2) {
172
+ t3 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Item, {
173
+ "data-slot": "message-scroller-item",
174
+ scrollAnchor: scrollAnchor,
175
+ className: t2,
176
+ ...props
177
+ });
178
+ $[6] = props;
179
+ $[7] = scrollAnchor;
180
+ $[8] = t2;
181
+ $[9] = t3;
182
+ } else {
183
+ t3 = $[9];
184
+ }
185
+ return t3;
21
186
  }
22
- function MessageScrollerButton({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) {
23
- return (_jsx(MessageScrollerPrimitive.Button, { "data-slot": "message-scroller-button", "data-direction": direction, "data-variant": variant, "data-size": size, direction: direction, className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className), render: render ?? _jsx(Button, { variant: variant, size: size }), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(ArrowDownIcon, {}), _jsx("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })] })) }));
187
+ function MessageScrollerButton(t0) {
188
+ const $ = _c(25);
189
+ let children;
190
+ let className;
191
+ let props;
192
+ let render;
193
+ let t1;
194
+ let t2;
195
+ let t3;
196
+ if ($[0] !== t0) {
197
+ ({
198
+ direction: t1,
199
+ className,
200
+ children,
201
+ render,
202
+ variant: t2,
203
+ size: t3,
204
+ ...props
205
+ } = t0);
206
+ $[0] = t0;
207
+ $[1] = children;
208
+ $[2] = className;
209
+ $[3] = props;
210
+ $[4] = render;
211
+ $[5] = t1;
212
+ $[6] = t2;
213
+ $[7] = t3;
214
+ } else {
215
+ children = $[1];
216
+ className = $[2];
217
+ props = $[3];
218
+ render = $[4];
219
+ t1 = $[5];
220
+ t2 = $[6];
221
+ t3 = $[7];
222
+ }
223
+ const direction = t1 === undefined ? "end" : t1;
224
+ const variant = t2 === undefined ? "secondary" : t2;
225
+ const size = t3 === undefined ? "icon-sm" : t3;
226
+ let t4;
227
+ if ($[8] !== className) {
228
+ t4 = cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className);
229
+ $[8] = className;
230
+ $[9] = t4;
231
+ } else {
232
+ t4 = $[9];
233
+ }
234
+ let t5;
235
+ if ($[10] !== render || $[11] !== size || $[12] !== variant) {
236
+ t5 = render ?? /*#__PURE__*/_jsx(Button, {
237
+ variant: variant,
238
+ size: size
239
+ });
240
+ $[10] = render;
241
+ $[11] = size;
242
+ $[12] = variant;
243
+ $[13] = t5;
244
+ } else {
245
+ t5 = $[13];
246
+ }
247
+ let t6;
248
+ if ($[14] !== children || $[15] !== direction) {
249
+ t6 = children ?? /*#__PURE__*/_jsxs(_Fragment, {
250
+ children: [/*#__PURE__*/_jsx(ArrowDownIcon, {}), /*#__PURE__*/_jsx("span", {
251
+ className: "sr-only",
252
+ children: direction === "end" ? "Scroll to end" : "Scroll to start"
253
+ })]
254
+ });
255
+ $[14] = children;
256
+ $[15] = direction;
257
+ $[16] = t6;
258
+ } else {
259
+ t6 = $[16];
260
+ }
261
+ let t7;
262
+ if ($[17] !== direction || $[18] !== props || $[19] !== size || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== variant) {
263
+ t7 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Button, {
264
+ "data-slot": "message-scroller-button",
265
+ "data-direction": direction,
266
+ "data-variant": variant,
267
+ "data-size": size,
268
+ direction: direction,
269
+ className: t4,
270
+ render: t5,
271
+ ...props,
272
+ children: t6
273
+ });
274
+ $[17] = direction;
275
+ $[18] = props;
276
+ $[19] = size;
277
+ $[20] = t4;
278
+ $[21] = t5;
279
+ $[22] = t6;
280
+ $[23] = variant;
281
+ $[24] = t7;
282
+ } else {
283
+ t7 = $[24];
284
+ }
285
+ return t7;
24
286
  }
25
- export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
287
+ export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
@@ -1,21 +1,66 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { cn } from "cn";
3
- function MessageGroup({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "message-group", className: cn("flex min-w-0 flex-col gap-2", className), ...props }));
2
+ import * as React from "react";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ function MessageGroup({
5
+ className,
6
+ ...props
7
+ }) {
8
+ return /*#__PURE__*/_jsx("div", {
9
+ "data-slot": "message-group",
10
+ className: cn("flex min-w-0 flex-col gap-2", className),
11
+ ...props
12
+ });
5
13
  }
6
- function Message({ className, align = "start", ...props }) {
7
- return (_jsx("div", { "data-slot": "message", "data-align": align, className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className), ...props }));
14
+ function Message({
15
+ className,
16
+ align = "start",
17
+ ...props
18
+ }) {
19
+ return /*#__PURE__*/_jsx("div", {
20
+ "data-slot": "message",
21
+ "data-align": align,
22
+ className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
23
+ ...props
24
+ });
8
25
  }
9
- function MessageAvatar({ className, ...props }) {
10
- return (_jsx("div", { "data-slot": "message-avatar", className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className), ...props }));
26
+ function MessageAvatar({
27
+ className,
28
+ ...props
29
+ }) {
30
+ return /*#__PURE__*/_jsx("div", {
31
+ "data-slot": "message-avatar",
32
+ className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
33
+ ...props
34
+ });
11
35
  }
12
- function MessageContent({ className, ...props }) {
13
- return (_jsx("div", { "data-slot": "message-content", className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className), ...props }));
36
+ function MessageContent({
37
+ className,
38
+ ...props
39
+ }) {
40
+ return /*#__PURE__*/_jsx("div", {
41
+ "data-slot": "message-content",
42
+ className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
43
+ ...props
44
+ });
14
45
  }
15
- function MessageHeader({ className, ...props }) {
16
- return (_jsx("div", { "data-slot": "message-header", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground", className), ...props }));
46
+ function MessageHeader({
47
+ className,
48
+ ...props
49
+ }) {
50
+ return /*#__PURE__*/_jsx("div", {
51
+ "data-slot": "message-header",
52
+ className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground", className),
53
+ ...props
54
+ });
17
55
  }
18
- function MessageFooter({ className, ...props }) {
19
- return (_jsx("div", { "data-slot": "message-footer", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end", className), ...props }));
56
+ function MessageFooter({
57
+ className,
58
+ ...props
59
+ }) {
60
+ return /*#__PURE__*/_jsx("div", {
61
+ "data-slot": "message-footer",
62
+ className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end", className),
63
+ ...props
64
+ });
20
65
  }
21
66
  export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
@@ -1,66 +1,153 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { cva } from "class-variance-authority";
3
2
  import { cn } from "cn";
4
3
  import * as Slot from "radix-ui/slot";
4
+ import * as React from "react";
5
5
  import { Separator } from "../separator.js";
6
- function ItemGroup({ className, ...props }) {
7
- return (_jsx("div", { role: "list", "data-slot": "item-group", className: cn("group/item-group flex flex-col", className), ...props }));
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ function ItemGroup({
8
+ className,
9
+ ...props
10
+ }) {
11
+ return /*#__PURE__*/_jsx("div", {
12
+ role: "list",
13
+ "data-slot": "item-group",
14
+ className: cn("group/item-group flex flex-col", className),
15
+ ...props
16
+ });
8
17
  }
9
- function ItemSeparator({ className, ...props }) {
10
- return (_jsx(Separator, { "data-slot": "item-separator", orientation: "horizontal", className: cn("my-0", className), ...props }));
18
+ function ItemSeparator({
19
+ className,
20
+ ...props
21
+ }) {
22
+ return /*#__PURE__*/_jsx(Separator, {
23
+ "data-slot": "item-separator",
24
+ orientation: "horizontal",
25
+ className: cn("my-0", className),
26
+ ...props
27
+ });
11
28
  }
12
29
  const itemVariants = cva("group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background [a]:transition-colors [a]:hover:bg-accent/50", {
13
- variants: {
14
- variant: {
15
- default: "bg-transparent",
16
- outline: "border-border",
17
- muted: "bg-muted/50",
18
- },
19
- size: {
20
- default: "gap-4 p-4",
21
- sm: "gap-2.5 px-4 py-3",
22
- },
23
- },
24
- defaultVariants: {
25
- variant: "default",
26
- size: "default",
30
+ variants: {
31
+ variant: {
32
+ default: "bg-transparent",
33
+ outline: "border-border",
34
+ muted: "bg-muted/50"
27
35
  },
36
+ size: {
37
+ default: "gap-4 p-4",
38
+ sm: "gap-2.5 px-4 py-3"
39
+ }
40
+ },
41
+ defaultVariants: {
42
+ variant: "default",
43
+ size: "default"
44
+ }
28
45
  });
29
- function Item({ className, variant = "default", size = "default", asChild = false, ...props }) {
30
- const Comp = asChild ? Slot.Root : "div";
31
- return (_jsx(Comp, { "data-slot": "item", "data-variant": variant, "data-size": size, className: cn(itemVariants({ variant, size, className })), ...props }));
46
+ function Item({
47
+ className,
48
+ variant = "default",
49
+ size = "default",
50
+ asChild = false,
51
+ ...props
52
+ }) {
53
+ const Comp = asChild ? Slot.Root : "div";
54
+ return /*#__PURE__*/_jsx(Comp, {
55
+ "data-slot": "item",
56
+ "data-variant": variant,
57
+ "data-size": size,
58
+ className: cn(itemVariants({
59
+ variant,
60
+ size,
61
+ className
62
+ })),
63
+ ...props
64
+ });
32
65
  }
33
66
  const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none", {
34
- variants: {
35
- variant: {
36
- default: "bg-transparent",
37
- icon: "size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",
38
- image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover",
39
- },
40
- },
41
- defaultVariants: {
42
- variant: "default",
43
- },
67
+ variants: {
68
+ variant: {
69
+ default: "bg-transparent",
70
+ icon: "size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",
71
+ image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
72
+ }
73
+ },
74
+ defaultVariants: {
75
+ variant: "default"
76
+ }
44
77
  });
45
- function ItemMedia({ className, variant = "default", ...props }) {
46
- return (_jsx("div", { "data-slot": "item-media", "data-variant": variant, className: cn(itemMediaVariants({ variant, className })), ...props }));
78
+ function ItemMedia({
79
+ className,
80
+ variant = "default",
81
+ ...props
82
+ }) {
83
+ return /*#__PURE__*/_jsx("div", {
84
+ "data-slot": "item-media",
85
+ "data-variant": variant,
86
+ className: cn(itemMediaVariants({
87
+ variant,
88
+ className
89
+ })),
90
+ ...props
91
+ });
47
92
  }
48
- function ItemContent({ className, ...props }) {
49
- return (_jsx("div", { "data-slot": "item-content", className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className), ...props }));
93
+ function ItemContent({
94
+ className,
95
+ ...props
96
+ }) {
97
+ return /*#__PURE__*/_jsx("div", {
98
+ "data-slot": "item-content",
99
+ className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className),
100
+ ...props
101
+ });
50
102
  }
51
- function ItemTitle({ className, ...props }) {
52
- return (_jsx("div", { "data-slot": "item-title", className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className), ...props }));
103
+ function ItemTitle({
104
+ className,
105
+ ...props
106
+ }) {
107
+ return /*#__PURE__*/_jsx("div", {
108
+ "data-slot": "item-title",
109
+ className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className),
110
+ ...props
111
+ });
53
112
  }
54
- function ItemDescription({ className, ...props }) {
55
- return (_jsx("p", { "data-slot": "item-description", className: cn("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
113
+ function ItemDescription({
114
+ className,
115
+ ...props
116
+ }) {
117
+ return /*#__PURE__*/_jsx("p", {
118
+ "data-slot": "item-description",
119
+ className: cn("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
120
+ ...props
121
+ });
56
122
  }
57
- function ItemActions({ className, ...props }) {
58
- return (_jsx("div", { "data-slot": "item-actions", className: cn("flex items-center gap-2", className), ...props }));
123
+ function ItemActions({
124
+ className,
125
+ ...props
126
+ }) {
127
+ return /*#__PURE__*/_jsx("div", {
128
+ "data-slot": "item-actions",
129
+ className: cn("flex items-center gap-2", className),
130
+ ...props
131
+ });
59
132
  }
60
- function ItemHeader({ className, ...props }) {
61
- return (_jsx("div", { "data-slot": "item-header", className: cn("flex basis-full items-center justify-between gap-2", className), ...props }));
133
+ function ItemHeader({
134
+ className,
135
+ ...props
136
+ }) {
137
+ return /*#__PURE__*/_jsx("div", {
138
+ "data-slot": "item-header",
139
+ className: cn("flex basis-full items-center justify-between gap-2", className),
140
+ ...props
141
+ });
62
142
  }
63
- function ItemFooter({ className, ...props }) {
64
- return (_jsx("div", { "data-slot": "item-footer", className: cn("flex basis-full items-center justify-between gap-2", className), ...props }));
143
+ function ItemFooter({
144
+ className,
145
+ ...props
146
+ }) {
147
+ return /*#__PURE__*/_jsx("div", {
148
+ "data-slot": "item-footer",
149
+ className: cn("flex basis-full items-center justify-between gap-2", className),
150
+ ...props
151
+ });
65
152
  }
66
- export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, };
153
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
@@ -1,9 +1,23 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { cn } from "cn";
3
- function Kbd({ className, ...props }) {
4
- return (_jsx("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-foreground/80 ring-1 ring-border ring-inset select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:ring-0 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className), ...props }));
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ function Kbd({
4
+ className,
5
+ ...props
6
+ }) {
7
+ return /*#__PURE__*/_jsx("kbd", {
8
+ "data-slot": "kbd",
9
+ className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-foreground/80 ring-1 ring-border ring-inset select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:ring-0 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className),
10
+ ...props
11
+ });
5
12
  }
6
- function KbdGroup({ className, ...props }) {
7
- return (_jsx("kbd", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props }));
13
+ function KbdGroup({
14
+ className,
15
+ ...props
16
+ }) {
17
+ return /*#__PURE__*/_jsx("kbd", {
18
+ "data-slot": "kbd-group",
19
+ className: cn("inline-flex items-center gap-1", className),
20
+ ...props
21
+ });
8
22
  }
9
23
  export { Kbd, KbdGroup };
@@ -1,7 +1,31 @@
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 * as AspectRatioPrimitive from "radix-ui/aspect-ratio";
4
- function AspectRatio({ ...props }) {
5
- return _jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ function AspectRatio(t0) {
7
+ const $ = _c(4);
8
+ let props;
9
+ if ($[0] !== t0) {
10
+ ({
11
+ ...props
12
+ } = t0);
13
+ $[0] = t0;
14
+ $[1] = props;
15
+ } else {
16
+ props = $[1];
17
+ }
18
+ let t1;
19
+ if ($[2] !== props) {
20
+ t1 = /*#__PURE__*/_jsx(AspectRatioPrimitive.Root, {
21
+ "data-slot": "aspect-ratio",
22
+ ...props
23
+ });
24
+ $[2] = props;
25
+ $[3] = t1;
26
+ } else {
27
+ t1 = $[3];
28
+ }
29
+ return t1;
6
30
  }
7
31
  export { AspectRatio };