@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.5
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 +1 -1
- package/src/chart/chart.css +8 -2
- package/src/page-header/page-header.css +37 -0
- package/src/page-header/page-header.tokens.json +1 -0
- package/src/scroll-area/scroll-area.css +11 -1
- package/src/stat-card/stat-card.css +317 -227
- package/src/table/table.css +60 -3
- package/src/table/table.tokens.json +1 -0
- package/src/tabs/tabs.css +179 -151
- package/src/tabs/tabs.tokens.json +4 -1
package/package.json
CHANGED
package/src/chart/chart.css
CHANGED
|
@@ -1258,8 +1258,14 @@
|
|
|
1258
1258
|
direction: rtl;
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
|
-
/* The region scrolls, so it takes focus to be scrolled by keyboard.
|
|
1262
|
-
|
|
1261
|
+
/* The region scrolls, so it takes focus to be scrolled by keyboard. The ring
|
|
1262
|
+
is drawn for a focus from the keyboard: a click on a cell focuses the region
|
|
1263
|
+
too, and the next Shift would make it match `:focus-visible`
|
|
1264
|
+
(`createFocusOrigin`). The browser's own ring is suppressed for the same focus. */
|
|
1265
|
+
[data-ui='chart'] [data-part='table-region']:focus {
|
|
1266
|
+
outline: none;
|
|
1267
|
+
}
|
|
1268
|
+
[data-ui='chart'] [data-part='table-region']:focus-visible[data-focus-origin='keyboard'] {
|
|
1263
1269
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1264
1270
|
outline-offset: calc(var(--slotted-focus-ring-width, 2px) * -1);
|
|
1265
1271
|
}
|
|
@@ -234,6 +234,43 @@
|
|
|
234
234
|
z-index: 2;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
/**
|
|
238
|
+
* The title area paints the ground only where something passes under it:
|
|
239
|
+
* the header area, which it covers while it collapses. Without one, the
|
|
240
|
+
* root's ground is the one layer under the title, so a ground with alpha is
|
|
241
|
+
* composited once — painted on both, 0.5 read as 0.75. With a header area
|
|
242
|
+
* the title keeps its own ground, because a title that let the area show
|
|
243
|
+
* through would print the area's words under its own.
|
|
244
|
+
*/
|
|
245
|
+
[data-ui='page-header']:not(:has(> * > [data-part='header-area']))
|
|
246
|
+
> *
|
|
247
|
+
> [data-part='title-area'] {
|
|
248
|
+
background-color: transparent;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Stuck, the chrome stands over the content, and a theme may blur what passes
|
|
253
|
+
* under it: `--slotted-page-header-backdrop-filter`, `none` unless set. It
|
|
254
|
+
* composes with a ground that has alpha, which is what lets the content show
|
|
255
|
+
* at all. The filter is the stuck state's alone, so a `plain` header,
|
|
256
|
+
* transparent at rest, filters nothing at rest.
|
|
257
|
+
*/
|
|
258
|
+
[data-ui='page-header'][data-stuck] {
|
|
259
|
+
-webkit-backdrop-filter: var(--slotted-page-header-backdrop-filter, none);
|
|
260
|
+
backdrop-filter: var(--slotted-page-header-backdrop-filter, none);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* A reader who asked for less transparency gets none of the effect, and under
|
|
265
|
+
* forced colours the ground is the system's and the blur has nothing to add.
|
|
266
|
+
*/
|
|
267
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
268
|
+
[data-ui='page-header'][data-stuck] {
|
|
269
|
+
-webkit-backdrop-filter: none;
|
|
270
|
+
backdrop-filter: none;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
237
274
|
/**
|
|
238
275
|
* The pill straddles the chrome's edge, so whatever ends at that edge
|
|
239
276
|
* keeps half a pill clear of it: the title area, because stuck the edge
|
|
@@ -410,8 +410,18 @@
|
|
|
410
410
|
*
|
|
411
411
|
* `:has()` rather than `:focus-within`, because a link inside the content is
|
|
412
412
|
* focus *within* the area and is not the area being focused.
|
|
413
|
+
*
|
|
414
|
+
* The ring is drawn for a focus from the keyboard: a click on the content
|
|
415
|
+
* focuses the viewport too, and the next Shift would make it match
|
|
416
|
+
* `:focus-visible` (`createFocusOrigin`). The browser's own ring on the
|
|
417
|
+
* viewport is suppressed: the frame draws the one ring.
|
|
413
418
|
*/
|
|
414
|
-
[data-ui='scroll-area']
|
|
419
|
+
[data-ui='scroll-area'] > [data-part='viewport']:focus {
|
|
420
|
+
outline: none;
|
|
421
|
+
}
|
|
422
|
+
[data-ui='scroll-area']:has(
|
|
423
|
+
> [data-part='viewport']:focus-visible[data-focus-origin='keyboard']
|
|
424
|
+
) {
|
|
415
425
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
416
426
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
417
427
|
}
|