@pactor-app/ui 1.11.0 → 1.13.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-VM4FESQB.js → chunk-AUSWAD26.js} +79 -79
- package/dist/{chunk-HW6M3BEF.js → chunk-CFUWF54N.js} +42 -8
- package/dist/{chunk-PECP7DJB.js → chunk-GQE62HDV.js} +24 -3
- package/dist/{chunk-NVORKHWX.js → chunk-NQQAPB7Q.js} +6 -4
- package/dist/{chunk-TAJXMOEX.js → chunk-V2J6FHWX.js} +2 -2
- package/dist/components/index.cjs +509 -450
- package/dist/components/index.d.cts +22 -6
- package/dist/components/index.d.ts +22 -6
- package/dist/components/index.js +4 -4
- package/dist/index.cjs +512 -453
- package/dist/index.js +5 -5
- package/dist/layout/index.cjs +23 -2
- package/dist/layout/index.js +3 -3
- package/dist/ui/index.cjs +5 -3
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
- package/styles.css +6 -0
|
@@ -158,6 +158,8 @@ interface ButtonProps {
|
|
|
158
158
|
text?: string;
|
|
159
159
|
/** 图标名(Icon 白名单,kebab-case / PascalCase 均可),渲染在文本前 */
|
|
160
160
|
icon?: string;
|
|
161
|
+
/** 提示文案:hover / focus 按钮时展示 Tooltip */
|
|
162
|
+
tooltip?: string;
|
|
161
163
|
/** 变体,默认 default */
|
|
162
164
|
variant?: ButtonVariant;
|
|
163
165
|
/** 危险态 */
|
|
@@ -180,9 +182,10 @@ interface ButtonProps {
|
|
|
180
182
|
* props 契约与 pactor-components(antd 版)一致;`submit: true` 时作为
|
|
181
183
|
* Form 的提交按钮(type=submit);danger 映射 destructive(link/text
|
|
182
184
|
* 变体保持原样、文字标红);loading 显示旋转图标并禁用(优先于 icon);
|
|
183
|
-
* `icon` 渲染文本前图标(对齐 Alert 的 icon
|
|
185
|
+
* `icon` 渲染文本前图标(对齐 Alert 的 icon 通道);`tooltip` 经 vendored
|
|
186
|
+
* Tooltip 包装(Trigger render 合并到按钮本体)。
|
|
184
187
|
*/
|
|
185
|
-
declare function Button({ text, icon, variant, danger, size, loading, disabled, submit, onClick, className, style, children, }: ButtonProps): React.JSX.Element;
|
|
188
|
+
declare function Button({ text, icon, tooltip, variant, danger, size, loading, disabled, submit, onClick, className, style, children, }: ButtonProps): React.JSX.Element;
|
|
186
189
|
|
|
187
190
|
interface ButtonGroupProps {
|
|
188
191
|
/** 通用:根节点 class(与内置样式合并) */
|
|
@@ -973,7 +976,8 @@ declare function normalizeIconName(name: string): string;
|
|
|
973
976
|
/**
|
|
974
977
|
* Icon 适配器(shadcn kit):按 name 从 lucide 白名单渲染图标。
|
|
975
978
|
* 未知名渲染占位图标(help-circle)并标 `data-unknown`,不抛错
|
|
976
|
-
* (与 chat messageActions
|
|
979
|
+
* (与 chat messageActions 图标白名单同约定);占位图标跟随上下文
|
|
980
|
+
* 文本色(currentColor),避免在 danger 等有色按钮上撞色。
|
|
977
981
|
*/
|
|
978
982
|
declare function Icon({ name, size, color, strokeWidth, className, style, }: IconProps): React.JSX.Element;
|
|
979
983
|
|
|
@@ -1689,6 +1693,10 @@ interface TabItem {
|
|
|
1689
1693
|
key: string;
|
|
1690
1694
|
label: string;
|
|
1691
1695
|
children?: DslNode[];
|
|
1696
|
+
/** 该页签内容区 class(与 Tabs 的 contentClassName 合并,此项在后) */
|
|
1697
|
+
className?: string;
|
|
1698
|
+
/** 该页签内容区内联样式(同 className 的合并规则) */
|
|
1699
|
+
style?: CSSProperties;
|
|
1692
1700
|
}
|
|
1693
1701
|
interface TabsProps {
|
|
1694
1702
|
items?: TabItem[];
|
|
@@ -1698,6 +1706,10 @@ interface TabsProps {
|
|
|
1698
1706
|
variant?: 'default' | 'line';
|
|
1699
1707
|
/** 页签切换事件,传出新激活的 key */
|
|
1700
1708
|
onChange?: (key: string) => void;
|
|
1709
|
+
/** 页签内容区 class(TabsContent 根节点,与内置样式合并) */
|
|
1710
|
+
contentClassName?: string;
|
|
1711
|
+
/** 页签内容区内联样式(同 contentClassName 的挂载规则) */
|
|
1712
|
+
contentStyle?: CSSProperties;
|
|
1701
1713
|
/** 通用:根节点 class(与内置样式合并) */
|
|
1702
1714
|
className?: string;
|
|
1703
1715
|
/** 通用:根节点内联样式 */
|
|
@@ -1708,15 +1720,19 @@ interface TabsProps {
|
|
|
1708
1720
|
* 基于 vendored shadcn Tabs(@base-ui/react),每个 pane 的内容经
|
|
1709
1721
|
* renderChildren 渲染;未传 activeKey 时缺省激活第一个页签。
|
|
1710
1722
|
*/
|
|
1711
|
-
declare function Tabs({ items, activeKey, variant, onChange, className, style }: TabsProps): React.JSX.Element;
|
|
1723
|
+
declare function Tabs({ items, activeKey, variant, onChange, contentClassName, contentStyle, className, style, }: TabsProps): React.JSX.Element;
|
|
1712
1724
|
|
|
1713
1725
|
/** DSL Text 语义类型 */
|
|
1714
1726
|
type TextType = 'default' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
1727
|
+
/** DSL Text 字号(middle 缺省继承上下文字号) */
|
|
1728
|
+
type TextSize = 'small' | 'middle' | 'large';
|
|
1715
1729
|
interface TextProps {
|
|
1716
1730
|
/** 文本内容(可含表达式);也可用 children 渲染 */
|
|
1717
1731
|
text?: string;
|
|
1718
1732
|
/** 语义类型(颜色) */
|
|
1719
1733
|
type?: TextType;
|
|
1734
|
+
/** 字号:small 12 / middle 继承(缺省)/ large 18 */
|
|
1735
|
+
size?: TextSize;
|
|
1720
1736
|
/** 加粗 */
|
|
1721
1737
|
strong?: boolean;
|
|
1722
1738
|
/** 删除线 */
|
|
@@ -1731,8 +1747,8 @@ interface TextProps {
|
|
|
1731
1747
|
style?: CSSProperties;
|
|
1732
1748
|
children?: ReactNode;
|
|
1733
1749
|
}
|
|
1734
|
-
/** Text 适配器(shadcn kit):普通文本渲染,语义类型 + 修饰(粗体/删除线/下划线/斜体) */
|
|
1735
|
-
declare function Text({ text, type, strong, delete: del, underline, italic, className, style, children, }: TextProps): React.JSX.Element;
|
|
1750
|
+
/** Text 适配器(shadcn kit):普通文本渲染,语义类型 + 字号 + 修饰(粗体/删除线/下划线/斜体) */
|
|
1751
|
+
declare function Text({ text, type, size, strong, delete: del, underline, italic, className, style, children, }: TextProps): React.JSX.Element;
|
|
1736
1752
|
|
|
1737
1753
|
interface TextareaProps {
|
|
1738
1754
|
/** 字段名;在 Form 内声明 name 即自动成为表单项 */
|
|
@@ -158,6 +158,8 @@ interface ButtonProps {
|
|
|
158
158
|
text?: string;
|
|
159
159
|
/** 图标名(Icon 白名单,kebab-case / PascalCase 均可),渲染在文本前 */
|
|
160
160
|
icon?: string;
|
|
161
|
+
/** 提示文案:hover / focus 按钮时展示 Tooltip */
|
|
162
|
+
tooltip?: string;
|
|
161
163
|
/** 变体,默认 default */
|
|
162
164
|
variant?: ButtonVariant;
|
|
163
165
|
/** 危险态 */
|
|
@@ -180,9 +182,10 @@ interface ButtonProps {
|
|
|
180
182
|
* props 契约与 pactor-components(antd 版)一致;`submit: true` 时作为
|
|
181
183
|
* Form 的提交按钮(type=submit);danger 映射 destructive(link/text
|
|
182
184
|
* 变体保持原样、文字标红);loading 显示旋转图标并禁用(优先于 icon);
|
|
183
|
-
* `icon` 渲染文本前图标(对齐 Alert 的 icon
|
|
185
|
+
* `icon` 渲染文本前图标(对齐 Alert 的 icon 通道);`tooltip` 经 vendored
|
|
186
|
+
* Tooltip 包装(Trigger render 合并到按钮本体)。
|
|
184
187
|
*/
|
|
185
|
-
declare function Button({ text, icon, variant, danger, size, loading, disabled, submit, onClick, className, style, children, }: ButtonProps): React.JSX.Element;
|
|
188
|
+
declare function Button({ text, icon, tooltip, variant, danger, size, loading, disabled, submit, onClick, className, style, children, }: ButtonProps): React.JSX.Element;
|
|
186
189
|
|
|
187
190
|
interface ButtonGroupProps {
|
|
188
191
|
/** 通用:根节点 class(与内置样式合并) */
|
|
@@ -973,7 +976,8 @@ declare function normalizeIconName(name: string): string;
|
|
|
973
976
|
/**
|
|
974
977
|
* Icon 适配器(shadcn kit):按 name 从 lucide 白名单渲染图标。
|
|
975
978
|
* 未知名渲染占位图标(help-circle)并标 `data-unknown`,不抛错
|
|
976
|
-
* (与 chat messageActions
|
|
979
|
+
* (与 chat messageActions 图标白名单同约定);占位图标跟随上下文
|
|
980
|
+
* 文本色(currentColor),避免在 danger 等有色按钮上撞色。
|
|
977
981
|
*/
|
|
978
982
|
declare function Icon({ name, size, color, strokeWidth, className, style, }: IconProps): React.JSX.Element;
|
|
979
983
|
|
|
@@ -1689,6 +1693,10 @@ interface TabItem {
|
|
|
1689
1693
|
key: string;
|
|
1690
1694
|
label: string;
|
|
1691
1695
|
children?: DslNode[];
|
|
1696
|
+
/** 该页签内容区 class(与 Tabs 的 contentClassName 合并,此项在后) */
|
|
1697
|
+
className?: string;
|
|
1698
|
+
/** 该页签内容区内联样式(同 className 的合并规则) */
|
|
1699
|
+
style?: CSSProperties;
|
|
1692
1700
|
}
|
|
1693
1701
|
interface TabsProps {
|
|
1694
1702
|
items?: TabItem[];
|
|
@@ -1698,6 +1706,10 @@ interface TabsProps {
|
|
|
1698
1706
|
variant?: 'default' | 'line';
|
|
1699
1707
|
/** 页签切换事件,传出新激活的 key */
|
|
1700
1708
|
onChange?: (key: string) => void;
|
|
1709
|
+
/** 页签内容区 class(TabsContent 根节点,与内置样式合并) */
|
|
1710
|
+
contentClassName?: string;
|
|
1711
|
+
/** 页签内容区内联样式(同 contentClassName 的挂载规则) */
|
|
1712
|
+
contentStyle?: CSSProperties;
|
|
1701
1713
|
/** 通用:根节点 class(与内置样式合并) */
|
|
1702
1714
|
className?: string;
|
|
1703
1715
|
/** 通用:根节点内联样式 */
|
|
@@ -1708,15 +1720,19 @@ interface TabsProps {
|
|
|
1708
1720
|
* 基于 vendored shadcn Tabs(@base-ui/react),每个 pane 的内容经
|
|
1709
1721
|
* renderChildren 渲染;未传 activeKey 时缺省激活第一个页签。
|
|
1710
1722
|
*/
|
|
1711
|
-
declare function Tabs({ items, activeKey, variant, onChange, className, style }: TabsProps): React.JSX.Element;
|
|
1723
|
+
declare function Tabs({ items, activeKey, variant, onChange, contentClassName, contentStyle, className, style, }: TabsProps): React.JSX.Element;
|
|
1712
1724
|
|
|
1713
1725
|
/** DSL Text 语义类型 */
|
|
1714
1726
|
type TextType = 'default' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
1727
|
+
/** DSL Text 字号(middle 缺省继承上下文字号) */
|
|
1728
|
+
type TextSize = 'small' | 'middle' | 'large';
|
|
1715
1729
|
interface TextProps {
|
|
1716
1730
|
/** 文本内容(可含表达式);也可用 children 渲染 */
|
|
1717
1731
|
text?: string;
|
|
1718
1732
|
/** 语义类型(颜色) */
|
|
1719
1733
|
type?: TextType;
|
|
1734
|
+
/** 字号:small 12 / middle 继承(缺省)/ large 18 */
|
|
1735
|
+
size?: TextSize;
|
|
1720
1736
|
/** 加粗 */
|
|
1721
1737
|
strong?: boolean;
|
|
1722
1738
|
/** 删除线 */
|
|
@@ -1731,8 +1747,8 @@ interface TextProps {
|
|
|
1731
1747
|
style?: CSSProperties;
|
|
1732
1748
|
children?: ReactNode;
|
|
1733
1749
|
}
|
|
1734
|
-
/** Text 适配器(shadcn kit):普通文本渲染,语义类型 + 修饰(粗体/删除线/下划线/斜体) */
|
|
1735
|
-
declare function Text({ text, type, strong, delete: del, underline, italic, className, style, children, }: TextProps): React.JSX.Element;
|
|
1750
|
+
/** Text 适配器(shadcn kit):普通文本渲染,语义类型 + 字号 + 修饰(粗体/删除线/下划线/斜体) */
|
|
1751
|
+
declare function Text({ text, type, size, strong, delete: del, underline, italic, className, style, children, }: TextProps): React.JSX.Element;
|
|
1736
1752
|
|
|
1737
1753
|
interface TextareaProps {
|
|
1738
1754
|
/** 字段名;在 Form 内声明 name 即自动成为表单项 */
|
package/dist/components/index.js
CHANGED
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
createComponentRegistry,
|
|
72
72
|
registerBuiltinComponents,
|
|
73
73
|
useFormContext
|
|
74
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-CFUWF54N.js";
|
|
75
75
|
import {
|
|
76
76
|
ICONS,
|
|
77
77
|
Icon,
|
|
@@ -80,10 +80,10 @@ import {
|
|
|
80
80
|
Sidebar,
|
|
81
81
|
normalizeIconName,
|
|
82
82
|
useSidebarDrawer
|
|
83
|
-
} from "../chunk-
|
|
84
|
-
import "../chunk-
|
|
83
|
+
} from "../chunk-GQE62HDV.js";
|
|
84
|
+
import "../chunk-NQQAPB7Q.js";
|
|
85
85
|
import "../chunk-XUHJ5YSG.js";
|
|
86
|
-
import "../chunk-
|
|
86
|
+
import "../chunk-AUSWAD26.js";
|
|
87
87
|
import "../chunk-WKJUCGV4.js";
|
|
88
88
|
export {
|
|
89
89
|
Accordion,
|