@pactor-app/ui 1.12.0 → 1.14.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.
@@ -219,7 +219,28 @@ var ICONS = {
219
219
  "rotate-ccw": RotateCcw,
220
220
  quote: Quote,
221
221
  chat: MessageSquare,
222
- brain: Brain
222
+ brain: Brain,
223
+ // lucide 规范名别名(kebab-case 原名直通;上方短别名保留兼容)——
224
+ // 白名单文档承诺 kebab-case 键,缺别名时规范名(如 trash-2)会落入未知占位
225
+ "trash-2": Trash2,
226
+ "share-2": Share2,
227
+ "building-2": Building2,
228
+ house: House,
229
+ "triangle-alert": TriangleAlert,
230
+ "circle-alert": CircleAlert,
231
+ "circle-check": CircleCheck,
232
+ "circle-x": CircleX,
233
+ "circle-question-mark": CircleQuestionMark,
234
+ "square-pen": SquarePen,
235
+ "refresh-ccw": RefreshCcw,
236
+ "chart-column": ChartColumn,
237
+ "layout-grid": LayoutGrid,
238
+ funnel: Funnel,
239
+ "loader-circle": LoaderCircle,
240
+ ellipsis: Ellipsis,
241
+ "ellipsis-vertical": EllipsisVertical,
242
+ "message-circle": MessageCircle,
243
+ "lock-open": LockOpen
223
244
  };
224
245
  function normalizeIconName(name) {
225
246
  return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
@@ -249,7 +270,7 @@ function Icon({
249
270
  size: px,
250
271
  color,
251
272
  strokeWidth,
252
- className: cn("shrink-0 text-muted-foreground", className),
273
+ className: cn("shrink-0", className),
253
274
  style,
254
275
  "aria-hidden": "true"
255
276
  }
@@ -2,7 +2,7 @@ import {
2
2
  Icon,
3
3
  Menu,
4
4
  Sidebar
5
- } from "./chunk-2B5YV2HR.js";
5
+ } from "./chunk-GQE62HDV.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-XEK5NQJA.js";
144
+ } from "./chunk-NQQAPB7Q.js";
145
145
  import {
146
146
  Dialog,
147
147
  DialogContent,
@@ -1645,18 +1645,49 @@ function Empty2({ title, description, children, className, style }) {
1645
1645
 
1646
1646
  // src/components/components/Field/index.tsx
1647
1647
  import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
1648
- function Field2({ label, required, description, error, children, className, style }) {
1648
+ function Field2({
1649
+ label,
1650
+ required,
1651
+ description,
1652
+ error,
1653
+ children,
1654
+ className,
1655
+ style,
1656
+ labelClassName,
1657
+ labelStyle,
1658
+ controlClassName,
1659
+ controlStyle,
1660
+ descriptionClassName,
1661
+ descriptionStyle,
1662
+ errorClassName,
1663
+ errorStyle
1664
+ }) {
1649
1665
  return /* @__PURE__ */ jsxs23(Field, { className, style, children: [
1650
- label ? /* @__PURE__ */ jsxs23(FieldLabel, { children: [
1666
+ label ? /* @__PURE__ */ jsxs23(FieldLabel, { className: labelClassName, style: labelStyle, children: [
1651
1667
  required ? /* @__PURE__ */ jsxs23("span", { "aria-hidden": true, className: "text-destructive", children: [
1652
1668
  "*",
1653
1669
  " "
1654
1670
  ] }) : null,
1655
1671
  label
1656
1672
  ] }) : null,
1657
- children,
1658
- description ? /* @__PURE__ */ jsx28(FieldDescription, { children: description }) : null,
1659
- error ? /* @__PURE__ */ jsx28(FieldError, { match: true, children: error }) : null
1673
+ /* @__PURE__ */ jsx28(
1674
+ "div",
1675
+ {
1676
+ "data-slot": "field-control",
1677
+ className: cn(label ? "mt-2" : void 0, controlClassName),
1678
+ style: controlStyle,
1679
+ children
1680
+ }
1681
+ ),
1682
+ description ? /* @__PURE__ */ jsx28(
1683
+ FieldDescription,
1684
+ {
1685
+ className: descriptionClassName,
1686
+ style: descriptionStyle,
1687
+ children: description
1688
+ }
1689
+ ) : null,
1690
+ error ? /* @__PURE__ */ jsx28(FieldError, { match: true, className: errorClassName, style: errorStyle, children: error }) : null
1660
1691
  ] });
1661
1692
  }
1662
1693
 
@@ -3177,7 +3208,16 @@ function Table2({
3177
3208
  // src/components/components/Tabs/index.tsx
3178
3209
  import { useRenderer as useRenderer16 } from "@pactor-app/runtime";
3179
3210
  import { jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
3180
- function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
3211
+ function Tabs2({
3212
+ items = [],
3213
+ activeKey,
3214
+ variant,
3215
+ onChange,
3216
+ contentClassName,
3217
+ contentStyle,
3218
+ className,
3219
+ style
3220
+ }) {
3181
3221
  const { renderChildren } = useRenderer16();
3182
3222
  return /* @__PURE__ */ jsxs44(
3183
3223
  Tabs,
@@ -3189,7 +3229,16 @@ function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
3189
3229
  style,
3190
3230
  children: [
3191
3231
  /* @__PURE__ */ jsx64(TabsList, { variant, children: items.map((item) => /* @__PURE__ */ jsx64(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
3192
- items.map((item) => /* @__PURE__ */ jsx64(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
3232
+ items.map((item) => /* @__PURE__ */ jsx64(
3233
+ TabsContent,
3234
+ {
3235
+ value: item.key,
3236
+ className: cn(contentClassName, item.className),
3237
+ style: { ...contentStyle, ...item.style },
3238
+ children: renderChildren(item.children)
3239
+ },
3240
+ item.key
3241
+ ))
3193
3242
  ]
3194
3243
  }
3195
3244
  );
@@ -2476,7 +2476,8 @@ var tabsListVariants = cva4(
2476
2476
  variants: {
2477
2477
  variant: {
2478
2478
  default: "h-9 rounded-lg bg-muted p-[3px]",
2479
- line: "h-auto gap-1 rounded-none border-b border-border bg-transparent p-0"
2479
+ // line:页签栏通栏(下划线轨道占满容器宽),触发器自然宽度靠左排列
2480
+ line: "h-auto w-full justify-start gap-1 rounded-none border-b border-border bg-transparent p-0"
2480
2481
  }
2481
2482
  },
2482
2483
  defaultVariants: {
@@ -2512,8 +2513,9 @@ function TabsTrigger({
2512
2513
  // default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
2513
2514
  "group-data-[variant=default]/tabs-list:data-active:border-border group-data-[variant=default]/tabs-list:data-active:bg-card group-data-[variant=default]/tabs-list:data-active:shadow-sm",
2514
2515
  // line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
2515
- //(叠在 List 的底边轨道上),无底色/圆角/阴影
2516
- "group-data-[variant=line]/tabs-list:-mb-px group-data-[variant=line]/tabs-list:h-9 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",
2516
+ //(叠在 List 的底边轨道上),无底色/圆角/阴影;通栏 List 下取消
2517
+ // flex-1 拉伸,触发器保持自然宽度
2518
+ "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
2519
  className
2518
2520
  ),
2519
2521
  ...props
@@ -2,7 +2,7 @@ import {
2
2
  Icon,
3
3
  Menu,
4
4
  Sidebar
5
- } from "./chunk-2B5YV2HR.js";
5
+ } from "./chunk-GQE62HDV.js";
6
6
  import {
7
7
  Accordion,
8
8
  AccordionContent,
@@ -396,7 +396,28 @@ var ICONS = {
396
396
  "rotate-ccw": import_lucide_react2.RotateCcw,
397
397
  quote: import_lucide_react2.Quote,
398
398
  chat: import_lucide_react2.MessageSquare,
399
- brain: import_lucide_react2.Brain
399
+ brain: import_lucide_react2.Brain,
400
+ // lucide 规范名别名(kebab-case 原名直通;上方短别名保留兼容)——
401
+ // 白名单文档承诺 kebab-case 键,缺别名时规范名(如 trash-2)会落入未知占位
402
+ "trash-2": import_lucide_react2.Trash2,
403
+ "share-2": import_lucide_react2.Share2,
404
+ "building-2": import_lucide_react2.Building2,
405
+ house: import_lucide_react2.House,
406
+ "triangle-alert": import_lucide_react2.TriangleAlert,
407
+ "circle-alert": import_lucide_react2.CircleAlert,
408
+ "circle-check": import_lucide_react2.CircleCheck,
409
+ "circle-x": import_lucide_react2.CircleX,
410
+ "circle-question-mark": import_lucide_react2.CircleQuestionMark,
411
+ "square-pen": import_lucide_react2.SquarePen,
412
+ "refresh-ccw": import_lucide_react2.RefreshCcw,
413
+ "chart-column": import_lucide_react2.ChartColumn,
414
+ "layout-grid": import_lucide_react2.LayoutGrid,
415
+ funnel: import_lucide_react2.Funnel,
416
+ "loader-circle": import_lucide_react2.LoaderCircle,
417
+ ellipsis: import_lucide_react2.Ellipsis,
418
+ "ellipsis-vertical": import_lucide_react2.EllipsisVertical,
419
+ "message-circle": import_lucide_react2.MessageCircle,
420
+ "lock-open": import_lucide_react2.LockOpen
400
421
  };
401
422
  function normalizeIconName(name) {
402
423
  return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
@@ -426,7 +447,7 @@ function Icon({
426
447
  size: px,
427
448
  color,
428
449
  strokeWidth,
429
- className: cn("shrink-0 text-muted-foreground", className),
450
+ className: cn("shrink-0", className),
430
451
  style,
431
452
  "aria-hidden": "true"
432
453
  }
@@ -3507,18 +3528,49 @@ function FieldError({ className, ...props }) {
3507
3528
 
3508
3529
  // src/components/components/Field/index.tsx
3509
3530
  var import_jsx_runtime57 = require("react/jsx-runtime");
3510
- function Field2({ label, required, description, error, children, className, style }) {
3531
+ function Field2({
3532
+ label,
3533
+ required,
3534
+ description,
3535
+ error,
3536
+ children,
3537
+ className,
3538
+ style,
3539
+ labelClassName,
3540
+ labelStyle,
3541
+ controlClassName,
3542
+ controlStyle,
3543
+ descriptionClassName,
3544
+ descriptionStyle,
3545
+ errorClassName,
3546
+ errorStyle
3547
+ }) {
3511
3548
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Field, { className, style, children: [
3512
- label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { children: [
3549
+ label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { className: labelClassName, style: labelStyle, children: [
3513
3550
  required ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
3514
3551
  "*",
3515
3552
  " "
3516
3553
  ] }) : null,
3517
3554
  label
3518
3555
  ] }) : null,
3519
- children,
3520
- description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldDescription, { children: description }) : null,
3521
- error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, children: error }) : null
3556
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3557
+ "div",
3558
+ {
3559
+ "data-slot": "field-control",
3560
+ className: cn(label ? "mt-2" : void 0, controlClassName),
3561
+ style: controlStyle,
3562
+ children
3563
+ }
3564
+ ),
3565
+ description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3566
+ FieldDescription,
3567
+ {
3568
+ className: descriptionClassName,
3569
+ style: descriptionStyle,
3570
+ children: description
3571
+ }
3572
+ ) : null,
3573
+ error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, className: errorClassName, style: errorStyle, children: error }) : null
3522
3574
  ] });
3523
3575
  }
3524
3576
 
@@ -7070,7 +7122,8 @@ var tabsListVariants = (0, import_class_variance_authority7.cva)(
7070
7122
  variants: {
7071
7123
  variant: {
7072
7124
  default: "h-9 rounded-lg bg-muted p-[3px]",
7073
- line: "h-auto gap-1 rounded-none border-b border-border bg-transparent p-0"
7125
+ // line:页签栏通栏(下划线轨道占满容器宽),触发器自然宽度靠左排列
7126
+ line: "h-auto w-full justify-start gap-1 rounded-none border-b border-border bg-transparent p-0"
7074
7127
  }
7075
7128
  },
7076
7129
  defaultVariants: {
@@ -7106,8 +7159,9 @@ function TabsTrigger({
7106
7159
  // default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
7107
7160
  "group-data-[variant=default]/tabs-list:data-active:border-border group-data-[variant=default]/tabs-list:data-active:bg-card group-data-[variant=default]/tabs-list:data-active:shadow-sm",
7108
7161
  // line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
7109
- //(叠在 List 的底边轨道上),无底色/圆角/阴影
7110
- "group-data-[variant=line]/tabs-list:-mb-px group-data-[variant=line]/tabs-list:h-9 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",
7162
+ //(叠在 List 的底边轨道上),无底色/圆角/阴影;通栏 List 下取消
7163
+ // flex-1 拉伸,触发器保持自然宽度
7164
+ "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",
7111
7165
  className
7112
7166
  ),
7113
7167
  ...props
@@ -7130,7 +7184,16 @@ function TabsContent({
7130
7184
 
7131
7185
  // src/components/components/Tabs/index.tsx
7132
7186
  var import_jsx_runtime119 = require("react/jsx-runtime");
7133
- function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
7187
+ function Tabs2({
7188
+ items = [],
7189
+ activeKey,
7190
+ variant,
7191
+ onChange,
7192
+ contentClassName,
7193
+ contentStyle,
7194
+ className,
7195
+ style
7196
+ }) {
7134
7197
  const { renderChildren } = (0, import_runtime22.useRenderer)();
7135
7198
  return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
7136
7199
  Tabs,
@@ -7142,7 +7205,16 @@ function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
7142
7205
  style,
7143
7206
  children: [
7144
7207
  /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsList, { variant, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
7145
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
7208
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7209
+ TabsContent,
7210
+ {
7211
+ value: item.key,
7212
+ className: cn(contentClassName, item.className),
7213
+ style: { ...contentStyle, ...item.style },
7214
+ children: renderChildren(item.children)
7215
+ },
7216
+ item.key
7217
+ ))
7146
7218
  ]
7147
7219
  }
7148
7220
  );
@@ -760,13 +760,27 @@ interface FieldProps {
760
760
  className?: string;
761
761
  /** 通用:根节点内联样式 */
762
762
  style?: CSSProperties;
763
+ /** label 节点 class / style(必填星号随 label 节点) */
764
+ labelClassName?: string;
765
+ labelStyle?: CSSProperties;
766
+ /** 控件容器(label 下方)class / style;缺省有 label 时容器自带 mt-2 */
767
+ controlClassName?: string;
768
+ controlStyle?: CSSProperties;
769
+ /** 辅助说明节点 class / style */
770
+ descriptionClassName?: string;
771
+ descriptionStyle?: CSSProperties;
772
+ /** 错误节点 class / style */
773
+ errorClassName?: string;
774
+ errorStyle?: CSSProperties;
763
775
  }
764
776
  /**
765
- * Field 适配器(shadcn kit):通用表单项容器(Base UI Field 封装);
766
- * label / description / error 为框架级 props,error 声明式强制展示;
767
- * `required` 在 label 前渲染必填星号(对齐 antd Form.Item required 语义)。
777
+ * Field 适配器(shadcn kit):通用表单项容器(Base UI Field 封装,
778
+ * 上下结构:label 在上、控件容器在下);label / description / error 为
779
+ * 框架级 props,error 声明式强制展示;`required` 在 label 前渲染必填星号
780
+ * (对齐 antd Form.Item required 语义);label 与控件容器之间默认 mt-2,
781
+ * 四个节点(label / 控件容器 / description / error)均可独立加样式。
768
782
  */
769
- declare function Field({ label, required, description, error, children, className, style }: FieldProps): React.JSX.Element;
783
+ declare function Field({ label, required, description, error, children, className, style, labelClassName, labelStyle, controlClassName, controlStyle, descriptionClassName, descriptionStyle, errorClassName, errorStyle, }: FieldProps): React.JSX.Element;
770
784
 
771
785
  interface FlexProps {
772
786
  /** 主轴方向,默认 horizontal */
@@ -976,7 +990,8 @@ declare function normalizeIconName(name: string): string;
976
990
  /**
977
991
  * Icon 适配器(shadcn kit):按 name 从 lucide 白名单渲染图标。
978
992
  * 未知名渲染占位图标(help-circle)并标 `data-unknown`,不抛错
979
- * (与 chat messageActions 图标白名单同约定)。
993
+ * (与 chat messageActions 图标白名单同约定);占位图标跟随上下文
994
+ * 文本色(currentColor),避免在 danger 等有色按钮上撞色。
980
995
  */
981
996
  declare function Icon({ name, size, color, strokeWidth, className, style, }: IconProps): React.JSX.Element;
982
997
 
@@ -1692,6 +1707,10 @@ interface TabItem {
1692
1707
  key: string;
1693
1708
  label: string;
1694
1709
  children?: DslNode[];
1710
+ /** 该页签内容区 class(与 Tabs 的 contentClassName 合并,此项在后) */
1711
+ className?: string;
1712
+ /** 该页签内容区内联样式(同 className 的合并规则) */
1713
+ style?: CSSProperties;
1695
1714
  }
1696
1715
  interface TabsProps {
1697
1716
  items?: TabItem[];
@@ -1701,6 +1720,10 @@ interface TabsProps {
1701
1720
  variant?: 'default' | 'line';
1702
1721
  /** 页签切换事件,传出新激活的 key */
1703
1722
  onChange?: (key: string) => void;
1723
+ /** 页签内容区 class(TabsContent 根节点,与内置样式合并) */
1724
+ contentClassName?: string;
1725
+ /** 页签内容区内联样式(同 contentClassName 的挂载规则) */
1726
+ contentStyle?: CSSProperties;
1704
1727
  /** 通用:根节点 class(与内置样式合并) */
1705
1728
  className?: string;
1706
1729
  /** 通用:根节点内联样式 */
@@ -1711,7 +1734,7 @@ interface TabsProps {
1711
1734
  * 基于 vendored shadcn Tabs(@base-ui/react),每个 pane 的内容经
1712
1735
  * renderChildren 渲染;未传 activeKey 时缺省激活第一个页签。
1713
1736
  */
1714
- declare function Tabs({ items, activeKey, variant, onChange, className, style }: TabsProps): React.JSX.Element;
1737
+ declare function Tabs({ items, activeKey, variant, onChange, contentClassName, contentStyle, className, style, }: TabsProps): React.JSX.Element;
1715
1738
 
1716
1739
  /** DSL Text 语义类型 */
1717
1740
  type TextType = 'default' | 'secondary' | 'success' | 'warning' | 'danger';
@@ -760,13 +760,27 @@ interface FieldProps {
760
760
  className?: string;
761
761
  /** 通用:根节点内联样式 */
762
762
  style?: CSSProperties;
763
+ /** label 节点 class / style(必填星号随 label 节点) */
764
+ labelClassName?: string;
765
+ labelStyle?: CSSProperties;
766
+ /** 控件容器(label 下方)class / style;缺省有 label 时容器自带 mt-2 */
767
+ controlClassName?: string;
768
+ controlStyle?: CSSProperties;
769
+ /** 辅助说明节点 class / style */
770
+ descriptionClassName?: string;
771
+ descriptionStyle?: CSSProperties;
772
+ /** 错误节点 class / style */
773
+ errorClassName?: string;
774
+ errorStyle?: CSSProperties;
763
775
  }
764
776
  /**
765
- * Field 适配器(shadcn kit):通用表单项容器(Base UI Field 封装);
766
- * label / description / error 为框架级 props,error 声明式强制展示;
767
- * `required` 在 label 前渲染必填星号(对齐 antd Form.Item required 语义)。
777
+ * Field 适配器(shadcn kit):通用表单项容器(Base UI Field 封装,
778
+ * 上下结构:label 在上、控件容器在下);label / description / error 为
779
+ * 框架级 props,error 声明式强制展示;`required` 在 label 前渲染必填星号
780
+ * (对齐 antd Form.Item required 语义);label 与控件容器之间默认 mt-2,
781
+ * 四个节点(label / 控件容器 / description / error)均可独立加样式。
768
782
  */
769
- declare function Field({ label, required, description, error, children, className, style }: FieldProps): React.JSX.Element;
783
+ declare function Field({ label, required, description, error, children, className, style, labelClassName, labelStyle, controlClassName, controlStyle, descriptionClassName, descriptionStyle, errorClassName, errorStyle, }: FieldProps): React.JSX.Element;
770
784
 
771
785
  interface FlexProps {
772
786
  /** 主轴方向,默认 horizontal */
@@ -976,7 +990,8 @@ declare function normalizeIconName(name: string): string;
976
990
  /**
977
991
  * Icon 适配器(shadcn kit):按 name 从 lucide 白名单渲染图标。
978
992
  * 未知名渲染占位图标(help-circle)并标 `data-unknown`,不抛错
979
- * (与 chat messageActions 图标白名单同约定)。
993
+ * (与 chat messageActions 图标白名单同约定);占位图标跟随上下文
994
+ * 文本色(currentColor),避免在 danger 等有色按钮上撞色。
980
995
  */
981
996
  declare function Icon({ name, size, color, strokeWidth, className, style, }: IconProps): React.JSX.Element;
982
997
 
@@ -1692,6 +1707,10 @@ interface TabItem {
1692
1707
  key: string;
1693
1708
  label: string;
1694
1709
  children?: DslNode[];
1710
+ /** 该页签内容区 class(与 Tabs 的 contentClassName 合并,此项在后) */
1711
+ className?: string;
1712
+ /** 该页签内容区内联样式(同 className 的合并规则) */
1713
+ style?: CSSProperties;
1695
1714
  }
1696
1715
  interface TabsProps {
1697
1716
  items?: TabItem[];
@@ -1701,6 +1720,10 @@ interface TabsProps {
1701
1720
  variant?: 'default' | 'line';
1702
1721
  /** 页签切换事件,传出新激活的 key */
1703
1722
  onChange?: (key: string) => void;
1723
+ /** 页签内容区 class(TabsContent 根节点,与内置样式合并) */
1724
+ contentClassName?: string;
1725
+ /** 页签内容区内联样式(同 contentClassName 的挂载规则) */
1726
+ contentStyle?: CSSProperties;
1704
1727
  /** 通用:根节点 class(与内置样式合并) */
1705
1728
  className?: string;
1706
1729
  /** 通用:根节点内联样式 */
@@ -1711,7 +1734,7 @@ interface TabsProps {
1711
1734
  * 基于 vendored shadcn Tabs(@base-ui/react),每个 pane 的内容经
1712
1735
  * renderChildren 渲染;未传 activeKey 时缺省激活第一个页签。
1713
1736
  */
1714
- declare function Tabs({ items, activeKey, variant, onChange, className, style }: TabsProps): React.JSX.Element;
1737
+ declare function Tabs({ items, activeKey, variant, onChange, contentClassName, contentStyle, className, style, }: TabsProps): React.JSX.Element;
1715
1738
 
1716
1739
  /** DSL Text 语义类型 */
1717
1740
  type TextType = 'default' | 'secondary' | 'success' | 'warning' | 'danger';
@@ -71,7 +71,7 @@ import {
71
71
  createComponentRegistry,
72
72
  registerBuiltinComponents,
73
73
  useFormContext
74
- } from "../chunk-3KCE7ROX.js";
74
+ } from "../chunk-L77EOXU3.js";
75
75
  import {
76
76
  ICONS,
77
77
  Icon,
@@ -80,8 +80,8 @@ import {
80
80
  Sidebar,
81
81
  normalizeIconName,
82
82
  useSidebarDrawer
83
- } from "../chunk-2B5YV2HR.js";
84
- import "../chunk-XEK5NQJA.js";
83
+ } from "../chunk-GQE62HDV.js";
84
+ import "../chunk-NQQAPB7Q.js";
85
85
  import "../chunk-XUHJ5YSG.js";
86
86
  import "../chunk-AUSWAD26.js";
87
87
  import "../chunk-WKJUCGV4.js";
package/dist/index.cjs CHANGED
@@ -412,7 +412,28 @@ var ICONS = {
412
412
  "rotate-ccw": import_lucide_react2.RotateCcw,
413
413
  quote: import_lucide_react2.Quote,
414
414
  chat: import_lucide_react2.MessageSquare,
415
- brain: import_lucide_react2.Brain
415
+ brain: import_lucide_react2.Brain,
416
+ // lucide 规范名别名(kebab-case 原名直通;上方短别名保留兼容)——
417
+ // 白名单文档承诺 kebab-case 键,缺别名时规范名(如 trash-2)会落入未知占位
418
+ "trash-2": import_lucide_react2.Trash2,
419
+ "share-2": import_lucide_react2.Share2,
420
+ "building-2": import_lucide_react2.Building2,
421
+ house: import_lucide_react2.House,
422
+ "triangle-alert": import_lucide_react2.TriangleAlert,
423
+ "circle-alert": import_lucide_react2.CircleAlert,
424
+ "circle-check": import_lucide_react2.CircleCheck,
425
+ "circle-x": import_lucide_react2.CircleX,
426
+ "circle-question-mark": import_lucide_react2.CircleQuestionMark,
427
+ "square-pen": import_lucide_react2.SquarePen,
428
+ "refresh-ccw": import_lucide_react2.RefreshCcw,
429
+ "chart-column": import_lucide_react2.ChartColumn,
430
+ "layout-grid": import_lucide_react2.LayoutGrid,
431
+ funnel: import_lucide_react2.Funnel,
432
+ "loader-circle": import_lucide_react2.LoaderCircle,
433
+ ellipsis: import_lucide_react2.Ellipsis,
434
+ "ellipsis-vertical": import_lucide_react2.EllipsisVertical,
435
+ "message-circle": import_lucide_react2.MessageCircle,
436
+ "lock-open": import_lucide_react2.LockOpen
416
437
  };
417
438
  function normalizeIconName(name) {
418
439
  return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
@@ -442,7 +463,7 @@ function Icon({
442
463
  size: px,
443
464
  color,
444
465
  strokeWidth,
445
- className: cn("shrink-0 text-muted-foreground", className),
466
+ className: cn("shrink-0", className),
446
467
  style,
447
468
  "aria-hidden": "true"
448
469
  }
@@ -3546,18 +3567,49 @@ function FieldError({ className, ...props }) {
3546
3567
 
3547
3568
  // src/components/components/Field/index.tsx
3548
3569
  var import_jsx_runtime57 = require("react/jsx-runtime");
3549
- function Field2({ label, required, description, error, children, className, style }) {
3570
+ function Field2({
3571
+ label,
3572
+ required,
3573
+ description,
3574
+ error,
3575
+ children,
3576
+ className,
3577
+ style,
3578
+ labelClassName,
3579
+ labelStyle,
3580
+ controlClassName,
3581
+ controlStyle,
3582
+ descriptionClassName,
3583
+ descriptionStyle,
3584
+ errorClassName,
3585
+ errorStyle
3586
+ }) {
3550
3587
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Field, { className, style, children: [
3551
- label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { children: [
3588
+ label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { className: labelClassName, style: labelStyle, children: [
3552
3589
  required ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
3553
3590
  "*",
3554
3591
  " "
3555
3592
  ] }) : null,
3556
3593
  label
3557
3594
  ] }) : null,
3558
- children,
3559
- description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldDescription, { children: description }) : null,
3560
- error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, children: error }) : null
3595
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3596
+ "div",
3597
+ {
3598
+ "data-slot": "field-control",
3599
+ className: cn(label ? "mt-2" : void 0, controlClassName),
3600
+ style: controlStyle,
3601
+ children
3602
+ }
3603
+ ),
3604
+ description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3605
+ FieldDescription,
3606
+ {
3607
+ className: descriptionClassName,
3608
+ style: descriptionStyle,
3609
+ children: description
3610
+ }
3611
+ ) : null,
3612
+ error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, className: errorClassName, style: errorStyle, children: error }) : null
3561
3613
  ] });
3562
3614
  }
3563
3615
 
@@ -7109,7 +7161,8 @@ var tabsListVariants = (0, import_class_variance_authority7.cva)(
7109
7161
  variants: {
7110
7162
  variant: {
7111
7163
  default: "h-9 rounded-lg bg-muted p-[3px]",
7112
- line: "h-auto gap-1 rounded-none border-b border-border bg-transparent p-0"
7164
+ // line:页签栏通栏(下划线轨道占满容器宽),触发器自然宽度靠左排列
7165
+ line: "h-auto w-full justify-start gap-1 rounded-none border-b border-border bg-transparent p-0"
7113
7166
  }
7114
7167
  },
7115
7168
  defaultVariants: {
@@ -7145,8 +7198,9 @@ function TabsTrigger({
7145
7198
  // default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
7146
7199
  "group-data-[variant=default]/tabs-list:data-active:border-border group-data-[variant=default]/tabs-list:data-active:bg-card group-data-[variant=default]/tabs-list:data-active:shadow-sm",
7147
7200
  // line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
7148
- //(叠在 List 的底边轨道上),无底色/圆角/阴影
7149
- "group-data-[variant=line]/tabs-list:-mb-px group-data-[variant=line]/tabs-list:h-9 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",
7201
+ //(叠在 List 的底边轨道上),无底色/圆角/阴影;通栏 List 下取消
7202
+ // flex-1 拉伸,触发器保持自然宽度
7203
+ "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",
7150
7204
  className
7151
7205
  ),
7152
7206
  ...props
@@ -7169,7 +7223,16 @@ function TabsContent({
7169
7223
 
7170
7224
  // src/components/components/Tabs/index.tsx
7171
7225
  var import_jsx_runtime119 = require("react/jsx-runtime");
7172
- function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
7226
+ function Tabs2({
7227
+ items = [],
7228
+ activeKey,
7229
+ variant,
7230
+ onChange,
7231
+ contentClassName,
7232
+ contentStyle,
7233
+ className,
7234
+ style
7235
+ }) {
7173
7236
  const { renderChildren } = (0, import_runtime22.useRenderer)();
7174
7237
  return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
7175
7238
  Tabs,
@@ -7181,7 +7244,16 @@ function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
7181
7244
  style,
7182
7245
  children: [
7183
7246
  /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsList, { variant, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
7184
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
7247
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7248
+ TabsContent,
7249
+ {
7250
+ value: item.key,
7251
+ className: cn(contentClassName, item.className),
7252
+ style: { ...contentStyle, ...item.style },
7253
+ children: renderChildren(item.children)
7254
+ },
7255
+ item.key
7256
+ ))
7185
7257
  ]
7186
7258
  }
7187
7259
  );
package/dist/index.js CHANGED
@@ -71,7 +71,7 @@ import {
71
71
  createComponentRegistry,
72
72
  registerBuiltinComponents,
73
73
  useFormContext
74
- } from "./chunk-3KCE7ROX.js";
74
+ } from "./chunk-L77EOXU3.js";
75
75
  import {
76
76
  InteractionProvider,
77
77
  OVERLAY_CANCEL_PAYLOAD,
@@ -91,7 +91,7 @@ import {
91
91
  findMenuChain,
92
92
  registerBuiltinLayouts,
93
93
  resolveLayout
94
- } from "./chunk-CWUY7LXF.js";
94
+ } from "./chunk-V2J6FHWX.js";
95
95
  import {
96
96
  ICONS,
97
97
  Icon,
@@ -100,8 +100,8 @@ import {
100
100
  Sidebar,
101
101
  normalizeIconName,
102
102
  useSidebarDrawer
103
- } from "./chunk-2B5YV2HR.js";
104
- import "./chunk-XEK5NQJA.js";
103
+ } from "./chunk-GQE62HDV.js";
104
+ import "./chunk-NQQAPB7Q.js";
105
105
  import "./chunk-XUHJ5YSG.js";
106
106
  import "./chunk-AUSWAD26.js";
107
107
  import "./chunk-WKJUCGV4.js";
@@ -325,7 +325,28 @@ var ICONS = {
325
325
  "rotate-ccw": import_lucide_react2.RotateCcw,
326
326
  quote: import_lucide_react2.Quote,
327
327
  chat: import_lucide_react2.MessageSquare,
328
- brain: import_lucide_react2.Brain
328
+ brain: import_lucide_react2.Brain,
329
+ // lucide 规范名别名(kebab-case 原名直通;上方短别名保留兼容)——
330
+ // 白名单文档承诺 kebab-case 键,缺别名时规范名(如 trash-2)会落入未知占位
331
+ "trash-2": import_lucide_react2.Trash2,
332
+ "share-2": import_lucide_react2.Share2,
333
+ "building-2": import_lucide_react2.Building2,
334
+ house: import_lucide_react2.House,
335
+ "triangle-alert": import_lucide_react2.TriangleAlert,
336
+ "circle-alert": import_lucide_react2.CircleAlert,
337
+ "circle-check": import_lucide_react2.CircleCheck,
338
+ "circle-x": import_lucide_react2.CircleX,
339
+ "circle-question-mark": import_lucide_react2.CircleQuestionMark,
340
+ "square-pen": import_lucide_react2.SquarePen,
341
+ "refresh-ccw": import_lucide_react2.RefreshCcw,
342
+ "chart-column": import_lucide_react2.ChartColumn,
343
+ "layout-grid": import_lucide_react2.LayoutGrid,
344
+ funnel: import_lucide_react2.Funnel,
345
+ "loader-circle": import_lucide_react2.LoaderCircle,
346
+ ellipsis: import_lucide_react2.Ellipsis,
347
+ "ellipsis-vertical": import_lucide_react2.EllipsisVertical,
348
+ "message-circle": import_lucide_react2.MessageCircle,
349
+ "lock-open": import_lucide_react2.LockOpen
329
350
  };
330
351
  function normalizeIconName(name) {
331
352
  return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
@@ -355,7 +376,7 @@ function Icon({
355
376
  size: px,
356
377
  color,
357
378
  strokeWidth,
358
- className: cn("shrink-0 text-muted-foreground", className),
379
+ className: cn("shrink-0", className),
359
380
  style,
360
381
  "aria-hidden": "true"
361
382
  }
@@ -9,8 +9,8 @@ import {
9
9
  findMenuChain,
10
10
  registerBuiltinLayouts,
11
11
  resolveLayout
12
- } from "../chunk-CWUY7LXF.js";
13
- import "../chunk-2B5YV2HR.js";
12
+ } from "../chunk-V2J6FHWX.js";
13
+ import "../chunk-GQE62HDV.js";
14
14
  import "../chunk-AUSWAD26.js";
15
15
  import "../chunk-WKJUCGV4.js";
16
16
  export {
package/dist/ui/index.cjs CHANGED
@@ -4591,7 +4591,8 @@ var tabsListVariants = (0, import_class_variance_authority9.cva)(
4591
4591
  variants: {
4592
4592
  variant: {
4593
4593
  default: "h-9 rounded-lg bg-muted p-[3px]",
4594
- line: "h-auto gap-1 rounded-none border-b border-border bg-transparent p-0"
4594
+ // line:页签栏通栏(下划线轨道占满容器宽),触发器自然宽度靠左排列
4595
+ line: "h-auto w-full justify-start gap-1 rounded-none border-b border-border bg-transparent p-0"
4595
4596
  }
4596
4597
  },
4597
4598
  defaultVariants: {
@@ -4627,8 +4628,9 @@ function TabsTrigger({
4627
4628
  // default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
4628
4629
  "group-data-[variant=default]/tabs-list:data-active:border-border group-data-[variant=default]/tabs-list:data-active:bg-card group-data-[variant=default]/tabs-list:data-active:shadow-sm",
4629
4630
  // line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
4630
- //(叠在 List 的底边轨道上),无底色/圆角/阴影
4631
- "group-data-[variant=line]/tabs-list:-mb-px group-data-[variant=line]/tabs-list:h-9 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",
4631
+ //(叠在 List 的底边轨道上),无底色/圆角/阴影;通栏 List 下取消
4632
+ // flex-1 拉伸,触发器保持自然宽度
4633
+ "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",
4632
4634
  className
4633
4635
  ),
4634
4636
  ...props
package/dist/ui/index.js CHANGED
@@ -160,7 +160,7 @@ import {
160
160
  toggleVariants,
161
161
  typographyVariants,
162
162
  useCarousel
163
- } from "../chunk-XEK5NQJA.js";
163
+ } from "../chunk-NQQAPB7Q.js";
164
164
  import {
165
165
  Dialog,
166
166
  DialogClose,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pactor-app/ui",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Pactor UI kit (shadcn): the single built-in UI kit — vendored shadcn/ui components (Base UI primitives + cva + tailwind-merge + lucide-react), props contracts, interaction core (OverlayManager / UiBridge) and layouts, with build-time Tailwind v4 prebuilt styles.css (zero consumer-side Tailwind config)",
5
5
  "keywords": [
6
6
  "pactor",
@@ -105,10 +105,10 @@
105
105
  "recharts": "^3.10.1",
106
106
  "tailwind-merge": "^3.6.0",
107
107
  "vaul": "^1.1.2",
108
- "@pactor-app/core": "1.12.0",
109
- "@pactor-app/permission": "1.12.0",
110
- "@pactor-app/runtime": "1.12.0",
111
- "@pactor-app/router": "1.12.0"
108
+ "@pactor-app/core": "1.14.0",
109
+ "@pactor-app/runtime": "1.14.0",
110
+ "@pactor-app/router": "1.14.0",
111
+ "@pactor-app/permission": "1.14.0"
112
112
  },
113
113
  "peerDependencies": {
114
114
  "react": ">=18",
package/styles.css CHANGED
@@ -740,6 +740,9 @@
740
740
  .flex-1 {
741
741
  flex: 1;
742
742
  }
743
+ .flex-none {
744
+ flex: none;
745
+ }
743
746
  .shrink-0 {
744
747
  flex-shrink: 0;
745
748
  }
@@ -1894,6 +1897,9 @@
1894
1897
  .group-data-\[variant\=line\]\/tabs-list\:h-9:is(:where(.group\/tabs-list)[data-variant="line"] *) {
1895
1898
  height: calc(var(--spacing) * 9);
1896
1899
  }
1900
+ .group-data-\[variant\=line\]\/tabs-list\:flex-none:is(:where(.group\/tabs-list)[data-variant="line"] *) {
1901
+ flex: none;
1902
+ }
1897
1903
  .group-data-\[variant\=line\]\/tabs-list\:rounded-none:is(:where(.group\/tabs-list)[data-variant="line"] *) {
1898
1904
  border-radius: 0;
1899
1905
  }