@epicbagel/saas-kit 1.2.3 → 1.4.0
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/README.md +115 -0
- package/dist/chunk-2TKLS73N.js +121 -0
- package/dist/chunk-4UUTKR3V.cjs +53 -0
- package/dist/chunk-BTHYGHOH.cjs +143 -0
- package/dist/chunk-D5EHW3O2.cjs +52 -0
- package/dist/chunk-F3DAFAMD.js +271 -0
- package/dist/chunk-GRY77463.cjs +121 -0
- package/dist/chunk-HAP6USTP.cjs +46 -0
- package/dist/chunk-HAQOT2CD.js +46 -0
- package/dist/chunk-HHV4G77I.js +55 -0
- package/dist/{chunk-KYQPX754.js → chunk-HRLP4BHJ.js} +7 -7
- package/dist/{chunk-N6V3DDKU.cjs → chunk-IH3COANJ.cjs} +7 -7
- package/dist/chunk-JTI4244T.js +143 -0
- package/dist/chunk-QEJ2STIV.js +53 -0
- package/dist/chunk-TWCJMFST.js +260 -0
- package/dist/chunk-U3YFP6ZV.cjs +273 -0
- package/dist/chunk-VLXPLKFR.cjs +55 -0
- package/dist/chunk-X3PRMR5G.js +52 -0
- package/dist/chunk-ZJFYOXSM.cjs +260 -0
- package/dist/lib/neutral-theme.cjs +39 -236
- package/dist/lib/neutral-theme.d.cts +44 -2
- package/dist/lib/neutral-theme.d.ts +44 -2
- package/dist/lib/neutral-theme.js +23 -219
- package/dist/primitives/activity-feed.cjs +3 -3
- package/dist/primitives/activity-feed.js +4 -4
- package/dist/primitives/board-view.cjs +6 -6
- package/dist/primitives/board-view.js +5 -5
- package/dist/primitives/chat.cjs +14 -14
- package/dist/primitives/chat.js +12 -12
- package/dist/primitives/code-block.cjs +5 -50
- package/dist/primitives/code-block.js +5 -50
- package/dist/primitives/connection.cjs +6 -6
- package/dist/primitives/connection.js +7 -7
- package/dist/primitives/copy-button.cjs +3 -3
- package/dist/primitives/copy-button.js +2 -2
- package/dist/primitives/document-preview.cjs +54 -0
- package/dist/primitives/document-preview.d.cts +30 -0
- package/dist/primitives/document-preview.d.ts +30 -0
- package/dist/primitives/document-preview.js +54 -0
- package/dist/primitives/editable-list.cjs +1 -1
- package/dist/primitives/editable-list.js +1 -1
- package/dist/primitives/field.cjs +12 -239
- package/dist/primitives/field.js +16 -243
- package/dist/primitives/file-dropzone.cjs +3 -3
- package/dist/primitives/file-dropzone.js +2 -2
- package/dist/primitives/file-preview-internals.cjs +20 -0
- package/dist/primitives/file-preview-internals.d.cts +44 -0
- package/dist/primitives/file-preview-internals.d.ts +44 -0
- package/dist/primitives/file-preview-internals.js +20 -0
- package/dist/primitives/file-preview.cjs +327 -0
- package/dist/primitives/file-preview.d.cts +92 -0
- package/dist/primitives/file-preview.d.ts +92 -0
- package/dist/primitives/file-preview.js +327 -0
- package/dist/primitives/filter-bar.cjs +4 -4
- package/dist/primitives/filter-bar.js +3 -3
- package/dist/primitives/image.cjs +4 -48
- package/dist/primitives/image.js +3 -47
- package/dist/primitives/radio-group.cjs +4 -39
- package/dist/primitives/radio-group.js +4 -39
- package/dist/primitives/resource-list.cjs +6 -6
- package/dist/primitives/resource-list.js +5 -5
- package/dist/primitives/responsive-dialog.cjs +26 -142
- package/dist/primitives/responsive-dialog.js +13 -129
- package/dist/primitives/section.cjs +2 -2
- package/dist/primitives/section.js +3 -3
- package/dist/primitives/switch-field.cjs +2 -2
- package/dist/primitives/switch-field.js +3 -3
- package/dist/primitives/theme-selector.cjs +188 -0
- package/dist/primitives/theme-selector.d.cts +78 -0
- package/dist/primitives/theme-selector.d.ts +78 -0
- package/dist/primitives/theme-selector.js +188 -0
- package/dist/primitives/toggle-group.cjs +5 -45
- package/dist/primitives/toggle-group.js +5 -45
- package/package.json +31 -1
- package/dist/{chunk-6OTAGP2I.cjs → chunk-KADJ56AH.cjs} +2 -2
- package/dist/{chunk-EHKMVJ6O.js → chunk-M7FYGAGO.js} +3 -3
- package/dist/{chunk-PVZ4JGDU.js → chunk-MLHNYRFX.js} +6 -6
- package/dist/{chunk-PWOQMTPX.js → chunk-NW3OWKBN.js} +3 -3
- package/dist/{chunk-CYH63OCL.cjs → chunk-SGW4FWBX.cjs} +6 -6
- package/dist/{chunk-ENJNZ323.cjs → chunk-VKIGJNJR.cjs} +2 -2
|
@@ -1,255 +1,22 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var _chunkNQK5ZWC7cjs = require('../chunk-NQK5ZWC7.cjs');
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
var _chunkIQZLUT2Ycjs = require('../chunk-IQZLUT2Y.cjs');
|
|
9
7
|
|
|
10
8
|
|
|
11
|
-
var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
|
|
12
9
|
|
|
13
|
-
// src/primitives/field.tsx
|
|
14
|
-
var _react = require('react');
|
|
15
|
-
var _classvarianceauthority = require('class-variance-authority');
|
|
16
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
17
|
-
function FieldSet({ className, ...props }) {
|
|
18
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
19
|
-
"fieldset",
|
|
20
|
-
{
|
|
21
|
-
"data-slot": "field-set",
|
|
22
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
23
|
-
"flex flex-col gap-6",
|
|
24
|
-
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
25
|
-
className
|
|
26
|
-
),
|
|
27
|
-
...props
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function FieldLegend({
|
|
32
|
-
className,
|
|
33
|
-
variant = "legend",
|
|
34
|
-
...props
|
|
35
|
-
}) {
|
|
36
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
37
|
-
"legend",
|
|
38
|
-
{
|
|
39
|
-
"data-slot": "field-legend",
|
|
40
|
-
"data-variant": variant,
|
|
41
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
42
|
-
"mb-3 font-medium",
|
|
43
|
-
"data-[variant=legend]:text-base",
|
|
44
|
-
"data-[variant=label]:text-sm",
|
|
45
|
-
className
|
|
46
|
-
),
|
|
47
|
-
...props
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
function FieldGroup({ className, ...props }) {
|
|
52
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
"data-slot": "field-group",
|
|
56
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
57
|
-
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
58
|
-
className
|
|
59
|
-
),
|
|
60
|
-
...props
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
var fieldVariants = _classvarianceauthority.cva.call(void 0,
|
|
65
|
-
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
66
|
-
{
|
|
67
|
-
variants: {
|
|
68
|
-
orientation: {
|
|
69
|
-
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
70
|
-
horizontal: [
|
|
71
|
-
"flex-row items-center",
|
|
72
|
-
"[&>[data-slot=field-label]]:flex-auto",
|
|
73
|
-
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
74
|
-
],
|
|
75
|
-
responsive: [
|
|
76
|
-
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
77
|
-
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
78
|
-
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
defaultVariants: { orientation: "vertical" }
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
function Field({
|
|
86
|
-
className,
|
|
87
|
-
orientation = "vertical",
|
|
88
|
-
...props
|
|
89
|
-
}) {
|
|
90
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
role: "group",
|
|
94
|
-
"data-slot": "field",
|
|
95
|
-
"data-orientation": orientation,
|
|
96
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0, fieldVariants({ orientation }), className),
|
|
97
|
-
...props
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
function FieldContent({ className, ...props }) {
|
|
102
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
103
|
-
"div",
|
|
104
|
-
{
|
|
105
|
-
"data-slot": "field-content",
|
|
106
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
107
|
-
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
108
|
-
className
|
|
109
|
-
),
|
|
110
|
-
...props
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
function FieldLabel({ className, ...props }) {
|
|
115
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
116
|
-
_chunkIQZLUT2Ycjs.Label,
|
|
117
|
-
{
|
|
118
|
-
"data-slot": "field-label",
|
|
119
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
120
|
-
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
121
|
-
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
122
|
-
"has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",
|
|
123
|
-
className
|
|
124
|
-
),
|
|
125
|
-
...props
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
function FieldTitle({ className, ...props }) {
|
|
130
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
131
|
-
"div",
|
|
132
|
-
{
|
|
133
|
-
"data-slot": "field-label",
|
|
134
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
135
|
-
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
136
|
-
className
|
|
137
|
-
),
|
|
138
|
-
...props
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
function FieldDescription({ className, ...props }) {
|
|
143
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
144
|
-
"p",
|
|
145
|
-
{
|
|
146
|
-
"data-slot": "field-description",
|
|
147
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
148
|
-
"text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
149
|
-
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
150
|
-
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
151
|
-
className
|
|
152
|
-
),
|
|
153
|
-
...props
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
function FieldSeparator({
|
|
158
|
-
children,
|
|
159
|
-
className,
|
|
160
|
-
...props
|
|
161
|
-
}) {
|
|
162
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
"data-slot": "field-separator",
|
|
166
|
-
"data-content": !!children,
|
|
167
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
168
|
-
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
169
|
-
className
|
|
170
|
-
),
|
|
171
|
-
...props,
|
|
172
|
-
children: [
|
|
173
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNQK5ZWC7cjs.Separator, { className: "absolute inset-0 top-1/2" }),
|
|
174
|
-
children && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
175
|
-
"span",
|
|
176
|
-
{
|
|
177
|
-
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
178
|
-
"data-slot": "field-separator-content",
|
|
179
|
-
children
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
function FieldError({
|
|
187
|
-
className,
|
|
188
|
-
children,
|
|
189
|
-
errors,
|
|
190
|
-
...props
|
|
191
|
-
}) {
|
|
192
|
-
const content = _react.useMemo.call(void 0, () => {
|
|
193
|
-
if (children) return children;
|
|
194
|
-
if (!_optionalChain([errors, 'optionalAccess', _ => _.length])) return null;
|
|
195
|
-
const uniqueErrors = [
|
|
196
|
-
...new Map(errors.map((error) => [_optionalChain([error, 'optionalAccess', _2 => _2.message]), error])).values()
|
|
197
|
-
];
|
|
198
|
-
if (uniqueErrors.length === 1) return _optionalChain([uniqueErrors, 'access', _3 => _3[0], 'optionalAccess', _4 => _4.message]);
|
|
199
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
200
|
-
(error, index) => _optionalChain([error, 'optionalAccess', _5 => _5.message]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: error.message }, index)
|
|
201
|
-
) });
|
|
202
|
-
}, [children, errors]);
|
|
203
|
-
if (!content) return null;
|
|
204
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
205
|
-
"div",
|
|
206
|
-
{
|
|
207
|
-
role: "alert",
|
|
208
|
-
"data-slot": "field-error",
|
|
209
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0, "text-sm font-normal text-destructive", className),
|
|
210
|
-
...props,
|
|
211
|
-
children: content
|
|
212
|
-
}
|
|
213
|
-
);
|
|
214
|
-
}
|
|
215
|
-
function FormField({
|
|
216
|
-
label,
|
|
217
|
-
htmlFor,
|
|
218
|
-
actions,
|
|
219
|
-
description,
|
|
220
|
-
children,
|
|
221
|
-
className,
|
|
222
|
-
...props
|
|
223
|
-
}) {
|
|
224
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "space-y-1.5", className), ...props, children: [
|
|
225
|
-
(label || actions) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-2", children: [
|
|
226
|
-
typeof label === "string" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIQZLUT2Ycjs.Label, { htmlFor, children: label }) : label,
|
|
227
|
-
actions && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-1", children: actions })
|
|
228
|
-
] }),
|
|
229
|
-
children,
|
|
230
|
-
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm leading-relaxed text-muted-foreground", children: description })
|
|
231
|
-
] });
|
|
232
|
-
}
|
|
233
|
-
var columnStyles = {
|
|
234
|
-
1: "grid-cols-1",
|
|
235
|
-
2: "grid-cols-1 sm:grid-cols-2",
|
|
236
|
-
3: "grid-cols-1 sm:grid-cols-3"
|
|
237
|
-
};
|
|
238
|
-
function FieldGrid({ columns = 2, gap = "default", className, ...props }) {
|
|
239
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
240
|
-
"div",
|
|
241
|
-
{
|
|
242
|
-
className: _chunkKWLSBTB2cjs.cn.call(void 0, "grid", gap === "default" ? "gap-4" : "gap-8", columnStyles[columns], className),
|
|
243
|
-
...props
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
10
|
|
|
248
11
|
|
|
249
12
|
|
|
250
13
|
|
|
251
14
|
|
|
252
15
|
|
|
16
|
+
var _chunkZJFYOXSMcjs = require('../chunk-ZJFYOXSM.cjs');
|
|
17
|
+
require('../chunk-NQK5ZWC7.cjs');
|
|
18
|
+
require('../chunk-IQZLUT2Y.cjs');
|
|
19
|
+
require('../chunk-KWLSBTB2.cjs');
|
|
253
20
|
|
|
254
21
|
|
|
255
22
|
|
|
@@ -257,4 +24,10 @@ function FieldGrid({ columns = 2, gap = "default", className, ...props }) {
|
|
|
257
24
|
|
|
258
25
|
|
|
259
26
|
|
|
260
|
-
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
exports.Field = _chunkZJFYOXSMcjs.Field; exports.FieldContent = _chunkZJFYOXSMcjs.FieldContent; exports.FieldDescription = _chunkZJFYOXSMcjs.FieldDescription; exports.FieldError = _chunkZJFYOXSMcjs.FieldError; exports.FieldGrid = _chunkZJFYOXSMcjs.FieldGrid; exports.FieldGroup = _chunkZJFYOXSMcjs.FieldGroup; exports.FieldLabel = _chunkZJFYOXSMcjs.FieldLabel; exports.FieldLegend = _chunkZJFYOXSMcjs.FieldLegend; exports.FieldSeparator = _chunkZJFYOXSMcjs.FieldSeparator; exports.FieldSet = _chunkZJFYOXSMcjs.FieldSet; exports.FieldTitle = _chunkZJFYOXSMcjs.FieldTitle; exports.FormField = _chunkZJFYOXSMcjs.FormField;
|
package/dist/primitives/field.js
CHANGED
|
@@ -1,249 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
"data-slot": "field-set",
|
|
22
|
-
className: cn(
|
|
23
|
-
"flex flex-col gap-6",
|
|
24
|
-
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
25
|
-
className
|
|
26
|
-
),
|
|
27
|
-
...props
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function FieldLegend({
|
|
32
|
-
className,
|
|
33
|
-
variant = "legend",
|
|
34
|
-
...props
|
|
35
|
-
}) {
|
|
36
|
-
return /* @__PURE__ */ jsx(
|
|
37
|
-
"legend",
|
|
38
|
-
{
|
|
39
|
-
"data-slot": "field-legend",
|
|
40
|
-
"data-variant": variant,
|
|
41
|
-
className: cn(
|
|
42
|
-
"mb-3 font-medium",
|
|
43
|
-
"data-[variant=legend]:text-base",
|
|
44
|
-
"data-[variant=label]:text-sm",
|
|
45
|
-
className
|
|
46
|
-
),
|
|
47
|
-
...props
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
function FieldGroup({ className, ...props }) {
|
|
52
|
-
return /* @__PURE__ */ jsx(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
"data-slot": "field-group",
|
|
56
|
-
className: cn(
|
|
57
|
-
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
58
|
-
className
|
|
59
|
-
),
|
|
60
|
-
...props
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
var fieldVariants = cva(
|
|
65
|
-
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
66
|
-
{
|
|
67
|
-
variants: {
|
|
68
|
-
orientation: {
|
|
69
|
-
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
70
|
-
horizontal: [
|
|
71
|
-
"flex-row items-center",
|
|
72
|
-
"[&>[data-slot=field-label]]:flex-auto",
|
|
73
|
-
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
74
|
-
],
|
|
75
|
-
responsive: [
|
|
76
|
-
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
77
|
-
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
78
|
-
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
defaultVariants: { orientation: "vertical" }
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
function Field({
|
|
86
|
-
className,
|
|
87
|
-
orientation = "vertical",
|
|
88
|
-
...props
|
|
89
|
-
}) {
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
role: "group",
|
|
94
|
-
"data-slot": "field",
|
|
95
|
-
"data-orientation": orientation,
|
|
96
|
-
className: cn(fieldVariants({ orientation }), className),
|
|
97
|
-
...props
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
function FieldContent({ className, ...props }) {
|
|
102
|
-
return /* @__PURE__ */ jsx(
|
|
103
|
-
"div",
|
|
104
|
-
{
|
|
105
|
-
"data-slot": "field-content",
|
|
106
|
-
className: cn(
|
|
107
|
-
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
108
|
-
className
|
|
109
|
-
),
|
|
110
|
-
...props
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
function FieldLabel({ className, ...props }) {
|
|
115
|
-
return /* @__PURE__ */ jsx(
|
|
116
|
-
Label,
|
|
117
|
-
{
|
|
118
|
-
"data-slot": "field-label",
|
|
119
|
-
className: cn(
|
|
120
|
-
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
121
|
-
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
122
|
-
"has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",
|
|
123
|
-
className
|
|
124
|
-
),
|
|
125
|
-
...props
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
function FieldTitle({ className, ...props }) {
|
|
130
|
-
return /* @__PURE__ */ jsx(
|
|
131
|
-
"div",
|
|
132
|
-
{
|
|
133
|
-
"data-slot": "field-label",
|
|
134
|
-
className: cn(
|
|
135
|
-
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
136
|
-
className
|
|
137
|
-
),
|
|
138
|
-
...props
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
function FieldDescription({ className, ...props }) {
|
|
143
|
-
return /* @__PURE__ */ jsx(
|
|
144
|
-
"p",
|
|
145
|
-
{
|
|
146
|
-
"data-slot": "field-description",
|
|
147
|
-
className: cn(
|
|
148
|
-
"text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
149
|
-
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
150
|
-
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
151
|
-
className
|
|
152
|
-
),
|
|
153
|
-
...props
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
function FieldSeparator({
|
|
158
|
-
children,
|
|
159
|
-
className,
|
|
160
|
-
...props
|
|
161
|
-
}) {
|
|
162
|
-
return /* @__PURE__ */ jsxs(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
"data-slot": "field-separator",
|
|
166
|
-
"data-content": !!children,
|
|
167
|
-
className: cn(
|
|
168
|
-
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
169
|
-
className
|
|
170
|
-
),
|
|
171
|
-
...props,
|
|
172
|
-
children: [
|
|
173
|
-
/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
174
|
-
children && /* @__PURE__ */ jsx(
|
|
175
|
-
"span",
|
|
176
|
-
{
|
|
177
|
-
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
178
|
-
"data-slot": "field-separator-content",
|
|
179
|
-
children
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
function FieldError({
|
|
187
|
-
className,
|
|
188
|
-
children,
|
|
189
|
-
errors,
|
|
190
|
-
...props
|
|
191
|
-
}) {
|
|
192
|
-
const content = useMemo(() => {
|
|
193
|
-
if (children) return children;
|
|
194
|
-
if (!errors?.length) return null;
|
|
195
|
-
const uniqueErrors = [
|
|
196
|
-
...new Map(errors.map((error) => [error?.message, error])).values()
|
|
197
|
-
];
|
|
198
|
-
if (uniqueErrors.length === 1) return uniqueErrors[0]?.message;
|
|
199
|
-
return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
200
|
-
(error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
|
|
201
|
-
) });
|
|
202
|
-
}, [children, errors]);
|
|
203
|
-
if (!content) return null;
|
|
204
|
-
return /* @__PURE__ */ jsx(
|
|
205
|
-
"div",
|
|
206
|
-
{
|
|
207
|
-
role: "alert",
|
|
208
|
-
"data-slot": "field-error",
|
|
209
|
-
className: cn("text-sm font-normal text-destructive", className),
|
|
210
|
-
...props,
|
|
211
|
-
children: content
|
|
212
|
-
}
|
|
213
|
-
);
|
|
214
|
-
}
|
|
215
|
-
function FormField({
|
|
216
|
-
label,
|
|
217
|
-
htmlFor,
|
|
218
|
-
actions,
|
|
219
|
-
description,
|
|
220
|
-
children,
|
|
221
|
-
className,
|
|
222
|
-
...props
|
|
223
|
-
}) {
|
|
224
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-1.5", className), ...props, children: [
|
|
225
|
-
(label || actions) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
226
|
-
typeof label === "string" ? /* @__PURE__ */ jsx(Label, { htmlFor, children: label }) : label,
|
|
227
|
-
actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: actions })
|
|
228
|
-
] }),
|
|
229
|
-
children,
|
|
230
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-sm leading-relaxed text-muted-foreground", children: description })
|
|
231
|
-
] });
|
|
232
|
-
}
|
|
233
|
-
var columnStyles = {
|
|
234
|
-
1: "grid-cols-1",
|
|
235
|
-
2: "grid-cols-1 sm:grid-cols-2",
|
|
236
|
-
3: "grid-cols-1 sm:grid-cols-3"
|
|
237
|
-
};
|
|
238
|
-
function FieldGrid({ columns = 2, gap = "default", className, ...props }) {
|
|
239
|
-
return /* @__PURE__ */ jsx(
|
|
240
|
-
"div",
|
|
241
|
-
{
|
|
242
|
-
className: cn("grid", gap === "default" ? "gap-4" : "gap-8", columnStyles[columns], className),
|
|
243
|
-
...props
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
}
|
|
4
|
+
Field,
|
|
5
|
+
FieldContent,
|
|
6
|
+
FieldDescription,
|
|
7
|
+
FieldError,
|
|
8
|
+
FieldGrid,
|
|
9
|
+
FieldGroup,
|
|
10
|
+
FieldLabel,
|
|
11
|
+
FieldLegend,
|
|
12
|
+
FieldSeparator,
|
|
13
|
+
FieldSet,
|
|
14
|
+
FieldTitle,
|
|
15
|
+
FormField
|
|
16
|
+
} from "../chunk-TWCJMFST.js";
|
|
17
|
+
import "../chunk-HYTILYE5.js";
|
|
18
|
+
import "../chunk-E2TQMDO7.js";
|
|
19
|
+
import "../chunk-G6SRSWXB.js";
|
|
247
20
|
export {
|
|
248
21
|
Field,
|
|
249
22
|
FieldContent,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('../chunk-U2NES7VR.cjs');
|
|
8
|
+
var _chunkKADJ56AHcjs = require('../chunk-KADJ56AH.cjs');
|
|
10
9
|
require('../chunk-373W6VAD.cjs');
|
|
10
|
+
require('../chunk-U2NES7VR.cjs');
|
|
11
11
|
require('../chunk-L4DH72UF.cjs');
|
|
12
12
|
require('../chunk-KWLSBTB2.cjs');
|
|
13
13
|
|
|
@@ -15,4 +15,4 @@ require('../chunk-KWLSBTB2.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.FileDropArea =
|
|
18
|
+
exports.FileDropArea = _chunkKADJ56AHcjs.FileDropArea; exports.FileDropzone = _chunkKADJ56AHcjs.FileDropzone; exports.installFileDropGuard = _chunkKADJ56AHcjs.installFileDropGuard; exports.useFileDropGuard = _chunkKADJ56AHcjs.useFileDropGuard;
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
FileDropzone,
|
|
6
6
|
installFileDropGuard,
|
|
7
7
|
useFileDropGuard
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-ZRLUUZHK.js";
|
|
8
|
+
} from "../chunk-M7FYGAGO.js";
|
|
10
9
|
import "../chunk-EIY5LLSP.js";
|
|
10
|
+
import "../chunk-ZRLUUZHK.js";
|
|
11
11
|
import "../chunk-HQRWRRZJ.js";
|
|
12
12
|
import "../chunk-G6SRSWXB.js";
|
|
13
13
|
export {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkGRY77463cjs = require('../chunk-GRY77463.cjs');
|
|
9
|
+
require('../chunk-BTHYGHOH.cjs');
|
|
10
|
+
require('../chunk-2BHI5ZWJ.cjs');
|
|
11
|
+
require('../chunk-WDXEJDMO.cjs');
|
|
12
|
+
require('../chunk-T2ZFSPE4.cjs');
|
|
13
|
+
require('../chunk-L4DH72UF.cjs');
|
|
14
|
+
require('../chunk-KWLSBTB2.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.PreviewDialog = _chunkGRY77463cjs.PreviewDialog; exports.PreviewLoading = _chunkGRY77463cjs.PreviewLoading; exports.PreviewNotice = _chunkGRY77463cjs.PreviewNotice; exports.PreviewStage = _chunkGRY77463cjs.PreviewStage;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
interface PreviewDialogProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
onOpenChange: (open: boolean) => void;
|
|
8
|
+
title: string;
|
|
9
|
+
onDownload?: () => void;
|
|
10
|
+
downloading: boolean;
|
|
11
|
+
downloadLabel: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The kit's large preview dialog on desktop and its near-full-height drawer
|
|
16
|
+
* on mobile, with the file's name, a download action when there is one, and
|
|
17
|
+
* a close button in the header.
|
|
18
|
+
*/
|
|
19
|
+
declare function PreviewDialog({ open, onOpenChange, title, onDownload, downloading, downloadLabel, children, }: PreviewDialogProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* The area under the header. `center` holds one thing in the middle (a
|
|
22
|
+
* frame, an image, a player, a message); `scroll` is a page of text that
|
|
23
|
+
* scrolls inside the dialog, a named region that takes focus so the keyboard
|
|
24
|
+
* can scroll it too.
|
|
25
|
+
*/
|
|
26
|
+
declare function PreviewStage({ layout, label, children, }: {
|
|
27
|
+
layout?: "center" | "scroll";
|
|
28
|
+
/** The scrolling region's accessible name. */
|
|
29
|
+
label?: string;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function PreviewLoading({ label }: {
|
|
33
|
+
label: string;
|
|
34
|
+
}): react_jsx_runtime.JSX.Element;
|
|
35
|
+
/** A message in place of the preview: why there is none, with what to do instead under it. */
|
|
36
|
+
declare function PreviewNotice({ icon, alert, message, children, }: {
|
|
37
|
+
icon: LucideIcon;
|
|
38
|
+
/** Announce it: the preview failed. */
|
|
39
|
+
alert?: boolean;
|
|
40
|
+
message: ReactNode;
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
}): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { PreviewDialog, type PreviewDialogProps, PreviewLoading, PreviewNotice, PreviewStage };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
interface PreviewDialogProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
onOpenChange: (open: boolean) => void;
|
|
8
|
+
title: string;
|
|
9
|
+
onDownload?: () => void;
|
|
10
|
+
downloading: boolean;
|
|
11
|
+
downloadLabel: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The kit's large preview dialog on desktop and its near-full-height drawer
|
|
16
|
+
* on mobile, with the file's name, a download action when there is one, and
|
|
17
|
+
* a close button in the header.
|
|
18
|
+
*/
|
|
19
|
+
declare function PreviewDialog({ open, onOpenChange, title, onDownload, downloading, downloadLabel, children, }: PreviewDialogProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* The area under the header. `center` holds one thing in the middle (a
|
|
22
|
+
* frame, an image, a player, a message); `scroll` is a page of text that
|
|
23
|
+
* scrolls inside the dialog, a named region that takes focus so the keyboard
|
|
24
|
+
* can scroll it too.
|
|
25
|
+
*/
|
|
26
|
+
declare function PreviewStage({ layout, label, children, }: {
|
|
27
|
+
layout?: "center" | "scroll";
|
|
28
|
+
/** The scrolling region's accessible name. */
|
|
29
|
+
label?: string;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function PreviewLoading({ label }: {
|
|
33
|
+
label: string;
|
|
34
|
+
}): react_jsx_runtime.JSX.Element;
|
|
35
|
+
/** A message in place of the preview: why there is none, with what to do instead under it. */
|
|
36
|
+
declare function PreviewNotice({ icon, alert, message, children, }: {
|
|
37
|
+
icon: LucideIcon;
|
|
38
|
+
/** Announce it: the preview failed. */
|
|
39
|
+
alert?: boolean;
|
|
40
|
+
message: ReactNode;
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
}): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { PreviewDialog, type PreviewDialogProps, PreviewLoading, PreviewNotice, PreviewStage };
|