@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,27 +1,92 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { ChevronRight, OverflowMenuHorizontal as MoreHorizontal } from "@carbon/icons-react";
3
2
  import { cn } from "cn";
4
3
  import * as Slot from "radix-ui/slot";
5
- function Breadcrumb({ ...props }) {
6
- return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
4
+ import * as React from "react";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ function Breadcrumb({
7
+ ...props
8
+ }) {
9
+ return /*#__PURE__*/_jsx("nav", {
10
+ "aria-label": "breadcrumb",
11
+ "data-slot": "breadcrumb",
12
+ ...props
13
+ });
7
14
  }
8
- function BreadcrumbList({ className, ...props }) {
9
- return (_jsx("ol", { "data-slot": "breadcrumb-list", className: cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5", className), ...props }));
15
+ function BreadcrumbList({
16
+ className,
17
+ ...props
18
+ }) {
19
+ return /*#__PURE__*/_jsx("ol", {
20
+ "data-slot": "breadcrumb-list",
21
+ className: cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5", className),
22
+ ...props
23
+ });
10
24
  }
11
- function BreadcrumbItem({ className, ...props }) {
12
- return (_jsx("li", { "data-slot": "breadcrumb-item", className: cn("inline-flex items-center gap-1.5", className), ...props }));
25
+ function BreadcrumbItem({
26
+ className,
27
+ ...props
28
+ }) {
29
+ return /*#__PURE__*/_jsx("li", {
30
+ "data-slot": "breadcrumb-item",
31
+ className: cn("inline-flex items-center gap-1.5", className),
32
+ ...props
33
+ });
13
34
  }
14
- function BreadcrumbLink({ asChild, className, ...props }) {
15
- const Comp = asChild ? Slot.Root : "a";
16
- return (_jsx(Comp, { "data-slot": "breadcrumb-link", className: cn("transition-colors hover:text-foreground", className), ...props }));
35
+ function BreadcrumbLink({
36
+ asChild,
37
+ className,
38
+ ...props
39
+ }) {
40
+ const Comp = asChild ? Slot.Root : "a";
41
+ return /*#__PURE__*/_jsx(Comp, {
42
+ "data-slot": "breadcrumb-link",
43
+ className: cn("transition-colors hover:text-foreground", className),
44
+ ...props
45
+ });
17
46
  }
18
- function BreadcrumbPage({ className, ...props }) {
19
- return (_jsx("span", { "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-foreground", className), ...props }));
47
+ function BreadcrumbPage({
48
+ className,
49
+ ...props
50
+ }) {
51
+ return /*#__PURE__*/_jsx("span", {
52
+ "data-slot": "breadcrumb-page",
53
+ role: "link",
54
+ "aria-disabled": "true",
55
+ "aria-current": "page",
56
+ className: cn("font-normal text-foreground", className),
57
+ ...props
58
+ });
20
59
  }
21
- function BreadcrumbSeparator({ children, className, ...props }) {
22
- return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
60
+ function BreadcrumbSeparator({
61
+ children,
62
+ className,
63
+ ...props
64
+ }) {
65
+ return /*#__PURE__*/_jsx("li", {
66
+ "data-slot": "breadcrumb-separator",
67
+ role: "presentation",
68
+ "aria-hidden": "true",
69
+ className: cn("[&>svg]:size-3.5", className),
70
+ ...props,
71
+ children: children ?? /*#__PURE__*/_jsx(ChevronRight, {})
72
+ });
23
73
  }
24
- function BreadcrumbEllipsis({ className, ...props }) {
25
- return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn("flex size-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
74
+ function BreadcrumbEllipsis({
75
+ className,
76
+ ...props
77
+ }) {
78
+ return /*#__PURE__*/_jsxs("span", {
79
+ "data-slot": "breadcrumb-ellipsis",
80
+ role: "presentation",
81
+ "aria-hidden": "true",
82
+ className: cn("flex size-9 items-center justify-center", className),
83
+ ...props,
84
+ children: [/*#__PURE__*/_jsx(MoreHorizontal, {
85
+ className: "size-4"
86
+ }), /*#__PURE__*/_jsx("span", {
87
+ className: "sr-only",
88
+ children: "More"
89
+ })]
90
+ });
26
91
  }
27
- export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
92
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -1,27 +1,333 @@
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 { Checkmark as CheckIcon, CircleSolid as CircleIcon } from "@carbon/icons-react";
4
5
  import { cn } from "cn";
5
6
  import * as MenubarPrimitive from "radix-ui/menubar";
6
- function MenubarItem({ className, inset, variant = "default", ...props }) {
7
- return (_jsx(MenubarPrimitive.Item, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className), ...props }));
7
+ import * as React from "react";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ function MenubarItem(t0) {
10
+ const $ = _c(12);
11
+ let className;
12
+ let inset;
13
+ let props;
14
+ let t1;
15
+ if ($[0] !== t0) {
16
+ ({
17
+ className,
18
+ inset,
19
+ variant: t1,
20
+ ...props
21
+ } = t0);
22
+ $[0] = t0;
23
+ $[1] = className;
24
+ $[2] = inset;
25
+ $[3] = props;
26
+ $[4] = t1;
27
+ } else {
28
+ className = $[1];
29
+ inset = $[2];
30
+ props = $[3];
31
+ t1 = $[4];
32
+ }
33
+ const variant = t1 === undefined ? "default" : t1;
34
+ let t2;
35
+ if ($[5] !== className) {
36
+ t2 = cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className);
37
+ $[5] = className;
38
+ $[6] = t2;
39
+ } else {
40
+ t2 = $[6];
41
+ }
42
+ let t3;
43
+ if ($[7] !== inset || $[8] !== props || $[9] !== t2 || $[10] !== variant) {
44
+ t3 = /*#__PURE__*/_jsx(MenubarPrimitive.Item, {
45
+ "data-slot": "menubar-item",
46
+ "data-inset": inset,
47
+ "data-variant": variant,
48
+ className: t2,
49
+ ...props
50
+ });
51
+ $[7] = inset;
52
+ $[8] = props;
53
+ $[9] = t2;
54
+ $[10] = variant;
55
+ $[11] = t3;
56
+ } else {
57
+ t3 = $[11];
58
+ }
59
+ return t3;
8
60
  }
9
- function MenubarCheckboxItem({ className, children, checked, ...props }) {
10
- return (_jsxs(MenubarPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", className: cn("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
61
+ function MenubarCheckboxItem(t0) {
62
+ const $ = _c(13);
63
+ let checked;
64
+ let children;
65
+ let className;
66
+ let props;
67
+ if ($[0] !== t0) {
68
+ ({
69
+ className,
70
+ children,
71
+ checked,
72
+ ...props
73
+ } = t0);
74
+ $[0] = t0;
75
+ $[1] = checked;
76
+ $[2] = children;
77
+ $[3] = className;
78
+ $[4] = props;
79
+ } else {
80
+ checked = $[1];
81
+ children = $[2];
82
+ className = $[3];
83
+ props = $[4];
84
+ }
85
+ let t1;
86
+ if ($[5] !== className) {
87
+ t1 = cn("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
88
+ $[5] = className;
89
+ $[6] = t1;
90
+ } else {
91
+ t1 = $[6];
92
+ }
93
+ let t2;
94
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
95
+ t2 = /*#__PURE__*/_jsx("span", {
96
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
97
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.ItemIndicator, {
98
+ children: /*#__PURE__*/_jsx(CheckIcon, {
99
+ className: "size-4"
100
+ })
101
+ })
102
+ });
103
+ $[7] = t2;
104
+ } else {
105
+ t2 = $[7];
106
+ }
107
+ let t3;
108
+ if ($[8] !== checked || $[9] !== children || $[10] !== props || $[11] !== t1) {
109
+ t3 = /*#__PURE__*/_jsxs(MenubarPrimitive.CheckboxItem, {
110
+ "data-slot": "menubar-checkbox-item",
111
+ className: t1,
112
+ checked: checked,
113
+ ...props,
114
+ children: [t2, children]
115
+ });
116
+ $[8] = checked;
117
+ $[9] = children;
118
+ $[10] = props;
119
+ $[11] = t1;
120
+ $[12] = t3;
121
+ } else {
122
+ t3 = $[12];
123
+ }
124
+ return t3;
11
125
  }
12
- function MenubarRadioGroup({ ...props }) {
13
- return _jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
126
+ function MenubarRadioGroup(t0) {
127
+ const $ = _c(4);
128
+ let props;
129
+ if ($[0] !== t0) {
130
+ ({
131
+ ...props
132
+ } = t0);
133
+ $[0] = t0;
134
+ $[1] = props;
135
+ } else {
136
+ props = $[1];
137
+ }
138
+ let t1;
139
+ if ($[2] !== props) {
140
+ t1 = /*#__PURE__*/_jsx(MenubarPrimitive.RadioGroup, {
141
+ "data-slot": "menubar-radio-group",
142
+ ...props
143
+ });
144
+ $[2] = props;
145
+ $[3] = t1;
146
+ } else {
147
+ t1 = $[3];
148
+ }
149
+ return t1;
14
150
  }
15
- function MenubarRadioItem({ className, children, ...props }) {
16
- return (_jsxs(MenubarPrimitive.RadioItem, { "data-slot": "menubar-radio-item", className: cn("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
151
+ function MenubarRadioItem(t0) {
152
+ const $ = _c(11);
153
+ let children;
154
+ let className;
155
+ let props;
156
+ if ($[0] !== t0) {
157
+ ({
158
+ className,
159
+ children,
160
+ ...props
161
+ } = t0);
162
+ $[0] = t0;
163
+ $[1] = children;
164
+ $[2] = className;
165
+ $[3] = props;
166
+ } else {
167
+ children = $[1];
168
+ className = $[2];
169
+ props = $[3];
170
+ }
171
+ let t1;
172
+ if ($[4] !== className) {
173
+ t1 = cn("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
174
+ $[4] = className;
175
+ $[5] = t1;
176
+ } else {
177
+ t1 = $[5];
178
+ }
179
+ let t2;
180
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
181
+ t2 = /*#__PURE__*/_jsx("span", {
182
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
183
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.ItemIndicator, {
184
+ children: /*#__PURE__*/_jsx(CircleIcon, {
185
+ className: "size-2 fill-current"
186
+ })
187
+ })
188
+ });
189
+ $[6] = t2;
190
+ } else {
191
+ t2 = $[6];
192
+ }
193
+ let t3;
194
+ if ($[7] !== children || $[8] !== props || $[9] !== t1) {
195
+ t3 = /*#__PURE__*/_jsxs(MenubarPrimitive.RadioItem, {
196
+ "data-slot": "menubar-radio-item",
197
+ className: t1,
198
+ ...props,
199
+ children: [t2, children]
200
+ });
201
+ $[7] = children;
202
+ $[8] = props;
203
+ $[9] = t1;
204
+ $[10] = t3;
205
+ } else {
206
+ t3 = $[10];
207
+ }
208
+ return t3;
17
209
  }
18
- function MenubarLabel({ className, inset, ...props }) {
19
- return (_jsx(MenubarPrimitive.Label, { "data-slot": "menubar-label", "data-inset": inset, className: cn("eyebrow px-2 pt-2 pb-1 data-[inset]:pl-8", className), ...props }));
210
+ function MenubarLabel(t0) {
211
+ const $ = _c(10);
212
+ let className;
213
+ let inset;
214
+ let props;
215
+ if ($[0] !== t0) {
216
+ ({
217
+ className,
218
+ inset,
219
+ ...props
220
+ } = t0);
221
+ $[0] = t0;
222
+ $[1] = className;
223
+ $[2] = inset;
224
+ $[3] = props;
225
+ } else {
226
+ className = $[1];
227
+ inset = $[2];
228
+ props = $[3];
229
+ }
230
+ let t1;
231
+ if ($[4] !== className) {
232
+ t1 = cn("eyebrow px-2 pt-2 pb-1 data-[inset]:pl-8", className);
233
+ $[4] = className;
234
+ $[5] = t1;
235
+ } else {
236
+ t1 = $[5];
237
+ }
238
+ let t2;
239
+ if ($[6] !== inset || $[7] !== props || $[8] !== t1) {
240
+ t2 = /*#__PURE__*/_jsx(MenubarPrimitive.Label, {
241
+ "data-slot": "menubar-label",
242
+ "data-inset": inset,
243
+ className: t1,
244
+ ...props
245
+ });
246
+ $[6] = inset;
247
+ $[7] = props;
248
+ $[8] = t1;
249
+ $[9] = t2;
250
+ } else {
251
+ t2 = $[9];
252
+ }
253
+ return t2;
20
254
  }
21
- function MenubarSeparator({ className, ...props }) {
22
- return (_jsx(MenubarPrimitive.Separator, { "data-slot": "menubar-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
255
+ function MenubarSeparator(t0) {
256
+ const $ = _c(8);
257
+ let className;
258
+ let props;
259
+ if ($[0] !== t0) {
260
+ ({
261
+ className,
262
+ ...props
263
+ } = t0);
264
+ $[0] = t0;
265
+ $[1] = className;
266
+ $[2] = props;
267
+ } else {
268
+ className = $[1];
269
+ props = $[2];
270
+ }
271
+ let t1;
272
+ if ($[3] !== className) {
273
+ t1 = cn("-mx-1 my-1 h-px bg-border", className);
274
+ $[3] = className;
275
+ $[4] = t1;
276
+ } else {
277
+ t1 = $[4];
278
+ }
279
+ let t2;
280
+ if ($[5] !== props || $[6] !== t1) {
281
+ t2 = /*#__PURE__*/_jsx(MenubarPrimitive.Separator, {
282
+ "data-slot": "menubar-separator",
283
+ className: t1,
284
+ ...props
285
+ });
286
+ $[5] = props;
287
+ $[6] = t1;
288
+ $[7] = t2;
289
+ } else {
290
+ t2 = $[7];
291
+ }
292
+ return t2;
23
293
  }
24
- function MenubarShortcut({ className, ...props }) {
25
- return (_jsx("span", { "data-slot": "menubar-shortcut", className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
294
+ function MenubarShortcut(t0) {
295
+ const $ = _c(8);
296
+ let className;
297
+ let props;
298
+ if ($[0] !== t0) {
299
+ ({
300
+ className,
301
+ ...props
302
+ } = t0);
303
+ $[0] = t0;
304
+ $[1] = className;
305
+ $[2] = props;
306
+ } else {
307
+ className = $[1];
308
+ props = $[2];
309
+ }
310
+ let t1;
311
+ if ($[3] !== className) {
312
+ t1 = cn("ml-auto text-xs tracking-widest text-muted-foreground", className);
313
+ $[3] = className;
314
+ $[4] = t1;
315
+ } else {
316
+ t1 = $[4];
317
+ }
318
+ let t2;
319
+ if ($[5] !== props || $[6] !== t1) {
320
+ t2 = /*#__PURE__*/_jsx("span", {
321
+ "data-slot": "menubar-shortcut",
322
+ className: t1,
323
+ ...props
324
+ });
325
+ $[5] = props;
326
+ $[6] = t1;
327
+ $[7] = t2;
328
+ } else {
329
+ t2 = $[7];
330
+ }
331
+ return t2;
26
332
  }
27
- export { MenubarCheckboxItem, MenubarItem, MenubarLabel, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, };
333
+ export { MenubarCheckboxItem, MenubarItem, MenubarLabel, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut };
@@ -1,15 +1,133 @@
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 { ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
4
5
  import { cn } from "cn";
5
6
  import * as MenubarPrimitive from "radix-ui/menubar";
6
- function MenubarSub({ ...props }) {
7
- return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
7
+ import * as React from "react";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ function MenubarSub(t0) {
10
+ const $ = _c(4);
11
+ let props;
12
+ if ($[0] !== t0) {
13
+ ({
14
+ ...props
15
+ } = t0);
16
+ $[0] = t0;
17
+ $[1] = props;
18
+ } else {
19
+ props = $[1];
20
+ }
21
+ let t1;
22
+ if ($[2] !== props) {
23
+ t1 = /*#__PURE__*/_jsx(MenubarPrimitive.Sub, {
24
+ "data-slot": "menubar-sub",
25
+ ...props
26
+ });
27
+ $[2] = props;
28
+ $[3] = t1;
29
+ } else {
30
+ t1 = $[3];
31
+ }
32
+ return t1;
8
33
  }
9
- function MenubarSubTrigger({ className, inset, children, ...props }) {
10
- return (_jsxs(MenubarPrimitive.SubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })] }));
34
+ function MenubarSubTrigger(t0) {
35
+ const $ = _c(13);
36
+ let children;
37
+ let className;
38
+ let inset;
39
+ let props;
40
+ if ($[0] !== t0) {
41
+ ({
42
+ className,
43
+ inset,
44
+ children,
45
+ ...props
46
+ } = t0);
47
+ $[0] = t0;
48
+ $[1] = children;
49
+ $[2] = className;
50
+ $[3] = inset;
51
+ $[4] = props;
52
+ } else {
53
+ children = $[1];
54
+ className = $[2];
55
+ inset = $[3];
56
+ props = $[4];
57
+ }
58
+ let t1;
59
+ if ($[5] !== className) {
60
+ t1 = cn("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className);
61
+ $[5] = className;
62
+ $[6] = t1;
63
+ } else {
64
+ t1 = $[6];
65
+ }
66
+ let t2;
67
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
68
+ t2 = /*#__PURE__*/_jsx(ChevronRightIcon, {
69
+ className: "ml-auto h-4 w-4"
70
+ });
71
+ $[7] = t2;
72
+ } else {
73
+ t2 = $[7];
74
+ }
75
+ let t3;
76
+ if ($[8] !== children || $[9] !== inset || $[10] !== props || $[11] !== t1) {
77
+ t3 = /*#__PURE__*/_jsxs(MenubarPrimitive.SubTrigger, {
78
+ "data-slot": "menubar-sub-trigger",
79
+ "data-inset": inset,
80
+ className: t1,
81
+ ...props,
82
+ children: [children, t2]
83
+ });
84
+ $[8] = children;
85
+ $[9] = inset;
86
+ $[10] = props;
87
+ $[11] = t1;
88
+ $[12] = t3;
89
+ } else {
90
+ t3 = $[12];
91
+ }
92
+ return t3;
11
93
  }
12
- function MenubarSubContent({ className, ...props }) {
13
- return (_jsx(MenubarPrimitive.SubContent, { "data-slot": "menubar-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }));
94
+ function MenubarSubContent(t0) {
95
+ const $ = _c(8);
96
+ let className;
97
+ let props;
98
+ if ($[0] !== t0) {
99
+ ({
100
+ className,
101
+ ...props
102
+ } = t0);
103
+ $[0] = t0;
104
+ $[1] = className;
105
+ $[2] = props;
106
+ } else {
107
+ className = $[1];
108
+ props = $[2];
109
+ }
110
+ let t1;
111
+ if ($[3] !== className) {
112
+ t1 = cn("z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className);
113
+ $[3] = className;
114
+ $[4] = t1;
115
+ } else {
116
+ t1 = $[4];
117
+ }
118
+ let t2;
119
+ if ($[5] !== props || $[6] !== t1) {
120
+ t2 = /*#__PURE__*/_jsx(MenubarPrimitive.SubContent, {
121
+ "data-slot": "menubar-sub-content",
122
+ className: t1,
123
+ ...props
124
+ });
125
+ $[5] = props;
126
+ $[6] = t1;
127
+ $[7] = t2;
128
+ } else {
129
+ t2 = $[7];
130
+ }
131
+ return t2;
14
132
  }
15
133
  export { MenubarSub, MenubarSubContent, MenubarSubTrigger };