@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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/package.json +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +113 -89
- package/src/tag/tag.tokens.json +11 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* sunken surface, with each widget a raised card on it; the page decides
|
|
16
16
|
* that ground, and every mark below is drawn to read on it.
|
|
17
17
|
*/
|
|
18
|
-
[data-ui
|
|
18
|
+
[data-ui-dashboard-grid] {
|
|
19
19
|
--_gap: var(--slotted-dashboard-grid-gap, var(--slotted-space-6, 1rem));
|
|
20
20
|
--_row: var(--slotted-dashboard-grid-row-size, 4.5rem);
|
|
21
21
|
--_cols: var(--_dg-columns-expanded, 12);
|
|
@@ -29,10 +29,20 @@
|
|
|
29
29
|
min-inline-size: 0;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* A row is the unit a reader moves and resizes by; the tracks are twelve
|
|
34
|
+
* times finer (`DASHBOARD_SUBROWS` in `@slotted/core/dashboard-grid`), so a
|
|
35
|
+
* widget sized by its content ends within a twelfth of a row's step of it.
|
|
36
|
+
* The tracks have no gap between them: each widget draws the gap as its
|
|
37
|
+
* margin below, inside its own cells, and the grid takes the last one back.
|
|
38
|
+
* A widget of `h` rows is `h` rows and `h - 1` gaps tall, as before.
|
|
39
|
+
*/
|
|
40
|
+
[data-ui-dashboard-grid] > [data-part-grid] {
|
|
41
|
+
column-gap: var(--_gap);
|
|
33
42
|
display: grid;
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
grid-auto-rows: calc((var(--_row) + var(--_gap)) / 12);
|
|
44
|
+
margin-block-end: calc(-1 * var(--_gap));
|
|
45
|
+
row-gap: 0;
|
|
36
46
|
grid-template-columns: repeat(var(--_cols), minmax(0, 1fr));
|
|
37
47
|
list-style: none;
|
|
38
48
|
margin: 0;
|
|
@@ -43,8 +53,8 @@
|
|
|
43
53
|
}
|
|
44
54
|
|
|
45
55
|
/* `display: grid` above would otherwise override the attribute. */
|
|
46
|
-
[data-ui
|
|
47
|
-
[data-ui
|
|
56
|
+
[data-ui-dashboard-grid] [data-part-grid][hidden],
|
|
57
|
+
[data-ui-dashboard-grid] [data-part-widget][hidden] {
|
|
48
58
|
display: none;
|
|
49
59
|
}
|
|
50
60
|
|
|
@@ -52,14 +62,15 @@
|
|
|
52
62
|
* In the expanded class every widget stands at its own cell. The DOM holds
|
|
53
63
|
* them by row, then column, so the order a reader walks is the picture's.
|
|
54
64
|
*/
|
|
55
|
-
[data-ui
|
|
65
|
+
[data-ui-dashboard-grid] :is([data-part-widget], [data-part-placeholder]) {
|
|
56
66
|
grid-column: var(--_dg-x, auto) / span var(--_dg-w, 4);
|
|
57
|
-
grid-row: var(--_dg-y, auto) / span var(--_dg-h,
|
|
67
|
+
grid-row: var(--_dg-y, auto) / span var(--_dg-h, 24);
|
|
68
|
+
margin-block-end: var(--_gap);
|
|
58
69
|
min-block-size: 0;
|
|
59
70
|
min-inline-size: 0;
|
|
60
71
|
}
|
|
61
72
|
|
|
62
|
-
[data-ui
|
|
73
|
+
[data-ui-dashboard-grid] [data-part-widget] {
|
|
63
74
|
display: flex;
|
|
64
75
|
position: relative;
|
|
65
76
|
}
|
|
@@ -68,37 +79,69 @@
|
|
|
68
79
|
* The medium class flows the same order, each widget a half or the whole
|
|
69
80
|
* of the row; its height stays in rows. The compact class is one
|
|
70
81
|
* column whose widgets are as tall as their content, the way a phone reads a
|
|
71
|
-
* dashboard.
|
|
72
|
-
*
|
|
82
|
+
* dashboard. Once the binding has measured the grid it writes the class on
|
|
83
|
+
* the root (`data-size-class`, from `expandedFrom`), and the rules follow
|
|
84
|
+
* the attribute. Before that the container queries draw the classes at the
|
|
85
|
+
* thresholds of §2.7, literal because CSS refuses a custom property in a
|
|
86
|
+
* container condition.
|
|
73
87
|
*/
|
|
74
88
|
@container dashboard-grid (width < 1024px) {
|
|
75
|
-
[data-ui
|
|
89
|
+
[data-ui-dashboard-grid]:not([data-size-class]) > [data-part-grid] {
|
|
76
90
|
--_cols: var(--_dg-columns-medium, 6);
|
|
77
91
|
}
|
|
78
92
|
|
|
79
|
-
[data-ui
|
|
93
|
+
[data-ui-dashboard-grid]:not([data-size-class])
|
|
94
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
80
95
|
grid-column: auto / span var(--_dg-span-medium, 3);
|
|
81
|
-
grid-row: auto / span var(--_dg-h,
|
|
96
|
+
grid-row: auto / span var(--_dg-h, 24);
|
|
82
97
|
}
|
|
83
98
|
}
|
|
84
99
|
|
|
100
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
101
|
+
> [data-part-grid] {
|
|
102
|
+
--_cols: var(--_dg-columns-medium, 6);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
106
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
107
|
+
grid-column: auto / span var(--_dg-span-medium, 3);
|
|
108
|
+
grid-row: auto / span var(--_dg-h, 24);
|
|
109
|
+
}
|
|
110
|
+
|
|
85
111
|
@container dashboard-grid (width < 600px) {
|
|
86
|
-
[data-ui
|
|
112
|
+
[data-ui-dashboard-grid]:not([data-size-class]) > [data-part-grid] {
|
|
87
113
|
--_cols: var(--_dg-columns-compact, 1);
|
|
88
114
|
|
|
89
115
|
grid-auto-rows: auto;
|
|
90
116
|
}
|
|
91
117
|
|
|
92
|
-
[data-ui
|
|
118
|
+
[data-ui-dashboard-grid]:not([data-size-class])
|
|
119
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
93
120
|
grid-column: 1 / -1;
|
|
94
121
|
grid-row: auto;
|
|
95
122
|
}
|
|
96
123
|
|
|
97
|
-
[data-ui
|
|
124
|
+
[data-ui-dashboard-grid]:not([data-size-class]) [data-part-placeholder] {
|
|
98
125
|
min-block-size: calc(var(--_row) * 2);
|
|
99
126
|
}
|
|
100
127
|
}
|
|
101
128
|
|
|
129
|
+
[data-ui-dashboard-grid][data-size-class='compact'] > [data-part-grid] {
|
|
130
|
+
--_cols: var(--_dg-columns-compact, 1);
|
|
131
|
+
|
|
132
|
+
grid-auto-rows: auto;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[data-ui-dashboard-grid][data-size-class='compact']
|
|
136
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
137
|
+
grid-column: 1 / -1;
|
|
138
|
+
grid-row: auto;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
[data-ui-dashboard-grid][data-size-class='compact'] [data-part-placeholder] {
|
|
142
|
+
min-block-size: calc(var(--_row) * 2);
|
|
143
|
+
}
|
|
144
|
+
|
|
102
145
|
/* ── The widget ──────────────────────────────────────────────────────── */
|
|
103
146
|
|
|
104
147
|
/**
|
|
@@ -107,17 +150,20 @@
|
|
|
107
150
|
* than the cell grows into it, so a chart or a figure uses the height the
|
|
108
151
|
* reader gave the widget rather than stopping at its own size step.
|
|
109
152
|
*/
|
|
110
|
-
[data-ui
|
|
153
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-ui-card] {
|
|
111
154
|
flex: 1 1 auto;
|
|
112
155
|
min-block-size: 0;
|
|
113
156
|
min-inline-size: 0;
|
|
114
157
|
transition: box-shadow var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
115
158
|
}
|
|
116
159
|
|
|
117
|
-
[data-ui
|
|
160
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-ui-card] > [data-part-body] {
|
|
118
161
|
/* A chart's plot takes whatever height the widget leaves it, down to a
|
|
119
|
-
floor of one and a half rows, instead of its own size step
|
|
162
|
+
floor of one and a half rows, instead of its own size step: the
|
|
163
|
+
reader sizes a widget, and every step answers to that size. */
|
|
120
164
|
--slotted-chart-plot-block-size: calc(var(--_row) * 1.5);
|
|
165
|
+
--slotted-chart-plot-block-size-sm: calc(var(--_row) * 1.5);
|
|
166
|
+
--slotted-chart-plot-block-size-lg: calc(var(--_row) * 1.5);
|
|
121
167
|
|
|
122
168
|
display: flex;
|
|
123
169
|
flex-direction: column;
|
|
@@ -128,20 +174,30 @@
|
|
|
128
174
|
/* The content grows into a taller cell and never shrinks under its own
|
|
129
175
|
height: shrunk, it overflowed its own box, and the body scrolled only that
|
|
130
176
|
overflow, so its last rows and the end padding stayed out of reach. */
|
|
131
|
-
[data-ui
|
|
132
|
-
[data-part
|
|
133
|
-
> [data-ui
|
|
134
|
-
> [data-part
|
|
135
|
-
> :not([data-part
|
|
177
|
+
[data-ui-dashboard-grid]
|
|
178
|
+
[data-part-widget]
|
|
179
|
+
> [data-ui-card]
|
|
180
|
+
> [data-part-body]
|
|
181
|
+
> :not([data-part-busy-indicator]) {
|
|
136
182
|
flex: 1 0 auto;
|
|
137
183
|
}
|
|
138
184
|
|
|
185
|
+
/* A widget sized by its content is measured by it: what its body holds
|
|
186
|
+
keeps its own height, and the cell is that height to a twelfth of a row. */
|
|
187
|
+
[data-ui-dashboard-grid]
|
|
188
|
+
[data-part-widget][data-rows='auto']
|
|
189
|
+
> [data-ui-card]
|
|
190
|
+
> [data-part-body]
|
|
191
|
+
> :not([data-part-busy-indicator]) {
|
|
192
|
+
flex-grow: 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
139
195
|
/**
|
|
140
196
|
* The title is the widget's name and a card header's first line: the
|
|
141
197
|
* medium step, semibold, two lines and then an ellipsis. The clamp never
|
|
142
198
|
* removes a word from the DOM, and the article is named by the whole of it.
|
|
143
199
|
*/
|
|
144
|
-
[data-ui
|
|
200
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-title] {
|
|
145
201
|
-webkit-box-orient: vertical;
|
|
146
202
|
color: var(--slotted-dashboard-grid-title-color, var(--slotted-text, CanvasText));
|
|
147
203
|
display: -webkit-box;
|
|
@@ -165,7 +221,53 @@
|
|
|
165
221
|
overflow-wrap: anywhere;
|
|
166
222
|
}
|
|
167
223
|
|
|
168
|
-
|
|
224
|
+
/* The title and its help control on one row, on the baseline of the title's
|
|
225
|
+
first line. The row takes the title's type, so the inline icon button is
|
|
226
|
+
drawn from the title's capital and adds nothing to the row's height. */
|
|
227
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-title-row] {
|
|
228
|
+
align-items: baseline;
|
|
229
|
+
display: flex;
|
|
230
|
+
font-family: var(
|
|
231
|
+
--slotted-dashboard-grid-title-font-family,
|
|
232
|
+
var(
|
|
233
|
+
--slotted-font-family-heading,
|
|
234
|
+
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
235
|
+
)
|
|
236
|
+
);
|
|
237
|
+
font-size: var(
|
|
238
|
+
--slotted-dashboard-grid-title-font-size,
|
|
239
|
+
var(--slotted-font-size-md, 0.8125rem)
|
|
240
|
+
);
|
|
241
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
242
|
+
line-height: var(--slotted-line-height-md, 1.5);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* An annotation of the title rather than a button beside it. Its ground says
|
|
246
|
+
it is a control under the pointer, and that the note is its own when open. */
|
|
247
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-title-row] > [data-part-help] {
|
|
248
|
+
flex: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-ui-dashboard-grid]
|
|
252
|
+
[data-part-widget]
|
|
253
|
+
[data-part-title-row]
|
|
254
|
+
> [data-part-help][data-inline][data-variant]:hover:not(:disabled):not([data-disabled]):not(
|
|
255
|
+
[data-loading]
|
|
256
|
+
),
|
|
257
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-title-row] > [data-part-help][data-open] {
|
|
258
|
+
background: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The note behind it holds a few sentences, wider than the small popover's
|
|
263
|
+
* measure. The layer is portaled out of the grid, so the rule finds it by
|
|
264
|
+
* the note it holds, and the width is a theme token for every widget.
|
|
265
|
+
*/
|
|
266
|
+
[data-ui-popover][data-size]:has([data-part-help-note]) {
|
|
267
|
+
--_measure: var(--slotted-dashboard-grid-help-measure, 20rem);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-description] {
|
|
169
271
|
color: var(--slotted-dashboard-grid-description-color, var(--slotted-text-muted, GrayText));
|
|
170
272
|
font-size: var(--slotted-font-size-sm, 0.75rem);
|
|
171
273
|
line-height: var(--slotted-line-height-sm, 1.5);
|
|
@@ -175,7 +277,7 @@
|
|
|
175
277
|
|
|
176
278
|
/* The corner of the header: the consumer's actions, then the way to the
|
|
177
279
|
widget's own page, on the title's row without adding to its height. */
|
|
178
|
-
[data-ui
|
|
280
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-actions] {
|
|
179
281
|
flex-wrap: nowrap;
|
|
180
282
|
gap: var(--slotted-space-1, 0.125rem);
|
|
181
283
|
margin-block: calc(
|
|
@@ -199,19 +301,19 @@
|
|
|
199
301
|
* its own: the family does not know what the body holds, but does know its
|
|
200
302
|
* box — the grid fixed it.
|
|
201
303
|
*/
|
|
202
|
-
[data-ui
|
|
304
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-skeleton] {
|
|
203
305
|
display: flex;
|
|
204
306
|
flex-direction: column;
|
|
205
307
|
min-block-size: var(--slotted-space-12, 4rem);
|
|
206
308
|
}
|
|
207
309
|
|
|
208
|
-
[data-ui
|
|
310
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-skeleton] > [data-ui-skeleton] {
|
|
209
311
|
block-size: auto;
|
|
210
312
|
flex: 1 1 auto;
|
|
211
313
|
inline-size: 100%;
|
|
212
314
|
}
|
|
213
315
|
|
|
214
|
-
[data-ui
|
|
316
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-message] {
|
|
215
317
|
align-content: center;
|
|
216
318
|
display: grid;
|
|
217
319
|
justify-items: center;
|
|
@@ -222,7 +324,7 @@
|
|
|
222
324
|
* the body, where Grafana draws its panel's. It is aria-hidden: the article
|
|
223
325
|
* carries `aria-busy`, which is the fact, and the line is only its picture.
|
|
224
326
|
*/
|
|
225
|
-
[data-ui
|
|
327
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-busy-indicator] {
|
|
226
328
|
background-color: var(--_accent);
|
|
227
329
|
block-size: var(--slotted-border-width-medium, 2px);
|
|
228
330
|
inset-block-start: 0;
|
|
@@ -233,7 +335,7 @@
|
|
|
233
335
|
}
|
|
234
336
|
|
|
235
337
|
@media (prefers-reduced-motion: no-preference) {
|
|
236
|
-
[data-ui
|
|
338
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-busy-indicator] {
|
|
237
339
|
animation: slotted-dashboard-grid-busy var(--slotted-duration-loop-slow) linear infinite;
|
|
238
340
|
background-color: transparent;
|
|
239
341
|
background-image: linear-gradient(to right, transparent, var(--_accent) 50%, transparent);
|
|
@@ -244,7 +346,7 @@
|
|
|
244
346
|
}
|
|
245
347
|
|
|
246
348
|
@media (prefers-reduced-motion: reduce) {
|
|
247
|
-
[data-ui
|
|
349
|
+
[data-ui-dashboard-grid] [data-part-widget] [data-part-busy-indicator] {
|
|
248
350
|
animation: none;
|
|
249
351
|
}
|
|
250
352
|
}
|
|
@@ -266,7 +368,7 @@
|
|
|
266
368
|
* the card's hairline and the smallest lift — so on the sunken page it reads
|
|
267
369
|
* as a tool laid over the dashboard rather than a stripe cut into it.
|
|
268
370
|
*/
|
|
269
|
-
[data-ui
|
|
371
|
+
[data-ui-dashboard-grid] > [data-part-edit-bar] {
|
|
270
372
|
align-items: center;
|
|
271
373
|
background-color: var(
|
|
272
374
|
--slotted-dashboard-grid-edit-bar-background,
|
|
@@ -284,19 +386,19 @@
|
|
|
284
386
|
}
|
|
285
387
|
|
|
286
388
|
@starting-style {
|
|
287
|
-
[data-ui
|
|
389
|
+
[data-ui-dashboard-grid] > [data-part-edit-bar] {
|
|
288
390
|
opacity: 0;
|
|
289
391
|
translate: 0 calc(var(--slotted-space-4, 0.5rem) * -1);
|
|
290
392
|
}
|
|
291
393
|
}
|
|
292
394
|
|
|
293
|
-
[data-ui
|
|
395
|
+
[data-ui-dashboard-grid] > [data-part-edit-bar] {
|
|
294
396
|
transition:
|
|
295
397
|
opacity var(--slotted-duration-medium) var(--slotted-easing-enter),
|
|
296
398
|
translate var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
297
399
|
}
|
|
298
400
|
|
|
299
|
-
[data-ui
|
|
401
|
+
[data-ui-dashboard-grid] > [data-part-edit-bar] > [data-part-edit-status] {
|
|
300
402
|
color: var(--slotted-text-muted, GrayText);
|
|
301
403
|
flex: 1 1 20rem;
|
|
302
404
|
font-size: var(--slotted-font-size-sm, 0.75rem);
|
|
@@ -305,7 +407,7 @@
|
|
|
305
407
|
min-inline-size: 0;
|
|
306
408
|
}
|
|
307
409
|
|
|
308
|
-
[data-ui
|
|
410
|
+
[data-ui-dashboard-grid] > [data-part-edit-bar] > [data-part-edit-actions] {
|
|
309
411
|
align-items: center;
|
|
310
412
|
display: flex;
|
|
311
413
|
flex-wrap: wrap;
|
|
@@ -317,7 +419,7 @@
|
|
|
317
419
|
/* ── Editing: the lattice ────────────────────────────────────────────── */
|
|
318
420
|
|
|
319
421
|
/**
|
|
320
|
-
* The cells a widget snaps to are shown by their
|
|
422
|
+
* The cells a widget snaps to are shown by their centers: one dot in the
|
|
321
423
|
* middle of each cell. One period is a track and a gap on each axis and
|
|
322
424
|
* the dot sits at the middle of the track, so the lattice lands on the
|
|
323
425
|
* cells from either edge and holds in a right-to-left document without a
|
|
@@ -325,7 +427,7 @@
|
|
|
325
427
|
* dot that shows marks a free cell; a dot on the crossing of two gaps
|
|
326
428
|
* showed between cards and under them, where no widget can land.
|
|
327
429
|
*/
|
|
328
|
-
[data-ui
|
|
430
|
+
[data-ui-dashboard-grid] > [data-part-grid]::before {
|
|
329
431
|
background-image: radial-gradient(
|
|
330
432
|
circle at calc((100% - var(--_gap)) / 2) calc((100% - var(--_gap)) / 2),
|
|
331
433
|
var(--slotted-dashboard-grid-lattice-color, var(--slotted-border-strong, currentColor))
|
|
@@ -341,49 +443,54 @@
|
|
|
341
443
|
transition: opacity var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
342
444
|
}
|
|
343
445
|
|
|
344
|
-
[data-ui
|
|
446
|
+
[data-ui-dashboard-grid][data-editing] > [data-part-grid] {
|
|
345
447
|
min-block-size: calc(var(--_row) * 2 + var(--_gap));
|
|
346
448
|
}
|
|
347
449
|
|
|
348
|
-
[data-ui
|
|
450
|
+
[data-ui-dashboard-grid][data-editing] > [data-part-grid]::before {
|
|
349
451
|
opacity: 0.7;
|
|
350
452
|
}
|
|
351
453
|
|
|
352
454
|
/* While a widget is carried or pulled the lattice is what it snaps to, so
|
|
353
455
|
it comes forward. The attribute is on the grid, in the compound it styles:
|
|
354
456
|
a browser invalidates by attribute name, and on the root ahead of
|
|
355
|
-
`> [data-part
|
|
457
|
+
`> [data-part-grid]` it restyled every element with a `data-part`
|
|
356
458
|
under the root as a widget was picked up and as it was dropped. */
|
|
357
|
-
[data-ui
|
|
459
|
+
[data-ui-dashboard-grid] > [data-part-grid][data-gesture]::before {
|
|
358
460
|
opacity: 1;
|
|
359
461
|
}
|
|
360
462
|
|
|
361
463
|
/* Below the expanded class the widgets flow, so no cell is a place to drop
|
|
362
464
|
on and the lattice would be specks in the gaps. */
|
|
363
465
|
@container dashboard-grid (width < 1024px) {
|
|
364
|
-
[data-ui
|
|
466
|
+
[data-ui-dashboard-grid]:not([data-size-class]) > [data-part-grid]::before {
|
|
365
467
|
display: none;
|
|
366
468
|
}
|
|
367
469
|
}
|
|
368
470
|
|
|
471
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
472
|
+
> [data-part-grid]::before {
|
|
473
|
+
display: none;
|
|
474
|
+
}
|
|
475
|
+
|
|
369
476
|
/* ── Editing: the widget ─────────────────────────────────────────────── */
|
|
370
477
|
|
|
371
478
|
/* The whole card is a place to pick the widget up from; its controls keep
|
|
372
479
|
their own cursor because each is its own target. */
|
|
373
|
-
[data-ui
|
|
480
|
+
[data-ui-dashboard-grid][data-editing] [data-part-widget][data-movable] > [data-ui-card] {
|
|
374
481
|
cursor: grab;
|
|
375
482
|
}
|
|
376
483
|
|
|
377
|
-
[data-ui
|
|
378
|
-
[data-part
|
|
379
|
-
> [data-ui
|
|
484
|
+
[data-ui-dashboard-grid][data-editing]
|
|
485
|
+
[data-part-widget][data-movable]
|
|
486
|
+
> [data-ui-card]
|
|
380
487
|
:is(a, button, input, select, textarea, [tabindex]) {
|
|
381
488
|
cursor: auto;
|
|
382
489
|
}
|
|
383
490
|
|
|
384
|
-
[data-ui
|
|
385
|
-
[data-part
|
|
386
|
-
> [data-ui
|
|
491
|
+
[data-ui-dashboard-grid][data-editing]
|
|
492
|
+
[data-part-widget]:not([data-loading]):hover
|
|
493
|
+
> [data-ui-card] {
|
|
387
494
|
box-shadow: var(--slotted-shadow-sm);
|
|
388
495
|
}
|
|
389
496
|
|
|
@@ -395,7 +502,7 @@
|
|
|
395
502
|
* pill is drawn on the raised surface with the control's own edge, so it
|
|
396
503
|
* reads as part of the card rather than as a button beside it.
|
|
397
504
|
*/
|
|
398
|
-
[data-ui
|
|
505
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-handle] {
|
|
399
506
|
--_pill-inline: var(--slotted-dashboard-grid-handle-inline-size, 2.25rem);
|
|
400
507
|
--_pill-block: var(--slotted-dashboard-grid-handle-block-size, 1rem);
|
|
401
508
|
|
|
@@ -430,7 +537,7 @@
|
|
|
430
537
|
}
|
|
431
538
|
|
|
432
539
|
@starting-style {
|
|
433
|
-
[data-ui
|
|
540
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-handle] {
|
|
434
541
|
opacity: 0;
|
|
435
542
|
translate: 0 var(--slotted-space-3, 0.375rem);
|
|
436
543
|
}
|
|
@@ -438,7 +545,7 @@
|
|
|
438
545
|
|
|
439
546
|
/* The pill is small to the eye and not to the hand: the hit area reaches
|
|
440
547
|
the target floor on both axes. */
|
|
441
|
-
[data-ui
|
|
548
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-handle]::before {
|
|
442
549
|
content: '';
|
|
443
550
|
inset: calc((var(--slotted-target-min, 24px) - var(--_pill-block)) / -2)
|
|
444
551
|
calc(var(--slotted-space-4, 0.5rem) * -1);
|
|
@@ -446,28 +553,28 @@
|
|
|
446
553
|
}
|
|
447
554
|
|
|
448
555
|
/* The grip is an `icon` the binding draws; the pill gives it its size. */
|
|
449
|
-
[data-ui
|
|
556
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-handle] > [data-ui-icon] {
|
|
450
557
|
--slotted-icon-size: var(--slotted-dashboard-grid-handle-glyph-size, 0.875rem);
|
|
451
558
|
}
|
|
452
559
|
|
|
453
|
-
[data-ui
|
|
454
|
-
[data-part
|
|
455
|
-
> [data-part
|
|
560
|
+
[data-ui-dashboard-grid][data-editing]
|
|
561
|
+
[data-part-widget]:not([data-loading]):hover
|
|
562
|
+
> [data-part-handle] {
|
|
456
563
|
border-color: var(--slotted-border-strong, ButtonBorder);
|
|
457
564
|
color: var(--slotted-text, CanvasText);
|
|
458
565
|
}
|
|
459
566
|
|
|
460
|
-
[data-ui
|
|
567
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-handle]:focus-visible {
|
|
461
568
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
462
569
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
463
570
|
}
|
|
464
571
|
|
|
465
572
|
/* Carried, or its menu open: the pill takes the accent, the one mark on the
|
|
466
573
|
page that says which widget the reader has in hand. */
|
|
467
|
-
[data-ui
|
|
468
|
-
[data-part
|
|
469
|
-
> [data-part
|
|
470
|
-
[data-ui
|
|
574
|
+
[data-ui-dashboard-grid]
|
|
575
|
+
[data-part-widget]:is([data-dragging], [data-resizing])
|
|
576
|
+
> [data-part-handle],
|
|
577
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-handle][aria-expanded='true'] {
|
|
471
578
|
background-color: var(--_accent);
|
|
472
579
|
border-color: var(--_accent);
|
|
473
580
|
color: var(--slotted-tone-accent-on-solid, HighlightText);
|
|
@@ -482,7 +589,7 @@
|
|
|
482
589
|
* are quiet until the widget is under the pointer, and always shown to a
|
|
483
590
|
* finger, which has no hover.
|
|
484
591
|
*/
|
|
485
|
-
[data-ui
|
|
592
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-resize-handle] {
|
|
486
593
|
--_hit: var(--slotted-dashboard-grid-resize-hit, 0.75rem);
|
|
487
594
|
--_mark: var(--slotted-border-strong, currentColor);
|
|
488
595
|
|
|
@@ -493,30 +600,30 @@
|
|
|
493
600
|
z-index: 2;
|
|
494
601
|
}
|
|
495
602
|
|
|
496
|
-
[data-ui
|
|
497
|
-
[data-part
|
|
498
|
-
> [data-part
|
|
499
|
-
[data-ui
|
|
500
|
-
[data-part
|
|
501
|
-
> [data-part
|
|
502
|
-
[data-ui
|
|
603
|
+
[data-ui-dashboard-grid][data-editing]
|
|
604
|
+
[data-part-widget]:not([data-loading]):hover
|
|
605
|
+
> [data-part-resize-handle],
|
|
606
|
+
[data-ui-dashboard-grid][data-editing]
|
|
607
|
+
[data-part-widget]:focus-within
|
|
608
|
+
> [data-part-resize-handle],
|
|
609
|
+
[data-ui-dashboard-grid] [data-part-widget][data-resizing] > [data-part-resize-handle] {
|
|
503
610
|
opacity: 1;
|
|
504
611
|
}
|
|
505
612
|
|
|
506
613
|
@media (pointer: coarse) {
|
|
507
|
-
[data-ui
|
|
614
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-resize-handle] {
|
|
508
615
|
--_hit: var(--slotted-target-comfortable, 44px);
|
|
509
616
|
|
|
510
617
|
opacity: 1;
|
|
511
618
|
}
|
|
512
619
|
|
|
513
|
-
[data-ui
|
|
620
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-handle] {
|
|
514
621
|
--_pill-inline: var(--slotted-dashboard-grid-handle-inline-size-coarse, 2.75rem);
|
|
515
622
|
--_pill-block: var(--slotted-dashboard-grid-handle-block-size-coarse, 1.25rem);
|
|
516
623
|
}
|
|
517
624
|
}
|
|
518
625
|
|
|
519
|
-
[data-ui
|
|
626
|
+
[data-ui-dashboard-grid] [data-part-resize-handle]::before {
|
|
520
627
|
background-color: var(--_mark);
|
|
521
628
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
522
629
|
content: '';
|
|
@@ -529,68 +636,67 @@
|
|
|
529
636
|
inline-size var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
530
637
|
}
|
|
531
638
|
|
|
532
|
-
[data-ui
|
|
533
|
-
[data-part='resize-handle']:is([data-edge='start'], [data-edge='end']) {
|
|
639
|
+
[data-ui-dashboard-grid] [data-part-resize-handle]:is([data-edge='start'], [data-edge='end']) {
|
|
534
640
|
cursor: ew-resize;
|
|
535
641
|
inline-size: var(--_hit);
|
|
536
642
|
inset-block: calc(var(--_radius) + var(--_hit) / 2);
|
|
537
643
|
}
|
|
538
644
|
|
|
539
|
-
[data-ui
|
|
645
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='start'] {
|
|
540
646
|
inset-inline-start: calc(var(--_hit) / -2);
|
|
541
647
|
}
|
|
542
648
|
|
|
543
|
-
[data-ui
|
|
649
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='end'] {
|
|
544
650
|
inset-inline-end: calc(var(--_hit) / -2);
|
|
545
651
|
}
|
|
546
652
|
|
|
547
|
-
[data-ui
|
|
548
|
-
[data-part
|
|
653
|
+
[data-ui-dashboard-grid]
|
|
654
|
+
[data-part-resize-handle]:is([data-edge='start'], [data-edge='end'])::before {
|
|
549
655
|
block-size: var(--slotted-dashboard-grid-resize-pill, 1.75rem);
|
|
550
656
|
inline-size: var(--slotted-border-width-thick, 3px);
|
|
551
657
|
}
|
|
552
658
|
|
|
553
|
-
[data-ui
|
|
659
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom'] {
|
|
554
660
|
block-size: var(--_hit);
|
|
555
661
|
cursor: ns-resize;
|
|
556
662
|
inset-block-end: calc(var(--_hit) / -2);
|
|
557
663
|
inset-inline: calc(var(--_radius) + var(--_hit) / 2);
|
|
558
664
|
}
|
|
559
665
|
|
|
560
|
-
[data-ui
|
|
666
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom']::before {
|
|
561
667
|
block-size: var(--slotted-border-width-thick, 3px);
|
|
562
668
|
inline-size: var(--slotted-dashboard-grid-resize-pill, 1.75rem);
|
|
563
669
|
}
|
|
564
670
|
|
|
565
|
-
[data-ui
|
|
566
|
-
[data-part
|
|
671
|
+
[data-ui-dashboard-grid]
|
|
672
|
+
[data-part-resize-handle]:is([data-edge='bottom-start'], [data-edge='bottom-end']) {
|
|
567
673
|
block-size: calc(var(--_hit) * 1.5);
|
|
568
674
|
inline-size: calc(var(--_hit) * 1.5);
|
|
569
675
|
inset-block-end: calc(var(--_hit) / -2);
|
|
570
676
|
}
|
|
571
677
|
|
|
572
|
-
[data-ui
|
|
678
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom-end'] {
|
|
573
679
|
cursor: nwse-resize;
|
|
574
680
|
inset-inline-end: calc(var(--_hit) / -2);
|
|
575
681
|
}
|
|
576
682
|
|
|
577
|
-
[data-ui
|
|
683
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom-start'] {
|
|
578
684
|
cursor: nesw-resize;
|
|
579
685
|
inset-inline-start: calc(var(--_hit) / -2);
|
|
580
686
|
}
|
|
581
687
|
|
|
582
|
-
[data-ui
|
|
688
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom-end']:dir(rtl) {
|
|
583
689
|
cursor: nesw-resize;
|
|
584
690
|
}
|
|
585
691
|
|
|
586
|
-
[data-ui
|
|
692
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom-start']:dir(rtl) {
|
|
587
693
|
cursor: nwse-resize;
|
|
588
694
|
}
|
|
589
695
|
|
|
590
696
|
/* The corner mark is an arc on the card's own corner: a quarter of a ring
|
|
591
697
|
whose radius is the card's, drawn over the card's edge. */
|
|
592
|
-
[data-ui
|
|
593
|
-
[data-part
|
|
698
|
+
[data-ui-dashboard-grid]
|
|
699
|
+
[data-part-resize-handle]:is([data-edge='bottom-start'], [data-edge='bottom-end'])::before {
|
|
594
700
|
background-color: transparent;
|
|
595
701
|
block-size: var(--_radius);
|
|
596
702
|
border-block-end: var(--slotted-border-width-thick, 3px) solid var(--_mark);
|
|
@@ -601,13 +707,13 @@
|
|
|
601
707
|
margin: 0;
|
|
602
708
|
}
|
|
603
709
|
|
|
604
|
-
[data-ui
|
|
710
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom-end']::before {
|
|
605
711
|
border-end-end-radius: var(--_radius);
|
|
606
712
|
border-inline-end: var(--slotted-border-width-thick, 3px) solid var(--_mark);
|
|
607
713
|
inset-inline-end: calc(var(--_hit) / 2 - var(--slotted-border-width-thin, 1px));
|
|
608
714
|
}
|
|
609
715
|
|
|
610
|
-
[data-ui
|
|
716
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-edge='bottom-start']::before {
|
|
611
717
|
border-end-start-radius: var(--_radius);
|
|
612
718
|
border-inline-start: var(--slotted-border-width-thick, 3px) solid var(--_mark);
|
|
613
719
|
inset-inline-start: calc(var(--_hit) / 2 - var(--slotted-border-width-thin, 1px));
|
|
@@ -615,21 +721,21 @@
|
|
|
615
721
|
|
|
616
722
|
/* Under the pointer, and while it is pulled, the mark takes the accent and
|
|
617
723
|
the edge pill grows, so the reader sees which side answers. */
|
|
618
|
-
[data-ui
|
|
619
|
-
[data-ui
|
|
724
|
+
[data-ui-dashboard-grid] [data-part-resize-handle]:not([data-disabled]):hover,
|
|
725
|
+
[data-ui-dashboard-grid] [data-part-resize-handle][data-active] {
|
|
620
726
|
--_mark: var(--_accent);
|
|
621
727
|
}
|
|
622
728
|
|
|
623
|
-
[data-ui
|
|
624
|
-
[data-part
|
|
729
|
+
[data-ui-dashboard-grid]
|
|
730
|
+
[data-part-resize-handle]:is([data-edge='start'], [data-edge='end']):is(
|
|
625
731
|
:not([data-disabled]):hover,
|
|
626
732
|
[data-active]
|
|
627
733
|
)::before {
|
|
628
734
|
block-size: var(--slotted-dashboard-grid-resize-pill-active, 2.75rem);
|
|
629
735
|
}
|
|
630
736
|
|
|
631
|
-
[data-ui
|
|
632
|
-
[data-part
|
|
737
|
+
[data-ui-dashboard-grid]
|
|
738
|
+
[data-part-resize-handle][data-edge='bottom']:is(
|
|
633
739
|
:not([data-disabled]):hover,
|
|
634
740
|
[data-active]
|
|
635
741
|
)::before {
|
|
@@ -639,21 +745,33 @@
|
|
|
639
745
|
/* The medium class flows the widgets, so a widget's start is where the one
|
|
640
746
|
before it ends: there is no start edge to pull. */
|
|
641
747
|
@container dashboard-grid (width < 1024px) {
|
|
642
|
-
[data-ui
|
|
643
|
-
[data-part
|
|
644
|
-
> [data-part
|
|
748
|
+
[data-ui-dashboard-grid]:not([data-size-class])
|
|
749
|
+
[data-part-widget]
|
|
750
|
+
> [data-part-resize-handle]:is([data-edge='start'], [data-edge='bottom-start']) {
|
|
645
751
|
display: none;
|
|
646
752
|
}
|
|
647
753
|
}
|
|
648
754
|
|
|
755
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
756
|
+
[data-part-widget]
|
|
757
|
+
> [data-part-resize-handle]:is([data-edge='start'], [data-edge='bottom-start']) {
|
|
758
|
+
display: none;
|
|
759
|
+
}
|
|
760
|
+
|
|
649
761
|
/* A phone reads a dashboard as one column as tall as its content: there is
|
|
650
762
|
no size to pull, only an order to change. */
|
|
651
763
|
@container dashboard-grid (width < 600px) {
|
|
652
|
-
[data-ui
|
|
764
|
+
[data-ui-dashboard-grid]:not([data-size-class]) [data-part-widget] > [data-part-resize-handle] {
|
|
653
765
|
display: none;
|
|
654
766
|
}
|
|
655
767
|
}
|
|
656
768
|
|
|
769
|
+
[data-ui-dashboard-grid][data-size-class='compact']
|
|
770
|
+
[data-part-widget]
|
|
771
|
+
> [data-part-resize-handle] {
|
|
772
|
+
display: none;
|
|
773
|
+
}
|
|
774
|
+
|
|
657
775
|
/* ── Editing: a widget in hand ───────────────────────────────────────── */
|
|
658
776
|
|
|
659
777
|
/**
|
|
@@ -665,7 +783,7 @@
|
|
|
665
783
|
* would land in is the placeholder, and the widgets around it make room as
|
|
666
784
|
* the placeholder moves.
|
|
667
785
|
*/
|
|
668
|
-
[data-ui
|
|
786
|
+
[data-ui-dashboard-grid] [data-part-widget]:is([data-dragging], [data-resizing]) {
|
|
669
787
|
grid-column: auto;
|
|
670
788
|
grid-row: auto;
|
|
671
789
|
position: absolute;
|
|
@@ -674,14 +792,14 @@
|
|
|
674
792
|
|
|
675
793
|
/* Picked up: lifted by the largest shadow on the scale. It is not scaled —
|
|
676
794
|
a card of text grown by two per cent is two per cent blurred (R7). */
|
|
677
|
-
[data-ui
|
|
795
|
+
[data-ui-dashboard-grid] [data-part-widget][data-dragging] {
|
|
678
796
|
cursor: grabbing;
|
|
679
797
|
}
|
|
680
798
|
|
|
681
799
|
/* A shadow is dark on a dark page, so the widget in hand also takes a
|
|
682
800
|
hairline of the accent: in the dark scheme it is what lifts the card, and
|
|
683
801
|
in the light one it says which card is held. */
|
|
684
|
-
[data-ui
|
|
802
|
+
[data-ui-dashboard-grid] [data-part-widget][data-dragging] > [data-ui-card] {
|
|
685
803
|
box-shadow:
|
|
686
804
|
var(--slotted-shadow-lg),
|
|
687
805
|
0 0 0 var(--slotted-border-width-thin, 1px)
|
|
@@ -689,7 +807,7 @@
|
|
|
689
807
|
}
|
|
690
808
|
|
|
691
809
|
/* Pulled: the card follows the pointer at any size, lifted a step less. */
|
|
692
|
-
[data-ui
|
|
810
|
+
[data-ui-dashboard-grid] [data-part-widget][data-resizing] > [data-ui-card] {
|
|
693
811
|
box-shadow:
|
|
694
812
|
var(--slotted-shadow-md),
|
|
695
813
|
0 0 0 var(--slotted-border-width-thin, 1px)
|
|
@@ -702,7 +820,7 @@
|
|
|
702
820
|
* No dashes and no fill that competes with the widget over it — it is a
|
|
703
821
|
* shape the reader aims at, not a second object.
|
|
704
822
|
*/
|
|
705
|
-
[data-ui
|
|
823
|
+
[data-ui-dashboard-grid] > [data-part-grid] > [data-part-placeholder] {
|
|
706
824
|
background-color: color-mix(in oklab, var(--_accent) 10%, transparent);
|
|
707
825
|
border: var(--slotted-border-width-thin, 1px) solid
|
|
708
826
|
color-mix(in oklab, var(--_accent) 55%, transparent);
|
|
@@ -716,7 +834,7 @@
|
|
|
716
834
|
* corner the reader is pulling: the only text on screen during the gesture,
|
|
717
835
|
* where the eye already is.
|
|
718
836
|
*/
|
|
719
|
-
[data-ui
|
|
837
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-size-readout] {
|
|
720
838
|
background-color: var(--_accent);
|
|
721
839
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
722
840
|
box-shadow: var(--slotted-shadow-sm);
|
|
@@ -735,15 +853,13 @@
|
|
|
735
853
|
z-index: 4;
|
|
736
854
|
}
|
|
737
855
|
|
|
738
|
-
[data-ui
|
|
739
|
-
[data-ui
|
|
740
|
-
[data-part='widget']
|
|
741
|
-
> [data-part='size-readout'][data-edge='bottom-start'] {
|
|
856
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-size-readout][data-edge='start'],
|
|
857
|
+
[data-ui-dashboard-grid] [data-part-widget] > [data-part-size-readout][data-edge='bottom-start'] {
|
|
742
858
|
inset-inline: var(--slotted-space-5, 0.75rem) auto;
|
|
743
859
|
}
|
|
744
860
|
|
|
745
861
|
/* A grid with nothing visible. */
|
|
746
|
-
[data-ui
|
|
862
|
+
[data-ui-dashboard-grid] > [data-part-empty] {
|
|
747
863
|
min-block-size: calc(var(--_row) * 2 + var(--_gap));
|
|
748
864
|
}
|
|
749
865
|
}
|