@pactor-app/ui 1.2.0 → 1.7.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/README.md +2 -0
- package/dist/{chunk-L45CSL6I.js → chunk-7KC6DMKH.js} +3 -3
- package/dist/{chunk-Q5NUGUJG.js → chunk-E2TD6JD2.js} +205 -414
- package/dist/{chunk-F3H23KYG.js → chunk-F42SGQNW.js} +31 -93
- package/dist/{chunk-22TEN3ER.js → chunk-FJPRXEKQ.js} +13 -13
- package/dist/chunk-L4Z7MNYY.js +1197 -0
- package/dist/{chunk-LMEJ242M.js → chunk-PMYLC26E.js} +615 -307
- package/dist/chunk-WKJUCGV4.js +78 -0
- package/dist/chunk-ZM3WJZZ7.js +727 -0
- package/dist/components/index.cjs +1694 -969
- package/dist/components/index.d.cts +115 -13
- package/dist/components/index.d.ts +115 -13
- package/dist/components/index.js +10 -6
- package/dist/index.cjs +1889 -1164
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -8
- package/dist/interaction/index.cjs +10 -6
- package/dist/interaction/index.js +3 -3
- package/dist/layout/index.cjs +811 -269
- package/dist/layout/index.d.cts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +4 -4
- package/dist/ui/index.cjs +1689 -534
- package/dist/ui/index.d.cts +130 -16
- package/dist/ui/index.d.ts +130 -16
- package/dist/ui/index.js +481 -22
- package/package.json +6 -5
- package/styles.css +975 -114
- package/dist/chunk-2LYMCWEJ.js +0 -289
- package/dist/chunk-HJPHJKVA.js +0 -671
- package/dist/chunk-RQHJBTEU.js +0 -10
package/README.md
CHANGED
|
@@ -61,6 +61,8 @@ import '@pactor-app/ui/styles.css';
|
|
|
61
61
|
|
|
62
62
|
主题契约为 shadcn 语义令牌:`--background` / `--foreground` / `--card` / `--popover` / `--primary` / `--secondary` / `--muted` / `--accent` / `--destructive` / `--border` / `--input` / `--ring` / `--radius`(另补充 `--success` / `--warning` / `--info` 供 Alert 四态),定义在 `:root`,组件工具类经 `var()` 运行时读取。换肤即覆盖变量;内置暗色皮肤经 `<html data-pactor-theme="dark">`(或任意容器)切换,与全仓约定一致。
|
|
63
63
|
|
|
64
|
+
**皮肤令牌契约(CSS 皮肤文件)**:组件全部颜色/阴影/圆角经令牌解析(无硬编码颜色),宿主在 `styles.css` 之后加载一个普通 CSS 文件即可完整换肤,运行时替换样式表节点即切换皮肤,无需重建。语义令牌之上还有组件级令牌(命名 `--<component>-<part>-<state>`,默认值经 `var()` 回退到语义令牌)覆盖 Switch/Slider/Radio/Progress/Pagination/Menu 系 hover 与选中/Bubble/Calendar/卡片阴影/弹层阴影色/模态遮罩;页面背景经 `--background`(纯色)+ `--background-image`(渐变/图片,默认 `none`)承接,字体族经 `--font-sans`。完整令牌清单与示例见 docs《主题与换肤》指南(docs/src/content/docs/guides/theming.md)。
|
|
65
|
+
|
|
64
66
|
**preflight 开启(shadcn 官方基线)**:样式表为完整 `tailwindcss`(含 preflight)+ `tw-animate-css` 动画层 + 官方 base layer 的预编译产物,与 [shadcn 官方主题脚手架](https://ui.shadcn.com/docs/theming)一致——导入 `styles.css` 即接受 shadcn 基线全局样式(box-sizing / 边距归零 / 元素字体继承等),宿主的自定义皮肤 CSS 须在其后导入。令牌组含 chart-1..5 与 sidebar 系列;radius 派生为基于 `--radius` 的乘法比例(0.6/0.8/1/1.4/1.8/2.2/2.6)。
|
|
65
67
|
|
|
66
68
|
## 独立使用(不经 @pactor-app/app)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Button,
|
|
3
2
|
Dialog,
|
|
4
3
|
DialogClose,
|
|
5
4
|
DialogContent,
|
|
@@ -12,10 +11,11 @@ import {
|
|
|
12
11
|
DrawerContent,
|
|
13
12
|
DrawerHeader,
|
|
14
13
|
DrawerTitle
|
|
15
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-F42SGQNW.js";
|
|
16
15
|
import {
|
|
16
|
+
Button,
|
|
17
17
|
cn
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WKJUCGV4.js";
|
|
19
19
|
|
|
20
20
|
// src/interaction/manager.ts
|
|
21
21
|
var OVERLAY_CANCEL_PAYLOAD = { success: false };
|