@manohub/ui 1.3.4 → 1.3.5
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.
|
@@ -115,12 +115,6 @@ const Popup = /* @__PURE__ */ defineComponent({
|
|
|
115
115
|
if (attachedHost) unlockScroll();
|
|
116
116
|
attachedHost = null;
|
|
117
117
|
unfollowHost();
|
|
118
|
-
if (layer) {
|
|
119
|
-
layer.style.removeProperty("top");
|
|
120
|
-
layer.style.removeProperty("left");
|
|
121
|
-
layer.style.removeProperty("width");
|
|
122
|
-
layer.style.removeProperty("height");
|
|
123
|
-
}
|
|
124
118
|
};
|
|
125
119
|
const showWithoutScroll = (el) => {
|
|
126
120
|
const scrolled = [];
|
|
@@ -21,8 +21,11 @@ function leaveLayer(host, layer) {
|
|
|
21
21
|
}
|
|
22
22
|
function syncInert(host, record) {
|
|
23
23
|
const children = Array.from(host.children);
|
|
24
|
-
const openLayers =
|
|
24
|
+
const openLayers = [...record.layers].filter((el) => el.isConnected && isOpenLayer(el));
|
|
25
25
|
const top = openLayers[openLayers.length - 1] ?? null;
|
|
26
|
+
openLayers.forEach((layer, index) => {
|
|
27
|
+
layer.style.zIndex = `calc(var(--ui-z-popup, 1000) + ${index})`;
|
|
28
|
+
});
|
|
26
29
|
for (const child of children) {
|
|
27
30
|
if (child === top) {
|
|
28
31
|
restore(child, record);
|
|
@@ -54,6 +54,12 @@
|
|
|
54
54
|
border-color: var(--ui-input-line);
|
|
55
55
|
box-shadow: none;
|
|
56
56
|
}
|
|
57
|
+
/* 输入框形态再撤一条:**闪动的文本光标**。它同样是「这里能打字」的暗示,挂在一个改不动的框上就是假线索。
|
|
58
|
+
只撤 `caret-color` —— 不写 `pointer-events: none` / `user-select: none` / `tabindex="-1"`:只读 ≠ 禁用,
|
|
59
|
+
框仍可聚焦、仍能选中复制,只是不再闪那条竖线(见本组件 prop 注释与 `components/input/index.tsx`)。 */
|
|
60
|
+
.mh-input[readonly] {
|
|
61
|
+
caret-color: transparent;
|
|
62
|
+
}
|
|
57
63
|
/* 校验态:走 `aria-invalid`(本仓协议),静态档 `.is-error` 供规格冻结与读图 */
|
|
58
64
|
.mh-input[aria-invalid='true'],
|
|
59
65
|
.mh-input.is-error {
|
|
@@ -224,6 +224,20 @@
|
|
|
224
224
|
background: var(--ui-base-200);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
+
/* 禁用**且选中**:仍要能一眼看出「选的是哪一个」—— 上面两条 disabled 规则会把选中态一起抹平
|
|
228
|
+
(同特异性、写在选中规则之后),表现是禁用卡片选没选一个样。这里用更高特异性(0-3-0)补回来,
|
|
229
|
+
只换**中性深度**、不引主色:禁用态不该有「可操作」的色暗示。
|
|
230
|
+
· 卡片:描边退到 content-subtle(比未选的 base-300 明显深)、底压到 base-300(比未选的 base-200 深一档);
|
|
231
|
+
· 圆点:保持**实心**(灰),与「禁用未选」的空心圈区分,内点继续留白。 */
|
|
232
|
+
.mh-radio-card[data-state='checked'][data-disabled='true'] {
|
|
233
|
+
border-color: var(--ui-radio-card-locked-line);
|
|
234
|
+
background: var(--ui-radio-card-locked-bg);
|
|
235
|
+
}
|
|
236
|
+
.mh-radio-card[data-state='checked'][data-disabled='true'] .mh-radio-card__radio {
|
|
237
|
+
border-color: var(--ui-radio-card-locked-line);
|
|
238
|
+
background: var(--ui-radio-card-locked-line);
|
|
239
|
+
}
|
|
240
|
+
|
|
227
241
|
.mh-radio-card__body {
|
|
228
242
|
display: flex;
|
|
229
243
|
flex-direction: column;
|
|
@@ -16,4 +16,8 @@
|
|
|
16
16
|
派生放进令牌的话,值在容器上就算死(16 → 4.57 → 渲染 4),行内重设直径时圆点不跟。 */
|
|
17
17
|
--ui-radio-label-gap: var(--ui-space-2, 8px); /* 框体与文字间距 8 */
|
|
18
18
|
--ui-radio-card-columns: 1;
|
|
19
|
+
/* 卡片「禁用且选中」的中性两档(描边 / 底 / 圆点):theme 令牌经这里中转,面只吃本件令牌。
|
|
20
|
+
取中性深档而不是主色 —— 禁用态不该有「可操作」的色暗示,但仍要与「禁用未选」拉开差距。 */
|
|
21
|
+
--ui-radio-card-locked-line: var(--ui-base-content-subtle, #999999);
|
|
22
|
+
--ui-radio-card-locked-bg: var(--ui-base-300, #e6e6e6);
|
|
19
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manohub/ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
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.3.
|
|
38
|
+
"@manohub/icon": "^1.3.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^24.0.0",
|