@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.
- package/dist/action/button-group.js +148 -17
- package/dist/action/button.js +91 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +71 -18
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.d.ts +1 -1
- package/dist/display/badge.js +74 -17
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +222 -13
- package/dist/display/chat/attachment/attachment.js +210 -28
- package/dist/display/chat/bubble.js +225 -37
- package/dist/display/chat/marker.js +143 -15
- package/dist/display/chat/message-scroller.js +277 -15
- package/dist/display/chat/message.js +238 -13
- package/dist/display/content/item.js +448 -47
- package/dist/display/content/kbd.js +78 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +163 -12
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.d.ts +3 -1
- package/dist/display/rule-grid/rule-grid.js +311 -25
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +83 -0
- package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-table.js +174 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-button.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
- package/dist/display/skeletons/shapes/skeleton-text.js +84 -0
- package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
- package/dist/display/skeletons/skeleton-parts.js +68 -0
- package/dist/display/status/alert.d.ts +1 -1
- package/dist/display/status/alert.js +137 -17
- package/dist/display/status/empty.js +250 -22
- package/dist/display/status/progress.d.ts +5 -1
- package/dist/display/status/progress.js +120 -3
- package/dist/display/status/skeleton.js +40 -3
- package/dist/display/status/spinner.js +42 -4
- package/dist/display/table.js +310 -17
- package/dist/feedback/toaster.d.ts +1 -1
- package/dist/feedback/toaster.js +100 -25
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +152 -9
- package/dist/form/advanced/combobox/combobox-items.js +240 -15
- package/dist/form/advanced/combobox/combobox.js +387 -14
- package/dist/form/advanced/input-otp.js +202 -12
- package/dist/form/choice/checkbox.js +59 -4
- package/dist/form/choice/radio-group.js +95 -6
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +117 -14
- package/dist/form/field/field-separator.js +70 -3
- package/dist/form/field/field-set.js +85 -5
- package/dist/form/field/field-text.js +116 -7
- package/dist/form/field/field.js +138 -26
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +47 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +148 -8
- package/dist/form/textarea.js +41 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/layout/accordion.js +166 -9
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +123 -8
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.d.ts +1 -1
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +385 -29
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +23 -10
- package/dist/navigation/breadcrumb.js +302 -18
- package/dist/navigation/menubar/menubar-items.js +323 -17
- package/dist/navigation/menubar/menubar-sub.js +126 -8
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +367 -19
- package/dist/navigation/pagination.js +329 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +323 -17
- package/dist/overlay/context-menu/context-menu-sub.js +126 -8
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +406 -25
- package/dist/overlay/floating/command.js +424 -21
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +150 -8
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +125 -8
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +380 -27
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +81 -5
- package/dist/shell/app-shell.js +58 -3
- package/dist/shell/breadcrumbs.js +102 -12
- package/dist/shell/docs/docs-header.js +211 -11
- package/dist/shell/docs/docs-shell.js +100 -3
- package/dist/shell/docs/docs-sidebar.js +88 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +88 -42
- package/dist/shell/navigation/app-sidebar.js +188 -6
- package/dist/shell/navigation/nav-group.js +161 -10
- package/dist/shell/theme-toggle.js +52 -5
- package/package.json +5 -5
|
@@ -1,49 +1,220 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
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(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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 {
|
|
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
|
-
|
|
6
|
-
|
|
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(
|
|
9
|
-
|
|
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(
|
|
12
|
-
|
|
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(
|
|
15
|
-
|
|
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(
|
|
18
|
-
|
|
19
|
-
|
|
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 };
|