@locusgraph/components 0.2.1 → 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.
- package/dist/action/button-group.js +33 -136
- package/dist/action/button.js +15 -62
- package/dist/display/badge.js +13 -54
- package/dist/display/chat/attachment/attachment-parts.js +52 -218
- package/dist/display/chat/attachment/attachment.js +46 -186
- package/dist/display/chat/bubble.js +47 -192
- package/dist/display/chat/marker.js +32 -131
- package/dist/display/chat/message.js +56 -236
- package/dist/display/content/item.js +101 -415
- package/dist/display/content/kbd.js +18 -77
- package/dist/display/rule-grid/rule-grid.js +69 -292
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +25 -74
- package/dist/display/skeletons/layouts/skeleton-table.js +38 -158
- package/dist/display/skeletons/shapes/skeleton-avatar.js +19 -83
- package/dist/display/skeletons/shapes/skeleton-button.js +19 -83
- package/dist/display/skeletons/shapes/skeleton-text.js +18 -71
- package/dist/display/skeletons/skeleton-parts.js +17 -58
- package/dist/display/status/alert.js +30 -122
- package/dist/display/status/empty.js +57 -238
- package/dist/display/status/skeleton.js +9 -39
- package/dist/display/status/spinner.js +10 -40
- package/dist/display/table.js +75 -308
- package/dist/form/field/field-error.js +24 -107
- package/dist/form/field/field-separator.js +14 -65
- package/dist/form/field/field-set.js +20 -84
- package/dist/form/field/field-text.js +27 -115
- package/dist/form/field/field.js +31 -125
- package/dist/form/input.js +11 -45
- package/dist/form/native-select.js +31 -139
- package/dist/form/textarea.js +9 -39
- package/dist/layout/use-mobile.js +7 -20
- package/dist/navigation/breadcrumb.js +75 -294
- package/dist/navigation/navigation-menu.js +83 -359
- package/dist/navigation/pagination.js +78 -315
- package/dist/shell/app-header.js +21 -73
- package/dist/shell/app-shell.js +17 -56
- package/dist/shell/breadcrumbs.js +39 -97
- package/dist/shell/docs/docs-shell.js +35 -99
- package/dist/shell/docs/docs-sidebar.js +39 -86
- package/dist/shell/docs/use-active-section.js +31 -75
- package/dist/shell/navigation/app-sidebar.js +52 -174
- package/dist/shell/navigation/nav-group.js +40 -149
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
@@ -15,144 +14,42 @@ const buttonGroupVariants = cva("flex w-fit items-stretch has-[>[data-slot=butto
|
|
|
15
14
|
orientation: "horizontal"
|
|
16
15
|
}
|
|
17
16
|
});
|
|
18
|
-
function ButtonGroup(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = t0);
|
|
29
|
-
$[0] = t0;
|
|
30
|
-
$[1] = className;
|
|
31
|
-
$[2] = orientation;
|
|
32
|
-
$[3] = props;
|
|
33
|
-
} else {
|
|
34
|
-
className = $[1];
|
|
35
|
-
orientation = $[2];
|
|
36
|
-
props = $[3];
|
|
37
|
-
}
|
|
38
|
-
let t1;
|
|
39
|
-
if ($[4] !== className || $[5] !== orientation) {
|
|
40
|
-
t1 = cn(buttonGroupVariants({
|
|
17
|
+
function ButtonGroup({
|
|
18
|
+
className,
|
|
19
|
+
orientation,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
return /*#__PURE__*/_jsx("div", {
|
|
23
|
+
role: "group",
|
|
24
|
+
"data-slot": "button-group",
|
|
25
|
+
"data-orientation": orientation,
|
|
26
|
+
className: cn(buttonGroupVariants({
|
|
41
27
|
orientation
|
|
42
|
-
}), className)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
$[6] = t1;
|
|
46
|
-
} else {
|
|
47
|
-
t1 = $[6];
|
|
48
|
-
}
|
|
49
|
-
let t2;
|
|
50
|
-
if ($[7] !== orientation || $[8] !== props || $[9] !== t1) {
|
|
51
|
-
t2 = /*#__PURE__*/_jsx("div", {
|
|
52
|
-
role: "group",
|
|
53
|
-
"data-slot": "button-group",
|
|
54
|
-
"data-orientation": orientation,
|
|
55
|
-
className: t1,
|
|
56
|
-
...props
|
|
57
|
-
});
|
|
58
|
-
$[7] = orientation;
|
|
59
|
-
$[8] = props;
|
|
60
|
-
$[9] = t1;
|
|
61
|
-
$[10] = t2;
|
|
62
|
-
} else {
|
|
63
|
-
t2 = $[10];
|
|
64
|
-
}
|
|
65
|
-
return t2;
|
|
28
|
+
}), className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
66
31
|
}
|
|
67
|
-
function ButtonGroupText(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if ($[0] !== t0) {
|
|
73
|
-
({
|
|
74
|
-
className,
|
|
75
|
-
asChild: t1,
|
|
76
|
-
...props
|
|
77
|
-
} = t0);
|
|
78
|
-
$[0] = t0;
|
|
79
|
-
$[1] = className;
|
|
80
|
-
$[2] = props;
|
|
81
|
-
$[3] = t1;
|
|
82
|
-
} else {
|
|
83
|
-
className = $[1];
|
|
84
|
-
props = $[2];
|
|
85
|
-
t1 = $[3];
|
|
86
|
-
}
|
|
87
|
-
const asChild = t1 === undefined ? false : t1;
|
|
32
|
+
function ButtonGroupText({
|
|
33
|
+
className,
|
|
34
|
+
asChild = false,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
88
37
|
const Comp = asChild ? Slot.Root : "div";
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
$[5] = t2;
|
|
94
|
-
} else {
|
|
95
|
-
t2 = $[5];
|
|
96
|
-
}
|
|
97
|
-
let t3;
|
|
98
|
-
if ($[6] !== Comp || $[7] !== props || $[8] !== t2) {
|
|
99
|
-
t3 = /*#__PURE__*/_jsx(Comp, {
|
|
100
|
-
className: t2,
|
|
101
|
-
...props
|
|
102
|
-
});
|
|
103
|
-
$[6] = Comp;
|
|
104
|
-
$[7] = props;
|
|
105
|
-
$[8] = t2;
|
|
106
|
-
$[9] = t3;
|
|
107
|
-
} else {
|
|
108
|
-
t3 = $[9];
|
|
109
|
-
}
|
|
110
|
-
return t3;
|
|
38
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
39
|
+
className: cn("flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
111
42
|
}
|
|
112
|
-
function ButtonGroupSeparator(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
$[0] = t0;
|
|
124
|
-
$[1] = className;
|
|
125
|
-
$[2] = props;
|
|
126
|
-
$[3] = t1;
|
|
127
|
-
} else {
|
|
128
|
-
className = $[1];
|
|
129
|
-
props = $[2];
|
|
130
|
-
t1 = $[3];
|
|
131
|
-
}
|
|
132
|
-
const orientation = t1 === undefined ? "vertical" : t1;
|
|
133
|
-
let t2;
|
|
134
|
-
if ($[4] !== className) {
|
|
135
|
-
t2 = cn("relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto", className);
|
|
136
|
-
$[4] = className;
|
|
137
|
-
$[5] = t2;
|
|
138
|
-
} else {
|
|
139
|
-
t2 = $[5];
|
|
140
|
-
}
|
|
141
|
-
let t3;
|
|
142
|
-
if ($[6] !== orientation || $[7] !== props || $[8] !== t2) {
|
|
143
|
-
t3 = /*#__PURE__*/_jsx(Separator, {
|
|
144
|
-
"data-slot": "button-group-separator",
|
|
145
|
-
orientation: orientation,
|
|
146
|
-
className: t2,
|
|
147
|
-
...props
|
|
148
|
-
});
|
|
149
|
-
$[6] = orientation;
|
|
150
|
-
$[7] = props;
|
|
151
|
-
$[8] = t2;
|
|
152
|
-
$[9] = t3;
|
|
153
|
-
} else {
|
|
154
|
-
t3 = $[9];
|
|
155
|
-
}
|
|
156
|
-
return t3;
|
|
43
|
+
function ButtonGroupSeparator({
|
|
44
|
+
className,
|
|
45
|
+
orientation = "vertical",
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
return /*#__PURE__*/_jsx(Separator, {
|
|
49
|
+
"data-slot": "button-group-separator",
|
|
50
|
+
orientation: orientation,
|
|
51
|
+
className: cn("relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto", className),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
157
54
|
}
|
|
158
55
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
package/dist/action/button.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
@@ -30,70 +29,24 @@ const buttonVariants = cva("inline-flex shrink-0 items-center justify-center gap
|
|
|
30
29
|
size: "default"
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
|
-
function Button(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if ($[0] !== t0) {
|
|
41
|
-
({
|
|
42
|
-
className,
|
|
43
|
-
variant: t1,
|
|
44
|
-
size: t2,
|
|
45
|
-
asChild: t3,
|
|
46
|
-
...props
|
|
47
|
-
} = t0);
|
|
48
|
-
$[0] = t0;
|
|
49
|
-
$[1] = className;
|
|
50
|
-
$[2] = props;
|
|
51
|
-
$[3] = t1;
|
|
52
|
-
$[4] = t2;
|
|
53
|
-
$[5] = t3;
|
|
54
|
-
} else {
|
|
55
|
-
className = $[1];
|
|
56
|
-
props = $[2];
|
|
57
|
-
t1 = $[3];
|
|
58
|
-
t2 = $[4];
|
|
59
|
-
t3 = $[5];
|
|
60
|
-
}
|
|
61
|
-
const variant = t1 === undefined ? "default" : t1;
|
|
62
|
-
const size = t2 === undefined ? "default" : t2;
|
|
63
|
-
const asChild = t3 === undefined ? false : t3;
|
|
32
|
+
function Button({
|
|
33
|
+
className,
|
|
34
|
+
variant = "default",
|
|
35
|
+
size = "default",
|
|
36
|
+
asChild = false,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
64
39
|
const Comp = asChild ? Slot.Root : "button";
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
40
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
41
|
+
"data-slot": "button",
|
|
42
|
+
"data-variant": variant,
|
|
43
|
+
"data-size": size,
|
|
44
|
+
className: cn(buttonVariants({
|
|
68
45
|
variant,
|
|
69
46
|
size,
|
|
70
47
|
className
|
|
71
|
-
}))
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
$[8] = variant;
|
|
75
|
-
$[9] = t4;
|
|
76
|
-
} else {
|
|
77
|
-
t4 = $[9];
|
|
78
|
-
}
|
|
79
|
-
let t5;
|
|
80
|
-
if ($[10] !== Comp || $[11] !== props || $[12] !== size || $[13] !== t4 || $[14] !== variant) {
|
|
81
|
-
t5 = /*#__PURE__*/_jsx(Comp, {
|
|
82
|
-
"data-slot": "button",
|
|
83
|
-
"data-variant": variant,
|
|
84
|
-
"data-size": size,
|
|
85
|
-
className: t4,
|
|
86
|
-
...props
|
|
87
|
-
});
|
|
88
|
-
$[10] = Comp;
|
|
89
|
-
$[11] = props;
|
|
90
|
-
$[12] = size;
|
|
91
|
-
$[13] = t4;
|
|
92
|
-
$[14] = variant;
|
|
93
|
-
$[15] = t5;
|
|
94
|
-
} else {
|
|
95
|
-
t5 = $[15];
|
|
96
|
-
}
|
|
97
|
-
return t5;
|
|
48
|
+
})),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
98
51
|
}
|
|
99
52
|
export { Button, buttonVariants };
|
package/dist/display/badge.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
@@ -22,60 +21,20 @@ const badgeVariants = cva("inline-flex w-fit shrink-0 items-center justify-cente
|
|
|
22
21
|
variant: "default"
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
|
-
function Badge(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if ($[0] !== t0) {
|
|
32
|
-
({
|
|
33
|
-
className,
|
|
34
|
-
variant: t1,
|
|
35
|
-
asChild: t2,
|
|
36
|
-
...props
|
|
37
|
-
} = t0);
|
|
38
|
-
$[0] = t0;
|
|
39
|
-
$[1] = className;
|
|
40
|
-
$[2] = props;
|
|
41
|
-
$[3] = t1;
|
|
42
|
-
$[4] = t2;
|
|
43
|
-
} else {
|
|
44
|
-
className = $[1];
|
|
45
|
-
props = $[2];
|
|
46
|
-
t1 = $[3];
|
|
47
|
-
t2 = $[4];
|
|
48
|
-
}
|
|
49
|
-
const variant = t1 === undefined ? "default" : t1;
|
|
50
|
-
const asChild = t2 === undefined ? false : t2;
|
|
24
|
+
function Badge({
|
|
25
|
+
className,
|
|
26
|
+
variant = "default",
|
|
27
|
+
asChild = false,
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
51
30
|
const Comp = asChild ? Slot.Root : "span";
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
31
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
32
|
+
"data-slot": "badge",
|
|
33
|
+
"data-variant": variant,
|
|
34
|
+
className: cn(badgeVariants({
|
|
55
35
|
variant
|
|
56
|
-
}), className)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
$[7] = t3;
|
|
60
|
-
} else {
|
|
61
|
-
t3 = $[7];
|
|
62
|
-
}
|
|
63
|
-
let t4;
|
|
64
|
-
if ($[8] !== Comp || $[9] !== props || $[10] !== t3 || $[11] !== variant) {
|
|
65
|
-
t4 = /*#__PURE__*/_jsx(Comp, {
|
|
66
|
-
"data-slot": "badge",
|
|
67
|
-
"data-variant": variant,
|
|
68
|
-
className: t3,
|
|
69
|
-
...props
|
|
70
|
-
});
|
|
71
|
-
$[8] = Comp;
|
|
72
|
-
$[9] = props;
|
|
73
|
-
$[10] = t3;
|
|
74
|
-
$[11] = variant;
|
|
75
|
-
$[12] = t4;
|
|
76
|
-
} else {
|
|
77
|
-
t4 = $[12];
|
|
78
|
-
}
|
|
79
|
-
return t4;
|
|
36
|
+
}), className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
80
39
|
}
|
|
81
40
|
export { Badge, badgeVariants };
|
|
@@ -1,230 +1,64 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import * as Slot from "radix-ui/slot";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
import { Button } from "../../../action/button.js";
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
function AttachmentTitle(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
6
|
+
function AttachmentTitle({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/_jsx("span", {
|
|
11
|
+
"data-slot": "attachment-title",
|
|
12
|
+
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),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
45
15
|
}
|
|
46
|
-
function AttachmentDescription(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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;
|
|
16
|
+
function AttachmentDescription({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /*#__PURE__*/_jsx("span", {
|
|
21
|
+
"data-slot": "attachment-description",
|
|
22
|
+
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),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
84
25
|
}
|
|
85
|
-
function AttachmentActions(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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;
|
|
26
|
+
function AttachmentActions({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
return /*#__PURE__*/_jsx("div", {
|
|
31
|
+
"data-slot": "attachment-actions",
|
|
32
|
+
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),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
123
35
|
}
|
|
124
|
-
function AttachmentAction(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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;
|
|
36
|
+
function AttachmentAction({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size = "icon-xs",
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
43
|
+
"data-slot": "attachment-action",
|
|
44
|
+
variant: variant ?? "ghost",
|
|
45
|
+
size: size,
|
|
46
|
+
className: cn(className),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
176
49
|
}
|
|
177
|
-
function AttachmentTrigger(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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;
|
|
50
|
+
function AttachmentTrigger({
|
|
51
|
+
className,
|
|
52
|
+
asChild = false,
|
|
53
|
+
type,
|
|
54
|
+
...props
|
|
55
|
+
}) {
|
|
202
56
|
const Comp = asChild ? Slot.Root : "button";
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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;
|
|
57
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
58
|
+
"data-slot": "attachment-trigger",
|
|
59
|
+
type: asChild ? undefined : type ?? "button",
|
|
60
|
+
className: cn("absolute inset-0 z-10 outline-none", className),
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
229
63
|
}
|
|
230
64
|
export { AttachmentAction, AttachmentActions, AttachmentDescription, AttachmentTitle, AttachmentTrigger };
|