@pactor-app/ui 1.44.0 → 1.46.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-SD2XSQIP.js → chunk-FU4P7CAM.js} +4 -0
- package/dist/{chunk-A6WUHUJL.js → chunk-JV2V4HCI.js} +1 -1
- package/dist/{chunk-3PQOJRJD.js → chunk-QB2RZXDD.js} +35 -2450
- package/dist/{chunk-T3TGKYAB.js → chunk-XA7J5SGA.js} +16 -121
- package/dist/components/index.cjs +39 -2524
- package/dist/components/index.d.cts +16 -846
- package/dist/components/index.d.ts +16 -846
- package/dist/components/index.js +7 -43
- package/dist/index.cjs +375 -2860
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -52
- package/dist/layout/index.cjs +2 -0
- package/dist/layout/index.js +2 -2
- package/dist/ui/index.cjs +1138 -560
- package/dist/ui/index.d.cts +219 -16
- package/dist/ui/index.d.ts +219 -16
- package/dist/ui/index.js +721 -44
- package/package.json +10 -8
- package/src/theme-bridge.css +54 -0
- package/styles.css +87 -183
|
@@ -2465,16 +2465,26 @@ var tabsListVariants = cva4(
|
|
|
2465
2465
|
default: "h-9 rounded-lg bg-muted p-[3px]",
|
|
2466
2466
|
// line:页签栏通栏(下划线轨道占满容器宽),触发器自然宽度靠左排列
|
|
2467
2467
|
line: "h-auto w-full justify-start gap-1 rounded-none border-b border-border bg-transparent p-0"
|
|
2468
|
+
},
|
|
2469
|
+
/** 尺寸(对齐 Button 的 size 语义):sm 经 compoundVariants 仅压缩胶囊变体 */
|
|
2470
|
+
size: {
|
|
2471
|
+
default: "",
|
|
2472
|
+
sm: ""
|
|
2468
2473
|
}
|
|
2469
2474
|
},
|
|
2475
|
+
compoundVariants: [
|
|
2476
|
+
{ variant: "default", size: "sm", class: "h-8" }
|
|
2477
|
+
],
|
|
2470
2478
|
defaultVariants: {
|
|
2471
|
-
variant: "default"
|
|
2479
|
+
variant: "default",
|
|
2480
|
+
size: "default"
|
|
2472
2481
|
}
|
|
2473
2482
|
}
|
|
2474
2483
|
);
|
|
2475
2484
|
function TabsList({
|
|
2476
2485
|
className,
|
|
2477
2486
|
variant,
|
|
2487
|
+
size,
|
|
2478
2488
|
...props
|
|
2479
2489
|
}) {
|
|
2480
2490
|
return /* @__PURE__ */ jsx38(
|
|
@@ -2482,7 +2492,8 @@ function TabsList({
|
|
|
2482
2492
|
{
|
|
2483
2493
|
"data-slot": "tabs-list",
|
|
2484
2494
|
"data-variant": variant ?? "default",
|
|
2485
|
-
|
|
2495
|
+
"data-size": size ?? "default",
|
|
2496
|
+
className: cn(tabsListVariants({ variant, size }), className),
|
|
2486
2497
|
...props
|
|
2487
2498
|
}
|
|
2488
2499
|
);
|
|
@@ -2503,6 +2514,8 @@ function TabsTrigger({
|
|
|
2503
2514
|
//(叠在 List 的底边轨道上),无底色/圆角/阴影;通栏 List 下取消
|
|
2504
2515
|
// flex-1 拉伸,触发器保持自然宽度
|
|
2505
2516
|
"group-data-[variant=line]/tabs-list:-mb-px group-data-[variant=line]/tabs-list:h-9 group-data-[variant=line]/tabs-list:flex-none group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:border-x-0 group-data-[variant=line]/tabs-list:border-t-0 group-data-[variant=line]/tabs-list:border-b-2 group-data-[variant=line]/tabs-list:py-1.5 group-data-[variant=line]/tabs-list:text-muted-foreground group-data-[variant=line]/tabs-list:data-active:border-b-primary group-data-[variant=line]/tabs-list:data-active:text-foreground",
|
|
2517
|
+
// size=sm:小字号 + 收紧纵向 padding(高度随 List h-8 自动收缩)
|
|
2518
|
+
"group-data-[size=sm]/tabs-list:py-0.5 group-data-[size=sm]/tabs-list:text-xs",
|
|
2506
2519
|
className
|
|
2507
2520
|
),
|
|
2508
2521
|
...props
|
|
@@ -2671,120 +2684,6 @@ function Typography({ className, variant = "p", ...props }) {
|
|
|
2671
2684
|
);
|
|
2672
2685
|
}
|
|
2673
2686
|
|
|
2674
|
-
// src/ui/bubble.tsx
|
|
2675
|
-
import * as React5 from "react";
|
|
2676
|
-
import { cva as cva7 } from "class-variance-authority";
|
|
2677
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2678
|
-
function BubbleGroup({ className, ...props }) {
|
|
2679
|
-
return /* @__PURE__ */ jsx42(
|
|
2680
|
-
"div",
|
|
2681
|
-
{
|
|
2682
|
-
"data-slot": "bubble-group",
|
|
2683
|
-
className: cn("flex min-w-0 flex-col gap-2", className),
|
|
2684
|
-
...props
|
|
2685
|
-
}
|
|
2686
|
-
);
|
|
2687
|
-
}
|
|
2688
|
-
var bubbleVariants = cva7(
|
|
2689
|
-
"group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
|
|
2690
|
-
{
|
|
2691
|
-
variants: {
|
|
2692
|
-
variant: {
|
|
2693
|
-
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
2694
|
-
secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
2695
|
-
muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
2696
|
-
tinted: "*:data-[slot=bubble-content]:bg-(--bubble-background) *:data-[slot=bubble-content]:text-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-(--bubble-hover-background)",
|
|
2697
|
-
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-card [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
2698
|
-
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
2699
|
-
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
|
|
2700
|
-
}
|
|
2701
|
-
},
|
|
2702
|
-
defaultVariants: {
|
|
2703
|
-
variant: "default"
|
|
2704
|
-
}
|
|
2705
|
-
}
|
|
2706
|
-
);
|
|
2707
|
-
function Bubble({
|
|
2708
|
-
variant = "default",
|
|
2709
|
-
align = "start",
|
|
2710
|
-
className,
|
|
2711
|
-
...props
|
|
2712
|
-
}) {
|
|
2713
|
-
return /* @__PURE__ */ jsx42(
|
|
2714
|
-
"div",
|
|
2715
|
-
{
|
|
2716
|
-
"data-slot": "bubble",
|
|
2717
|
-
"data-variant": variant,
|
|
2718
|
-
"data-align": align,
|
|
2719
|
-
className: cn(bubbleVariants({ variant }), className),
|
|
2720
|
-
...props
|
|
2721
|
-
}
|
|
2722
|
-
);
|
|
2723
|
-
}
|
|
2724
|
-
function BubbleContent({
|
|
2725
|
-
asChild = false,
|
|
2726
|
-
className,
|
|
2727
|
-
children,
|
|
2728
|
-
...props
|
|
2729
|
-
}) {
|
|
2730
|
-
const cls = cn(
|
|
2731
|
-
"w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
|
|
2732
|
-
className
|
|
2733
|
-
);
|
|
2734
|
-
if (asChild && React5.isValidElement(children)) {
|
|
2735
|
-
return React5.cloneElement(children, {
|
|
2736
|
-
"data-slot": "bubble-content",
|
|
2737
|
-
className: cn(cls, children.props.className),
|
|
2738
|
-
...props
|
|
2739
|
-
});
|
|
2740
|
-
}
|
|
2741
|
-
return /* @__PURE__ */ jsx42(
|
|
2742
|
-
"div",
|
|
2743
|
-
{
|
|
2744
|
-
"data-slot": "bubble-content",
|
|
2745
|
-
className: cls,
|
|
2746
|
-
...props,
|
|
2747
|
-
children
|
|
2748
|
-
}
|
|
2749
|
-
);
|
|
2750
|
-
}
|
|
2751
|
-
var bubbleReactionsVariants = cva7(
|
|
2752
|
-
"absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",
|
|
2753
|
-
{
|
|
2754
|
-
variants: {
|
|
2755
|
-
side: {
|
|
2756
|
-
top: "top-0 -translate-y-3/4",
|
|
2757
|
-
bottom: "bottom-0 translate-y-3/4"
|
|
2758
|
-
},
|
|
2759
|
-
align: {
|
|
2760
|
-
start: "left-3",
|
|
2761
|
-
end: "right-3"
|
|
2762
|
-
}
|
|
2763
|
-
},
|
|
2764
|
-
defaultVariants: {
|
|
2765
|
-
side: "bottom",
|
|
2766
|
-
align: "end"
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
);
|
|
2770
|
-
function BubbleReactions({
|
|
2771
|
-
side = "bottom",
|
|
2772
|
-
align = "end",
|
|
2773
|
-
className,
|
|
2774
|
-
...props
|
|
2775
|
-
}) {
|
|
2776
|
-
return /* @__PURE__ */ jsx42(
|
|
2777
|
-
"div",
|
|
2778
|
-
{
|
|
2779
|
-
"data-slot": "bubble-reactions",
|
|
2780
|
-
"data-align": align,
|
|
2781
|
-
"data-side": side,
|
|
2782
|
-
className: cn(bubbleReactionsVariants({ side, align }), className),
|
|
2783
|
-
...props
|
|
2784
|
-
}
|
|
2785
|
-
);
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
2687
|
export {
|
|
2789
2688
|
Alert,
|
|
2790
2689
|
AlertTitle,
|
|
@@ -2943,9 +2842,5 @@ export {
|
|
|
2943
2842
|
ToggleGroup,
|
|
2944
2843
|
ToggleGroupItem,
|
|
2945
2844
|
typographyVariants,
|
|
2946
|
-
Typography
|
|
2947
|
-
BubbleGroup,
|
|
2948
|
-
Bubble,
|
|
2949
|
-
BubbleContent,
|
|
2950
|
-
BubbleReactions
|
|
2845
|
+
Typography
|
|
2951
2846
|
};
|