@nysds/playground 0.1.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 +25 -0
- package/README.md +364 -0
- package/bin/cli.mjs +223 -0
- package/bin/cli.test.mjs +36 -0
- package/decks/customizing-components.json +97 -0
- package/dist/assets/index-LO1tomgR.css +6 -0
- package/dist/assets/index-bBtGCGL_.js +5190 -0
- package/dist/assets/internal/typescript.js +193739 -0
- package/dist/assets/nys-icon.library-Bi_7DKlD-YSs5zqZy-DXISxj9N.js +609 -0
- package/dist/assets/nys-icon.library-CwuPZJAc-TryaOS7Z.js +600 -0
- package/dist/assets/playground-typescript-worker-BcTrPYfY.js +87 -0
- package/dist/assets/playground-typescript-worker.js +87 -0
- package/dist/favicon.svg +10 -0
- package/dist/index.html +769 -0
- package/dist/nysds-logo.svg +21 -0
- package/dist/nysds-symbol.svg +7 -0
- package/index.html +768 -0
- package/package.json +59 -0
- package/presets/00-welcome.json +8 -0
- package/presets/01-button.json +7 -0
- package/presets/02-alert.json +7 -0
- package/presets/03-badge-and-avatar.json +7 -0
- package/presets/04-text-input.json +7 -0
- package/presets/05-select-radio-checkbox.json +7 -0
- package/presets/06-form-validation.json +7 -0
- package/presets/07-card.json +7 -0
- package/presets/08-accordion.json +7 -0
- package/presets/09-tabs.json +7 -0
- package/presets/10-modal.json +7 -0
- package/presets/11-stepper.json +7 -0
- package/presets/12-table-and-pagination.json +7 -0
- package/presets/13-tooltip-and-dropdown.json +7 -0
- package/presets/14-navigation.json +7 -0
- package/presets/15-page-structure.json +7 -0
- package/presets/16-themes.json +7 -0
- package/presets/17-utility-classes.json +7 -0
- package/presets/README.md +118 -0
- package/public/favicon.svg +10 -0
- package/public/nysds-logo.svg +21 -0
- package/public/nysds-symbol.svg +7 -0
- package/src/app.css +1087 -0
- package/src/debounce.ts +86 -0
- package/src/deck-model.ts +299 -0
- package/src/deck-store.ts +144 -0
- package/src/decks.test.ts +288 -0
- package/src/editor-panes.ts +190 -0
- package/src/editors.ts +92 -0
- package/src/home.ts +225 -0
- package/src/icon-names.ts +117 -0
- package/src/icons.test.ts +58 -0
- package/src/keys.ts +162 -0
- package/src/main.ts +1456 -0
- package/src/playground.config.ts +74 -0
- package/src/playground.ts +261 -0
- package/src/present.ts +398 -0
- package/src/preset-schema.ts +228 -0
- package/src/route.test.ts +56 -0
- package/src/routing.ts +60 -0
- package/src/settings.ts +211 -0
- package/src/starters.ts +86 -0
- package/src/state.test.ts +544 -0
- package/src/state.ts +237 -0
- package/src/theme.ts +82 -0
- package/src/version-catalog.ts +42 -0
- package/src/versions.ts +88 -0
- package/src/wrapper.ts +84 -0
- package/tsconfig.json +25 -0
- package/vite.config.ts +62 -0
package/src/app.css
ADDED
|
@@ -0,0 +1,1087 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shell styling for the playground.
|
|
3
|
+
*
|
|
4
|
+
* The design system supplies the reset, the type scale, and the color
|
|
5
|
+
* variables. Everything here covers the split-pane layout, the presentation
|
|
6
|
+
* chrome, and the playground editor theming, which the design system does not
|
|
7
|
+
* ship.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--pg-toolbar-height: auto;
|
|
12
|
+
--pg-divider-width: 10px;
|
|
13
|
+
--pg-surface: var(--nys-color-ink-reverse, #ffffff);
|
|
14
|
+
--pg-border: var(--nys-color-neutral-100, #d0d0ce);
|
|
15
|
+
--pg-muted: var(--nys-color-text-weaker, #62666a);
|
|
16
|
+
--pg-editor-surface: var(--nys-color-ink-reverse, #ffffff);
|
|
17
|
+
--pg-editor-border: var(--nys-color-neutral-100, #d0d0ce);
|
|
18
|
+
--pg-editor-label: var(--nys-color-text-weaker, #62666a);
|
|
19
|
+
--pg-editor-label-strong: var(--nys-color-text, #1b1b1b);
|
|
20
|
+
--pg-column-strip-width: 32px;
|
|
21
|
+
|
|
22
|
+
/* Playground editor theming. Larger than the default so code reads from
|
|
23
|
+
the back of a room. */
|
|
24
|
+
--playground-code-font-size: 15px;
|
|
25
|
+
--playground-code-line-height: 1.55;
|
|
26
|
+
--playground-code-font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
|
|
27
|
+
"Liberation Mono", monospace;
|
|
28
|
+
--playground-code-padding: 12px 8px;
|
|
29
|
+
--playground-preview-width: 100%;
|
|
30
|
+
--playground-bar-height: 40px;
|
|
31
|
+
--playground-tab-bar-font-size: 14px;
|
|
32
|
+
--playground-tab-bar-background: var(--pg-surface);
|
|
33
|
+
--playground-tab-bar-active-color: var(--nys-color-theme, #154973);
|
|
34
|
+
--playground-tab-bar-indicator-color: var(--nys-color-theme, #154973);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Dark editor theme. Only the editor pane changes: the preview keeps showing
|
|
38
|
+
the design system as it is, and the caption bar keeps the theme color. */
|
|
39
|
+
body[data-editor-theme="dark"] {
|
|
40
|
+
--pg-editor-surface: #212121;
|
|
41
|
+
--pg-editor-border: #3a3a3a;
|
|
42
|
+
--pg-editor-label: #a8a8a8;
|
|
43
|
+
--pg-editor-label-strong: #ffffff;
|
|
44
|
+
--playground-tab-bar-background: var(--pg-editor-surface);
|
|
45
|
+
--playground-tab-bar-foreground-color: #d0d0ce;
|
|
46
|
+
--playground-tab-bar-active-color: #ffffff;
|
|
47
|
+
--playground-tab-bar-indicator-color: #82aaff;
|
|
48
|
+
--playground-code-font-size: 15px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
body[data-editor-theme="dark"] .split__pane--editors {
|
|
52
|
+
background: var(--pg-editor-surface);
|
|
53
|
+
border-color: var(--pg-editor-border);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
body[data-editor-theme="dark"] .editors__tabs {
|
|
57
|
+
border-bottom-color: var(--pg-editor-border);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
body[data-editor-theme="dark"] .split__divider {
|
|
61
|
+
background: var(--pg-editor-border);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
html,
|
|
65
|
+
body {
|
|
66
|
+
height: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
body {
|
|
70
|
+
margin: 0;
|
|
71
|
+
background: var(--pg-surface);
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.app {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
height: 100vh;
|
|
79
|
+
height: 100dvh;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Home ----------------------------------------------------------------- */
|
|
83
|
+
|
|
84
|
+
/* A raised surface behind the home page so the white deck cards stand out. */
|
|
85
|
+
.app:has(> .home:not([hidden])) {
|
|
86
|
+
background: var(--nys-color-surface-raised, #f6f6f6);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.home {
|
|
90
|
+
flex: 1 1 auto;
|
|
91
|
+
width: min(1100px, 100%);
|
|
92
|
+
margin-inline: auto;
|
|
93
|
+
padding: 32px 24px 64px;
|
|
94
|
+
overflow-y: auto;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.home[hidden] {
|
|
98
|
+
display: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.app--home .toolbar,
|
|
102
|
+
.app--home .split,
|
|
103
|
+
.app--home .caption,
|
|
104
|
+
.app--home .preview__build {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.home__header {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: space-between;
|
|
112
|
+
gap: 16px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.home__title {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex: 1 1 auto;
|
|
118
|
+
min-width: 0;
|
|
119
|
+
align-items: center;
|
|
120
|
+
gap: 16px;
|
|
121
|
+
margin: 0;
|
|
122
|
+
font-size: 2.5rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* The logo's intrinsic size is 1037x114; scale it by height so the
|
|
126
|
+
wordmark lines up with the "Playground" text beside it. */
|
|
127
|
+
.home__logo {
|
|
128
|
+
display: block;
|
|
129
|
+
width: auto;
|
|
130
|
+
max-width: 100%;
|
|
131
|
+
height: 48px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.home__title-text {
|
|
135
|
+
padding-left: 16px;
|
|
136
|
+
border-left: 2px solid var(--nys-color-neutral-300, #b1b3b5);
|
|
137
|
+
font-size: 1.5rem;
|
|
138
|
+
font-weight: 400;
|
|
139
|
+
letter-spacing: 0.08em;
|
|
140
|
+
text-transform: uppercase;
|
|
141
|
+
color: var(--pg-muted);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* On a phone the wordmark and "Playground" no longer fit beside the settings
|
|
145
|
+
button on one line, so stack them and drop the divider. */
|
|
146
|
+
@media (max-width: 640px) {
|
|
147
|
+
.home {
|
|
148
|
+
padding-inline: 16px;
|
|
149
|
+
}
|
|
150
|
+
.home__title {
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
align-items: flex-start;
|
|
153
|
+
gap: 4px;
|
|
154
|
+
}
|
|
155
|
+
.home__logo {
|
|
156
|
+
width: min(100%, 320px);
|
|
157
|
+
height: auto;
|
|
158
|
+
}
|
|
159
|
+
.home__title-text {
|
|
160
|
+
padding-left: 0;
|
|
161
|
+
border-left: 0;
|
|
162
|
+
font-size: 0.875rem;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.home__lede {
|
|
167
|
+
margin: 16px 0 24px;
|
|
168
|
+
max-width: 60ch;
|
|
169
|
+
color: var(--pg-muted);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.home__actions {
|
|
173
|
+
margin-bottom: 32px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.home__decks {
|
|
177
|
+
--nys-card-height: 100%;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.home__empty {
|
|
181
|
+
margin: 0;
|
|
182
|
+
color: var(--pg-muted);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.home__footer {
|
|
186
|
+
margin-top: 32px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* The title is a link to the present view, so it is rendered in the card's
|
|
190
|
+
default slot rather than through the plain-text `heading` property. */
|
|
191
|
+
.deck-card__title {
|
|
192
|
+
margin: 0;
|
|
193
|
+
font-family: var(--nys-font-family-heading);
|
|
194
|
+
font-size: var(--nys-font-size-h4, 1.25rem);
|
|
195
|
+
line-height: var(--nys-font-lineheight-h4, 1.3);
|
|
196
|
+
font-weight: var(--nys-font-weight-bold, 700);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.deck-card__title a {
|
|
200
|
+
color: var(--nys-color-text);
|
|
201
|
+
text-decoration: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.deck-card__title a:hover {
|
|
205
|
+
text-decoration: underline;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.deck-card__title a:focus-visible {
|
|
209
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
210
|
+
outline-offset: 2px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.deck-card__meta {
|
|
214
|
+
margin: 4px 0 0;
|
|
215
|
+
color: var(--pg-muted);
|
|
216
|
+
font-size: 0.9375rem;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.deck-card__description {
|
|
220
|
+
margin: 8px 0 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.deck-card__actions {
|
|
224
|
+
display: flex;
|
|
225
|
+
flex-wrap: wrap;
|
|
226
|
+
align-items: center;
|
|
227
|
+
gap: 8px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.deck-card__play {
|
|
231
|
+
width: 24px;
|
|
232
|
+
height: 24px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.home--dragging {
|
|
236
|
+
outline: 3px dashed var(--nys-color-theme, #154973);
|
|
237
|
+
outline-offset: -12px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Deck not found ------------------------------------------------------- */
|
|
241
|
+
|
|
242
|
+
.deck-missing {
|
|
243
|
+
width: min(680px, 100%);
|
|
244
|
+
margin: 48px auto;
|
|
245
|
+
padding-inline: 24px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.deck-missing[hidden] {
|
|
249
|
+
display: none;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.deck-missing nys-button {
|
|
253
|
+
margin-top: 16px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.app--missing .toolbar,
|
|
257
|
+
.app--missing .split,
|
|
258
|
+
.app--missing .caption,
|
|
259
|
+
.app--missing .preview__build {
|
|
260
|
+
display: none;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* Toolbar -------------------------------------------------------------- */
|
|
264
|
+
|
|
265
|
+
/*
|
|
266
|
+
* One compact row: the mark and the deck on the left, a spacer, then the
|
|
267
|
+
* version and the actions as circle buttons, matching the slide bar and the
|
|
268
|
+
* deck cards.
|
|
269
|
+
*/
|
|
270
|
+
.toolbar {
|
|
271
|
+
display: flex;
|
|
272
|
+
flex-wrap: wrap;
|
|
273
|
+
align-items: center;
|
|
274
|
+
gap: 8px;
|
|
275
|
+
min-height: 56px;
|
|
276
|
+
padding: 8px 16px;
|
|
277
|
+
border-bottom: 1px solid var(--pg-border);
|
|
278
|
+
background: var(--pg-surface);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.toolbar__home {
|
|
282
|
+
display: inline-flex;
|
|
283
|
+
flex: 0 0 auto;
|
|
284
|
+
align-items: center;
|
|
285
|
+
justify-content: center;
|
|
286
|
+
width: 32px;
|
|
287
|
+
height: 32px;
|
|
288
|
+
color: var(--nys-color-theme, #154973);
|
|
289
|
+
border-radius: 4px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.toolbar__home:focus-visible {
|
|
293
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
294
|
+
outline-offset: 2px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.toolbar__mark {
|
|
298
|
+
width: 100%;
|
|
299
|
+
height: 100%;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.toolbar__spacer {
|
|
303
|
+
flex: 1 1 auto;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.toolbar__title {
|
|
307
|
+
margin: 0;
|
|
308
|
+
max-width: 40%;
|
|
309
|
+
overflow: hidden;
|
|
310
|
+
font-size: 1.125rem;
|
|
311
|
+
font-weight: var(--nys-font-weight-bold, 700);
|
|
312
|
+
line-height: 1.2;
|
|
313
|
+
text-overflow: ellipsis;
|
|
314
|
+
white-space: nowrap;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* The title is the rename control: plain text until you reach for it. */
|
|
318
|
+
.toolbar__rename {
|
|
319
|
+
display: inline-flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
gap: 6px;
|
|
322
|
+
padding: 4px 6px;
|
|
323
|
+
border: none;
|
|
324
|
+
border-radius: 4px;
|
|
325
|
+
background: none;
|
|
326
|
+
color: inherit;
|
|
327
|
+
font-family: inherit;
|
|
328
|
+
cursor: text;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.toolbar__rename:hover,
|
|
332
|
+
.toolbar__rename:focus-visible {
|
|
333
|
+
box-shadow: inset 0 -2px 0 var(--nys-color-theme, #154973);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.toolbar__rename:focus-visible {
|
|
337
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
338
|
+
outline-offset: 1px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.toolbar__rename > span {
|
|
342
|
+
overflow: hidden;
|
|
343
|
+
text-overflow: ellipsis;
|
|
344
|
+
white-space: nowrap;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.toolbar__rename-icon {
|
|
348
|
+
flex: 0 0 auto;
|
|
349
|
+
opacity: 0;
|
|
350
|
+
transition: opacity 120ms ease;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.toolbar__rename:hover .toolbar__rename-icon,
|
|
354
|
+
.toolbar__rename:focus-visible .toolbar__rename-icon {
|
|
355
|
+
opacity: 0.7;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.toolbar__rename-input {
|
|
359
|
+
width: 28ch;
|
|
360
|
+
max-width: 40%;
|
|
361
|
+
padding: 4px 6px;
|
|
362
|
+
border: 1px solid var(--nys-color-theme, #154973);
|
|
363
|
+
border-radius: 4px;
|
|
364
|
+
background: var(--pg-surface);
|
|
365
|
+
color: var(--nys-color-text);
|
|
366
|
+
font-family: inherit;
|
|
367
|
+
font-size: 1.125rem;
|
|
368
|
+
font-weight: var(--nys-font-weight-bold, 700);
|
|
369
|
+
line-height: 1.2;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.toolbar__rename-input[hidden] {
|
|
373
|
+
display: none;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.toolbar__rename-input:focus-visible {
|
|
377
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
378
|
+
outline-offset: 1px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.toolbar__select {
|
|
382
|
+
width: 9rem;
|
|
383
|
+
flex: 0 0 auto;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* The save indicator fades rather than shifting the toolbar, so the layout
|
|
387
|
+
stays still while you type. */
|
|
388
|
+
.toolbar__saved {
|
|
389
|
+
margin: 0;
|
|
390
|
+
min-width: 5ch;
|
|
391
|
+
color: var(--pg-muted);
|
|
392
|
+
font-size: 0.8125rem;
|
|
393
|
+
opacity: 0;
|
|
394
|
+
transition: opacity 400ms ease;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.toolbar__saved--on {
|
|
398
|
+
opacity: 1;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/* Glyphs the design system does not ship, slotted into a button. */
|
|
402
|
+
.glyph {
|
|
403
|
+
width: 20px;
|
|
404
|
+
height: 20px;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
nys-button[circle] .glyph {
|
|
408
|
+
width: 24px;
|
|
409
|
+
height: 24px;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.settings__fieldset {
|
|
413
|
+
margin: 0;
|
|
414
|
+
padding: 0;
|
|
415
|
+
border: none;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.settings__legend {
|
|
419
|
+
padding: 0;
|
|
420
|
+
font-size: 0.9375rem;
|
|
421
|
+
font-weight: 600;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.settings__hint {
|
|
425
|
+
margin: 4px 0 8px;
|
|
426
|
+
color: var(--pg-muted);
|
|
427
|
+
font-size: 0.875rem;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.share__lede {
|
|
431
|
+
margin: 0 0 16px;
|
|
432
|
+
color: var(--pg-muted);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.toolbar__controls {
|
|
436
|
+
display: flex;
|
|
437
|
+
flex-wrap: wrap;
|
|
438
|
+
align-items: flex-end;
|
|
439
|
+
gap: 12px;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.toolbar__select {
|
|
443
|
+
min-width: 180px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/*
|
|
447
|
+
* Design system components set `display` on their `:host`, which beats the
|
|
448
|
+
* browser's `[hidden] { display: none }` rule. Restore it so the `hidden`
|
|
449
|
+
* property still works on them.
|
|
450
|
+
*/
|
|
451
|
+
nys-button[hidden],
|
|
452
|
+
nys-select[hidden],
|
|
453
|
+
nys-toggle[hidden] {
|
|
454
|
+
display: none !important;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.toolbar__toggle {
|
|
458
|
+
padding-bottom: 6px;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.toolbar__actions {
|
|
462
|
+
display: flex;
|
|
463
|
+
flex-wrap: wrap;
|
|
464
|
+
align-items: center;
|
|
465
|
+
gap: 8px;
|
|
466
|
+
margin-inline-start: auto;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/* Stage ---------------------------------------------------------------- */
|
|
470
|
+
|
|
471
|
+
/*
|
|
472
|
+
* One layout serves editing and presenting. The preview fills the stage and
|
|
473
|
+
* the editors are a drawer over its bottom edge. Sharing the space would
|
|
474
|
+
* change the preview iframe's viewport, so dragging the divider would reflow
|
|
475
|
+
* the example and push the part you are looking at off the screen.
|
|
476
|
+
*/
|
|
477
|
+
.split {
|
|
478
|
+
position: relative;
|
|
479
|
+
display: block;
|
|
480
|
+
flex: 1 1 auto;
|
|
481
|
+
min-height: 0;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.split__pane {
|
|
485
|
+
display: flex;
|
|
486
|
+
flex-direction: column;
|
|
487
|
+
min-width: 0;
|
|
488
|
+
min-height: 0;
|
|
489
|
+
overflow: hidden;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.split__pane--preview {
|
|
493
|
+
position: absolute;
|
|
494
|
+
inset: 0;
|
|
495
|
+
background: #ffffff;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.split__pane--editors {
|
|
499
|
+
position: absolute;
|
|
500
|
+
inset-inline: 0;
|
|
501
|
+
inset-block-end: 0;
|
|
502
|
+
z-index: 5;
|
|
503
|
+
height: var(--pg-drawer-size, 32%);
|
|
504
|
+
/* Solid, never translucent: code has to stay readable on a projector. */
|
|
505
|
+
background: var(--pg-editor-surface);
|
|
506
|
+
border-top: 1px solid var(--pg-editor-border);
|
|
507
|
+
box-shadow: 0 -8px 28px rgb(0 0 0 / 28%);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.split__divider {
|
|
511
|
+
position: absolute;
|
|
512
|
+
inset-inline: 0;
|
|
513
|
+
inset-block-end: var(--pg-drawer-size, 32%);
|
|
514
|
+
z-index: 6;
|
|
515
|
+
height: var(--pg-divider-width);
|
|
516
|
+
cursor: row-resize;
|
|
517
|
+
border-block: 4px solid transparent;
|
|
518
|
+
background: var(--pg-editor-border);
|
|
519
|
+
background-clip: content-box;
|
|
520
|
+
touch-action: none;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.split__divider:focus-visible {
|
|
524
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
525
|
+
outline-offset: 1px;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.app--code-collapsed .split__pane--editors,
|
|
529
|
+
.app--code-collapsed .split__divider {
|
|
530
|
+
display: none;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.preview {
|
|
534
|
+
flex: 1 1 auto;
|
|
535
|
+
min-height: 0;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/* Hide the preview's own header bar so the stage is only the slide. The
|
|
539
|
+
custom property has to land on the element itself: playground-preview sets
|
|
540
|
+
a default on :host, which beats an inherited value. */
|
|
541
|
+
.preview {
|
|
542
|
+
--playground-bar-height: 0px;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.preview__build {
|
|
546
|
+
position: absolute;
|
|
547
|
+
inset-block-end: calc(var(--pg-drawer-size, 32%) + 16px);
|
|
548
|
+
inset-inline-end: 16px;
|
|
549
|
+
z-index: 4;
|
|
550
|
+
background: var(--pg-surface);
|
|
551
|
+
border-radius: 999px;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.app--code-collapsed .preview__build {
|
|
555
|
+
inset-block-end: 16px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.preview__build--pending {
|
|
559
|
+
--nys-button-border-color: var(--nys-color-theme, #154973);
|
|
560
|
+
box-shadow: 0 0 0 3px rgb(21 73 115 / 22%);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.editors__layout {
|
|
564
|
+
display: flex;
|
|
565
|
+
flex: 1 1 auto;
|
|
566
|
+
min-width: 0;
|
|
567
|
+
min-height: 0;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.editors__layout[hidden] {
|
|
571
|
+
display: none;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.editors__layout--tabs {
|
|
575
|
+
flex-direction: column;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.editors__tabs {
|
|
579
|
+
flex: 0 0 auto;
|
|
580
|
+
border-bottom: 1px solid var(--pg-border);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.editors__editor {
|
|
584
|
+
flex: 1 1 auto;
|
|
585
|
+
min-height: 0;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* Side-by-side columns ------------------------------------------------- */
|
|
589
|
+
|
|
590
|
+
.editors__layout--columns {
|
|
591
|
+
flex-direction: row;
|
|
592
|
+
align-items: stretch;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.column {
|
|
596
|
+
display: flex;
|
|
597
|
+
flex-direction: column;
|
|
598
|
+
/* Expanded columns share the width evenly. */
|
|
599
|
+
flex: 1 1 0;
|
|
600
|
+
min-width: 0;
|
|
601
|
+
min-height: 0;
|
|
602
|
+
/* The design system spaces sibling sections apart. The columns sit side by
|
|
603
|
+
side, so drop it. */
|
|
604
|
+
margin: 0;
|
|
605
|
+
border-inline-start: 1px solid var(--pg-editor-border);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.column:first-child {
|
|
609
|
+
border-inline-start: none;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.column__header {
|
|
613
|
+
display: flex;
|
|
614
|
+
flex: 0 0 auto;
|
|
615
|
+
align-items: center;
|
|
616
|
+
justify-content: space-between;
|
|
617
|
+
gap: 4px;
|
|
618
|
+
padding: 2px 4px 2px 10px;
|
|
619
|
+
border-bottom: 1px solid var(--pg-editor-border);
|
|
620
|
+
background: var(--pg-editor-surface);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.column__label {
|
|
624
|
+
flex: 1 1 auto;
|
|
625
|
+
min-width: 0;
|
|
626
|
+
margin: 0;
|
|
627
|
+
padding: 6px 0;
|
|
628
|
+
border: none;
|
|
629
|
+
background: none;
|
|
630
|
+
color: var(--pg-editor-label);
|
|
631
|
+
font: inherit;
|
|
632
|
+
font-size: 0.8125rem;
|
|
633
|
+
font-weight: 600;
|
|
634
|
+
letter-spacing: 0.06em;
|
|
635
|
+
text-align: start;
|
|
636
|
+
text-transform: uppercase;
|
|
637
|
+
cursor: pointer;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.column__label:hover {
|
|
641
|
+
color: var(--pg-editor-label-strong);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.column__label:focus-visible {
|
|
645
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
646
|
+
outline-offset: -2px;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.column__editor {
|
|
650
|
+
flex: 1 1 auto;
|
|
651
|
+
min-height: 0;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/* A collapsed column shrinks to a strip whose label reads bottom to top and
|
|
655
|
+
acts as the control that brings the column back. */
|
|
656
|
+
.column--collapsed {
|
|
657
|
+
flex: 0 0 var(--pg-column-strip-width);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.column--collapsed .column__header {
|
|
661
|
+
flex: 1 1 auto;
|
|
662
|
+
align-items: stretch;
|
|
663
|
+
justify-content: center;
|
|
664
|
+
padding: 8px 0;
|
|
665
|
+
border-bottom: none;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.column--collapsed .column__label {
|
|
669
|
+
padding: 0;
|
|
670
|
+
writing-mode: vertical-rl;
|
|
671
|
+
transform: rotate(180deg);
|
|
672
|
+
text-align: center;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.column--collapsed .column__collapse,
|
|
676
|
+
.column--collapsed .column__editor {
|
|
677
|
+
display: none;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.preview {
|
|
681
|
+
flex: 1 1 auto;
|
|
682
|
+
min-height: 0;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.split__divider {
|
|
686
|
+
flex: 0 0 var(--pg-divider-width);
|
|
687
|
+
cursor: col-resize;
|
|
688
|
+
background: var(--pg-border);
|
|
689
|
+
background-clip: content-box;
|
|
690
|
+
border-inline: 4px solid var(--pg-surface);
|
|
691
|
+
touch-action: none;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.split__divider:focus-visible {
|
|
695
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
696
|
+
outline-offset: 1px;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/* Presentation mode ---------------------------------------------------- */
|
|
700
|
+
|
|
701
|
+
.app--present .toolbar,
|
|
702
|
+
.app--present .edit-only {
|
|
703
|
+
display: none;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.app:not(.app--present) .present-only {
|
|
707
|
+
display: none;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/* Deck-only controls disappear on the scratch pad, and the other way round. */
|
|
711
|
+
.app:not(.app--deck) .deck-only,
|
|
712
|
+
.app--deck .scratch-only {
|
|
713
|
+
display: none;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/*
|
|
717
|
+
* Three real columns rather than an absolutely centred mark. Both sides are
|
|
718
|
+
* `1fr`, so the mark is exactly centred and the sides shrink into their
|
|
719
|
+
* ellipses before anything can overlap it.
|
|
720
|
+
*/
|
|
721
|
+
.caption {
|
|
722
|
+
/* Sits above the editor drawer (z-index 5) so tooltips that pop upward
|
|
723
|
+
out of the bar are not painted over by the drawer. Modals use 20+. */
|
|
724
|
+
position: relative;
|
|
725
|
+
z-index: 10;
|
|
726
|
+
display: grid;
|
|
727
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
728
|
+
align-items: center;
|
|
729
|
+
gap: 12px;
|
|
730
|
+
padding: 8px 16px;
|
|
731
|
+
border-top: 1px solid var(--nys-color-theme-strong);
|
|
732
|
+
background: var(--nys-color-theme);
|
|
733
|
+
color: var(--nys-color-text-reverse);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.caption[hidden] {
|
|
737
|
+
display: none;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/* The caption takes programmatic focus after every step, so it needs no
|
|
741
|
+
focus ring of its own. Its buttons still show theirs. */
|
|
742
|
+
.caption:focus,
|
|
743
|
+
.caption:focus-visible {
|
|
744
|
+
outline: none;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.caption__left {
|
|
748
|
+
display: flex;
|
|
749
|
+
align-items: center;
|
|
750
|
+
gap: 12px;
|
|
751
|
+
min-width: 0;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.caption__center {
|
|
755
|
+
display: flex;
|
|
756
|
+
align-items: center;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.caption__right {
|
|
760
|
+
display: flex;
|
|
761
|
+
align-items: center;
|
|
762
|
+
justify-self: end;
|
|
763
|
+
gap: 8px;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.caption__actions {
|
|
767
|
+
display: flex;
|
|
768
|
+
align-items: center;
|
|
769
|
+
gap: 4px;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/* The mark matches the previous and next circle buttons, so the three read as
|
|
773
|
+
one row of equal shapes. */
|
|
774
|
+
.caption__home {
|
|
775
|
+
display: inline-flex;
|
|
776
|
+
flex: 0 0 auto;
|
|
777
|
+
align-items: center;
|
|
778
|
+
justify-content: center;
|
|
779
|
+
width: 40px;
|
|
780
|
+
height: 40px;
|
|
781
|
+
color: var(--nys-color-text-reverse);
|
|
782
|
+
border-radius: 50%;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.caption__home:focus-visible {
|
|
786
|
+
outline: 2px solid var(--nys-color-text-reverse);
|
|
787
|
+
outline-offset: 2px;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.caption__mark {
|
|
791
|
+
width: 100%;
|
|
792
|
+
height: 100%;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.caption__notes[hidden] {
|
|
796
|
+
display: none;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.caption__headline {
|
|
800
|
+
min-width: 0;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.caption__title {
|
|
804
|
+
margin: 0;
|
|
805
|
+
overflow: hidden;
|
|
806
|
+
font-size: 1.0625rem;
|
|
807
|
+
font-weight: 600;
|
|
808
|
+
line-height: 1.3;
|
|
809
|
+
text-overflow: ellipsis;
|
|
810
|
+
white-space: nowrap;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.caption__group {
|
|
814
|
+
color: var(--nys-color-text-reverse-weak);
|
|
815
|
+
font-weight: 400;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/* The slide title doubles as the slide picker while editing. */
|
|
819
|
+
.caption__picker {
|
|
820
|
+
display: inline-flex;
|
|
821
|
+
align-items: center;
|
|
822
|
+
gap: 2px;
|
|
823
|
+
max-width: 100%;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.caption__select {
|
|
827
|
+
max-width: 100%;
|
|
828
|
+
padding: 2px 2px 2px 4px;
|
|
829
|
+
border: none;
|
|
830
|
+
border-radius: 4px;
|
|
831
|
+
background: none;
|
|
832
|
+
color: inherit;
|
|
833
|
+
font: inherit;
|
|
834
|
+
appearance: none;
|
|
835
|
+
cursor: pointer;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.caption__select:hover {
|
|
839
|
+
background: rgb(255 255 255 / 12%);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.caption__select:focus-visible {
|
|
843
|
+
outline: 2px solid var(--nys-color-text-reverse);
|
|
844
|
+
outline-offset: 1px;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/* The native menu paints with the system colours, so the options need the
|
|
848
|
+
page's own. */
|
|
849
|
+
.caption__select option,
|
|
850
|
+
.caption__select optgroup {
|
|
851
|
+
color: var(--nys-color-text);
|
|
852
|
+
background: var(--pg-surface);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.caption__picker-icon {
|
|
856
|
+
flex: 0 0 auto;
|
|
857
|
+
pointer-events: none;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.caption__group:not(:empty)::after {
|
|
861
|
+
content: " · ";
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.caption__description {
|
|
865
|
+
margin: 2px 0 0;
|
|
866
|
+
overflow: hidden;
|
|
867
|
+
font-size: 0.9375rem;
|
|
868
|
+
line-height: 1.35;
|
|
869
|
+
color: var(--nys-color-text-reverse-weak);
|
|
870
|
+
text-overflow: ellipsis;
|
|
871
|
+
white-space: nowrap;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.caption__description:empty {
|
|
875
|
+
display: none;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.caption__count {
|
|
879
|
+
margin: 0;
|
|
880
|
+
font-variant-numeric: tabular-nums;
|
|
881
|
+
font-size: 0.9375rem;
|
|
882
|
+
font-weight: 400;
|
|
883
|
+
color: var(--nys-color-text-reverse-weak);
|
|
884
|
+
white-space: nowrap;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/* The counter rides with the title on narrow screens instead. */
|
|
888
|
+
.caption__count--inline {
|
|
889
|
+
display: none;
|
|
890
|
+
margin-inline-start: 8px;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/*
|
|
894
|
+
* Narrow screens: two rows. The arrows keep the outer columns and span both
|
|
895
|
+
* rows, the title and counter take row one, and the icons take row two. The
|
|
896
|
+
* mark has nowhere to go, so it steps aside.
|
|
897
|
+
*/
|
|
898
|
+
@media (max-width: 720px) {
|
|
899
|
+
.caption {
|
|
900
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
901
|
+
grid-template-rows: auto auto;
|
|
902
|
+
gap: 4px 8px;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.caption__left,
|
|
906
|
+
.caption__right {
|
|
907
|
+
display: contents;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.caption__center {
|
|
911
|
+
display: none;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
#prev-button {
|
|
915
|
+
grid-column: 1;
|
|
916
|
+
grid-row: 1 / 3;
|
|
917
|
+
align-self: center;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.caption__headline {
|
|
921
|
+
grid-column: 2;
|
|
922
|
+
grid-row: 1;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.caption__actions {
|
|
926
|
+
grid-column: 2;
|
|
927
|
+
grid-row: 2;
|
|
928
|
+
flex-wrap: wrap;
|
|
929
|
+
justify-content: center;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
#next-button {
|
|
933
|
+
grid-column: 3;
|
|
934
|
+
grid-row: 1 / 3;
|
|
935
|
+
align-self: center;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/* The counter reads better beside the title than alone on the icon row. */
|
|
939
|
+
.caption__right > .caption__count {
|
|
940
|
+
display: none;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.caption__count--inline {
|
|
944
|
+
display: inline;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
/* Presenter notes ------------------------------------------------------ */
|
|
949
|
+
|
|
950
|
+
.notes {
|
|
951
|
+
position: fixed;
|
|
952
|
+
inset-inline: 16px;
|
|
953
|
+
inset-block-end: 72px;
|
|
954
|
+
z-index: 25;
|
|
955
|
+
max-width: 900px;
|
|
956
|
+
margin-inline: auto;
|
|
957
|
+
padding: 16px 20px;
|
|
958
|
+
border: 1px solid var(--pg-border);
|
|
959
|
+
border-radius: 8px;
|
|
960
|
+
background: var(--pg-surface);
|
|
961
|
+
box-shadow: 0 8px 28px rgb(0 0 0 / 22%);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
.notes[hidden] {
|
|
965
|
+
display: none;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.notes__heading {
|
|
969
|
+
margin: 0 0 6px;
|
|
970
|
+
font-size: 0.8125rem;
|
|
971
|
+
font-weight: 600;
|
|
972
|
+
letter-spacing: 0.06em;
|
|
973
|
+
text-transform: uppercase;
|
|
974
|
+
color: var(--pg-muted);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
.notes__body {
|
|
978
|
+
margin: 0 0 12px;
|
|
979
|
+
font-size: 1rem;
|
|
980
|
+
line-height: 1.5;
|
|
981
|
+
white-space: pre-wrap;
|
|
982
|
+
max-height: 40vh;
|
|
983
|
+
overflow: auto;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
.present-hint {
|
|
987
|
+
position: fixed;
|
|
988
|
+
inset-block-start: 16px;
|
|
989
|
+
inset-inline-end: 16px;
|
|
990
|
+
z-index: 20;
|
|
991
|
+
margin: 0;
|
|
992
|
+
padding: 8px 14px;
|
|
993
|
+
border-radius: 999px;
|
|
994
|
+
background: rgba(20, 20, 20, 0.86);
|
|
995
|
+
color: #ffffff;
|
|
996
|
+
font-size: 0.875rem;
|
|
997
|
+
transition: opacity 600ms ease;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.present-hint[hidden] {
|
|
1001
|
+
display: none;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
.present-hint--fading {
|
|
1005
|
+
opacity: 0;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.settings {
|
|
1009
|
+
display: flex;
|
|
1010
|
+
flex-direction: column;
|
|
1011
|
+
gap: 20px;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
.settings__field {
|
|
1015
|
+
margin: 0;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
.settings__reset {
|
|
1019
|
+
align-self: flex-start;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/* The base CSS field is the same CodeMirror editor as the CSS pane, boxed
|
|
1023
|
+
like a design system text area so it sits with the other fields. */
|
|
1024
|
+
.settings__code .settings__legend {
|
|
1025
|
+
font-size: 1rem;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.settings__code .settings__hint {
|
|
1029
|
+
margin-bottom: 8px;
|
|
1030
|
+
font-size: 1rem;
|
|
1031
|
+
color: var(--nys-color-text, #1b1b1b);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.settings__editor {
|
|
1035
|
+
display: block;
|
|
1036
|
+
height: 160px;
|
|
1037
|
+
border: 1px solid var(--nys-color-neutral-400, #6b6d70);
|
|
1038
|
+
border-radius: var(--nys-radius-md, 4px);
|
|
1039
|
+
overflow: hidden;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
.settings__editor:focus-within {
|
|
1043
|
+
outline: 2px solid var(--nys-color-focus, #004dd1);
|
|
1044
|
+
outline-offset: 2px;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/* Toast ---------------------------------------------------------------- */
|
|
1048
|
+
|
|
1049
|
+
.toast {
|
|
1050
|
+
position: fixed;
|
|
1051
|
+
inset-block-end: 24px;
|
|
1052
|
+
inset-inline-end: 24px;
|
|
1053
|
+
z-index: 30;
|
|
1054
|
+
max-width: 320px;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
.toast[hidden] {
|
|
1058
|
+
display: none;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/* Narrow screens ------------------------------------------------------- */
|
|
1062
|
+
|
|
1063
|
+
@media (max-width: 720px) {
|
|
1064
|
+
.toolbar {
|
|
1065
|
+
row-gap: 4px;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.toolbar__spacer {
|
|
1069
|
+
flex-basis: 100%;
|
|
1070
|
+
height: 0;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.toolbar__title,
|
|
1074
|
+
.toolbar__rename-input {
|
|
1075
|
+
max-width: 55%;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/* The trailing controls sit on their own row, aligned right. */
|
|
1079
|
+
.toolbar__select {
|
|
1080
|
+
margin-inline-start: auto;
|
|
1081
|
+
width: 8rem;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
.caption {
|
|
1085
|
+
flex-wrap: wrap;
|
|
1086
|
+
}
|
|
1087
|
+
}
|