@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.
@@ -0,0 +1,346 @@
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
+ }