@foundrykit/primitives 2.0.9 → 2.0.10
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/chunk-3NQR7JZR.js +128 -0
- package/dist/chunk-B5YCE3UP.js +57 -0
- package/dist/chunk-F2TEA6ER.js +138 -0
- package/dist/chunk-SIQHWNPH.js +45 -0
- package/dist/components/dialog/index.cjs +182 -0
- package/dist/components/dialog/index.d.cts +38 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +25 -0
- package/dist/components/input-group/index.cjs +270 -0
- package/dist/components/input-group/index.d.cts +44 -0
- package/dist/components/input-group/index.d.ts +44 -0
- package/dist/components/input-group/index.js +153 -0
- package/dist/components/sheet/index.cjs +170 -0
- package/dist/components/sheet/index.d.cts +31 -0
- package/dist/components/sheet/index.d.ts +31 -0
- package/dist/components/sheet/index.js +21 -0
- package/dist/components/toggle/index.cjs +81 -0
- package/dist/components/toggle/index.d.cts +26 -0
- package/dist/components/toggle/index.d.ts +26 -0
- package/dist/components/toggle/index.js +9 -0
- package/dist/components/tooltip/index.cjs +95 -0
- package/dist/components/tooltip/index.d.cts +25 -0
- package/dist/components/tooltip/index.d.ts +25 -0
- package/dist/components/tooltip/index.js +13 -0
- package/dist/index.d.cts +11 -105
- package/dist/index.d.ts +11 -105
- package/dist/index.js +93 -399
- package/package.json +200 -8
- package/CHANGELOG.md +0 -230
- package/postcss.config.mjs +0 -6
- package/registry.json +0 -64
- package/src/components/accordion/config.ts +0 -28
- package/src/components/accordion/index.tsx +0 -80
- package/src/components/alert/config.ts +0 -40
- package/src/components/alert/index.tsx +0 -80
- package/src/components/alert-dialog/config.ts +0 -28
- package/src/components/alert-dialog/index.tsx +0 -188
- package/src/components/aspect-ratio/config.ts +0 -27
- package/src/components/aspect-ratio/index.tsx +0 -24
- package/src/components/avatar/config.ts +0 -46
- package/src/components/avatar/index.tsx +0 -67
- package/src/components/badge/config.ts +0 -56
- package/src/components/badge/index.tsx +0 -56
- package/src/components/breadcrumb/config.ts +0 -121
- package/src/components/breadcrumb/index.tsx +0 -127
- package/src/components/button/config.ts +0 -97
- package/src/components/button/index.tsx +0 -86
- package/src/components/button-group/config.ts +0 -39
- package/src/components/button-group/index.tsx +0 -99
- package/src/components/card/config.ts +0 -89
- package/src/components/card/index.tsx +0 -90
- package/src/components/checkbox/config.ts +0 -46
- package/src/components/checkbox/index.tsx +0 -41
- package/src/components/collapsible/config.ts +0 -27
- package/src/components/collapsible/index.tsx +0 -47
- package/src/components/context-menu/config.ts +0 -28
- package/src/components/context-menu/index.tsx +0 -271
- package/src/components/dialog/config.ts +0 -582
- package/src/components/dialog/index.tsx +0 -162
- package/src/components/direction/config.ts +0 -28
- package/src/components/direction/index.tsx +0 -27
- package/src/components/drawer/config.ts +0 -28
- package/src/components/drawer/index.tsx +0 -153
- package/src/components/dropdown/config.ts +0 -262
- package/src/components/dropdown/index.tsx +0 -280
- package/src/components/empty/config.ts +0 -38
- package/src/components/empty/index.tsx +0 -127
- package/src/components/field/config.ts +0 -40
- package/src/components/field/index.tsx +0 -252
- package/src/components/hover-card/config.ts +0 -27
- package/src/components/hover-card/index.tsx +0 -56
- package/src/components/input/config.ts +0 -64
- package/src/components/input/index.tsx +0 -32
- package/src/components/input-group/config.ts +0 -209
- package/src/components/input-group/index.tsx +0 -177
- package/src/components/item/config.ts +0 -52
- package/src/components/item/index.tsx +0 -215
- package/src/components/kbd/config.ts +0 -38
- package/src/components/kbd/index.tsx +0 -40
- package/src/components/label/config.ts +0 -72
- package/src/components/label/index.tsx +0 -32
- package/src/components/menubar/config.ts +0 -28
- package/src/components/menubar/index.tsx +0 -295
- package/src/components/native-select/config.ts +0 -40
- package/src/components/native-select/index.tsx +0 -40
- package/src/components/navigation-menu/config.ts +0 -32
- package/src/components/navigation-menu/index.tsx +0 -188
- package/src/components/popover/config.ts +0 -222
- package/src/components/popover/index.tsx +0 -60
- package/src/components/progress/config.ts +0 -42
- package/src/components/progress/index.tsx +0 -39
- package/src/components/radio-group/config.ts +0 -303
- package/src/components/radio-group/index.tsx +0 -58
- package/src/components/resizable/config.ts +0 -28
- package/src/components/resizable/index.tsx +0 -67
- package/src/components/scroll-area/config.ts +0 -17
- package/src/components/scroll-area/index.tsx +0 -70
- package/src/components/select/config.ts +0 -277
- package/src/components/select/index.tsx +0 -202
- package/src/components/separator/config.ts +0 -63
- package/src/components/separator/index.tsx +0 -38
- package/src/components/sheet/config.ts +0 -16
- package/src/components/sheet/index.tsx +0 -153
- package/src/components/skeleton/config.ts +0 -77
- package/src/components/skeleton/index.tsx +0 -22
- package/src/components/slider/config.ts +0 -46
- package/src/components/slider/index.tsx +0 -76
- package/src/components/sonner/config.ts +0 -27
- package/src/components/sonner/index.tsx +0 -37
- package/src/components/spinner/config.ts +0 -40
- package/src/components/spinner/index.tsx +0 -30
- package/src/components/switch/config.ts +0 -171
- package/src/components/switch/index.tsx +0 -40
- package/src/components/table/config.ts +0 -38
- package/src/components/table/index.tsx +0 -135
- package/src/components/tabs/config.ts +0 -335
- package/src/components/tabs/index.tsx +0 -82
- package/src/components/textarea/config.ts +0 -117
- package/src/components/textarea/index.tsx +0 -26
- package/src/components/toggle/config.ts +0 -67
- package/src/components/toggle/index.tsx +0 -59
- package/src/components/toggle-group/config.ts +0 -46
- package/src/components/toggle-group/index.tsx +0 -106
- package/src/components/tooltip/config.ts +0 -16
- package/src/components/tooltip/index.tsx +0 -75
- package/src/components/typography/config.ts +0 -38
- package/src/components/typography/index.tsx +0 -172
- package/src/index.ts +0 -291
- package/tsconfig.json +0 -9
- package/tsconfig.lint.json +0 -8
- package/tsup.config.ts +0 -55
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/input-group/index.tsx
|
|
22
|
+
var input_group_exports = {};
|
|
23
|
+
__export(input_group_exports, {
|
|
24
|
+
InputGroup: () => InputGroup,
|
|
25
|
+
InputGroupAddon: () => InputGroupAddon,
|
|
26
|
+
InputGroupButton: () => InputGroupButton,
|
|
27
|
+
InputGroupInput: () => InputGroupInput,
|
|
28
|
+
InputGroupText: () => InputGroupText,
|
|
29
|
+
InputGroupTextarea: () => InputGroupTextarea
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(input_group_exports);
|
|
32
|
+
var import_utils4 = require("@foundrykit/utils");
|
|
33
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
34
|
+
|
|
35
|
+
// src/components/button/index.tsx
|
|
36
|
+
var import_utils = require("@foundrykit/utils");
|
|
37
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
38
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
41
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
|
46
|
+
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
|
|
47
|
+
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
|
48
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
|
49
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
50
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
51
|
+
"inline-link": "inline align-baseline text-inherit underline underline-offset-4 hover:text-inherit",
|
|
52
|
+
navlink: "text-foreground hover:text-accent-foreground underline-offset-4 hover:underline"
|
|
53
|
+
},
|
|
54
|
+
size: {
|
|
55
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
56
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
57
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
58
|
+
icon: "size-9"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
// The link-style variants read as inline text, not a button box: strip the
|
|
62
|
+
// height/padding/radius that `size` would otherwise apply, across all sizes.
|
|
63
|
+
compoundVariants: [
|
|
64
|
+
{
|
|
65
|
+
variant: ["inline-link", "navlink"],
|
|
66
|
+
className: "h-auto rounded-none p-0 has-[>svg]:px-0"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
variant: "default",
|
|
71
|
+
size: "default"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
function Button({
|
|
76
|
+
className,
|
|
77
|
+
variant,
|
|
78
|
+
size,
|
|
79
|
+
asChild = false,
|
|
80
|
+
...props
|
|
81
|
+
}) {
|
|
82
|
+
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
|
+
Comp,
|
|
85
|
+
{
|
|
86
|
+
"data-slot": "button",
|
|
87
|
+
className: (0, import_utils.cn)(buttonVariants({ variant, size, className })),
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// src/components/input/index.tsx
|
|
94
|
+
var import_utils2 = require("@foundrykit/utils");
|
|
95
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
96
|
+
function Input({ className, type, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
98
|
+
"input",
|
|
99
|
+
{
|
|
100
|
+
type,
|
|
101
|
+
"data-slot": "input",
|
|
102
|
+
className: (0, import_utils2.cn)(
|
|
103
|
+
"border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
104
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
105
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
106
|
+
className
|
|
107
|
+
),
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// src/components/textarea/index.tsx
|
|
114
|
+
var import_utils3 = require("@foundrykit/utils");
|
|
115
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
116
|
+
function Textarea({ className, ...props }) {
|
|
117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
118
|
+
"textarea",
|
|
119
|
+
{
|
|
120
|
+
"data-slot": "textarea",
|
|
121
|
+
className: (0, import_utils3.cn)(
|
|
122
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
123
|
+
className
|
|
124
|
+
),
|
|
125
|
+
...props
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// src/components/input-group/index.tsx
|
|
131
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
132
|
+
function InputGroup({ className, ...props }) {
|
|
133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
"data-slot": "input-group",
|
|
137
|
+
role: "group",
|
|
138
|
+
className: (0, import_utils4.cn)(
|
|
139
|
+
"group/input-group border-input has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
140
|
+
className
|
|
141
|
+
),
|
|
142
|
+
...props
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
var inputGroupAddonVariants = (0, import_class_variance_authority2.cva)(
|
|
147
|
+
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
148
|
+
{
|
|
149
|
+
variants: {
|
|
150
|
+
align: {
|
|
151
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
152
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
153
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
154
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
defaultVariants: {
|
|
158
|
+
align: "inline-start"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
function InputGroupAddon({
|
|
163
|
+
className,
|
|
164
|
+
align = "inline-start",
|
|
165
|
+
...props
|
|
166
|
+
}) {
|
|
167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
role: "group",
|
|
171
|
+
"data-slot": "input-group-addon",
|
|
172
|
+
"data-align": align,
|
|
173
|
+
className: (0, import_utils4.cn)(inputGroupAddonVariants({ align }), className),
|
|
174
|
+
onClick: (e) => {
|
|
175
|
+
if (e.target.closest("button")) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
179
|
+
},
|
|
180
|
+
...props
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
var inputGroupButtonVariants = (0, import_class_variance_authority2.cva)(
|
|
185
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
186
|
+
{
|
|
187
|
+
variants: {
|
|
188
|
+
size: {
|
|
189
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
190
|
+
sm: "",
|
|
191
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
192
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
defaultVariants: {
|
|
196
|
+
size: "xs"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
function InputGroupButton({
|
|
201
|
+
className,
|
|
202
|
+
type = "button",
|
|
203
|
+
variant = "ghost",
|
|
204
|
+
size = "xs",
|
|
205
|
+
...props
|
|
206
|
+
}) {
|
|
207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
208
|
+
Button,
|
|
209
|
+
{
|
|
210
|
+
type,
|
|
211
|
+
"data-size": size,
|
|
212
|
+
variant,
|
|
213
|
+
className: (0, import_utils4.cn)(inputGroupButtonVariants({ size }), className),
|
|
214
|
+
...props
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
function InputGroupText({ className, ...props }) {
|
|
219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
220
|
+
"span",
|
|
221
|
+
{
|
|
222
|
+
className: (0, import_utils4.cn)(
|
|
223
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
224
|
+
className
|
|
225
|
+
),
|
|
226
|
+
...props
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
function InputGroupInput({
|
|
231
|
+
className,
|
|
232
|
+
...props
|
|
233
|
+
}) {
|
|
234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
235
|
+
Input,
|
|
236
|
+
{
|
|
237
|
+
"data-slot": "input-group-control",
|
|
238
|
+
className: (0, import_utils4.cn)(
|
|
239
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
240
|
+
className
|
|
241
|
+
),
|
|
242
|
+
...props
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
function InputGroupTextarea({
|
|
247
|
+
className,
|
|
248
|
+
...props
|
|
249
|
+
}) {
|
|
250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
251
|
+
Textarea,
|
|
252
|
+
{
|
|
253
|
+
"data-slot": "input-group-control",
|
|
254
|
+
className: (0, import_utils4.cn)(
|
|
255
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
256
|
+
className
|
|
257
|
+
),
|
|
258
|
+
...props
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
263
|
+
0 && (module.exports = {
|
|
264
|
+
InputGroup,
|
|
265
|
+
InputGroupAddon,
|
|
266
|
+
InputGroupButton,
|
|
267
|
+
InputGroupInput,
|
|
268
|
+
InputGroupText,
|
|
269
|
+
InputGroupTextarea
|
|
270
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Button } from '../button/index.cjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Container that groups a control with addons in a single bordered field,
|
|
9
|
+
* managing shared focus/invalid/disabled styling. Compose with
|
|
10
|
+
* {@link InputGroupInput} or {@link InputGroupTextarea} as the control and
|
|
11
|
+
* {@link InputGroupAddon} (holding {@link InputGroupText} or
|
|
12
|
+
* {@link InputGroupButton}) for leading/trailing content.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <InputGroup>
|
|
17
|
+
* <InputGroupAddon><SearchIcon /></InputGroupAddon>
|
|
18
|
+
* <InputGroupInput placeholder="Search" />
|
|
19
|
+
* </InputGroup>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
24
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
25
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Slot for icons, text or buttons alongside the control. The `align` variant
|
|
28
|
+
* (`inline-start`/`inline-end`/`block-start`/`block-end`) positions it; clicking
|
|
29
|
+
* empty addon space focuses the group's input.
|
|
30
|
+
*/
|
|
31
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
33
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
34
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
|
+
/**
|
|
36
|
+
* {@link Button} preset for use inside an addon: defaults to `type="button"`,
|
|
37
|
+
* `variant="ghost"` and a compact `size` (`xs`, `sm`, `icon-xs`, `icon-sm`).
|
|
38
|
+
*/
|
|
39
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
42
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Button } from '../button/index.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Container that groups a control with addons in a single bordered field,
|
|
9
|
+
* managing shared focus/invalid/disabled styling. Compose with
|
|
10
|
+
* {@link InputGroupInput} or {@link InputGroupTextarea} as the control and
|
|
11
|
+
* {@link InputGroupAddon} (holding {@link InputGroupText} or
|
|
12
|
+
* {@link InputGroupButton}) for leading/trailing content.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <InputGroup>
|
|
17
|
+
* <InputGroupAddon><SearchIcon /></InputGroupAddon>
|
|
18
|
+
* <InputGroupInput placeholder="Search" />
|
|
19
|
+
* </InputGroup>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
24
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
25
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Slot for icons, text or buttons alongside the control. The `align` variant
|
|
28
|
+
* (`inline-start`/`inline-end`/`block-start`/`block-end`) positions it; clicking
|
|
29
|
+
* empty addon space focuses the group's input.
|
|
30
|
+
*/
|
|
31
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
33
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
34
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
|
+
/**
|
|
36
|
+
* {@link Button} preset for use inside an addon: defaults to `type="button"`,
|
|
37
|
+
* `variant="ghost"` and a compact `size` (`xs`, `sm`, `icon-xs`, `icon-sm`).
|
|
38
|
+
*/
|
|
39
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
42
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Textarea
|
|
4
|
+
} from "../../chunk-XVIHRZGJ.js";
|
|
5
|
+
import {
|
|
6
|
+
Input
|
|
7
|
+
} from "../../chunk-XCPGTXEJ.js";
|
|
8
|
+
import {
|
|
9
|
+
Button
|
|
10
|
+
} from "../../chunk-46UI3AUE.js";
|
|
11
|
+
|
|
12
|
+
// src/components/input-group/index.tsx
|
|
13
|
+
import { cn } from "@foundrykit/utils";
|
|
14
|
+
import { cva } from "class-variance-authority";
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
function InputGroup({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "input-group",
|
|
21
|
+
role: "group",
|
|
22
|
+
className: cn(
|
|
23
|
+
"group/input-group border-input has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
var inputGroupAddonVariants = cva(
|
|
31
|
+
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
align: {
|
|
35
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
36
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
37
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
38
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
align: "inline-start"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
function InputGroupAddon({
|
|
47
|
+
className,
|
|
48
|
+
align = "inline-start",
|
|
49
|
+
...props
|
|
50
|
+
}) {
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
role: "group",
|
|
55
|
+
"data-slot": "input-group-addon",
|
|
56
|
+
"data-align": align,
|
|
57
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
58
|
+
onClick: (e) => {
|
|
59
|
+
if (e.target.closest("button")) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
63
|
+
},
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
var inputGroupButtonVariants = cva(
|
|
69
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
70
|
+
{
|
|
71
|
+
variants: {
|
|
72
|
+
size: {
|
|
73
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
74
|
+
sm: "",
|
|
75
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
76
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
size: "xs"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
function InputGroupButton({
|
|
85
|
+
className,
|
|
86
|
+
type = "button",
|
|
87
|
+
variant = "ghost",
|
|
88
|
+
size = "xs",
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
Button,
|
|
93
|
+
{
|
|
94
|
+
type,
|
|
95
|
+
"data-size": size,
|
|
96
|
+
variant,
|
|
97
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function InputGroupText({ className, ...props }) {
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
104
|
+
"span",
|
|
105
|
+
{
|
|
106
|
+
className: cn(
|
|
107
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
108
|
+
className
|
|
109
|
+
),
|
|
110
|
+
...props
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
function InputGroupInput({
|
|
115
|
+
className,
|
|
116
|
+
...props
|
|
117
|
+
}) {
|
|
118
|
+
return /* @__PURE__ */ jsx(
|
|
119
|
+
Input,
|
|
120
|
+
{
|
|
121
|
+
"data-slot": "input-group-control",
|
|
122
|
+
className: cn(
|
|
123
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
...props
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function InputGroupTextarea({
|
|
131
|
+
className,
|
|
132
|
+
...props
|
|
133
|
+
}) {
|
|
134
|
+
return /* @__PURE__ */ jsx(
|
|
135
|
+
Textarea,
|
|
136
|
+
{
|
|
137
|
+
"data-slot": "input-group-control",
|
|
138
|
+
className: cn(
|
|
139
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
140
|
+
className
|
|
141
|
+
),
|
|
142
|
+
...props
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
InputGroup,
|
|
148
|
+
InputGroupAddon,
|
|
149
|
+
InputGroupButton,
|
|
150
|
+
InputGroupInput,
|
|
151
|
+
InputGroupText,
|
|
152
|
+
InputGroupTextarea
|
|
153
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/components/sheet/index.tsx
|
|
32
|
+
var sheet_exports = {};
|
|
33
|
+
__export(sheet_exports, {
|
|
34
|
+
Sheet: () => Sheet,
|
|
35
|
+
SheetClose: () => SheetClose,
|
|
36
|
+
SheetContent: () => SheetContent,
|
|
37
|
+
SheetDescription: () => SheetDescription,
|
|
38
|
+
SheetFooter: () => SheetFooter,
|
|
39
|
+
SheetHeader: () => SheetHeader,
|
|
40
|
+
SheetTitle: () => SheetTitle,
|
|
41
|
+
SheetTrigger: () => SheetTrigger
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(sheet_exports);
|
|
44
|
+
var import_utils = require("@foundrykit/utils");
|
|
45
|
+
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
46
|
+
var import_lucide_react = require("lucide-react");
|
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
+
function Sheet({ ...props }) {
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
50
|
+
}
|
|
51
|
+
function SheetTrigger({
|
|
52
|
+
...props
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
55
|
+
}
|
|
56
|
+
function SheetClose({
|
|
57
|
+
...props
|
|
58
|
+
}) {
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
60
|
+
}
|
|
61
|
+
function SheetPortal({
|
|
62
|
+
...props
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
65
|
+
}
|
|
66
|
+
function SheetOverlay({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
SheetPrimitive.Overlay,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "sheet-overlay",
|
|
74
|
+
className: (0, import_utils.cn)(
|
|
75
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
function SheetContent({
|
|
83
|
+
className,
|
|
84
|
+
children,
|
|
85
|
+
side = "right",
|
|
86
|
+
...props
|
|
87
|
+
}) {
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPortal, { children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetOverlay, {}),
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
91
|
+
SheetPrimitive.Content,
|
|
92
|
+
{
|
|
93
|
+
"data-slot": "sheet-content",
|
|
94
|
+
className: (0, import_utils.cn)(
|
|
95
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
96
|
+
side === "right" && "motion-safe:data-[state=closed]:slide-out-to-right motion-safe:data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
97
|
+
side === "left" && "motion-safe:data-[state=closed]:slide-out-to-left motion-safe:data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
98
|
+
side === "top" && "motion-safe:data-[state=closed]:slide-out-to-top motion-safe:data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
99
|
+
side === "bottom" && "motion-safe:data-[state=closed]:slide-out-to-bottom motion-safe:data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props,
|
|
103
|
+
children: [
|
|
104
|
+
children,
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.XIcon, { className: "size-4" }),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
|
|
108
|
+
] })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
function SheetHeader({ className, ...props }) {
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
"data-slot": "sheet-header",
|
|
119
|
+
className: (0, import_utils.cn)("flex flex-col gap-1.5 p-4", className),
|
|
120
|
+
...props
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function SheetFooter({ className, ...props }) {
|
|
125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
"data-slot": "sheet-footer",
|
|
129
|
+
className: (0, import_utils.cn)("mt-auto flex flex-col gap-2 p-4", className),
|
|
130
|
+
...props
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function SheetTitle({
|
|
135
|
+
className,
|
|
136
|
+
...props
|
|
137
|
+
}) {
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
+
SheetPrimitive.Title,
|
|
140
|
+
{
|
|
141
|
+
"data-slot": "sheet-title",
|
|
142
|
+
className: (0, import_utils.cn)("text-foreground font-semibold", className),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
function SheetDescription({
|
|
148
|
+
className,
|
|
149
|
+
...props
|
|
150
|
+
}) {
|
|
151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
152
|
+
SheetPrimitive.Description,
|
|
153
|
+
{
|
|
154
|
+
"data-slot": "sheet-description",
|
|
155
|
+
className: (0, import_utils.cn)("text-muted-foreground text-sm", className),
|
|
156
|
+
...props
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
161
|
+
0 && (module.exports = {
|
|
162
|
+
Sheet,
|
|
163
|
+
SheetClose,
|
|
164
|
+
SheetContent,
|
|
165
|
+
SheetDescription,
|
|
166
|
+
SheetFooter,
|
|
167
|
+
SheetHeader,
|
|
168
|
+
SheetTitle,
|
|
169
|
+
SheetTrigger
|
|
170
|
+
});
|