@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
package/dist/display/table.js
CHANGED
|
@@ -1,320 +1,87 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
function Table(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
function Table({
|
|
4
|
+
className,
|
|
5
|
+
...props
|
|
6
|
+
}) {
|
|
7
|
+
return /*#__PURE__*/_jsx("div", {
|
|
8
|
+
"data-slot": "table-container",
|
|
9
|
+
className: "relative w-full overflow-x-auto scroll-fade-x",
|
|
10
|
+
children: /*#__PURE__*/_jsx("table", {
|
|
11
|
+
"data-slot": "table",
|
|
12
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
11
13
|
...props
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
$[1] = className;
|
|
15
|
-
$[2] = props;
|
|
16
|
-
} else {
|
|
17
|
-
className = $[1];
|
|
18
|
-
props = $[2];
|
|
19
|
-
}
|
|
20
|
-
let t1;
|
|
21
|
-
if ($[3] !== className) {
|
|
22
|
-
t1 = cn("w-full caption-bottom text-sm", className);
|
|
23
|
-
$[3] = className;
|
|
24
|
-
$[4] = t1;
|
|
25
|
-
} else {
|
|
26
|
-
t1 = $[4];
|
|
27
|
-
}
|
|
28
|
-
let t2;
|
|
29
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
30
|
-
t2 = /*#__PURE__*/_jsx("div", {
|
|
31
|
-
"data-slot": "table-container",
|
|
32
|
-
className: "relative w-full overflow-x-auto scroll-fade-x",
|
|
33
|
-
children: /*#__PURE__*/_jsx("table", {
|
|
34
|
-
"data-slot": "table",
|
|
35
|
-
className: t1,
|
|
36
|
-
...props
|
|
37
|
-
})
|
|
38
|
-
});
|
|
39
|
-
$[5] = props;
|
|
40
|
-
$[6] = t1;
|
|
41
|
-
$[7] = t2;
|
|
42
|
-
} else {
|
|
43
|
-
t2 = $[7];
|
|
44
|
-
}
|
|
45
|
-
return t2;
|
|
14
|
+
})
|
|
15
|
+
});
|
|
46
16
|
}
|
|
47
|
-
function TableHeader(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
$[0] = t0;
|
|
57
|
-
$[1] = className;
|
|
58
|
-
$[2] = props;
|
|
59
|
-
} else {
|
|
60
|
-
className = $[1];
|
|
61
|
-
props = $[2];
|
|
62
|
-
}
|
|
63
|
-
let t1;
|
|
64
|
-
if ($[3] !== className) {
|
|
65
|
-
t1 = cn("[&_tr]:border-b", className);
|
|
66
|
-
$[3] = className;
|
|
67
|
-
$[4] = t1;
|
|
68
|
-
} else {
|
|
69
|
-
t1 = $[4];
|
|
70
|
-
}
|
|
71
|
-
let t2;
|
|
72
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
73
|
-
t2 = /*#__PURE__*/_jsx("thead", {
|
|
74
|
-
"data-slot": "table-header",
|
|
75
|
-
className: t1,
|
|
76
|
-
...props
|
|
77
|
-
});
|
|
78
|
-
$[5] = props;
|
|
79
|
-
$[6] = t1;
|
|
80
|
-
$[7] = t2;
|
|
81
|
-
} else {
|
|
82
|
-
t2 = $[7];
|
|
83
|
-
}
|
|
84
|
-
return t2;
|
|
17
|
+
function TableHeader({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /*#__PURE__*/_jsx("thead", {
|
|
22
|
+
"data-slot": "table-header",
|
|
23
|
+
className: cn("[&_tr]:border-b", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
85
26
|
}
|
|
86
|
-
function TableBody(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
$[0] = t0;
|
|
96
|
-
$[1] = className;
|
|
97
|
-
$[2] = props;
|
|
98
|
-
} else {
|
|
99
|
-
className = $[1];
|
|
100
|
-
props = $[2];
|
|
101
|
-
}
|
|
102
|
-
let t1;
|
|
103
|
-
if ($[3] !== className) {
|
|
104
|
-
t1 = cn("[&_tr:last-child]:border-0", className);
|
|
105
|
-
$[3] = className;
|
|
106
|
-
$[4] = t1;
|
|
107
|
-
} else {
|
|
108
|
-
t1 = $[4];
|
|
109
|
-
}
|
|
110
|
-
let t2;
|
|
111
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
112
|
-
t2 = /*#__PURE__*/_jsx("tbody", {
|
|
113
|
-
"data-slot": "table-body",
|
|
114
|
-
className: t1,
|
|
115
|
-
...props
|
|
116
|
-
});
|
|
117
|
-
$[5] = props;
|
|
118
|
-
$[6] = t1;
|
|
119
|
-
$[7] = t2;
|
|
120
|
-
} else {
|
|
121
|
-
t2 = $[7];
|
|
122
|
-
}
|
|
123
|
-
return t2;
|
|
27
|
+
function TableBody({
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}) {
|
|
31
|
+
return /*#__PURE__*/_jsx("tbody", {
|
|
32
|
+
"data-slot": "table-body",
|
|
33
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
124
36
|
}
|
|
125
|
-
function TableFooter(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
$[0] = t0;
|
|
135
|
-
$[1] = className;
|
|
136
|
-
$[2] = props;
|
|
137
|
-
} else {
|
|
138
|
-
className = $[1];
|
|
139
|
-
props = $[2];
|
|
140
|
-
}
|
|
141
|
-
let t1;
|
|
142
|
-
if ($[3] !== className) {
|
|
143
|
-
t1 = cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className);
|
|
144
|
-
$[3] = className;
|
|
145
|
-
$[4] = t1;
|
|
146
|
-
} else {
|
|
147
|
-
t1 = $[4];
|
|
148
|
-
}
|
|
149
|
-
let t2;
|
|
150
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
151
|
-
t2 = /*#__PURE__*/_jsx("tfoot", {
|
|
152
|
-
"data-slot": "table-footer",
|
|
153
|
-
className: t1,
|
|
154
|
-
...props
|
|
155
|
-
});
|
|
156
|
-
$[5] = props;
|
|
157
|
-
$[6] = t1;
|
|
158
|
-
$[7] = t2;
|
|
159
|
-
} else {
|
|
160
|
-
t2 = $[7];
|
|
161
|
-
}
|
|
162
|
-
return t2;
|
|
37
|
+
function TableFooter({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
return /*#__PURE__*/_jsx("tfoot", {
|
|
42
|
+
"data-slot": "table-footer",
|
|
43
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
163
46
|
}
|
|
164
|
-
function TableRow(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
$[0] = t0;
|
|
174
|
-
$[1] = className;
|
|
175
|
-
$[2] = props;
|
|
176
|
-
} else {
|
|
177
|
-
className = $[1];
|
|
178
|
-
props = $[2];
|
|
179
|
-
}
|
|
180
|
-
let t1;
|
|
181
|
-
if ($[3] !== className) {
|
|
182
|
-
t1 = cn("border-b transition-colors duration-150 ease-out hover:bg-muted/40 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className);
|
|
183
|
-
$[3] = className;
|
|
184
|
-
$[4] = t1;
|
|
185
|
-
} else {
|
|
186
|
-
t1 = $[4];
|
|
187
|
-
}
|
|
188
|
-
let t2;
|
|
189
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
190
|
-
t2 = /*#__PURE__*/_jsx("tr", {
|
|
191
|
-
"data-slot": "table-row",
|
|
192
|
-
className: t1,
|
|
193
|
-
...props
|
|
194
|
-
});
|
|
195
|
-
$[5] = props;
|
|
196
|
-
$[6] = t1;
|
|
197
|
-
$[7] = t2;
|
|
198
|
-
} else {
|
|
199
|
-
t2 = $[7];
|
|
200
|
-
}
|
|
201
|
-
return t2;
|
|
47
|
+
function TableRow({
|
|
48
|
+
className,
|
|
49
|
+
...props
|
|
50
|
+
}) {
|
|
51
|
+
return /*#__PURE__*/_jsx("tr", {
|
|
52
|
+
"data-slot": "table-row",
|
|
53
|
+
className: cn("border-b transition-colors duration-150 ease-out hover:bg-muted/40 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
202
56
|
}
|
|
203
|
-
function TableHead(
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
$[0] = t0;
|
|
213
|
-
$[1] = className;
|
|
214
|
-
$[2] = props;
|
|
215
|
-
} else {
|
|
216
|
-
className = $[1];
|
|
217
|
-
props = $[2];
|
|
218
|
-
}
|
|
219
|
-
let t1;
|
|
220
|
-
if ($[3] !== className) {
|
|
221
|
-
t1 = cn("eyebrow h-9 px-3 text-left align-middle font-normal whitespace-nowrap sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className);
|
|
222
|
-
$[3] = className;
|
|
223
|
-
$[4] = t1;
|
|
224
|
-
} else {
|
|
225
|
-
t1 = $[4];
|
|
226
|
-
}
|
|
227
|
-
let t2;
|
|
228
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
229
|
-
t2 = /*#__PURE__*/_jsx("th", {
|
|
230
|
-
"data-slot": "table-head",
|
|
231
|
-
className: t1,
|
|
232
|
-
...props
|
|
233
|
-
});
|
|
234
|
-
$[5] = props;
|
|
235
|
-
$[6] = t1;
|
|
236
|
-
$[7] = t2;
|
|
237
|
-
} else {
|
|
238
|
-
t2 = $[7];
|
|
239
|
-
}
|
|
240
|
-
return t2;
|
|
57
|
+
function TableHead({
|
|
58
|
+
className,
|
|
59
|
+
...props
|
|
60
|
+
}) {
|
|
61
|
+
return /*#__PURE__*/_jsx("th", {
|
|
62
|
+
"data-slot": "table-head",
|
|
63
|
+
className: cn("eyebrow h-9 px-3 text-left align-middle font-normal whitespace-nowrap sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
241
66
|
}
|
|
242
|
-
function TableCell(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
$[0] = t0;
|
|
252
|
-
$[1] = className;
|
|
253
|
-
$[2] = props;
|
|
254
|
-
} else {
|
|
255
|
-
className = $[1];
|
|
256
|
-
props = $[2];
|
|
257
|
-
}
|
|
258
|
-
let t1;
|
|
259
|
-
if ($[3] !== className) {
|
|
260
|
-
t1 = cn("px-3 py-2.5 align-middle whitespace-nowrap tabular-nums sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className);
|
|
261
|
-
$[3] = className;
|
|
262
|
-
$[4] = t1;
|
|
263
|
-
} else {
|
|
264
|
-
t1 = $[4];
|
|
265
|
-
}
|
|
266
|
-
let t2;
|
|
267
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
268
|
-
t2 = /*#__PURE__*/_jsx("td", {
|
|
269
|
-
"data-slot": "table-cell",
|
|
270
|
-
className: t1,
|
|
271
|
-
...props
|
|
272
|
-
});
|
|
273
|
-
$[5] = props;
|
|
274
|
-
$[6] = t1;
|
|
275
|
-
$[7] = t2;
|
|
276
|
-
} else {
|
|
277
|
-
t2 = $[7];
|
|
278
|
-
}
|
|
279
|
-
return t2;
|
|
67
|
+
function TableCell({
|
|
68
|
+
className,
|
|
69
|
+
...props
|
|
70
|
+
}) {
|
|
71
|
+
return /*#__PURE__*/_jsx("td", {
|
|
72
|
+
"data-slot": "table-cell",
|
|
73
|
+
className: cn("px-3 py-2.5 align-middle whitespace-nowrap tabular-nums sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
280
76
|
}
|
|
281
|
-
function TableCaption(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
$[0] = t0;
|
|
291
|
-
$[1] = className;
|
|
292
|
-
$[2] = props;
|
|
293
|
-
} else {
|
|
294
|
-
className = $[1];
|
|
295
|
-
props = $[2];
|
|
296
|
-
}
|
|
297
|
-
let t1;
|
|
298
|
-
if ($[3] !== className) {
|
|
299
|
-
t1 = cn("mt-4 text-sm text-muted-foreground", className);
|
|
300
|
-
$[3] = className;
|
|
301
|
-
$[4] = t1;
|
|
302
|
-
} else {
|
|
303
|
-
t1 = $[4];
|
|
304
|
-
}
|
|
305
|
-
let t2;
|
|
306
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
307
|
-
t2 = /*#__PURE__*/_jsx("caption", {
|
|
308
|
-
"data-slot": "table-caption",
|
|
309
|
-
className: t1,
|
|
310
|
-
...props
|
|
311
|
-
});
|
|
312
|
-
$[5] = props;
|
|
313
|
-
$[6] = t1;
|
|
314
|
-
$[7] = t2;
|
|
315
|
-
} else {
|
|
316
|
-
t2 = $[7];
|
|
317
|
-
}
|
|
318
|
-
return t2;
|
|
77
|
+
function TableCaption({
|
|
78
|
+
className,
|
|
79
|
+
...props
|
|
80
|
+
}) {
|
|
81
|
+
return /*#__PURE__*/_jsx("caption", {
|
|
82
|
+
"data-slot": "table-caption",
|
|
83
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
319
86
|
}
|
|
320
87
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -1,123 +1,40 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
function uniqueMessages(errors) {
|
|
5
4
|
const messages = errors.map(error => error?.message).filter(message => !!message);
|
|
6
5
|
return [...new Set(messages)];
|
|
7
6
|
}
|
|
8
|
-
function FieldErrorContent(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
messages
|
|
12
|
-
} = t0;
|
|
7
|
+
function FieldErrorContent({
|
|
8
|
+
messages
|
|
9
|
+
}) {
|
|
13
10
|
if (messages.length === 1) {
|
|
14
11
|
return messages[0];
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
t1 = $[1];
|
|
23
|
-
}
|
|
24
|
-
let t2;
|
|
25
|
-
if ($[2] !== t1) {
|
|
26
|
-
t2 = /*#__PURE__*/_jsx("ul", {
|
|
27
|
-
className: "ml-4 flex list-disc flex-col gap-1",
|
|
28
|
-
children: t1
|
|
29
|
-
});
|
|
30
|
-
$[2] = t1;
|
|
31
|
-
$[3] = t2;
|
|
32
|
-
} else {
|
|
33
|
-
t2 = $[3];
|
|
34
|
-
}
|
|
35
|
-
return t2;
|
|
36
|
-
}
|
|
37
|
-
function _temp(message) {
|
|
38
|
-
return /*#__PURE__*/_jsx("li", {
|
|
39
|
-
children: message
|
|
40
|
-
}, message);
|
|
13
|
+
return /*#__PURE__*/_jsx("ul", {
|
|
14
|
+
className: "ml-4 flex list-disc flex-col gap-1",
|
|
15
|
+
children: messages.map(message => /*#__PURE__*/_jsx("li", {
|
|
16
|
+
children: message
|
|
17
|
+
}, message))
|
|
18
|
+
});
|
|
41
19
|
}
|
|
42
|
-
function FieldError(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
({
|
|
50
|
-
className,
|
|
51
|
-
children,
|
|
52
|
-
errors,
|
|
53
|
-
...props
|
|
54
|
-
} = t0);
|
|
55
|
-
$[0] = t0;
|
|
56
|
-
$[1] = children;
|
|
57
|
-
$[2] = className;
|
|
58
|
-
$[3] = errors;
|
|
59
|
-
$[4] = props;
|
|
60
|
-
} else {
|
|
61
|
-
children = $[1];
|
|
62
|
-
className = $[2];
|
|
63
|
-
errors = $[3];
|
|
64
|
-
props = $[4];
|
|
65
|
-
}
|
|
66
|
-
let t1;
|
|
67
|
-
if ($[5] !== errors) {
|
|
68
|
-
t1 = errors ?? [];
|
|
69
|
-
$[5] = errors;
|
|
70
|
-
$[6] = t1;
|
|
71
|
-
} else {
|
|
72
|
-
t1 = $[6];
|
|
73
|
-
}
|
|
74
|
-
let t2;
|
|
75
|
-
if ($[7] !== t1) {
|
|
76
|
-
t2 = uniqueMessages(t1);
|
|
77
|
-
$[7] = t1;
|
|
78
|
-
$[8] = t2;
|
|
79
|
-
} else {
|
|
80
|
-
t2 = $[8];
|
|
81
|
-
}
|
|
82
|
-
const messages = t2;
|
|
20
|
+
function FieldError({
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
errors,
|
|
24
|
+
...props
|
|
25
|
+
}) {
|
|
26
|
+
const messages = uniqueMessages(errors ?? []);
|
|
83
27
|
if (!children && messages.length === 0) {
|
|
84
28
|
return null;
|
|
85
29
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
t3 = $[10];
|
|
93
|
-
}
|
|
94
|
-
let t4;
|
|
95
|
-
if ($[11] !== children || $[12] !== messages) {
|
|
96
|
-
t4 = children ?? /*#__PURE__*/_jsx(FieldErrorContent, {
|
|
30
|
+
return /*#__PURE__*/_jsx("div", {
|
|
31
|
+
role: "alert",
|
|
32
|
+
"data-slot": "field-error",
|
|
33
|
+
className: cn("text-sm font-normal text-destructive", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: children ?? /*#__PURE__*/_jsx(FieldErrorContent, {
|
|
97
36
|
messages: messages
|
|
98
|
-
})
|
|
99
|
-
|
|
100
|
-
$[12] = messages;
|
|
101
|
-
$[13] = t4;
|
|
102
|
-
} else {
|
|
103
|
-
t4 = $[13];
|
|
104
|
-
}
|
|
105
|
-
let t5;
|
|
106
|
-
if ($[14] !== props || $[15] !== t3 || $[16] !== t4) {
|
|
107
|
-
t5 = /*#__PURE__*/_jsx("div", {
|
|
108
|
-
role: "alert",
|
|
109
|
-
"data-slot": "field-error",
|
|
110
|
-
className: t3,
|
|
111
|
-
...props,
|
|
112
|
-
children: t4
|
|
113
|
-
});
|
|
114
|
-
$[14] = props;
|
|
115
|
-
$[15] = t3;
|
|
116
|
-
$[16] = t4;
|
|
117
|
-
$[17] = t5;
|
|
118
|
-
} else {
|
|
119
|
-
t5 = $[17];
|
|
120
|
-
}
|
|
121
|
-
return t5;
|
|
37
|
+
})
|
|
38
|
+
});
|
|
122
39
|
}
|
|
123
40
|
export { FieldError };
|
|
@@ -1,74 +1,23 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import { Separator } from "../../display/separator.js";
|
|
4
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
function FieldSeparator(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
$[0] = t0;
|
|
17
|
-
$[1] = children;
|
|
18
|
-
$[2] = className;
|
|
19
|
-
$[3] = props;
|
|
20
|
-
} else {
|
|
21
|
-
children = $[1];
|
|
22
|
-
className = $[2];
|
|
23
|
-
props = $[3];
|
|
24
|
-
}
|
|
25
|
-
const t1 = !!children;
|
|
26
|
-
let t2;
|
|
27
|
-
if ($[4] !== className) {
|
|
28
|
-
t2 = cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className);
|
|
29
|
-
$[4] = className;
|
|
30
|
-
$[5] = t2;
|
|
31
|
-
} else {
|
|
32
|
-
t2 = $[5];
|
|
33
|
-
}
|
|
34
|
-
let t3;
|
|
35
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
36
|
-
t3 = /*#__PURE__*/_jsx(Separator, {
|
|
4
|
+
function FieldSeparator({
|
|
5
|
+
children,
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
10
|
+
"data-slot": "field-separator",
|
|
11
|
+
"data-content": !!children,
|
|
12
|
+
className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: [/*#__PURE__*/_jsx(Separator, {
|
|
37
15
|
className: "absolute inset-0 top-1/2"
|
|
38
|
-
})
|
|
39
|
-
$[6] = t3;
|
|
40
|
-
} else {
|
|
41
|
-
t3 = $[6];
|
|
42
|
-
}
|
|
43
|
-
let t4;
|
|
44
|
-
if ($[7] !== children) {
|
|
45
|
-
t4 = children && /*#__PURE__*/_jsx("span", {
|
|
16
|
+
}), children && /*#__PURE__*/_jsx("span", {
|
|
46
17
|
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
47
18
|
"data-slot": "field-separator-content",
|
|
48
19
|
children: children
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
$[8] = t4;
|
|
52
|
-
} else {
|
|
53
|
-
t4 = $[8];
|
|
54
|
-
}
|
|
55
|
-
let t5;
|
|
56
|
-
if ($[9] !== props || $[10] !== t1 || $[11] !== t2 || $[12] !== t4) {
|
|
57
|
-
t5 = /*#__PURE__*/_jsxs("div", {
|
|
58
|
-
"data-slot": "field-separator",
|
|
59
|
-
"data-content": t1,
|
|
60
|
-
className: t2,
|
|
61
|
-
...props,
|
|
62
|
-
children: [t3, t4]
|
|
63
|
-
});
|
|
64
|
-
$[9] = props;
|
|
65
|
-
$[10] = t1;
|
|
66
|
-
$[11] = t2;
|
|
67
|
-
$[12] = t4;
|
|
68
|
-
$[13] = t5;
|
|
69
|
-
} else {
|
|
70
|
-
t5 = $[13];
|
|
71
|
-
}
|
|
72
|
-
return t5;
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
73
22
|
}
|
|
74
23
|
export { FieldSeparator };
|