dsh-plugin-core 0.1.4 → 0.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 +6 -8
- package/dist/design/index.d.ts +1 -1
- package/dist/design/index.d.ts.map +1 -1
- package/dist/design/index.js +1 -1
- package/dist/design/index.js.map +1 -1
- package/dist/design/style-kit.d.ts +4 -9
- package/dist/design/style-kit.d.ts.map +1 -1
- package/dist/design/style-kit.js +11 -24
- package/dist/design/style-kit.js.map +1 -1
- package/dist/design/tokens-css.d.ts +1 -1
- package/dist/design/tokens-css.d.ts.map +1 -1
- package/dist/design/tokens-css.js +130 -132
- package/dist/design/tokens-css.js.map +1 -1
- package/dist/explorer/ExplorerPanel.js +14 -14
- package/dist/explorer/ExplorerPanel.js.map +1 -1
- package/dist/explorer/explorer-css.d.ts +1 -1
- package/dist/explorer/explorer-css.d.ts.map +1 -1
- package/dist/explorer/explorer-css.js +23 -23
- package/dist/explorer/explorer-css.js.map +1 -1
- package/dist/explorer/preview/index.js +4 -4
- package/dist/explorer/preview/index.js.map +1 -1
- package/dist/session/index.js +9 -9
- package/dist/session/index.js.map +1 -1
- package/dist/session/session-css.d.ts +1 -1
- package/dist/session/session-css.js +14 -14
- package/dist/session/session-css.js.map +1 -1
- package/dist/ui/BackToTop.d.ts +1 -1
- package/dist/ui/BackToTop.d.ts.map +1 -1
- package/dist/ui/BackToTop.js +5 -5
- package/dist/ui/BackToTop.js.map +1 -1
- package/dist/ui/Button.js +5 -5
- package/dist/ui/Button.js.map +1 -1
- package/dist/ui/Card.js +8 -8
- package/dist/ui/Card.js.map +1 -1
- package/dist/ui/Checkbox.d.ts +2 -2
- package/dist/ui/Checkbox.d.ts.map +1 -1
- package/dist/ui/Checkbox.js +4 -4
- package/dist/ui/Checkbox.js.map +1 -1
- package/dist/ui/Chip.d.ts +1 -1
- package/dist/ui/Chip.d.ts.map +1 -1
- package/dist/ui/Chip.js +2 -2
- package/dist/ui/Chip.js.map +1 -1
- package/dist/ui/EmptyState.js +1 -1
- package/dist/ui/EmptyState.js.map +1 -1
- package/dist/ui/ErrorBoundary.js +1 -1
- package/dist/ui/ErrorBoundary.js.map +1 -1
- package/dist/ui/Field.d.ts +1 -1
- package/dist/ui/Field.d.ts.map +1 -1
- package/dist/ui/Field.js +19 -19
- package/dist/ui/Field.js.map +1 -1
- package/dist/ui/FieldHint.js +2 -2
- package/dist/ui/FieldHint.js.map +1 -1
- package/dist/ui/Loading.d.ts +1 -1
- package/dist/ui/Loading.d.ts.map +1 -1
- package/dist/ui/Loading.js +9 -9
- package/dist/ui/Loading.js.map +1 -1
- package/dist/ui/MarqueeText.d.ts +3 -3
- package/dist/ui/MarqueeText.js +5 -5
- package/dist/ui/MarqueeText.js.map +1 -1
- package/dist/ui/Modal.js +5 -5
- package/dist/ui/Modal.js.map +1 -1
- package/dist/ui/ModelPicker.js +1 -1
- package/dist/ui/ModelPicker.js.map +1 -1
- package/dist/ui/Picker.js +16 -16
- package/dist/ui/Picker.js.map +1 -1
- package/dist/ui/SectionHead.d.ts +1 -1
- package/dist/ui/SectionHead.js +4 -4
- package/dist/ui/SectionHead.js.map +1 -1
- package/dist/ui/Segmented.js +5 -5
- package/dist/ui/Segmented.js.map +1 -1
- package/dist/ui/Textarea.d.ts +2 -2
- package/dist/ui/Textarea.js +3 -3
- package/dist/ui/Textarea.js.map +1 -1
- package/dist/ui/Toast.js +3 -3
- package/dist/ui/Toast.js.map +1 -1
- package/dist/ui/card-css.d.ts +1 -1
- package/dist/ui/card-css.d.ts.map +1 -1
- package/dist/ui/card-css.js +22 -22
- package/dist/ui/card-css.js.map +1 -1
- package/dist/ui/chip-css.d.ts +1 -1
- package/dist/ui/chip-css.d.ts.map +1 -1
- package/dist/ui/chip-css.js +10 -10
- package/dist/ui/chip-css.js.map +1 -1
- package/dist/ui/controls-css.d.ts +8 -8
- package/dist/ui/controls-css.d.ts.map +1 -1
- package/dist/ui/controls-css.js +198 -200
- package/dist/ui/controls-css.js.map +1 -1
- package/dist/ui/css.d.ts +0 -11
- package/dist/ui/css.d.ts.map +1 -1
- package/dist/ui/css.js +3 -16
- package/dist/ui/css.js.map +1 -1
- package/dist/ui/feedback-css.d.ts +1 -1
- package/dist/ui/feedback-css.d.ts.map +1 -1
- package/dist/ui/feedback-css.js +30 -31
- package/dist/ui/feedback-css.js.map +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/picker-css.d.ts +1 -1
- package/dist/ui/picker-css.d.ts.map +1 -1
- package/dist/ui/picker-css.js +32 -33
- package/dist/ui/picker-css.js.map +1 -1
- package/dist/ui/resizer.d.ts +1 -1
- package/dist/ui/resizer.d.ts.map +1 -1
- package/dist/ui/resizer.js +1 -1
- package/dist/ui/resizer.js.map +1 -1
- package/docs/design/architecture.md +3 -3
- package/docs/design/features/design.md +5 -7
- package/docs/design/features/ui.md +4 -4
- package/docs/design/features.md +1 -1
- package/docs/design/structure.md +1 -1
- package/docs/design/style.md +18 -17
- package/docs/examples/integration.md +3 -5
- package/docs/requirements.md +8 -12
- package/package.json +1 -1
package/dist/ui/controls-css.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
// 两处前缀在运行时由 buildCss() 替换:类名 dsh-tdt- 、变量 --tdt- 。
|
|
3
|
-
// 排除 PROCESS_FILES_CSS(业务件,不进本包,见需求文档 §3)。
|
|
1
|
+
// 控件样式。类名与变量统一使用 dshpc 前缀。
|
|
4
2
|
export const SEGMENTED_CSS = `
|
|
5
3
|
/* ── 分段控件(滑动块)P1 ────────────────────────────────────────────────
|
|
6
4
|
结构一套 + 两个受控轴:size(sm|md|lg) × variant(default|inset)。
|
|
@@ -13,104 +11,104 @@ export const SEGMENTED_CSS = `
|
|
|
13
11
|
几何 = 段高 = token − 6px(上下各 2px padding + 1px 边框);default 真边框 1px + padding 2px,
|
|
14
12
|
inset 无边框故 padding 收 3px 把缺的 1px 补回,两种外观总高都 == token(24/28/32),不再多 +2px。
|
|
15
13
|
以后 Button / Input 的有边 / 无边同此规则。 */
|
|
16
|
-
.
|
|
17
|
-
/* 选中片 = --
|
|
14
|
+
.dshpc-seg{display:inline-flex;align-items:center;gap:2px;padding:2px;border-radius:var(--dshpc-radius-md);background:var(--seg-track);}
|
|
15
|
+
/* 选中片 = --dshpc-solid(亮=白片 / 暗=黑片,2026-10-18 对齐真实插件截图)。
|
|
18
16
|
原先取 surface-raised ⇒ 与卡片底(同为 bg-layer-1)同色,选中片在卡上隐形、只剩阴影圈。 */
|
|
19
|
-
.
|
|
20
|
-
.
|
|
17
|
+
.dshpc-seg--default{--seg-track:var(--dshpc-surface-2);--seg-thumb:var(--dshpc-solid);border:1px solid var(--dshpc-border);}
|
|
18
|
+
.dshpc-seg--inset{--seg-track:var(--dshpc-hover);--seg-thumb:var(--dshpc-solid);border:0;padding:3px;}
|
|
21
19
|
|
|
22
|
-
.
|
|
23
|
-
height:calc(var(--
|
|
24
|
-
background:transparent;color:var(--
|
|
20
|
+
.dshpc-seg__item{appearance:none;display:inline-flex;align-items:center;gap:4px;box-sizing:border-box;
|
|
21
|
+
height:calc(var(--dshpc-control-h-sm) - 6px);padding:0 12px;border:0;border-radius:var(--dshpc-radius-sm);
|
|
22
|
+
background:transparent;color:var(--dshpc-fg-2);font-family:inherit;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);
|
|
25
23
|
font-weight:400;white-space:nowrap;cursor:pointer;
|
|
26
|
-
transition:color var(--
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
.
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
.
|
|
24
|
+
transition:color var(--dshpc-dur-fast) var(--dshpc-ease),background-color var(--dshpc-dur-fast) var(--dshpc-ease),box-shadow var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
25
|
+
.dshpc-seg--md .dshpc-seg__item{height:calc(var(--dshpc-control-h-md) - 6px);}
|
|
26
|
+
.dshpc-seg--lg .dshpc-seg__item{height:calc(var(--dshpc-control-h-lg) - 6px);}
|
|
27
|
+
.dshpc-seg__item:hover:not([aria-pressed='true']):not(:disabled){color:var(--dshpc-fg);}
|
|
28
|
+
.dshpc-seg__item[aria-pressed='true']{background:var(--seg-thumb);box-shadow:var(--dshpc-shadow-raised);color:var(--dshpc-fg);font-weight:600;}
|
|
29
|
+
.dshpc-seg__item:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-2px;}
|
|
30
|
+
.dshpc-seg__item:disabled{cursor:default;opacity:.4;}
|
|
33
31
|
|
|
34
32
|
/* 段内角标(如「异常」的数量):语义色实面 + 反白字,0 由组件侧不渲染。
|
|
35
33
|
⚠️ **必须是正圆**(用户 2026-10-03:「多位数给它撑开了,那不是圆的就没办法了」):
|
|
36
34
|
固定 16×16 + border-radius:50% + padding:0 + overflow:hidden ⇒ 一位数 / 两位数都是同一个圆,
|
|
37
35
|
数字缩到 10px 塞得下;不再用 min-width + 左右 padding(那会让宽度随位数增长变椭圆)。 */
|
|
38
|
-
.
|
|
36
|
+
.dshpc-seg__badge{display:inline-flex;align-items:center;justify-content:center;flex:none;
|
|
39
37
|
width:16px;height:16px;padding:0;overflow:hidden;
|
|
40
|
-
border-radius:50%;background:var(--
|
|
38
|
+
border-radius:50%;background:var(--dshpc-danger);color:var(--dshpc-on-signal);
|
|
41
39
|
font-size:10px;line-height:16px;font-weight:500;font-variant-numeric:tabular-nums;}
|
|
42
40
|
|
|
43
41
|
/* 段内中性计数(如筛选条「全部 11」):**纯文字,无底、无边、无圆角**(对齐 task-ledger 2026-10-18
|
|
44
42
|
拍板的 .dtl-seg__num:圆圈取了、字再小点);0 由组件侧不渲染。danger 角标仍走 __badge。 */
|
|
45
|
-
.
|
|
46
|
-
background:none;color:var(--
|
|
43
|
+
.dshpc-seg__count{display:inline;flex:none;margin-left:3px;padding:0;border:0;border-radius:0;
|
|
44
|
+
background:none;color:var(--dshpc-fg-3);font-size:10px;line-height:1;font-weight:400;font-variant-numeric:tabular-nums;}
|
|
47
45
|
|
|
48
46
|
/* block:撑满父宽(表单行用),各段等分 */
|
|
49
|
-
.
|
|
50
|
-
.
|
|
47
|
+
.dshpc-seg--block{display:flex;width:100%;}
|
|
48
|
+
.dshpc-seg--block .dshpc-seg__item{flex:1 1 auto;justify-content:center;}
|
|
51
49
|
|
|
52
50
|
/* weekday:星期多选方块(任务新增 / 编辑页)。基础插件的特殊化定制(用户 2026-10-01 明确要求:
|
|
53
51
|
原 WeekdayPicker 即「蓝底 + 近似方形」,统一到 Segmented 后由这一修饰类补回两处差异):
|
|
54
52
|
- 每格做成正方形(宽 = 段高);
|
|
55
|
-
- 选中态用品牌蓝(--
|
|
56
|
-
皮肤集中在此、不内联;调用点只挂 .
|
|
53
|
+
- 选中态用品牌蓝(--dshpc-business)、反白字,轨道用 hover 灰(与原自绘轨道一致)。
|
|
54
|
+
皮肤集中在此、不内联;调用点只挂 .dshpc-seg--weekday 一个修饰类,符合「皮肤只在 controls-css」的规矩。 */
|
|
57
55
|
/* weekday:星期多选方块(任务新增 / 编辑页)。基础插件的特殊化定制(用户 2026-10-01 明确要求:
|
|
58
56
|
原 WeekdayPicker 即「蓝底 + 近似方形」,统一到 Segmented 后由这一修饰类补回两处差异):
|
|
59
57
|
- 每格做成正方形(宽 = 段高);
|
|
60
|
-
- 选中态用品牌蓝(--
|
|
58
|
+
- 选中态用品牌蓝(--dshpc-business)、反白字,轨道用 hover 灰(与原自绘轨道一致)。
|
|
61
59
|
2026-10-18 用户重申(对齐真实截图):**无外描边**(不管挂哪个 variant,这里一律撤边),
|
|
62
60
|
且方块之间要有间距(gap 6px,不再 2px 挤成一坨)。 */
|
|
63
|
-
.
|
|
64
|
-
.
|
|
65
|
-
.
|
|
61
|
+
.dshpc-seg--weekday{--seg-track:var(--dshpc-hover);gap:6px;border:0;padding:3px;}
|
|
62
|
+
.dshpc-seg--weekday .dshpc-seg__item{width:calc(var(--dshpc-control-h-lg) - 6px);padding:0;justify-content:center;}
|
|
63
|
+
.dshpc-seg--weekday .dshpc-seg__item[aria-pressed='true']{background:var(--dshpc-business);color:var(--dshpc-fg-inverse);box-shadow:var(--dshpc-shadow-raised);}
|
|
66
64
|
|
|
67
|
-
@media (prefers-reduced-motion: reduce){.
|
|
65
|
+
@media (prefers-reduced-motion: reduce){.dshpc-seg__item{transition:none;}}
|
|
68
66
|
`;
|
|
69
67
|
export const BUTTON_CSS = `
|
|
70
68
|
/* ── 按钮 / 图标钮 P2 ───────────────────────────────────────────────────
|
|
71
|
-
与 Segmented 同一条高度纪律:--
|
|
69
|
+
与 Segmented 同一条高度纪律:--dshpc-control-h-sm(24) / -md(28) / -lg(32),
|
|
72
70
|
有边框的 variant 用 1px 真边框 + 内部 padding 补回,**有边 / 无边同高**。
|
|
73
71
|
variant 只换颜色,结构 / 尺寸 / 交互只此一份。 */
|
|
74
|
-
.
|
|
75
|
-
box-sizing:border-box;border:1px solid transparent;border-radius:var(--
|
|
76
|
-
background:transparent;color:var(--
|
|
77
|
-
transition:background-color var(--
|
|
78
|
-
.
|
|
79
|
-
.
|
|
80
|
-
.
|
|
81
|
-
.
|
|
72
|
+
.dshpc-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:var(--dshpc-space-1);
|
|
73
|
+
box-sizing:border-box;border:1px solid transparent;border-radius:var(--dshpc-radius-md);
|
|
74
|
+
background:transparent;color:var(--dshpc-fg);font-family:inherit;font-weight:500;white-space:nowrap;cursor:pointer;
|
|
75
|
+
transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),border-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease),opacity var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
76
|
+
.dshpc-btn--sm{height:var(--dshpc-control-h-sm);padding:0 10px;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);}
|
|
77
|
+
.dshpc-btn--md{height:var(--dshpc-control-h-md);padding:0 12px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
78
|
+
.dshpc-btn--lg{height:var(--dshpc-control-h-lg);padding:0 14px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
79
|
+
.dshpc-btn__icon{display:inline-flex;align-items:center;flex:none;}
|
|
82
80
|
|
|
83
|
-
.
|
|
84
|
-
.
|
|
85
|
-
.
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
.
|
|
89
|
-
.
|
|
90
|
-
.
|
|
81
|
+
.dshpc-btn--primary{background:var(--dshpc-accent);color:var(--dshpc-fg-inverse);}
|
|
82
|
+
.dshpc-btn--primary:hover:not(:disabled){opacity:.9;}
|
|
83
|
+
.dshpc-btn--outline{background:var(--dshpc-surface-1);border-color:var(--dshpc-border-strong);color:var(--dshpc-fg);}
|
|
84
|
+
.dshpc-btn--outline:hover:not(:disabled){background:var(--dshpc-hover);}
|
|
85
|
+
.dshpc-btn--ghost{color:var(--dshpc-fg-2);}
|
|
86
|
+
.dshpc-btn--ghost:hover:not(:disabled){background:var(--dshpc-hover);color:var(--dshpc-fg);}
|
|
87
|
+
.dshpc-btn--danger{background:var(--dshpc-danger);color:var(--dshpc-on-signal);}
|
|
88
|
+
.dshpc-btn--danger:hover:not(:disabled){opacity:.9;}
|
|
91
89
|
/* danger-ink:红字描边(破坏性次要操作,如卡片上的「删除」),挂与 outline 组合的修饰类 */
|
|
92
|
-
.
|
|
93
|
-
.
|
|
90
|
+
.dshpc-btn--danger-ink{border-color:var(--dshpc-danger);color:var(--dshpc-danger);}
|
|
91
|
+
.dshpc-btn--danger-ink:hover:not(:disabled){background:color-mix(in srgb,var(--dshpc-danger) 10%,transparent);color:var(--dshpc-danger);}
|
|
94
92
|
/* link:行内文字链接型(会话 / 产出文件名),无底无边、品牌蓝、hover 下划线 */
|
|
95
|
-
.
|
|
96
|
-
.
|
|
97
|
-
.
|
|
98
|
-
.
|
|
93
|
+
.dshpc-btn--link{height:auto;padding:0;border:0;background:none;color:var(--dshpc-link);font-weight:400;text-align:left;}
|
|
94
|
+
.dshpc-btn--link:hover:not(:disabled){background:none;color:var(--dshpc-link);text-decoration:underline;}
|
|
95
|
+
.dshpc-btn:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:2px;}
|
|
96
|
+
.dshpc-btn:disabled{cursor:default;opacity:.5;}
|
|
99
97
|
|
|
100
|
-
.
|
|
101
|
-
border:1px solid transparent;border-radius:var(--
|
|
98
|
+
.dshpc-iconbtn{appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
|
|
99
|
+
border:1px solid transparent;border-radius:var(--dshpc-radius-sm);background:transparent;color:var(--dshpc-fg-2);
|
|
102
100
|
font-family:inherit;cursor:pointer;flex:none;
|
|
103
|
-
transition:background-color var(--
|
|
104
|
-
.
|
|
105
|
-
.
|
|
106
|
-
.
|
|
107
|
-
.
|
|
108
|
-
.
|
|
109
|
-
.
|
|
110
|
-
.
|
|
111
|
-
.
|
|
112
|
-
.
|
|
113
|
-
.
|
|
101
|
+
transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),border-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease),opacity var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
102
|
+
.dshpc-iconbtn--sm{width:var(--dshpc-control-h-sm);height:var(--dshpc-control-h-sm);font-size:var(--dshpc-font-sm);}
|
|
103
|
+
.dshpc-iconbtn--md{width:var(--dshpc-control-h-md);height:var(--dshpc-control-h-md);font-size:var(--dshpc-font-md);}
|
|
104
|
+
.dshpc-iconbtn--lg{width:var(--dshpc-control-h-lg);height:var(--dshpc-control-h-lg);font-size:var(--dshpc-font-md);}
|
|
105
|
+
.dshpc-iconbtn--plain{color:var(--dshpc-fg-2);}
|
|
106
|
+
.dshpc-iconbtn--outline{background:var(--dshpc-surface-1);border-color:var(--dshpc-border);color:var(--dshpc-fg-2);}
|
|
107
|
+
.dshpc-iconbtn--danger{color:var(--dshpc-danger);}
|
|
108
|
+
.dshpc-iconbtn:hover:not(:disabled){background:var(--dshpc-hover);color:var(--dshpc-fg);}
|
|
109
|
+
.dshpc-iconbtn--danger:hover:not(:disabled){background:var(--dshpc-hover);color:var(--dshpc-danger);}
|
|
110
|
+
.dshpc-iconbtn:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:2px;}
|
|
111
|
+
.dshpc-iconbtn:disabled{cursor:default;opacity:.4;}
|
|
114
112
|
|
|
115
113
|
/* ── 行式文件按钮(图标 + 文件名)P2:**全站唯一实现**(2026-10-04 收编)──────────
|
|
116
114
|
用途:「产出物 / 附件」那种**一行一个文件**的清单项(基础信息右栏产出物清单、附件区、
|
|
@@ -118,204 +116,204 @@ export const BUTTON_CSS = `
|
|
|
118
116
|
两个形态修饰类:
|
|
119
117
|
--block 撑满父宽(清单里一项一行)
|
|
120
118
|
--inline 内容宽(跟在文字后头,如附件行)
|
|
121
|
-
收编原因:这份皮肤此前只写在 task-list.tsx 的 TASK_LIST_CSS 里(旧名 .
|
|
119
|
+
收编原因:这份皮肤此前只写在 task-list.tsx 的 TASK_LIST_CSS 里(旧名 .dshpc-info-out),
|
|
122
120
|
执行记录页展开区要用同一种观感 ⇒ 上提基础层,避免再出现「各写一份外观」(同名不同皮的坑刚踩过)。 */
|
|
123
|
-
.
|
|
124
|
-
background:transparent;color:var(--
|
|
125
|
-
transition:background-color var(--
|
|
126
|
-
.
|
|
127
|
-
.
|
|
128
|
-
.
|
|
129
|
-
.
|
|
130
|
-
padding:4px 6px;font-size:var(--
|
|
131
|
-
.
|
|
121
|
+
.dshpc-filechip{appearance:none;-webkit-appearance:none;border:0;border-radius:var(--dshpc-radius-xs);
|
|
122
|
+
background:transparent;color:var(--dshpc-fg);font:inherit;text-align:left;cursor:pointer;min-width:0;
|
|
123
|
+
transition:background-color var(--dshpc-dur) var(--dshpc-ease);}
|
|
124
|
+
.dshpc-filechip:hover:not(:disabled){background:var(--dshpc-chip-bg);}
|
|
125
|
+
.dshpc-filechip:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px;}
|
|
126
|
+
.dshpc-filechip:disabled{cursor:default;background:transparent;color:var(--dshpc-fg-3);}
|
|
127
|
+
.dshpc-filechip--block{display:flex;align-items:center;gap:6px;width:100%;box-sizing:border-box;
|
|
128
|
+
padding:4px 6px;font-size:var(--dshpc-font-xs);}
|
|
129
|
+
.dshpc-filechip--inline{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;font-size:var(--dshpc-font-sm);}
|
|
132
130
|
|
|
133
|
-
@media (prefers-reduced-motion: reduce){.
|
|
131
|
+
@media (prefers-reduced-motion: reduce){.dshpc-btn,.dshpc-iconbtn,.dshpc-filechip{transition:none;}}
|
|
134
132
|
`;
|
|
135
133
|
export const FIELD_CSS = `
|
|
136
134
|
/* ── 输入类 P3 ────────────────────────────────────────────────────────── */
|
|
137
|
-
.
|
|
138
|
-
background:var(--
|
|
139
|
-
transition:border-color var(--
|
|
140
|
-
.
|
|
141
|
-
.
|
|
142
|
-
.
|
|
143
|
-
.
|
|
144
|
-
.
|
|
145
|
-
.
|
|
146
|
-
.
|
|
135
|
+
.dshpc-input{box-sizing:border-box;border:1px solid var(--dshpc-border);border-radius:var(--dshpc-radius-md);
|
|
136
|
+
background:var(--dshpc-surface-1);color:var(--dshpc-fg);font-family:inherit;outline:none;
|
|
137
|
+
transition:border-color var(--dshpc-dur-fast) var(--dshpc-ease),box-shadow var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
138
|
+
.dshpc-input--sm{height:var(--dshpc-control-h-sm);padding:0 8px;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);}
|
|
139
|
+
.dshpc-input--md{height:var(--dshpc-control-h-md);padding:0 10px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
140
|
+
.dshpc-input--lg{height:var(--dshpc-control-h-lg);padding:0 12px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
141
|
+
.dshpc-input::placeholder{color:var(--dshpc-fg-dim);}
|
|
142
|
+
.dshpc-input:focus{border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}
|
|
143
|
+
.dshpc-input--error{border-color:var(--dshpc-danger);}
|
|
144
|
+
.dshpc-input:disabled{cursor:default;opacity:.5;}
|
|
147
145
|
|
|
148
|
-
.
|
|
149
|
-
border:1px solid var(--
|
|
150
|
-
.
|
|
151
|
-
.
|
|
152
|
-
.
|
|
146
|
+
.dshpc-pfx{display:inline-flex;align-items:center;box-sizing:border-box;overflow:hidden;
|
|
147
|
+
border:1px solid var(--dshpc-border);border-radius:var(--dshpc-radius-md);background:var(--dshpc-surface-1);color:var(--dshpc-fg);}
|
|
148
|
+
.dshpc-pfx--sm{height:var(--dshpc-control-h-sm);}
|
|
149
|
+
.dshpc-pfx--md{height:var(--dshpc-control-h-md);}
|
|
150
|
+
.dshpc-pfx--lg{height:var(--dshpc-control-h-lg);}
|
|
153
151
|
/* md / lg 档字号跟档走(与同档下拉同字号):此前写死 sm(12px),同排下拉是 13px ⇒ 显得「input 字小」。 */
|
|
154
|
-
.
|
|
155
|
-
.
|
|
156
|
-
.
|
|
157
|
-
.
|
|
158
|
-
.
|
|
159
|
-
.
|
|
160
|
-
font-family:inherit;font-size:var(--
|
|
161
|
-
.
|
|
152
|
+
.dshpc-pfx--md .dshpc-pfx__label,.dshpc-pfx--lg .dshpc-pfx__label{font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
153
|
+
.dshpc-pfx--md .dshpc-pfx__input,.dshpc-pfx--lg .dshpc-pfx__input{font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
154
|
+
.dshpc-pfx--error{border-color:var(--dshpc-danger);}
|
|
155
|
+
.dshpc-pfx:focus-within{border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}
|
|
156
|
+
.dshpc-pfx__label{padding:0 8px;color:var(--dshpc-fg-2);font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);white-space:nowrap;border-right:1px solid var(--dshpc-border);}
|
|
157
|
+
.dshpc-pfx__input{flex:1 1 auto;min-width:0;height:100%;padding:0 8px;border:0;background:transparent;color:var(--dshpc-fg);
|
|
158
|
+
font-family:inherit;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);outline:none;}
|
|
159
|
+
.dshpc-pfx__input::placeholder{color:var(--dshpc-fg-dim);}
|
|
162
160
|
|
|
163
|
-
.
|
|
164
|
-
border:1px solid var(--
|
|
161
|
+
.dshpc-num{display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;overflow:hidden;
|
|
162
|
+
border:1px solid var(--dshpc-border);border-radius:var(--dshpc-radius-md);background:var(--dshpc-surface-1);color:var(--dshpc-fg);}
|
|
165
163
|
/* 中段:数字 + 后缀成组居中;容器被消费端拉宽时吃掉全部余量,两端 − / + 因此钉死在左右边缘。 */
|
|
166
|
-
.
|
|
167
|
-
.
|
|
168
|
-
.
|
|
169
|
-
.
|
|
170
|
-
.
|
|
171
|
-
.
|
|
172
|
-
.
|
|
173
|
-
.
|
|
174
|
-
font-family:inherit;font-size:var(--
|
|
175
|
-
.
|
|
176
|
-
.
|
|
164
|
+
.dshpc-num__mid{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-width:0;}
|
|
165
|
+
.dshpc-num--sm{height:var(--dshpc-control-h-sm);}
|
|
166
|
+
.dshpc-num--md{height:var(--dshpc-control-h-md);}
|
|
167
|
+
.dshpc-num--lg{height:var(--dshpc-control-h-lg);}
|
|
168
|
+
.dshpc-num--md .dshpc-num__input,.dshpc-num--lg .dshpc-num__input{font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
169
|
+
.dshpc-num--md .dshpc-num__suffix,.dshpc-num--lg .dshpc-num__suffix{font-size:var(--dshpc-font-md);}
|
|
170
|
+
.dshpc-num--disabled{opacity:.5;}
|
|
171
|
+
.dshpc-num__input{width:36px;height:100%;padding:0 2px;border:0;background:transparent;color:var(--dshpc-fg);
|
|
172
|
+
font-family:inherit;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);text-align:center;outline:none;}
|
|
173
|
+
.dshpc-num__suffix{padding:0 6px;color:var(--dshpc-fg-2);font-size:var(--dshpc-font-sm);white-space:nowrap;}
|
|
174
|
+
.dshpc-num .dshpc-iconbtn{border-radius:0;color:var(--dshpc-fg-2);flex:none;}
|
|
177
175
|
|
|
178
176
|
/* 官方 Switch 包装统一:选中 = success 绿。
|
|
179
177
|
(合并原先 task-editor-css / task-list 两处就地覆盖;选择器带包装类 + role,特异性高于官方。) */
|
|
180
|
-
.
|
|
178
|
+
.dshpc-switch button[role='switch'][aria-checked='true']{background:var(--dshpc-success);}
|
|
181
179
|
|
|
182
180
|
/* 多行文本输入(提示词等,P3):卡内无边框(视觉重心在整张卡上),占位色走 dimmed;校验不通过描红盒。
|
|
183
|
-
(从 task-editor-css 的 .
|
|
184
|
-
.
|
|
185
|
-
.
|
|
186
|
-
.
|
|
181
|
+
(从 task-editor-css 的 .dshpc-ed-prompt 上提而来;业务文件不再自写 textarea 皮肤。) */
|
|
182
|
+
.dshpc-textarea{display:block;width:100%;box-sizing:border-box;min-height:132px;padding:2px;border:none;outline:none;background:0 0;color:var(--dshpc-fg);font:inherit;font-size:var(--dshpc-font-lg);line-height:1.6;resize:vertical;}
|
|
183
|
+
.dshpc-textarea::placeholder{color:var(--dshpc-fg-dim);}
|
|
184
|
+
.dshpc-textarea--error{box-shadow:0 0 0 1px var(--dshpc-danger);}
|
|
187
185
|
|
|
188
186
|
/* 拖拽分隔条(编辑分栏 / 预览 dock 共用,U20 #3):6px 命中区,col-resize,不画线,hover/按下浮出浅带。
|
|
189
|
-
具体 z-index 由 .
|
|
190
|
-
.
|
|
191
|
-
.
|
|
187
|
+
具体 z-index 由 .dshpc-ed-resizer / .dshpc-sv-resizer 各自补。 */
|
|
188
|
+
.dshpc-resizer{position:absolute;top:0;bottom:0;left:0;width:6px;cursor:col-resize;background:0 0;touch-action:none;user-select:none;}
|
|
189
|
+
.dshpc-resizer:hover,.dshpc-resizer:active{background:var(--dshpc-hover,rgba(38,49,72,.06));}
|
|
192
190
|
|
|
193
|
-
@media (prefers-reduced-motion: reduce){.
|
|
191
|
+
@media (prefers-reduced-motion: reduce){.dshpc-input,.dshpc-pfx{transition:none;}}
|
|
194
192
|
`;
|
|
195
193
|
export const DATETIME_CSS = `
|
|
196
194
|
/* ── 日期 / 时间 P4 ───────────────────────────────────────────────────── */
|
|
197
|
-
.
|
|
198
|
-
/* ⚠️ 边框粗细 / 圆角必须与下拉锚点(
|
|
195
|
+
.dshpc-dtf-wrap{display:inline-flex;position:relative;min-width:0;}
|
|
196
|
+
/* ⚠️ 边框粗细 / 圆角必须与下拉锚点(dshpc-ed-field 的 fieldButtonStyle)完全一致
|
|
199
197
|
(用户 2026-10-02 点名:同排的日期框与下拉框看着不是一套)⇒ 这里也是 0.5px + radius-md。 */
|
|
200
|
-
.
|
|
201
|
-
min-width:0;max-width:100%;padding:0 8px;border:0.5px solid var(--
|
|
202
|
-
background:var(--
|
|
203
|
-
cursor:pointer;transition:background-color var(--
|
|
198
|
+
.dshpc-dtf{display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;height:var(--dshpc-control-h-lg);
|
|
199
|
+
min-width:0;max-width:100%;padding:0 8px;border:0.5px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);
|
|
200
|
+
background:var(--dshpc-surface-1);color:var(--dshpc-fg);font:inherit;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);
|
|
201
|
+
cursor:pointer;transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),border-color var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
204
202
|
/* 日期 / 时间锚点:三档高度(默认 lg=32)。base 已含 lg 高度作兜底,下面三档按 size 覆盖。 */
|
|
205
|
-
.
|
|
206
|
-
.
|
|
207
|
-
.
|
|
208
|
-
.
|
|
209
|
-
.
|
|
210
|
-
.
|
|
211
|
-
.
|
|
212
|
-
.
|
|
213
|
-
.
|
|
203
|
+
.dshpc-dtf--sm{height:var(--dshpc-control-h-sm);padding:0 6px;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);}
|
|
204
|
+
.dshpc-dtf--md{height:var(--dshpc-control-h-md);padding:0 8px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
205
|
+
.dshpc-dtf--lg{height:var(--dshpc-control-h-lg);padding:0 8px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}
|
|
206
|
+
.dshpc-dtf:hover:not(:disabled){background:var(--dshpc-hover);}
|
|
207
|
+
.dshpc-dtf:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:2px;}
|
|
208
|
+
.dshpc-dtf:disabled{cursor:not-allowed;opacity:.6;}
|
|
209
|
+
.dshpc-dtf__label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;}
|
|
210
|
+
.dshpc-dtf__label--ph{color:var(--dshpc-fg-dim);}
|
|
211
|
+
.dshpc-dtf__icon{display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;flex:none;color:var(--dshpc-fg-3);}
|
|
214
212
|
|
|
215
|
-
.
|
|
216
|
-
box-shadow:var(--
|
|
213
|
+
.dshpc-layer{position:fixed;z-index:var(--dshpc-z-menu);box-sizing:border-box;padding:8px;background:var(--dshpc-surface-1);
|
|
214
|
+
box-shadow:var(--dshpc-shadow-2);border-radius:var(--dshpc-radius-md);color:var(--dshpc-fg);font-size:var(--dshpc-font-md);}
|
|
217
215
|
|
|
218
|
-
.
|
|
219
|
-
.
|
|
220
|
-
.
|
|
221
|
-
.
|
|
222
|
-
.
|
|
223
|
-
border:1px solid transparent;border-radius:var(--
|
|
224
|
-
font:inherit;font-size:var(--
|
|
225
|
-
transition:background-color var(--
|
|
226
|
-
.
|
|
227
|
-
.
|
|
228
|
-
.
|
|
229
|
-
.
|
|
230
|
-
.
|
|
216
|
+
.dshpc-cal__head{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:4px;}
|
|
217
|
+
.dshpc-cal__title{flex:1 1 auto;text-align:center;font-size:var(--dshpc-font-md);font-weight:600;color:var(--dshpc-fg);}
|
|
218
|
+
.dshpc-cal__grid{display:grid;grid-template-columns:repeat(7,32px);gap:2px;}
|
|
219
|
+
.dshpc-cal__weekday{height:24px;display:flex;align-items:center;justify-content:center;font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-3);}
|
|
220
|
+
.dshpc-cal__cell{width:32px;height:32px;padding:0;display:flex;align-items:center;justify-content:center;
|
|
221
|
+
border:1px solid transparent;border-radius:var(--dshpc-radius-md);background:transparent;color:var(--dshpc-fg);
|
|
222
|
+
font:inherit;font-size:var(--dshpc-font-md);cursor:pointer;
|
|
223
|
+
transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
224
|
+
.dshpc-cal__cell--hover{background:var(--dshpc-hover);}
|
|
225
|
+
.dshpc-cal__cell--out{color:var(--dshpc-fg-dim);}
|
|
226
|
+
.dshpc-cal__cell--today{border-color:var(--dshpc-business);}
|
|
227
|
+
.dshpc-cal__cell[aria-pressed='true']{background:var(--dshpc-accent);color:var(--dshpc-fg-inverse);}
|
|
228
|
+
.dshpc-cal__foot{margin-top:6px;padding-top:6px;border-top:1px solid var(--dshpc-border);}
|
|
231
229
|
|
|
232
|
-
.
|
|
233
|
-
.
|
|
234
|
-
.
|
|
235
|
-
font:inherit;font-size:var(--
|
|
236
|
-
.
|
|
237
|
-
.
|
|
230
|
+
.dshpc-time__cols{display:flex;gap:4px;}
|
|
231
|
+
.dshpc-time__list{width:56px;max-height:196px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;}
|
|
232
|
+
.dshpc-time__opt{padding:5px 0;border:0;border-radius:var(--dshpc-radius-sm);background:transparent;color:var(--dshpc-fg-2);
|
|
233
|
+
font:inherit;font-size:var(--dshpc-font-md);cursor:pointer;transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
234
|
+
.dshpc-time__opt[aria-selected='true']{background:var(--dshpc-hover);color:var(--dshpc-fg);font-weight:600;}
|
|
235
|
+
.dshpc-time__foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px;padding-top:6px;border-top:1px solid var(--dshpc-border);}
|
|
238
236
|
|
|
239
|
-
@media (prefers-reduced-motion: reduce){.
|
|
237
|
+
@media (prefers-reduced-motion: reduce){.dshpc-dtf,.dshpc-cal__cell,.dshpc-time__opt{transition:none;}}
|
|
240
238
|
`;
|
|
241
239
|
export const SELECT_CSS = `
|
|
242
240
|
/* 下拉 / 日历 / 时分锚点:键盘可达性描边 + 校验描红(类名从业务层沿用,皮肤归位基础层) */
|
|
243
|
-
.
|
|
244
|
-
.
|
|
241
|
+
.dshpc-ed-field:focus-visible{outline:2px solid var(--dshpc-business);outline-offset:1px;}
|
|
242
|
+
.dshpc-ed-field--error{border-color:var(--dshpc-danger)!important;box-shadow:0 0 0 1px var(--dshpc-danger);}
|
|
245
243
|
/* 整行下拉:官方 Menu 的包装 span 是 inline-flex(shrink-to-fit),要连它一起撑满 */
|
|
246
|
-
.
|
|
244
|
+
.dshpc-ed-selectwrap{width:100%;}
|
|
247
245
|
|
|
248
246
|
/* 省略号三件套(ui-style-guide §三「待抽象 #1」的收敛点):**新代码一律挂这个类**,不再各写一遍。
|
|
249
247
|
⚠️ 已有 19 处旧写法待逐步收编(2026-10-04 起新增的调用点不许再手写这三条属性)。 */
|
|
250
|
-
.
|
|
248
|
+
.dshpc-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
251
249
|
|
|
252
250
|
/* 跑马灯文本(MarqueeText):双层——外层只裁剪,内层才 transform 滚动;非 hover 内层自带省略号 */
|
|
253
|
-
.
|
|
254
|
-
.
|
|
251
|
+
.dshpc-mq{display:block;overflow:hidden;white-space:nowrap;}
|
|
252
|
+
.dshpc-mq .dshpc-mq-in{display:inline-block;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:top;}
|
|
255
253
|
/* ⚠️ 跑法(用户 2026-10-03 拍板):**跑一遍、停在尾字**(播放 1 次 + forwards),不来回弹、不无限跑。
|
|
256
254
|
滚距 = 精确溢出量 ⇒ 停下时最后一个字正好贴右缘,**不会跑进黑块**(黑块是旧手写版把
|
|
257
255
|
内层盒子裁了、按「半截文本」平移导致的)。鼠标移开 ⇒ :hover 失效 ⇒ 自动复位回省略号态。 */
|
|
258
|
-
.
|
|
259
|
-
@keyframes
|
|
256
|
+
.dshpc-mq-run:hover .dshpc-mq-in{max-width:none;overflow:visible;animation:dshpc-mq-scroll var(--dshpc-mq-dur,6s) linear .4s 1 forwards;}
|
|
257
|
+
@keyframes dshpc-mq-scroll{from{transform:translateX(0)}to{transform:translateX(var(--dshpc-mq-dist,-40px))}}
|
|
260
258
|
`;
|
|
261
259
|
export const LOADING_CSS = `
|
|
262
260
|
/* 运行中 / loading 的活动指示:三个小方块依次脉动。 */
|
|
263
|
-
@keyframes
|
|
264
|
-
.
|
|
265
|
-
.
|
|
266
|
-
.
|
|
267
|
-
.
|
|
268
|
-
@media (prefers-reduced-motion: reduce) { .
|
|
261
|
+
@keyframes dshpc-run-block { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8) } 40% { opacity: 1; transform: scale(1) } }
|
|
262
|
+
.dshpc-run-blocks { display: inline-flex; align-items: center; gap: 3px; }
|
|
263
|
+
.dshpc-run-blocks > i { width: 5px; height: 5px; border-radius: 1px; background: currentColor; animation: dshpc-run-block 1.2s ease-in-out infinite; }
|
|
264
|
+
.dshpc-run-blocks > i:nth-child(2) { animation-delay: 0.15s; }
|
|
265
|
+
.dshpc-run-blocks > i:nth-child(3) { animation-delay: 0.3s; }
|
|
266
|
+
@media (prefers-reduced-motion: reduce) { .dshpc-run-blocks > i { animation: none; opacity: 1; } }
|
|
269
267
|
`;
|
|
270
268
|
export const BACK_TO_TOP_CSS = `
|
|
271
269
|
/* 回到顶部悬浮钮:圆钮、实面、投影;默认隐身,滚过阈值加 .is-visible 才显形。
|
|
272
270
|
横向 left 由组件按主内容列右缘实时算出(贴在其右侧外侧),不写死。 */
|
|
273
|
-
.
|
|
271
|
+
.dshpc-backtotop{
|
|
274
272
|
position:fixed;
|
|
275
|
-
bottom:var(--
|
|
276
|
-
z-index:var(--
|
|
273
|
+
bottom:var(--dshpc-space-4);
|
|
274
|
+
z-index:var(--dshpc-z-dock);
|
|
277
275
|
width:44px;height:44px;
|
|
278
276
|
display:inline-flex;align-items:center;justify-content:center;
|
|
279
277
|
padding:0;margin:0;
|
|
280
278
|
box-sizing:border-box;
|
|
281
|
-
border:1px solid var(--
|
|
279
|
+
border:1px solid var(--dshpc-border);
|
|
282
280
|
border-radius:50%;
|
|
283
|
-
background:var(--
|
|
284
|
-
color:var(--
|
|
285
|
-
box-shadow:var(--
|
|
281
|
+
background:var(--dshpc-solid);
|
|
282
|
+
color:var(--dshpc-on-solid);
|
|
283
|
+
box-shadow:var(--dshpc-shadow-2);
|
|
286
284
|
cursor:pointer;
|
|
287
285
|
opacity:0;
|
|
288
286
|
transform:translateY(8px) scale(.92);
|
|
289
|
-
transition:opacity var(--
|
|
290
|
-
transform var(--
|
|
291
|
-
background-color var(--
|
|
287
|
+
transition:opacity var(--dshpc-dur) var(--dshpc-ease),
|
|
288
|
+
transform var(--dshpc-dur) var(--dshpc-ease),
|
|
289
|
+
background-color var(--dshpc-dur-fast) var(--dshpc-ease);
|
|
292
290
|
pointer-events:none;
|
|
293
291
|
}
|
|
294
|
-
.
|
|
295
|
-
.
|
|
296
|
-
.
|
|
297
|
-
.
|
|
292
|
+
.dshpc-backtotop.is-visible{opacity:1;transform:translateY(0) scale(1);pointer-events:auto;}
|
|
293
|
+
.dshpc-backtotop:hover{background:var(--dshpc-hover);}
|
|
294
|
+
.dshpc-backtotop:active{background:var(--dshpc-active);}
|
|
295
|
+
.dshpc-backtotop:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:2px;}
|
|
298
296
|
@media (prefers-reduced-motion: reduce){
|
|
299
|
-
.
|
|
297
|
+
.dshpc-backtotop{transition:opacity var(--dshpc-dur-fast) linear;transform:none;}
|
|
300
298
|
}
|
|
301
299
|
`;
|
|
302
300
|
export const HINT_CSS = `
|
|
303
301
|
/* ── 问号提示 P4(用户 2026-10-18:对齐真实插件 HelpButton——**带圈的问号图标**)──
|
|
304
|
-
本体 16px 细圈 + 圈内 ?,颜色 fg-3、hover 只提亮不加底(与
|
|
302
|
+
本体 16px 细圈 + 圈内 ?,颜色 fg-3、hover 只提亮不加底(与 dshpc-ed-help 同规矩)。
|
|
305
303
|
纯 CSS tooltip:hover / 键盘聚焦浮出气泡,零 JS。独立组件,标题后、行尾随处可挂。 */
|
|
306
|
-
.
|
|
304
|
+
.dshpc-hint{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;
|
|
307
305
|
box-sizing:border-box;width:14px;height:14px;padding:0;border:1px solid currentColor;border-radius:50%;background:transparent;
|
|
308
|
-
color:var(--
|
|
309
|
-
transition:color var(--
|
|
310
|
-
.
|
|
311
|
-
.
|
|
312
|
-
.
|
|
306
|
+
color:var(--dshpc-fg-3);font-family:inherit;font-size:8px;font-weight:600;line-height:12px;cursor:help;vertical-align:middle;
|
|
307
|
+
transition:color var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
308
|
+
.dshpc-hint:hover,.dshpc-hint:focus-visible{color:var(--dshpc-fg);background:0 0;}
|
|
309
|
+
.dshpc-hint:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px;}
|
|
310
|
+
.dshpc-hint__bubble{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);
|
|
313
311
|
box-sizing:border-box;width:max-content;max-width:280px;padding:8px 10px;
|
|
314
|
-
border-radius:var(--
|
|
315
|
-
font-size:var(--
|
|
316
|
-
box-shadow:var(--
|
|
312
|
+
border-radius:var(--dshpc-radius-sm);background:var(--dshpc-solid);color:var(--dshpc-on-solid);
|
|
313
|
+
font-size:var(--dshpc-font-xs);line-height:1.7;text-align:left;white-space:normal;
|
|
314
|
+
box-shadow:var(--dshpc-shadow-2);z-index:var(--dshpc-z-menu);
|
|
317
315
|
opacity:0;visibility:hidden;pointer-events:none;
|
|
318
|
-
transition:opacity var(--
|
|
319
|
-
.
|
|
316
|
+
transition:opacity var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
317
|
+
.dshpc-hint:hover .dshpc-hint__bubble,.dshpc-hint:focus-visible .dshpc-hint__bubble{opacity:1;visibility:visible;}
|
|
320
318
|
`;
|
|
321
319
|
//# sourceMappingURL=controls-css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls-css.js","sourceRoot":"","sources":["../../src/ui/controls-css.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"controls-css.js","sourceRoot":"","sources":["../../src/ui/controls-css.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAE3B,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgE5B,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEzB,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DxB,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C3B,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;CAmBzB,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;CAQ1B,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B9B,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;CAkBvB,CAAA"}
|
package/dist/ui/css.d.ts
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { type StyleKit } from '../design/index.js';
|
|
2
2
|
export declare const CONTROLS_DOMAIN = "controls";
|
|
3
|
-
/**
|
|
4
|
-
* 把 CSS 模板里的 **变量前缀** `--tdt-` 换成当前插件的。
|
|
5
|
-
*
|
|
6
|
-
* ⚠️ 类名 `dsh-tdt-` **故意不换**:搬来的控件里 className 是硬编码的 `dsh-tdt-btn` 这类字面量
|
|
7
|
-
* (模板字符串里也拼接了),只换 CSS 侧会让选择器与 className 对不上、样式整片失效。
|
|
8
|
-
* 要连类名一起隔离,必须同步改造每个控件的 className —— 那是另一个任务。
|
|
9
|
-
*
|
|
10
|
-
* 已知限制:两个插件若引的 core 版本不同,`.dsh-tdt-*` 规则会互相覆盖(内容相同时无害)。
|
|
11
|
-
* 主防线是 style 标签 id(`createStyleKit({ id })`)与变量前缀隔离。
|
|
12
|
-
*/
|
|
13
|
-
export declare function buildCss(template: string, prefix: string): string;
|
|
14
3
|
export declare function setStyleKit(kit: StyleKit): void;
|
|
15
4
|
export declare function getStyleKit(): StyleKit;
|
|
16
5
|
/** 登记 token + 控件样式并确保挂载(幂等)。 */
|
package/dist/ui/css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/ui/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAkBlE,eAAO,MAAM,eAAe,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/ui/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAkBlE,eAAO,MAAM,eAAe,aAAa,CAAA;AA4BzC,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAE/C;AAED,wBAAgB,WAAW,IAAI,QAAQ,CAEtC;AAED,gCAAgC;AAChC,wBAAgB,cAAc,CAAC,GAAG,GAAE,QAAkB,GAAG,IAAI,CAG5D"}
|