hydrateless 0.9.0 → 0.10.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/dist/alert.css +56 -3
- package/dist/checkbox.css +6 -1
- package/dist/components.css +273 -30
- package/dist/dropdown.css +57 -1
- package/dist/hydrateless.css +273 -34
- package/dist/hydrateless.min.css +1 -1
- package/dist/menu.css +29 -14
- package/dist/segmented-control.css +6 -5
- package/dist/slider.css +39 -1
- package/dist/table.css +49 -1
- package/dist/toc.css +1 -1
- package/dist/tokens.css +0 -4
- package/dist/tooltip.css +30 -3
- package/package.json +1 -1
package/dist/hydrateless.css
CHANGED
|
@@ -233,11 +233,7 @@
|
|
|
233
233
|
--hl-focus-offset: 2px;
|
|
234
234
|
|
|
235
235
|
/* Z-index scale */
|
|
236
|
-
--hl-z-base: 0;
|
|
237
236
|
--hl-z-dropdown: 1000;
|
|
238
|
-
--hl-z-sticky: 1100;
|
|
239
|
-
--hl-z-drawer: 1200;
|
|
240
|
-
--hl-z-modal: 1300;
|
|
241
237
|
--hl-z-popover: 1400;
|
|
242
238
|
--hl-z-toast: 1500;
|
|
243
239
|
--hl-z-tooltip: 1600;
|
|
@@ -713,7 +709,7 @@
|
|
|
713
709
|
* links. With no JavaScript it is a plain link list; the enhancer marks the
|
|
714
710
|
* link for the heading in view with `aria-current="true"`.
|
|
715
711
|
* data-hl-toc: the nav
|
|
716
|
-
* data-hl-
|
|
712
|
+
* data-hl-content-selector: optional element whose headings are observed
|
|
717
713
|
*/
|
|
718
714
|
|
|
719
715
|
@layer components {
|
|
@@ -1202,7 +1198,8 @@
|
|
|
1202
1198
|
* `hidden`), and drives visibility through `data-hl-tooltip-open` with show
|
|
1203
1199
|
* and hide delays, a grace period, and Escape to dismiss.
|
|
1204
1200
|
* data-hl-tooltip: the trigger
|
|
1205
|
-
* data-hl-placement: top (default) | bottom |
|
|
1201
|
+
* data-hl-placement: top (default) | bottom | start | end, on the trigger
|
|
1202
|
+
* data-hl-side: the resolved side, set on the tip by the enhancer
|
|
1206
1203
|
* data-hl-tooltip-managed: set on the trigger by the enhancer
|
|
1207
1204
|
* data-hl-tooltip-open: set on the tip while shown
|
|
1208
1205
|
*/
|
|
@@ -1252,8 +1249,10 @@
|
|
|
1252
1249
|
}
|
|
1253
1250
|
}
|
|
1254
1251
|
|
|
1255
|
-
/* Modern placement: pin
|
|
1256
|
-
sets, flipping
|
|
1252
|
+
/* Modern placement: pin to the requested side of the trigger via the
|
|
1253
|
+
anchor-name the enhancer sets, flipping when there's no room. The side
|
|
1254
|
+
comes from `data-hl-side` on the tip (enhanced) or `data-hl-placement` on
|
|
1255
|
+
the preceding trigger (no-JS baseline). */
|
|
1257
1256
|
@supports (anchor-name: --x) {
|
|
1258
1257
|
[role='tooltip'] {
|
|
1259
1258
|
position: fixed;
|
|
@@ -1262,6 +1261,30 @@
|
|
|
1262
1261
|
position-try-fallbacks: flip-block;
|
|
1263
1262
|
margin-block: var(--hl-space-1);
|
|
1264
1263
|
}
|
|
1264
|
+
|
|
1265
|
+
[role='tooltip'][data-hl-side='bottom'],
|
|
1266
|
+
[data-hl-tooltip][data-hl-placement^='bottom'] + [role='tooltip'] {
|
|
1267
|
+
position-area: block-end;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
[role='tooltip']:is([data-hl-side='start'], [data-hl-side='end']),
|
|
1271
|
+
[data-hl-tooltip]:is([data-hl-placement^='start'], [data-hl-placement^='end'])
|
|
1272
|
+
+ [role='tooltip'] {
|
|
1273
|
+
position-try-fallbacks: flip-inline;
|
|
1274
|
+
margin-block: 0;
|
|
1275
|
+
margin-inline: var(--hl-space-1);
|
|
1276
|
+
translate: 0 0;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
[role='tooltip'][data-hl-side='start'],
|
|
1280
|
+
[data-hl-tooltip][data-hl-placement^='start'] + [role='tooltip'] {
|
|
1281
|
+
position-area: inline-start;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
[role='tooltip'][data-hl-side='end'],
|
|
1285
|
+
[data-hl-tooltip][data-hl-placement^='end'] + [role='tooltip'] {
|
|
1286
|
+
position-area: inline-end;
|
|
1287
|
+
}
|
|
1265
1288
|
}
|
|
1266
1289
|
|
|
1267
1290
|
/* Inverted colors flatten away; keep a visible edge on the system canvas. */
|
|
@@ -1285,7 +1308,9 @@
|
|
|
1285
1308
|
* data-hl-dropdown-menu: the `<ul>` (or any list) of items
|
|
1286
1309
|
* data-hl-value: an item's value for `hl:select`
|
|
1287
1310
|
* Items are `role="menuitem"`, `menuitemcheckbox`, or `menuitemradio`, either
|
|
1288
|
-
* directly in the list, inside `<li>`, or inside `<li><ul role="group">`.
|
|
1311
|
+
* directly in the list, inside `<li>`, or inside `<li><ul role="group">`. An
|
|
1312
|
+
* item followed by a sibling `<ul role="menu">` (or `[data-hl-submenu]`) opens
|
|
1313
|
+
* it as a nested submenu to the inline-end side.
|
|
1289
1314
|
*/
|
|
1290
1315
|
|
|
1291
1316
|
@layer components {
|
|
@@ -1340,6 +1365,60 @@
|
|
|
1340
1365
|
list-style: none;
|
|
1341
1366
|
}
|
|
1342
1367
|
|
|
1368
|
+
/* Nested submenus share the panel styling and sit beside their trigger. */
|
|
1369
|
+
[data-hl-dropdown-menu] li {
|
|
1370
|
+
position: relative;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
[data-hl-dropdown-menu] :is([role='menu'], [data-hl-submenu]) {
|
|
1374
|
+
position: absolute;
|
|
1375
|
+
inset-block-start: 0;
|
|
1376
|
+
inset-inline-start: calc(100% + var(--hl-space-1));
|
|
1377
|
+
z-index: var(--hl-z-dropdown);
|
|
1378
|
+
min-inline-size: 10rem;
|
|
1379
|
+
margin: 0;
|
|
1380
|
+
padding: var(--hl-space-1);
|
|
1381
|
+
list-style: none;
|
|
1382
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
1383
|
+
border-radius: var(--hl-radius-lg);
|
|
1384
|
+
background: var(--hl-surface);
|
|
1385
|
+
box-shadow: var(--hl-overlay-shadow);
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
[data-hl-dropdown-menu]
|
|
1389
|
+
:is([role='menu'], [data-hl-submenu]):is([hidden], [popover]:not(:popover-open)) {
|
|
1390
|
+
display: none;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
[data-hl-dropdown-menu] :is([role='menu'], [data-hl-submenu])[popover] {
|
|
1394
|
+
position: fixed;
|
|
1395
|
+
inset: auto;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
@supports (position-area: block-end) {
|
|
1399
|
+
[data-hl-dropdown-menu] :is([role='menu'], [data-hl-submenu])[popover] {
|
|
1400
|
+
position-area: inline-end span-block-end;
|
|
1401
|
+
position-try-fallbacks: flip-inline, flip-block;
|
|
1402
|
+
margin-inline: var(--hl-space-1);
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/* Submenu chevron: a rotated square corner at the inline end. */
|
|
1407
|
+
[data-hl-dropdown-menu] [role^='menuitem'][aria-haspopup='menu']::after {
|
|
1408
|
+
content: '';
|
|
1409
|
+
inline-size: 0.4rem;
|
|
1410
|
+
block-size: 0.4rem;
|
|
1411
|
+
margin-inline-start: auto;
|
|
1412
|
+
border-inline-end: 1.5px solid currentcolor;
|
|
1413
|
+
border-block-end: 1.5px solid currentcolor;
|
|
1414
|
+
rotate: -45deg;
|
|
1415
|
+
opacity: 0.6;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
[data-hl-dropdown-menu] [role^='menuitem'][aria-expanded='true'] {
|
|
1419
|
+
background: var(--hl-surface-2);
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1343
1422
|
[data-hl-dropdown-menu] [role^='menuitem'] {
|
|
1344
1423
|
display: flex;
|
|
1345
1424
|
align-items: center;
|
|
@@ -1410,8 +1489,10 @@
|
|
|
1410
1489
|
|
|
1411
1490
|
/**
|
|
1412
1491
|
* Menubar / navigation menu: `<ul data-hl-menu role="menubar">` of `<li>`
|
|
1413
|
-
* items, each optionally holding a trigger and a
|
|
1414
|
-
*
|
|
1492
|
+
* items, each optionally holding a trigger and a submenu (`<ul role="menu">`
|
|
1493
|
+
* or `[data-hl-submenu]`) as siblings inside the `<li>`. Submenus nest: an
|
|
1494
|
+
* item inside a submenu may itself be followed by a submenu, which opens to
|
|
1495
|
+
* its inline-end side.
|
|
1415
1496
|
*
|
|
1416
1497
|
* No-JS baseline: a submenu shows while its `<li>` is hovered or has focus
|
|
1417
1498
|
* within it, so every link stays reachable by mouse and keyboard. The enhancer
|
|
@@ -1419,7 +1500,7 @@
|
|
|
1419
1500
|
* plus a top-layer `popover`) and adds roving focus, arrow keys, typeahead,
|
|
1420
1501
|
* and checkable items. It reads:
|
|
1421
1502
|
* data-hl-menu: root; `aria-orientation="vertical"` stacks it
|
|
1422
|
-
* data-hl-
|
|
1503
|
+
* data-hl-submenu: a submenu without `role="menu"`
|
|
1423
1504
|
* data-hl-value: a top-level trigger's value for `hl:change`
|
|
1424
1505
|
* data-hl-ready: set by the enhancer
|
|
1425
1506
|
*/
|
|
@@ -1489,7 +1570,13 @@
|
|
|
1489
1570
|
opacity: 0.6;
|
|
1490
1571
|
}
|
|
1491
1572
|
|
|
1492
|
-
|
|
1573
|
+
/* Submenus that open to the side point their chevron that way. */
|
|
1574
|
+
[data-hl-menu][aria-orientation='vertical'] [role^='menuitem'][aria-haspopup]::after,
|
|
1575
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu]) [role^='menuitem'][aria-haspopup]::after {
|
|
1576
|
+
rotate: -45deg;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu]) {
|
|
1493
1580
|
position: absolute;
|
|
1494
1581
|
inset-block-start: calc(100% + var(--hl-space-1));
|
|
1495
1582
|
inset-inline-start: 0;
|
|
@@ -1509,17 +1596,22 @@
|
|
|
1509
1596
|
overlay var(--hl-duration-fast) allow-discrete;
|
|
1510
1597
|
}
|
|
1511
1598
|
|
|
1512
|
-
|
|
1599
|
+
/* Vertical menubars and every nested level open to the inline-end side. */
|
|
1600
|
+
[data-hl-menu][aria-orientation='vertical'] :is([role='menu'], [data-hl-submenu]),
|
|
1601
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu]) :is([role='menu'], [data-hl-submenu]) {
|
|
1513
1602
|
inset-block-start: 0;
|
|
1514
1603
|
inset-inline-start: calc(100% + var(--hl-space-1));
|
|
1515
1604
|
}
|
|
1516
1605
|
|
|
1606
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu]) li {
|
|
1607
|
+
position: relative;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1517
1610
|
/* Closed states: `hidden` (enhancer without Popover API), a closed popover
|
|
1518
1611
|
(enhancer with it), and the no-JS baseline below. Each is also the exit
|
|
1519
1612
|
target of the transition. */
|
|
1520
|
-
[data-hl-menu]
|
|
1521
|
-
|
|
1522
|
-
[data-hl-menu]:not([data-hl-ready]) :is([role='menu'], [data-hl-menu-submenu]) {
|
|
1613
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu]):is([hidden], [popover]:not(:popover-open)),
|
|
1614
|
+
[data-hl-menu]:not([data-hl-ready]) :is([role='menu'], [data-hl-submenu]) {
|
|
1523
1615
|
display: none;
|
|
1524
1616
|
opacity: 0;
|
|
1525
1617
|
translate: 0 -0.25rem;
|
|
@@ -1528,14 +1620,14 @@
|
|
|
1528
1620
|
/* No-JS baseline: reveal on hover or focus within the parent item. */
|
|
1529
1621
|
[data-hl-menu]:not([data-hl-ready])
|
|
1530
1622
|
li:is(:hover, :focus-within)
|
|
1531
|
-
> :is([role='menu'], [data-hl-
|
|
1623
|
+
> :is([role='menu'], [data-hl-submenu]) {
|
|
1532
1624
|
display: block;
|
|
1533
1625
|
opacity: 1;
|
|
1534
1626
|
translate: 0 0;
|
|
1535
1627
|
}
|
|
1536
1628
|
|
|
1537
1629
|
@starting-style {
|
|
1538
|
-
[data-hl-menu] :is([role='menu'], [data-hl-
|
|
1630
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu]) {
|
|
1539
1631
|
opacity: 0;
|
|
1540
1632
|
translate: 0 -0.25rem;
|
|
1541
1633
|
}
|
|
@@ -1544,20 +1636,22 @@
|
|
|
1544
1636
|
/* Enhanced path: the submenu is a native popover in the top layer, anchored
|
|
1545
1637
|
to its trigger. The absolute-position rules above stay as the fallback for
|
|
1546
1638
|
engines without the Popover API. */
|
|
1547
|
-
[data-hl-menu] :is([role='menu'], [data-hl-
|
|
1639
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu])[popover] {
|
|
1548
1640
|
position: fixed;
|
|
1549
1641
|
inset: auto;
|
|
1550
1642
|
}
|
|
1551
1643
|
|
|
1552
1644
|
@supports (position-area: block-end) {
|
|
1553
|
-
[data-hl-menu] :is([role='menu'], [data-hl-
|
|
1645
|
+
[data-hl-menu] :is([role='menu'], [data-hl-submenu])[popover] {
|
|
1554
1646
|
position-area: block-end span-inline-end;
|
|
1555
1647
|
position-try-fallbacks: flip-block, flip-inline;
|
|
1556
1648
|
margin-block: var(--hl-space-1);
|
|
1557
1649
|
}
|
|
1558
1650
|
|
|
1559
|
-
[data-hl-menu][aria-orientation='vertical']
|
|
1560
|
-
|
|
1651
|
+
[data-hl-menu][aria-orientation='vertical'] :is([role='menu'], [data-hl-submenu])[popover],
|
|
1652
|
+
[data-hl-menu]
|
|
1653
|
+
:is([role='menu'], [data-hl-submenu])
|
|
1654
|
+
:is([role='menu'], [data-hl-submenu])[popover] {
|
|
1561
1655
|
position-area: inline-end span-block-end;
|
|
1562
1656
|
position-try-fallbacks: flip-inline, flip-block;
|
|
1563
1657
|
margin-block: 0;
|
|
@@ -2341,7 +2435,12 @@
|
|
|
2341
2435
|
/**
|
|
2342
2436
|
* Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span>...</span></label>`.
|
|
2343
2437
|
* The native input is restyled (appearance: none) with a CSS checkmark, keeping
|
|
2344
|
-
* full keyboard and form semantics.
|
|
2438
|
+
* full keyboard and form semantics. A single checkbox needs no JavaScript; the
|
|
2439
|
+
* `data-hl-checkbox-group` enhancer adds a `data-hl-checkbox-all` master box
|
|
2440
|
+
* (checked/indeterminate follows the group) and `data-hl-indeterminate` for an
|
|
2441
|
+
* initial mixed state, both styled here through `:indeterminate`.
|
|
2442
|
+
* data-hl-checkbox-group: wrapper around related boxes for the enhancer
|
|
2443
|
+
* data-hl-checkbox-all: the master "select all" box inside the group
|
|
2345
2444
|
*/
|
|
2346
2445
|
|
|
2347
2446
|
@layer components {
|
|
@@ -2782,8 +2881,9 @@
|
|
|
2782
2881
|
* Segmented control: `<div class="hl-segmented" role="radiogroup">` of
|
|
2783
2882
|
* `<label class="hl-segmented-item"><input type="radio">...</label>` segments.
|
|
2784
2883
|
* Radio inputs give free keyboard navigation; the checked segment is raised.
|
|
2785
|
-
* A button variant
|
|
2786
|
-
*
|
|
2884
|
+
* A button variant is also supported: with the enhancer (`data-hl-segmented`)
|
|
2885
|
+
* buttons become a `role="radio"` group with `aria-checked` and arrow keys;
|
|
2886
|
+
* without it, mark the active button `aria-pressed="true"`.
|
|
2787
2887
|
* data-hl-size: sm | md (default) | lg
|
|
2788
2888
|
*/
|
|
2789
2889
|
|
|
@@ -2834,14 +2934,14 @@
|
|
|
2834
2934
|
}
|
|
2835
2935
|
|
|
2836
2936
|
.hl-segmented-item:has(input:checked),
|
|
2837
|
-
.hl-segmented-item[aria-pressed='true'] {
|
|
2937
|
+
.hl-segmented-item:is([aria-pressed='true'], [aria-checked='true']) {
|
|
2838
2938
|
background: var(--hl-surface);
|
|
2839
2939
|
color: var(--hl-fg);
|
|
2840
2940
|
box-shadow: var(--hl-shadow-sm);
|
|
2841
2941
|
}
|
|
2842
2942
|
|
|
2843
2943
|
.hl-segmented-item:has(input:focus-visible),
|
|
2844
|
-
.hl-segmented-item[aria-pressed]:focus-visible {
|
|
2944
|
+
.hl-segmented-item:is([aria-pressed], [aria-checked]):focus-visible {
|
|
2845
2945
|
outline: var(--hl-focus-ring);
|
|
2846
2946
|
outline-offset: var(--hl-focus-offset);
|
|
2847
2947
|
}
|
|
@@ -2869,7 +2969,7 @@
|
|
|
2869
2969
|
}
|
|
2870
2970
|
|
|
2871
2971
|
.hl-segmented-item:has(input:checked),
|
|
2872
|
-
.hl-segmented-item[aria-pressed='true'] {
|
|
2972
|
+
.hl-segmented-item:is([aria-pressed='true'], [aria-checked='true']) {
|
|
2873
2973
|
background: Highlight;
|
|
2874
2974
|
color: HighlightText;
|
|
2875
2975
|
}
|
|
@@ -2879,7 +2979,11 @@
|
|
|
2879
2979
|
/**
|
|
2880
2980
|
* Slider: native `<input type="range" class="hl-slider">`. Restyled track and
|
|
2881
2981
|
* thumb across WebKit/Blink and Firefox while keeping native keyboard support
|
|
2882
|
-
* and RTL direction.
|
|
2982
|
+
* and RTL direction. Firefox paints the filled part of the track natively
|
|
2983
|
+
* (`::-moz-range-progress`); other engines get it from the
|
|
2984
|
+
* `--hl-slider-progress` custom property the enhancer keeps in sync when the
|
|
2985
|
+
* input sits inside a `[data-hl-slider]` wrapper (with an optional `<output>`).
|
|
2986
|
+
* data-hl-slider: wrapper around the input (and output) for the enhancer
|
|
2883
2987
|
*/
|
|
2884
2988
|
|
|
2885
2989
|
@layer components {
|
|
@@ -2901,6 +3005,40 @@
|
|
|
2901
3005
|
background: var(--hl-surface-3);
|
|
2902
3006
|
}
|
|
2903
3007
|
|
|
3008
|
+
/* Fill up to the thumb once the enhancer publishes the progress. */
|
|
3009
|
+
.hl-slider[style*='--hl-slider-progress']::-webkit-slider-runnable-track {
|
|
3010
|
+
background: linear-gradient(
|
|
3011
|
+
to right,
|
|
3012
|
+
var(--hl-primary) var(--hl-slider-progress),
|
|
3013
|
+
var(--hl-surface-3) var(--hl-slider-progress)
|
|
3014
|
+
);
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
:is(
|
|
3018
|
+
[dir='rtl'] .hl-slider,
|
|
3019
|
+
.hl-slider:dir(rtl)
|
|
3020
|
+
)[style*='--hl-slider-progress']::-webkit-slider-runnable-track {
|
|
3021
|
+
background: linear-gradient(
|
|
3022
|
+
to left,
|
|
3023
|
+
var(--hl-primary) var(--hl-slider-progress),
|
|
3024
|
+
var(--hl-surface-3) var(--hl-slider-progress)
|
|
3025
|
+
);
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
[data-hl-slider] {
|
|
3029
|
+
display: flex;
|
|
3030
|
+
align-items: center;
|
|
3031
|
+
gap: var(--hl-space-3);
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
[data-hl-slider] > output {
|
|
3035
|
+
min-inline-size: 3ch;
|
|
3036
|
+
font-size: var(--hl-text-sm);
|
|
3037
|
+
font-variant-numeric: tabular-nums;
|
|
3038
|
+
color: var(--hl-fg-muted);
|
|
3039
|
+
text-align: end;
|
|
3040
|
+
}
|
|
3041
|
+
|
|
2904
3042
|
.hl-slider::-moz-range-track {
|
|
2905
3043
|
block-size: var(--_track);
|
|
2906
3044
|
border-radius: var(--hl-radius-full);
|
|
@@ -2969,9 +3107,13 @@
|
|
|
2969
3107
|
|
|
2970
3108
|
/**
|
|
2971
3109
|
* Alert: `<div class="hl-alert" role="alert" data-hl-intent="...">` with an
|
|
2972
|
-
* optional icon, `.hl-alert-title`, and body content.
|
|
2973
|
-
* enhancer
|
|
2974
|
-
*
|
|
3110
|
+
* optional icon, `.hl-alert-title`, and body content. Add `data-hl-alert` and
|
|
3111
|
+
* a `[data-hl-dismiss]` button for the dismiss enhancer, which fades the alert
|
|
3112
|
+
* out (`data-hl-alert-closing`) before hiding it.
|
|
3113
|
+
* data-hl-intent: info (default) | success | warning | danger | neutral
|
|
3114
|
+
* data-hl-alert: opt in to the dismiss enhancer
|
|
3115
|
+
* data-hl-dismiss: the dismiss button inside the alert
|
|
3116
|
+
* data-hl-alert-closing: set by the enhancer during the exit transition
|
|
2975
3117
|
*/
|
|
2976
3118
|
|
|
2977
3119
|
@layer components {
|
|
@@ -2990,6 +3132,55 @@
|
|
|
2990
3132
|
color: var(--_fg);
|
|
2991
3133
|
font-size: var(--hl-text-sm);
|
|
2992
3134
|
line-height: var(--hl-leading-normal);
|
|
3135
|
+
transition:
|
|
3136
|
+
opacity var(--hl-duration-base) var(--hl-ease-standard),
|
|
3137
|
+
translate var(--hl-duration-base) var(--hl-ease-standard);
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
.hl-alert[data-hl-alert-closing] {
|
|
3141
|
+
opacity: 0;
|
|
3142
|
+
translate: 0 -0.25rem;
|
|
3143
|
+
}
|
|
3144
|
+
|
|
3145
|
+
/* `display: flex` above would otherwise beat the user agent's `[hidden]`. */
|
|
3146
|
+
.hl-alert[hidden] {
|
|
3147
|
+
display: none;
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3150
|
+
.hl-alert [data-hl-dismiss] {
|
|
3151
|
+
display: inline-flex;
|
|
3152
|
+
align-items: center;
|
|
3153
|
+
justify-content: center;
|
|
3154
|
+
flex: none;
|
|
3155
|
+
inline-size: 1.5rem;
|
|
3156
|
+
block-size: 1.5rem;
|
|
3157
|
+
margin-inline-start: auto;
|
|
3158
|
+
margin-block-start: -0.125rem;
|
|
3159
|
+
padding: 0;
|
|
3160
|
+
border: 0;
|
|
3161
|
+
border-radius: var(--hl-radius-sm);
|
|
3162
|
+
background: transparent;
|
|
3163
|
+
color: inherit;
|
|
3164
|
+
font: inherit;
|
|
3165
|
+
line-height: 1;
|
|
3166
|
+
cursor: pointer;
|
|
3167
|
+
opacity: 0.7;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
.hl-alert [data-hl-dismiss]:hover {
|
|
3171
|
+
opacity: 1;
|
|
3172
|
+
background: color-mix(in oklab, currentcolor 10%, transparent);
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
.hl-alert [data-hl-dismiss]:focus-visible {
|
|
3176
|
+
outline: var(--hl-focus-ring);
|
|
3177
|
+
outline-offset: var(--hl-focus-offset);
|
|
3178
|
+
opacity: 1;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
.hl-alert [data-hl-dismiss]:empty::before {
|
|
3182
|
+
content: '\00D7';
|
|
3183
|
+
font-size: var(--hl-text-lg);
|
|
2993
3184
|
}
|
|
2994
3185
|
|
|
2995
3186
|
.hl-alert[data-hl-intent='success'] {
|
|
@@ -3542,11 +3733,14 @@
|
|
|
3542
3733
|
/**
|
|
3543
3734
|
* Table: `<table class="hl-table">`, optionally inside
|
|
3544
3735
|
* `<div class="hl-table-wrapper">` so wide tables scroll instead of breaking
|
|
3545
|
-
* the layout.
|
|
3736
|
+
* the layout. Add `data-hl-table` and mark headers `data-hl-sort` for the
|
|
3737
|
+
* sorting enhancer; it sets `aria-sort` on the active column.
|
|
3546
3738
|
* data-hl-striped: zebra rows
|
|
3547
3739
|
* data-hl-hover: highlight row on hover
|
|
3548
3740
|
* data-hl-align: start (default) | center | end, on the table or a cell
|
|
3549
3741
|
* data-hl-size: sm | md (default) | lg, cell padding density
|
|
3742
|
+
* data-hl-table: opt in to the sorting enhancer
|
|
3743
|
+
* data-hl-sort: a sortable header (value: the column key)
|
|
3550
3744
|
*/
|
|
3551
3745
|
|
|
3552
3746
|
@layer components {
|
|
@@ -3590,6 +3784,51 @@
|
|
|
3590
3784
|
border-block-end-color: var(--hl-border-strong);
|
|
3591
3785
|
}
|
|
3592
3786
|
|
|
3787
|
+
/* Sortable headers: a pointer cursor, a focus ring, and a direction glyph. */
|
|
3788
|
+
.hl-table th[data-hl-sort] {
|
|
3789
|
+
cursor: pointer;
|
|
3790
|
+
-webkit-user-select: none;
|
|
3791
|
+
user-select: none;
|
|
3792
|
+
}
|
|
3793
|
+
|
|
3794
|
+
.hl-table th[data-hl-sort]:hover {
|
|
3795
|
+
color: var(--hl-fg);
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3798
|
+
.hl-table th[data-hl-sort]:focus-visible {
|
|
3799
|
+
outline: var(--hl-focus-ring);
|
|
3800
|
+
outline-offset: calc(var(--hl-focus-offset) * -1);
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
.hl-table th[data-hl-sort]::after {
|
|
3804
|
+
content: '';
|
|
3805
|
+
display: inline-block;
|
|
3806
|
+
inline-size: 0.35em;
|
|
3807
|
+
block-size: 0.35em;
|
|
3808
|
+
margin-inline-start: var(--hl-space-1);
|
|
3809
|
+
border-inline-end: 1.5px solid currentcolor;
|
|
3810
|
+
border-block-end: 1.5px solid currentcolor;
|
|
3811
|
+
opacity: 0;
|
|
3812
|
+
translate: 0 -0.15em;
|
|
3813
|
+
rotate: 45deg;
|
|
3814
|
+
transition: opacity var(--hl-duration-fast) var(--hl-ease-standard);
|
|
3815
|
+
}
|
|
3816
|
+
|
|
3817
|
+
.hl-table th[data-hl-sort]:hover::after {
|
|
3818
|
+
opacity: 0.4;
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
.hl-table th[aria-sort='ascending']::after,
|
|
3822
|
+
.hl-table th[aria-sort='descending']::after {
|
|
3823
|
+
opacity: 1;
|
|
3824
|
+
color: var(--hl-primary);
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
.hl-table th[aria-sort='ascending']::after {
|
|
3828
|
+
rotate: 225deg;
|
|
3829
|
+
translate: 0 0.1em;
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3593
3832
|
.hl-table tfoot td {
|
|
3594
3833
|
font-weight: var(--hl-font-medium);
|
|
3595
3834
|
color: var(--hl-fg-muted);
|