@slotted/styles 0.0.0-stage → 0.1.0-beta.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/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,452 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* The panel that edits a grid's column state.
|
|
4
|
+
*
|
|
5
|
+
* ┌─────────────────────────────────────────────┐
|
|
6
|
+
* │ header ▸ title · summary │
|
|
7
|
+
* │ search ▸ text-field (icon) │
|
|
8
|
+
* ├─────────────────────────────────────────────┤
|
|
9
|
+
* │ list ▸ section ▸ section-label │
|
|
10
|
+
* │ item ▸ handle · visibility · pin │
|
|
11
|
+
* │ (checkbox ▸ label, status, │
|
|
12
|
+
* │ description) │
|
|
13
|
+
* │ drop-indicator │
|
|
14
|
+
* │ empty │
|
|
15
|
+
* ├─────────────────────────────────────────────┤
|
|
16
|
+
* │ footer ▸ show-all · reset · cancel · apply │
|
|
17
|
+
* └─────────────────────────────────────────────┘
|
|
18
|
+
*
|
|
19
|
+
* The checkbox, the text field, the buttons and the pin menu are their
|
|
20
|
+
* families', and so are the glyphs: the magnifier, the grip and the pin are
|
|
21
|
+
* each an `icon` holding the library's `Glyph`, drawn by the binding and
|
|
22
|
+
* coloured by the control it stands in. Every part of this family is reached from the root with child
|
|
23
|
+
* combinators, because the checkbox has a `description` and a `label` of its
|
|
24
|
+
* own, and the buttons a `label`: a descendant rule would restyle theirs.
|
|
25
|
+
*
|
|
26
|
+
* Density is answered through the control geometry: the inset is the md
|
|
27
|
+
* control's inline padding and a row's air is the sm control's gap, so a
|
|
28
|
+
* dense panel is tighter by the amount a dense control is.
|
|
29
|
+
*/
|
|
30
|
+
[data-ui='column-manager'] {
|
|
31
|
+
--_text: var(--slotted-text, CanvasText);
|
|
32
|
+
--_muted: var(--slotted-text-muted, GrayText);
|
|
33
|
+
--_rule: var(--slotted-border-subtle, ButtonBorder);
|
|
34
|
+
--_hover: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
35
|
+
--_active: var(--slotted-tone-secondary-subtle-active, ButtonFace);
|
|
36
|
+
--_inset: var(--slotted-control-padding-inline-md, 13px);
|
|
37
|
+
--_row-block: var(--slotted-control-gap-sm, 6px);
|
|
38
|
+
--_gap: var(--slotted-control-gap-md, 8px);
|
|
39
|
+
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
40
|
+
--_line-height: var(--slotted-line-height-md, 1.5);
|
|
41
|
+
/* The checkbox's label line: the family's controls centre on it. */
|
|
42
|
+
--_line: calc(var(--_font-size) * var(--_line-height));
|
|
43
|
+
--_glyph: var(--slotted-control-icon-size-sm, 14px);
|
|
44
|
+
--_control: min(
|
|
45
|
+
calc(var(--_glyph) + 2 * var(--slotted-space-2, 0.25rem)),
|
|
46
|
+
var(--slotted-control-inner-size-md, 24px)
|
|
47
|
+
);
|
|
48
|
+
--_radius: var(--slotted-radius-sm, 4px);
|
|
49
|
+
--_duration: var(--slotted-control-transition-duration);
|
|
50
|
+
--_easing: var(--slotted-control-transition-easing);
|
|
51
|
+
--_inline-size: var(--slotted-column-manager-inline-size, 22rem);
|
|
52
|
+
--_list-max: var(--slotted-column-manager-list-max-block-size, min(60vh, 28rem));
|
|
53
|
+
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
color: var(--_text);
|
|
56
|
+
display: grid;
|
|
57
|
+
font-family: var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif);
|
|
58
|
+
font-size: var(--_font-size);
|
|
59
|
+
grid-template-rows: auto auto minmax(0, 1fr) auto;
|
|
60
|
+
line-height: var(--_line-height);
|
|
61
|
+
max-block-size: 100%;
|
|
62
|
+
min-inline-size: 0;
|
|
63
|
+
text-align: start;
|
|
64
|
+
/* The footer regroups its four actions in two rows below 20rem. */
|
|
65
|
+
container-name: column-manager;
|
|
66
|
+
container-type: inline-size;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* In a popover the root is the panel's one child and states its own width;
|
|
71
|
+
* the popover's lg measure is the cap around it, and the positioner's room
|
|
72
|
+
* the cap around that.
|
|
73
|
+
*/
|
|
74
|
+
[data-ui='column-manager'][data-presentation='popover'] {
|
|
75
|
+
/* The layer sizes to its content, so a percentage here would read a
|
|
76
|
+
width the root itself decides. The positioner's room, less the layer's
|
|
77
|
+
own inset, is the cap a narrow viewport needs. */
|
|
78
|
+
inline-size: min(
|
|
79
|
+
var(--_inline-size),
|
|
80
|
+
calc(var(--slotted-positioner-available-width, 100vw) - var(--slotted-space-8, 1.5rem))
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** In a drawer the root fills the panel and the list takes what is left. */
|
|
85
|
+
[data-ui='column-manager'][data-presentation='drawer'] {
|
|
86
|
+
block-size: 100%;
|
|
87
|
+
inline-size: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[data-ui='column-manager'][data-presentation='inline'] {
|
|
91
|
+
inline-size: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-ui='column-manager'] > [data-part='header'] {
|
|
95
|
+
align-items: baseline;
|
|
96
|
+
column-gap: var(--_gap);
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-wrap: wrap;
|
|
99
|
+
padding-block: var(--_inset) var(--slotted-space-4, 0.5rem);
|
|
100
|
+
padding-inline: var(--_inset);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-ui='column-manager'] > [data-part='header'] > [data-part='title'] {
|
|
104
|
+
color: var(--_text);
|
|
105
|
+
font-family: var(
|
|
106
|
+
--slotted-font-family-heading,
|
|
107
|
+
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
108
|
+
);
|
|
109
|
+
font-size: var(--slotted-font-size-md, 0.875rem);
|
|
110
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
111
|
+
line-height: var(--slotted-line-height-md, 1.5);
|
|
112
|
+
margin: 0;
|
|
113
|
+
min-inline-size: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-ui='column-manager'] > [data-part='header'] > [data-part='summary'] {
|
|
117
|
+
color: var(--_muted);
|
|
118
|
+
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
119
|
+
font-variant-numeric: tabular-nums;
|
|
120
|
+
line-height: var(--slotted-line-height-sm, 1.45);
|
|
121
|
+
margin-inline-start: auto;
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-ui='column-manager'] > [data-part='search'] {
|
|
126
|
+
padding-block-end: var(--_gap);
|
|
127
|
+
padding-inline: var(--_inset);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
[data-ui='column-manager'] > [data-part='search'] > [data-ui='text-field'] {
|
|
131
|
+
inline-size: 100%;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The rows scroll between two rules; the search and the footer stay put. A
|
|
136
|
+
* popover and an inline host bound the list; a drawer gives it the rest of
|
|
137
|
+
* the panel.
|
|
138
|
+
*/
|
|
139
|
+
[data-ui='column-manager'] > [data-part='list'] {
|
|
140
|
+
border-block: var(--slotted-border-width-thin, 1px) solid var(--_rule);
|
|
141
|
+
max-block-size: var(--_list-max);
|
|
142
|
+
min-block-size: 0;
|
|
143
|
+
overflow-y: auto;
|
|
144
|
+
overscroll-behavior: contain;
|
|
145
|
+
padding-block: var(--slotted-space-2, 0.25rem);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
[data-ui='column-manager'][data-presentation='drawer'] > [data-part='list'] {
|
|
149
|
+
max-block-size: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
[data-ui='column-manager'] > [data-part='list'] > [data-part='section'] {
|
|
153
|
+
padding-block: var(--slotted-space-2, 0.25rem);
|
|
154
|
+
position: relative;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[data-ui='column-manager'] > [data-part='list'] > [data-part='section'] + [data-part='section'] {
|
|
158
|
+
border-block-start: var(--slotted-border-width-thin, 1px) solid var(--_rule);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-ui='column-manager']
|
|
162
|
+
> [data-part='list']
|
|
163
|
+
> [data-part='section']
|
|
164
|
+
> [data-part='section-label'] {
|
|
165
|
+
color: var(--_muted);
|
|
166
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
167
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
168
|
+
line-height: var(--slotted-line-height-xs, 1.4);
|
|
169
|
+
padding-block: var(--slotted-space-3, 0.375rem) var(--slotted-space-2, 0.25rem);
|
|
170
|
+
padding-inline: var(--_inset);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* A section alone needs no heading on screen — "Columns" under "Columns" —
|
|
175
|
+
* but the group keeps its name, so the label is read and not shown.
|
|
176
|
+
*/
|
|
177
|
+
[data-ui='column-manager']
|
|
178
|
+
> [data-part='list']
|
|
179
|
+
> [data-part='section'][data-sole]
|
|
180
|
+
> [data-part='section-label'] {
|
|
181
|
+
block-size: 1px;
|
|
182
|
+
clip-path: inset(50%);
|
|
183
|
+
inline-size: 1px;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
padding: 0;
|
|
186
|
+
position: absolute;
|
|
187
|
+
white-space: nowrap;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* A row: the handle, the checkbox, the pin. The two controls stand on the
|
|
192
|
+
* checkbox's first line, so a column with a description keeps them level
|
|
193
|
+
* with its name rather than with the middle of two lines.
|
|
194
|
+
*/
|
|
195
|
+
[data-ui='column-manager'] > [data-part='list'] > [data-part='section'] > [data-part='item'] {
|
|
196
|
+
align-items: start;
|
|
197
|
+
column-gap: var(--slotted-space-2, 0.25rem);
|
|
198
|
+
display: grid;
|
|
199
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
200
|
+
padding-block: var(--_row-block);
|
|
201
|
+
padding-inline: calc(var(--_inset) - var(--slotted-space-2, 0.25rem));
|
|
202
|
+
position: relative;
|
|
203
|
+
transition: opacity var(--_duration) var(--_easing);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[data-ui='column-manager']
|
|
207
|
+
> [data-part='list']
|
|
208
|
+
> [data-part='section']
|
|
209
|
+
> [data-part='item'][data-dragging] {
|
|
210
|
+
opacity: 0.5;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
[data-ui='column-manager']
|
|
214
|
+
> [data-part='list']
|
|
215
|
+
> [data-part='section']
|
|
216
|
+
> [data-part='item']
|
|
217
|
+
> :is([data-part='handle'], [data-part='pin']) {
|
|
218
|
+
align-items: center;
|
|
219
|
+
background-color: transparent;
|
|
220
|
+
block-size: var(--_control);
|
|
221
|
+
border: 0;
|
|
222
|
+
border-radius: var(--_radius);
|
|
223
|
+
color: var(--_muted);
|
|
224
|
+
display: inline-flex;
|
|
225
|
+
flex: none;
|
|
226
|
+
inline-size: var(--_control);
|
|
227
|
+
justify-content: center;
|
|
228
|
+
margin: 0;
|
|
229
|
+
margin-block: calc((var(--_line) - var(--_control)) / 2);
|
|
230
|
+
padding: 0;
|
|
231
|
+
transition:
|
|
232
|
+
background-color var(--_duration) var(--_easing),
|
|
233
|
+
color var(--_duration) var(--_easing);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
[data-ui='column-manager']
|
|
237
|
+
> [data-part='list']
|
|
238
|
+
> [data-part='section']
|
|
239
|
+
> [data-part='item']
|
|
240
|
+
> [data-part='handle'] {
|
|
241
|
+
cursor: grab;
|
|
242
|
+
touch-action: none;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* A pinned column's pin is in the accent ink: the zone it is in is also the
|
|
246
|
+
section it stands under, so the colour is the second of two signals. */
|
|
247
|
+
[data-ui='column-manager']
|
|
248
|
+
> [data-part='list']
|
|
249
|
+
> [data-part='section']
|
|
250
|
+
> [data-part='item']
|
|
251
|
+
> [data-part='pin'][data-pinned] {
|
|
252
|
+
color: var(--slotted-tone-accent-text, LinkText);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[data-ui='column-manager']
|
|
256
|
+
> [data-part='list']
|
|
257
|
+
> [data-part='section']
|
|
258
|
+
> [data-part='item']
|
|
259
|
+
> :is([data-part='handle'], [data-part='pin']):not([data-disabled]):hover,
|
|
260
|
+
[data-ui='column-manager']
|
|
261
|
+
> [data-part='list']
|
|
262
|
+
> [data-part='section']
|
|
263
|
+
> [data-part='item']
|
|
264
|
+
> [data-part='pin'][data-open]:not([data-disabled]) {
|
|
265
|
+
background-color: var(--_hover);
|
|
266
|
+
color: var(--_text);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
[data-ui='column-manager']
|
|
270
|
+
> [data-part='list']
|
|
271
|
+
> [data-part='section']
|
|
272
|
+
> [data-part='item']
|
|
273
|
+
> :is([data-part='handle'], [data-part='pin']):not([data-disabled]):active {
|
|
274
|
+
background-color: var(--_active);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
[data-ui='column-manager']
|
|
278
|
+
> [data-part='list']
|
|
279
|
+
> [data-part='section']
|
|
280
|
+
> [data-part='item']
|
|
281
|
+
> :is([data-part='handle'], [data-part='pin']):focus-visible {
|
|
282
|
+
outline: var(--slotted-focus-ring-width, 2px) solid
|
|
283
|
+
var(--slotted-focus-ring-color, currentColor);
|
|
284
|
+
outline-offset: calc(var(--slotted-focus-ring-width, 2px) * -1);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
[data-ui='column-manager']
|
|
288
|
+
> [data-part='list']
|
|
289
|
+
> [data-part='section']
|
|
290
|
+
> [data-part='item']
|
|
291
|
+
> [data-part='handle'][data-disabled] {
|
|
292
|
+
color: var(--slotted-disabled-foreground, GrayText);
|
|
293
|
+
cursor: default;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
[data-ui='column-manager']
|
|
297
|
+
> [data-part='list']
|
|
298
|
+
> [data-part='section']
|
|
299
|
+
> [data-part='item'][data-dragging]
|
|
300
|
+
> [data-part='handle'] {
|
|
301
|
+
cursor: grabbing;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
[data-ui='column-manager']
|
|
305
|
+
> [data-part='list']
|
|
306
|
+
> [data-part='section']
|
|
307
|
+
> [data-part='item']
|
|
308
|
+
> [data-part='visibility'] {
|
|
309
|
+
display: block;
|
|
310
|
+
min-inline-size: 0;
|
|
311
|
+
overflow-wrap: anywhere;
|
|
312
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
[data-ui='column-manager']
|
|
316
|
+
> [data-part='list']
|
|
317
|
+
> [data-part='section']
|
|
318
|
+
> [data-part='item']
|
|
319
|
+
> [data-part='visibility']
|
|
320
|
+
[data-part='description'] {
|
|
321
|
+
text-wrap: pretty;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Why a box does not do what the reader expects: Required beside a locked
|
|
326
|
+
* column, Hidden for space beside one the grid dropped. It sits in the
|
|
327
|
+
* checkbox's label, so it is heard with the name, a step down in size and
|
|
328
|
+
* ink so the name still reads first.
|
|
329
|
+
*/
|
|
330
|
+
[data-ui='column-manager']
|
|
331
|
+
> [data-part='list']
|
|
332
|
+
> [data-part='section']
|
|
333
|
+
> [data-part='item']
|
|
334
|
+
> [data-part='visibility']
|
|
335
|
+
[data-part='status'] {
|
|
336
|
+
color: var(--_muted);
|
|
337
|
+
display: inline-block;
|
|
338
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
[data-ui='column-manager']
|
|
342
|
+
> [data-part='list']
|
|
343
|
+
> [data-part='section']
|
|
344
|
+
> [data-part='item'][data-space-hidden]
|
|
345
|
+
> [data-part='visibility']
|
|
346
|
+
[data-part='status'] {
|
|
347
|
+
color: var(--slotted-tone-warning-text, CanvasText);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Where a pointer drop would land: a line of no height between two rows, so
|
|
352
|
+
* nothing moves while the reader aims. It is drawn in the section's inset
|
|
353
|
+
* and in the accent solid, the colour the grid's own drop line takes.
|
|
354
|
+
*/
|
|
355
|
+
[data-ui='column-manager']
|
|
356
|
+
> [data-part='list']
|
|
357
|
+
> [data-part='section']
|
|
358
|
+
> [data-part='drop-indicator'] {
|
|
359
|
+
block-size: 0;
|
|
360
|
+
pointer-events: none;
|
|
361
|
+
position: relative;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
[data-ui='column-manager']
|
|
365
|
+
> [data-part='list']
|
|
366
|
+
> [data-part='section']
|
|
367
|
+
> [data-part='drop-indicator']::before {
|
|
368
|
+
background-color: var(--slotted-tone-accent-solid);
|
|
369
|
+
block-size: var(--slotted-border-width-thick, 2px);
|
|
370
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
371
|
+
content: '';
|
|
372
|
+
inset-block-start: calc(var(--slotted-border-width-thick, 2px) / -2);
|
|
373
|
+
inset-inline: var(--_inset);
|
|
374
|
+
position: absolute;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
[data-ui='column-manager'] > [data-part='list'] > [data-part='section'][data-drop-target] {
|
|
378
|
+
background-color: var(--_hover);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
[data-ui='column-manager'] > [data-part='list'] > [data-part='empty'] {
|
|
382
|
+
color: var(--_muted);
|
|
383
|
+
padding-block: var(--slotted-space-8, 1.5rem);
|
|
384
|
+
padding-inline: var(--_inset);
|
|
385
|
+
text-align: center;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
[data-ui='column-manager'] > [data-part='footer'] {
|
|
389
|
+
align-items: center;
|
|
390
|
+
display: flex;
|
|
391
|
+
flex-wrap: wrap;
|
|
392
|
+
gap: var(--_gap);
|
|
393
|
+
padding: var(--_inset);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
[data-ui='column-manager']
|
|
397
|
+
> [data-part='footer']
|
|
398
|
+
> :is([data-part='show-all'], [data-part='reset']) {
|
|
399
|
+
flex: none;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* Cancel and Apply stand at the end, away from the two that act at once. */
|
|
403
|
+
[data-ui='column-manager'] > [data-part='footer'] > [data-part='cancel'] {
|
|
404
|
+
margin-inline-start: auto;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
[data-ui='column-manager'] > [data-part='footer'] > [data-part='apply'] {
|
|
408
|
+
flex: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Below 20rem the four actions stand two by two — the pair that acts at once
|
|
413
|
+
* over the pair that settles the draft — rather than wrapping one by one.
|
|
414
|
+
*/
|
|
415
|
+
@container column-manager (max-width: 20rem) {
|
|
416
|
+
[data-ui='column-manager'] > [data-part='footer'] {
|
|
417
|
+
display: grid;
|
|
418
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
[data-ui='column-manager'] > [data-part='footer'] > [data-part='cancel'] {
|
|
422
|
+
margin-inline-start: 0;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* The trigger is the consumer's button, usually another family's root, so it
|
|
428
|
+
* is reached by the attribute this family writes on it rather than by a
|
|
429
|
+
* part it could not keep. The count is a chip beside the words, in the
|
|
430
|
+
* accent pair, as the notification centre draws an unread count.
|
|
431
|
+
*/
|
|
432
|
+
[data-part='trigger'][data-column-manager-trigger],
|
|
433
|
+
[data-column-manager-trigger] {
|
|
434
|
+
--_count-size: var(--slotted-font-size-xs, 0.75rem);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
[data-column-manager-trigger] [data-part='count'] {
|
|
438
|
+
background-color: var(--slotted-tone-accent-surface, Canvas);
|
|
439
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
440
|
+
box-sizing: border-box;
|
|
441
|
+
color: var(--slotted-tone-accent-text, LinkText);
|
|
442
|
+
display: inline-block;
|
|
443
|
+
font-size: var(--_count-size);
|
|
444
|
+
font-variant-numeric: tabular-nums;
|
|
445
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
446
|
+
line-height: calc(var(--_count-size) + 2 * var(--slotted-space-1, 0.125rem));
|
|
447
|
+
margin-inline-start: var(--slotted-space-3, 0.375rem);
|
|
448
|
+
min-inline-size: calc(var(--_count-size) + 2 * var(--slotted-space-2, 0.25rem));
|
|
449
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
450
|
+
text-align: center;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-subtle",
|
|
3
|
+
"--slotted-border-width-thick",
|
|
4
|
+
"--slotted-border-width-thin",
|
|
5
|
+
"--slotted-column-manager-inline-size",
|
|
6
|
+
"--slotted-column-manager-list-max-block-size",
|
|
7
|
+
"--slotted-control-font-size-md",
|
|
8
|
+
"--slotted-control-gap-md",
|
|
9
|
+
"--slotted-control-gap-sm",
|
|
10
|
+
"--slotted-control-icon-size-sm",
|
|
11
|
+
"--slotted-control-inner-size-md",
|
|
12
|
+
"--slotted-control-padding-inline-md",
|
|
13
|
+
"--slotted-control-transition-duration",
|
|
14
|
+
"--slotted-control-transition-easing",
|
|
15
|
+
"--slotted-disabled-foreground",
|
|
16
|
+
"--slotted-focus-ring-color",
|
|
17
|
+
"--slotted-focus-ring-width",
|
|
18
|
+
"--slotted-font-family-heading",
|
|
19
|
+
"--slotted-font-family-sans",
|
|
20
|
+
"--slotted-font-size-md",
|
|
21
|
+
"--slotted-font-size-sm",
|
|
22
|
+
"--slotted-font-size-xs",
|
|
23
|
+
"--slotted-font-weight-medium",
|
|
24
|
+
"--slotted-font-weight-semibold",
|
|
25
|
+
"--slotted-line-height-md",
|
|
26
|
+
"--slotted-line-height-sm",
|
|
27
|
+
"--slotted-line-height-xs",
|
|
28
|
+
"--slotted-radius-full",
|
|
29
|
+
"--slotted-radius-sm",
|
|
30
|
+
"--slotted-space-1",
|
|
31
|
+
"--slotted-space-2",
|
|
32
|
+
"--slotted-space-3",
|
|
33
|
+
"--slotted-space-4",
|
|
34
|
+
"--slotted-space-8",
|
|
35
|
+
"--slotted-text",
|
|
36
|
+
"--slotted-text-muted",
|
|
37
|
+
"--slotted-tone-accent-solid",
|
|
38
|
+
"--slotted-tone-accent-surface",
|
|
39
|
+
"--slotted-tone-accent-text",
|
|
40
|
+
"--slotted-tone-secondary-subtle-active",
|
|
41
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
42
|
+
"--slotted-tone-warning-text"
|
|
43
|
+
]
|