@slotted/styles 0.0.0-stage → 0.1.0-beta.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 +21 -0
- package/README.md +10 -2
- package/package.json +276 -3
- package/src/accordion/accordion.css +96 -0
- package/src/accordion/accordion.tokens.json +14 -0
- package/src/action-bar/action-bar.css +455 -0
- package/src/action-bar/action-bar.tokens.json +50 -0
- package/src/action-sheet/action-sheet.css +462 -0
- package/src/action-sheet/action-sheet.tokens.json +59 -0
- package/src/alert/alert.css +764 -0
- package/src/alert/alert.tokens.json +77 -0
- package/src/app-shell/app-shell.css +1899 -0
- package/src/app-shell/app-shell.tokens.json +88 -0
- package/src/aspect-ratio/aspect-ratio.css +131 -0
- package/src/aspect-ratio/aspect-ratio.tokens.json +1 -0
- package/src/attachment/attachment.css +906 -0
- package/src/attachment/attachment.tokens.json +85 -0
- package/src/avatar/avatar.css +598 -0
- package/src/avatar/avatar.tokens.json +64 -0
- package/src/avatar-group/avatar-group.css +268 -0
- package/src/avatar-group/avatar-group.tokens.json +16 -0
- package/src/badge/badge.css +462 -0
- package/src/badge/badge.tokens.json +58 -0
- package/src/breadcrumb/breadcrumb.css +441 -0
- package/src/breadcrumb/breadcrumb.tokens.json +50 -0
- package/src/button/button.css +754 -0
- package/src/button/button.tokens.json +72 -0
- package/src/button-group/button-group.css +455 -0
- package/src/button-group/button-group.tokens.json +11 -0
- package/src/calendar/calendar.css +846 -0
- package/src/calendar/calendar.tokens.json +67 -0
- package/src/card/card.css +602 -0
- package/src/card/card.tokens.json +68 -0
- package/src/carousel/carousel.css +860 -0
- package/src/carousel/carousel.tokens.json +62 -0
- package/src/cascader/cascader.css +1320 -0
- package/src/cascader/cascader.tokens.json +103 -0
- package/src/chart/chart.css +1473 -0
- package/src/chart/chart.tokens.json +107 -0
- package/src/checkbox/checkbox.css +1011 -0
- package/src/checkbox/checkbox.tokens.json +102 -0
- package/src/checkbox-group/checkbox-group.css +70 -0
- package/src/checkbox-group/checkbox-group.tokens.json +6 -0
- package/src/code-block/code-block.css +555 -0
- package/src/code-block/code-block.tokens.json +69 -0
- package/src/collapsible/collapsible.css +546 -0
- package/src/collapsible/collapsible.tokens.json +55 -0
- package/src/color-picker/color-picker.css +607 -0
- package/src/color-picker/color-picker.tokens.json +58 -0
- package/src/column-manager/column-manager.css +452 -0
- package/src/column-manager/column-manager.tokens.json +43 -0
- package/src/combobox/combobox.css +1048 -0
- package/src/combobox/combobox.tokens.json +112 -0
- package/src/command-palette/command-palette.css +1000 -0
- package/src/command-palette/command-palette.tokens.json +75 -0
- package/src/container/container.css +198 -0
- package/src/container/container.tokens.json +18 -0
- package/src/context-menu/context-menu.css +104 -0
- package/src/context-menu/context-menu.tokens.json +11 -0
- package/src/currency-field/currency-field.css +787 -0
- package/src/currency-field/currency-field.tokens.json +80 -0
- package/src/dashboard-grid/dashboard-grid.css +748 -0
- package/src/dashboard-grid/dashboard-grid.tokens.json +67 -0
- package/src/data-grid/data-grid.css +2484 -0
- package/src/data-grid/data-grid.tokens.json +100 -0
- package/src/data-list/data-list.css +455 -0
- package/src/data-list/data-list.tokens.json +35 -0
- package/src/date-field/date-field.css +560 -0
- package/src/date-field/date-field.tokens.json +80 -0
- package/src/date-picker/date-picker.css +420 -0
- package/src/date-picker/date-picker.tokens.json +49 -0
- package/src/date-range-picker/date-range-picker.css +983 -0
- package/src/date-range-picker/date-range-picker.tokens.json +109 -0
- package/src/datetime-field/datetime-field.css +850 -0
- package/src/datetime-field/datetime-field.tokens.json +91 -0
- package/src/datetime-picker/datetime-picker.css +843 -0
- package/src/datetime-picker/datetime-picker.tokens.json +78 -0
- package/src/datetime-range-picker/datetime-range-picker.css +1375 -0
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +135 -0
- package/src/description-list/description-list.css +675 -0
- package/src/description-list/description-list.tokens.json +66 -0
- package/src/detail-panel/detail-panel.css +329 -0
- package/src/detail-panel/detail-panel.tokens.json +33 -0
- package/src/dialog/dialog.css +968 -0
- package/src/dialog/dialog.tokens.json +66 -0
- package/src/divider/divider.css +131 -0
- package/src/divider/divider.tokens.json +18 -0
- package/src/drawer/drawer.css +1303 -0
- package/src/drawer/drawer.tokens.json +75 -0
- package/src/entity-picker/entity-picker.css +1367 -0
- package/src/entity-picker/entity-picker.tokens.json +118 -0
- package/src/event-calendar/event-calendar.css +2148 -0
- package/src/event-calendar/event-calendar.tokens.json +87 -0
- package/src/field/field.css +707 -0
- package/src/field/field.tokens.json +58 -0
- package/src/field-group/field-group.css +226 -0
- package/src/field-group/field-group.tokens.json +33 -0
- package/src/filter-bar/filter-bar.css +1306 -0
- package/src/filter-bar/filter-bar.tokens.json +78 -0
- package/src/form/form.css +218 -0
- package/src/form/form.tokens.json +32 -0
- package/src/fullscreen/fullscreen.css +376 -0
- package/src/fullscreen/fullscreen.tokens.json +50 -0
- package/src/grid/grid.css +173 -0
- package/src/grid/grid.tokens.json +20 -0
- package/src/highlight/highlight.css +135 -0
- package/src/highlight/highlight.tokens.json +16 -0
- package/src/hover-card/hover-card.css +93 -0
- package/src/hover-card/hover-card.tokens.json +17 -0
- package/src/icon/icon.css +136 -0
- package/src/icon/icon.tokens.json +14 -0
- package/src/image/image.css +449 -0
- package/src/image/image.tokens.json +27 -0
- package/src/import-export-center/import-export-center.css +1175 -0
- package/src/import-export-center/import-export-center.tokens.json +84 -0
- package/src/inline/inline.css +149 -0
- package/src/inline/inline.tokens.json +14 -0
- package/src/inline-message/inline-message.css +396 -0
- package/src/inline-message/inline-message.tokens.json +19 -0
- package/src/kbd/kbd.css +490 -0
- package/src/kbd/kbd.tokens.json +40 -0
- package/src/link/link.css +237 -0
- package/src/link/link.tokens.json +25 -0
- package/src/list/list.css +240 -0
- package/src/list/list.tokens.json +42 -0
- package/src/list-item/list-item.css +937 -0
- package/src/list-item/list-item.tokens.json +114 -0
- package/src/listbox/listbox.css +674 -0
- package/src/listbox/listbox.tokens.json +72 -0
- package/src/loading-overlay/loading-overlay.css +730 -0
- package/src/loading-overlay/loading-overlay.tokens.json +48 -0
- package/src/markdown/markdown.css +168 -0
- package/src/markdown/markdown.tokens.json +18 -0
- package/src/menu/menu.css +817 -0
- package/src/menu/menu.tokens.json +78 -0
- package/src/menubar/menubar.css +170 -0
- package/src/menubar/menubar.tokens.json +32 -0
- package/src/message/message.css +1453 -0
- package/src/message/message.tokens.json +85 -0
- package/src/message-scroller/message-scroller.css +371 -0
- package/src/message-scroller/message-scroller.tokens.json +47 -0
- package/src/multi-select/multi-select.css +1427 -0
- package/src/multi-select/multi-select.tokens.json +114 -0
- package/src/navigation-menu/navigation-menu.css +1029 -0
- package/src/navigation-menu/navigation-menu.tokens.json +70 -0
- package/src/notification-center/notification-center.css +856 -0
- package/src/notification-center/notification-center.tokens.json +84 -0
- package/src/number-field/number-field.css +794 -0
- package/src/number-field/number-field.tokens.json +80 -0
- package/src/otp-input/otp-input.css +525 -0
- package/src/otp-input/otp-input.tokens.json +69 -0
- package/src/page/page.css +179 -0
- package/src/page/page.tokens.json +20 -0
- package/src/page-header/page-header.css +1181 -0
- package/src/page-header/page-header.tokens.json +71 -0
- package/src/pagination/pagination.css +500 -0
- package/src/pagination/pagination.tokens.json +56 -0
- package/src/popover/popover.css +526 -0
- package/src/popover/popover.tokens.json +60 -0
- package/src/progress-indicator/progress-indicator.css +1584 -0
- package/src/progress-indicator/progress-indicator.tokens.json +50 -0
- package/src/prompt-composer/prompt-composer.css +680 -0
- package/src/prompt-composer/prompt-composer.tokens.json +99 -0
- package/src/prose/prose.css +733 -0
- package/src/prose/prose.tokens.json +79 -0
- package/src/radio-group/radio-group.css +778 -0
- package/src/radio-group/radio-group.tokens.json +103 -0
- package/src/rating/rating.css +1071 -0
- package/src/rating/rating.tokens.json +88 -0
- package/src/result-state/result-state.css +980 -0
- package/src/result-state/result-state.tokens.json +63 -0
- package/src/runtime-properties.mjs +321 -0
- package/src/saved-views/saved-views.css +394 -0
- package/src/saved-views/saved-views.tokens.json +41 -0
- package/src/scroll-area/scroll-area.css +481 -0
- package/src/scroll-area/scroll-area.tokens.json +15 -0
- package/src/section/section.css +177 -0
- package/src/section/section.tokens.json +39 -0
- package/src/segmented-control/segmented-control.css +564 -0
- package/src/segmented-control/segmented-control.tokens.json +67 -0
- package/src/select/select.css +1593 -0
- package/src/select/select.tokens.json +110 -0
- package/src/side-navigation/side-navigation.css +1096 -0
- package/src/side-navigation/side-navigation.tokens.json +87 -0
- package/src/skeleton/skeleton.css +431 -0
- package/src/skeleton/skeleton.tokens.json +29 -0
- package/src/slider/slider.css +792 -0
- package/src/slider/slider.tokens.json +75 -0
- package/src/sparkline/sparkline.css +282 -0
- package/src/sparkline/sparkline.tokens.json +45 -0
- package/src/spinner/spinner.css +224 -0
- package/src/spinner/spinner.tokens.json +8 -0
- package/src/split-button/split-button.css +253 -0
- package/src/split-button/split-button.tokens.json +12 -0
- package/src/splitter/splitter.css +336 -0
- package/src/splitter/splitter.tokens.json +24 -0
- package/src/stack/stack.css +128 -0
- package/src/stack/stack.tokens.json +14 -0
- package/src/stat-card/stat-card.css +641 -0
- package/src/stat-card/stat-card.tokens.json +95 -0
- package/src/status-indicator/status-indicator.css +481 -0
- package/src/status-indicator/status-indicator.tokens.json +38 -0
- package/src/stepper/stepper.css +629 -0
- package/src/stepper/stepper.tokens.json +72 -0
- package/src/switch/switch.css +703 -0
- package/src/switch/switch.tokens.json +75 -0
- package/src/table/table.css +1482 -0
- package/src/table/table.tokens.json +69 -0
- package/src/table-of-contents/table-of-contents.css +533 -0
- package/src/table-of-contents/table-of-contents.tokens.json +53 -0
- package/src/tabs/tabs.css +998 -0
- package/src/tabs/tabs.tokens.json +82 -0
- package/src/tag/tag.css +768 -0
- package/src/tag/tag.tokens.json +85 -0
- package/src/tags-input/tags-input.css +757 -0
- package/src/tags-input/tags-input.tokens.json +84 -0
- package/src/text-field/text-field.css +900 -0
- package/src/text-field/text-field.tokens.json +87 -0
- package/src/textarea/textarea.css +365 -0
- package/src/textarea/textarea.tokens.json +59 -0
- package/src/time-field/time-field.css +719 -0
- package/src/time-field/time-field.tokens.json +86 -0
- package/src/time-picker/time-picker.css +665 -0
- package/src/time-picker/time-picker.tokens.json +66 -0
- package/src/time-range-picker/time-range-picker.css +1287 -0
- package/src/time-range-picker/time-range-picker.tokens.json +134 -0
- package/src/timeline/timeline.css +1596 -0
- package/src/timeline/timeline.tokens.json +96 -0
- package/src/toast/toast.css +943 -0
- package/src/toast/toast.tokens.json +90 -0
- package/src/toggle/toggle.css +290 -0
- package/src/toggle/toggle.tokens.json +54 -0
- package/src/toggle-group/toggle-group.css +463 -0
- package/src/toggle-group/toggle-group.tokens.json +54 -0
- package/src/toolbar/toolbar.css +434 -0
- package/src/toolbar/toolbar.tokens.json +49 -0
- package/src/tooltip/tooltip.css +368 -0
- package/src/tooltip/tooltip.tokens.json +39 -0
- package/src/top-navigation/top-navigation.css +1287 -0
- package/src/top-navigation/top-navigation.tokens.json +91 -0
- package/src/tour/tour.css +680 -0
- package/src/tour/tour.tokens.json +67 -0
- package/src/transfer/transfer.css +571 -0
- package/src/transfer/transfer.tokens.json +49 -0
- package/src/tree/tree.css +1000 -0
- package/src/tree/tree.tokens.json +80 -0
- package/src/typography/typography.css +211 -0
- package/src/typography/typography.tokens.json +31 -0
- package/src/upload/upload.css +1706 -0
- package/src/upload/upload.tokens.json +123 -0
- package/src/visually-hidden/visually-hidden.css +52 -0
- package/src/visually-hidden/visually-hidden.tokens.json +1 -0
- package/src/wizard/wizard.css +740 -0
- package/src/wizard/wizard.tokens.json +63 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-strong",
|
|
3
|
+
"--slotted-border-subtle",
|
|
4
|
+
"--slotted-border-width-medium",
|
|
5
|
+
"--slotted-border-width-thin",
|
|
6
|
+
"--slotted-control-border-color",
|
|
7
|
+
"--slotted-control-border-width",
|
|
8
|
+
"--slotted-control-font-size-lg",
|
|
9
|
+
"--slotted-control-font-size-md",
|
|
10
|
+
"--slotted-control-font-size-sm",
|
|
11
|
+
"--slotted-control-gap-lg",
|
|
12
|
+
"--slotted-control-gap-md",
|
|
13
|
+
"--slotted-control-gap-sm",
|
|
14
|
+
"--slotted-control-height-lg",
|
|
15
|
+
"--slotted-control-height-md",
|
|
16
|
+
"--slotted-control-height-sm",
|
|
17
|
+
"--slotted-control-icon-size-lg",
|
|
18
|
+
"--slotted-control-icon-size-md",
|
|
19
|
+
"--slotted-control-icon-size-sm",
|
|
20
|
+
"--slotted-control-invalid-edge-width",
|
|
21
|
+
"--slotted-control-line-height",
|
|
22
|
+
"--slotted-control-padding-inline-lg",
|
|
23
|
+
"--slotted-control-padding-inline-md",
|
|
24
|
+
"--slotted-control-padding-inline-sm",
|
|
25
|
+
"--slotted-control-radius",
|
|
26
|
+
"--slotted-control-shadow",
|
|
27
|
+
"--slotted-control-transition-duration",
|
|
28
|
+
"--slotted-control-transition-easing",
|
|
29
|
+
"--slotted-disabled-background",
|
|
30
|
+
"--slotted-disabled-border",
|
|
31
|
+
"--slotted-disabled-foreground",
|
|
32
|
+
"--slotted-duration-medium",
|
|
33
|
+
"--slotted-duration-short",
|
|
34
|
+
"--slotted-easing-enter",
|
|
35
|
+
"--slotted-easing-standard",
|
|
36
|
+
"--slotted-filter-bar-chip-seam",
|
|
37
|
+
"--slotted-filter-bar-color",
|
|
38
|
+
"--slotted-filter-bar-color-muted",
|
|
39
|
+
"--slotted-filter-bar-editor-size",
|
|
40
|
+
"--slotted-filter-bar-font-family",
|
|
41
|
+
"--slotted-filter-bar-gap",
|
|
42
|
+
"--slotted-filter-bar-group-border",
|
|
43
|
+
"--slotted-filter-bar-group-surface",
|
|
44
|
+
"--slotted-filter-bar-join-size",
|
|
45
|
+
"--slotted-filter-bar-pill-border",
|
|
46
|
+
"--slotted-filter-bar-pill-radius",
|
|
47
|
+
"--slotted-filter-bar-search-max",
|
|
48
|
+
"--slotted-filter-bar-surface",
|
|
49
|
+
"--slotted-filter-bar-value-max",
|
|
50
|
+
"--slotted-filter-bar-value-max-narrow",
|
|
51
|
+
"--slotted-focus-ring-color",
|
|
52
|
+
"--slotted-focus-ring-offset",
|
|
53
|
+
"--slotted-focus-ring-width",
|
|
54
|
+
"--slotted-font-family-sans",
|
|
55
|
+
"--slotted-font-size-xs",
|
|
56
|
+
"--slotted-font-weight-medium",
|
|
57
|
+
"--slotted-font-weight-regular",
|
|
58
|
+
"--slotted-line-height-md",
|
|
59
|
+
"--slotted-line-height-xs",
|
|
60
|
+
"--slotted-radius-full",
|
|
61
|
+
"--slotted-radius-md",
|
|
62
|
+
"--slotted-radius-sm",
|
|
63
|
+
"--slotted-space-2",
|
|
64
|
+
"--slotted-space-3",
|
|
65
|
+
"--slotted-space-4",
|
|
66
|
+
"--slotted-space-5",
|
|
67
|
+
"--slotted-surface",
|
|
68
|
+
"--slotted-surface-sunken",
|
|
69
|
+
"--slotted-target-comfortable",
|
|
70
|
+
"--slotted-target-min",
|
|
71
|
+
"--slotted-text",
|
|
72
|
+
"--slotted-text-muted",
|
|
73
|
+
"--slotted-tone-danger-border",
|
|
74
|
+
"--slotted-tone-danger-text",
|
|
75
|
+
"--slotted-tone-secondary-subtle-active",
|
|
76
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
77
|
+
"--slotted-z-index-sticky"
|
|
78
|
+
]
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* ── A form, its summary of errors and its row of actions ───────────────
|
|
4
|
+
*
|
|
5
|
+
* The family paints two things and arranges nothing else. Vertical rhythm
|
|
6
|
+
* between fields belongs to `stack` and to `field-group`, which already own
|
|
7
|
+
* arrangement; a form that laid its own children out would be a second
|
|
8
|
+
* answer to a question two families have answered.
|
|
9
|
+
*
|
|
10
|
+
* What it does own is the summary — the region a reader is sent to after a
|
|
11
|
+
* failed submit — and the action row, whose reflow below a container width
|
|
12
|
+
* needs a container query a consumer should not write for every form.
|
|
13
|
+
*
|
|
14
|
+
* Both stand anywhere inside the form, and so do other families' parts of
|
|
15
|
+
* the same names — a `table`'s summary row, a `section`'s actions. The two
|
|
16
|
+
* carry the family's identifier, and every rule names them by it: a rule
|
|
17
|
+
* that reached `[data-part='summary']` as any descendant painted a table's
|
|
18
|
+
* totals as an error panel.
|
|
19
|
+
*/
|
|
20
|
+
[data-ui='form'][data-part='root'] {
|
|
21
|
+
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The form is the container, not the action row. A container cannot answer
|
|
25
|
+
* its own query — `@container` asks the nearest ancestor container — so a
|
|
26
|
+
* `container-type` on the row itself left the reflow rule matching nothing,
|
|
27
|
+
* and the 240-pixel capture showed two buttons still side by side.
|
|
28
|
+
*/
|
|
29
|
+
container-name: slotted-form;
|
|
30
|
+
container-type: inline-size;
|
|
31
|
+
|
|
32
|
+
color: var(--slotted-form-color, var(--slotted-text, CanvasText));
|
|
33
|
+
display: block;
|
|
34
|
+
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
35
|
+
/**
|
|
36
|
+
* A form takes the width it is offered. Its intrinsic width is its
|
|
37
|
+
* min-content width, which for a column of fields is the longest word in
|
|
38
|
+
* it: in a shrink-to-fit stage the React reference page printed every
|
|
39
|
+
* label one character per line and every button as a vertical strip.
|
|
40
|
+
*/
|
|
41
|
+
inline-size: 100%;
|
|
42
|
+
/* And in a grid track narrower than that, it shrinks. */
|
|
43
|
+
min-inline-size: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A form waiting on its own submission says so with the cursor as well as
|
|
48
|
+
* with `aria-busy`, because the pointer is where a reader who just pressed
|
|
49
|
+
* the button already is.
|
|
50
|
+
*/
|
|
51
|
+
[data-ui='form'][data-part='root'][data-loading] {
|
|
52
|
+
cursor: progress;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* ── The summary ──────────────────────────────────────────────────────
|
|
56
|
+
*
|
|
57
|
+
* The four things the GOV.UK error summary states a summary must do: focus
|
|
58
|
+
* moves to it, it carries a heading, it links to each answer in error, and
|
|
59
|
+
* its messages are the same strings the fields show.
|
|
60
|
+
*
|
|
61
|
+
* It is a danger-toned panel rather than a bare list, because a reader
|
|
62
|
+
* arriving at the top of a page after a failed submit has to find it before
|
|
63
|
+
* they read it. The tone tokens are the theme's, so the panel answers the
|
|
64
|
+
* scheme switch instead of being a red box that turns black.
|
|
65
|
+
*/
|
|
66
|
+
[data-ui='form'][data-part='summary'] {
|
|
67
|
+
background-color: var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));
|
|
68
|
+
border: var(--slotted-control-border-width, 1px) solid
|
|
69
|
+
var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));
|
|
70
|
+
/**
|
|
71
|
+
* The edge that carries the tone. A panel bordered evenly reads as a card;
|
|
72
|
+
* the thicker start edge is what a reader's eye finds first in the reading
|
|
73
|
+
* direction, and it survives the high-contrast scheme, where every border
|
|
74
|
+
* is the same black.
|
|
75
|
+
*/
|
|
76
|
+
border-inline-start-width: var(--slotted-border-width-thick, 2px);
|
|
77
|
+
border-radius: var(--slotted-form-summary-radius, var(--slotted-radius-md, 6px));
|
|
78
|
+
color: var(--slotted-form-summary-color, var(--slotted-tone-danger-text));
|
|
79
|
+
display: block;
|
|
80
|
+
font-size: var(--_font-size);
|
|
81
|
+
margin-block-end: var(--slotted-space-6, 1rem);
|
|
82
|
+
padding-block: var(--slotted-space-5, 0.75rem);
|
|
83
|
+
padding-inline: var(--slotted-space-6, 1rem);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The region is focusable so the summary can be reached rather than merely
|
|
88
|
+
* announced, and the ring is the family's own: a `tabindex="-1"` target that
|
|
89
|
+
* showed nothing on focus would move a reader somewhere they cannot see.
|
|
90
|
+
*/
|
|
91
|
+
[data-ui='form'][data-part='summary']:focus-visible {
|
|
92
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
93
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-ui='form'][data-part='summary'] > [data-part='summary-title'] {
|
|
97
|
+
font-family: var(
|
|
98
|
+
--slotted-font-family-heading,
|
|
99
|
+
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
100
|
+
);
|
|
101
|
+
font-size: var(--_font-size);
|
|
102
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
103
|
+
line-height: var(--slotted-line-height-md, 1.5);
|
|
104
|
+
margin: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-ui='form'][data-part='summary'] > [data-part='summary-list'] {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
111
|
+
line-height: var(--slotted-line-height-sm, 1.45);
|
|
112
|
+
/**
|
|
113
|
+
* The markers are withdrawn and the list stays a list. A reader using a
|
|
114
|
+
* screen reader is told how many errors there are by the element; a reader
|
|
115
|
+
* looking at the page is told by the links.
|
|
116
|
+
*/
|
|
117
|
+
list-style: none;
|
|
118
|
+
/**
|
|
119
|
+
* A hundred errors is a real answer from a real server. The list scrolls
|
|
120
|
+
* rather than truncating, because `docs/rebuild-briefing.md` refuses to
|
|
121
|
+
* take content out of the DOM. The ceiling is twelve lines of its own
|
|
122
|
+
* type rather than a fraction of the viewport: a summary that grew with
|
|
123
|
+
* the screen would push the actions off a laptop and not off a phone.
|
|
124
|
+
*/
|
|
125
|
+
margin-block: var(--slotted-space-3, 0.375rem) 0;
|
|
126
|
+
max-block-size: calc(12em * var(--slotted-line-height-sm, 1.45));
|
|
127
|
+
overflow-y: auto;
|
|
128
|
+
/* Room for the ring on a link at the edge of a scrolled box. */
|
|
129
|
+
padding-block: var(--slotted-space-1, 0.125rem);
|
|
130
|
+
padding-inline-start: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-ui='form'][data-part='summary']
|
|
134
|
+
> [data-part='summary-list']
|
|
135
|
+
> li
|
|
136
|
+
> [data-part='summary-item'] {
|
|
137
|
+
color: inherit;
|
|
138
|
+
text-decoration-line: underline;
|
|
139
|
+
text-underline-offset: var(--slotted-space-1, 0.125rem);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[data-ui='form'][data-part='summary']
|
|
143
|
+
> [data-part='summary-list']
|
|
144
|
+
> li
|
|
145
|
+
> [data-part='summary-item']:hover:not(:disabled) {
|
|
146
|
+
text-decoration-thickness: var(--slotted-border-width-thick, 2px);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
[data-ui='form'][data-part='summary']
|
|
150
|
+
> [data-part='summary-list']
|
|
151
|
+
> li
|
|
152
|
+
> [data-part='summary-item']:focus-visible {
|
|
153
|
+
border-radius: var(--slotted-radius-xs, 2px);
|
|
154
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
155
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* ── The action row ───────────────────────────────────────────────────
|
|
159
|
+
*
|
|
160
|
+
* Its own container, because the question it answers is how much room the
|
|
161
|
+
* row has and not how wide the page is. The breakpoint is a literal: CSS
|
|
162
|
+
* forbids a custom property in a container condition, which
|
|
163
|
+
* `docs/token-foundation.md` rule 4 records.
|
|
164
|
+
*/
|
|
165
|
+
[data-ui='form'][data-part='actions'] {
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-wrap: wrap;
|
|
168
|
+
gap: var(--slotted-space-4, 0.5rem);
|
|
169
|
+
justify-content: flex-end;
|
|
170
|
+
margin-block-start: var(--slotted-space-8, 1.5rem);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[data-ui='form'][data-part='actions'][data-align='start'] {
|
|
174
|
+
justify-content: flex-start;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[data-ui='form'][data-part='actions'][data-align='between'] {
|
|
178
|
+
justify-content: space-between;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
[data-ui='form'][data-part='actions'][data-align='stretch'] > * {
|
|
182
|
+
flex: 1 1 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Below the breakpoint two buttons side by side stop being two buttons and
|
|
187
|
+
* become two half-buttons. The row becomes a column and every action takes
|
|
188
|
+
* the whole width — the arrangement a phone needs, decided by the row's own
|
|
189
|
+
* width rather than by the viewport's, so a form in a narrow panel on a wide
|
|
190
|
+
* screen gets it too.
|
|
191
|
+
*
|
|
192
|
+
* The order reverses with it. In a row the primary action sits at the
|
|
193
|
+
* reading end; in a column the reader's thumb is at the bottom, and the
|
|
194
|
+
* action they came to take belongs first.
|
|
195
|
+
*/
|
|
196
|
+
@container slotted-form (max-width: 360px) {
|
|
197
|
+
[data-ui='form'][data-part='actions'] {
|
|
198
|
+
flex-direction: column-reverse;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[data-ui='form'][data-part='actions'] > * {
|
|
202
|
+
inline-size: 100%;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The one block the theme cannot write for the family. The summary's start
|
|
208
|
+
* edge is what tells a forced-colours reader that the panel is the errors
|
|
209
|
+
* and not a note, and a tone surface flattened to `Canvas` would leave the
|
|
210
|
+
* panel with nothing but its border.
|
|
211
|
+
*/
|
|
212
|
+
@media (forced-colors: active) {
|
|
213
|
+
[data-ui='form'][data-part='summary'] {
|
|
214
|
+
border-color: CanvasText;
|
|
215
|
+
border-inline-start-color: Highlight;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-width-thick",
|
|
3
|
+
"--slotted-control-border-width",
|
|
4
|
+
"--slotted-control-font-family",
|
|
5
|
+
"--slotted-control-font-size-md",
|
|
6
|
+
"--slotted-focus-ring-color",
|
|
7
|
+
"--slotted-focus-ring-offset",
|
|
8
|
+
"--slotted-focus-ring-width",
|
|
9
|
+
"--slotted-font-family-heading",
|
|
10
|
+
"--slotted-font-family-sans",
|
|
11
|
+
"--slotted-font-weight-semibold",
|
|
12
|
+
"--slotted-form-color",
|
|
13
|
+
"--slotted-form-summary-background",
|
|
14
|
+
"--slotted-form-summary-border-color",
|
|
15
|
+
"--slotted-form-summary-color",
|
|
16
|
+
"--slotted-form-summary-radius",
|
|
17
|
+
"--slotted-line-height-md",
|
|
18
|
+
"--slotted-line-height-sm",
|
|
19
|
+
"--slotted-radius-md",
|
|
20
|
+
"--slotted-radius-xs",
|
|
21
|
+
"--slotted-space-1",
|
|
22
|
+
"--slotted-space-2",
|
|
23
|
+
"--slotted-space-3",
|
|
24
|
+
"--slotted-space-4",
|
|
25
|
+
"--slotted-space-5",
|
|
26
|
+
"--slotted-space-6",
|
|
27
|
+
"--slotted-space-8",
|
|
28
|
+
"--slotted-text",
|
|
29
|
+
"--slotted-tone-danger-border",
|
|
30
|
+
"--slotted-tone-danger-surface",
|
|
31
|
+
"--slotted-tone-danger-text"
|
|
32
|
+
]
|