@pactor-app/ui 1.2.0 → 1.3.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 +2 -0
- package/dist/{chunk-L45CSL6I.js → chunk-7KC6DMKH.js} +3 -3
- package/dist/{chunk-HJPHJKVA.js → chunk-EVGIS2ZE.js} +170 -227
- package/dist/{chunk-F3H23KYG.js → chunk-F42SGQNW.js} +31 -93
- package/dist/chunk-L4Z7MNYY.js +1197 -0
- package/dist/{chunk-LMEJ242M.js → chunk-P54Y23AP.js} +36 -32
- package/dist/{chunk-22TEN3ER.js → chunk-TDVG7MZ5.js} +13 -13
- package/dist/{chunk-Q5NUGUJG.js → chunk-UKA7C3JP.js} +204 -413
- package/dist/chunk-WKJUCGV4.js +78 -0
- package/dist/components/index.cjs +1012 -691
- package/dist/components/index.d.cts +30 -12
- package/dist/components/index.d.ts +30 -12
- package/dist/components/index.js +8 -6
- package/dist/index.cjs +1261 -940
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -8
- package/dist/interaction/index.cjs +10 -6
- package/dist/interaction/index.js +3 -3
- package/dist/layout/index.cjs +695 -265
- package/dist/layout/index.d.cts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +4 -4
- package/dist/ui/index.cjs +1688 -533
- package/dist/ui/index.d.cts +130 -16
- package/dist/ui/index.d.ts +130 -16
- package/dist/ui/index.js +481 -22
- package/package.json +6 -5
- package/styles.css +936 -107
- package/dist/chunk-2LYMCWEJ.js +0 -289
- package/dist/chunk-RQHJBTEU.js +0 -10
|
@@ -1,101 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cn
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
|
|
5
|
-
// src/ui/button.tsx
|
|
6
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
7
|
-
import { cva } from "class-variance-authority";
|
|
8
|
-
import * as React from "react";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var buttonVariants = cva(
|
|
11
|
-
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
variant: {
|
|
15
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
16
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20",
|
|
17
|
-
outline: "border border-border bg-background hover:bg-accent hover:text-accent-foreground",
|
|
18
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
20
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
default: "h-9 px-4 py-2",
|
|
24
|
-
sm: "h-8 gap-1.5 rounded-md px-3 text-xs",
|
|
25
|
-
lg: "h-10 rounded-md px-6",
|
|
26
|
-
icon: "size-9"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
variant: "default",
|
|
31
|
-
size: "default"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
function Button({
|
|
36
|
-
className,
|
|
37
|
-
variant,
|
|
38
|
-
size,
|
|
39
|
-
asChild = false,
|
|
40
|
-
children,
|
|
41
|
-
...props
|
|
42
|
-
}) {
|
|
43
|
-
if (asChild && React.isValidElement(children)) {
|
|
44
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
-
ButtonPrimitive,
|
|
46
|
-
{
|
|
47
|
-
"data-slot": "button",
|
|
48
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
49
|
-
render: children,
|
|
50
|
-
...props
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
return /* @__PURE__ */ jsx(
|
|
55
|
-
ButtonPrimitive,
|
|
56
|
-
{
|
|
57
|
-
"data-slot": "button",
|
|
58
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
59
|
-
...props,
|
|
60
|
-
children
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
3
|
+
} from "./chunk-WKJUCGV4.js";
|
|
64
4
|
|
|
65
5
|
// src/ui/dialog.tsx
|
|
66
6
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
67
7
|
import { XIcon } from "lucide-react";
|
|
68
|
-
import { jsx
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
69
9
|
function Dialog({
|
|
70
10
|
...props
|
|
71
11
|
}) {
|
|
72
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
73
13
|
}
|
|
74
14
|
function DialogTrigger({
|
|
75
15
|
...props
|
|
76
16
|
}) {
|
|
77
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
78
18
|
}
|
|
79
19
|
function DialogPortal({
|
|
80
20
|
...props
|
|
81
21
|
}) {
|
|
82
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
83
23
|
}
|
|
84
24
|
function DialogClose({
|
|
85
25
|
...props
|
|
86
26
|
}) {
|
|
87
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
88
28
|
}
|
|
89
29
|
function DialogOverlay({
|
|
90
30
|
className,
|
|
91
31
|
...props
|
|
92
32
|
}) {
|
|
93
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
94
34
|
DialogPrimitive.Backdrop,
|
|
95
35
|
{
|
|
96
36
|
"data-slot": "dialog-overlay",
|
|
97
37
|
className: cn(
|
|
98
|
-
"fixed inset-0 z-50 bg-
|
|
38
|
+
"fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
99
39
|
className
|
|
100
40
|
),
|
|
101
41
|
...props
|
|
@@ -109,13 +49,13 @@ function DialogContent({
|
|
|
109
49
|
...props
|
|
110
50
|
}) {
|
|
111
51
|
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
112
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
113
53
|
/* @__PURE__ */ jsxs(
|
|
114
54
|
DialogPrimitive.Popup,
|
|
115
55
|
{
|
|
116
56
|
"data-slot": "dialog-content",
|
|
117
57
|
className: cn(
|
|
118
|
-
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-
|
|
58
|
+
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-6 shadow-lg shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 sm:max-w-lg",
|
|
119
59
|
className
|
|
120
60
|
),
|
|
121
61
|
...props,
|
|
@@ -125,7 +65,7 @@ function DialogContent({
|
|
|
125
65
|
DialogPrimitive.Close,
|
|
126
66
|
{
|
|
127
67
|
"data-slot": "dialog-close",
|
|
128
|
-
render: /* @__PURE__ */
|
|
68
|
+
render: /* @__PURE__ */ jsx(
|
|
129
69
|
"button",
|
|
130
70
|
{
|
|
131
71
|
type: "button",
|
|
@@ -133,8 +73,8 @@ function DialogContent({
|
|
|
133
73
|
}
|
|
134
74
|
),
|
|
135
75
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
77
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
138
78
|
]
|
|
139
79
|
}
|
|
140
80
|
)
|
|
@@ -144,7 +84,7 @@ function DialogContent({
|
|
|
144
84
|
] });
|
|
145
85
|
}
|
|
146
86
|
function DialogHeader({ className, ...props }) {
|
|
147
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
148
88
|
"div",
|
|
149
89
|
{
|
|
150
90
|
"data-slot": "dialog-header",
|
|
@@ -154,7 +94,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
154
94
|
);
|
|
155
95
|
}
|
|
156
96
|
function DialogFooter({ className, ...props }) {
|
|
157
|
-
return /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
158
98
|
"div",
|
|
159
99
|
{
|
|
160
100
|
"data-slot": "dialog-footer",
|
|
@@ -170,7 +110,7 @@ function DialogTitle({
|
|
|
170
110
|
className,
|
|
171
111
|
...props
|
|
172
112
|
}) {
|
|
173
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
174
114
|
DialogPrimitive.Title,
|
|
175
115
|
{
|
|
176
116
|
"data-slot": "dialog-title",
|
|
@@ -183,7 +123,7 @@ function DialogDescription({
|
|
|
183
123
|
className,
|
|
184
124
|
...props
|
|
185
125
|
}) {
|
|
186
|
-
return /* @__PURE__ */
|
|
126
|
+
return /* @__PURE__ */ jsx(
|
|
187
127
|
DialogPrimitive.Description,
|
|
188
128
|
{
|
|
189
129
|
"data-slot": "dialog-description",
|
|
@@ -195,36 +135,36 @@ function DialogDescription({
|
|
|
195
135
|
|
|
196
136
|
// src/ui/drawer.tsx
|
|
197
137
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
198
|
-
import { jsx as
|
|
138
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
199
139
|
function Drawer({
|
|
200
140
|
...props
|
|
201
141
|
}) {
|
|
202
|
-
return /* @__PURE__ */
|
|
142
|
+
return /* @__PURE__ */ jsx2(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
|
|
203
143
|
}
|
|
204
144
|
function DrawerTrigger({
|
|
205
145
|
...props
|
|
206
146
|
}) {
|
|
207
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ jsx2(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
208
148
|
}
|
|
209
149
|
function DrawerPortal({
|
|
210
150
|
...props
|
|
211
151
|
}) {
|
|
212
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ jsx2(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
|
|
213
153
|
}
|
|
214
154
|
function DrawerClose({
|
|
215
155
|
...props
|
|
216
156
|
}) {
|
|
217
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ jsx2(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
218
158
|
}
|
|
219
159
|
function DrawerOverlay({
|
|
220
160
|
className,
|
|
221
161
|
...props
|
|
222
162
|
}) {
|
|
223
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ jsx2(
|
|
224
164
|
DrawerPrimitive.Overlay,
|
|
225
165
|
{
|
|
226
166
|
"data-slot": "drawer-overlay",
|
|
227
|
-
className: cn("fixed inset-0 z-50 bg-
|
|
167
|
+
className: cn("fixed inset-0 z-50 bg-(--overlay-background)", className),
|
|
228
168
|
...props
|
|
229
169
|
}
|
|
230
170
|
);
|
|
@@ -235,13 +175,13 @@ function DrawerContent({
|
|
|
235
175
|
...props
|
|
236
176
|
}) {
|
|
237
177
|
return /* @__PURE__ */ jsxs2(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
238
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ jsx2(DrawerOverlay, {}),
|
|
239
179
|
/* @__PURE__ */ jsxs2(
|
|
240
180
|
DrawerPrimitive.Content,
|
|
241
181
|
{
|
|
242
182
|
"data-slot": "drawer-content",
|
|
243
183
|
className: cn(
|
|
244
|
-
"group/drawer-content fixed z-50 flex h-auto flex-col border-border bg-
|
|
184
|
+
"group/drawer-content fixed z-50 flex h-auto flex-col border-border bg-popover",
|
|
245
185
|
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
246
186
|
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
247
187
|
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
@@ -250,7 +190,7 @@ function DrawerContent({
|
|
|
250
190
|
),
|
|
251
191
|
...props,
|
|
252
192
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ jsx2("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
254
194
|
children
|
|
255
195
|
]
|
|
256
196
|
}
|
|
@@ -258,7 +198,7 @@ function DrawerContent({
|
|
|
258
198
|
] });
|
|
259
199
|
}
|
|
260
200
|
function DrawerHeader({ className, ...props }) {
|
|
261
|
-
return /* @__PURE__ */
|
|
201
|
+
return /* @__PURE__ */ jsx2(
|
|
262
202
|
"div",
|
|
263
203
|
{
|
|
264
204
|
"data-slot": "drawer-header",
|
|
@@ -268,7 +208,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
268
208
|
);
|
|
269
209
|
}
|
|
270
210
|
function DrawerFooter({ className, ...props }) {
|
|
271
|
-
return /* @__PURE__ */
|
|
211
|
+
return /* @__PURE__ */ jsx2(
|
|
272
212
|
"div",
|
|
273
213
|
{
|
|
274
214
|
"data-slot": "drawer-footer",
|
|
@@ -281,7 +221,7 @@ function DrawerTitle({
|
|
|
281
221
|
className,
|
|
282
222
|
...props
|
|
283
223
|
}) {
|
|
284
|
-
return /* @__PURE__ */
|
|
224
|
+
return /* @__PURE__ */ jsx2(
|
|
285
225
|
DrawerPrimitive.Title,
|
|
286
226
|
{
|
|
287
227
|
"data-slot": "drawer-title",
|
|
@@ -294,7 +234,7 @@ function DrawerDescription({
|
|
|
294
234
|
className,
|
|
295
235
|
...props
|
|
296
236
|
}) {
|
|
297
|
-
return /* @__PURE__ */
|
|
237
|
+
return /* @__PURE__ */ jsx2(
|
|
298
238
|
DrawerPrimitive.Description,
|
|
299
239
|
{
|
|
300
240
|
"data-slot": "drawer-description",
|
|
@@ -305,8 +245,6 @@ function DrawerDescription({
|
|
|
305
245
|
}
|
|
306
246
|
|
|
307
247
|
export {
|
|
308
|
-
buttonVariants,
|
|
309
|
-
Button,
|
|
310
248
|
Dialog,
|
|
311
249
|
DialogTrigger,
|
|
312
250
|
DialogPortal,
|