report-studio 1.2.3 → 1.3.1
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 +254 -3
- package/dist/designer-_sWqzOj8.js +5052 -0
- package/dist/designer.js +1 -1
- package/dist/index.js +2 -2
- package/dist/react-designer.js +1 -1
- package/dist/react.js +1 -1
- package/dist/viewer-4I7C1Rnd.js +4083 -0
- package/package.json +2 -2
- package/src/designer/blank.js +0 -1
- package/src/designer/canvas.js +172 -54
- package/src/designer/choice.js +368 -0
- package/src/designer/designer.js +342 -12
- package/src/designer/dialog.js +634 -6
- package/src/designer/fields.js +345 -36
- package/src/designer/geometry.js +77 -4
- package/src/designer/grouping.js +556 -0
- package/src/designer/icons.js +22 -0
- package/src/designer/menu.js +50 -6
- package/src/designer/panel.js +872 -69
- package/src/designer/rulers.js +14 -6
- package/src/designer/sample-data.js +112 -31
- package/src/designer/select.js +24 -3
- package/src/designer/structure.js +126 -12
- package/src/designer/styles.css +2017 -732
- package/src/designer/tokens.js +38 -11
- package/src/engine/calculate.js +487 -0
- package/src/engine/csv.js +17 -9
- package/src/engine/format.js +483 -0
- package/src/engine/group.js +350 -70
- package/src/engine/highlight.js +224 -0
- package/src/engine/index.js +8 -1
- package/src/engine/measure.js +53 -26
- package/src/engine/paginate.js +189 -92
- package/src/engine/resolve.js +117 -10
- package/src/engine/rows.js +71 -8
- package/src/engine/search.js +12 -4
- package/src/engine/tables.js +309 -11
- package/src/engine/validate.js +304 -8
- package/src/engine/xlsx-style.js +50 -4
- package/src/engine/xlsx.js +91 -21
- package/src/index.js +18 -0
- package/src/preview/chrome.css +302 -84
- package/src/preview/chrome.js +70 -58
- package/src/preview/viewer.js +137 -85
- package/src/render/items.js +61 -10
- package/src/render/report.css +0 -5
- package/src/shared/dropdown.css +78 -45
- package/src/shared/dropdown.js +105 -5
- package/src/shared/modal.css +78 -13
- package/types/index.d.ts +104 -9
- package/types/layout.d.ts +164 -2
- package/dist/designer-DQlfKnTr.js +0 -3416
- package/dist/viewer-BSPNCNRU.js +0 -2912
package/src/preview/chrome.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The viewer's chrome: toolbar, pager, search field, export
|
|
2
|
+
* The viewer's chrome: toolbar, pager, search field, export menu, and how a
|
|
3
3
|
* page is presented on screen.
|
|
4
4
|
*
|
|
5
5
|
* Split out of styles.css because the viewer is opened from two places. The
|
|
@@ -39,13 +39,17 @@
|
|
|
39
39
|
* application embedding one in a panel beside its own chrome. They are laid out
|
|
40
40
|
* inside the mount now, so the viewer is a component rather than a screen.
|
|
41
41
|
*/
|
|
42
|
+
/**
|
|
43
|
+
* The ground is a shade darker than the paper, as a design tool's canvas is,
|
|
44
|
+
* so a white page reads as a sheet lying on it rather than as more of it.
|
|
45
|
+
*/
|
|
42
46
|
.report-viewer {
|
|
43
47
|
position: relative;
|
|
44
48
|
display: flex;
|
|
45
49
|
flex-direction: column;
|
|
46
50
|
height: 100%;
|
|
47
51
|
min-height: 0;
|
|
48
|
-
background: var(--
|
|
52
|
+
background: var(--surface-muted);
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
/* display: flex above outranks the browser's [hidden], so a hidden viewer would stay up */
|
|
@@ -105,9 +109,27 @@
|
|
|
105
109
|
display: block;
|
|
106
110
|
}
|
|
107
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Lifted off the canvas by a shadow rather than outlined by report.css's
|
|
114
|
+
* border - how a design tool shows a frame. The border stays in the box (as
|
|
115
|
+
* transparent) so the page measures what the engine paginated.
|
|
116
|
+
*/
|
|
117
|
+
.report-viewer .page {
|
|
118
|
+
border-color: transparent;
|
|
119
|
+
box-shadow:
|
|
120
|
+
0 0 0 1px rgba(34, 39, 44, .06),
|
|
121
|
+
0 2px 6px rgba(34, 39, 44, .06),
|
|
122
|
+
0 12px 32px rgba(34, 39, 44, .10);
|
|
123
|
+
}
|
|
124
|
+
|
|
108
125
|
|
|
109
126
|
/* ---------------- the floating pager ---------------- */
|
|
110
127
|
|
|
128
|
+
/**
|
|
129
|
+
* A floating toolbar, as a design tool's bottom bar is: paper, a hairline, a
|
|
130
|
+
* soft shadow, glyph buttons with no frame until pointed at, and the page box
|
|
131
|
+
* the grey box every field in the product is.
|
|
132
|
+
*/
|
|
111
133
|
.report-viewer .pager {
|
|
112
134
|
position: absolute;
|
|
113
135
|
left: 50%;
|
|
@@ -117,59 +139,75 @@
|
|
|
117
139
|
|
|
118
140
|
display: flex;
|
|
119
141
|
align-items: center;
|
|
120
|
-
gap:
|
|
121
|
-
height:
|
|
122
|
-
padding: 0
|
|
142
|
+
gap: 4px;
|
|
143
|
+
height: 44px;
|
|
144
|
+
padding: 0 6px;
|
|
123
145
|
|
|
124
146
|
background: var(--surface);
|
|
125
147
|
border: 1px solid var(--border);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
148
|
+
border-radius: 12px;
|
|
149
|
+
box-shadow:
|
|
150
|
+
0 2px 6px rgba(34, 39, 44, .06),
|
|
151
|
+
0 10px 28px rgba(34, 39, 44, .14);
|
|
129
152
|
|
|
130
153
|
font-family: "Instrument Sans", system-ui, sans-serif;
|
|
131
|
-
font-size:
|
|
154
|
+
font-size: 12px;
|
|
132
155
|
color: var(--ink);
|
|
133
156
|
}
|
|
134
157
|
|
|
135
158
|
.report-viewer .pager button {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
159
|
+
display: grid;
|
|
160
|
+
place-items: center;
|
|
161
|
+
width: 32px;
|
|
162
|
+
height: 32px;
|
|
163
|
+
padding: 0;
|
|
164
|
+
border: 0;
|
|
165
|
+
border-radius: 8px;
|
|
141
166
|
background: none;
|
|
142
167
|
color: var(--ink);
|
|
143
168
|
font: inherit;
|
|
144
|
-
font-size: 15px;
|
|
145
|
-
line-height: 1;
|
|
146
169
|
cursor: pointer;
|
|
147
170
|
}
|
|
148
171
|
|
|
149
172
|
.report-viewer .pager button:hover:not(:disabled) {
|
|
173
|
+
background: var(--surface-muted);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.report-viewer .pager button:active:not(:disabled) {
|
|
150
177
|
background: var(--accent-soft);
|
|
151
|
-
|
|
178
|
+
color: var(--accent-ink);
|
|
152
179
|
}
|
|
153
180
|
|
|
154
181
|
.report-viewer .pager button:disabled {
|
|
155
|
-
opacity: .
|
|
182
|
+
opacity: .35;
|
|
156
183
|
cursor: default;
|
|
157
184
|
}
|
|
158
185
|
|
|
159
186
|
.report-viewer .pager input {
|
|
160
187
|
height: 28px;
|
|
161
188
|
padding: 0 6px;
|
|
162
|
-
border: 1px solid
|
|
189
|
+
border: 1px solid transparent;
|
|
163
190
|
border-radius: 6px;
|
|
164
|
-
background: var(--surface);
|
|
191
|
+
background: var(--surface-muted);
|
|
165
192
|
color: var(--ink);
|
|
166
193
|
font: inherit;
|
|
194
|
+
font-variant-numeric: tabular-nums;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.report-viewer .pager input:hover {
|
|
198
|
+
border-color: var(--border);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.report-viewer .pager input:focus-visible {
|
|
202
|
+
outline: none;
|
|
203
|
+
border-color: var(--accent-strong);
|
|
204
|
+
box-shadow: inset 0 0 0 1px var(--accent-strong);
|
|
205
|
+
background: var(--surface);
|
|
167
206
|
}
|
|
168
207
|
|
|
169
|
-
.report-viewer .pager input:focus-visible,
|
|
170
208
|
.report-viewer .pager button:focus-visible {
|
|
171
209
|
outline: 2px solid var(--accent-strong);
|
|
172
|
-
outline-offset:
|
|
210
|
+
outline-offset: -2px;
|
|
173
211
|
}
|
|
174
212
|
|
|
175
213
|
|
|
@@ -187,13 +225,19 @@
|
|
|
187
225
|
background: var(--surface);
|
|
188
226
|
border-bottom: 1px solid var(--border);
|
|
189
227
|
font-family: "Instrument Sans", system-ui, sans-serif;
|
|
190
|
-
font-size:
|
|
228
|
+
font-size: 12px;
|
|
191
229
|
color: var(--ink);
|
|
192
230
|
z-index: 10;
|
|
193
231
|
}
|
|
194
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Laid out as a design tool's top bar: 48px, the name on the left, the tools
|
|
235
|
+
* for the thing being looked at in the middle, and what is done with it on
|
|
236
|
+
* the right - every button a glyph with no frame until pointed at, except the
|
|
237
|
+
* one that does the thing, which takes the accent.
|
|
238
|
+
*/
|
|
195
239
|
.report-viewer .toolbar-row {
|
|
196
|
-
height:
|
|
240
|
+
height: 48px;
|
|
197
241
|
|
|
198
242
|
/**
|
|
199
243
|
* Three columns, not a flex row: the outer two share the slack equally, so
|
|
@@ -204,13 +248,13 @@
|
|
|
204
248
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
205
249
|
align-items: center;
|
|
206
250
|
gap: 16px;
|
|
207
|
-
padding: 0 16px;
|
|
251
|
+
padding: 0 12px 0 16px;
|
|
208
252
|
}
|
|
209
253
|
|
|
210
254
|
.report-viewer .toolbar-group {
|
|
211
255
|
display: flex;
|
|
212
256
|
align-items: center;
|
|
213
|
-
gap:
|
|
257
|
+
gap: 4px;
|
|
214
258
|
}
|
|
215
259
|
|
|
216
260
|
/**
|
|
@@ -226,9 +270,9 @@
|
|
|
226
270
|
max-width: 100%;
|
|
227
271
|
overflow: hidden;
|
|
228
272
|
text-overflow: ellipsis;
|
|
229
|
-
font-size:
|
|
273
|
+
font-size: 13px;
|
|
230
274
|
font-weight: 600;
|
|
231
|
-
|
|
275
|
+
line-height: 20px;
|
|
232
276
|
color: var(--ink);
|
|
233
277
|
white-space: nowrap;
|
|
234
278
|
}
|
|
@@ -237,12 +281,17 @@
|
|
|
237
281
|
* The monogram, not the wordmark: the text beside it is the report's name
|
|
238
282
|
* rather than the product's, so the mark is the only thing saying whose viewer
|
|
239
283
|
* this is and it has to sit in a square beside a line of type.
|
|
284
|
+
*
|
|
285
|
+
* Inline-block, so it takes its size inside the block the ellipsis needs -
|
|
286
|
+
* as a plain inline box it had no width, and was never seen.
|
|
240
287
|
*/
|
|
241
288
|
.report-viewer .toolbar-brand::before {
|
|
242
289
|
content: "";
|
|
243
|
-
|
|
244
|
-
width:
|
|
245
|
-
height:
|
|
290
|
+
display: inline-block;
|
|
291
|
+
width: 20px;
|
|
292
|
+
height: 20px;
|
|
293
|
+
margin-right: 8px;
|
|
294
|
+
vertical-align: -5px;
|
|
246
295
|
|
|
247
296
|
background-image: var(--brand-icon);
|
|
248
297
|
background-repeat: no-repeat;
|
|
@@ -255,44 +304,57 @@
|
|
|
255
304
|
justify-self: center;
|
|
256
305
|
display: flex;
|
|
257
306
|
align-items: center;
|
|
258
|
-
gap:
|
|
307
|
+
gap: 8px;
|
|
259
308
|
}
|
|
260
309
|
|
|
261
310
|
.report-viewer .toolbar-save {
|
|
262
311
|
justify-self: end;
|
|
263
312
|
}
|
|
264
313
|
|
|
314
|
+
/* a glyph button: no frame, a grey ground when pointed at */
|
|
265
315
|
.report-viewer .toolbar button {
|
|
316
|
+
display: inline-flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
justify-content: center;
|
|
319
|
+
gap: 6px;
|
|
266
320
|
min-width: 32px;
|
|
267
321
|
height: 32px;
|
|
268
322
|
padding: 0 8px;
|
|
269
|
-
border: 1px solid
|
|
323
|
+
border: 1px solid transparent;
|
|
270
324
|
border-radius: 6px;
|
|
271
|
-
background:
|
|
325
|
+
background: none;
|
|
272
326
|
color: var(--ink);
|
|
273
327
|
font: inherit;
|
|
274
|
-
font-size:
|
|
328
|
+
font-size: 12px;
|
|
275
329
|
line-height: 1;
|
|
276
330
|
cursor: pointer;
|
|
277
331
|
}
|
|
278
332
|
|
|
279
333
|
.report-viewer .toolbar button:hover:not(:disabled) {
|
|
280
|
-
background: var(--
|
|
281
|
-
border-color: var(--accent);
|
|
334
|
+
background: var(--surface-muted);
|
|
282
335
|
}
|
|
283
336
|
|
|
284
337
|
.report-viewer .toolbar button:disabled {
|
|
285
|
-
opacity: .
|
|
338
|
+
opacity: .35;
|
|
286
339
|
cursor: default;
|
|
287
340
|
}
|
|
288
341
|
|
|
342
|
+
.report-viewer .toolbar-save {
|
|
343
|
+
gap: 6px;
|
|
344
|
+
}
|
|
345
|
+
|
|
289
346
|
.report-viewer .toolbar-save button {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
font-size: 12px;
|
|
347
|
+
padding: 0 12px;
|
|
348
|
+
font-weight: 500;
|
|
293
349
|
white-space: nowrap;
|
|
294
350
|
}
|
|
295
351
|
|
|
352
|
+
/* Print: its glyph and its name, the glyph a shade quieter */
|
|
353
|
+
.report-viewer .toolbar-save [data-role="print"] svg {
|
|
354
|
+
margin-left: -2px;
|
|
355
|
+
color: var(--ink-soft);
|
|
356
|
+
}
|
|
357
|
+
|
|
296
358
|
/**
|
|
297
359
|
* Export is the primary action and carries the accent; Print sits beside it as
|
|
298
360
|
* an ordinary button. Two accent fills next to each other would leave neither
|
|
@@ -315,7 +377,50 @@
|
|
|
315
377
|
/* the accent alone is 2:1 on this surface - the ring uses the darker mix */
|
|
316
378
|
.report-viewer .toolbar button:focus-visible {
|
|
317
379
|
outline: 2px solid var(--accent-strong);
|
|
318
|
-
outline-offset:
|
|
380
|
+
outline-offset: -2px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Zoom is one control in a grey track - minus, the level, plus - as a design
|
|
385
|
+
* tool groups it, rather than three boxes side by side.
|
|
386
|
+
*/
|
|
387
|
+
.report-viewer .toolbar-zoom {
|
|
388
|
+
gap: 0;
|
|
389
|
+
height: 32px;
|
|
390
|
+
padding: 2px;
|
|
391
|
+
border-radius: 6px;
|
|
392
|
+
background: var(--surface-muted);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.report-viewer .toolbar-zoom > button {
|
|
396
|
+
min-width: 28px;
|
|
397
|
+
height: 28px;
|
|
398
|
+
padding: 0;
|
|
399
|
+
color: var(--ink-soft);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.report-viewer .toolbar-zoom > button:hover:not(:disabled) {
|
|
403
|
+
background: var(--border);
|
|
404
|
+
color: var(--ink);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.report-viewer .toolbar-zoom .dropdown-trigger {
|
|
408
|
+
min-width: 76px;
|
|
409
|
+
height: 28px;
|
|
410
|
+
padding: 0 8px;
|
|
411
|
+
border-color: transparent;
|
|
412
|
+
background: transparent;
|
|
413
|
+
font-size: 12px;
|
|
414
|
+
font-weight: 500;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.report-viewer .toolbar-zoom .dropdown-trigger:hover {
|
|
418
|
+
border-color: transparent;
|
|
419
|
+
background: var(--border);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.report-viewer .toolbar-zoom .dropdown-trigger[aria-expanded="true"] {
|
|
423
|
+
background: var(--surface);
|
|
319
424
|
}
|
|
320
425
|
|
|
321
426
|
.report-viewer .page-of {
|
|
@@ -344,24 +449,31 @@
|
|
|
344
449
|
}
|
|
345
450
|
|
|
346
451
|
/**
|
|
347
|
-
* The field is the control: it carries the
|
|
452
|
+
* The field is the control: it carries the ground, the outline and the focus
|
|
348
453
|
* ring, so the count and the match arrows sit inside the box with the text.
|
|
454
|
+
* A grey box like every field in the product, with a magnifier drawn into it -
|
|
455
|
+
* drawn, not an element, so the field holds only what it is tested to hold.
|
|
349
456
|
*/
|
|
350
457
|
.report-viewer .search-field {
|
|
351
458
|
display: flex;
|
|
352
459
|
align-items: center;
|
|
353
460
|
gap: 2px;
|
|
354
|
-
width: min(
|
|
461
|
+
width: min(360px, 40vw);
|
|
355
462
|
height: 32px;
|
|
356
|
-
padding: 0 4px 0
|
|
357
|
-
border: 1px solid
|
|
463
|
+
padding: 0 4px 0 32px;
|
|
464
|
+
border: 1px solid transparent;
|
|
358
465
|
border-radius: 6px;
|
|
359
|
-
background: var(--surface);
|
|
466
|
+
background: var(--surface-muted) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.25' fill='none' stroke='%23667080' stroke-width='1.5'/%3E%3Cpath d='M10.25 10.25 13.5 13.5' stroke='%23667080' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center / 14px 14px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.report-viewer .search-field:hover {
|
|
470
|
+
border-color: var(--border);
|
|
360
471
|
}
|
|
361
472
|
|
|
362
473
|
.report-viewer .search-field:focus-within {
|
|
363
|
-
|
|
364
|
-
|
|
474
|
+
border-color: var(--accent-strong);
|
|
475
|
+
box-shadow: inset 0 0 0 1px var(--accent-strong);
|
|
476
|
+
background-color: var(--surface);
|
|
365
477
|
}
|
|
366
478
|
|
|
367
479
|
.report-viewer .search-field input[type="search"] {
|
|
@@ -375,6 +487,10 @@
|
|
|
375
487
|
font: inherit;
|
|
376
488
|
}
|
|
377
489
|
|
|
490
|
+
.report-viewer .search-field input[type="search"]::placeholder {
|
|
491
|
+
color: var(--ink-soft);
|
|
492
|
+
}
|
|
493
|
+
|
|
378
494
|
/* the wrapper shows the ring, so the input must not draw a second one */
|
|
379
495
|
.report-viewer .search-field input[type="search"]:focus,
|
|
380
496
|
.report-viewer .search-field input[type="search"]:focus-visible {
|
|
@@ -390,17 +506,18 @@
|
|
|
390
506
|
border: none;
|
|
391
507
|
border-radius: 4px;
|
|
392
508
|
background: none;
|
|
393
|
-
|
|
509
|
+
color: var(--ink-soft);
|
|
394
510
|
}
|
|
395
511
|
|
|
396
512
|
.report-viewer .search-field button:hover:not(:disabled) {
|
|
397
|
-
background: var(--
|
|
513
|
+
background: var(--border);
|
|
514
|
+
color: var(--ink);
|
|
398
515
|
}
|
|
399
516
|
|
|
400
517
|
.report-viewer .hits {
|
|
401
518
|
flex: none;
|
|
402
519
|
min-width: 62px;
|
|
403
|
-
padding-right:
|
|
520
|
+
padding-right: 4px;
|
|
404
521
|
text-align: right;
|
|
405
522
|
font-size: 11px;
|
|
406
523
|
color: var(--ink-soft);
|
|
@@ -418,16 +535,23 @@
|
|
|
418
535
|
/**
|
|
419
536
|
* Two levels: every hit on the page is tinted, the one you are standing on
|
|
420
537
|
* takes the accent outright. accent-soft is too close to the paper to see.
|
|
538
|
+
*
|
|
539
|
+
* No padding: a mark sits inside a line the engine measured, and padding made
|
|
540
|
+
* it taller and wider than the words it covers - in a table cell, enough to
|
|
541
|
+
* push the rest of the text onto a line the cell has no room for. The ring is
|
|
542
|
+
* a shadow instead, which takes no room.
|
|
421
543
|
*/
|
|
422
544
|
.report-viewer mark.hit {
|
|
545
|
+
padding: 0;
|
|
546
|
+
border-radius: 2px;
|
|
423
547
|
background: var(--accent-tint);
|
|
548
|
+
box-shadow: 0 0 0 1px var(--accent-tint);
|
|
424
549
|
color: inherit;
|
|
425
|
-
padding: 5px;
|
|
426
550
|
}
|
|
427
551
|
|
|
428
552
|
.report-viewer mark.hit.is-focused {
|
|
429
553
|
background: var(--accent);
|
|
430
|
-
|
|
554
|
+
box-shadow: 0 0 0 1px var(--accent), 0 0 0 2px var(--accent-ink);
|
|
431
555
|
}
|
|
432
556
|
|
|
433
557
|
/**
|
|
@@ -470,6 +594,10 @@
|
|
|
470
594
|
.report-viewer .search-field {
|
|
471
595
|
width: 100%;
|
|
472
596
|
}
|
|
597
|
+
|
|
598
|
+
.report-viewer .toolbar-save [data-role="print"] span {
|
|
599
|
+
display: none;
|
|
600
|
+
}
|
|
473
601
|
}
|
|
474
602
|
|
|
475
603
|
@media print {
|
|
@@ -486,6 +614,7 @@
|
|
|
486
614
|
.report-viewer .page {
|
|
487
615
|
display: block;
|
|
488
616
|
border: none;
|
|
617
|
+
box-shadow: none;
|
|
489
618
|
transform: none;
|
|
490
619
|
|
|
491
620
|
/**
|
|
@@ -506,63 +635,152 @@
|
|
|
506
635
|
}
|
|
507
636
|
}
|
|
508
637
|
|
|
509
|
-
/* ---------------- export
|
|
638
|
+
/* ---------------- the export menu ---------------- */
|
|
510
639
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
640
|
+
/**
|
|
641
|
+
* Export opens a menu under itself rather than a dialog over the report: the
|
|
642
|
+
* format is the only thing to decide, so it is decided in one click, where the
|
|
643
|
+
* button is. Drawn as every list in the product is (shared/dropdown.css) -
|
|
644
|
+
* paper, a hairline, the accent on the item under the pointer or the keys -
|
|
645
|
+
* and laid out as a design tool's export menu: a heading, then a row per
|
|
646
|
+
* format with what it will make underneath its name.
|
|
647
|
+
*/
|
|
648
|
+
.report-viewer .export-menu {
|
|
649
|
+
position: relative;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/* the chevron says the button opens something, and turns while it is open */
|
|
653
|
+
.report-viewer .toolbar-save [data-role="export"] svg {
|
|
654
|
+
margin-right: -4px;
|
|
655
|
+
transition: transform .12s ease;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.report-viewer .toolbar-save [data-role="export"][aria-expanded="true"] svg {
|
|
659
|
+
transform: rotate(180deg);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
@media (prefers-reduced-motion: reduce) {
|
|
663
|
+
.report-viewer .toolbar-save [data-role="export"] svg {
|
|
664
|
+
transition: none;
|
|
665
|
+
}
|
|
516
666
|
}
|
|
517
667
|
|
|
518
|
-
|
|
668
|
+
/* under the button, its right edge on the button's, since it sits at the bar's end */
|
|
669
|
+
.report-viewer .export-list {
|
|
670
|
+
position: absolute;
|
|
671
|
+
top: calc(100% + 6px);
|
|
672
|
+
right: 0;
|
|
673
|
+
z-index: 30;
|
|
674
|
+
|
|
519
675
|
display: flex;
|
|
520
|
-
|
|
521
|
-
gap:
|
|
522
|
-
|
|
676
|
+
flex-direction: column;
|
|
677
|
+
gap: 2px;
|
|
678
|
+
width: 300px;
|
|
679
|
+
max-width: calc(100vw - 24px);
|
|
680
|
+
padding: 4px;
|
|
681
|
+
|
|
523
682
|
border: 1px solid var(--border);
|
|
524
|
-
border-radius:
|
|
525
|
-
|
|
683
|
+
border-radius: 10px;
|
|
684
|
+
background: var(--surface);
|
|
685
|
+
box-shadow:
|
|
686
|
+
0 2px 6px rgba(34, 39, 44, .06),
|
|
687
|
+
0 12px 32px rgba(34, 39, 44, .16);
|
|
526
688
|
}
|
|
527
689
|
|
|
528
|
-
.report-viewer .
|
|
529
|
-
|
|
530
|
-
background: var(--accent-soft);
|
|
690
|
+
.report-viewer .export-list[hidden] {
|
|
691
|
+
display: none;
|
|
531
692
|
}
|
|
532
693
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
694
|
+
.report-viewer .export-heading {
|
|
695
|
+
padding: 6px 8px 4px;
|
|
696
|
+
color: var(--ink-soft);
|
|
697
|
+
font-size: 11px;
|
|
537
698
|
}
|
|
538
699
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
700
|
+
/* a format: its file glyph, its name over what it makes, and its shortcut */
|
|
701
|
+
.report-viewer .export-list .format {
|
|
702
|
+
display: flex;
|
|
703
|
+
align-items: center;
|
|
704
|
+
gap: 10px;
|
|
705
|
+
width: 100%;
|
|
706
|
+
min-width: 0;
|
|
707
|
+
height: auto;
|
|
708
|
+
padding: 8px;
|
|
709
|
+
border: 0;
|
|
710
|
+
border-radius: 6px;
|
|
711
|
+
background: none;
|
|
712
|
+
color: var(--ink);
|
|
713
|
+
font: inherit;
|
|
714
|
+
line-height: 1.3;
|
|
715
|
+
text-align: left;
|
|
716
|
+
cursor: pointer;
|
|
542
717
|
}
|
|
543
718
|
|
|
544
|
-
.report-viewer .
|
|
545
|
-
|
|
546
|
-
|
|
719
|
+
.report-viewer .export-list .format:hover:not(:disabled),
|
|
720
|
+
.report-viewer .export-list .format:focus-visible {
|
|
721
|
+
outline: none;
|
|
722
|
+
background: var(--accent);
|
|
723
|
+
color: var(--ink);
|
|
547
724
|
}
|
|
548
725
|
|
|
549
|
-
.report-viewer .format
|
|
550
|
-
|
|
551
|
-
|
|
726
|
+
.report-viewer .format-icon {
|
|
727
|
+
display: grid;
|
|
728
|
+
place-items: center;
|
|
729
|
+
flex: none;
|
|
730
|
+
width: 32px;
|
|
731
|
+
height: 32px;
|
|
732
|
+
border-radius: 6px;
|
|
733
|
+
background: var(--surface-muted);
|
|
734
|
+
color: var(--ink-soft);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/* on the accent, the glyph's tile turns to paper so it still reads as a tile */
|
|
738
|
+
.report-viewer .export-list .format:hover:not(:disabled) .format-icon,
|
|
739
|
+
.report-viewer .export-list .format:focus-visible .format-icon {
|
|
740
|
+
background: var(--surface);
|
|
741
|
+
color: var(--ink);
|
|
552
742
|
}
|
|
553
743
|
|
|
554
744
|
.report-viewer .format-body {
|
|
555
745
|
display: flex;
|
|
746
|
+
flex: 1;
|
|
556
747
|
flex-direction: column;
|
|
557
748
|
gap: 2px;
|
|
749
|
+
min-width: 0;
|
|
558
750
|
}
|
|
559
751
|
|
|
560
752
|
.report-viewer .format-name {
|
|
561
|
-
font-size:
|
|
753
|
+
font-size: 12px;
|
|
562
754
|
font-weight: 600;
|
|
563
755
|
}
|
|
564
756
|
|
|
565
757
|
.report-viewer .format-note {
|
|
566
|
-
|
|
758
|
+
overflow: hidden;
|
|
759
|
+
font-size: 11px;
|
|
760
|
+
color: var(--ink-soft);
|
|
761
|
+
text-overflow: ellipsis;
|
|
762
|
+
white-space: nowrap;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.report-viewer .export-list .format:hover:not(:disabled) .format-note,
|
|
766
|
+
.report-viewer .export-list .format:focus-visible .format-note {
|
|
767
|
+
color: var(--ink);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.report-viewer .format-keys {
|
|
771
|
+
flex: none;
|
|
567
772
|
color: var(--ink-soft);
|
|
773
|
+
font-family: inherit;
|
|
774
|
+
font-size: 11px;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.report-viewer .export-list .format:hover:not(:disabled) .format-keys,
|
|
778
|
+
.report-viewer .export-list .format:focus-visible .format-keys {
|
|
779
|
+
color: var(--ink);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/* a format with nothing to write: listed, so its absence is explained, but plainly off */
|
|
783
|
+
.report-viewer .export-list .format.is-unavailable {
|
|
784
|
+
opacity: .5;
|
|
785
|
+
cursor: not-allowed;
|
|
568
786
|
}
|