@gopherium/godmin 0.12.0 → 0.14.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 CHANGED
@@ -47,7 +47,7 @@ two lines do for you.
47
47
 
48
48
  | Entry point | Contents |
49
49
  | --- | --- |
50
- | `@gopherium/godmin` | `AdminRoot`, `Frame`, `Page`, `PageTitle`, `SectionTitle`, `NavScreen`, `ErrorNotice`, `LoadMore`, `LogList`, `LogItem`, `LogTime`, `LoadingScreen`, `LoadingRows`, `Toaster`, `useToaster`, `RepeatRows`, `RowControls`, `useRowKeys`, `keyFromLabel`, `useMediaQuery`, `useTokenDocument`, the breakpoints, `SUPPORTED_WPDS` |
50
+ | `@gopherium/godmin` | `AdminRoot`, `Frame`, `Page`, `PageTitle`, `PageTabs`, `PageTab`, `SectionTitle`, `InitialsAvatar`, `NavScreen`, `ErrorNotice`, `LoadMore`, `LogList`, `LogItem`, `LogTime`, `LoadingScreen`, `LoadingRows`, `Toaster`, `useToaster`, `RepeatRows`, `RowControls`, `useRowKeys`, `keyFromLabel`, `listChromeCatalogFor`, `LIST_CHROME_DOMAIN`, `useMediaQuery`, `useTokenDocument`, the breakpoints, `SUPPORTED_WPDS` |
51
51
  | `@gopherium/godmin/base.css` | Cascade layer order, design tokens, host rules, frame and screen styles |
52
52
  | `@gopherium/godmin/router` | `useCanvas`, `useFrameLocation`, the `canvas` route static data |
53
53
  | `@gopherium/godmin/testing` | `installTestEnvironment`, `renderAdmin`, `setViewport`, `getAnnouncement`, `clearAnnouncements`, `assertElementPatched`, `WPDS_IGNORE_SELECTOR` |
@@ -0,0 +1,21 @@
1
+ /** A circle colour of the initials avatar and the colour its letter takes on it. */
2
+ export interface AvatarColor {
3
+ /** The circle colour as #rrggbb. */
4
+ background: string;
5
+ /** The letter colour as #rrggbb. */
6
+ letter: string;
7
+ }
8
+ /**
9
+ * The colours an initials avatar paints with, the WordPress blue, raspberry and purple first with their pale letters.
10
+ */
11
+ export declare const AVATAR_COLORS: readonly AvatarColor[];
12
+ export interface InitialsAvatarProps {
13
+ /** The name the avatar stands for, whose first letter it draws. */
14
+ name: string;
15
+ }
16
+ /**
17
+ * Renders a round avatar with the first letter of a name, in the letter colour of the circle colour the name picks.
18
+ * @param props - The name the avatar stands for.
19
+ * @returns The avatar element.
20
+ */
21
+ export declare function InitialsAvatar({ name }: InitialsAvatarProps): import("react").JSX.Element;
package/dist/avatar.js ADDED
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * The colours an initials avatar paints with, the WordPress blue, raspberry and purple first with their pale letters.
4
+ */
5
+ export const AVATAR_COLORS = [
6
+ { background: '#3b59e4', letter: '#f7ecbd' },
7
+ { background: '#c6396e', letter: '#ecfaf4' },
8
+ { background: '#964c9a', letter: '#deefdd' },
9
+ { background: '#007017', letter: '#ffffff' },
10
+ { background: '#996800', letter: '#ffffff' },
11
+ { background: '#50575e', letter: '#ffffff' },
12
+ ];
13
+ /**
14
+ * Returns the palette colours a name always gets, whatever its case.
15
+ * @param name - The name the avatar stands for.
16
+ * @returns The circle and letter colours.
17
+ */
18
+ function colorFor(name) {
19
+ let hash = 0;
20
+ for (const letter of name.trim().toLocaleLowerCase()) {
21
+ hash = (hash * 31 + letter.codePointAt(0)) % 2147483647;
22
+ }
23
+ return AVATAR_COLORS[hash % AVATAR_COLORS.length];
24
+ }
25
+ /**
26
+ * Returns the first letter of a name in capitals, or nothing for an empty name.
27
+ * @param name - The name the avatar stands for.
28
+ * @returns The letter to draw.
29
+ */
30
+ function initialOf(name) {
31
+ const [first = ''] = Array.from(name.trim());
32
+ return first.toLocaleUpperCase();
33
+ }
34
+ /**
35
+ * Renders a round avatar with the first letter of a name, in the letter colour of the circle colour the name picks.
36
+ * @param props - The name the avatar stands for.
37
+ * @returns The avatar element.
38
+ */
39
+ export function InitialsAvatar({ name }) {
40
+ const { background, letter } = colorFor(name);
41
+ return (_jsx("span", { className: "godmin-avatar", "aria-hidden": "true", style: { backgroundColor: background, color: letter }, children: initialOf(name) }));
42
+ }
package/dist/base.css CHANGED
@@ -12,6 +12,75 @@ body {
12
12
  position: relative;
13
13
  }
14
14
 
15
+ /* Keeps the sticky DataViews toolbar and filters of a list page at the edge the list reaches. */
16
+ .godmin-page > .godmin-page__list :is(.dataviews__view-actions, .dataviews-filters__container) {
17
+ inset-inline-start: calc(-1 * var(--godmin-canvas-gutter, 0px));
18
+ }
19
+
20
+ /* Keeps the sticky DataViews footer of a list page on the canvas bottom the list reaches. */
21
+ .godmin-page > .godmin-page__list .dataviews-footer {
22
+ inset-block-end: calc(-1 * var(--godmin-canvas-gutter-block, 0px));
23
+ }
24
+
25
+ /* Draws a DataViews title link without an underline, as WordPress does. */
26
+ .dataviews-title-field--clickable {
27
+ text-decoration: none;
28
+ }
29
+
30
+ /* Draws a DataViews media link without an underline or the browser link colour. */
31
+ .dataviews-column-primary__media--clickable {
32
+ color: inherit;
33
+ text-decoration: none;
34
+ }
35
+
36
+ /* Sets the name 8px after an initials avatar in a DataViews table. */
37
+ .dataviews-column-primary__media:has(> .godmin-avatar) {
38
+ margin-inline-end: calc(var(--wpds-dimension-gap-sm) - var(--wpds-dimension-gap-md));
39
+ }
40
+
41
+ /* Fills the larger media box of the DataViews list with an initials avatar. */
42
+ .dataviews-view-list .dataviews-view-list__media-wrapper:has(> .godmin-avatar) {
43
+ container-type: size;
44
+ }
45
+
46
+ .dataviews-view-list .dataviews-view-list__media-wrapper > .godmin-avatar {
47
+ inline-size: 100%;
48
+ block-size: 100%;
49
+ font-size: 37.5cqi;
50
+ }
51
+
52
+ /* Rounds the DataViews media box around an initials avatar. */
53
+ .dataviews-column-primary__media:has(> .godmin-avatar),
54
+ .dataviews-view-list .dataviews-view-list__media-wrapper:has(> .godmin-avatar) {
55
+ border-radius: 50%;
56
+ }
57
+
58
+ /* Drops the dark DataViews media ring around an initials avatar. */
59
+ .dataviews-column-primary__media:has(> .godmin-avatar)::after,
60
+ .dataviews-view-list .dataviews-view-list__media-wrapper:has(> .godmin-avatar)::after {
61
+ box-shadow: none;
62
+ }
63
+
64
+ /* Centres the media of a list row on its title and description. */
65
+ .godmin-page__list .dataviews-view-table tbody .dataviews-column-primary__media {
66
+ align-self: center;
67
+ }
68
+
69
+ /* Sets a list title and its description as the WordPress list does, a 64px row for both. */
70
+ .godmin-page__list .dataviews-view-table tbody .dataviews-view-table__primary-column-content {
71
+ justify-content: center;
72
+ gap: var(--wpds-dimension-gap-xs);
73
+ min-block-size: var(--wpds-dimension-size-md);
74
+ font-size: var(--wpds-typography-font-size-sm);
75
+ line-height: var(--wpds-typography-line-height-xs);
76
+ }
77
+
78
+ .godmin-page__list .dataviews-view-table tbody .dataviews-view-table__primary-column-content > .dataviews-title-field {
79
+ min-block-size: 0;
80
+ font-weight: var(--wpds-typography-font-weight-default);
81
+ line-height: var(--wpds-typography-line-height-sm);
82
+ }
83
+
15
84
  @layer godmin {
16
85
  body {
17
86
  margin: 0;
@@ -22,6 +91,11 @@ body {
22
91
  }
23
92
 
24
93
  @layer godmin {
94
+ :root {
95
+ --godmin-rail-width: 300px;
96
+ --godmin-canvas-margin: 16px;
97
+ }
98
+
25
99
  .godmin-layout {
26
100
  display: flex;
27
101
  height: 100vh;
@@ -38,7 +112,7 @@ body {
38
112
  display: flex;
39
113
  flex-direction: column;
40
114
  flex-shrink: 0;
41
- width: 300px;
115
+ width: var(--godmin-rail-width);
42
116
  padding: 16px;
43
117
  box-sizing: border-box;
44
118
  overflow-y: auto;
@@ -49,7 +123,28 @@ body {
49
123
  flex-shrink: 0;
50
124
  align-items: center;
51
125
  gap: 8px;
52
- padding: 8px 16px;
126
+ block-size: 46px;
127
+ padding-inline-end: 16px;
128
+ }
129
+
130
+ .godmin-layout__menu {
131
+ display: flex;
132
+ flex: none;
133
+ padding: 0;
134
+ border: 0;
135
+ background: none;
136
+ color: color-mix(in srgb, var(--wpds-color-foreground-content-neutral) 60%, transparent);
137
+ cursor: var(--wpds-cursor-control);
138
+ }
139
+
140
+ .godmin-layout__menu:is(:hover, :focus-visible) {
141
+ background: var(--wpds-color-background-interactive-neutral-weak-active);
142
+ color: var(--wpds-color-foreground-interactive-brand);
143
+ }
144
+
145
+ .godmin-layout__menu:focus-visible {
146
+ outline: var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus);
147
+ outline-offset: calc(-1 * var(--wpds-border-width-focus));
53
148
  }
54
149
 
55
150
  .godmin-layout__drawer {
@@ -61,15 +156,18 @@ body {
61
156
  }
62
157
 
63
158
  .godmin-layout__canvas {
159
+ --godmin-canvas-gutter: 24px;
160
+ --godmin-canvas-gutter-block: var(--wpds-dimension-padding-lg);
161
+ --wp-dataviews-color-background: var(--wpds-color-background-surface-neutral-strong);
64
162
  display: flex;
65
163
  flex-direction: column;
66
164
  flex: 1;
67
165
  min-width: 0;
68
- margin: 16px;
69
- padding: 24px;
166
+ margin: var(--godmin-canvas-margin);
167
+ padding: var(--godmin-canvas-gutter-block) var(--godmin-canvas-gutter);
70
168
  box-sizing: border-box;
71
169
  border-radius: var(--wpds-border-radius-xl);
72
- background: var(--wpds-color-background-surface-neutral);
170
+ background: var(--wpds-color-background-surface-neutral-strong);
73
171
  color: var(--wpds-color-foreground-content-neutral);
74
172
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
75
173
  overflow-x: hidden;
@@ -77,17 +175,116 @@ body {
77
175
  }
78
176
 
79
177
  .godmin-layout__canvas--bleed {
80
- padding: 0;
178
+ --godmin-canvas-gutter: 0px;
179
+ --godmin-canvas-gutter-block: 0px;
81
180
  overflow: hidden;
82
181
  }
83
182
 
183
+ .godmin-layout:has(> .godmin-layout__rail) .godmin-layout__canvas {
184
+ margin-inline-start: 0;
185
+ }
186
+
84
187
  .godmin-toasts {
85
188
  position: fixed;
86
- left: 16px;
87
- bottom: 16px;
189
+ inset-inline: 0;
190
+ bottom: 32px;
88
191
  z-index: 1;
89
- width: 360px;
90
- max-width: calc(100vw - 32px);
192
+ display: flex;
193
+ flex-direction: column;
194
+ align-items: center;
195
+ gap: var(--wpds-dimension-gap-sm);
196
+ padding-inline: 16px;
197
+ box-sizing: border-box;
198
+ pointer-events: none;
199
+ }
200
+
201
+ :root:has(.godmin-layout__rail) .godmin-toasts {
202
+ inset-inline-start: var(--godmin-rail-width);
203
+ inset-inline-end: var(--godmin-canvas-margin);
204
+ }
205
+
206
+ .godmin-toasts:focus {
207
+ outline: none;
208
+ }
209
+
210
+ .godmin-toast {
211
+ display: flex;
212
+ align-items: baseline;
213
+ justify-content: space-between;
214
+ width: fit-content;
215
+ max-width: var(--wpds-dimension-surface-width-lg);
216
+ box-sizing: border-box;
217
+ padding: var(--wpds-dimension-padding-md) var(--wpds-dimension-padding-xl);
218
+ border-radius: var(--wpds-border-radius-md);
219
+ background: rgb(0 0 0 / 0.85);
220
+ backdrop-filter: blur(16px) saturate(180%);
221
+ box-shadow:
222
+ 0 1px 2px rgb(0 0 0 / 0.05),
223
+ 0 2px 3px rgb(0 0 0 / 0.04),
224
+ 0 6px 6px rgb(0 0 0 / 0.03),
225
+ 0 8px 8px rgb(0 0 0 / 0.02);
226
+ color: #fff;
227
+ font-family: var(--wpds-typography-font-family-body);
228
+ font-size: var(--wpds-typography-font-size-md);
229
+ line-height: 1.4;
230
+ overflow-wrap: anywhere;
231
+ cursor: default;
232
+ pointer-events: auto;
233
+ animation: godmin-fade-in var(--wpds-motion-duration-md) var(--wpds-motion-easing-balanced);
234
+ }
235
+
236
+ .godmin-toast--leaving {
237
+ animation: godmin-fade-out var(--wpds-motion-duration-sm) var(--wpds-motion-easing-balanced) forwards;
238
+ }
239
+
240
+ .godmin-toast--plain {
241
+ margin: 0;
242
+ border: 0;
243
+ text-align: start;
244
+ cursor: var(--wpds-cursor-control);
245
+ }
246
+
247
+ .godmin-toast__action {
248
+ flex: none;
249
+ margin-inline-start: var(--wpds-dimension-gap-2xl);
250
+ padding: 0;
251
+ border: 0;
252
+ background: none;
253
+ color: inherit;
254
+ font: inherit;
255
+ line-height: normal;
256
+ text-decoration: underline;
257
+ text-underline-offset: 0.2em;
258
+ text-decoration-thickness: from-font;
259
+ cursor: var(--wpds-cursor-control);
260
+ }
261
+
262
+ .godmin-toast__action:hover {
263
+ text-decoration: none;
264
+ }
265
+
266
+ .godmin-toast__dismiss {
267
+ flex: none;
268
+ margin-inline-start: var(--wpds-dimension-gap-xl);
269
+ padding: 0;
270
+ border: 0;
271
+ background: none;
272
+ color: inherit;
273
+ font: inherit;
274
+ cursor: var(--wpds-cursor-control);
275
+ }
276
+
277
+ .godmin-toast--plain:focus-visible {
278
+ box-shadow:
279
+ inset 0 0 0 var(--wpds-border-width-xs) #fff,
280
+ 0 0 0 var(--wpds-border-width-focus) var(--wpds-color-stroke-focus);
281
+ }
282
+
283
+ .godmin-toast__action:focus-visible {
284
+ outline: var(--wpds-border-width-xs) dotted #fff;
285
+ outline-offset: 2px;
286
+ border-radius: var(--wpds-border-radius-sm);
287
+ text-decoration: none;
91
288
  }
92
289
 
93
290
  .godmin-nav-screen__title {
@@ -114,7 +311,12 @@ body {
114
311
  color: var(--wpds-color-foreground-content-neutral-weak);
115
312
  }
116
313
 
314
+ .godmin-page__head {
315
+ min-block-size: var(--wpds-dimension-size-lg);
316
+ }
317
+
117
318
  .godmin-page__subtitle {
319
+ padding-block-end: var(--wpds-dimension-padding-xs);
118
320
  color: var(--wpds-color-foreground-content-neutral-weak);
119
321
  }
120
322
 
@@ -139,6 +341,111 @@ body {
139
341
  display: none;
140
342
  }
141
343
 
344
+ .godmin-page:has(> .godmin-page__list) {
345
+ flex: 1 0 auto;
346
+ }
347
+
348
+ .godmin-page:has(> .godmin-page__list > .dataviews-wrapper) {
349
+ flex-shrink: 1;
350
+ min-block-size: 0;
351
+ }
352
+
353
+ .godmin-page > .godmin-page__list,
354
+ .godmin-page__main > .godmin-page__list {
355
+ display: flex;
356
+ flex-direction: column;
357
+ gap: var(--wpds-dimension-gap-lg);
358
+ }
359
+
360
+ .godmin-page > .godmin-page__list {
361
+ flex: 1 0 auto;
362
+ margin-inline: calc(-1 * var(--godmin-canvas-gutter, 0px));
363
+ margin-block-end: calc(-1 * var(--godmin-canvas-gutter-block, 0px));
364
+ }
365
+
366
+ .godmin-page > .godmin-page__list:has(> .dataviews-wrapper) {
367
+ flex-shrink: 1;
368
+ min-block-size: 0;
369
+ }
370
+
371
+ .godmin-list {
372
+ margin-inline: calc(-1 * min(var(--wpds-dimension-padding-2xl), var(--godmin-canvas-gutter, 0px)));
373
+ }
374
+
375
+ .godmin-page > .godmin-page__list > :not(.dataviews-wrapper, .godmin-table-scroll, .godmin-table) {
376
+ margin-inline: var(--wpds-dimension-padding-2xl);
377
+ }
378
+
379
+ .godmin-page__tabs {
380
+ margin-inline: calc(-1 * var(--godmin-canvas-gutter, 0px));
381
+ padding-inline: var(--godmin-canvas-gutter, 0px);
382
+ border-block-end: var(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-neutral-weak);
383
+ }
384
+
385
+ .godmin-page:has(> .godmin-page__list) > .godmin-page__tabs {
386
+ padding-inline: var(--wpds-dimension-padding-2xl);
387
+ }
388
+
389
+ .godmin-page > .godmin-page__tabs + .godmin-page__list:has(> .dataviews-wrapper:first-child) {
390
+ margin-block-start: calc(-1 * var(--wpds-dimension-gap-lg));
391
+ }
392
+
393
+ .godmin-page-tabs {
394
+ display: flex;
395
+ gap: var(--wpds-dimension-gap-lg);
396
+ overflow-x: auto;
397
+ }
398
+
399
+ .godmin-page-tabs__tab {
400
+ display: flex;
401
+ align-items: center;
402
+ position: relative;
403
+ block-size: 48px;
404
+ padding: 0;
405
+ color: var(--wpds-color-foreground-interactive-neutral);
406
+ font-family: var(--wpds-typography-font-family-body);
407
+ font-size: var(--wpds-typography-font-size-md);
408
+ font-weight: var(--wpds-typography-font-weight-default);
409
+ line-height: 1.2;
410
+ text-decoration: none;
411
+ white-space: nowrap;
412
+ }
413
+
414
+ .godmin-page-tabs__tab:is(:hover, :focus-visible) {
415
+ color: var(--wpds-color-foreground-interactive-neutral-active);
416
+ }
417
+
418
+ .godmin-page-tabs__tab:focus-visible {
419
+ outline: none;
420
+ }
421
+
422
+ .godmin-page-tabs__tab::before {
423
+ content: '';
424
+ position: absolute;
425
+ inset: var(--wpds-dimension-padding-md) var(--wpds-border-width-focus);
426
+ border-radius: var(--wpds-border-radius-sm);
427
+ outline: var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus);
428
+ opacity: 0;
429
+ pointer-events: none;
430
+ }
431
+
432
+ .godmin-page-tabs__tab:focus-visible::before {
433
+ opacity: 1;
434
+ }
435
+
436
+ .godmin-page-tabs__tab--current::after {
437
+ content: '';
438
+ position: absolute;
439
+ inset-inline: 0;
440
+ inset-block-end: 0;
441
+ block-size: var(--wpds-border-width-focus);
442
+ background: var(--wpds-color-stroke-interactive-neutral-strong);
443
+ }
444
+
445
+ .godmin-page:has(> .godmin-page__list) > .godmin-page__header {
446
+ padding-inline: calc(var(--wpds-dimension-padding-2xl) - var(--godmin-canvas-gutter, 0px));
447
+ }
448
+
142
449
  .godmin-form {
143
450
  display: flex;
144
451
  flex-direction: column;
@@ -183,19 +490,62 @@ body {
183
490
  .godmin-table {
184
491
  width: 100%;
185
492
  border-collapse: collapse;
493
+ font-size: var(--wpds-typography-font-size-md);
494
+ line-height: var(--wpds-typography-line-height-sm);
186
495
  text-align: left;
187
496
  }
188
497
 
189
498
  .godmin-table th,
190
499
  .godmin-table td {
191
- padding: 8px 12px;
192
- border-bottom: 1px solid var(--wpds-color-stroke-surface-neutral);
500
+ padding: var(--wpds-dimension-padding-md);
193
501
  vertical-align: middle;
194
502
  }
195
503
 
196
- .godmin-table th {
197
- font-size: var(--wpds-typography-font-size-sm);
198
- color: var(--wpds-color-foreground-content-neutral-weak);
504
+ .godmin-table thead th {
505
+ padding-block: var(--wpds-dimension-padding-sm);
506
+ font-size: var(--wpds-typography-font-size-xs);
507
+ font-weight: var(--wpds-typography-font-weight-emphasis);
508
+ text-transform: uppercase;
509
+ color: var(--wpds-color-foreground-content-neutral);
510
+ }
511
+
512
+ .godmin-table tbody tr {
513
+ border-block-start: var(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-neutral-weak);
514
+ }
515
+
516
+ .godmin-table tbody td {
517
+ height: var(--wpds-dimension-size-md);
518
+ }
519
+
520
+ .godmin-page > .godmin-page__list .godmin-table tr > :first-child {
521
+ padding-inline-start: var(--wpds-dimension-padding-2xl);
522
+ }
523
+
524
+ .godmin-page > .godmin-page__list .godmin-table tr > :last-child {
525
+ padding-inline-end: var(--wpds-dimension-padding-2xl);
526
+ }
527
+
528
+ .godmin-table__title {
529
+ font-weight: var(--wpds-typography-font-weight-emphasis);
530
+ color: var(--wpds-color-foreground-content-neutral);
531
+ }
532
+
533
+ .godmin-page__list .godmin-table__title {
534
+ font-weight: var(--wpds-typography-font-weight-default);
535
+ }
536
+
537
+ .godmin-table__title a {
538
+ color: var(--wpds-color-foreground-interactive-neutral);
539
+ text-decoration: none;
540
+ }
541
+
542
+ .godmin-table__title a:hover {
543
+ color: var(--wpds-color-foreground-interactive-brand);
544
+ }
545
+
546
+ .godmin-table__title a:focus-visible {
547
+ outline: var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus);
548
+ outline-offset: 2px;
199
549
  }
200
550
 
201
551
  .godmin-table__actions {
@@ -203,6 +553,35 @@ body {
203
553
  white-space: nowrap;
204
554
  }
205
555
 
556
+ .godmin-avatar {
557
+ display: inline-block;
558
+ text-align: center;
559
+ align-content: center;
560
+ flex: none;
561
+ inline-size: var(--wpds-dimension-size-md);
562
+ block-size: var(--wpds-dimension-size-md);
563
+ border-radius: 50%;
564
+ font-family: var(--wpds-typography-font-family-body);
565
+ font-size: var(--wpds-typography-font-size-sm);
566
+ font-weight: var(--wpds-typography-font-weight-emphasis);
567
+ line-height: 1;
568
+ text-box: trim-both cap alphabetic;
569
+ user-select: none;
570
+ }
571
+
572
+ .godmin-table__actions * {
573
+ white-space: nowrap;
574
+ }
575
+
576
+ .godmin-table tbody tr:is(:hover, :has(:focus-visible)) > * {
577
+ background: var(--wpds-color-background-surface-neutral-weak);
578
+ }
579
+
580
+ .godmin-table-scroll:focus-visible {
581
+ outline: var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus);
582
+ outline-offset: 2px;
583
+ }
584
+
206
585
  .godmin-loading-screen,
207
586
  .godmin-loading-rows {
208
587
  opacity: 0;
@@ -225,10 +604,21 @@ body {
225
604
  }
226
605
  }
227
606
 
607
+ @keyframes godmin-fade-out {
608
+ 0% {
609
+ opacity: 1;
610
+ }
611
+
612
+ 100% {
613
+ opacity: 0;
614
+ }
615
+ }
616
+
228
617
  @media (prefers-reduced-motion: reduce) {
229
618
  .godmin-loading-screen,
230
619
  .godmin-loading-rows,
231
- .godmin-arrival {
620
+ .godmin-arrival,
621
+ .godmin-toast {
232
622
  animation-duration: 1ms;
233
623
  }
234
624
  }
@@ -292,6 +682,14 @@ body {
292
682
  margin-inline-start: auto;
293
683
  }
294
684
 
685
+ .godmin-rows__remove {
686
+ margin-inline-start: calc(var(--wpds-dimension-gap-md) - var(--wpds-dimension-gap-xs));
687
+ }
688
+
689
+ .godmin-table__actions .godmin-rows__controls {
690
+ justify-content: flex-end;
691
+ }
692
+
295
693
  .godmin-log-list {
296
694
  margin: 0;
297
695
  padding: 0;
@@ -349,16 +747,21 @@ body {
349
747
 
350
748
  /* Small viewport overrides live together at the end of the sheet, so they
351
749
  always win over the rules above them without extra specificity. */
352
- @media (max-width: 639px) {
750
+ @media (max-width: 781px) {
353
751
  .godmin-layout__canvas {
354
752
  margin: 0;
355
- padding: 16px;
356
753
  border-radius: 0;
357
754
  box-shadow: none;
358
755
  }
756
+ }
757
+
758
+ @media (max-width: 639px) {
759
+ .godmin-layout__canvas {
760
+ --godmin-canvas-gutter: 16px;
761
+ }
359
762
 
360
763
  .godmin-layout__canvas--bleed {
361
- padding: 0;
764
+ --godmin-canvas-gutter: 0px;
362
765
  }
363
766
 
364
767
  /* The region needs a containing block, or absolutely positioned content
@@ -368,9 +771,21 @@ body {
368
771
  overflow-x: auto;
369
772
  }
370
773
 
371
- .godmin-table-scroll:focus-visible {
372
- outline: var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus);
373
- outline-offset: 2px;
774
+ .godmin-table-scroll .godmin-table__actions {
775
+ position: sticky;
776
+ inset-inline-end: 0;
777
+ background: var(--wpds-color-background-surface-neutral-strong);
778
+ box-shadow: inset var(--wpds-border-width-xs) 0 0 var(--wpds-color-stroke-surface-neutral);
779
+ }
780
+
781
+ .godmin-table-scroll .godmin-table__actions:dir(rtl) {
782
+ box-shadow: inset calc(-1 * var(--wpds-border-width-xs)) 0 0 var(--wpds-color-stroke-surface-neutral);
783
+ }
784
+ }
785
+
786
+ @media (max-width: 599px) {
787
+ .godmin-toast {
788
+ width: 100%;
374
789
  }
375
790
  }
376
791
  }
@@ -3,7 +3,11 @@
3
3
  */
4
4
  export declare const RAIL_BREAKPOINT = 1024;
5
5
  /**
6
- * The viewport width below which the canvas meets the screen edges.
6
+ * The viewport width below which the canvas meets the screen edges, the WordPress medium breakpoint.
7
+ */
8
+ export declare const EDGE_BREAKPOINT = 782;
9
+ /**
10
+ * The viewport width below which the canvas gutter narrows to 16px.
7
11
  */
8
12
  export declare const DENSE_BREAKPOINT = 640;
9
13
  /**
@@ -3,7 +3,11 @@
3
3
  */
4
4
  export const RAIL_BREAKPOINT = 1024;
5
5
  /**
6
- * The viewport width below which the canvas meets the screen edges.
6
+ * The viewport width below which the canvas meets the screen edges, the WordPress medium breakpoint.
7
+ */
8
+ export const EDGE_BREAKPOINT = 782;
9
+ /**
10
+ * The viewport width below which the canvas gutter narrows to 16px.
7
11
  */
8
12
  export const DENSE_BREAKPOINT = 640;
9
13
  /**