@pactor-app/ui 1.0.0 → 1.2.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 +25 -31
- package/dist/{chunk-D6G4J5XS.js → chunk-22TEN3ER.js} +169 -38
- package/dist/{chunk-GL7IO22L.js → chunk-2LYMCWEJ.js} +65 -1
- package/dist/chunk-HJPHJKVA.js +671 -0
- package/dist/{chunk-BZSRLTQQ.js → chunk-L45CSL6I.js} +5 -5
- package/dist/{chunk-FVZMNP5P.js → chunk-LMEJ242M.js} +357 -442
- package/dist/{chunk-TUXCPXPA.js → chunk-Q5NUGUJG.js} +195 -259
- package/dist/components/index.cjs +1123 -796
- package/dist/components/index.d.cts +105 -21
- package/dist/components/index.d.ts +105 -21
- package/dist/components/index.js +18 -14
- package/dist/index.cjs +1433 -988
- package/dist/index.d.cts +3 -36
- package/dist/index.d.ts +3 -36
- package/dist/index.js +38 -43
- package/dist/interaction/index.cjs +7 -7
- package/dist/interaction/index.d.cts +13 -16
- package/dist/interaction/index.d.ts +13 -16
- package/dist/interaction/index.js +5 -5
- package/dist/layout/index.cjs +655 -52
- package/dist/layout/index.d.cts +97 -19
- package/dist/layout/index.d.ts +97 -19
- package/dist/layout/index.js +17 -15
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.js +7 -7
- package/package.json +5 -5
- package/styles.css +88 -7
- package/dist/chunk-UR3I4WXQ.js +0 -236
package/dist/layout/index.d.cts
CHANGED
|
@@ -79,6 +79,62 @@ interface LandingLayoutProps {
|
|
|
79
79
|
footer?: ReactNode;
|
|
80
80
|
children?: ReactNode;
|
|
81
81
|
}
|
|
82
|
+
/** ChatLayout 菜单项(显式 menu 数据驱动;registry 推导时由 router MenuItem 映射) */
|
|
83
|
+
interface ChatLayoutMenuItem {
|
|
84
|
+
key: string;
|
|
85
|
+
label: string;
|
|
86
|
+
/** 图标名(Icon 白名单,kebab/Pascal 均可) */
|
|
87
|
+
icon?: string;
|
|
88
|
+
/** label 后的角标 */
|
|
89
|
+
badge?: string | number;
|
|
90
|
+
/** label 右侧的状态圆点 */
|
|
91
|
+
dot?: boolean;
|
|
92
|
+
/** 分组标题(相邻同组只渲染一次) */
|
|
93
|
+
group?: string;
|
|
94
|
+
/** 置灰不可选 */
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
/** 路由路径(registry 推导时来自 MenuItem.path;bridge 导航与 active 推导用) */
|
|
97
|
+
path?: string;
|
|
98
|
+
}
|
|
99
|
+
/** ChatLayout 品牌区(与 Sidebar 品牌区同构:{ title, logo? } 对象或任意 ReactNode) */
|
|
100
|
+
type ChatLayoutBrand = {
|
|
101
|
+
title: string;
|
|
102
|
+
logo?: string;
|
|
103
|
+
} | ReactNode;
|
|
104
|
+
/**
|
|
105
|
+
* ChatLayout props(设计决策 D7):聊天场景外壳布局——
|
|
106
|
+
* 品牌区 + 菜单侧栏 + 主内容区。
|
|
107
|
+
*
|
|
108
|
+
* 菜单来源优先级:`sidebar` 槽 > `menu` 显式数据 > `registry` 推导 > 空侧栏。
|
|
109
|
+
* 导航行为:`onMenuSelect` 提供时调用之;否则有 `bridge` 且项有 `path` 时
|
|
110
|
+
* `bridge.push(path)`。高亮推导:`activeMenuKey` > `route` > `bridge` 订阅。
|
|
111
|
+
*/
|
|
112
|
+
interface ChatLayoutProps {
|
|
113
|
+
/** 品牌区({ title, logo } 对象或任意 ReactNode) */
|
|
114
|
+
brand?: ChatLayoutBrand;
|
|
115
|
+
/** 显式菜单数据;提供时优先于 registry 推导 */
|
|
116
|
+
menu?: ChatLayoutMenuItem[];
|
|
117
|
+
/** 菜单注册表(app-shell 注入);无 menu 时据此推导菜单 */
|
|
118
|
+
registry?: MenuRegistry;
|
|
119
|
+
/** 导航桥(app-shell 注入);默认导航与 active 推导用 */
|
|
120
|
+
bridge?: NavigationBridge;
|
|
121
|
+
/** 路由上下文(测试友好,优先于 bridge 订阅) */
|
|
122
|
+
route?: RouteContext;
|
|
123
|
+
/** 权限检查器(registry 推导时过滤菜单) */
|
|
124
|
+
permissionChecker?: PermissionChecker;
|
|
125
|
+
/** 受控高亮项 key(优先于 route/bridge 推导) */
|
|
126
|
+
activeMenuKey?: string;
|
|
127
|
+
/** 菜单项点击回调(disabled 项不触发);提供时替代默认导航 */
|
|
128
|
+
onMenuSelect?: (key: string, item: ChatLayoutMenuItem) => void;
|
|
129
|
+
/** 桌面端可折叠为 icon rail(透传 Sidebar;缺省 false) */
|
|
130
|
+
collapsible?: boolean;
|
|
131
|
+
/** 自由侧栏槽(提供时替代内建菜单) */
|
|
132
|
+
sidebar?: ReactNode;
|
|
133
|
+
/** 侧栏底部固定槽(渲染在滚动区之后,不随内容滚动) */
|
|
134
|
+
sidebarFooter?: ReactNode;
|
|
135
|
+
/** 主内容区 */
|
|
136
|
+
children?: ReactNode;
|
|
137
|
+
}
|
|
82
138
|
|
|
83
139
|
/**
|
|
84
140
|
* 菜单链(设计决策 D2):沿可见树查找 menuId 的父链,
|
|
@@ -98,7 +154,7 @@ declare function findMenuChain(registry: MenuRegistry, menuId: string): MenuItem
|
|
|
98
154
|
declare function collectDefaultOpenKeys(registry: MenuRegistry, activeMenuId?: string): string[];
|
|
99
155
|
|
|
100
156
|
/**
|
|
101
|
-
*
|
|
157
|
+
* AdminLayout:内置默认 UI 实现的管理后台布局——
|
|
102
158
|
* 复用 `AdminLayoutProps`;Header(brand + headerExtra)/ Sidebar / 内容出口;
|
|
103
159
|
* config 开关(header/sidebar 缺省开,tabs/breadcrumb/footer 缺省关)一致;
|
|
104
160
|
* mode(top-side/top-bottom/side-full/two-column)、fixedHeader/fixedSider、
|
|
@@ -112,47 +168,69 @@ declare function collectDefaultOpenKeys(registry: MenuRegistry, activeMenuId?: s
|
|
|
112
168
|
* 样式:Tailwind 工具类读取 shadcn 语义令牌(bg-background / border-border /
|
|
113
169
|
* text-muted-foreground …),结构钩子用 data-slot 属性。
|
|
114
170
|
*/
|
|
115
|
-
declare function
|
|
171
|
+
declare function AdminLayout({ config, brand, registry, bridge, route: routeProp, permissionChecker, headerExtra, children, }: AdminLayoutProps): React.JSX.Element;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* BlankLayout:内置默认 UI 实现的无壳布局——
|
|
175
|
+
* 直接渲染 children(带最小页面容器样式)。
|
|
176
|
+
*/
|
|
177
|
+
declare function BlankLayout({ children }: BlankLayoutProps): React.JSX.Element;
|
|
116
178
|
|
|
117
179
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
180
|
+
* ChatLayout(设计决策 D7):聊天场景外壳布局——
|
|
181
|
+
* 品牌区 + 菜单侧栏 + 主内容区,基于 ui `Sidebar` + `Menu` 组件组合。
|
|
182
|
+
*
|
|
183
|
+
* 菜单来源优先级(高 → 低):
|
|
184
|
+
* 1. `sidebar` 槽:自由侧栏内容,整体替代内建菜单;
|
|
185
|
+
* 2. `menu` 显式数据:调用方直接提供菜单项(含 icon/badge/dot/group/disabled);
|
|
186
|
+
* 3. `registry` 推导:app-shell 注入的 MenuRegistry 可见树
|
|
187
|
+
* (group 类型项 → 分组标签,page/link → 菜单项,permissionChecker 过滤);
|
|
188
|
+
* 4. 空侧栏:以上均无时不渲染侧栏,主区通栏。
|
|
189
|
+
*
|
|
190
|
+
* 导航行为:`onMenuSelect` 提供时调用之(disabled 项不触发);
|
|
191
|
+
* 否则有 `bridge` 且项有 `path` 时 `bridge.push(path)`。
|
|
192
|
+
*
|
|
193
|
+
* 高亮推导优先级:`activeMenuKey` > `route`(测试友好)>
|
|
194
|
+
* `bridge` 订阅 location 按 `path === pathname` 命中。
|
|
195
|
+
*
|
|
196
|
+
* 与 chat 包的 `ChatLayout`(header + ChatView 极简布局)不同,
|
|
197
|
+
* 本组件是带侧栏菜单的完整外壳,两者不冲突(不同包导出)。
|
|
120
198
|
*/
|
|
121
|
-
declare function
|
|
199
|
+
declare function ChatLayout({ brand, menu, registry, bridge, route: routeProp, permissionChecker, activeMenuKey, onMenuSelect, collapsible, sidebar, sidebarFooter, children, }: ChatLayoutProps): React.JSX.Element;
|
|
122
200
|
|
|
123
201
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
202
|
+
* LoginLayout:内置默认 UI 实现的登录页外壳——
|
|
203
|
+
* 只负责品牌区与表单出口的布局,不含任何认证逻辑。
|
|
126
204
|
* variant center:居中卡片(vendored shadcn Card);split:左品牌右表单
|
|
127
205
|
* (缺省 center)。
|
|
128
206
|
*/
|
|
129
|
-
declare function
|
|
207
|
+
declare function LoginLayout({ variant, brand, children, }: LoginLayoutProps): React.JSX.Element;
|
|
130
208
|
|
|
131
209
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
210
|
+
* LandingLayout:内置默认 UI 实现的落地页外壳——
|
|
211
|
+
* 可选 navbar / footer 插槽,children 为主内容区。
|
|
134
212
|
*/
|
|
135
|
-
declare function
|
|
213
|
+
declare function LandingLayout({ navbar, footer, children, }: LandingLayoutProps): React.JSX.Element;
|
|
136
214
|
|
|
137
215
|
/** 布局组件类型(各布局 props 不同,注册表按通用组件存储) */
|
|
138
216
|
type LayoutComponent = ComponentType<any>;
|
|
139
217
|
/** LayoutRegistry:布局类型名 → 布局组件(复用 core Registry) */
|
|
140
218
|
type LayoutRegistry = Registry<LayoutComponent>;
|
|
141
219
|
/**
|
|
142
|
-
*
|
|
143
|
-
* (类型名:admin / blank / login / landing)。
|
|
220
|
+
* registerBuiltinLayouts:向 LayoutRegistry 注册内置实现的五种布局
|
|
221
|
+
* (类型名:admin / blank / login / landing / chat)。
|
|
144
222
|
*/
|
|
145
|
-
declare function
|
|
223
|
+
declare function registerBuiltinLayouts(registry: LayoutRegistry): void;
|
|
146
224
|
/**
|
|
147
|
-
*
|
|
148
|
-
* admin / blank / login / landing
|
|
225
|
+
* createLayoutRegistry(设计决策 D5):预注册内置版
|
|
226
|
+
* admin / blank / login / landing / chat 五种布局组件。
|
|
149
227
|
* 业务可继续 register 自定义布局类型。
|
|
150
228
|
*/
|
|
151
|
-
declare function
|
|
229
|
+
declare function createLayoutRegistry(): LayoutRegistry;
|
|
152
230
|
/**
|
|
153
231
|
* resolveLayout(设计决策 D5):按类型名解析布局组件;
|
|
154
|
-
* 未命中返回
|
|
232
|
+
* 未命中返回 BlankLayout 并 console.warn(不抛错,不崩页面)。
|
|
155
233
|
*/
|
|
156
234
|
declare function resolveLayout(registry: LayoutRegistry, type: string): LayoutComponent;
|
|
157
235
|
|
|
158
|
-
export { type AdminBrand, type AdminLayoutBreakpoint, type AdminLayoutConfig, type AdminLayoutMode, type AdminLayoutProps, type BlankLayoutProps, type
|
|
236
|
+
export { type AdminBrand, AdminLayout, type AdminLayoutBreakpoint, type AdminLayoutConfig, type AdminLayoutMode, type AdminLayoutProps, BlankLayout, type BlankLayoutProps, ChatLayout, type ChatLayoutBrand, type ChatLayoutMenuItem, type ChatLayoutProps, LandingLayout, type LandingLayoutProps, type LayoutComponent, type LayoutRegistry, type LoginBrand, LoginLayout, type LoginLayoutProps, collectDefaultOpenKeys, createLayoutRegistry, findMenuChain, registerBuiltinLayouts, resolveLayout };
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -79,6 +79,62 @@ interface LandingLayoutProps {
|
|
|
79
79
|
footer?: ReactNode;
|
|
80
80
|
children?: ReactNode;
|
|
81
81
|
}
|
|
82
|
+
/** ChatLayout 菜单项(显式 menu 数据驱动;registry 推导时由 router MenuItem 映射) */
|
|
83
|
+
interface ChatLayoutMenuItem {
|
|
84
|
+
key: string;
|
|
85
|
+
label: string;
|
|
86
|
+
/** 图标名(Icon 白名单,kebab/Pascal 均可) */
|
|
87
|
+
icon?: string;
|
|
88
|
+
/** label 后的角标 */
|
|
89
|
+
badge?: string | number;
|
|
90
|
+
/** label 右侧的状态圆点 */
|
|
91
|
+
dot?: boolean;
|
|
92
|
+
/** 分组标题(相邻同组只渲染一次) */
|
|
93
|
+
group?: string;
|
|
94
|
+
/** 置灰不可选 */
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
/** 路由路径(registry 推导时来自 MenuItem.path;bridge 导航与 active 推导用) */
|
|
97
|
+
path?: string;
|
|
98
|
+
}
|
|
99
|
+
/** ChatLayout 品牌区(与 Sidebar 品牌区同构:{ title, logo? } 对象或任意 ReactNode) */
|
|
100
|
+
type ChatLayoutBrand = {
|
|
101
|
+
title: string;
|
|
102
|
+
logo?: string;
|
|
103
|
+
} | ReactNode;
|
|
104
|
+
/**
|
|
105
|
+
* ChatLayout props(设计决策 D7):聊天场景外壳布局——
|
|
106
|
+
* 品牌区 + 菜单侧栏 + 主内容区。
|
|
107
|
+
*
|
|
108
|
+
* 菜单来源优先级:`sidebar` 槽 > `menu` 显式数据 > `registry` 推导 > 空侧栏。
|
|
109
|
+
* 导航行为:`onMenuSelect` 提供时调用之;否则有 `bridge` 且项有 `path` 时
|
|
110
|
+
* `bridge.push(path)`。高亮推导:`activeMenuKey` > `route` > `bridge` 订阅。
|
|
111
|
+
*/
|
|
112
|
+
interface ChatLayoutProps {
|
|
113
|
+
/** 品牌区({ title, logo } 对象或任意 ReactNode) */
|
|
114
|
+
brand?: ChatLayoutBrand;
|
|
115
|
+
/** 显式菜单数据;提供时优先于 registry 推导 */
|
|
116
|
+
menu?: ChatLayoutMenuItem[];
|
|
117
|
+
/** 菜单注册表(app-shell 注入);无 menu 时据此推导菜单 */
|
|
118
|
+
registry?: MenuRegistry;
|
|
119
|
+
/** 导航桥(app-shell 注入);默认导航与 active 推导用 */
|
|
120
|
+
bridge?: NavigationBridge;
|
|
121
|
+
/** 路由上下文(测试友好,优先于 bridge 订阅) */
|
|
122
|
+
route?: RouteContext;
|
|
123
|
+
/** 权限检查器(registry 推导时过滤菜单) */
|
|
124
|
+
permissionChecker?: PermissionChecker;
|
|
125
|
+
/** 受控高亮项 key(优先于 route/bridge 推导) */
|
|
126
|
+
activeMenuKey?: string;
|
|
127
|
+
/** 菜单项点击回调(disabled 项不触发);提供时替代默认导航 */
|
|
128
|
+
onMenuSelect?: (key: string, item: ChatLayoutMenuItem) => void;
|
|
129
|
+
/** 桌面端可折叠为 icon rail(透传 Sidebar;缺省 false) */
|
|
130
|
+
collapsible?: boolean;
|
|
131
|
+
/** 自由侧栏槽(提供时替代内建菜单) */
|
|
132
|
+
sidebar?: ReactNode;
|
|
133
|
+
/** 侧栏底部固定槽(渲染在滚动区之后,不随内容滚动) */
|
|
134
|
+
sidebarFooter?: ReactNode;
|
|
135
|
+
/** 主内容区 */
|
|
136
|
+
children?: ReactNode;
|
|
137
|
+
}
|
|
82
138
|
|
|
83
139
|
/**
|
|
84
140
|
* 菜单链(设计决策 D2):沿可见树查找 menuId 的父链,
|
|
@@ -98,7 +154,7 @@ declare function findMenuChain(registry: MenuRegistry, menuId: string): MenuItem
|
|
|
98
154
|
declare function collectDefaultOpenKeys(registry: MenuRegistry, activeMenuId?: string): string[];
|
|
99
155
|
|
|
100
156
|
/**
|
|
101
|
-
*
|
|
157
|
+
* AdminLayout:内置默认 UI 实现的管理后台布局——
|
|
102
158
|
* 复用 `AdminLayoutProps`;Header(brand + headerExtra)/ Sidebar / 内容出口;
|
|
103
159
|
* config 开关(header/sidebar 缺省开,tabs/breadcrumb/footer 缺省关)一致;
|
|
104
160
|
* mode(top-side/top-bottom/side-full/two-column)、fixedHeader/fixedSider、
|
|
@@ -112,47 +168,69 @@ declare function collectDefaultOpenKeys(registry: MenuRegistry, activeMenuId?: s
|
|
|
112
168
|
* 样式:Tailwind 工具类读取 shadcn 语义令牌(bg-background / border-border /
|
|
113
169
|
* text-muted-foreground …),结构钩子用 data-slot 属性。
|
|
114
170
|
*/
|
|
115
|
-
declare function
|
|
171
|
+
declare function AdminLayout({ config, brand, registry, bridge, route: routeProp, permissionChecker, headerExtra, children, }: AdminLayoutProps): React.JSX.Element;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* BlankLayout:内置默认 UI 实现的无壳布局——
|
|
175
|
+
* 直接渲染 children(带最小页面容器样式)。
|
|
176
|
+
*/
|
|
177
|
+
declare function BlankLayout({ children }: BlankLayoutProps): React.JSX.Element;
|
|
116
178
|
|
|
117
179
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
180
|
+
* ChatLayout(设计决策 D7):聊天场景外壳布局——
|
|
181
|
+
* 品牌区 + 菜单侧栏 + 主内容区,基于 ui `Sidebar` + `Menu` 组件组合。
|
|
182
|
+
*
|
|
183
|
+
* 菜单来源优先级(高 → 低):
|
|
184
|
+
* 1. `sidebar` 槽:自由侧栏内容,整体替代内建菜单;
|
|
185
|
+
* 2. `menu` 显式数据:调用方直接提供菜单项(含 icon/badge/dot/group/disabled);
|
|
186
|
+
* 3. `registry` 推导:app-shell 注入的 MenuRegistry 可见树
|
|
187
|
+
* (group 类型项 → 分组标签,page/link → 菜单项,permissionChecker 过滤);
|
|
188
|
+
* 4. 空侧栏:以上均无时不渲染侧栏,主区通栏。
|
|
189
|
+
*
|
|
190
|
+
* 导航行为:`onMenuSelect` 提供时调用之(disabled 项不触发);
|
|
191
|
+
* 否则有 `bridge` 且项有 `path` 时 `bridge.push(path)`。
|
|
192
|
+
*
|
|
193
|
+
* 高亮推导优先级:`activeMenuKey` > `route`(测试友好)>
|
|
194
|
+
* `bridge` 订阅 location 按 `path === pathname` 命中。
|
|
195
|
+
*
|
|
196
|
+
* 与 chat 包的 `ChatLayout`(header + ChatView 极简布局)不同,
|
|
197
|
+
* 本组件是带侧栏菜单的完整外壳,两者不冲突(不同包导出)。
|
|
120
198
|
*/
|
|
121
|
-
declare function
|
|
199
|
+
declare function ChatLayout({ brand, menu, registry, bridge, route: routeProp, permissionChecker, activeMenuKey, onMenuSelect, collapsible, sidebar, sidebarFooter, children, }: ChatLayoutProps): React.JSX.Element;
|
|
122
200
|
|
|
123
201
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
202
|
+
* LoginLayout:内置默认 UI 实现的登录页外壳——
|
|
203
|
+
* 只负责品牌区与表单出口的布局,不含任何认证逻辑。
|
|
126
204
|
* variant center:居中卡片(vendored shadcn Card);split:左品牌右表单
|
|
127
205
|
* (缺省 center)。
|
|
128
206
|
*/
|
|
129
|
-
declare function
|
|
207
|
+
declare function LoginLayout({ variant, brand, children, }: LoginLayoutProps): React.JSX.Element;
|
|
130
208
|
|
|
131
209
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
210
|
+
* LandingLayout:内置默认 UI 实现的落地页外壳——
|
|
211
|
+
* 可选 navbar / footer 插槽,children 为主内容区。
|
|
134
212
|
*/
|
|
135
|
-
declare function
|
|
213
|
+
declare function LandingLayout({ navbar, footer, children, }: LandingLayoutProps): React.JSX.Element;
|
|
136
214
|
|
|
137
215
|
/** 布局组件类型(各布局 props 不同,注册表按通用组件存储) */
|
|
138
216
|
type LayoutComponent = ComponentType<any>;
|
|
139
217
|
/** LayoutRegistry:布局类型名 → 布局组件(复用 core Registry) */
|
|
140
218
|
type LayoutRegistry = Registry<LayoutComponent>;
|
|
141
219
|
/**
|
|
142
|
-
*
|
|
143
|
-
* (类型名:admin / blank / login / landing)。
|
|
220
|
+
* registerBuiltinLayouts:向 LayoutRegistry 注册内置实现的五种布局
|
|
221
|
+
* (类型名:admin / blank / login / landing / chat)。
|
|
144
222
|
*/
|
|
145
|
-
declare function
|
|
223
|
+
declare function registerBuiltinLayouts(registry: LayoutRegistry): void;
|
|
146
224
|
/**
|
|
147
|
-
*
|
|
148
|
-
* admin / blank / login / landing
|
|
225
|
+
* createLayoutRegistry(设计决策 D5):预注册内置版
|
|
226
|
+
* admin / blank / login / landing / chat 五种布局组件。
|
|
149
227
|
* 业务可继续 register 自定义布局类型。
|
|
150
228
|
*/
|
|
151
|
-
declare function
|
|
229
|
+
declare function createLayoutRegistry(): LayoutRegistry;
|
|
152
230
|
/**
|
|
153
231
|
* resolveLayout(设计决策 D5):按类型名解析布局组件;
|
|
154
|
-
* 未命中返回
|
|
232
|
+
* 未命中返回 BlankLayout 并 console.warn(不抛错,不崩页面)。
|
|
155
233
|
*/
|
|
156
234
|
declare function resolveLayout(registry: LayoutRegistry, type: string): LayoutComponent;
|
|
157
235
|
|
|
158
|
-
export { type AdminBrand, type AdminLayoutBreakpoint, type AdminLayoutConfig, type AdminLayoutMode, type AdminLayoutProps, type BlankLayoutProps, type
|
|
236
|
+
export { type AdminBrand, AdminLayout, type AdminLayoutBreakpoint, type AdminLayoutConfig, type AdminLayoutMode, type AdminLayoutProps, BlankLayout, type BlankLayoutProps, ChatLayout, type ChatLayoutBrand, type ChatLayoutMenuItem, type ChatLayoutProps, LandingLayout, type LandingLayoutProps, type LayoutComponent, type LayoutRegistry, type LoginBrand, LoginLayout, type LoginLayoutProps, collectDefaultOpenKeys, createLayoutRegistry, findMenuChain, registerBuiltinLayouts, resolveLayout };
|
package/dist/layout/index.js
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
AdminLayout,
|
|
3
|
+
BlankLayout,
|
|
4
|
+
ChatLayout,
|
|
5
|
+
LandingLayout,
|
|
6
|
+
LoginLayout,
|
|
6
7
|
collectDefaultOpenKeys,
|
|
7
|
-
|
|
8
|
+
createLayoutRegistry,
|
|
8
9
|
findMenuChain,
|
|
9
|
-
|
|
10
|
+
registerBuiltinLayouts,
|
|
10
11
|
resolveLayout
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-22TEN3ER.js";
|
|
13
|
+
import "../chunk-HJPHJKVA.js";
|
|
14
|
+
import "../chunk-2LYMCWEJ.js";
|
|
14
15
|
import "../chunk-RQHJBTEU.js";
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
AdminLayout,
|
|
18
|
+
BlankLayout,
|
|
19
|
+
ChatLayout,
|
|
20
|
+
LandingLayout,
|
|
21
|
+
LoginLayout,
|
|
20
22
|
collectDefaultOpenKeys,
|
|
21
|
-
|
|
23
|
+
createLayoutRegistry,
|
|
22
24
|
findMenuChain,
|
|
23
|
-
|
|
25
|
+
registerBuiltinLayouts,
|
|
24
26
|
resolveLayout
|
|
25
27
|
};
|
package/dist/ui/index.cjs
CHANGED
|
@@ -2283,7 +2283,7 @@ function TooltipContent({
|
|
|
2283
2283
|
...props,
|
|
2284
2284
|
children: [
|
|
2285
2285
|
children,
|
|
2286
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5
|
|
2286
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
|
|
2287
2287
|
]
|
|
2288
2288
|
}
|
|
2289
2289
|
)
|
package/dist/ui/index.js
CHANGED
|
@@ -164,10 +164,6 @@ import {
|
|
|
164
164
|
Toggle,
|
|
165
165
|
ToggleGroup,
|
|
166
166
|
ToggleGroupItem,
|
|
167
|
-
Tooltip,
|
|
168
|
-
TooltipContent,
|
|
169
|
-
TooltipProvider,
|
|
170
|
-
TooltipTrigger,
|
|
171
167
|
Typography,
|
|
172
168
|
badgeVariants,
|
|
173
169
|
chartColor,
|
|
@@ -177,7 +173,7 @@ import {
|
|
|
177
173
|
toggleVariants,
|
|
178
174
|
typographyVariants,
|
|
179
175
|
useCarousel
|
|
180
|
-
} from "../chunk-
|
|
176
|
+
} from "../chunk-Q5NUGUJG.js";
|
|
181
177
|
import {
|
|
182
178
|
Button,
|
|
183
179
|
Dialog,
|
|
@@ -216,8 +212,12 @@ import {
|
|
|
216
212
|
CardTitle,
|
|
217
213
|
Popover,
|
|
218
214
|
PopoverContent,
|
|
219
|
-
PopoverTrigger
|
|
220
|
-
|
|
215
|
+
PopoverTrigger,
|
|
216
|
+
Tooltip,
|
|
217
|
+
TooltipContent,
|
|
218
|
+
TooltipProvider,
|
|
219
|
+
TooltipTrigger
|
|
220
|
+
} from "../chunk-2LYMCWEJ.js";
|
|
221
221
|
import "../chunk-RQHJBTEU.js";
|
|
222
222
|
export {
|
|
223
223
|
Accordion,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pactor-app/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.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",
|
|
@@ -104,10 +104,10 @@
|
|
|
104
104
|
"recharts": "^3.10.1",
|
|
105
105
|
"tailwind-merge": "^3.6.0",
|
|
106
106
|
"vaul": "^1.1.2",
|
|
107
|
-
"@pactor-app/
|
|
108
|
-
"@pactor-app/
|
|
109
|
-
"@pactor-app/
|
|
110
|
-
"@pactor-app/runtime": "1.
|
|
107
|
+
"@pactor-app/core": "1.2.0",
|
|
108
|
+
"@pactor-app/router": "1.2.0",
|
|
109
|
+
"@pactor-app/permission": "1.2.0",
|
|
110
|
+
"@pactor-app/runtime": "1.2.0"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
113
|
"react": ">=18",
|
package/styles.css
CHANGED
|
@@ -306,6 +306,9 @@
|
|
|
306
306
|
.z-20 {
|
|
307
307
|
z-index: 20;
|
|
308
308
|
}
|
|
309
|
+
.z-40 {
|
|
310
|
+
z-index: 40;
|
|
311
|
+
}
|
|
309
312
|
.z-50 {
|
|
310
313
|
z-index: 50;
|
|
311
314
|
}
|
|
@@ -447,6 +450,10 @@
|
|
|
447
450
|
.aspect-square {
|
|
448
451
|
aspect-ratio: 1 / 1;
|
|
449
452
|
}
|
|
453
|
+
.size-1\.5 {
|
|
454
|
+
width: calc(var(--spacing) * 1.5);
|
|
455
|
+
height: calc(var(--spacing) * 1.5);
|
|
456
|
+
}
|
|
450
457
|
.size-2 {
|
|
451
458
|
width: calc(var(--spacing) * 2);
|
|
452
459
|
height: calc(var(--spacing) * 2);
|
|
@@ -566,6 +573,9 @@
|
|
|
566
573
|
.min-h-16 {
|
|
567
574
|
min-height: calc(var(--spacing) * 16);
|
|
568
575
|
}
|
|
576
|
+
.min-h-\[60px\] {
|
|
577
|
+
min-height: 60px;
|
|
578
|
+
}
|
|
569
579
|
.min-h-screen {
|
|
570
580
|
min-height: 100vh;
|
|
571
581
|
}
|
|
@@ -587,9 +597,6 @@
|
|
|
587
597
|
.w-12 {
|
|
588
598
|
width: calc(var(--spacing) * 12);
|
|
589
599
|
}
|
|
590
|
-
.w-14 {
|
|
591
|
-
width: calc(var(--spacing) * 14);
|
|
592
|
-
}
|
|
593
600
|
.w-16 {
|
|
594
601
|
width: calc(var(--spacing) * 16);
|
|
595
602
|
}
|
|
@@ -706,10 +713,6 @@
|
|
|
706
713
|
--tw-translate-y: -50%;
|
|
707
714
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
708
715
|
}
|
|
709
|
-
.translate-y-\[calc\(-50\%_-_2px\)\] {
|
|
710
|
-
--tw-translate-y: calc(-50% - 2px);
|
|
711
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
712
|
-
}
|
|
713
716
|
.rotate-45 {
|
|
714
717
|
rotate: 45deg;
|
|
715
718
|
}
|
|
@@ -737,12 +740,18 @@
|
|
|
737
740
|
.cursor-grab {
|
|
738
741
|
cursor: grab;
|
|
739
742
|
}
|
|
743
|
+
.cursor-not-allowed {
|
|
744
|
+
cursor: not-allowed;
|
|
745
|
+
}
|
|
740
746
|
.cursor-pointer {
|
|
741
747
|
cursor: pointer;
|
|
742
748
|
}
|
|
743
749
|
.touch-none {
|
|
744
750
|
touch-action: none;
|
|
745
751
|
}
|
|
752
|
+
.resize-none {
|
|
753
|
+
resize: none;
|
|
754
|
+
}
|
|
746
755
|
.scroll-m-20 {
|
|
747
756
|
scroll-margin: calc(var(--spacing) * 20);
|
|
748
757
|
}
|
|
@@ -1017,6 +1026,12 @@
|
|
|
1017
1026
|
background-color: color-mix(in oklab, var(--background) 60%, transparent);
|
|
1018
1027
|
}
|
|
1019
1028
|
}
|
|
1029
|
+
.bg-black\/40 {
|
|
1030
|
+
background-color: color-mix(in srgb, #000 40%, transparent);
|
|
1031
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1032
|
+
background-color: color-mix(in oklab, var(--color-black) 40%, transparent);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1020
1035
|
.bg-black\/50 {
|
|
1021
1036
|
background-color: color-mix(in srgb, #000 50%, transparent);
|
|
1022
1037
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1164,6 +1179,9 @@
|
|
|
1164
1179
|
.pt-2 {
|
|
1165
1180
|
padding-top: calc(var(--spacing) * 2);
|
|
1166
1181
|
}
|
|
1182
|
+
.pt-3 {
|
|
1183
|
+
padding-top: calc(var(--spacing) * 3);
|
|
1184
|
+
}
|
|
1167
1185
|
.pt-4 {
|
|
1168
1186
|
padding-top: calc(var(--spacing) * 4);
|
|
1169
1187
|
}
|
|
@@ -1420,6 +1438,11 @@
|
|
|
1420
1438
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1421
1439
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1422
1440
|
}
|
|
1441
|
+
.transition-\[width\,transform\] {
|
|
1442
|
+
transition-property: width,transform;
|
|
1443
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1444
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1445
|
+
}
|
|
1423
1446
|
.transition-\[width\] {
|
|
1424
1447
|
transition-property: width;
|
|
1425
1448
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -1440,6 +1463,11 @@
|
|
|
1440
1463
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1441
1464
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1442
1465
|
}
|
|
1466
|
+
.transition-shadow {
|
|
1467
|
+
transition-property: box-shadow;
|
|
1468
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1469
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1470
|
+
}
|
|
1443
1471
|
.transition-transform {
|
|
1444
1472
|
transition-property: transform, translate, scale, rotate;
|
|
1445
1473
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -1523,6 +1551,9 @@
|
|
|
1523
1551
|
border-left-style: var(--tw-border-style);
|
|
1524
1552
|
border-left-width: 1px;
|
|
1525
1553
|
}
|
|
1554
|
+
.first\:pt-1:first-child {
|
|
1555
|
+
padding-top: var(--spacing);
|
|
1556
|
+
}
|
|
1526
1557
|
.last\:rounded-r-md:last-child {
|
|
1527
1558
|
border-top-right-radius: calc(var(--radius) * 0.8);
|
|
1528
1559
|
border-bottom-right-radius: calc(var(--radius) * 0.8);
|
|
@@ -1637,6 +1668,13 @@
|
|
|
1637
1668
|
.focus-visible\:border-ring:focus-visible {
|
|
1638
1669
|
border-color: var(--ring);
|
|
1639
1670
|
}
|
|
1671
|
+
.focus-visible\:border-transparent:focus-visible {
|
|
1672
|
+
border-color: transparent;
|
|
1673
|
+
}
|
|
1674
|
+
.focus-visible\:ring-0:focus-visible {
|
|
1675
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
1676
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1677
|
+
}
|
|
1640
1678
|
.focus-visible\:ring-1:focus-visible {
|
|
1641
1679
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
1642
1680
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -1817,6 +1855,18 @@
|
|
|
1817
1855
|
.data-\[selected\=true\]\:text-accent-foreground[data-selected="true"] {
|
|
1818
1856
|
color: var(--accent-foreground);
|
|
1819
1857
|
}
|
|
1858
|
+
.data-\[side\=bottom\]\:-top-1[data-side="bottom"] {
|
|
1859
|
+
top: calc(var(--spacing) * -1);
|
|
1860
|
+
}
|
|
1861
|
+
.data-\[side\=left\]\:-right-1[data-side="left"] {
|
|
1862
|
+
right: calc(var(--spacing) * -1);
|
|
1863
|
+
}
|
|
1864
|
+
.data-\[side\=right\]\:-left-1[data-side="right"] {
|
|
1865
|
+
left: calc(var(--spacing) * -1);
|
|
1866
|
+
}
|
|
1867
|
+
.data-\[side\=top\]\:-bottom-1[data-side="top"] {
|
|
1868
|
+
bottom: calc(var(--spacing) * -1);
|
|
1869
|
+
}
|
|
1820
1870
|
.data-\[size\=default\]\:h-9[data-size="default"] {
|
|
1821
1871
|
height: calc(var(--spacing) * 9);
|
|
1822
1872
|
}
|
|
@@ -1912,6 +1962,34 @@
|
|
|
1912
1962
|
border-bottom-style: var(--tw-border-style);
|
|
1913
1963
|
border-bottom-width: 1px;
|
|
1914
1964
|
}
|
|
1965
|
+
@media (width < 48rem) {
|
|
1966
|
+
.max-md\:fixed {
|
|
1967
|
+
position: fixed;
|
|
1968
|
+
}
|
|
1969
|
+
.max-md\:inset-y-0 {
|
|
1970
|
+
inset-block: 0px;
|
|
1971
|
+
}
|
|
1972
|
+
.max-md\:left-0 {
|
|
1973
|
+
left: 0px;
|
|
1974
|
+
}
|
|
1975
|
+
.max-md\:z-50 {
|
|
1976
|
+
z-index: 50;
|
|
1977
|
+
}
|
|
1978
|
+
.max-md\:hidden {
|
|
1979
|
+
display: none;
|
|
1980
|
+
}
|
|
1981
|
+
.max-md\:w-60 {
|
|
1982
|
+
width: calc(var(--spacing) * 60);
|
|
1983
|
+
}
|
|
1984
|
+
.max-md\:-translate-x-full {
|
|
1985
|
+
--tw-translate-x: -100%;
|
|
1986
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1987
|
+
}
|
|
1988
|
+
.max-md\:data-\[open\=true\]\:translate-x-0[data-open="true"] {
|
|
1989
|
+
--tw-translate-x: 0px;
|
|
1990
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1915
1993
|
@media (width >= 40rem) {
|
|
1916
1994
|
.sm\:block {
|
|
1917
1995
|
display: block;
|
|
@@ -1951,6 +2029,9 @@
|
|
|
1951
2029
|
}
|
|
1952
2030
|
}
|
|
1953
2031
|
@media (width >= 48rem) {
|
|
2032
|
+
.md\:hidden {
|
|
2033
|
+
display: none;
|
|
2034
|
+
}
|
|
1954
2035
|
.md\:flex-row {
|
|
1955
2036
|
flex-direction: row;
|
|
1956
2037
|
}
|