@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,49 +1,220 @@
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 { cn } from "cn";
4
5
  import * as React from "react";
5
6
  import * as RechartsPrimitive from "recharts";
6
7
  import { getPayloadConfigFromPayload, useChart } from "./chart-container.js";
8
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
7
9
  const ChartTooltip = RechartsPrimitive.Tooltip;
8
- function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }) {
9
- const { config } = useChart();
10
- const tooltipLabel = React.useMemo(() => {
11
- if (hideLabel || !payload?.length) {
12
- return null;
13
- }
14
- const [item] = payload;
15
- const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
16
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
17
- const value = !labelKey && typeof label === "string" ? (config[label]?.label ?? label) : itemConfig?.label;
18
- if (labelFormatter) {
19
- return (_jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) }));
20
- }
21
- if (!value) {
22
- return null;
23
- }
24
- return _jsx("div", { className: cn("font-medium", labelClassName), children: value });
25
- }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
26
- if (!active || !payload?.length) {
27
- return null;
10
+ function ChartTooltipContent(t0) {
11
+ const $ = _c(45);
12
+ const {
13
+ active,
14
+ payload,
15
+ className,
16
+ indicator: t1,
17
+ hideLabel: t2,
18
+ hideIndicator: t3,
19
+ label,
20
+ labelFormatter,
21
+ labelClassName,
22
+ formatter,
23
+ color,
24
+ nameKey,
25
+ labelKey
26
+ } = t0;
27
+ const indicator = t1 === undefined ? "dot" : t1;
28
+ const hideLabel = t2 === undefined ? false : t2;
29
+ const hideIndicator = t3 === undefined ? false : t3;
30
+ const {
31
+ config
32
+ } = useChart();
33
+ let t4;
34
+ bb0: {
35
+ if (hideLabel || !payload?.length) {
36
+ t4 = null;
37
+ break bb0;
28
38
  }
29
- const nestLabel = payload.length === 1 && indicator !== "dot";
30
- return (_jsxs("div", { className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
31
- .filter((item) => item.type !== "none")
32
- .map((item, index) => {
33
- const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
34
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
35
- const indicatorColor = color ?? item.payload?.fill ?? item.color;
36
- return (_jsx("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
37
- "h-2.5 w-2.5": indicator === "dot",
38
- "w-1": indicator === "line",
39
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
40
- "my-0.5": nestLabel && indicator === "dashed",
41
- }), style: {
42
- "--color-bg": indicatorColor,
43
- "--color-border": indicatorColor,
44
- } }))), _jsxs("div", { className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })] }), item.value != null && (_jsx("span", { className: "font-mono font-medium text-foreground tabular-nums", children: typeof item.value === "number"
45
- ? item.value.toLocaleString()
46
- : String(item.value) }))] })] })) }, key));
47
- }) })] }));
39
+ const [item] = payload;
40
+ const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
41
+ let t5;
42
+ if ($[0] !== config || $[1] !== item || $[2] !== key) {
43
+ t5 = getPayloadConfigFromPayload(config, item, key);
44
+ $[0] = config;
45
+ $[1] = item;
46
+ $[2] = key;
47
+ $[3] = t5;
48
+ } else {
49
+ t5 = $[3];
50
+ }
51
+ const itemConfig = t5;
52
+ const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
53
+ if (labelFormatter) {
54
+ let t6;
55
+ if ($[4] !== labelClassName) {
56
+ t6 = cn("font-medium", labelClassName);
57
+ $[4] = labelClassName;
58
+ $[5] = t6;
59
+ } else {
60
+ t6 = $[5];
61
+ }
62
+ let t7;
63
+ if ($[6] !== labelFormatter || $[7] !== payload || $[8] !== value) {
64
+ t7 = labelFormatter(value, payload);
65
+ $[6] = labelFormatter;
66
+ $[7] = payload;
67
+ $[8] = value;
68
+ $[9] = t7;
69
+ } else {
70
+ t7 = $[9];
71
+ }
72
+ let t8;
73
+ if ($[10] !== t6 || $[11] !== t7) {
74
+ t8 = /*#__PURE__*/_jsx("div", {
75
+ className: t6,
76
+ children: t7
77
+ });
78
+ $[10] = t6;
79
+ $[11] = t7;
80
+ $[12] = t8;
81
+ } else {
82
+ t8 = $[12];
83
+ }
84
+ t4 = t8;
85
+ break bb0;
86
+ }
87
+ if (!value) {
88
+ t4 = null;
89
+ break bb0;
90
+ }
91
+ let t6;
92
+ if ($[13] !== labelClassName) {
93
+ t6 = cn("font-medium", labelClassName);
94
+ $[13] = labelClassName;
95
+ $[14] = t6;
96
+ } else {
97
+ t6 = $[14];
98
+ }
99
+ let t7;
100
+ if ($[15] !== t6 || $[16] !== value) {
101
+ t7 = /*#__PURE__*/_jsx("div", {
102
+ className: t6,
103
+ children: value
104
+ });
105
+ $[15] = t6;
106
+ $[16] = value;
107
+ $[17] = t7;
108
+ } else {
109
+ t7 = $[17];
110
+ }
111
+ t4 = t7;
112
+ }
113
+ const tooltipLabel = t4;
114
+ if (!active || !payload?.length) {
115
+ return null;
116
+ }
117
+ const nestLabel = payload.length === 1 && indicator !== "dot";
118
+ let t5;
119
+ if ($[18] !== className) {
120
+ t5 = cn("grid min-w-[8rem] items-start gap-1.5 bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-overlay ring-1 ring-border", className);
121
+ $[18] = className;
122
+ $[19] = t5;
123
+ } else {
124
+ t5 = $[19];
125
+ }
126
+ const t6 = !nestLabel ? tooltipLabel : null;
127
+ let t7;
128
+ if ($[20] !== color || $[21] !== config || $[22] !== formatter || $[23] !== hideIndicator || $[24] !== indicator || $[25] !== nameKey || $[26] !== nestLabel || $[27] !== payload || $[28] !== tooltipLabel) {
129
+ let t8;
130
+ if ($[30] !== color || $[31] !== config || $[32] !== formatter || $[33] !== hideIndicator || $[34] !== indicator || $[35] !== nameKey || $[36] !== nestLabel || $[37] !== tooltipLabel) {
131
+ t8 = (item_1, index) => {
132
+ const key_0 = `${nameKey ?? item_1.name ?? item_1.dataKey ?? "value"}`;
133
+ const itemConfig_0 = getPayloadConfigFromPayload(config, item_1, key_0);
134
+ const indicatorColor = color ?? item_1.payload?.fill ?? item_1.color;
135
+ return /*#__PURE__*/_jsx("div", {
136
+ className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
137
+ children: formatter && item_1?.value !== undefined && item_1.name ? formatter(item_1.value, item_1.name, item_1, index, item_1.payload) : /*#__PURE__*/_jsxs(_Fragment, {
138
+ children: [itemConfig_0?.icon ? /*#__PURE__*/_jsx(itemConfig_0.icon, {}) : !hideIndicator && /*#__PURE__*/_jsx("div", {
139
+ className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
140
+ "h-2.5 w-2.5": indicator === "dot",
141
+ "w-1": indicator === "line",
142
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
143
+ "my-0.5": nestLabel && indicator === "dashed"
144
+ }),
145
+ style: {
146
+ "--color-bg": indicatorColor,
147
+ "--color-border": indicatorColor
148
+ }
149
+ }), /*#__PURE__*/_jsxs("div", {
150
+ className: cn("flex flex-1 justify-between gap-4 leading-none", nestLabel ? "items-end" : "items-center"),
151
+ children: [/*#__PURE__*/_jsxs("div", {
152
+ className: "grid gap-1.5",
153
+ children: [nestLabel ? tooltipLabel : null, /*#__PURE__*/_jsx("span", {
154
+ className: "text-muted-foreground",
155
+ children: itemConfig_0?.label ?? item_1.name
156
+ })]
157
+ }), item_1.value != null && /*#__PURE__*/_jsx("span", {
158
+ className: "font-mono font-medium text-foreground tabular-nums",
159
+ children: typeof item_1.value === "number" ? item_1.value.toLocaleString() : String(item_1.value)
160
+ })]
161
+ })]
162
+ })
163
+ }, key_0);
164
+ };
165
+ $[30] = color;
166
+ $[31] = config;
167
+ $[32] = formatter;
168
+ $[33] = hideIndicator;
169
+ $[34] = indicator;
170
+ $[35] = nameKey;
171
+ $[36] = nestLabel;
172
+ $[37] = tooltipLabel;
173
+ $[38] = t8;
174
+ } else {
175
+ t8 = $[38];
176
+ }
177
+ t7 = payload.filter(_temp).map(t8);
178
+ $[20] = color;
179
+ $[21] = config;
180
+ $[22] = formatter;
181
+ $[23] = hideIndicator;
182
+ $[24] = indicator;
183
+ $[25] = nameKey;
184
+ $[26] = nestLabel;
185
+ $[27] = payload;
186
+ $[28] = tooltipLabel;
187
+ $[29] = t7;
188
+ } else {
189
+ t7 = $[29];
190
+ }
191
+ let t8;
192
+ if ($[39] !== t7) {
193
+ t8 = /*#__PURE__*/_jsx("div", {
194
+ className: "grid gap-1.5",
195
+ children: t7
196
+ });
197
+ $[39] = t7;
198
+ $[40] = t8;
199
+ } else {
200
+ t8 = $[40];
201
+ }
202
+ let t9;
203
+ if ($[41] !== t5 || $[42] !== t6 || $[43] !== t8) {
204
+ t9 = /*#__PURE__*/_jsxs("div", {
205
+ className: t5,
206
+ children: [t6, t8]
207
+ });
208
+ $[41] = t5;
209
+ $[42] = t6;
210
+ $[43] = t8;
211
+ $[44] = t9;
212
+ } else {
213
+ t9 = $[44];
214
+ }
215
+ return t9;
216
+ }
217
+ function _temp(item_0) {
218
+ return item_0.type !== "none";
48
219
  }
49
220
  export { ChartTooltip, ChartTooltipContent };
@@ -1,21 +1,230 @@
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
3
  import * as Slot from "radix-ui/slot";
4
+ import * as React from "react";
4
5
  import { Button } from "../../../action/button.js";
5
- function AttachmentTitle({ className, ...props }) {
6
- return (_jsx("span", { "data-slot": "attachment-title", className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className), ...props }));
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ function AttachmentTitle(t0) {
8
+ const $ = _c(8);
9
+ let className;
10
+ let props;
11
+ if ($[0] !== t0) {
12
+ ({
13
+ className,
14
+ ...props
15
+ } = t0);
16
+ $[0] = t0;
17
+ $[1] = className;
18
+ $[2] = props;
19
+ } else {
20
+ className = $[1];
21
+ props = $[2];
22
+ }
23
+ let t1;
24
+ if ($[3] !== className) {
25
+ t1 = cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className);
26
+ $[3] = className;
27
+ $[4] = t1;
28
+ } else {
29
+ t1 = $[4];
30
+ }
31
+ let t2;
32
+ if ($[5] !== props || $[6] !== t1) {
33
+ t2 = /*#__PURE__*/_jsx("span", {
34
+ "data-slot": "attachment-title",
35
+ className: t1,
36
+ ...props
37
+ });
38
+ $[5] = props;
39
+ $[6] = t1;
40
+ $[7] = t2;
41
+ } else {
42
+ t2 = $[7];
43
+ }
44
+ return t2;
7
45
  }
8
- function AttachmentDescription({ className, ...props }) {
9
- return (_jsx("span", { "data-slot": "attachment-description", className: cn("mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80", "max-w-full", className), ...props }));
46
+ function AttachmentDescription(t0) {
47
+ const $ = _c(8);
48
+ let className;
49
+ let props;
50
+ if ($[0] !== t0) {
51
+ ({
52
+ className,
53
+ ...props
54
+ } = t0);
55
+ $[0] = t0;
56
+ $[1] = className;
57
+ $[2] = props;
58
+ } else {
59
+ className = $[1];
60
+ props = $[2];
61
+ }
62
+ let t1;
63
+ if ($[3] !== className) {
64
+ t1 = cn("mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80", "max-w-full", className);
65
+ $[3] = className;
66
+ $[4] = t1;
67
+ } else {
68
+ t1 = $[4];
69
+ }
70
+ let t2;
71
+ if ($[5] !== props || $[6] !== t1) {
72
+ t2 = /*#__PURE__*/_jsx("span", {
73
+ "data-slot": "attachment-description",
74
+ className: t1,
75
+ ...props
76
+ });
77
+ $[5] = props;
78
+ $[6] = t1;
79
+ $[7] = t2;
80
+ } else {
81
+ t2 = $[7];
82
+ }
83
+ return t2;
10
84
  }
11
- function AttachmentActions({ className, ...props }) {
12
- return (_jsx("div", { "data-slot": "attachment-actions", className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className), ...props }));
85
+ function AttachmentActions(t0) {
86
+ const $ = _c(8);
87
+ let className;
88
+ let props;
89
+ if ($[0] !== t0) {
90
+ ({
91
+ className,
92
+ ...props
93
+ } = t0);
94
+ $[0] = t0;
95
+ $[1] = className;
96
+ $[2] = props;
97
+ } else {
98
+ className = $[1];
99
+ props = $[2];
100
+ }
101
+ let t1;
102
+ if ($[3] !== className) {
103
+ t1 = cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className);
104
+ $[3] = className;
105
+ $[4] = t1;
106
+ } else {
107
+ t1 = $[4];
108
+ }
109
+ let t2;
110
+ if ($[5] !== props || $[6] !== t1) {
111
+ t2 = /*#__PURE__*/_jsx("div", {
112
+ "data-slot": "attachment-actions",
113
+ className: t1,
114
+ ...props
115
+ });
116
+ $[5] = props;
117
+ $[6] = t1;
118
+ $[7] = t2;
119
+ } else {
120
+ t2 = $[7];
121
+ }
122
+ return t2;
13
123
  }
14
- function AttachmentAction({ className, variant, size = "icon-xs", ...props }) {
15
- return (_jsx(Button, { "data-slot": "attachment-action", variant: variant ?? "ghost", size: size, className: cn(className), ...props }));
124
+ function AttachmentAction(t0) {
125
+ const $ = _c(12);
126
+ let className;
127
+ let props;
128
+ let t1;
129
+ let variant;
130
+ if ($[0] !== t0) {
131
+ ({
132
+ className,
133
+ variant,
134
+ size: t1,
135
+ ...props
136
+ } = t0);
137
+ $[0] = t0;
138
+ $[1] = className;
139
+ $[2] = props;
140
+ $[3] = t1;
141
+ $[4] = variant;
142
+ } else {
143
+ className = $[1];
144
+ props = $[2];
145
+ t1 = $[3];
146
+ variant = $[4];
147
+ }
148
+ const size = t1 === undefined ? "icon-xs" : t1;
149
+ const t2 = variant ?? "ghost";
150
+ let t3;
151
+ if ($[5] !== className) {
152
+ t3 = cn(className);
153
+ $[5] = className;
154
+ $[6] = t3;
155
+ } else {
156
+ t3 = $[6];
157
+ }
158
+ let t4;
159
+ if ($[7] !== props || $[8] !== size || $[9] !== t2 || $[10] !== t3) {
160
+ t4 = /*#__PURE__*/_jsx(Button, {
161
+ "data-slot": "attachment-action",
162
+ variant: t2,
163
+ size: size,
164
+ className: t3,
165
+ ...props
166
+ });
167
+ $[7] = props;
168
+ $[8] = size;
169
+ $[9] = t2;
170
+ $[10] = t3;
171
+ $[11] = t4;
172
+ } else {
173
+ t4 = $[11];
174
+ }
175
+ return t4;
16
176
  }
17
- function AttachmentTrigger({ className, asChild = false, type, ...props }) {
18
- const Comp = asChild ? Slot.Root : "button";
19
- return (_jsx(Comp, { "data-slot": "attachment-trigger", type: asChild ? undefined : (type ?? "button"), className: cn("absolute inset-0 z-10 outline-none", className), ...props }));
177
+ function AttachmentTrigger(t0) {
178
+ const $ = _c(12);
179
+ let className;
180
+ let props;
181
+ let t1;
182
+ let type;
183
+ if ($[0] !== t0) {
184
+ ({
185
+ className,
186
+ asChild: t1,
187
+ type,
188
+ ...props
189
+ } = t0);
190
+ $[0] = t0;
191
+ $[1] = className;
192
+ $[2] = props;
193
+ $[3] = t1;
194
+ $[4] = type;
195
+ } else {
196
+ className = $[1];
197
+ props = $[2];
198
+ t1 = $[3];
199
+ type = $[4];
200
+ }
201
+ const asChild = t1 === undefined ? false : t1;
202
+ const Comp = asChild ? Slot.Root : "button";
203
+ const t2 = asChild ? undefined : type ?? "button";
204
+ let t3;
205
+ if ($[5] !== className) {
206
+ t3 = cn("absolute inset-0 z-10 outline-none", className);
207
+ $[5] = className;
208
+ $[6] = t3;
209
+ } else {
210
+ t3 = $[6];
211
+ }
212
+ let t4;
213
+ if ($[7] !== Comp || $[8] !== props || $[9] !== t2 || $[10] !== t3) {
214
+ t4 = /*#__PURE__*/_jsx(Comp, {
215
+ "data-slot": "attachment-trigger",
216
+ type: t2,
217
+ className: t3,
218
+ ...props
219
+ });
220
+ $[7] = Comp;
221
+ $[8] = props;
222
+ $[9] = t2;
223
+ $[10] = t3;
224
+ $[11] = t4;
225
+ } else {
226
+ t4 = $[11];
227
+ }
228
+ return t4;
20
229
  }
21
- export { AttachmentAction, AttachmentActions, AttachmentDescription, AttachmentTitle, AttachmentTrigger, };
230
+ export { AttachmentAction, AttachmentActions, AttachmentDescription, AttachmentTitle, AttachmentTrigger };