hydrateless 0.6.0 → 0.7.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 +1 -1
- package/dist/avatar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/combobox.css +19 -1
- package/dist/command.css +1 -1
- package/dist/components.css +216 -55
- package/dist/dropdown.css +25 -10
- package/dist/field.css +1 -1
- package/dist/hydrateless.css +232 -61
- package/dist/hydrateless.min.css +1 -1
- package/dist/input.css +1 -1
- package/dist/kbd.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/modal.css +1 -1
- package/dist/pagination.css +1 -1
- package/dist/popover.css +32 -4
- package/dist/progress.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/segmented.css +1 -1
- package/dist/select.css +1 -1
- package/dist/separator.css +1 -1
- package/dist/skeleton.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/spinner.css +1 -1
- package/dist/table.css +1 -1
- package/dist/tabs.css +83 -9
- package/dist/textarea.css +1 -1
- package/dist/tokens.css +2 -2
- package/dist/tooltip.css +34 -8
- package/package.json +2 -2
package/dist/field.css
CHANGED
package/dist/hydrateless.css
CHANGED
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
--hl-font-semibold: 600;
|
|
201
201
|
--hl-font-bold: 700;
|
|
202
202
|
|
|
203
|
-
/* Elevation (shadows)
|
|
203
|
+
/* Elevation (shadows), tuned for light surfaces */
|
|
204
204
|
--hl-shadow-xs: 0 1px 2px 0 hsla(222, 47%, 11%, 0.05);
|
|
205
205
|
--hl-shadow-sm: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
|
|
206
206
|
--hl-shadow-md:
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
/**
|
|
246
246
|
* Semantic tokens map the raw palette to roles (surface, text, border, intent
|
|
247
247
|
* colors). Components reference only these, so theming and dark mode are a
|
|
248
|
-
* matter of remapping a couple dozen variables
|
|
248
|
+
* matter of remapping a couple dozen variables, never touching component CSS.
|
|
249
249
|
*
|
|
250
250
|
* Light is the default in `:root`. Dark applies automatically via
|
|
251
251
|
* `prefers-color-scheme` (unless `[data-theme="light"]` opts out) and always
|
|
@@ -478,14 +478,26 @@
|
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
+
/**
|
|
482
|
+
* Tabs. Two markups are supported and styled together:
|
|
483
|
+
*
|
|
484
|
+
* - CSS-only baseline: `.hl-tablist` of `<label class="hl-tab">` wrapping a
|
|
485
|
+
* radio, then a `.hl-tabpanels` of `.hl-tabpanel`s. `:has(input:checked)`
|
|
486
|
+
* switches panels with no JavaScript (up to 8 tabs).
|
|
487
|
+
* - Enhanced: the enhancer adds `role="tab"`/`tabpanel`, roving focus, and
|
|
488
|
+
* `aria-selected`, toggles `[hidden]` on panels, and marks the root
|
|
489
|
+
* `data-hl-ready`, at which point the no-JS rules below stand down.
|
|
490
|
+
*/
|
|
491
|
+
|
|
481
492
|
@layer components {
|
|
482
493
|
[data-hl-tabs] {
|
|
483
494
|
border: 1px solid hsl(214, 32%, 91%);
|
|
484
|
-
border:
|
|
495
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
485
496
|
border-radius: 0.5rem;
|
|
486
497
|
border-radius: var(--hl-radius-lg);
|
|
487
498
|
}
|
|
488
499
|
|
|
500
|
+
.hl-tablist,
|
|
489
501
|
[data-hl-tabs] [role='tablist'] {
|
|
490
502
|
display: flex;
|
|
491
503
|
gap: 0.5rem;
|
|
@@ -493,13 +505,17 @@
|
|
|
493
505
|
padding: 0.5rem;
|
|
494
506
|
padding: var(--hl-space-2);
|
|
495
507
|
border-bottom: 1px solid hsl(214, 32%, 91%);
|
|
496
|
-
border-bottom:
|
|
508
|
+
border-bottom: var(--hl-border-width) solid var(--hl-border);
|
|
497
509
|
}
|
|
498
510
|
|
|
511
|
+
.hl-tab,
|
|
499
512
|
[data-hl-tabs] [role='tab'] {
|
|
513
|
+
position: relative;
|
|
500
514
|
-webkit-appearance: none;
|
|
501
515
|
-moz-appearance: none;
|
|
502
516
|
appearance: none;
|
|
517
|
+
display: inline-flex;
|
|
518
|
+
align-items: center;
|
|
503
519
|
background: transparent;
|
|
504
520
|
border: 0;
|
|
505
521
|
border-radius: 0.25rem;
|
|
@@ -507,36 +523,95 @@
|
|
|
507
523
|
padding: 0.5rem 0.75rem;
|
|
508
524
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
509
525
|
color: inherit;
|
|
526
|
+
font: inherit;
|
|
527
|
+
cursor: pointer;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/* The baseline keeps selection in a visually hidden radio per tab label. */
|
|
531
|
+
.hl-tab > input[type='radio'] {
|
|
532
|
+
position: absolute;
|
|
533
|
+
top: 0;
|
|
534
|
+
right: 0;
|
|
535
|
+
bottom: 0;
|
|
536
|
+
left: 0;
|
|
537
|
+
margin: 0;
|
|
538
|
+
opacity: 0;
|
|
539
|
+
cursor: pointer;
|
|
510
540
|
}
|
|
511
541
|
|
|
542
|
+
.hl-tab:has(input:checked),
|
|
512
543
|
[data-hl-tabs] [role='tab'][aria-selected='true'] {
|
|
513
544
|
background: hsl(210, 40%, 96%);
|
|
514
545
|
background: var(--hl-surface-2);
|
|
515
546
|
}
|
|
516
547
|
|
|
517
|
-
|
|
518
|
-
[data-hl-tabs] [role='tab'][aria-disabled='true'] {
|
|
519
|
-
opacity: 0.5;
|
|
520
|
-
cursor: not-allowed;
|
|
521
|
-
}
|
|
522
|
-
|
|
548
|
+
.hl-tab:has(input:focus-visible),
|
|
523
549
|
[data-hl-tabs] [role='tab']:focus-visible {
|
|
524
550
|
outline: 2px solid hsl(217, 91%, 60%);
|
|
525
551
|
outline: var(--hl-focus-ring);
|
|
526
552
|
outline-offset: 2px;
|
|
527
553
|
}
|
|
528
554
|
|
|
555
|
+
.hl-tab:has(input:disabled),
|
|
556
|
+
[data-hl-tabs] [role='tab'][disabled],
|
|
557
|
+
[data-hl-tabs] [role='tab'][aria-disabled='true'] {
|
|
558
|
+
opacity: 0.5;
|
|
559
|
+
cursor: not-allowed;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.hl-tabpanel,
|
|
529
563
|
[data-hl-tabs] [role='tabpanel'] {
|
|
530
564
|
padding: 1rem;
|
|
531
565
|
padding: var(--hl-space-4);
|
|
532
566
|
}
|
|
533
567
|
|
|
568
|
+
.hl-tabpanel[hidden],
|
|
534
569
|
[role='tabpanel'][hidden] {
|
|
535
570
|
display: none;
|
|
536
571
|
}
|
|
537
572
|
|
|
538
|
-
/* No-JS
|
|
539
|
-
|
|
573
|
+
/* No-JS baseline: reveal the panel whose tab radio is checked, by position.
|
|
574
|
+
These stand down once the enhancer sets data-hl-ready and owns [hidden]. */
|
|
575
|
+
[data-hl-tabs]:not([data-hl-ready]) .hl-tabpanels > .hl-tabpanel {
|
|
576
|
+
display: none;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
580
|
+
.hl-tablist:has(.hl-tab:nth-of-type(1) input:checked)
|
|
581
|
+
~ .hl-tabpanels
|
|
582
|
+
> .hl-tabpanel:nth-of-type(1),
|
|
583
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
584
|
+
.hl-tablist:has(.hl-tab:nth-of-type(2) input:checked)
|
|
585
|
+
~ .hl-tabpanels
|
|
586
|
+
> .hl-tabpanel:nth-of-type(2),
|
|
587
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
588
|
+
.hl-tablist:has(.hl-tab:nth-of-type(3) input:checked)
|
|
589
|
+
~ .hl-tabpanels
|
|
590
|
+
> .hl-tabpanel:nth-of-type(3),
|
|
591
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
592
|
+
.hl-tablist:has(.hl-tab:nth-of-type(4) input:checked)
|
|
593
|
+
~ .hl-tabpanels
|
|
594
|
+
> .hl-tabpanel:nth-of-type(4),
|
|
595
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
596
|
+
.hl-tablist:has(.hl-tab:nth-of-type(5) input:checked)
|
|
597
|
+
~ .hl-tabpanels
|
|
598
|
+
> .hl-tabpanel:nth-of-type(5),
|
|
599
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
600
|
+
.hl-tablist:has(.hl-tab:nth-of-type(6) input:checked)
|
|
601
|
+
~ .hl-tabpanels
|
|
602
|
+
> .hl-tabpanel:nth-of-type(6),
|
|
603
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
604
|
+
.hl-tablist:has(.hl-tab:nth-of-type(7) input:checked)
|
|
605
|
+
~ .hl-tabpanels
|
|
606
|
+
> .hl-tabpanel:nth-of-type(7),
|
|
607
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
608
|
+
.hl-tablist:has(.hl-tab:nth-of-type(8) input:checked)
|
|
609
|
+
~ .hl-tabpanels
|
|
610
|
+
> .hl-tabpanel:nth-of-type(8) {
|
|
611
|
+
display: block;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/* Role-only markup (no radios) before JS: degrade to showing the first panel. */
|
|
540
615
|
[data-hl-tabs]:not([data-hl-ready]) [role='tabpanel'] ~ [role='tabpanel'] {
|
|
541
616
|
display: none;
|
|
542
617
|
}
|
|
@@ -695,7 +770,7 @@
|
|
|
695
770
|
}
|
|
696
771
|
|
|
697
772
|
/**
|
|
698
|
-
* Pagination
|
|
773
|
+
* Pagination: `<nav class="hl-pagination" aria-label="Pagination">` wrapping a
|
|
699
774
|
* list of `.hl-pagination-item` links/buttons; mark the active page with
|
|
700
775
|
* `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps.
|
|
701
776
|
*/
|
|
@@ -782,7 +857,7 @@
|
|
|
782
857
|
}
|
|
783
858
|
|
|
784
859
|
/**
|
|
785
|
-
* Separator
|
|
860
|
+
* Separator: `<hr class="hl-separator">` or
|
|
786
861
|
* `<div class="hl-separator" role="separator" aria-orientation="vertical">`.
|
|
787
862
|
*/
|
|
788
863
|
|
|
@@ -857,7 +932,7 @@
|
|
|
857
932
|
border-top: 1px solid var(--hl-border);
|
|
858
933
|
}
|
|
859
934
|
|
|
860
|
-
.hl-modal [
|
|
935
|
+
.hl-modal [command='close']:focus-visible {
|
|
861
936
|
outline: 2px solid hsl(217, 91%, 60%);
|
|
862
937
|
outline: var(--hl-focus-ring);
|
|
863
938
|
outline-offset: 2px;
|
|
@@ -953,11 +1028,22 @@
|
|
|
953
1028
|
}
|
|
954
1029
|
}
|
|
955
1030
|
|
|
1031
|
+
/**
|
|
1032
|
+
* Popover: a `[popover] [data-hl-popover]` surface opened by a
|
|
1033
|
+
* `<button popovertarget="…">` (or `command="toggle-popover"`). The browser
|
|
1034
|
+
* owns the top layer, light-dismiss, and Escape with no JavaScript; the
|
|
1035
|
+
* enhancer only mirrors `aria-expanded`, adds optional hover, and runs the JS
|
|
1036
|
+
* positioning fallback on engines without CSS anchor positioning.
|
|
1037
|
+
*/
|
|
1038
|
+
|
|
956
1039
|
@layer components {
|
|
957
|
-
[popover],
|
|
958
1040
|
[data-hl-popover] {
|
|
1041
|
+
margin: 0;
|
|
1042
|
+
width: -moz-max-content;
|
|
1043
|
+
width: max-content;
|
|
1044
|
+
max-width: min(92vw, 22rem);
|
|
959
1045
|
border: 1px solid hsl(214, 32%, 91%);
|
|
960
|
-
border:
|
|
1046
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
961
1047
|
border-radius: 0.5rem;
|
|
962
1048
|
border-radius: var(--hl-radius-lg);
|
|
963
1049
|
padding: 0.75rem;
|
|
@@ -970,26 +1056,56 @@
|
|
|
970
1056
|
box-shadow: var(--hl-overlay-shadow);
|
|
971
1057
|
}
|
|
972
1058
|
|
|
1059
|
+
/* Until the `popover` attribute is present (author omitted it and JS hasn't
|
|
1060
|
+
upgraded the element yet), keep the surface out of the flow. */
|
|
973
1061
|
[data-hl-popover]:not([popover]) {
|
|
1062
|
+
display: none;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/* Engines without the Popover API can't promote it to the top layer, so the
|
|
1066
|
+
JS fallback positions it; give it a stacking context to land above content. */
|
|
1067
|
+
[data-hl-popover]:not(:popover-open) {
|
|
974
1068
|
z-index: 1400;
|
|
975
1069
|
z-index: var(--hl-z-popover);
|
|
976
1070
|
}
|
|
977
1071
|
|
|
978
|
-
|
|
979
|
-
|
|
1072
|
+
/* Modern placement: anchor to the invoking control (the popover's implicit
|
|
1073
|
+
anchor) and flip when there isn't room. Older engines use the JS fallback,
|
|
1074
|
+
which writes inline position/inset and wins over these rules. */
|
|
1075
|
+
@supports (position-area: block-end) {
|
|
1076
|
+
[data-hl-popover] {
|
|
1077
|
+
position: fixed;
|
|
1078
|
+
inset-area: block-end;
|
|
1079
|
+
position-area: block-end;
|
|
1080
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
1081
|
+
margin-top: 0.25rem;
|
|
1082
|
+
margin-bottom: 0.25rem;
|
|
1083
|
+
margin-top: var(--hl-space-1);
|
|
1084
|
+
margin-bottom: var(--hl-space-1);
|
|
1085
|
+
}
|
|
980
1086
|
}
|
|
981
1087
|
}
|
|
982
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* Tooltip: a `[role="tooltip"]` element described by a `[data-hl-tooltip]`
|
|
1091
|
+
* trigger. With no JavaScript it shows on the trigger's `:hover`/`:focus-visible`
|
|
1092
|
+
* (the tip must be the trigger's next sibling). When the enhancer runs it marks
|
|
1093
|
+
* the trigger `data-hl-tooltip-managed` and drives visibility through
|
|
1094
|
+
* `data-hl-tooltip-open` instead, adding show/hide delays, a grace period, and
|
|
1095
|
+
* Escape-to-dismiss.
|
|
1096
|
+
*/
|
|
1097
|
+
|
|
983
1098
|
@layer components {
|
|
984
1099
|
[role='tooltip'] {
|
|
1100
|
+
/* Fallback placement: the JS positioner writes inline position/inset on
|
|
1101
|
+
engines without CSS anchor positioning. */
|
|
985
1102
|
position: absolute;
|
|
986
1103
|
z-index: 1600;
|
|
987
1104
|
z-index: var(--hl-z-tooltip);
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
translate: 0 -0.25rem;
|
|
1105
|
+
width: -moz-max-content;
|
|
1106
|
+
width: max-content;
|
|
1107
|
+
max-width: 32ch;
|
|
1108
|
+
margin: 0;
|
|
993
1109
|
padding: 0.25rem 0.5rem;
|
|
994
1110
|
padding: var(--hl-space-1) var(--hl-space-2);
|
|
995
1111
|
border-radius: 0.25rem;
|
|
@@ -1000,29 +1116,53 @@
|
|
|
1000
1116
|
color: var(--hl-surface);
|
|
1001
1117
|
font-size: 0.875rem;
|
|
1002
1118
|
font-size: var(--hl-text-sm);
|
|
1003
|
-
max-width: 32ch;
|
|
1004
|
-
width: -moz-max-content;
|
|
1005
|
-
width: max-content;
|
|
1006
1119
|
}
|
|
1007
1120
|
|
|
1008
1121
|
[role='tooltip'][hidden] {
|
|
1009
1122
|
display: none;
|
|
1010
1123
|
}
|
|
1124
|
+
|
|
1125
|
+
/* No-JS baseline: reveal while the adjacent trigger is hovered or focused.
|
|
1126
|
+
Suppressed once the enhancer takes over (trigger gains -managed). */
|
|
1127
|
+
[data-hl-tooltip]:not([data-hl-tooltip-managed]):hover + [role='tooltip'],
|
|
1128
|
+
[data-hl-tooltip]:not([data-hl-tooltip-managed]):focus-visible + [role='tooltip'] {
|
|
1129
|
+
display: block;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/* Modern placement: pin above the trigger via the anchor-name the enhancer
|
|
1133
|
+
sets, flipping below when there's no room. */
|
|
1134
|
+
@supports (anchor-name: --x) {
|
|
1135
|
+
[role='tooltip'] {
|
|
1136
|
+
position: fixed;
|
|
1137
|
+
inset-area: block-start;
|
|
1138
|
+
position-area: block-start;
|
|
1139
|
+
position-try-fallbacks: flip-block;
|
|
1140
|
+
margin-top: 0.25rem;
|
|
1141
|
+
margin-bottom: 0.25rem;
|
|
1142
|
+
margin-top: var(--hl-space-1);
|
|
1143
|
+
margin-bottom: var(--hl-space-1);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1011
1146
|
}
|
|
1012
1147
|
|
|
1148
|
+
/**
|
|
1149
|
+
* Dropdown menu button: `<div data-hl-dropdown>` wrapping a
|
|
1150
|
+
* `[data-hl-dropdown-trigger]` button and a `[data-hl-dropdown-menu]` list. The
|
|
1151
|
+
* enhancer turns the menu into a native `popover` the trigger controls through
|
|
1152
|
+
* `popovertarget`, so opening, Escape, and light-dismiss need no JavaScript;
|
|
1153
|
+
* the menu lives in the top layer and is placed with CSS anchor positioning.
|
|
1154
|
+
*/
|
|
1155
|
+
|
|
1013
1156
|
@layer components {
|
|
1014
1157
|
[data-hl-dropdown] {
|
|
1015
|
-
position: relative;
|
|
1016
1158
|
display: inline-block;
|
|
1017
1159
|
}
|
|
1018
1160
|
|
|
1019
1161
|
[data-hl-dropdown-menu] {
|
|
1020
|
-
|
|
1021
|
-
z-index: 1000;
|
|
1022
|
-
z-index: var(--hl-z-dropdown);
|
|
1162
|
+
margin: 0;
|
|
1023
1163
|
min-width: 10rem;
|
|
1024
1164
|
border: 1px solid hsl(214, 32%, 91%);
|
|
1025
|
-
border:
|
|
1165
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
1026
1166
|
border-radius: 0.5rem;
|
|
1027
1167
|
border-radius: var(--hl-radius-lg);
|
|
1028
1168
|
background: hsl(0, 0%, 100%);
|
|
@@ -1032,19 +1172,30 @@
|
|
|
1032
1172
|
padding: 0.25rem;
|
|
1033
1173
|
padding: var(--hl-space-1);
|
|
1034
1174
|
list-style: none;
|
|
1035
|
-
margin: 0.25rem 0 0;
|
|
1036
|
-
margin: var(--hl-space-1) 0 0;
|
|
1037
1175
|
}
|
|
1038
1176
|
|
|
1039
|
-
|
|
1177
|
+
/* Before the menu is promoted to a popover (JS not yet loaded), hide it. */
|
|
1178
|
+
[data-hl-dropdown-menu]:not([popover]) {
|
|
1040
1179
|
display: none;
|
|
1041
1180
|
}
|
|
1042
1181
|
|
|
1043
|
-
[data-hl-dropdown-menu]
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1182
|
+
[data-hl-dropdown-menu]:not(:popover-open) {
|
|
1183
|
+
z-index: 1000;
|
|
1184
|
+
z-index: var(--hl-z-dropdown);
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
/* Open below the trigger, start-aligned, flipping when cramped. */
|
|
1188
|
+
@supports (position-area: block-end) {
|
|
1189
|
+
[data-hl-dropdown-menu] {
|
|
1190
|
+
position: fixed;
|
|
1191
|
+
inset-area: block-end span-inline-end;
|
|
1192
|
+
position-area: block-end span-inline-end;
|
|
1193
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
1194
|
+
margin-top: 0.25rem;
|
|
1195
|
+
margin-bottom: 0.25rem;
|
|
1196
|
+
margin-top: var(--hl-space-1);
|
|
1197
|
+
margin-bottom: var(--hl-space-1);
|
|
1198
|
+
}
|
|
1048
1199
|
}
|
|
1049
1200
|
|
|
1050
1201
|
[data-hl-dropdown-menu] [role='menuitem'] {
|
|
@@ -1085,7 +1236,7 @@
|
|
|
1085
1236
|
}
|
|
1086
1237
|
|
|
1087
1238
|
/**
|
|
1088
|
-
* Menubar / navigation menu
|
|
1239
|
+
* Menubar / navigation menu: `<ul data-hl-menu role="menubar">` with optional
|
|
1089
1240
|
* single-level submenus (`<ul role="menu" data-hl-menu-submenu>`). The enhancer
|
|
1090
1241
|
* handles roving focus, arrow navigation, and open/close.
|
|
1091
1242
|
*/
|
|
@@ -1315,7 +1466,7 @@
|
|
|
1315
1466
|
}
|
|
1316
1467
|
|
|
1317
1468
|
/**
|
|
1318
|
-
* Command palette
|
|
1469
|
+
* Command palette: `<div data-hl-command>` containing a search input
|
|
1319
1470
|
* (`[data-hl-command-input]`), an empty state (`[data-hl-command-empty]`), and a
|
|
1320
1471
|
* `[data-hl-command-list] role="listbox"` of grouped `[role="option"]` items.
|
|
1321
1472
|
* Often placed inside a `<dialog class="hl-modal">`.
|
|
@@ -1447,7 +1598,7 @@
|
|
|
1447
1598
|
/* Forms */
|
|
1448
1599
|
|
|
1449
1600
|
/**
|
|
1450
|
-
* Button
|
|
1601
|
+
* Button: `<button class="hl-button">` (works on `<a>`/`<input>` too).
|
|
1451
1602
|
*
|
|
1452
1603
|
* Color is driven by a small set of local custom properties so the
|
|
1453
1604
|
* intent × variant matrix stays DRY: `data-hl-intent` swaps the accent set,
|
|
@@ -1728,7 +1879,7 @@
|
|
|
1728
1879
|
}
|
|
1729
1880
|
|
|
1730
1881
|
/**
|
|
1731
|
-
* Text input
|
|
1882
|
+
* Text input: `<input class="hl-input">`.
|
|
1732
1883
|
* data-hl-size: sm | md (default) | lg
|
|
1733
1884
|
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
1734
1885
|
*/
|
|
@@ -1852,7 +2003,7 @@
|
|
|
1852
2003
|
}
|
|
1853
2004
|
|
|
1854
2005
|
/**
|
|
1855
|
-
* Multi-line text input
|
|
2006
|
+
* Multi-line text input: `<textarea class="hl-textarea">`.
|
|
1856
2007
|
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
1857
2008
|
*/
|
|
1858
2009
|
|
|
@@ -1941,7 +2092,7 @@
|
|
|
1941
2092
|
}
|
|
1942
2093
|
|
|
1943
2094
|
/**
|
|
1944
|
-
* Native select
|
|
2095
|
+
* Native select: `<span class="hl-select-wrapper"><select class="hl-select">`.
|
|
1945
2096
|
* The wrapper draws a custom caret while the native control keeps full
|
|
1946
2097
|
* keyboard/mobile behavior.
|
|
1947
2098
|
* data-hl-size: sm | md (default) | lg
|
|
@@ -2056,7 +2207,7 @@
|
|
|
2056
2207
|
}
|
|
2057
2208
|
|
|
2058
2209
|
/**
|
|
2059
|
-
* Checkbox
|
|
2210
|
+
* Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span>…</span></label>`.
|
|
2060
2211
|
* The native input is restyled (appearance:none) with a CSS checkmark, keeping
|
|
2061
2212
|
* full keyboard + form semantics.
|
|
2062
2213
|
*/
|
|
@@ -2151,7 +2302,7 @@
|
|
|
2151
2302
|
}
|
|
2152
2303
|
|
|
2153
2304
|
/**
|
|
2154
|
-
* Radio
|
|
2305
|
+
* Radio: `<label class="hl-radio"><input type="radio"><span>…</span></label>`,
|
|
2155
2306
|
* grouped in `<div class="hl-radio-group" role="radiogroup">`.
|
|
2156
2307
|
*/
|
|
2157
2308
|
|
|
@@ -2310,7 +2461,7 @@
|
|
|
2310
2461
|
}
|
|
2311
2462
|
|
|
2312
2463
|
/**
|
|
2313
|
-
* Field
|
|
2464
|
+
* Field, accessible form-control layout: `.hl-field` stacks a `.hl-label`,
|
|
2314
2465
|
* the control, `.hl-help`, and `.hl-error`. `.hl-fieldset` + `.hl-legend`
|
|
2315
2466
|
* group related fields.
|
|
2316
2467
|
*/
|
|
@@ -2392,7 +2543,7 @@
|
|
|
2392
2543
|
}
|
|
2393
2544
|
|
|
2394
2545
|
/**
|
|
2395
|
-
* Combobox
|
|
2546
|
+
* Combobox: `<div data-hl-combobox>` wrapping an `<input>` and a
|
|
2396
2547
|
* `<ul role="listbox">` of `<li role="option">`. The enhancer toggles the
|
|
2397
2548
|
* listbox and manages `aria-activedescendant`.
|
|
2398
2549
|
*/
|
|
@@ -2427,6 +2578,26 @@
|
|
|
2427
2578
|
box-shadow: var(--hl-overlay-shadow);
|
|
2428
2579
|
}
|
|
2429
2580
|
|
|
2581
|
+
/* Modern engines pin the listbox to the input via the anchor-name the
|
|
2582
|
+
enhancer sets, so it escapes overflow-clipping ancestors. */
|
|
2583
|
+
@supports (anchor-name: --x) {
|
|
2584
|
+
[data-hl-combobox] [role='listbox'] {
|
|
2585
|
+
position: fixed;
|
|
2586
|
+
top: auto;
|
|
2587
|
+
right: auto;
|
|
2588
|
+
bottom: auto;
|
|
2589
|
+
left: auto;
|
|
2590
|
+
width: anchor-size(width);
|
|
2591
|
+
inset-area: block-end;
|
|
2592
|
+
position-area: block-end;
|
|
2593
|
+
position-try-fallbacks: flip-block;
|
|
2594
|
+
margin-top: 0.25rem;
|
|
2595
|
+
margin-bottom: 0.25rem;
|
|
2596
|
+
margin-top: var(--hl-space-1);
|
|
2597
|
+
margin-bottom: var(--hl-space-1);
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2430
2601
|
[data-hl-combobox] [role='listbox'][hidden] {
|
|
2431
2602
|
display: none;
|
|
2432
2603
|
}
|
|
@@ -2466,7 +2637,7 @@
|
|
|
2466
2637
|
}
|
|
2467
2638
|
|
|
2468
2639
|
/**
|
|
2469
|
-
* Segmented control
|
|
2640
|
+
* Segmented control: `<div class="hl-segmented" role="radiogroup">` of
|
|
2470
2641
|
* `<label class="hl-segmented-item"><input type="radio">…</label>` segments.
|
|
2471
2642
|
* Radio inputs give free keyboard navigation; the checked segment is raised.
|
|
2472
2643
|
* A button variant using `aria-pressed="true"` is also supported.
|
|
@@ -2575,7 +2746,7 @@
|
|
|
2575
2746
|
}
|
|
2576
2747
|
|
|
2577
2748
|
/**
|
|
2578
|
-
* Slider
|
|
2749
|
+
* Slider: native `<input type="range" class="hl-slider">`. Restyled track and
|
|
2579
2750
|
* thumb across WebKit/Blink and Firefox while keeping native keyboard support.
|
|
2580
2751
|
*/
|
|
2581
2752
|
|
|
@@ -2691,7 +2862,7 @@
|
|
|
2691
2862
|
/* Feedback & data display */
|
|
2692
2863
|
|
|
2693
2864
|
/**
|
|
2694
|
-
* Alert
|
|
2865
|
+
* Alert: `<div class="hl-alert" role="alert" data-hl-intent="…">` with an
|
|
2695
2866
|
* optional icon, `.hl-alert-title`, and body content.
|
|
2696
2867
|
* data-hl-intent: info (default) | success | warning | danger | neutral
|
|
2697
2868
|
*/
|
|
@@ -2778,7 +2949,7 @@
|
|
|
2778
2949
|
}
|
|
2779
2950
|
|
|
2780
2951
|
/**
|
|
2781
|
-
* Badge
|
|
2952
|
+
* Badge: `<span class="hl-badge" data-hl-intent="…" data-hl-variant="…">`.
|
|
2782
2953
|
* data-hl-intent: neutral (default) | primary | danger | success | warning | info
|
|
2783
2954
|
* data-hl-variant: soft (default) | solid | outline
|
|
2784
2955
|
* data-hl-size: sm | md (default)
|
|
@@ -2874,7 +3045,7 @@
|
|
|
2874
3045
|
}
|
|
2875
3046
|
|
|
2876
3047
|
/**
|
|
2877
|
-
* Card
|
|
3048
|
+
* Card: `<div class="hl-card">` with optional `.hl-card-header`,
|
|
2878
3049
|
* `.hl-card-body`, `.hl-card-footer`, `.hl-card-title`, `.hl-card-description`.
|
|
2879
3050
|
* data-hl-interactive: hover/active elevation for clickable cards
|
|
2880
3051
|
*/
|
|
@@ -2971,7 +3142,7 @@
|
|
|
2971
3142
|
}
|
|
2972
3143
|
|
|
2973
3144
|
/**
|
|
2974
|
-
* Avatar
|
|
3145
|
+
* Avatar: `<span class="hl-avatar">` containing an `<img>` or fallback
|
|
2975
3146
|
* initials/icon. Stack with `<div class="hl-avatar-group">`.
|
|
2976
3147
|
* data-hl-size: xs | sm | md (default) | lg | xl
|
|
2977
3148
|
* data-hl-shape: square
|
|
@@ -3053,7 +3224,7 @@
|
|
|
3053
3224
|
}
|
|
3054
3225
|
|
|
3055
3226
|
/**
|
|
3056
|
-
* Progress
|
|
3227
|
+
* Progress: native `<progress class="hl-progress" value max>`. Omit `value`
|
|
3057
3228
|
* for an indeterminate bar.
|
|
3058
3229
|
* data-hl-intent: primary (default) | success | warning | danger | info
|
|
3059
3230
|
* data-hl-size: sm | md (default) | lg
|
|
@@ -3159,7 +3330,7 @@
|
|
|
3159
3330
|
}
|
|
3160
3331
|
|
|
3161
3332
|
/**
|
|
3162
|
-
* Spinner
|
|
3333
|
+
* Spinner: `<span class="hl-spinner" role="status" aria-label="Loading">`.
|
|
3163
3334
|
* Inherits `currentColor`, so set `color` to theme it.
|
|
3164
3335
|
* data-hl-size: sm | md (default) | lg | xl
|
|
3165
3336
|
*/
|
|
@@ -3216,7 +3387,7 @@
|
|
|
3216
3387
|
}
|
|
3217
3388
|
|
|
3218
3389
|
/**
|
|
3219
|
-
* Skeleton
|
|
3390
|
+
* Skeleton: `<span class="hl-skeleton" data-hl-variant="…" aria-hidden="true">`
|
|
3220
3391
|
* placeholder shown while content loads.
|
|
3221
3392
|
* data-hl-variant: rect (default) | text | circle
|
|
3222
3393
|
*/
|
|
@@ -3278,7 +3449,7 @@
|
|
|
3278
3449
|
}
|
|
3279
3450
|
|
|
3280
3451
|
/**
|
|
3281
|
-
* Keyboard key
|
|
3452
|
+
* Keyboard key: `<kbd class="hl-kbd">⌘</kbd>`. Combine inline, e.g.
|
|
3282
3453
|
* `<kbd class="hl-kbd">⌘</kbd><kbd class="hl-kbd">K</kbd>`.
|
|
3283
3454
|
*/
|
|
3284
3455
|
|
|
@@ -3308,7 +3479,7 @@
|
|
|
3308
3479
|
}
|
|
3309
3480
|
|
|
3310
3481
|
/**
|
|
3311
|
-
* Table
|
|
3482
|
+
* Table: `<table class="hl-table">`. Semantic table styling with optional
|
|
3312
3483
|
* zebra striping and hover.
|
|
3313
3484
|
* data-hl-striped: zebra rows
|
|
3314
3485
|
* data-hl-hover: highlight row on hover
|