@pactor-app/ui 1.11.0 → 1.12.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/dist/{chunk-PECP7DJB.js → chunk-2B5YV2HR.js} +1 -1
- package/dist/{chunk-HW6M3BEF.js → chunk-3KCE7ROX.js} +22 -6
- package/dist/{chunk-VM4FESQB.js → chunk-AUSWAD26.js} +79 -79
- package/dist/{chunk-TAJXMOEX.js → chunk-CWUY7LXF.js} +2 -2
- package/dist/{chunk-NVORKHWX.js → chunk-XEK5NQJA.js} +1 -1
- package/dist/components/index.cjs +461 -443
- package/dist/components/index.d.cts +11 -4
- package/dist/components/index.d.ts +11 -4
- package/dist/components/index.js +4 -4
- package/dist/index.cjs +464 -446
- package/dist/index.js +5 -5
- package/dist/layout/index.js +3 -3
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Icon,
|
|
3
3
|
Menu,
|
|
4
4
|
Sidebar
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2B5YV2HR.js";
|
|
6
6
|
import {
|
|
7
7
|
Alert,
|
|
8
8
|
AlertDescription,
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
chartColor,
|
|
142
142
|
navigationMenuTriggerStyle,
|
|
143
143
|
toast
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-XEK5NQJA.js";
|
|
145
145
|
import {
|
|
146
146
|
Dialog,
|
|
147
147
|
DialogContent,
|
|
@@ -176,7 +176,7 @@ import {
|
|
|
176
176
|
Tooltip,
|
|
177
177
|
TooltipContent,
|
|
178
178
|
TooltipTrigger
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-AUSWAD26.js";
|
|
180
180
|
import {
|
|
181
181
|
Button,
|
|
182
182
|
cn
|
|
@@ -379,6 +379,7 @@ var sizeMap = {
|
|
|
379
379
|
function Button2({
|
|
380
380
|
text,
|
|
381
381
|
icon,
|
|
382
|
+
tooltip,
|
|
382
383
|
variant = "default",
|
|
383
384
|
danger,
|
|
384
385
|
size = "middle",
|
|
@@ -391,7 +392,7 @@ function Button2({
|
|
|
391
392
|
children
|
|
392
393
|
}) {
|
|
393
394
|
const textual = variant === "link" || variant === "text";
|
|
394
|
-
|
|
395
|
+
const button = /* @__PURE__ */ jsxs6(
|
|
395
396
|
Button,
|
|
396
397
|
{
|
|
397
398
|
type: submit ? "submit" : "button",
|
|
@@ -412,6 +413,13 @@ function Button2({
|
|
|
412
413
|
]
|
|
413
414
|
}
|
|
414
415
|
);
|
|
416
|
+
if (tooltip) {
|
|
417
|
+
return /* @__PURE__ */ jsxs6(Tooltip, { children: [
|
|
418
|
+
/* @__PURE__ */ jsx9(TooltipTrigger, { render: button }),
|
|
419
|
+
/* @__PURE__ */ jsx9(TooltipContent, { children: tooltip })
|
|
420
|
+
] });
|
|
421
|
+
}
|
|
422
|
+
return button;
|
|
415
423
|
}
|
|
416
424
|
|
|
417
425
|
// src/components/components/ButtonGroup/index.tsx
|
|
@@ -2721,7 +2729,8 @@ function Select2({
|
|
|
2721
2729
|
"span",
|
|
2722
2730
|
{
|
|
2723
2731
|
className: cn(
|
|
2724
|
-
|
|
2732
|
+
// Form / Field(Form 上下文)内控件占满整行宽度;独立渲染保持内容自然宽度
|
|
2733
|
+
inFormRoot ? "flex w-full items-center gap-1" : "inline-flex items-center gap-1",
|
|
2725
2734
|
!inFormRoot && className,
|
|
2726
2735
|
controlClassName
|
|
2727
2736
|
),
|
|
@@ -2736,7 +2745,7 @@ function Select2({
|
|
|
2736
2745
|
disabled,
|
|
2737
2746
|
name: inForm ? name : void 0,
|
|
2738
2747
|
children: [
|
|
2739
|
-
/* @__PURE__ */ jsx53(SelectTrigger, { id: controlId, children: /* @__PURE__ */ jsx53(SelectValue, { placeholder }) }),
|
|
2748
|
+
/* @__PURE__ */ jsx53(SelectTrigger, { id: controlId, className: inFormRoot ? "w-full" : void 0, children: /* @__PURE__ */ jsx53(SelectValue, { placeholder }) }),
|
|
2740
2749
|
/* @__PURE__ */ jsx53(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx53(
|
|
2741
2750
|
SelectItem,
|
|
2742
2751
|
{
|
|
@@ -3195,9 +3204,15 @@ var typeClassMap = {
|
|
|
3195
3204
|
warning: "text-warning",
|
|
3196
3205
|
danger: "text-destructive"
|
|
3197
3206
|
};
|
|
3207
|
+
var sizeClassMap = {
|
|
3208
|
+
small: "text-xs",
|
|
3209
|
+
middle: "",
|
|
3210
|
+
large: "text-lg"
|
|
3211
|
+
};
|
|
3198
3212
|
function Text({
|
|
3199
3213
|
text,
|
|
3200
3214
|
type = "default",
|
|
3215
|
+
size = "middle",
|
|
3201
3216
|
strong,
|
|
3202
3217
|
delete: del,
|
|
3203
3218
|
underline,
|
|
@@ -3213,6 +3228,7 @@ function Text({
|
|
|
3213
3228
|
"data-type": type,
|
|
3214
3229
|
className: cn(
|
|
3215
3230
|
typeClassMap[type],
|
|
3231
|
+
sizeClassMap[size],
|
|
3216
3232
|
strong && "font-semibold",
|
|
3217
3233
|
del && "line-through",
|
|
3218
3234
|
underline && "underline",
|
|
@@ -82,8 +82,68 @@ function AccordionContent({
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// src/ui/tooltip.tsx
|
|
86
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
87
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
88
|
+
function TooltipProvider({
|
|
89
|
+
delay = 0,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
return /* @__PURE__ */ jsx2(
|
|
93
|
+
TooltipPrimitive.Provider,
|
|
94
|
+
{
|
|
95
|
+
"data-slot": "tooltip-provider",
|
|
96
|
+
delay,
|
|
97
|
+
...props
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function Tooltip({
|
|
102
|
+
...props
|
|
103
|
+
}) {
|
|
104
|
+
return /* @__PURE__ */ jsx2(TooltipProvider, { children: /* @__PURE__ */ jsx2(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
105
|
+
}
|
|
106
|
+
function TooltipTrigger({
|
|
107
|
+
...props
|
|
108
|
+
}) {
|
|
109
|
+
return /* @__PURE__ */ jsx2(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
110
|
+
}
|
|
111
|
+
function TooltipContent({
|
|
112
|
+
className,
|
|
113
|
+
side = "top",
|
|
114
|
+
sideOffset = 4,
|
|
115
|
+
align = "center",
|
|
116
|
+
children,
|
|
117
|
+
...props
|
|
118
|
+
}) {
|
|
119
|
+
return /* @__PURE__ */ jsx2(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
|
|
120
|
+
TooltipPrimitive.Positioner,
|
|
121
|
+
{
|
|
122
|
+
align,
|
|
123
|
+
side,
|
|
124
|
+
sideOffset,
|
|
125
|
+
className: "isolate z-50",
|
|
126
|
+
children: /* @__PURE__ */ jsxs2(
|
|
127
|
+
TooltipPrimitive.Popup,
|
|
128
|
+
{
|
|
129
|
+
"data-slot": "tooltip-content",
|
|
130
|
+
className: cn(
|
|
131
|
+
"z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground 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",
|
|
132
|
+
className
|
|
133
|
+
),
|
|
134
|
+
...props,
|
|
135
|
+
children: [
|
|
136
|
+
children,
|
|
137
|
+
/* @__PURE__ */ jsx2(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
) });
|
|
143
|
+
}
|
|
144
|
+
|
|
85
145
|
// src/ui/card.tsx
|
|
86
|
-
import { jsx as
|
|
146
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
87
147
|
var cardRoundedClasses = {
|
|
88
148
|
none: "rounded-none",
|
|
89
149
|
sm: "rounded-sm",
|
|
@@ -98,7 +158,7 @@ function Card({
|
|
|
98
158
|
rounded = "lg",
|
|
99
159
|
...props
|
|
100
160
|
}) {
|
|
101
|
-
return /* @__PURE__ */
|
|
161
|
+
return /* @__PURE__ */ jsx3(
|
|
102
162
|
"div",
|
|
103
163
|
{
|
|
104
164
|
"data-slot": "card",
|
|
@@ -112,7 +172,7 @@ function Card({
|
|
|
112
172
|
);
|
|
113
173
|
}
|
|
114
174
|
function CardHeader({ className, ...props }) {
|
|
115
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ jsx3(
|
|
116
176
|
"div",
|
|
117
177
|
{
|
|
118
178
|
"data-slot": "card-header",
|
|
@@ -125,7 +185,7 @@ function CardHeader({ className, ...props }) {
|
|
|
125
185
|
);
|
|
126
186
|
}
|
|
127
187
|
function CardTitle({ className, ...props }) {
|
|
128
|
-
return /* @__PURE__ */
|
|
188
|
+
return /* @__PURE__ */ jsx3(
|
|
129
189
|
"div",
|
|
130
190
|
{
|
|
131
191
|
"data-slot": "card-title",
|
|
@@ -135,7 +195,7 @@ function CardTitle({ className, ...props }) {
|
|
|
135
195
|
);
|
|
136
196
|
}
|
|
137
197
|
function CardDescription({ className, ...props }) {
|
|
138
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ jsx3(
|
|
139
199
|
"div",
|
|
140
200
|
{
|
|
141
201
|
"data-slot": "card-description",
|
|
@@ -145,7 +205,7 @@ function CardDescription({ className, ...props }) {
|
|
|
145
205
|
);
|
|
146
206
|
}
|
|
147
207
|
function CardAction({ className, ...props }) {
|
|
148
|
-
return /* @__PURE__ */
|
|
208
|
+
return /* @__PURE__ */ jsx3(
|
|
149
209
|
"div",
|
|
150
210
|
{
|
|
151
211
|
"data-slot": "card-action",
|
|
@@ -158,7 +218,7 @@ function CardAction({ className, ...props }) {
|
|
|
158
218
|
);
|
|
159
219
|
}
|
|
160
220
|
function CardContent({ className, ...props }) {
|
|
161
|
-
return /* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ jsx3(
|
|
162
222
|
"div",
|
|
163
223
|
{
|
|
164
224
|
"data-slot": "card-content",
|
|
@@ -168,7 +228,7 @@ function CardContent({ className, ...props }) {
|
|
|
168
228
|
);
|
|
169
229
|
}
|
|
170
230
|
function CardFooter({ className, ...props }) {
|
|
171
|
-
return /* @__PURE__ */
|
|
231
|
+
return /* @__PURE__ */ jsx3(
|
|
172
232
|
"div",
|
|
173
233
|
{
|
|
174
234
|
"data-slot": "card-footer",
|
|
@@ -180,16 +240,16 @@ function CardFooter({ className, ...props }) {
|
|
|
180
240
|
|
|
181
241
|
// src/ui/popover.tsx
|
|
182
242
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
183
|
-
import { jsx as
|
|
243
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
184
244
|
function Popover({
|
|
185
245
|
...props
|
|
186
246
|
}) {
|
|
187
|
-
return /* @__PURE__ */
|
|
247
|
+
return /* @__PURE__ */ jsx4(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
188
248
|
}
|
|
189
249
|
function PopoverTrigger({
|
|
190
250
|
...props
|
|
191
251
|
}) {
|
|
192
|
-
return /* @__PURE__ */
|
|
252
|
+
return /* @__PURE__ */ jsx4(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
193
253
|
}
|
|
194
254
|
function PopoverContent({
|
|
195
255
|
className,
|
|
@@ -199,7 +259,7 @@ function PopoverContent({
|
|
|
199
259
|
anchor,
|
|
200
260
|
...props
|
|
201
261
|
}) {
|
|
202
|
-
return /* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ jsx4(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx4(
|
|
203
263
|
PopoverPrimitive.Positioner,
|
|
204
264
|
{
|
|
205
265
|
align,
|
|
@@ -207,7 +267,7 @@ function PopoverContent({
|
|
|
207
267
|
sideOffset,
|
|
208
268
|
anchor,
|
|
209
269
|
className: "isolate z-50",
|
|
210
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ jsx4(
|
|
211
271
|
PopoverPrimitive.Popup,
|
|
212
272
|
{
|
|
213
273
|
"data-slot": "popover-content",
|
|
@@ -223,9 +283,9 @@ function PopoverContent({
|
|
|
223
283
|
}
|
|
224
284
|
|
|
225
285
|
// src/ui/input.tsx
|
|
226
|
-
import { jsx as
|
|
286
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
227
287
|
function Input({ className, type, ...props }) {
|
|
228
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ jsx5(
|
|
229
289
|
"input",
|
|
230
290
|
{
|
|
231
291
|
type,
|
|
@@ -239,66 +299,6 @@ function Input({ className, type, ...props }) {
|
|
|
239
299
|
);
|
|
240
300
|
}
|
|
241
301
|
|
|
242
|
-
// src/ui/tooltip.tsx
|
|
243
|
-
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
244
|
-
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
245
|
-
function TooltipProvider({
|
|
246
|
-
delay = 0,
|
|
247
|
-
...props
|
|
248
|
-
}) {
|
|
249
|
-
return /* @__PURE__ */ jsx5(
|
|
250
|
-
TooltipPrimitive.Provider,
|
|
251
|
-
{
|
|
252
|
-
"data-slot": "tooltip-provider",
|
|
253
|
-
delay,
|
|
254
|
-
...props
|
|
255
|
-
}
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
function Tooltip({
|
|
259
|
-
...props
|
|
260
|
-
}) {
|
|
261
|
-
return /* @__PURE__ */ jsx5(TooltipProvider, { children: /* @__PURE__ */ jsx5(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
262
|
-
}
|
|
263
|
-
function TooltipTrigger({
|
|
264
|
-
...props
|
|
265
|
-
}) {
|
|
266
|
-
return /* @__PURE__ */ jsx5(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
267
|
-
}
|
|
268
|
-
function TooltipContent({
|
|
269
|
-
className,
|
|
270
|
-
side = "top",
|
|
271
|
-
sideOffset = 4,
|
|
272
|
-
align = "center",
|
|
273
|
-
children,
|
|
274
|
-
...props
|
|
275
|
-
}) {
|
|
276
|
-
return /* @__PURE__ */ jsx5(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx5(
|
|
277
|
-
TooltipPrimitive.Positioner,
|
|
278
|
-
{
|
|
279
|
-
align,
|
|
280
|
-
side,
|
|
281
|
-
sideOffset,
|
|
282
|
-
className: "isolate z-50",
|
|
283
|
-
children: /* @__PURE__ */ jsxs2(
|
|
284
|
-
TooltipPrimitive.Popup,
|
|
285
|
-
{
|
|
286
|
-
"data-slot": "tooltip-content",
|
|
287
|
-
className: cn(
|
|
288
|
-
"z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground 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",
|
|
289
|
-
className
|
|
290
|
-
),
|
|
291
|
-
...props,
|
|
292
|
-
children: [
|
|
293
|
-
children,
|
|
294
|
-
/* @__PURE__ */ jsx5(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
|
|
295
|
-
]
|
|
296
|
-
}
|
|
297
|
-
)
|
|
298
|
-
}
|
|
299
|
-
) });
|
|
300
|
-
}
|
|
301
|
-
|
|
302
302
|
// src/ui/separator.tsx
|
|
303
303
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
304
304
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
@@ -1156,6 +1156,10 @@ export {
|
|
|
1156
1156
|
AccordionItem,
|
|
1157
1157
|
AccordionTrigger,
|
|
1158
1158
|
AccordionContent,
|
|
1159
|
+
TooltipProvider,
|
|
1160
|
+
Tooltip,
|
|
1161
|
+
TooltipTrigger,
|
|
1162
|
+
TooltipContent,
|
|
1159
1163
|
Card,
|
|
1160
1164
|
CardHeader,
|
|
1161
1165
|
CardTitle,
|
|
@@ -1167,10 +1171,6 @@ export {
|
|
|
1167
1171
|
PopoverTrigger,
|
|
1168
1172
|
PopoverContent,
|
|
1169
1173
|
Input,
|
|
1170
|
-
TooltipProvider,
|
|
1171
|
-
Tooltip,
|
|
1172
|
-
TooltipTrigger,
|
|
1173
|
-
TooltipContent,
|
|
1174
1174
|
useIsMobile,
|
|
1175
1175
|
Separator,
|
|
1176
1176
|
Sheet,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Icon,
|
|
3
3
|
Menu,
|
|
4
4
|
Sidebar
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2B5YV2HR.js";
|
|
6
6
|
import {
|
|
7
7
|
Accordion,
|
|
8
8
|
AccordionContent,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
Popover,
|
|
16
16
|
PopoverContent,
|
|
17
17
|
PopoverTrigger
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AUSWAD26.js";
|
|
19
19
|
import {
|
|
20
20
|
cn
|
|
21
21
|
} from "./chunk-WKJUCGV4.js";
|