@nuptechs/nup-xlsx-preview 1.0.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 +226 -0
- package/dist/adapters/react.cjs +10 -0
- package/dist/adapters/react.cjs.map +1 -0
- package/dist/adapters/react.d.cts +307 -0
- package/dist/adapters/react.d.ts +307 -0
- package/dist/adapters/react.js +10 -0
- package/dist/adapters/react.js.map +1 -0
- package/dist/adapters/vanilla.cjs +55 -0
- package/dist/adapters/vanilla.cjs.map +1 -0
- package/dist/adapters/vanilla.d.cts +168 -0
- package/dist/adapters/vanilla.d.ts +168 -0
- package/dist/adapters/vanilla.js +55 -0
- package/dist/adapters/vanilla.js.map +1 -0
- package/dist/adapters/vue.cjs +10 -0
- package/dist/adapters/vue.cjs.map +1 -0
- package/dist/adapters/vue.d.cts +369 -0
- package/dist/adapters/vue.d.ts +369 -0
- package/dist/adapters/vue.js +10 -0
- package/dist/adapters/vue.js.map +1 -0
- package/dist/index.cjs +55 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +790 -0
- package/dist/index.d.ts +790 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/base.css +346 -0
- package/dist/styles/index.css +730 -0
- package/dist/styles/print.css +182 -0
- package/dist/styles/themes.css +202 -0
- package/package.json +131 -0
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @aspect/nup-xlsx-preview - Base Styles
|
|
3
|
+
* Ultra-light CSS for spreadsheet rendering
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* Container */
|
|
7
|
+
.nup-spreadsheet {
|
|
8
|
+
position: relative;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
font-family: var(--nup-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
11
|
+
font-size: var(--nup-font-size, 13px);
|
|
12
|
+
line-height: 1.4;
|
|
13
|
+
background: var(--nup-background, #ffffff);
|
|
14
|
+
color: var(--nup-foreground, #1a1a1a);
|
|
15
|
+
border: 1px solid var(--nup-border, #e0e0e0);
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
user-select: none;
|
|
18
|
+
-webkit-user-select: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.nup-spreadsheet:focus {
|
|
22
|
+
outline: 2px solid var(--nup-selection-border, #1a73e8);
|
|
23
|
+
outline-offset: -2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Scroll Container */
|
|
27
|
+
.nup-scroll-container {
|
|
28
|
+
position: absolute;
|
|
29
|
+
overflow: auto;
|
|
30
|
+
scrollbar-width: thin;
|
|
31
|
+
scrollbar-color: var(--nup-scrollbar-thumb, #c1c1c1) var(--nup-scrollbar-track, #f1f1f1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.nup-scroll-container::-webkit-scrollbar {
|
|
35
|
+
width: 10px;
|
|
36
|
+
height: 10px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.nup-scroll-container::-webkit-scrollbar-track {
|
|
40
|
+
background: var(--nup-scrollbar-track, #f1f1f1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.nup-scroll-container::-webkit-scrollbar-thumb {
|
|
44
|
+
background: var(--nup-scrollbar-thumb, #c1c1c1);
|
|
45
|
+
border-radius: 5px;
|
|
46
|
+
border: 2px solid var(--nup-scrollbar-track, #f1f1f1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.nup-scroll-container::-webkit-scrollbar-thumb:hover {
|
|
50
|
+
background: var(--nup-scrollbar-thumb-hover, #a8a8a8);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Content Area */
|
|
54
|
+
.nup-content {
|
|
55
|
+
position: relative;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Cell */
|
|
59
|
+
.nup-cell {
|
|
60
|
+
position: absolute;
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
padding: 2px 6px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
border-right: 1px solid var(--nup-grid, #e0e0e0);
|
|
67
|
+
border-bottom: 1px solid var(--nup-grid, #e0e0e0);
|
|
68
|
+
background: var(--nup-cell-bg, #ffffff);
|
|
69
|
+
cursor: cell;
|
|
70
|
+
transition: background-color 0.05s ease;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.nup-cell:hover {
|
|
74
|
+
background: var(--nup-cell-hover, #f8f9fa);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.nup-cell.nup-cell-number {
|
|
78
|
+
text-align: right;
|
|
79
|
+
font-variant-numeric: tabular-nums;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.nup-cell.nup-cell-selected {
|
|
83
|
+
background: var(--nup-selection-bg, rgba(26, 115, 232, 0.08));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nup-cell.nup-cell-anchor {
|
|
87
|
+
z-index: 2;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.nup-cell.nup-cell-search-result {
|
|
91
|
+
background: var(--nup-search-bg, #fff59d);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.nup-cell.nup-cell-search-current {
|
|
95
|
+
background: var(--nup-search-current-bg, #ffb300);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Selection Border Overlay */
|
|
99
|
+
.nup-selection-border {
|
|
100
|
+
position: absolute;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
border: 2px solid var(--nup-selection-border, #1a73e8);
|
|
103
|
+
z-index: 10;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.nup-selection-border::after {
|
|
107
|
+
content: '';
|
|
108
|
+
position: absolute;
|
|
109
|
+
bottom: -4px;
|
|
110
|
+
right: -4px;
|
|
111
|
+
width: 8px;
|
|
112
|
+
height: 8px;
|
|
113
|
+
background: var(--nup-selection-border, #1a73e8);
|
|
114
|
+
border-radius: 1px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Headers */
|
|
118
|
+
.nup-header {
|
|
119
|
+
position: absolute;
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
background: var(--nup-header-bg, #f8f9fa);
|
|
125
|
+
color: var(--nup-header-fg, #5f6368);
|
|
126
|
+
font-size: 11px;
|
|
127
|
+
font-weight: 500;
|
|
128
|
+
border-right: 1px solid var(--nup-grid, #e0e0e0);
|
|
129
|
+
border-bottom: 1px solid var(--nup-grid, #e0e0e0);
|
|
130
|
+
user-select: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.nup-header-col {
|
|
134
|
+
cursor: default;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.nup-header-col.nup-header-selected {
|
|
138
|
+
background: var(--nup-header-selected-bg, #e8f0fe);
|
|
139
|
+
color: var(--nup-selection-border, #1a73e8);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.nup-header-row {
|
|
143
|
+
cursor: default;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.nup-header-row.nup-header-selected {
|
|
147
|
+
background: var(--nup-header-selected-bg, #e8f0fe);
|
|
148
|
+
color: var(--nup-selection-border, #1a73e8);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Column Resize Handle */
|
|
152
|
+
.nup-resize-handle {
|
|
153
|
+
position: absolute;
|
|
154
|
+
top: 0;
|
|
155
|
+
right: -3px;
|
|
156
|
+
width: 6px;
|
|
157
|
+
height: 100%;
|
|
158
|
+
cursor: col-resize;
|
|
159
|
+
z-index: 5;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.nup-resize-handle:hover,
|
|
163
|
+
.nup-resize-handle.nup-resizing {
|
|
164
|
+
background: var(--nup-selection-border, #1a73e8);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Corner (top-left intersection) */
|
|
168
|
+
.nup-corner {
|
|
169
|
+
position: absolute;
|
|
170
|
+
top: 0;
|
|
171
|
+
left: 0;
|
|
172
|
+
background: var(--nup-header-bg, #f8f9fa);
|
|
173
|
+
border-right: 1px solid var(--nup-grid, #e0e0e0);
|
|
174
|
+
border-bottom: 1px solid var(--nup-grid, #e0e0e0);
|
|
175
|
+
z-index: 30;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Frozen Line Indicators */
|
|
179
|
+
.nup-frozen-line-row {
|
|
180
|
+
position: absolute;
|
|
181
|
+
left: 0;
|
|
182
|
+
right: 0;
|
|
183
|
+
height: 2px;
|
|
184
|
+
background: var(--nup-frozen-border, #dadce0);
|
|
185
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
186
|
+
z-index: 25;
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.nup-frozen-line-col {
|
|
191
|
+
position: absolute;
|
|
192
|
+
top: 0;
|
|
193
|
+
bottom: 0;
|
|
194
|
+
width: 2px;
|
|
195
|
+
background: var(--nup-frozen-border, #dadce0);
|
|
196
|
+
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
|
197
|
+
z-index: 25;
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Sheet Tabs */
|
|
202
|
+
.nup-sheet-tabs {
|
|
203
|
+
display: flex;
|
|
204
|
+
gap: 2px;
|
|
205
|
+
padding: 4px 8px;
|
|
206
|
+
background: var(--nup-header-bg, #f8f9fa);
|
|
207
|
+
border-top: 1px solid var(--nup-grid, #e0e0e0);
|
|
208
|
+
overflow-x: auto;
|
|
209
|
+
scrollbar-width: none;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.nup-sheet-tabs::-webkit-scrollbar {
|
|
213
|
+
display: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.nup-sheet-tab {
|
|
217
|
+
padding: 6px 16px;
|
|
218
|
+
font-size: 12px;
|
|
219
|
+
font-weight: 500;
|
|
220
|
+
color: var(--nup-header-fg, #5f6368);
|
|
221
|
+
background: transparent;
|
|
222
|
+
border: none;
|
|
223
|
+
border-radius: 4px 4px 0 0;
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
transition: background-color 0.15s ease;
|
|
226
|
+
white-space: nowrap;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.nup-sheet-tab:hover {
|
|
230
|
+
background: var(--nup-cell-hover, #f0f0f0);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.nup-sheet-tab.nup-sheet-tab-active {
|
|
234
|
+
background: var(--nup-background, #ffffff);
|
|
235
|
+
color: var(--nup-foreground, #1a1a1a);
|
|
236
|
+
box-shadow: 0 -1px 0 var(--nup-selection-border, #1a73e8) inset;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Search Bar */
|
|
240
|
+
.nup-search-bar {
|
|
241
|
+
display: flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
gap: 8px;
|
|
244
|
+
padding: 8px 12px;
|
|
245
|
+
background: var(--nup-header-bg, #f8f9fa);
|
|
246
|
+
border-bottom: 1px solid var(--nup-grid, #e0e0e0);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.nup-search-input {
|
|
250
|
+
flex: 1;
|
|
251
|
+
padding: 6px 10px;
|
|
252
|
+
font-size: 13px;
|
|
253
|
+
border: 1px solid var(--nup-grid, #e0e0e0);
|
|
254
|
+
border-radius: 4px;
|
|
255
|
+
background: var(--nup-background, #ffffff);
|
|
256
|
+
color: var(--nup-foreground, #1a1a1a);
|
|
257
|
+
outline: none;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.nup-search-input:focus {
|
|
261
|
+
border-color: var(--nup-selection-border, #1a73e8);
|
|
262
|
+
box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.nup-search-count {
|
|
266
|
+
font-size: 12px;
|
|
267
|
+
color: var(--nup-header-fg, #5f6368);
|
|
268
|
+
white-space: nowrap;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.nup-search-btn {
|
|
272
|
+
padding: 6px 10px;
|
|
273
|
+
font-size: 12px;
|
|
274
|
+
background: transparent;
|
|
275
|
+
border: 1px solid var(--nup-grid, #e0e0e0);
|
|
276
|
+
border-radius: 4px;
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
color: var(--nup-foreground, #1a1a1a);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.nup-search-btn:hover {
|
|
282
|
+
background: var(--nup-cell-hover, #f0f0f0);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* No Gridlines */
|
|
286
|
+
.nup-no-gridlines .nup-cell {
|
|
287
|
+
border-color: transparent;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* Hidden Headers */
|
|
291
|
+
.nup-no-headers .nup-header,
|
|
292
|
+
.nup-no-headers .nup-corner {
|
|
293
|
+
display: none;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* Loading State */
|
|
297
|
+
.nup-loading {
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
justify-content: center;
|
|
301
|
+
color: var(--nup-header-fg, #5f6368);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.nup-loading::after {
|
|
305
|
+
content: '';
|
|
306
|
+
width: 24px;
|
|
307
|
+
height: 24px;
|
|
308
|
+
margin-left: 8px;
|
|
309
|
+
border: 2px solid var(--nup-grid, #e0e0e0);
|
|
310
|
+
border-top-color: var(--nup-selection-border, #1a73e8);
|
|
311
|
+
border-radius: 50%;
|
|
312
|
+
animation: nup-spin 0.8s linear infinite;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@keyframes nup-spin {
|
|
316
|
+
to { transform: rotate(360deg); }
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/* Accessibility: Focus Visible */
|
|
320
|
+
.nup-spreadsheet:focus-visible .nup-cell-anchor {
|
|
321
|
+
outline: 2px solid var(--nup-selection-border, #1a73e8);
|
|
322
|
+
outline-offset: -2px;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* High Contrast Mode Support */
|
|
326
|
+
@media (prefers-contrast: high) {
|
|
327
|
+
.nup-cell {
|
|
328
|
+
border-color: #000000;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.nup-selection-border {
|
|
332
|
+
border-width: 3px;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* Reduced Motion */
|
|
337
|
+
@media (prefers-reduced-motion: reduce) {
|
|
338
|
+
.nup-cell,
|
|
339
|
+
.nup-sheet-tab {
|
|
340
|
+
transition: none;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.nup-loading::after {
|
|
344
|
+
animation: none;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* @aspect/nup-xlsx-preview - Theme Definitions
|
|
349
|
+
* 7 themes: 4 light, 2 dark, 1 accessible
|
|
350
|
+
*/
|
|
351
|
+
|
|
352
|
+
/* === LIGHT THEMES === */
|
|
353
|
+
|
|
354
|
+
/* Theme: Default (Google Sheets inspired) */
|
|
355
|
+
.nup-theme-default {
|
|
356
|
+
--nup-background: #ffffff;
|
|
357
|
+
--nup-foreground: #202124;
|
|
358
|
+
--nup-grid: #e0e0e0;
|
|
359
|
+
--nup-border: #dadce0;
|
|
360
|
+
--nup-cell-bg: #ffffff;
|
|
361
|
+
--nup-cell-hover: #f8f9fa;
|
|
362
|
+
--nup-header-bg: #f8f9fa;
|
|
363
|
+
--nup-header-fg: #5f6368;
|
|
364
|
+
--nup-header-selected-bg: #e8f0fe;
|
|
365
|
+
--nup-selection-border: #1a73e8;
|
|
366
|
+
--nup-selection-bg: rgba(26, 115, 232, 0.08);
|
|
367
|
+
--nup-frozen-border: #dadce0;
|
|
368
|
+
--nup-scrollbar-track: #f1f1f1;
|
|
369
|
+
--nup-scrollbar-thumb: #c1c1c1;
|
|
370
|
+
--nup-scrollbar-thumb-hover: #a8a8a8;
|
|
371
|
+
--nup-search-bg: #fff59d;
|
|
372
|
+
--nup-search-current-bg: #ffb300;
|
|
373
|
+
--nup-font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
374
|
+
--nup-font-size: 13px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* Theme: Excel Classic */
|
|
378
|
+
.nup-theme-excel {
|
|
379
|
+
--nup-background: #ffffff;
|
|
380
|
+
--nup-foreground: #000000;
|
|
381
|
+
--nup-grid: #d4d4d4;
|
|
382
|
+
--nup-border: #b4b4b4;
|
|
383
|
+
--nup-cell-bg: #ffffff;
|
|
384
|
+
--nup-cell-hover: #f0f0f0;
|
|
385
|
+
--nup-header-bg: #f0f0f0;
|
|
386
|
+
--nup-header-fg: #000000;
|
|
387
|
+
--nup-header-selected-bg: #cce4f7;
|
|
388
|
+
--nup-selection-border: #217346;
|
|
389
|
+
--nup-selection-bg: rgba(33, 115, 70, 0.1);
|
|
390
|
+
--nup-frozen-border: #9bc2e6;
|
|
391
|
+
--nup-scrollbar-track: #f0f0f0;
|
|
392
|
+
--nup-scrollbar-thumb: #c0c0c0;
|
|
393
|
+
--nup-scrollbar-thumb-hover: #a0a0a0;
|
|
394
|
+
--nup-search-bg: #ffff00;
|
|
395
|
+
--nup-search-current-bg: #ff9632;
|
|
396
|
+
--nup-font-family: 'Calibri', 'Segoe UI', sans-serif;
|
|
397
|
+
--nup-font-size: 11px;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/* Theme: Modern */
|
|
401
|
+
.nup-theme-modern {
|
|
402
|
+
--nup-background: #fafafa;
|
|
403
|
+
--nup-foreground: #18181b;
|
|
404
|
+
--nup-grid: #e4e4e7;
|
|
405
|
+
--nup-border: #d4d4d8;
|
|
406
|
+
--nup-cell-bg: #ffffff;
|
|
407
|
+
--nup-cell-hover: #f4f4f5;
|
|
408
|
+
--nup-header-bg: #f4f4f5;
|
|
409
|
+
--nup-header-fg: #71717a;
|
|
410
|
+
--nup-header-selected-bg: #dbeafe;
|
|
411
|
+
--nup-selection-border: #3b82f6;
|
|
412
|
+
--nup-selection-bg: rgba(59, 130, 246, 0.08);
|
|
413
|
+
--nup-frozen-border: #a1a1aa;
|
|
414
|
+
--nup-scrollbar-track: #f4f4f5;
|
|
415
|
+
--nup-scrollbar-thumb: #d4d4d8;
|
|
416
|
+
--nup-scrollbar-thumb-hover: #a1a1aa;
|
|
417
|
+
--nup-search-bg: #fef08a;
|
|
418
|
+
--nup-search-current-bg: #fbbf24;
|
|
419
|
+
--nup-font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
420
|
+
--nup-font-size: 13px;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/* Theme: Minimal */
|
|
424
|
+
.nup-theme-minimal {
|
|
425
|
+
--nup-background: #ffffff;
|
|
426
|
+
--nup-foreground: #27272a;
|
|
427
|
+
--nup-grid: #f4f4f5;
|
|
428
|
+
--nup-border: #e4e4e7;
|
|
429
|
+
--nup-cell-bg: #ffffff;
|
|
430
|
+
--nup-cell-hover: #fafafa;
|
|
431
|
+
--nup-header-bg: #ffffff;
|
|
432
|
+
--nup-header-fg: #a1a1aa;
|
|
433
|
+
--nup-header-selected-bg: #f4f4f5;
|
|
434
|
+
--nup-selection-border: #18181b;
|
|
435
|
+
--nup-selection-bg: rgba(24, 24, 27, 0.04);
|
|
436
|
+
--nup-frozen-border: #e4e4e7;
|
|
437
|
+
--nup-scrollbar-track: #ffffff;
|
|
438
|
+
--nup-scrollbar-thumb: #e4e4e7;
|
|
439
|
+
--nup-scrollbar-thumb-hover: #d4d4d8;
|
|
440
|
+
--nup-search-bg: #fef9c3;
|
|
441
|
+
--nup-search-current-bg: #fde047;
|
|
442
|
+
--nup-font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
443
|
+
--nup-font-size: 13px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/* === DARK THEMES === */
|
|
447
|
+
|
|
448
|
+
/* Theme: Dark */
|
|
449
|
+
.nup-theme-dark {
|
|
450
|
+
--nup-background: #1e1e1e;
|
|
451
|
+
--nup-foreground: #d4d4d4;
|
|
452
|
+
--nup-grid: #3c3c3c;
|
|
453
|
+
--nup-border: #4a4a4a;
|
|
454
|
+
--nup-cell-bg: #252526;
|
|
455
|
+
--nup-cell-hover: #2a2d2e;
|
|
456
|
+
--nup-header-bg: #252526;
|
|
457
|
+
--nup-header-fg: #858585;
|
|
458
|
+
--nup-header-selected-bg: #264f78;
|
|
459
|
+
--nup-selection-border: #0078d4;
|
|
460
|
+
--nup-selection-bg: rgba(0, 120, 212, 0.2);
|
|
461
|
+
--nup-frozen-border: #4a4a4a;
|
|
462
|
+
--nup-scrollbar-track: #1e1e1e;
|
|
463
|
+
--nup-scrollbar-thumb: #4a4a4a;
|
|
464
|
+
--nup-scrollbar-thumb-hover: #5a5a5a;
|
|
465
|
+
--nup-search-bg: #613a00;
|
|
466
|
+
--nup-search-current-bg: #a86400;
|
|
467
|
+
--nup-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
468
|
+
--nup-font-size: 13px;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* Theme: Midnight */
|
|
472
|
+
.nup-theme-midnight {
|
|
473
|
+
--nup-background: #0d1117;
|
|
474
|
+
--nup-foreground: #c9d1d9;
|
|
475
|
+
--nup-grid: #21262d;
|
|
476
|
+
--nup-border: #30363d;
|
|
477
|
+
--nup-cell-bg: #0d1117;
|
|
478
|
+
--nup-cell-hover: #161b22;
|
|
479
|
+
--nup-header-bg: #161b22;
|
|
480
|
+
--nup-header-fg: #8b949e;
|
|
481
|
+
--nup-header-selected-bg: #1f6feb33;
|
|
482
|
+
--nup-selection-border: #58a6ff;
|
|
483
|
+
--nup-selection-bg: rgba(88, 166, 255, 0.15);
|
|
484
|
+
--nup-frozen-border: #30363d;
|
|
485
|
+
--nup-scrollbar-track: #0d1117;
|
|
486
|
+
--nup-scrollbar-thumb: #30363d;
|
|
487
|
+
--nup-scrollbar-thumb-hover: #484f58;
|
|
488
|
+
--nup-search-bg: #634700;
|
|
489
|
+
--nup-search-current-bg: #9e6a00;
|
|
490
|
+
--nup-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
491
|
+
--nup-font-size: 13px;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/* === ACCESSIBLE THEME (WCAG AAA) === */
|
|
495
|
+
|
|
496
|
+
/* Theme: High Contrast */
|
|
497
|
+
.nup-theme-accessible {
|
|
498
|
+
--nup-background: #ffffff;
|
|
499
|
+
--nup-foreground: #000000;
|
|
500
|
+
--nup-grid: #000000;
|
|
501
|
+
--nup-border: #000000;
|
|
502
|
+
--nup-cell-bg: #ffffff;
|
|
503
|
+
--nup-cell-hover: #e6e6e6;
|
|
504
|
+
--nup-header-bg: #e6e6e6;
|
|
505
|
+
--nup-header-fg: #000000;
|
|
506
|
+
--nup-header-selected-bg: #0078d4;
|
|
507
|
+
--nup-selection-border: #0000ff;
|
|
508
|
+
--nup-selection-bg: rgba(0, 0, 255, 0.15);
|
|
509
|
+
--nup-frozen-border: #000000;
|
|
510
|
+
--nup-scrollbar-track: #e6e6e6;
|
|
511
|
+
--nup-scrollbar-thumb: #666666;
|
|
512
|
+
--nup-scrollbar-thumb-hover: #333333;
|
|
513
|
+
--nup-search-bg: #ffff00;
|
|
514
|
+
--nup-search-current-bg: #ff6600;
|
|
515
|
+
--nup-font-family: Arial, Helvetica, sans-serif;
|
|
516
|
+
--nup-font-size: 14px;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/* Accessible theme selected state overrides */
|
|
520
|
+
.nup-theme-accessible .nup-header-selected {
|
|
521
|
+
color: #ffffff;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* === COLORBLIND-FRIENDLY VARIANTS === */
|
|
525
|
+
|
|
526
|
+
/* Deuteranopia (red-green) */
|
|
527
|
+
.nup-colorblind-deuteranopia {
|
|
528
|
+
--nup-selection-border: #0077bb;
|
|
529
|
+
--nup-selection-bg: rgba(0, 119, 187, 0.12);
|
|
530
|
+
--nup-search-bg: #ddcc77;
|
|
531
|
+
--nup-search-current-bg: #cc6677;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/* Protanopia (red-green) */
|
|
535
|
+
.nup-colorblind-protanopia {
|
|
536
|
+
--nup-selection-border: #33bbee;
|
|
537
|
+
--nup-selection-bg: rgba(51, 187, 238, 0.12);
|
|
538
|
+
--nup-search-bg: #ee7733;
|
|
539
|
+
--nup-search-current-bg: #cc3311;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/* Tritanopia (blue-yellow) */
|
|
543
|
+
.nup-colorblind-tritanopia {
|
|
544
|
+
--nup-selection-border: #ee3377;
|
|
545
|
+
--nup-selection-bg: rgba(238, 51, 119, 0.12);
|
|
546
|
+
--nup-search-bg: #009988;
|
|
547
|
+
--nup-search-current-bg: #ee7733;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* @aspect/nup-xlsx-preview - Print Styles
|
|
551
|
+
* Optimized for printing spreadsheets
|
|
552
|
+
*/
|
|
553
|
+
|
|
554
|
+
@media print {
|
|
555
|
+
/* Reset colors for print */
|
|
556
|
+
.nup-spreadsheet,
|
|
557
|
+
.nup-spreadsheet * {
|
|
558
|
+
background: white !important;
|
|
559
|
+
color: black !important;
|
|
560
|
+
box-shadow: none !important;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/* Container */
|
|
564
|
+
.nup-spreadsheet {
|
|
565
|
+
position: static !important;
|
|
566
|
+
width: 100% !important;
|
|
567
|
+
height: auto !important;
|
|
568
|
+
max-height: none !important;
|
|
569
|
+
overflow: visible !important;
|
|
570
|
+
border: none !important;
|
|
571
|
+
border-radius: 0 !important;
|
|
572
|
+
page-break-inside: auto;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/* Scroll container - remove scrolling */
|
|
576
|
+
.nup-scroll-container {
|
|
577
|
+
position: static !important;
|
|
578
|
+
overflow: visible !important;
|
|
579
|
+
height: auto !important;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/* Content */
|
|
583
|
+
.nup-content {
|
|
584
|
+
position: static !important;
|
|
585
|
+
width: auto !important;
|
|
586
|
+
height: auto !important;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/* Cells - use table layout for print */
|
|
590
|
+
.nup-cell {
|
|
591
|
+
position: static !important;
|
|
592
|
+
display: table-cell !important;
|
|
593
|
+
border: 0.5pt solid #999999 !important;
|
|
594
|
+
padding: 3pt 5pt !important;
|
|
595
|
+
font-size: 9pt !important;
|
|
596
|
+
white-space: normal !important;
|
|
597
|
+
word-wrap: break-word !important;
|
|
598
|
+
page-break-inside: avoid;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/* Headers */
|
|
602
|
+
.nup-header {
|
|
603
|
+
display: table-cell !important;
|
|
604
|
+
position: static !important;
|
|
605
|
+
background: #f0f0f0 !important;
|
|
606
|
+
border: 0.5pt solid #999999 !important;
|
|
607
|
+
font-weight: bold !important;
|
|
608
|
+
font-size: 8pt !important;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/* Selection styling - hide for print */
|
|
612
|
+
.nup-selection-border,
|
|
613
|
+
.nup-cell-selected,
|
|
614
|
+
.nup-cell-search-result,
|
|
615
|
+
.nup-cell-search-current {
|
|
616
|
+
background: white !important;
|
|
617
|
+
border-color: #999999 !important;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.nup-selection-border {
|
|
621
|
+
display: none !important;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/* Hide UI elements */
|
|
625
|
+
.nup-sheet-tabs,
|
|
626
|
+
.nup-search-bar,
|
|
627
|
+
.nup-resize-handle,
|
|
628
|
+
.nup-frozen-line-row,
|
|
629
|
+
.nup-frozen-line-col,
|
|
630
|
+
.nup-loading {
|
|
631
|
+
display: none !important;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* Scrollbars */
|
|
635
|
+
.nup-scroll-container::-webkit-scrollbar {
|
|
636
|
+
display: none !important;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/* Page breaks */
|
|
640
|
+
.nup-print-page-break {
|
|
641
|
+
page-break-after: always;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/* Header rows repeat on each page */
|
|
645
|
+
.nup-print-header {
|
|
646
|
+
display: table-header-group !important;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/* Repeat column headers */
|
|
650
|
+
thead {
|
|
651
|
+
display: table-header-group;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/* Avoid orphan rows */
|
|
655
|
+
tr {
|
|
656
|
+
page-break-inside: avoid;
|
|
657
|
+
page-break-after: auto;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/* Print margins */
|
|
661
|
+
@page {
|
|
662
|
+
margin: 1cm;
|
|
663
|
+
size: A4 landscape;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/* First page */
|
|
667
|
+
@page :first {
|
|
668
|
+
margin-top: 1.5cm;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/* Left pages */
|
|
672
|
+
@page :left {
|
|
673
|
+
margin-left: 1.5cm;
|
|
674
|
+
margin-right: 1cm;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/* Right pages */
|
|
678
|
+
@page :right {
|
|
679
|
+
margin-left: 1cm;
|
|
680
|
+
margin-right: 1.5cm;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/* Grayscale print option */
|
|
684
|
+
.nup-print-grayscale {
|
|
685
|
+
filter: grayscale(100%);
|
|
686
|
+
-webkit-filter: grayscale(100%);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/* Compact print option */
|
|
690
|
+
.nup-print-compact .nup-cell {
|
|
691
|
+
padding: 1pt 3pt !important;
|
|
692
|
+
font-size: 8pt !important;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.nup-print-compact .nup-header {
|
|
696
|
+
font-size: 7pt !important;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/* Hide column/row headers for cleaner print */
|
|
700
|
+
.nup-print-no-headers .nup-header {
|
|
701
|
+
display: none !important;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.nup-print-no-headers .nup-corner {
|
|
705
|
+
display: none !important;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/* Grid lines option */
|
|
709
|
+
.nup-print-no-gridlines .nup-cell {
|
|
710
|
+
border: none !important;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.nup-print-no-gridlines .nup-header {
|
|
714
|
+
border: none !important;
|
|
715
|
+
border-bottom: 1pt solid #999999 !important;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/* Print preview styles (visible in normal view) */
|
|
720
|
+
.nup-print-preview {
|
|
721
|
+
background: white;
|
|
722
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
|
723
|
+
margin: 20px auto;
|
|
724
|
+
max-width: 297mm; /* A4 landscape width */
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.nup-print-preview .nup-spreadsheet {
|
|
728
|
+
border: none;
|
|
729
|
+
border-radius: 0;
|
|
730
|
+
}
|