@pactor-app/ui 0.1.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/LICENSE +21 -0
- package/README.md +113 -0
- package/dist/chunk-57NRUZ5G.js +95 -0
- package/dist/chunk-DMK6RSTK.js +746 -0
- package/dist/chunk-OH3U6PCM.js +536 -0
- package/dist/chunk-OUTSIJMO.js +442 -0
- package/dist/chunk-QDTVOJ5P.js +147 -0
- package/dist/chunk-QWZ23QLS.js +68 -0
- package/dist/chunk-RQHJBTEU.js +10 -0
- package/dist/chunk-SNFDI77B.js +136 -0
- package/dist/chunk-XGOTHOI6.js +619 -0
- package/dist/components/index.cjs +1111 -0
- package/dist/components/index.d.cts +307 -0
- package/dist/components/index.d.ts +307 -0
- package/dist/components/index.js +40 -0
- package/dist/index.cjs +2626 -0
- package/dist/index.d.cts +41 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +87 -0
- package/dist/interaction/index.cjs +752 -0
- package/dist/interaction/index.d.cts +178 -0
- package/dist/interaction/index.d.ts +178 -0
- package/dist/interaction/index.js +19 -0
- package/dist/layout/index.cjs +938 -0
- package/dist/layout/index.d.cts +158 -0
- package/dist/layout/index.d.ts +158 -0
- package/dist/layout/index.js +25 -0
- package/dist/ui/index.cjs +1076 -0
- package/dist/ui/index.d.cts +166 -0
- package/dist/ui/index.d.ts +166 -0
- package/dist/ui/index.js +233 -0
- package/package.json +127 -0
- package/styles.css +1672 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
6
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
7
|
+
import { Select as Select$1 } from '@base-ui/react/select';
|
|
8
|
+
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
9
|
+
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* shadcn/ui Accordion(vendored 源码,Base UI 原语)。
|
|
13
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/accordion.json
|
|
14
|
+
* 保留 Radix 形态导出契约(`type="single"|"multiple"`、value/defaultValue
|
|
15
|
+
* 接受单值或数组),适配层换算为 Base UI 的 `multiple` prop 与数组值。
|
|
16
|
+
*/
|
|
17
|
+
type AccordionProps = Omit<Accordion$1.Root.Props<string>, 'value' | 'defaultValue' | 'onValueChange' | 'multiple'> & {
|
|
18
|
+
/** 缺省 single;multiple 时多个项可同时展开 */
|
|
19
|
+
type?: 'single' | 'multiple';
|
|
20
|
+
value?: string | string[];
|
|
21
|
+
defaultValue?: string | string[];
|
|
22
|
+
onValueChange?: (value: string | string[]) => void;
|
|
23
|
+
};
|
|
24
|
+
declare function Accordion({ type, value, defaultValue, onValueChange, ...props }: AccordionProps): React.JSX.Element;
|
|
25
|
+
declare function AccordionItem({ className, ...props }: Accordion$1.Item.Props): React.JSX.Element;
|
|
26
|
+
declare function AccordionTrigger({ className, children, ...props }: Accordion$1.Trigger.Props): React.JSX.Element;
|
|
27
|
+
declare function AccordionContent({ className, children, ...props }: Accordion$1.Panel.Props): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* shadcn/ui Alert(vendored 源码,按 DSL 契约扩展 success/warning/info 变体;
|
|
31
|
+
* 语义色读取 --success/--warning/--info 令牌,见 src/styles.css)
|
|
32
|
+
*/
|
|
33
|
+
declare const alertVariants: (props?: ({
|
|
34
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
35
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
36
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
37
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
38
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
39
|
+
|
|
40
|
+
/** shadcn/ui Badge(vendored 源码) */
|
|
41
|
+
declare const badgeVariants: (props?: ({
|
|
42
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
43
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
44
|
+
declare function Badge({ className, variant, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants>): React.JSX.Element;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* shadcn/ui Button(vendored 源码,Tailwind v4 版,Base UI 原语)。
|
|
48
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/button.json
|
|
49
|
+
* `asChild` 语义经 Base UI 的 `render` 模式消化(合并 props 到唯一子元素)。
|
|
50
|
+
*/
|
|
51
|
+
declare const buttonVariants: (props?: ({
|
|
52
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
53
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
54
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
55
|
+
declare function Button({ className, variant, size, asChild, children, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
56
|
+
asChild?: boolean;
|
|
57
|
+
}): React.JSX.Element;
|
|
58
|
+
|
|
59
|
+
/** shadcn/ui Card(vendored 源码) */
|
|
60
|
+
declare function Card({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
61
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
62
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
63
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
64
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
65
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
66
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* shadcn/ui Dialog(vendored 源码,Base UI 原语)。
|
|
70
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/dialog.json
|
|
71
|
+
* Radix Overlay/Content → Base UI Backdrop/Popup;动画类由
|
|
72
|
+
* `data-[state=*]` 换成官方 `data-open`/`data-closed` 自定义变体。
|
|
73
|
+
*/
|
|
74
|
+
declare function Dialog({ ...props }: Dialog$1.Root.Props): React.JSX.Element;
|
|
75
|
+
declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React.JSX.Element;
|
|
76
|
+
declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): React.JSX.Element;
|
|
77
|
+
declare function DialogClose({ ...props }: Dialog$1.Close.Props): React.JSX.Element;
|
|
78
|
+
declare function DialogOverlay({ className, ...props }: Dialog$1.Backdrop.Props): React.JSX.Element;
|
|
79
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
80
|
+
showCloseButton?: boolean;
|
|
81
|
+
}): React.JSX.Element;
|
|
82
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
83
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
84
|
+
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): React.JSX.Element;
|
|
85
|
+
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): React.JSX.Element;
|
|
86
|
+
|
|
87
|
+
/** shadcn/ui Input(vendored 源码,Tailwind v4 版) */
|
|
88
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* shadcn/ui Label(vendored 源码)。
|
|
92
|
+
* Base UI 无独立 Label 原语(官方 base 版直接渲染原生 `<label>`),
|
|
93
|
+
* 保持同导出与 data-slot。
|
|
94
|
+
*/
|
|
95
|
+
declare function Label({ className, ...props }: React.ComponentProps<'label'>): React.JSX.Element;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* shadcn/ui Popover(vendored 源码,Base UI 原语)。
|
|
99
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/popover.json
|
|
100
|
+
* side/sideOffset/align/anchor 落到 Base UI 的 Positioner(anchor 支持
|
|
101
|
+
* 虚拟元素,供宿主以 getBoundingClientRect 锚定外部触发源);动画类用官方
|
|
102
|
+
* `data-open`/`data-closed` 自定义变体。
|
|
103
|
+
*/
|
|
104
|
+
declare function Popover({ ...props }: Popover$1.Root.Props): React.JSX.Element;
|
|
105
|
+
declare function PopoverTrigger({ ...props }: Popover$1.Trigger.Props): React.JSX.Element;
|
|
106
|
+
declare function PopoverContent({ className, align, side, sideOffset, anchor, ...props }: Popover$1.Popup.Props & Pick<Popover$1.Positioner.Props, 'align' | 'side' | 'sideOffset' | 'anchor'>): React.JSX.Element;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* shadcn/ui Select(vendored 源码,Base UI 原语)。
|
|
110
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/select.json
|
|
111
|
+
* 动画类用官方 `data-open`/`data-closed` 自定义变体;Base UI Select 的
|
|
112
|
+
* value 支持任意类型(不再需要 JSON 编码),`items` 提供 value→label
|
|
113
|
+
* 映射(选中项未渲染过 popup 时 Trigger 也能显示 label)。
|
|
114
|
+
*/
|
|
115
|
+
declare const Select: typeof Select$1.Root;
|
|
116
|
+
declare function SelectGroup({ ...props }: Select$1.Group.Props): React.JSX.Element;
|
|
117
|
+
declare function SelectValue({ ...props }: Select$1.Value.Props): React.JSX.Element;
|
|
118
|
+
declare function SelectTrigger({ className, size, children, ...props }: Select$1.Trigger.Props & {
|
|
119
|
+
size?: 'sm' | 'default';
|
|
120
|
+
}): React.JSX.Element;
|
|
121
|
+
declare function SelectContent({ className, children, side, sideOffset, align, alignItemWithTrigger, ...props }: Select$1.Popup.Props & Pick<Select$1.Positioner.Props, 'align' | 'side' | 'sideOffset' | 'alignItemWithTrigger'>): React.JSX.Element;
|
|
122
|
+
declare function SelectLabel({ className, ...props }: Select$1.GroupLabel.Props): React.JSX.Element;
|
|
123
|
+
declare function SelectItem({ className, children, ...props }: Select$1.Item.Props): React.JSX.Element;
|
|
124
|
+
declare function SelectSeparator({ className, ...props }: Select$1.Separator.Props): React.JSX.Element;
|
|
125
|
+
declare function SelectScrollUpButton({ className, ...props }: Select$1.ScrollUpArrow.Props): React.JSX.Element;
|
|
126
|
+
declare function SelectScrollDownButton({ className, ...props }: Select$1.ScrollDownArrow.Props): React.JSX.Element;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* shadcn/ui Separator(vendored 源码,Base UI 原语)。
|
|
130
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/separator.json
|
|
131
|
+
* Base UI Separator 无 `decorative` prop(始终为可访问的 separator 角色),
|
|
132
|
+
* 该 prop 仅为保持导出表面而保留、不再透传。
|
|
133
|
+
*/
|
|
134
|
+
declare function Separator({ className, orientation, decorative: _decorative, ...props }: Omit<Separator$1.Props, 'orientation'> & {
|
|
135
|
+
orientation?: 'horizontal' | 'vertical';
|
|
136
|
+
decorative?: boolean;
|
|
137
|
+
}): React.JSX.Element;
|
|
138
|
+
|
|
139
|
+
/** shadcn/ui Skeleton(vendored 源码) */
|
|
140
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
141
|
+
|
|
142
|
+
/** shadcn/ui Table(vendored 源码) */
|
|
143
|
+
declare function Table({ className, ...props }: React.ComponentProps<'table'>): React.JSX.Element;
|
|
144
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): React.JSX.Element;
|
|
145
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): React.JSX.Element;
|
|
146
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): React.JSX.Element;
|
|
147
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): React.JSX.Element;
|
|
148
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): React.JSX.Element;
|
|
149
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): React.JSX.Element;
|
|
150
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): React.JSX.Element;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* shadcn/ui Tabs(vendored 源码,Base UI 原语)。
|
|
154
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/tabs.json
|
|
155
|
+
* Root/List/Tab/Panel 对应原 Radix Root/List/Trigger/Content;激活态属性
|
|
156
|
+
* 由 `data-[state=active]` 换成官方 `data-active` 自定义变体。
|
|
157
|
+
*/
|
|
158
|
+
declare function Tabs({ className, ...props }: Tabs$1.Root.Props): React.JSX.Element;
|
|
159
|
+
declare function TabsList({ className, ...props }: Tabs$1.List.Props): React.JSX.Element;
|
|
160
|
+
declare function TabsTrigger({ className, ...props }: Tabs$1.Tab.Props): React.JSX.Element;
|
|
161
|
+
declare function TabsContent({ className, ...props }: Tabs$1.Panel.Props): React.JSX.Element;
|
|
162
|
+
|
|
163
|
+
/** shadcn/ui Textarea(vendored 源码,Tailwind v4 版) */
|
|
164
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): React.JSX.Element;
|
|
165
|
+
|
|
166
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Popover, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, badgeVariants, buttonVariants };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
6
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
7
|
+
import { Select as Select$1 } from '@base-ui/react/select';
|
|
8
|
+
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
9
|
+
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* shadcn/ui Accordion(vendored 源码,Base UI 原语)。
|
|
13
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/accordion.json
|
|
14
|
+
* 保留 Radix 形态导出契约(`type="single"|"multiple"`、value/defaultValue
|
|
15
|
+
* 接受单值或数组),适配层换算为 Base UI 的 `multiple` prop 与数组值。
|
|
16
|
+
*/
|
|
17
|
+
type AccordionProps = Omit<Accordion$1.Root.Props<string>, 'value' | 'defaultValue' | 'onValueChange' | 'multiple'> & {
|
|
18
|
+
/** 缺省 single;multiple 时多个项可同时展开 */
|
|
19
|
+
type?: 'single' | 'multiple';
|
|
20
|
+
value?: string | string[];
|
|
21
|
+
defaultValue?: string | string[];
|
|
22
|
+
onValueChange?: (value: string | string[]) => void;
|
|
23
|
+
};
|
|
24
|
+
declare function Accordion({ type, value, defaultValue, onValueChange, ...props }: AccordionProps): React.JSX.Element;
|
|
25
|
+
declare function AccordionItem({ className, ...props }: Accordion$1.Item.Props): React.JSX.Element;
|
|
26
|
+
declare function AccordionTrigger({ className, children, ...props }: Accordion$1.Trigger.Props): React.JSX.Element;
|
|
27
|
+
declare function AccordionContent({ className, children, ...props }: Accordion$1.Panel.Props): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* shadcn/ui Alert(vendored 源码,按 DSL 契约扩展 success/warning/info 变体;
|
|
31
|
+
* 语义色读取 --success/--warning/--info 令牌,见 src/styles.css)
|
|
32
|
+
*/
|
|
33
|
+
declare const alertVariants: (props?: ({
|
|
34
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
35
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
36
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
37
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
38
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
39
|
+
|
|
40
|
+
/** shadcn/ui Badge(vendored 源码) */
|
|
41
|
+
declare const badgeVariants: (props?: ({
|
|
42
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
43
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
44
|
+
declare function Badge({ className, variant, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants>): React.JSX.Element;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* shadcn/ui Button(vendored 源码,Tailwind v4 版,Base UI 原语)。
|
|
48
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/button.json
|
|
49
|
+
* `asChild` 语义经 Base UI 的 `render` 模式消化(合并 props 到唯一子元素)。
|
|
50
|
+
*/
|
|
51
|
+
declare const buttonVariants: (props?: ({
|
|
52
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
53
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
54
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
55
|
+
declare function Button({ className, variant, size, asChild, children, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
56
|
+
asChild?: boolean;
|
|
57
|
+
}): React.JSX.Element;
|
|
58
|
+
|
|
59
|
+
/** shadcn/ui Card(vendored 源码) */
|
|
60
|
+
declare function Card({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
61
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
62
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
63
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
64
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
65
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
66
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* shadcn/ui Dialog(vendored 源码,Base UI 原语)。
|
|
70
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/dialog.json
|
|
71
|
+
* Radix Overlay/Content → Base UI Backdrop/Popup;动画类由
|
|
72
|
+
* `data-[state=*]` 换成官方 `data-open`/`data-closed` 自定义变体。
|
|
73
|
+
*/
|
|
74
|
+
declare function Dialog({ ...props }: Dialog$1.Root.Props): React.JSX.Element;
|
|
75
|
+
declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React.JSX.Element;
|
|
76
|
+
declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): React.JSX.Element;
|
|
77
|
+
declare function DialogClose({ ...props }: Dialog$1.Close.Props): React.JSX.Element;
|
|
78
|
+
declare function DialogOverlay({ className, ...props }: Dialog$1.Backdrop.Props): React.JSX.Element;
|
|
79
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
80
|
+
showCloseButton?: boolean;
|
|
81
|
+
}): React.JSX.Element;
|
|
82
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
83
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
84
|
+
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): React.JSX.Element;
|
|
85
|
+
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): React.JSX.Element;
|
|
86
|
+
|
|
87
|
+
/** shadcn/ui Input(vendored 源码,Tailwind v4 版) */
|
|
88
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* shadcn/ui Label(vendored 源码)。
|
|
92
|
+
* Base UI 无独立 Label 原语(官方 base 版直接渲染原生 `<label>`),
|
|
93
|
+
* 保持同导出与 data-slot。
|
|
94
|
+
*/
|
|
95
|
+
declare function Label({ className, ...props }: React.ComponentProps<'label'>): React.JSX.Element;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* shadcn/ui Popover(vendored 源码,Base UI 原语)。
|
|
99
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/popover.json
|
|
100
|
+
* side/sideOffset/align/anchor 落到 Base UI 的 Positioner(anchor 支持
|
|
101
|
+
* 虚拟元素,供宿主以 getBoundingClientRect 锚定外部触发源);动画类用官方
|
|
102
|
+
* `data-open`/`data-closed` 自定义变体。
|
|
103
|
+
*/
|
|
104
|
+
declare function Popover({ ...props }: Popover$1.Root.Props): React.JSX.Element;
|
|
105
|
+
declare function PopoverTrigger({ ...props }: Popover$1.Trigger.Props): React.JSX.Element;
|
|
106
|
+
declare function PopoverContent({ className, align, side, sideOffset, anchor, ...props }: Popover$1.Popup.Props & Pick<Popover$1.Positioner.Props, 'align' | 'side' | 'sideOffset' | 'anchor'>): React.JSX.Element;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* shadcn/ui Select(vendored 源码,Base UI 原语)。
|
|
110
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/select.json
|
|
111
|
+
* 动画类用官方 `data-open`/`data-closed` 自定义变体;Base UI Select 的
|
|
112
|
+
* value 支持任意类型(不再需要 JSON 编码),`items` 提供 value→label
|
|
113
|
+
* 映射(选中项未渲染过 popup 时 Trigger 也能显示 label)。
|
|
114
|
+
*/
|
|
115
|
+
declare const Select: typeof Select$1.Root;
|
|
116
|
+
declare function SelectGroup({ ...props }: Select$1.Group.Props): React.JSX.Element;
|
|
117
|
+
declare function SelectValue({ ...props }: Select$1.Value.Props): React.JSX.Element;
|
|
118
|
+
declare function SelectTrigger({ className, size, children, ...props }: Select$1.Trigger.Props & {
|
|
119
|
+
size?: 'sm' | 'default';
|
|
120
|
+
}): React.JSX.Element;
|
|
121
|
+
declare function SelectContent({ className, children, side, sideOffset, align, alignItemWithTrigger, ...props }: Select$1.Popup.Props & Pick<Select$1.Positioner.Props, 'align' | 'side' | 'sideOffset' | 'alignItemWithTrigger'>): React.JSX.Element;
|
|
122
|
+
declare function SelectLabel({ className, ...props }: Select$1.GroupLabel.Props): React.JSX.Element;
|
|
123
|
+
declare function SelectItem({ className, children, ...props }: Select$1.Item.Props): React.JSX.Element;
|
|
124
|
+
declare function SelectSeparator({ className, ...props }: Select$1.Separator.Props): React.JSX.Element;
|
|
125
|
+
declare function SelectScrollUpButton({ className, ...props }: Select$1.ScrollUpArrow.Props): React.JSX.Element;
|
|
126
|
+
declare function SelectScrollDownButton({ className, ...props }: Select$1.ScrollDownArrow.Props): React.JSX.Element;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* shadcn/ui Separator(vendored 源码,Base UI 原语)。
|
|
130
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/separator.json
|
|
131
|
+
* Base UI Separator 无 `decorative` prop(始终为可访问的 separator 角色),
|
|
132
|
+
* 该 prop 仅为保持导出表面而保留、不再透传。
|
|
133
|
+
*/
|
|
134
|
+
declare function Separator({ className, orientation, decorative: _decorative, ...props }: Omit<Separator$1.Props, 'orientation'> & {
|
|
135
|
+
orientation?: 'horizontal' | 'vertical';
|
|
136
|
+
decorative?: boolean;
|
|
137
|
+
}): React.JSX.Element;
|
|
138
|
+
|
|
139
|
+
/** shadcn/ui Skeleton(vendored 源码) */
|
|
140
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
141
|
+
|
|
142
|
+
/** shadcn/ui Table(vendored 源码) */
|
|
143
|
+
declare function Table({ className, ...props }: React.ComponentProps<'table'>): React.JSX.Element;
|
|
144
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): React.JSX.Element;
|
|
145
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): React.JSX.Element;
|
|
146
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): React.JSX.Element;
|
|
147
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): React.JSX.Element;
|
|
148
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): React.JSX.Element;
|
|
149
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): React.JSX.Element;
|
|
150
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): React.JSX.Element;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* shadcn/ui Tabs(vendored 源码,Base UI 原语)。
|
|
154
|
+
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/tabs.json
|
|
155
|
+
* Root/List/Tab/Panel 对应原 Radix Root/List/Trigger/Content;激活态属性
|
|
156
|
+
* 由 `data-[state=active]` 换成官方 `data-active` 自定义变体。
|
|
157
|
+
*/
|
|
158
|
+
declare function Tabs({ className, ...props }: Tabs$1.Root.Props): React.JSX.Element;
|
|
159
|
+
declare function TabsList({ className, ...props }: Tabs$1.List.Props): React.JSX.Element;
|
|
160
|
+
declare function TabsTrigger({ className, ...props }: Tabs$1.Tab.Props): React.JSX.Element;
|
|
161
|
+
declare function TabsContent({ className, ...props }: Tabs$1.Panel.Props): React.JSX.Element;
|
|
162
|
+
|
|
163
|
+
/** shadcn/ui Textarea(vendored 源码,Tailwind v4 版) */
|
|
164
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): React.JSX.Element;
|
|
165
|
+
|
|
166
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Popover, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, badgeVariants, buttonVariants };
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
AlertDescription,
|
|
4
|
+
AlertTitle,
|
|
5
|
+
Input,
|
|
6
|
+
Select,
|
|
7
|
+
SelectContent,
|
|
8
|
+
SelectGroup,
|
|
9
|
+
SelectItem,
|
|
10
|
+
SelectLabel,
|
|
11
|
+
SelectScrollDownButton,
|
|
12
|
+
SelectScrollUpButton,
|
|
13
|
+
SelectSeparator,
|
|
14
|
+
SelectTrigger,
|
|
15
|
+
SelectValue,
|
|
16
|
+
Table,
|
|
17
|
+
TableBody,
|
|
18
|
+
TableCaption,
|
|
19
|
+
TableCell,
|
|
20
|
+
TableFooter,
|
|
21
|
+
TableHead,
|
|
22
|
+
TableHeader,
|
|
23
|
+
TableRow,
|
|
24
|
+
Tabs,
|
|
25
|
+
TabsContent,
|
|
26
|
+
TabsList,
|
|
27
|
+
TabsTrigger
|
|
28
|
+
} from "../chunk-OUTSIJMO.js";
|
|
29
|
+
import {
|
|
30
|
+
Dialog,
|
|
31
|
+
DialogClose,
|
|
32
|
+
DialogContent,
|
|
33
|
+
DialogDescription,
|
|
34
|
+
DialogFooter,
|
|
35
|
+
DialogHeader,
|
|
36
|
+
DialogOverlay,
|
|
37
|
+
DialogPortal,
|
|
38
|
+
DialogTitle,
|
|
39
|
+
DialogTrigger
|
|
40
|
+
} from "../chunk-QDTVOJ5P.js";
|
|
41
|
+
import {
|
|
42
|
+
Button,
|
|
43
|
+
buttonVariants
|
|
44
|
+
} from "../chunk-QWZ23QLS.js";
|
|
45
|
+
import {
|
|
46
|
+
Accordion,
|
|
47
|
+
AccordionContent,
|
|
48
|
+
AccordionItem,
|
|
49
|
+
AccordionTrigger,
|
|
50
|
+
Popover,
|
|
51
|
+
PopoverContent,
|
|
52
|
+
PopoverTrigger
|
|
53
|
+
} from "../chunk-SNFDI77B.js";
|
|
54
|
+
import {
|
|
55
|
+
Card,
|
|
56
|
+
CardAction,
|
|
57
|
+
CardContent,
|
|
58
|
+
CardDescription,
|
|
59
|
+
CardFooter,
|
|
60
|
+
CardHeader,
|
|
61
|
+
CardTitle
|
|
62
|
+
} from "../chunk-57NRUZ5G.js";
|
|
63
|
+
import {
|
|
64
|
+
cn
|
|
65
|
+
} from "../chunk-RQHJBTEU.js";
|
|
66
|
+
|
|
67
|
+
// src/ui/badge.tsx
|
|
68
|
+
import { cva } from "class-variance-authority";
|
|
69
|
+
import { jsx } from "react/jsx-runtime";
|
|
70
|
+
var badgeVariants = cva(
|
|
71
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
72
|
+
{
|
|
73
|
+
variants: {
|
|
74
|
+
variant: {
|
|
75
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
76
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
77
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
78
|
+
outline: "border-border text-foreground"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
defaultVariants: {
|
|
82
|
+
variant: "default"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
function Badge({
|
|
87
|
+
className,
|
|
88
|
+
variant,
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
"span",
|
|
93
|
+
{
|
|
94
|
+
"data-slot": "badge",
|
|
95
|
+
className: cn(badgeVariants({ variant }), className),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/ui/label.tsx
|
|
102
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
103
|
+
function Label({
|
|
104
|
+
className,
|
|
105
|
+
...props
|
|
106
|
+
}) {
|
|
107
|
+
return /* @__PURE__ */ jsx2(
|
|
108
|
+
"label",
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "label",
|
|
111
|
+
className: cn(
|
|
112
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// src/ui/separator.tsx
|
|
121
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
122
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
123
|
+
function Separator({
|
|
124
|
+
className,
|
|
125
|
+
orientation = "horizontal",
|
|
126
|
+
decorative: _decorative,
|
|
127
|
+
...props
|
|
128
|
+
}) {
|
|
129
|
+
return /* @__PURE__ */ jsx3(
|
|
130
|
+
SeparatorPrimitive,
|
|
131
|
+
{
|
|
132
|
+
"data-slot": "separator",
|
|
133
|
+
orientation,
|
|
134
|
+
className: cn(
|
|
135
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
136
|
+
className
|
|
137
|
+
),
|
|
138
|
+
...props
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// src/ui/skeleton.tsx
|
|
144
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
145
|
+
function Skeleton({ className, ...props }) {
|
|
146
|
+
return /* @__PURE__ */ jsx4(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "skeleton",
|
|
150
|
+
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
151
|
+
...props
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// src/ui/textarea.tsx
|
|
157
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
158
|
+
function Textarea({
|
|
159
|
+
className,
|
|
160
|
+
...props
|
|
161
|
+
}) {
|
|
162
|
+
return /* @__PURE__ */ jsx5(
|
|
163
|
+
"textarea",
|
|
164
|
+
{
|
|
165
|
+
"data-slot": "textarea",
|
|
166
|
+
className: cn(
|
|
167
|
+
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
168
|
+
className
|
|
169
|
+
),
|
|
170
|
+
...props
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
export {
|
|
175
|
+
Accordion,
|
|
176
|
+
AccordionContent,
|
|
177
|
+
AccordionItem,
|
|
178
|
+
AccordionTrigger,
|
|
179
|
+
Alert,
|
|
180
|
+
AlertDescription,
|
|
181
|
+
AlertTitle,
|
|
182
|
+
Badge,
|
|
183
|
+
Button,
|
|
184
|
+
Card,
|
|
185
|
+
CardAction,
|
|
186
|
+
CardContent,
|
|
187
|
+
CardDescription,
|
|
188
|
+
CardFooter,
|
|
189
|
+
CardHeader,
|
|
190
|
+
CardTitle,
|
|
191
|
+
Dialog,
|
|
192
|
+
DialogClose,
|
|
193
|
+
DialogContent,
|
|
194
|
+
DialogDescription,
|
|
195
|
+
DialogFooter,
|
|
196
|
+
DialogHeader,
|
|
197
|
+
DialogOverlay,
|
|
198
|
+
DialogPortal,
|
|
199
|
+
DialogTitle,
|
|
200
|
+
DialogTrigger,
|
|
201
|
+
Input,
|
|
202
|
+
Label,
|
|
203
|
+
Popover,
|
|
204
|
+
PopoverContent,
|
|
205
|
+
PopoverTrigger,
|
|
206
|
+
Select,
|
|
207
|
+
SelectContent,
|
|
208
|
+
SelectGroup,
|
|
209
|
+
SelectItem,
|
|
210
|
+
SelectLabel,
|
|
211
|
+
SelectScrollDownButton,
|
|
212
|
+
SelectScrollUpButton,
|
|
213
|
+
SelectSeparator,
|
|
214
|
+
SelectTrigger,
|
|
215
|
+
SelectValue,
|
|
216
|
+
Separator,
|
|
217
|
+
Skeleton,
|
|
218
|
+
Table,
|
|
219
|
+
TableBody,
|
|
220
|
+
TableCaption,
|
|
221
|
+
TableCell,
|
|
222
|
+
TableFooter,
|
|
223
|
+
TableHead,
|
|
224
|
+
TableHeader,
|
|
225
|
+
TableRow,
|
|
226
|
+
Tabs,
|
|
227
|
+
TabsContent,
|
|
228
|
+
TabsList,
|
|
229
|
+
TabsTrigger,
|
|
230
|
+
Textarea,
|
|
231
|
+
badgeVariants,
|
|
232
|
+
buttonVariants
|
|
233
|
+
};
|