@einfach-excel/spreadsheet-ui-styles 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +37 -2
- package/features/comment-thread.css +169 -0
- package/features/comment-thread.css.d.ts +2 -0
- package/features/conditional-format-dialog.css +254 -0
- package/features/conditional-format-dialog.css.d.ts +7 -0
- package/features/conditional-format-fields.css +10 -0
- package/features/conditional-format-fields.css.d.ts +2 -0
- package/features/data-validation-dialog.css +197 -0
- package/features/data-validation-dialog.css.d.ts +7 -0
- package/features/filter-dropdown.css +177 -0
- package/features/filter-dropdown.css.d.ts +2 -0
- package/features/find-replace-actions.css +13 -0
- package/features/find-replace-actions.css.d.ts +2 -0
- package/features/find-replace-dialog.css +147 -0
- package/features/find-replace-dialog.css.d.ts +2 -0
- package/features/find-replace-status-messages.css +19 -0
- package/features/find-replace-status-messages.css.d.ts +2 -0
- package/features/format-cells-dialog.css +296 -0
- package/features/format-cells-dialog.css.d.ts +2 -0
- package/features/format-cells-panels.css +154 -0
- package/features/format-cells-panels.css.d.ts +2 -0
- package/features/go-to-dialog.css +205 -0
- package/features/go-to-dialog.css.d.ts +2 -0
- package/features/menu-help-dialog.css +82 -0
- package/features/name-manager-dialog.css +276 -0
- package/features/number-format-dialog.css +147 -0
- package/features/number-format-dialog.css.d.ts +2 -0
- package/features/page-setup-dialog.css +167 -0
- package/features/page-setup-dialog.css.d.ts +3 -0
- package/features/paste-special-dialog.css +126 -0
- package/features/paste-special-dialog.css.d.ts +7 -0
- package/features/print-preview-dialog.css +197 -0
- package/features/print-preview-dialog.css.d.ts +3 -0
- package/features/protection-unlock-dialog.css +127 -0
- package/features/remove-duplicates-dialog.css +165 -0
- package/features/remove-duplicates-dialog.css.d.ts +7 -0
- package/features/sheet-tab-delete-dialog.css +64 -0
- package/features/sheet-tab-delete-dialog.css.d.ts +3 -0
- package/features/sort-confirmation-dialog.css +157 -0
- package/features/sort-confirmation-dialog.css.d.ts +2 -0
- package/features/text-to-columns-dialog.css +246 -0
- package/features/text-to-columns-dialog.css.d.ts +2 -0
- package/features/toolbar-shell.css +46 -0
- package/features/toolbar-shell.css.d.ts +2 -0
- package/package.json +40 -3
- package/styles/button-states.css +45 -0
- package/styles/chrome-tokens.css +124 -0
- package/styles/demo-header.css +23 -0
- package/styles/demo-two-column.css +115 -0
- package/styles/diagnostics.css +127 -0
- package/styles/dialog-skin.css +143 -0
- package/styles/formula-autocomplete.css +87 -0
- package/styles/formula-bar-row.css +51 -0
- package/styles/grid-cells.css +254 -0
- package/styles/grid-frame.css +268 -0
- package/styles/grid-headers.css +99 -0
- package/styles/grid-overlays.css +160 -0
- package/styles/help-overlay.css +67 -0
- package/styles/history-panel.css +127 -0
- package/styles/index.css +26 -0
- package/styles/locked-edit-feedback.css +45 -0
- package/styles/marching-ants.css +18 -0
- package/styles/menu-bar.css +97 -0
- package/styles/name-box.css +89 -0
- package/styles/presence-overlay.css +36 -0
- package/styles/shared-context-menu.css +50 -0
- package/styles/shared-format-toolbar.css +82 -0
- package/styles/shared-sheet-tabs.css +138 -0
- package/styles/sheet-tabs.css +98 -0
- package/styles/status-bar.css +161 -0
- package/styles/toolbar-popovers.css +278 -0
- package/styles/toolbar.css +213 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/* Text to Columns owns this wizard interior; dialog-skin.css owns the modal shell. */
|
|
2
|
+
|
|
3
|
+
.text-to-columns-dialog {
|
|
4
|
+
width: min(600px, calc(100vw - 32px));
|
|
5
|
+
min-height: min(480px, calc(100vh - 32px));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.text-to-columns-dialog .ttc-header {
|
|
9
|
+
gap: 12px;
|
|
10
|
+
padding-right: 48px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.text-to-columns-dialog .ttc-title {
|
|
14
|
+
color: var(--text-default);
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.text-to-columns-dialog .ttc-step-indicator {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
max-width: 55%;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
height: 22px;
|
|
27
|
+
margin-left: auto;
|
|
28
|
+
padding: 0 8px;
|
|
29
|
+
border: 1px solid var(--border);
|
|
30
|
+
border-radius: var(--control-radius);
|
|
31
|
+
background: var(--bg-chrome);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.text-to-columns-dialog .ttc-step-count {
|
|
35
|
+
color: var(--excel-green-text);
|
|
36
|
+
font-size: 12px;
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.text-to-columns-dialog .ttc-step-label {
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
color: var(--text-muted);
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.text-to-columns-dialog .ttc-body {
|
|
50
|
+
display: flex;
|
|
51
|
+
min-height: 0;
|
|
52
|
+
flex: 1 1 auto;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: 12px;
|
|
55
|
+
padding: 16px;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
background: var(--bg-surface);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.text-to-columns-dialog .ttc-section {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex: 0 0 auto;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
min-width: 0;
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 8px 12px 12px;
|
|
68
|
+
border: 1px solid var(--border);
|
|
69
|
+
border-radius: var(--radius);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.text-to-columns-dialog .ttc-section-title {
|
|
73
|
+
padding: 0 4px;
|
|
74
|
+
color: var(--text-muted);
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.text-to-columns-dialog .ttc-radio,
|
|
80
|
+
.text-to-columns-dialog .ttc-checkbox {
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
min-height: 20px;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 6px;
|
|
85
|
+
color: var(--text-default);
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
user-select: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.text-to-columns-dialog :is(.ttc-radio, .ttc-checkbox) input {
|
|
91
|
+
margin: 0;
|
|
92
|
+
accent-color: var(--excel-green);
|
|
93
|
+
cursor: inherit;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.text-to-columns-dialog :is(.ttc-radio, .ttc-checkbox):has(input:disabled),
|
|
97
|
+
.text-to-columns-dialog .ttc-field-row:has(:disabled) {
|
|
98
|
+
color: var(--text-disabled);
|
|
99
|
+
cursor: default;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.text-to-columns-dialog .ttc-delim-grid {
|
|
103
|
+
display: grid;
|
|
104
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
105
|
+
gap: 6px 16px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.text-to-columns-dialog .ttc-field-row {
|
|
109
|
+
display: grid;
|
|
110
|
+
grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 8px;
|
|
113
|
+
color: var(--text-default);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.text-to-columns-dialog .ttc-input,
|
|
117
|
+
.text-to-columns-dialog .ttc-select {
|
|
118
|
+
width: 100%;
|
|
119
|
+
padding: 0 8px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.text-to-columns-dialog[role='dialog'][data-step] .ttc-input:disabled,
|
|
123
|
+
.text-to-columns-dialog[role='dialog'][data-step] .ttc-select:disabled {
|
|
124
|
+
background: var(--bg-chrome);
|
|
125
|
+
color: var(--text-disabled);
|
|
126
|
+
cursor: default;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.text-to-columns-dialog .ttc-format-grid {
|
|
130
|
+
display: grid;
|
|
131
|
+
max-height: 112px;
|
|
132
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
133
|
+
gap: 8px 12px;
|
|
134
|
+
overflow: auto;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.text-to-columns-dialog .ttc-format-grid .ttc-field-row {
|
|
138
|
+
grid-template-columns: 28px minmax(0, 1fr);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.text-to-columns-dialog .ttc-preview {
|
|
142
|
+
display: flex;
|
|
143
|
+
min-height: 0;
|
|
144
|
+
flex: 1 1 auto;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
gap: 6px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.text-to-columns-dialog .ttc-preview-header {
|
|
150
|
+
color: var(--text-default);
|
|
151
|
+
font-size: 12px;
|
|
152
|
+
font-weight: 600;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.text-to-columns-dialog .ttc-preview-scroll {
|
|
156
|
+
min-height: 112px;
|
|
157
|
+
flex: 1 1 auto;
|
|
158
|
+
overflow: auto;
|
|
159
|
+
border: 1px solid var(--border);
|
|
160
|
+
border-radius: var(--control-radius);
|
|
161
|
+
background: var(--bg-cell);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.text-to-columns-dialog .ttc-preview-scroll table {
|
|
165
|
+
width: 100%;
|
|
166
|
+
border-collapse: collapse;
|
|
167
|
+
color: var(--text-default);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.text-to-columns-dialog .ttc-preview-scroll td {
|
|
171
|
+
min-width: 72px;
|
|
172
|
+
padding: 4px 8px;
|
|
173
|
+
border-right: 1px solid var(--gridline);
|
|
174
|
+
border-bottom: 1px solid var(--gridline);
|
|
175
|
+
font-size: 12px;
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.text-to-columns-dialog .ttc-help {
|
|
180
|
+
margin: 0;
|
|
181
|
+
color: var(--text-muted);
|
|
182
|
+
font-size: 12px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.text-to-columns-dialog .ttc-error {
|
|
186
|
+
padding: 8px 10px;
|
|
187
|
+
border: 1px solid var(--error-text);
|
|
188
|
+
border-radius: var(--radius);
|
|
189
|
+
background: var(--error-bg);
|
|
190
|
+
color: var(--error-text);
|
|
191
|
+
font-size: 12px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.text-to-columns-dialog .ttc-footer-status {
|
|
195
|
+
min-width: 0;
|
|
196
|
+
flex: 1 1 auto;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.text-to-columns-dialog .ttc-footer-actions {
|
|
200
|
+
display: inline-flex;
|
|
201
|
+
flex: 0 0 auto;
|
|
202
|
+
align-items: center;
|
|
203
|
+
gap: 8px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.text-to-columns-dialog .ttc-btn {
|
|
207
|
+
min-width: 68px;
|
|
208
|
+
padding: 0 12px;
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.text-to-columns-dialog .ttc-btn:hover:not(:disabled) {
|
|
213
|
+
border-color: var(--border-strong);
|
|
214
|
+
background: var(--hover);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.text-to-columns-dialog .ttc-btn-primary:hover:not(:disabled) {
|
|
218
|
+
border-color: var(--dialog-primary-hover);
|
|
219
|
+
background: var(--dialog-primary-hover);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.text-to-columns-dialog[role='dialog'][data-step] .ttc-btn:disabled {
|
|
223
|
+
background: var(--bg-chrome);
|
|
224
|
+
color: var(--text-disabled);
|
|
225
|
+
cursor: default;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.text-to-columns-dialog[role='dialog'][data-step] .ttc-btn.ttc-btn-primary:disabled {
|
|
229
|
+
border-color: var(--border);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.text-to-columns-dialog .ttc-next-disabled-hint {
|
|
233
|
+
display: block;
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
color: var(--text-muted);
|
|
236
|
+
font-size: 12px;
|
|
237
|
+
text-overflow: ellipsis;
|
|
238
|
+
white-space: nowrap;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@media (max-width: 560px) {
|
|
242
|
+
.text-to-columns-dialog .ttc-delim-grid,
|
|
243
|
+
.text-to-columns-dialog .ttc-format-grid {
|
|
244
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.spreadsheet-toolbar.toolbar-shell {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: nowrap;
|
|
4
|
+
gap: 0;
|
|
5
|
+
overflow: visible;
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.toolbar-shell__viewport {
|
|
10
|
+
min-width: 0;
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
overflow-y: hidden;
|
|
13
|
+
scrollbar-width: thin;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.toolbar-shell__content {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 2px;
|
|
21
|
+
min-height: 40px;
|
|
22
|
+
min-width: max-content;
|
|
23
|
+
padding: 4px 10px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.toolbar-shell__content > .spreadsheet-toolbar-separator {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
width: 1px;
|
|
29
|
+
height: 20px;
|
|
30
|
+
margin: 0 6px;
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
background: #d8d8d8;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.toolbar-shell__scroll-button {
|
|
36
|
+
align-self: stretch;
|
|
37
|
+
width: 24px;
|
|
38
|
+
border: 0;
|
|
39
|
+
background: var(--bg-chrome-light);
|
|
40
|
+
color: inherit;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.toolbar-shell__scroll-button:disabled {
|
|
45
|
+
visibility: hidden;
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@einfach-excel/spreadsheet-ui-styles",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Framework-neutral CSS layer for Einfach spreadsheet surfaces",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./styles/index.css",
|
|
8
|
+
"./styles.css": "./styles/index.css",
|
|
9
|
+
"./styles/*.css": "./styles/*.css",
|
|
10
|
+
"./features/*.css": {
|
|
11
|
+
"types": "./features/*.css.d.ts",
|
|
12
|
+
"default": "./features/*.css"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"styles",
|
|
18
|
+
"features",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": [
|
|
22
|
+
"**/*.css"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=22.12.0"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/allroad88888888/einfach-excel.git",
|
|
31
|
+
"directory": "excel/spreadsheet-ui-styles"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/allroad88888888/einfach-excel/tree/main/excel/spreadsheet-ui-styles",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/allroad88888888/einfach-excel/issues"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"spreadsheet",
|
|
39
|
+
"css",
|
|
40
|
+
"styles",
|
|
41
|
+
"framework-agnostic"
|
|
42
|
+
]
|
|
6
43
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* === E. Button universal states ====================================== */
|
|
2
|
+
|
|
3
|
+
/* Excel-style focus ring — only via keyboard (focus-visible), Office blue,
|
|
4
|
+
* inset so it never expands box geometry. Applies broadly to vnext chrome. */
|
|
5
|
+
.spreadsheet-menu-bar button:focus-visible,
|
|
6
|
+
.spreadsheet-toolbar button:focus-visible,
|
|
7
|
+
.spreadsheet-name-box-input:focus-visible,
|
|
8
|
+
.spreadsheet-formula-bar-input:focus-visible,
|
|
9
|
+
.spreadsheet-status-bar button:focus-visible,
|
|
10
|
+
.spreadsheet-sheet-tabs button:focus-visible,
|
|
11
|
+
.spreadsheet-grid-cell:focus-visible {
|
|
12
|
+
outline: 2px solid var(--office-blue);
|
|
13
|
+
outline-offset: -1px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Hide native focus outline when JS sets focus programmatically (no keyboard).
|
|
17
|
+
* focus-visible above re-adds it for keyboard navigation. */
|
|
18
|
+
.spreadsheet-menu-bar button:focus:not(:focus-visible),
|
|
19
|
+
.spreadsheet-toolbar button:focus:not(:focus-visible),
|
|
20
|
+
.spreadsheet-status-bar button:focus:not(:focus-visible),
|
|
21
|
+
.spreadsheet-sheet-tabs button:focus:not(:focus-visible) {
|
|
22
|
+
outline: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Universal disabled baseline — anything with disabled attribute inside vnext
|
|
26
|
+
* chrome dims and stops pointer events except for tooltips. */
|
|
27
|
+
.spreadsheet-menu-bar button:disabled,
|
|
28
|
+
.spreadsheet-toolbar button:disabled,
|
|
29
|
+
.spreadsheet-status-bar button:disabled,
|
|
30
|
+
.spreadsheet-sheet-tabs button:disabled {
|
|
31
|
+
color: var(--text-disabled);
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
background: transparent;
|
|
34
|
+
border-color: transparent;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Universal pressed/armed accent — any element advertising aria-pressed=true
|
|
38
|
+
* or data-active=true gets the Excel green inset highlight if nothing
|
|
39
|
+
* more specific overrides. Specific selectors above still win on cascade. */
|
|
40
|
+
.spreadsheet-menu-bar button[aria-pressed='true'],
|
|
41
|
+
.spreadsheet-toolbar button[aria-pressed='true'],
|
|
42
|
+
.spreadsheet-status-bar button[aria-pressed='true'] {
|
|
43
|
+
box-shadow: inset 0 -2px 0 0 var(--excel-green);
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* Excel-web chrome tokens — vnext 皮肤的唯一取色/尺寸来源
|
|
3
|
+
*
|
|
4
|
+
* 参照 Excel for web(Fluent):白色工具栏、#f5f5f5 表头/底部条、
|
|
5
|
+
* #107c41 品牌绿(选区边框/强调)、#e1e1e1 网格线。规则:
|
|
6
|
+
* - chrome 样式文件里禁止再写裸色值 —— 缺 token 就来这里加;
|
|
7
|
+
* - 每个面板必须铺自己的不透明底色 token,不许透出宿主背景
|
|
8
|
+
* (透明拼缝在暗色宿主下会漏光,见 acfa5cb 修的"右下角黑缝");
|
|
9
|
+
* - *-text 变体是文本安全色:同名非 text 色用于边框/填充时可以更鲜,
|
|
10
|
+
* 文本必须用 text 变体保 4.5:1(数值经脚本核算,见下方注释)。
|
|
11
|
+
*
|
|
12
|
+
* 对比度(AA≥4.5,核算于 2026-08-20):green-text/白 6.17、
|
|
13
|
+
* green-text/header-selected 4.78、green-text/select-bg 5.55、
|
|
14
|
+
* muted/chrome 5.68、白/green 5.27、blue-text/白 5.78、error/白 6.57。
|
|
15
|
+
* ========================================================================= */
|
|
16
|
+
:root {
|
|
17
|
+
/* --- 品牌 / 强调 --- */
|
|
18
|
+
--excel-green: #107c41; /* 选区边框、活动 sheet 下划线、主按钮填充 */
|
|
19
|
+
--excel-green-text: #0f703b; /* 绿色"文本"一律用这个 */
|
|
20
|
+
--office-blue: #0078d4; /* 焦点环、链接态边框/填充 */
|
|
21
|
+
--office-blue-text: #0067b8; /* 蓝色"文本"一律用这个 */
|
|
22
|
+
|
|
23
|
+
/* --- 面板底色(全部不透明) --- */
|
|
24
|
+
--bg-toolbar: #ffffff; /* 工具栏 / 公式栏一行 */
|
|
25
|
+
--bg-chrome: #f5f5f5; /* 表头、底部条(页签+状态栏)、菜单栏 */
|
|
26
|
+
--bg-chrome-light: #fafafa; /* 次级浅面板(历史面板等) */
|
|
27
|
+
--bg-surface: #ffffff; /* 弹层:下拉、右键菜单、popover */
|
|
28
|
+
--bg-cell: #ffffff; /* 单元格画布 */
|
|
29
|
+
|
|
30
|
+
/* --- 文本 --- */
|
|
31
|
+
--text-default: #242424;
|
|
32
|
+
--text-muted: #616161;
|
|
33
|
+
--text-disabled: #bdbdbd;
|
|
34
|
+
--text-on-accent: #ffffff;
|
|
35
|
+
--text-on-accent-soft: rgba(255, 255, 255, 0.85);
|
|
36
|
+
--error-text: #b42318;
|
|
37
|
+
--error-bg: rgba(220, 53, 69, 0.12);
|
|
38
|
+
|
|
39
|
+
/* --- 线 --- */
|
|
40
|
+
--border: #d1d1d1; /* chrome 面板之间的 1px 发丝线 */
|
|
41
|
+
--border-strong: #a19f9d;
|
|
42
|
+
--gridline: #e1e1e1; /* 单元格网格线,比 chrome 线更浅(Excel 口径) */
|
|
43
|
+
|
|
44
|
+
/* --- Dialog 壳 --- */
|
|
45
|
+
--dialog-overlay: rgba(0, 0, 0, 0.28);
|
|
46
|
+
--dialog-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
|
|
47
|
+
--dialog-primary-bg: #107c41;
|
|
48
|
+
--dialog-primary-hover: #0d6f3a;
|
|
49
|
+
--dialog-primary-active: #0a5c30;
|
|
50
|
+
|
|
51
|
+
/* --- 交互状态底色 --- */
|
|
52
|
+
--hover: #f0f0f0;
|
|
53
|
+
--active-bg: #e4e4e4;
|
|
54
|
+
--select-bg: rgba(16, 124, 65, 0.08); /* 选区范围淡绿填充 */
|
|
55
|
+
--spill-tint: rgba(43, 87, 154, 0.06); /* 动态数组溢出区淡蓝 */
|
|
56
|
+
--resize-hint: rgba(0, 120, 212, 0.3); /* 行列缩放把手 hover */
|
|
57
|
+
--header-selected-bg: #caead8; /* 选区触及的表头 */
|
|
58
|
+
--header-selected-text: #0f703b;
|
|
59
|
+
/* 整行/列选中的实心表头。两主题都用 #107c41:白字 5.27:1,
|
|
60
|
+
暗色下不用更亮的 #21a366 —— 白字在其上只有 3.4:1,过不了 AA。 */
|
|
61
|
+
--header-full-selected-bg: #107c41;
|
|
62
|
+
|
|
63
|
+
/* --- 尺寸 --- */
|
|
64
|
+
--control-h: 28px; /* 工具栏控件统一高度 */
|
|
65
|
+
--formula-row-h: 28px;
|
|
66
|
+
--bottom-strip-h: 28px; /* 页签 + 状态栏共处的一条 */
|
|
67
|
+
--radius: 4px;
|
|
68
|
+
--control-radius: 2px;
|
|
69
|
+
--dialog-header-h: 40px;
|
|
70
|
+
|
|
71
|
+
/* --- 字体 --- */
|
|
72
|
+
/* chrome 用 UI 字体(Windows 命中 Segoe UI,即 Office 原生观感) */
|
|
73
|
+
--excel-font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
|
|
74
|
+
/* 单元格用 Excel 的默认正文字体栈(Windows 命中 Calibri ≈ 11pt) */
|
|
75
|
+
--cell-font:
|
|
76
|
+
Calibri, 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
|
|
77
|
+
--cell-font-size: 14px;
|
|
78
|
+
|
|
79
|
+
--shadow-popover: 0 4px 14px rgba(0, 0, 0, 0.14);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* ============================================================================
|
|
83
|
+
* 暗色皮肤 —— 宿主在组件任意祖先上放 data-spreadsheet-theme="dark" 即生效
|
|
84
|
+
* (CSS 变量沿 DOM 继承,子树内所有 chrome 就地换色)。
|
|
85
|
+
* 参照 Office 暗色:画布 #212121、chrome #252423、网格线 #404040。
|
|
86
|
+
* 对比度(AA,核算于 2026-08-20):text/cell 14.4、muted/chrome 6.38、
|
|
87
|
+
* green-text/cell 8.11、green-text/header-selected 6.28、error 5.15、
|
|
88
|
+
* 绿边框图形对比 4.98(#21a366 vs #212121)。
|
|
89
|
+
* ========================================================================= */
|
|
90
|
+
[data-spreadsheet-theme='dark'] {
|
|
91
|
+
--excel-green: #21a366; /* 暗底上边框/下划线需要更亮的绿 */
|
|
92
|
+
--excel-green-text: #6ccb8f;
|
|
93
|
+
--office-blue: #479ef5;
|
|
94
|
+
--office-blue-text: #62abf5;
|
|
95
|
+
|
|
96
|
+
--bg-toolbar: #292827;
|
|
97
|
+
--bg-chrome: #252423;
|
|
98
|
+
--bg-chrome-light: #2d2c2b;
|
|
99
|
+
--bg-surface: #363534;
|
|
100
|
+
--bg-cell: #212121;
|
|
101
|
+
|
|
102
|
+
--text-default: #f3f2f1;
|
|
103
|
+
--text-muted: #a8a6a3;
|
|
104
|
+
--text-disabled: #6b6966;
|
|
105
|
+
--error-text: #f1707b;
|
|
106
|
+
--error-bg: rgba(241, 112, 123, 0.16);
|
|
107
|
+
|
|
108
|
+
--border: #484644;
|
|
109
|
+
--border-strong: #6b6966;
|
|
110
|
+
--gridline: #404040;
|
|
111
|
+
|
|
112
|
+
--dialog-overlay: rgba(0, 0, 0, 0.56);
|
|
113
|
+
--dialog-shadow: 0 12px 32px rgba(0, 0, 0, 0.62);
|
|
114
|
+
|
|
115
|
+
--hover: #3a3938;
|
|
116
|
+
--active-bg: #484644;
|
|
117
|
+
--select-bg: rgba(76, 194, 123, 0.12);
|
|
118
|
+
--spill-tint: rgba(96, 130, 182, 0.14);
|
|
119
|
+
--resize-hint: rgba(71, 158, 245, 0.4);
|
|
120
|
+
--header-selected-bg: #143b26;
|
|
121
|
+
--header-selected-text: #6ccb8f;
|
|
122
|
+
|
|
123
|
+
--shadow-popover: 0 4px 14px rgba(0, 0, 0, 0.55);
|
|
124
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* Demo header — compress so the grid gets more vertical real estate */
|
|
2
|
+
.vnext-demo .demo-header {
|
|
3
|
+
padding: 6px 12px;
|
|
4
|
+
margin-bottom: 4px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.vnext-demo .demo-header h3 {
|
|
8
|
+
margin: 0;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.vnext-demo .demo-header .demo-desc {
|
|
13
|
+
margin: 2px 0 0 0;
|
|
14
|
+
font-size: 11px;
|
|
15
|
+
color: var(--text-muted);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* View > Show Gridlines: remove borders between cells. */
|
|
19
|
+
.spreadsheet-grid.spreadsheet-grid--no-gridlines .spreadsheet-grid-cell {
|
|
20
|
+
border-right: none;
|
|
21
|
+
border-bottom: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* === Wave 5 demo two-column layout ============================================== */
|
|
2
|
+
|
|
3
|
+
.vnext-demo-body {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.vnext-demo-main {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
flex: 1 1 auto;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.vnext-demo-bottom-row {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: stretch;
|
|
19
|
+
min-height: var(--bottom-strip-h);
|
|
20
|
+
border-top: 1px solid var(--border);
|
|
21
|
+
/* 不透明底:chrome 条不许透出宿主背景(暗色宿主会漏光)。 */
|
|
22
|
+
background: var(--bg-chrome);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.vnext-demo-bottom-row .spreadsheet-sheet-tabs {
|
|
26
|
+
flex: 1 1 auto;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
border-top: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* 状态栏与页签共处一条时,分隔线由容器统一画,避免双线。 */
|
|
32
|
+
.vnext-demo-bottom-row .spreadsheet-status-bar {
|
|
33
|
+
border-top: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.vnext-demo-sidebar {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
flex: 0 0 220px;
|
|
40
|
+
min-height: 0;
|
|
41
|
+
border-left: 1px solid var(--border);
|
|
42
|
+
background: var(--bg-chrome);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.vnext-demo-sidebar .spreadsheet-status-bar--vertical {
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.vnext-demo-sidebar .spreadsheet-history-timeline {
|
|
50
|
+
flex: 1 1 auto;
|
|
51
|
+
border-top: 1px solid var(--border);
|
|
52
|
+
min-height: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Status-bar vertical orientation — used in the right sidebar */
|
|
56
|
+
.spreadsheet-status-bar--vertical {
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
align-items: stretch;
|
|
59
|
+
overflow-x: visible;
|
|
60
|
+
overflow-y: auto;
|
|
61
|
+
white-space: normal;
|
|
62
|
+
padding: 6px;
|
|
63
|
+
gap: 4px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.spreadsheet-status-bar--vertical .spreadsheet-status-bar-item {
|
|
67
|
+
height: auto;
|
|
68
|
+
min-height: 22px;
|
|
69
|
+
padding: 2px 8px;
|
|
70
|
+
border-right: none;
|
|
71
|
+
border-bottom: 1px dashed var(--border);
|
|
72
|
+
justify-content: space-between;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.spreadsheet-status-bar--vertical .spreadsheet-status-bar-item:last-of-type {
|
|
76
|
+
border-bottom: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.spreadsheet-status-bar--vertical .spreadsheet-status-bar-aggregates {
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
align-items: stretch;
|
|
82
|
+
height: auto;
|
|
83
|
+
gap: 2px;
|
|
84
|
+
padding: 4px 0;
|
|
85
|
+
border-right: none;
|
|
86
|
+
border-top: 1px solid var(--border);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.spreadsheet-status-bar--vertical .spreadsheet-status-bar-aggregate {
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
width: 100%;
|
|
92
|
+
height: 22px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.spreadsheet-status-bar--vertical .spreadsheet-status-bar-view-modes {
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
align-items: stretch;
|
|
98
|
+
height: auto;
|
|
99
|
+
gap: 2px;
|
|
100
|
+
padding: 4px 0;
|
|
101
|
+
border-right: none;
|
|
102
|
+
border-top: 1px solid var(--border);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.spreadsheet-status-bar--vertical .spreadsheet-status-bar-view-mode {
|
|
106
|
+
justify-content: flex-start;
|
|
107
|
+
height: 22px;
|
|
108
|
+
padding: 0 8px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.spreadsheet-status-bar--vertical .spreadsheet-status-bar-mode-badge {
|
|
112
|
+
align-self: flex-start;
|
|
113
|
+
margin: 4px 0 0 0;
|
|
114
|
+
}
|
|
115
|
+
|