@manohub/ui 1.1.5 → 1.2.1

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.
Files changed (41) hide show
  1. package/README.md +10 -0
  2. package/dist/components/button/index.d.ts +12 -12
  3. package/dist/components/capsule/index.d.ts +1 -1
  4. package/dist/components/code-block/index.d.ts +5 -5
  5. package/dist/components/date-picker/date-panel.d.ts +1 -1
  6. package/dist/components/date-picker/index.d.ts +6 -6
  7. package/dist/components/dialog/index.d.ts +2 -12
  8. package/dist/components/dialog/index.js +8 -7
  9. package/dist/components/drawer/index.js +7 -1
  10. package/dist/components/filter/index.d.ts +2 -2
  11. package/dist/components/form/index.d.ts +4 -4
  12. package/dist/components/input/index.d.ts +10 -10
  13. package/dist/components/input/number-input.d.ts +2 -2
  14. package/dist/components/list/list.d.ts +1 -1
  15. package/dist/components/list/tree.d.ts +1 -1
  16. package/dist/components/list-view/index.d.ts +2 -2
  17. package/dist/components/notice/index.d.ts +2 -2
  18. package/dist/components/notification/index.d.ts +1 -1
  19. package/dist/components/page/index.d.ts +10 -5
  20. package/dist/components/page/index.js +20 -5
  21. package/dist/components/panel/index.d.ts +2 -2
  22. package/dist/components/panel/index.js +10 -3
  23. package/dist/components/part-padding.d.ts +9 -3
  24. package/dist/components/part-padding.js +12 -6
  25. package/dist/components/query-state/index.d.ts +1 -3
  26. package/dist/components/radio/index.d.ts +7 -7
  27. package/dist/components/scrollbar/index.d.ts +50 -0
  28. package/dist/components/scrollbar/index.js +187 -0
  29. package/dist/components/select/select-list.d.ts +1 -3
  30. package/dist/components/tabbar/index.d.ts +1 -1
  31. package/dist/components/table/index.js +10 -3
  32. package/dist/components/tabs/index.d.ts +3 -3
  33. package/dist/components/toast/index.d.ts +4 -4
  34. package/dist/styles/components/dialog.css +21 -6
  35. package/dist/styles/components/drawer.css +18 -5
  36. package/dist/styles/components/page.css +47 -33
  37. package/dist/styles/components/panel.css +17 -0
  38. package/dist/styles/components/scrollbar.css +63 -0
  39. package/dist/styles/components/table.css +33 -4
  40. package/dist/styles/index.css +1 -0
  41. package/package.json +2 -2
@@ -90,7 +90,7 @@ export declare const Toast: import("vue").DefineComponent<import("vue").ExtractP
90
90
  onClose?: (() => any) | undefined;
91
91
  }>, {
92
92
  text: string;
93
- icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
93
+ icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "close" | "pause" | "play" | "image" | "delete" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
94
94
  closable: boolean;
95
95
  tone: ToastTone;
96
96
  action: string;
@@ -142,7 +142,7 @@ export declare const ToastCompound: {
142
142
  close: () => true;
143
143
  }, import("vue").PublicProps, {
144
144
  text: string;
145
- icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
145
+ icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "close" | "pause" | "play" | "image" | "delete" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
146
146
  closable: boolean;
147
147
  tone: ToastTone;
148
148
  action: string;
@@ -196,7 +196,7 @@ export declare const ToastCompound: {
196
196
  onClose?: (() => any) | undefined;
197
197
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
198
198
  text: string;
199
- icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
199
+ icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "close" | "pause" | "play" | "image" | "delete" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
200
200
  closable: boolean;
201
201
  tone: ToastTone;
202
202
  action: string;
@@ -247,7 +247,7 @@ export declare const ToastCompound: {
247
247
  close: () => true;
248
248
  }, string, {
249
249
  text: string;
250
- icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
250
+ icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "close" | "pause" | "play" | "image" | "delete" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
251
251
  closable: boolean;
252
252
  tone: ToastTone;
253
253
  action: string;
@@ -124,24 +124,39 @@
124
124
  outline-offset: 2px;
125
125
  }
126
126
 
127
- /* 内容区(左右内距自持,上下归面板;三段之间无分割线,交界间距只由面板的 `gap` 拥有)
127
+ /* 内容区(上下归面板;三段之间无分割线,交界间距只由面板的 `gap` 拥有)
128
128
  `flex: 1 1 auto` + `min-height: 0`:吃掉页头与底栏之外的全部高度(含 `panelHeight` /
129
129
  消费方经 style 给的高度),超出即**本段**滚动 —— 页头与底栏因此永远可见。
130
- 左右若是搬到面板上,滚动条就会落在面板内 24 处(滚动条吃的是滚动容器自己的左右内距)。 */
130
+
131
+ ⚠️ 2026-10-19 起本段是**定位父**(浮层滚动条的宿主),自己不滚:滚动落在里面的 `.mh-dialog__scroll`。
132
+ 浮层是 `position: absolute` 的兄弟节点,挂在滚动盒自己身上会跟着内容滚走(Table / Panel 同款两层结构)。
133
+ 左右内距跟着**滚动盒**走 —— 它属于滚动容器的可视范围(原生滚动条也吃自己容器的内距),
134
+ 落在 Body 上会让浮层拇指与内容边对不齐;搬到面板上则会把滚动条顶到面板内 24 处(2026-10-10 实测)。 */
131
135
  .mh-dialog__body {
136
+ position: relative;
132
137
  flex: 1 1 auto;
133
138
  min-height: 0;
134
- overflow-y: auto;
135
- padding-inline: var(--ui-dialog-padding-x);
139
+ overflow: hidden;
136
140
  font-size: var(--ui-font-body);
137
141
  line-height: var(--ui-line-body);
138
142
  color: var(--ui-base-content);
139
143
  }
144
+ /* 正文的唯一滚动盒:原生条两轴归零(白缝成因见 `scrollbar.css` 头),拇指由浮层画 */
145
+ .mh-dialog__scroll {
146
+ height: 100%;
147
+ overflow-y: auto;
148
+ padding-inline: var(--ui-dialog-padding-x);
149
+ scrollbar-width: none;
150
+ }
151
+ .mh-dialog__scroll::-webkit-scrollbar {
152
+ width: 0;
153
+ height: 0;
154
+ }
140
155
  /* 首尾孩子不吃外边距:正文里的 <p> 自带 UA margin,会与内容内距叠成一块大空档 */
141
- .mh-dialog__body > :first-child {
156
+ .mh-dialog__body > .mh-dialog__scroll > :first-child {
142
157
  margin-top: 0;
143
158
  }
144
- .mh-dialog__body > :last-child {
159
+ .mh-dialog__body > .mh-dialog__scroll > :last-child {
145
160
  margin-bottom: 0;
146
161
  }
147
162
 
@@ -111,21 +111,34 @@
111
111
  outline-offset: 2px;
112
112
  }
113
113
 
114
- /* 内容区:**三段里唯一可滚的那段**(页头与底栏固定,抽屉才像抽屉) */
114
+ /* 内容区:**三段里唯一可滚的那段**(页头与底栏固定,抽屉才像抽屉)。
115
+ ⚠️ 2026-10-19 起本段是**定位父**(浮层滚动条的宿主),自己不滚:滚动落在 `.mh-drawer__scroll`。
116
+ 内距跟着滚动盒走(它属于滚动容器的可视范围,浮动拇指的位置与长度才对得上;口径同 Dialog / Panel)。 */
115
117
  .mh-drawer__body {
118
+ position: relative;
116
119
  flex: 1 1 auto;
117
120
  min-height: 0;
118
- overflow-y: auto;
119
- padding: var(--ui-drawer-padding-x);
121
+ overflow: hidden;
120
122
  font-size: var(--ui-font-body);
121
123
  line-height: var(--ui-line-body);
122
124
  color: var(--ui-base-content);
123
125
  }
126
+ /* 正文的唯一滚动盒:原生条两轴归零(白缝成因见 `scrollbar.css` 头),拇指由浮层画 */
127
+ .mh-drawer__scroll {
128
+ height: 100%;
129
+ overflow-y: auto;
130
+ padding: var(--ui-drawer-padding-x);
131
+ scrollbar-width: none;
132
+ }
133
+ .mh-drawer__scroll::-webkit-scrollbar {
134
+ width: 0;
135
+ height: 0;
136
+ }
124
137
  /* 首尾孩子不吃外边距:正文里的 <p> 自带 UA margin,会与内容内距叠成一块大空档 */
125
- .mh-drawer__body > :first-child {
138
+ .mh-drawer__body > .mh-drawer__scroll > :first-child {
126
139
  margin-top: 0;
127
140
  }
128
- .mh-drawer__body > :last-child {
141
+ .mh-drawer__body > .mh-drawer__scroll > :last-child {
129
142
  margin-bottom: 0;
130
143
  }
131
144
 
@@ -19,7 +19,7 @@
19
19
  .mh-page__header {
20
20
  flex-shrink: 0;
21
21
  /* 页头条规格依据 MH后台-0911 设计稿 node 0:3888:条高 56(14+28+13+1px 分隔线)、左右 20 */
22
- padding: 14px var(--ui-space-5) 13px;
22
+ padding: 14px var(--ui-gutter-x) 13px;
23
23
  border-bottom: 1px solid var(--ui-base-300);
24
24
  }
25
25
 
@@ -92,27 +92,52 @@
92
92
  (14px)提供,避免两块 padding 叠加成双倍间距 */
93
93
  .mh-page__filter {
94
94
  flex-shrink: 0;
95
- padding: 14px var(--ui-space-5) 0;
95
+ padding: 14px var(--ui-gutter-x) 0;
96
96
  }
97
97
 
98
+ /* 主体区:`scroll` 档做**定位父**(浮层滚动条的宿主),自己不滚 —— 滚动交给里面的
99
+ `.mh-page__scroll`;`plain` 档**没有滚动盒**,业务内容就是本件的直接子节点。
100
+ 两档共用本件 ⇒ 高度链与 `overflow: hidden` 只有一处。
101
+ 为什么要两层(仅 `scroll` 档):浮层是 `position: absolute` 的兄弟节点,挂在滚动盒自己
102
+ 身上会跟着内容滚走(Table 满高档 / Panel.Body / Dialog / Drawer 同款结构,2026-10-19 收口)。
103
+ ⚠️ 代价:`Page.Body > *` 这类直接子选择器只在 `plain` 档命中业务内容,见 `page.md`。 */
98
104
  .mh-page__body {
105
+ position: relative;
99
106
  flex: 1;
100
107
  min-height: 0;
101
- /* 页面内距 20(与页头左边距对齐,同设计稿) */
102
- padding: 0 var(--ui-space-5);
108
+ overflow: hidden;
103
109
  }
104
110
 
105
- .mh-page__body--scroll {
111
+ /* 主体滚动盒(**只服务 `scroll` 档**):缺省左右留白落在这一层(与页头左边距对齐,同设计稿)。
112
+ 为什么能落在这里:内距属于滚动容器的可视范围,而浮层拇指画在 `.mh-page__body` 上
113
+ (滚动盒的兄弟)⇒ 拇指仍在页缘。原生条两轴归零(白缝成因见 `scrollbar.css` 头),拇指由浮层画。 */
114
+ .mh-page__scroll {
115
+ height: 100%;
116
+ padding: 0 var(--ui-gutter-x);
117
+ overflow: hidden;
118
+ scrollbar-width: none;
119
+ }
120
+ .mh-page__scroll::-webkit-scrollbar {
121
+ width: 0;
122
+ height: 0;
123
+ }
124
+
125
+ .mh-page__body--scroll > .mh-page__scroll {
106
126
  overflow-y: auto;
107
127
  }
108
128
 
129
+ /* `plain` 档专属的缺省内距 = **0**(`scroll` 档那条 20 不跟过来):本档没有滚动盒,
130
+ 本件就是区域容器的**祖先** —— 横向内距会把内层整块推进来,区域自己的滚动条随之内缩、
131
+ 贴不住页缘。留白交区域容器(`Panel.Body` 的滚动盒)承担,那里的内距不改变区域的框。
132
+ 消费方照常传 `padding`(口径与其它件一致,落本件),本行只是缺省值。 */
109
133
  .mh-page__body--plain {
110
- overflow: hidden;
134
+ padding: 0;
111
135
  }
112
136
 
137
+ /* 页脚:常驻页底;横向留白与页头 / 主体同源(`--ui-gutter-x`) */
113
138
  .mh-page__footer {
114
139
  flex-shrink: 0;
115
- padding: var(--ui-space-3) var(--ui-space-5);
140
+ padding: var(--ui-space-3) var(--ui-gutter-x);
116
141
  }
117
142
 
118
143
  .mh-page__footer-inner {
@@ -121,15 +146,18 @@
121
146
  }
122
147
 
123
148
  /* ===== Split 双栏 =====
124
- 中间 1px 竖直分隔线由 Split 统一提供(线色与页头下边线同源 --ui-base-300),
125
- 线右侧(主栏)留 --ui-space-4(16px) 内距与线拉开间距;**侧栏不额外加内距**(内容自带)。
149
+ 中间 1px 竖直分隔线由 Split 统一提供(线色与页头下边线同源 --ui-base-300)。
126
150
  业务侧不得再给栏的子元素加竖直边框。
127
151
 
128
152
  滚动:**Split 自身不滚,栏内滚动由内容承担**(双栏内用 Panel,其 Body overflow:auto)。
129
153
  两栏 overflow:hidden 是为了避免「外层先滚、内层滚不到」的双层滚动容器。
130
154
 
131
- 侧栏宽度语义(`sidebar.width`):**内容宽**(content-box),
132
- 1px 边线与 16px 右内距加在框外 —— 消费方不必手算补偿值。 */
155
+ ⚠️ **Split 不提供任何内距**(2026-10-20 撤掉原「线两侧各 16px」):两栏是栏内区域容器(`Panel`)的
156
+ **祖先**,横向内距会把 `Panel` 的框整块推进来 ⇒ 区域自己的浮层滚动条随之内缩、贴不住页缘
157
+ (与 `Page.Body` 的 plain 档同一条口径)。分隔线两侧的呼吸位一律由**栏内内容件自己**给
158
+ (通常是 `Panel` 的 `padding`,或 `Panel.Body` 的 `padding`)—— 那里内距不改变区域的框。
159
+
160
+ 侧栏宽度语义(`sidebar.width`):**内容宽**(content-box),1px 边线加在框外。 */
133
161
  .mh-page__split {
134
162
  height: 100%;
135
163
  display: flex;
@@ -143,25 +171,20 @@
143
171
  box-sizing: content-box;
144
172
  border-right: 1px solid var(--ui-base-300);
145
173
  overflow: hidden;
146
- /* 线**左侧** 16px 内距:与主栏的 padding-left 对称,内容与分隔线各让 16px 拉开
147
- (2026-09-20 口径;改它 = 改口径,锁定断言在 __tests__/page.spec.ts)。 */
148
- padding-right: var(--ui-space-4);
149
174
  /* 收起/展开的宽度过渡(拖拽期由 [data-dragging] 禁掉,保证跟手) */
150
- transition: width 0.2s ease, padding-right 0.2s ease, border-right-width 0.2s ease;
175
+ transition: width 0.2s ease, border-right-width 0.2s ease;
151
176
  }
152
177
 
153
178
  .mh-page__split-main {
154
179
  flex: 1;
155
180
  min-width: 0;
156
- /* 线右侧 16px 内距:把内容与分隔线拉开 */
157
- padding-left: var(--ui-space-4);
158
181
  overflow: hidden;
159
182
  }
160
183
 
161
184
  /* ===== Split 侧栏交互(拖拽调宽 / 收起展开 / 右侧栏镜像)=====
162
185
  三条口径先写在这里(改它们 = 改口径):
163
- 1. **手柄是 0 宽 flex 子项**:不参与空间分配 ⇒ 侧栏的 content-box 宽度语义、线两侧各 16px 内距、
164
- 两栏 overflow:hidden 全部原样成立(命中区靠 ::before 向两侧扩,不占布局)。
186
+ 1. **手柄是 0 宽 flex 子项**:不参与空间分配 ⇒ 侧栏的 content-box 宽度语义
187
+ 与两栏 `overflow:hidden` 全部原样成立(命中区靠 ::before 向两侧扩,不占布局)。
165
188
  2. **高亮是「覆盖」不是「叠加」**:::after 精确压在侧栏那条 1px 边框上(left/right: -1px),
166
189
  因此页面任何时候都只有一条线。
167
190
  3. **每个规则只写一个选择器**(契约断言取「选择器首次出现」的规则体,并集会让断言取错规则),
@@ -243,14 +266,13 @@
243
266
  width: var(--mh-page-split-frozen, 100%);
244
267
  }
245
268
 
246
- /* --- 右侧栏:左侧栏的镜像(分隔线在侧栏左侧、内距镜像)--- */
269
+ /* --- 右侧栏:左侧栏的镜像(分隔线在侧栏左侧)--- */
247
270
  .mh-page__split-sidebar--right {
248
271
  flex-shrink: 0;
249
272
  box-sizing: content-box;
250
273
  border-left: 1px solid var(--ui-base-300);
251
274
  overflow: hidden;
252
- padding-left: var(--ui-space-4);
253
- transition: width 0.2s ease, padding-left 0.2s ease, border-left-width 0.2s ease;
275
+ transition: width 0.2s ease, border-left-width 0.2s ease;
254
276
  }
255
277
 
256
278
  /* 右侧栏的内容定宽之外再靠右锚定:镜像方向要让「揭开」从右边缘往左走(否则内容像从左栏那侧长出来) */
@@ -259,26 +281,18 @@
259
281
  margin-left: auto;
260
282
  }
261
283
 
262
- /* --- 主栏在右侧栏存在时补右内距(左侧那条是基类,逐条镜像)---
263
- 挂类条件只看「右槽位是否存在」,与是否收起无关 ⇒ 收起时主栏留白不跳变。 */
264
- .mh-page__split--has-right .mh-page__split-main {
265
- padding-right: var(--ui-space-4);
266
- }
267
-
268
- /* --- 收起态:宽 0 + 内距 0 + 边线宽 0(边线透明仍占 1px,故归零宽度);内容延迟到过渡结束才隐藏 ---
284
+ /* --- 收起态:宽 0 + 边线宽 0(边线透明仍占 1px,故归零宽度);内容延迟到过渡结束才隐藏 ---
269
285
  收起后那一条只剩 16px 的展开把手,可辨认性由**把手上的按钮**(描边 + 底)承担,不由分隔线承担。 */
270
286
  .mh-page__split--left-collapsed .mh-page__split-sidebar {
271
- padding-right: 0;
272
287
  border-right-width: 0;
273
288
  visibility: hidden;
274
- transition: width 0.2s ease, padding-right 0.2s ease, border-right-width 0.2s ease, visibility 0s linear 0.2s;
289
+ transition: width 0.2s ease, border-right-width 0.2s ease, visibility 0s linear 0.2s;
275
290
  }
276
291
 
277
292
  .mh-page__split--right-collapsed .mh-page__split-sidebar--right {
278
- padding-left: 0;
279
293
  border-left-width: 0;
280
294
  visibility: hidden;
281
- transition: width 0.2s ease, padding-left 0.2s ease, border-left-width 0.2s ease, visibility 0s linear 0.2s;
295
+ transition: width 0.2s ease, border-left-width 0.2s ease, visibility 0s linear 0.2s;
282
296
  }
283
297
 
284
298
  /* --- 拖拽中禁过渡(逐帧过渡会让拖拽滞后)--- */
@@ -46,11 +46,28 @@
46
46
  min-width: 0;
47
47
  }
48
48
 
49
+ /* 内容区:**定位父**(浮层滚动条的宿主),自己不滚 —— 滚动交给里面的 `.mh-panel__scroll`。
50
+ 为什么要两层:浮层是 `position: absolute` 的兄弟节点,挂在滚动盒自己身上会跟着内容滚走(Table 满高档同款结构)。
51
+ 内距(`padding` prop)**落在滚动盒上**(见下条):原生滚动条的可视范围本来就含内距,
52
+ 拇指长度要按同一口径算才与原生一致;Body 因此只做定位父,不吃内距。 */
49
53
  .mh-panel__body {
54
+ position: relative;
50
55
  flex: 1;
51
56
  min-height: 0;
52
57
  min-width: 0;
58
+ overflow: hidden;
59
+ }
60
+
61
+ /* 区域内唯一的滚动盒:原生条两轴归零(白缝成因见 `scrollbar.css` 头),拇指由浮层画。
62
+ 内距下发在这一层(`PanelBody` 的 `padding` prop → 行内 style):滚动条轨道与可视范围因此同一口径 */
63
+ .mh-panel__scroll {
64
+ height: 100%;
53
65
  overflow: auto;
66
+ scrollbar-width: none;
67
+ }
68
+ .mh-panel__scroll::-webkit-scrollbar {
69
+ width: 0;
70
+ height: 0;
54
71
  }
55
72
 
56
73
  /* 面板页脚:区域内**常驻**控件(本区域表格的分页条等),不随内容滚动。
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Scrollbar —— **浮层滚动条的面**(跨件原语,配 `components/scrollbar/` 的 `useOverlayScrollbar`)。
3
+ *
4
+ * 三件事由本文件定死:拇指多大 / 离框多远 / 什么时候显。
5
+ * 消费方(`Table` 满高档、`Panel.Body`)只负责两件:滚动盒把原生条归零、把 `render()` 的输出放进定位父。
6
+ *
7
+ * 为什么不用原生条(出处见组件头):`scrollbar-gutter: stable` 会给任何滚动容器**永久**预留一条槽,
8
+ * 槽里没人上色 ⇒ 内容的分隔线在槽左缘截断成一条贯穿到底的白缝;改回 `auto` 又会在滚动条出入时整块缩 6px。
9
+ * 归零之后 `offsetWidth - clientWidth` 恒等于 0,两个毛病一起消失 —— 代价是拇指得自己画。
10
+ *
11
+ * ⚠️ 6px / 2px / 24px 是**面内字面量**,不新开 `--ui-scrollbar-*` 令牌:6px 与 `kit/index.css` 的滚动条皮肤
12
+ * 同值(那里同样登记了「等设计给值再开槽位」),2px 是微内缩、24px 是拇指下限 —— 都属于「没人会去改的值」。
13
+ */
14
+
15
+ /* 浮层定位盒:铺满**定位父**(滚动盒的兄弟),自己不吃指针 —— 轨道点击翻页明确不做(见组件头第 3 条)。 */
16
+ .mh-scrollbar {
17
+ position: absolute;
18
+ inset: 2px; /* 离外框 2px:视觉上是「浮在帧内」而不是「镶在框上」 */
19
+ z-index: 2; /* 压过固定列一类 sticky 内容(它们用 z-index: 1);加载罩另给更高一档 */
20
+ pointer-events: none;
21
+ }
22
+
23
+ .mh-scrollbar__thumb {
24
+ position: absolute;
25
+ background: var(--ui-base-400);
26
+ border-radius: var(--ui-radius-full);
27
+ opacity: 0; /* 静止不显:浮层不该常驻挡内容 */
28
+ transition: opacity 0.2s ease, background-color 0.15s ease;
29
+ pointer-events: none;
30
+ touch-action: none; /* 触屏上拖拇指才不会被当成滚动手势 */
31
+ }
32
+
33
+ /* 显形档:组件在「滚动 / 指针进入」时挂 `is-visible`,停手 800ms 后摘掉(淡出即上面那 0.2s) */
34
+ .mh-scrollbar.is-visible .mh-scrollbar__thumb {
35
+ opacity: 1;
36
+ pointer-events: auto;
37
+ cursor: grab;
38
+ }
39
+
40
+ /* 悬停 / 拖动提一档深浅:`--ui-base-400`(比线色深、比字色浅的中性档)→ `--ui-base-content-subtle` */
41
+ .mh-scrollbar__thumb:hover,
42
+ .mh-scrollbar.is-dragging .mh-scrollbar__thumb {
43
+ background: var(--ui-base-content-subtle);
44
+ }
45
+ .mh-scrollbar.is-dragging .mh-scrollbar__thumb {
46
+ cursor: grabbing;
47
+ }
48
+
49
+ /* 竖轴:贴右缘;`height` 与 `translateY` 由组件逐帧下发(轨道长取本盒的 clientHeight) */
50
+ .mh-scrollbar__thumb--y {
51
+ top: 0;
52
+ right: 0;
53
+ width: 6px;
54
+ min-height: 24px; /* 行数极多时也抓得住(与组件里的 SCROLLBAR_MIN 同值) */
55
+ }
56
+
57
+ /* 横轴:贴下缘。会压住内容最后一行右侧 6px —— 与「不做轨道点击」同一取舍:浮层不占内容空间 */
58
+ .mh-scrollbar__thumb--x {
59
+ left: 0;
60
+ bottom: 0;
61
+ height: 6px;
62
+ min-width: 24px;
63
+ }
@@ -10,7 +10,7 @@
10
10
  * ⚠️ **单元格左右内距保持 16(`--ui-space-4`)**:设计稿可量的只有「勾选框距表左 20」,而它量的是**内容盒**
11
11
  * (勾选列 40 宽 + 居中时内容盒落在 13 处),无法唯一反推内距,故不作推测性改动。
12
12
  *
13
- * 四条必须照做的**结构**决定(做错就与规范不是一回事):
13
+ * 五条必须照做的**结构**决定(做错就与规范不是一回事):
14
14
  * 1. **边框模型**:默认是外框 + 表头下分割线 + 每行底线(末行去线)⇒ `border-collapse: separate` +
15
15
  * `border-spacing: 0`(圆角只在 separate 下渲染得出来);`--borderless` 才切回 `collapse` 并去外框。
16
16
  * **三条线之外的边一律显式清零**(`border: 0` 写在 `th` / `td` / `tr` 上,不是冗余):特异性只在**同一
@@ -23,12 +23,18 @@
23
23
  * 勾选列内**:不限列时功能列里任何「内部本来就是 checkbox」的件都会命中 —— `Switch` 内部正是
24
24
  * `<input type="checkbox">`,于是「启用」这类**功能值**会把整行点亮。
25
25
  * 4. **固定列必须自带底**(`background: var(--ui-base-100)`):它是 sticky 的,不遮挡就会被滚过的单元格透出。
26
+ * 5. **滚动条是自绘浮层,不用原生条**:原生条要么常驻槽留白缝、要么出入时改列宽;归零后两轴都不占位、
27
+ * 表头不用补偿。拇指本身是**跨件原语**(`scrollbar.css` + `useOverlayScrollbar`,Panel.Body 也在用),
28
+ * 本件只提供定位父 `.mh-table__body` 与归零的滚动盒。
26
29
  *
27
30
  * **不做**:排序与列宽拖拽的**算法**(规范只给 `↕` 字形与 3×40 拖拽线两处视觉),也不做空态 / 加载态
28
31
  * (三态归 `QueryState`)。
29
32
  */
33
+ /* 包裹层:**定位父**(两档共用)—— 浮层滚动条必须挂在滚动盒的兄弟节点上,不能挂在滚动盒自己身上
34
+ (`position: absolute` 的兄弟才不随内容滚走)。2026-10-19 起非满高也走「定位父 + 滚动盒」两层,
35
+ 与满高档结构完全一致;本层因此不再滚。 */
30
36
  .mh-table-wrapper {
31
- overflow: auto;
37
+ overflow: hidden;
32
38
  }
33
39
  /* ===== 满高档(两表结构:表头盒 + 表体滚动盒)=====
34
40
  * 外框从表移交给包裹层(表自己不再画框),**表头不在滚动盒里** —— 表头固定是结构给的,不靠 sticky。 */
@@ -55,18 +61,40 @@
55
61
  flex: 1 1 auto;
56
62
  min-height: 0;
57
63
  }
58
- /* 表体滚动盒:满高档唯一的滚动落点 */
64
+ /* ===== 滚动条:原生条归零(见文件头第 5 条)=====
65
+ * 为什么不用原生条:`scrollbar-gutter: stable` 会给**任何**滚动容器永久预留一条槽,而槽里没人上色
66
+ * ⇒ 表头底 / 行线 / 斑马底 / 选中底全在槽左缘截断,露出一条贯穿到底的白缝(实测 6px,与 `kit/index.css`
67
+ * 的滚动条皮肤同宽)。换成「不预留」(`auto`)则滚动条一出没就整表缩 6px,两表结构下必然错列,只能靠 JS 补。
68
+ * 归零原生条后 `offsetWidth - clientWidth` 恒等于 **0**:白缝没有、列宽不跳、表头补偿也恒为 0(竖轴横轴同一条判据)。
69
+ * 拇指的面与行为在 `scrollbar.css` / `components/scrollbar`(跨件原语)。 */
59
70
  .mh-table-scroll {
60
71
  height: 100%;
61
72
  max-height: var(--ui-table-scroll-height); /* 基础上限;「占满父级」档由下面那条解除 */
62
73
  overflow: auto;
63
- scrollbar-gutter: stable; /* 滚动条槽常驻:表体宽度不随内容长短跳变 */
74
+ scrollbar-width: none; /* FF:整条滚动条归零 */
75
+ }
76
+ .mh-table-scroll::-webkit-scrollbar {
77
+ width: 0;
78
+ height: 0;
64
79
  }
65
80
  /* 满高档:滚动范围由包裹层高度(或调用方给的内联上限)决定 */
66
81
  .mh-table-wrapper--fill > .mh-table__body > .mh-table-scroll {
67
82
  max-height: none;
68
83
  }
69
84
 
85
+ /* 非满高档(`--auto` 一对修饰档):高度链「包裹层 → 表体盒 → 滚动盒」逐层 100%。
86
+ 包裹层**有定高**(消费方给 height / flex 撑起)⇒ 滚动盒拿到确定高度、超出就滚;
87
+ 包裹层**没定高**(缺省,内容撑起)⇒ 百分比对不定高解析成 auto,高度由内容决定、不滚。
88
+ ⚠️ 那 132 的「基础上限」是满高档的兜底,不能套到非满高(会把普通表裁成 132 高)。 */
89
+ .mh-table__body--auto {
90
+ height: 100%;
91
+ }
92
+ .mh-table-scroll--auto {
93
+ max-height: none;
94
+ }
95
+
96
+ /* 浮层滚动条的面在 `scrollbar.css`(跨件原语,Table / Panel 共用):本件只负责把原生条归零 +
97
+ 把 `useOverlayScrollbar` 的输出放进 `.mh-table__body`(定位父)。 */
70
98
  /* 几何只挂在 `<table>` 上:令牌在同名 `.tokens.css`(锚 `[data-manohub-ui]`),几何若跟着挂会给包裹层加边框与圆角 */
71
99
  .mh-table {
72
100
  width: 100%;
@@ -425,6 +453,7 @@
425
453
  .mh-table__loading {
426
454
  position: absolute;
427
455
  inset: 0;
456
+ z-index: 3; /* 压住浮层滚动条(z-index: 2):加载中不该还能看见拇指 */
428
457
  display: flex;
429
458
  align-items: flex-start;
430
459
  justify-content: center;
@@ -83,6 +83,7 @@
83
83
  @import './operations/tabs.css';
84
84
 
85
85
  /* 容器与分区 */
86
+ @import './components/scrollbar.css'; /* 跨件原语(浮层滚动条):被 page / panel / table 消费,先于它们 */
86
87
  @import './components/page.css'; /* 页面级骨架(唯一;区域级是 Panel) */
87
88
  @import './components/panel.css';
88
89
  @import './components/collapse.css'; /* Collapse 的头行皮肤(行为在 operations/collapse.css) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manohub/ui",
3
- "version": "1.1.5",
3
+ "version": "1.2.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "AIHub 自绘组件层:不依赖 farris 的手写 Vue TSX 组件 + 自带令牌层(Farris 规范视觉 · daisyUI 式语义令牌 · shadcn 式 API 词汇)。",
@@ -35,7 +35,7 @@
35
35
  "vue": "^3.5.0"
36
36
  },
37
37
  "dependencies": {
38
- "@manohub/icon": "^1.1.5"
38
+ "@manohub/icon": "^1.2.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^24.0.0",