@adia-ai/web-components 0.0.22 → 0.0.23
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/components/action-list/action-list.css +13 -4
- package/components/avatar/avatar.css +8 -9
- package/components/button/button.css +27 -24
- package/components/check/check.css +15 -10
- package/components/input/input.css +8 -3
- package/components/menu/menu.css +22 -11
- package/components/option-card/option-card.css +9 -5
- package/components/radio/radio.css +13 -9
- package/components/rating/rating.css +7 -4
- package/components/segment/segment.css +8 -5
- package/components/switch/switch.css +12 -8
- package/components/tag/tag.css +7 -4
- package/components/toggle-group/toggle-group.css +9 -4
- package/package.json +1 -1
- package/patterns/app-nav/app-nav.js +13 -0
- package/patterns/app-nav-item/app-nav-item.css +15 -9
- package/patterns/section-nav-item/section-nav-item.css +13 -2
|
@@ -14,6 +14,19 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/* Safari 17.x bug: `:scope:hover` inside `@scope` doesn't match the scope
|
|
18
|
+
root. Plain selector outside the @scope works. `:focus-visible` matches
|
|
19
|
+
correctly inside @scope, so the combined `:hover, :focus-visible` rules
|
|
20
|
+
are split — `:hover` moves out, `:focus-visible` stays. See
|
|
21
|
+
docs/BROWSER-COMPAT.md §3a. */
|
|
22
|
+
action-item-ui:hover {
|
|
23
|
+
background: var(--action-item-bg-hover);
|
|
24
|
+
color: var(--action-item-fg-hover);
|
|
25
|
+
}
|
|
26
|
+
action-item-ui:hover [slot="icon"] {
|
|
27
|
+
color: var(--action-item-icon-fg-hover);
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
@scope (action-item-ui) {
|
|
18
31
|
:where(:scope) {
|
|
19
32
|
/* Reuse menu-item visual language for consistency */
|
|
@@ -59,12 +72,9 @@
|
|
|
59
72
|
color var(--action-item-duration) var(--action-item-easing);
|
|
60
73
|
}
|
|
61
74
|
|
|
62
|
-
:scope:hover,
|
|
63
75
|
:scope:focus-visible {
|
|
64
76
|
background: var(--action-item-bg-hover);
|
|
65
77
|
color: var(--action-item-fg-hover);
|
|
66
|
-
}
|
|
67
|
-
:scope:focus-visible {
|
|
68
78
|
box-shadow: var(--action-item-focus-ring);
|
|
69
79
|
}
|
|
70
80
|
|
|
@@ -75,7 +85,6 @@
|
|
|
75
85
|
color: var(--action-item-icon-fg);
|
|
76
86
|
transition: color var(--action-item-duration) var(--action-item-easing);
|
|
77
87
|
}
|
|
78
|
-
:scope:hover [slot="icon"],
|
|
79
88
|
:scope:focus-visible [slot="icon"] {
|
|
80
89
|
color: var(--action-item-icon-fg-hover);
|
|
81
90
|
}
|
|
@@ -74,6 +74,14 @@
|
|
|
74
74
|
AVATAR-GROUP-N — Overlapping avatar stack with +N overflow
|
|
75
75
|
═══════════════════════════════════════════════════════════════ */
|
|
76
76
|
|
|
77
|
+
/* Safari 17.x bug: `:scope:hover` inside `@scope` doesn't match the scope
|
|
78
|
+
root. Plain selector outside the @scope works. The two `:scope:hover`
|
|
79
|
+
rules combine into one rule list outside. See docs/BROWSER-COMPAT.md §3a. */
|
|
80
|
+
avatar-group-ui:hover > avatar-ui:not(:first-child),
|
|
81
|
+
avatar-group-ui:hover > [slot="overflow"] {
|
|
82
|
+
margin-inline-start: var(--avatar-group-spread);
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
@scope (avatar-group-ui) {
|
|
78
86
|
:where(:scope) {
|
|
79
87
|
/* ── Layout ── */
|
|
@@ -123,11 +131,6 @@
|
|
|
123
131
|
z-index: 99;
|
|
124
132
|
}
|
|
125
133
|
|
|
126
|
-
/* Group hover: spread apart */
|
|
127
|
-
:scope:hover > avatar-ui:not(:first-child) {
|
|
128
|
-
margin-inline-start: var(--avatar-group-spread);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
134
|
/* Overflow counter */
|
|
132
135
|
[slot="overflow"] {
|
|
133
136
|
display: inline-flex;
|
|
@@ -147,10 +150,6 @@
|
|
|
147
150
|
transition: margin var(--avatar-group-duration) var(--avatar-group-easing);
|
|
148
151
|
}
|
|
149
152
|
|
|
150
|
-
:scope:hover > [slot="overflow"] {
|
|
151
|
-
margin-inline-start: var(--avatar-group-spread);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
153
|
/* Size variants — adjust counter + overlap */
|
|
155
154
|
:scope[size="xs"] { --avatar-group-counter-size: 1.25rem; --avatar-group-overlap: -0.3rem; }
|
|
156
155
|
:scope[size="sm"] { --avatar-group-counter-size: 1.75rem; --avatar-group-overlap: -0.4rem; }
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope[attr]:hover` inside `@scope` doesn't match the
|
|
2
|
+
scope root. Plain selectors outside the @scope work — custom-property
|
|
3
|
+
tokens still resolve via inheritance. Specificity (0,1,1 / 0,2,1) is
|
|
4
|
+
preserved. See docs/BROWSER-COMPAT.md §3a. */
|
|
5
|
+
button-ui:not([disabled]):hover,
|
|
6
|
+
button-ui[variant="primary"]:not([disabled]):hover {
|
|
7
|
+
--button-bg: var(--button-bg-hover);
|
|
8
|
+
--button-fg: var(--button-fg-hover);
|
|
9
|
+
--button-border: var(--button-border-hover);
|
|
10
|
+
}
|
|
11
|
+
button-ui[variant="ghost"]:not([disabled]):hover {
|
|
12
|
+
--button-bg: var(--button-bg-ghost-hover);
|
|
13
|
+
--button-fg: var(--button-fg-ghost-hover);
|
|
14
|
+
--button-border: var(--button-border-ghost-hover);
|
|
15
|
+
}
|
|
16
|
+
button-ui[variant="outline"]:not([disabled]):hover {
|
|
17
|
+
--button-fg: var(--button-fg-hover);
|
|
18
|
+
--button-border: var(--button-border-hover);
|
|
19
|
+
}
|
|
20
|
+
button-ui[color="danger"]:not([disabled]):hover {
|
|
21
|
+
--button-bg: var(--button-bg-hover);
|
|
22
|
+
--button-fg: var(--button-fg-hover);
|
|
23
|
+
--button-border: var(--button-border-hover);
|
|
24
|
+
}
|
|
25
|
+
|
|
1
26
|
@scope (button-ui) {
|
|
2
27
|
:where(:scope) {
|
|
3
28
|
--button-bg: var(--a-ui-bg);
|
|
@@ -136,30 +161,8 @@
|
|
|
136
161
|
--button-fg: var(--a-warning-fg);
|
|
137
162
|
}
|
|
138
163
|
|
|
139
|
-
/*
|
|
140
|
-
|
|
141
|
-
:scope[variant="primary"]:not([disabled]):hover {
|
|
142
|
-
--button-bg: var(--button-bg-hover);
|
|
143
|
-
--button-fg: var(--button-fg-hover);
|
|
144
|
-
--button-border: var(--button-border-hover);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
:scope[variant="ghost"]:not([disabled]):hover {
|
|
148
|
-
--button-bg: var(--button-bg-ghost-hover);
|
|
149
|
-
--button-fg: var(--button-fg-ghost-hover);
|
|
150
|
-
--button-border: var(--button-border-ghost-hover);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
:scope[variant="outline"]:not([disabled]):hover {
|
|
154
|
-
--button-fg: var(--button-fg-hover);
|
|
155
|
-
--button-border: var(--button-border-hover);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
:scope[color="danger"]:not([disabled]):hover {
|
|
159
|
-
--button-bg: var(--button-bg-hover);
|
|
160
|
-
--button-fg: var(--button-fg-hover);
|
|
161
|
-
--button-border: var(--button-border-hover);
|
|
162
|
-
}
|
|
164
|
+
/* Hover rules moved outside @scope — see Safari 17.x bug note at
|
|
165
|
+
top of file. */
|
|
163
166
|
|
|
164
167
|
/* Size is handled by the universal [size] attribute system
|
|
165
168
|
which sets --a-size, --a-ui-px, --a-ui-size.
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope*:hover` inside `@scope` doesn't match the
|
|
2
|
+
scope root. The `:scope:hover [slot="box"]` shape — `:hover` on the
|
|
3
|
+
scope root, descendant selector — is also affected; the entire selector
|
|
4
|
+
moves out together. See docs/BROWSER-COMPAT.md §3a. */
|
|
5
|
+
check-ui:not([disabled]):hover [slot="box"] {
|
|
6
|
+
border-color: var(--check-border-hover);
|
|
7
|
+
background: var(--check-bg-hover);
|
|
8
|
+
}
|
|
9
|
+
check-ui[checked]:not([disabled]):hover [slot="box"],
|
|
10
|
+
check-ui[indeterminate]:not([disabled]):hover [slot="box"] {
|
|
11
|
+
background: var(--check-bg-checked-hover);
|
|
12
|
+
border-color: var(--check-bg-checked-hover);
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
@scope (check-ui) {
|
|
2
16
|
:where(:scope) {
|
|
3
17
|
/* ── Tokens ── (size scales with universal [size] attribute via --a-toggle-size) */
|
|
@@ -83,10 +97,7 @@
|
|
|
83
97
|
background: var(--_dash-bg);
|
|
84
98
|
}
|
|
85
99
|
|
|
86
|
-
|
|
87
|
-
border-color: var(--check-border-hover);
|
|
88
|
-
background: var(--check-bg-hover);
|
|
89
|
-
}
|
|
100
|
+
/* hover rules moved outside @scope — see Safari 17.x bug note at top. */
|
|
90
101
|
|
|
91
102
|
/* Checked — CSS border checkmark */
|
|
92
103
|
:scope[checked] [slot="box"],
|
|
@@ -110,12 +121,6 @@
|
|
|
110
121
|
--_icon-h: calc(var(--check-size) * 0.12);
|
|
111
122
|
}
|
|
112
123
|
|
|
113
|
-
:scope[checked]:not([disabled]):hover [slot="box"],
|
|
114
|
-
:scope[indeterminate]:not([disabled]):hover [slot="box"] {
|
|
115
|
-
background: var(--check-bg-checked-hover);
|
|
116
|
-
border-color: var(--check-bg-checked-hover);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
124
|
/* Label */
|
|
120
125
|
:scope[label]::after { content: attr(label); }
|
|
121
126
|
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope[attr]:hover` inside `@scope` doesn't match the
|
|
2
|
+
scope root. Plain selector outside works. See docs/BROWSER-COMPAT.md §3a. */
|
|
3
|
+
input-ui[variant="ghost"]:hover {
|
|
4
|
+
--input-bg: var(--a-bg-muted);
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
@scope (input-ui) {
|
|
2
8
|
:where(:scope) {
|
|
3
9
|
/* ── Tokens (wired to --a-ui-*) ── */
|
|
@@ -176,7 +182,6 @@
|
|
|
176
182
|
--input-border: transparent;
|
|
177
183
|
--input-border-hover: transparent;
|
|
178
184
|
}
|
|
179
|
-
:scope[variant="ghost"]:hover
|
|
180
|
-
|
|
181
|
-
}
|
|
185
|
+
/* :scope[variant="ghost"]:hover moved outside @scope — see Safari
|
|
186
|
+
17.x bug note at top of file. */
|
|
182
187
|
}
|
package/components/menu/menu.css
CHANGED
|
@@ -40,6 +40,28 @@ menu-ui [data-menu-popover] {
|
|
|
40
40
|
color: var(--a-fg);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/* Safari 17.x bug: `:scope:hover` inside `@scope` doesn't match the scope
|
|
44
|
+
root. Plain selectors outside the @scope work. `:focus-visible` matches
|
|
45
|
+
correctly inside @scope, so the combined `:hover, :focus-visible` rule
|
|
46
|
+
is split — `:hover` moves out, `:focus-visible` stays. The
|
|
47
|
+
`:scope[variant="danger"]:hover` rules also move (same bug shape). See
|
|
48
|
+
docs/BROWSER-COMPAT.md §3a. */
|
|
49
|
+
menu-item-ui:hover {
|
|
50
|
+
--menu-item-bg: var(--menu-item-bg-hover);
|
|
51
|
+
--menu-item-fg: var(--menu-item-fg-hover);
|
|
52
|
+
outline: none;
|
|
53
|
+
}
|
|
54
|
+
menu-item-ui:hover [slot="icon"] {
|
|
55
|
+
color: var(--menu-item-icon-fg-hover);
|
|
56
|
+
}
|
|
57
|
+
menu-item-ui[variant="danger"]:hover {
|
|
58
|
+
--menu-item-bg: var(--menu-item-danger-bg);
|
|
59
|
+
--menu-item-fg: var(--menu-item-danger-fg);
|
|
60
|
+
}
|
|
61
|
+
menu-item-ui[variant="danger"]:hover [slot="icon"] {
|
|
62
|
+
color: var(--menu-item-danger-fg);
|
|
63
|
+
}
|
|
64
|
+
|
|
43
65
|
@scope (menu-item-ui) {
|
|
44
66
|
:where(:scope) {
|
|
45
67
|
/* ── Layout ── */
|
|
@@ -84,7 +106,6 @@ menu-ui [data-menu-popover] {
|
|
|
84
106
|
color var(--menu-item-duration) var(--menu-item-easing);
|
|
85
107
|
}
|
|
86
108
|
|
|
87
|
-
:scope:hover,
|
|
88
109
|
:scope:focus-visible {
|
|
89
110
|
--menu-item-bg: var(--menu-item-bg-hover);
|
|
90
111
|
--menu-item-fg: var(--menu-item-fg-hover);
|
|
@@ -98,9 +119,6 @@ menu-ui [data-menu-popover] {
|
|
|
98
119
|
color: var(--menu-item-icon-fg);
|
|
99
120
|
transition: color var(--menu-item-duration) var(--menu-item-easing);
|
|
100
121
|
}
|
|
101
|
-
:scope:hover [slot="icon"] {
|
|
102
|
-
color: var(--menu-item-icon-fg-hover);
|
|
103
|
-
}
|
|
104
122
|
|
|
105
123
|
/* Text */
|
|
106
124
|
[slot="text"] {
|
|
@@ -112,16 +130,9 @@ menu-ui [data-menu-popover] {
|
|
|
112
130
|
:scope[variant="danger"] {
|
|
113
131
|
--menu-item-fg: var(--a-danger-bg);
|
|
114
132
|
}
|
|
115
|
-
:scope[variant="danger"]:hover {
|
|
116
|
-
--menu-item-bg: var(--menu-item-danger-bg);
|
|
117
|
-
--menu-item-fg: var(--menu-item-danger-fg);
|
|
118
|
-
}
|
|
119
133
|
:scope[variant="danger"] [slot="icon"] {
|
|
120
134
|
color: var(--menu-item-danger-fg);
|
|
121
135
|
}
|
|
122
|
-
:scope[variant="danger"]:hover [slot="icon"] {
|
|
123
|
-
color: var(--menu-item-danger-fg);
|
|
124
|
-
}
|
|
125
136
|
|
|
126
137
|
/* ── Disabled ── */
|
|
127
138
|
:scope[disabled] {
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope:not(...):hover` inside `@scope` doesn't match
|
|
2
|
+
the scope root. Plain selector outside works. See
|
|
3
|
+
docs/BROWSER-COMPAT.md §3a. */
|
|
4
|
+
option-card-ui:not([checked]):not([disabled]):hover {
|
|
5
|
+
background: var(--option-card-bg-hover);
|
|
6
|
+
border-color: var(--option-card-border-hover);
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
@scope (option-card-ui) {
|
|
2
10
|
:where(:scope) {
|
|
3
11
|
/* ── Container ── */
|
|
@@ -138,11 +146,7 @@
|
|
|
138
146
|
display: block;
|
|
139
147
|
}
|
|
140
148
|
|
|
141
|
-
/*
|
|
142
|
-
:scope:not([checked]):not([disabled]):hover {
|
|
143
|
-
background: var(--option-card-bg-hover);
|
|
144
|
-
border-color: var(--option-card-border-hover);
|
|
145
|
-
}
|
|
149
|
+
/* hover rule moved outside @scope — see Safari 17.x bug note at top. */
|
|
146
150
|
|
|
147
151
|
/* ── State: checked — accent border + tinted bg + filled radio.
|
|
148
152
|
The indicator becomes an accent disc with a centered dot of
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope*:hover [descendant]` inside `@scope` doesn't
|
|
2
|
+
match the scope root. The entire selector (including the descendant)
|
|
3
|
+
moves out together. See docs/BROWSER-COMPAT.md §3a. */
|
|
4
|
+
radio-ui:not([disabled]):hover [slot="dot"] {
|
|
5
|
+
border-color: var(--radio-border-hover);
|
|
6
|
+
background: var(--radio-bg-hover);
|
|
7
|
+
}
|
|
8
|
+
radio-ui[checked]:not([disabled]):hover [slot="dot"] {
|
|
9
|
+
background: var(--radio-bg-checked-hover);
|
|
10
|
+
border-color: var(--radio-bg-checked-hover);
|
|
11
|
+
}
|
|
12
|
+
|
|
1
13
|
@scope (radio-ui) {
|
|
2
14
|
:where(:scope) {
|
|
3
15
|
/* ── Layout ── (size scales with universal [size] attribute via --a-toggle-size) */
|
|
@@ -77,21 +89,13 @@
|
|
|
77
89
|
height: calc(var(--radio-size) * 0.6);
|
|
78
90
|
}
|
|
79
91
|
|
|
80
|
-
|
|
81
|
-
border-color: var(--radio-border-hover);
|
|
82
|
-
background: var(--radio-bg-hover);
|
|
83
|
-
}
|
|
92
|
+
/* hover rules moved outside @scope — see Safari 17.x bug note at top. */
|
|
84
93
|
|
|
85
94
|
:scope[checked] [slot="dot"] {
|
|
86
95
|
background: var(--radio-bg-checked);
|
|
87
96
|
border-color: var(--radio-border-checked);
|
|
88
97
|
}
|
|
89
98
|
|
|
90
|
-
:scope[checked]:not([disabled]):hover [slot="dot"] {
|
|
91
|
-
background: var(--radio-bg-checked-hover);
|
|
92
|
-
border-color: var(--radio-bg-checked-hover);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
99
|
/* Label */
|
|
96
100
|
:scope[label]::after { content: attr(label); }
|
|
97
101
|
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope:hover` inside `@scope` doesn't match the scope
|
|
2
|
+
root. Plain selector outside the @scope works. See
|
|
3
|
+
docs/BROWSER-COMPAT.md §3a. */
|
|
4
|
+
rating-ui:hover [data-rating-symbol] {
|
|
5
|
+
color: var(--rating-fg-hover);
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
@scope (rating-ui) {
|
|
2
9
|
:where(:scope) {
|
|
3
10
|
/* ── Layout ── */
|
|
@@ -72,10 +79,6 @@
|
|
|
72
79
|
clip-path: inset(0 0 0 0);
|
|
73
80
|
}
|
|
74
81
|
|
|
75
|
-
:scope:hover [data-rating-symbol] {
|
|
76
|
-
color: var(--rating-fg-hover);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
82
|
/* ── Variants override TOKENS only ── */
|
|
80
83
|
:scope[variant="accent"] {
|
|
81
84
|
--rating-fg-filled: var(--a-accent-bg);
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope:not(...):hover` inside `@scope` doesn't match
|
|
2
|
+
the scope root. Plain selector outside works. See
|
|
3
|
+
docs/BROWSER-COMPAT.md §3a. */
|
|
4
|
+
segment-ui:not([disabled]):not([selected]):hover {
|
|
5
|
+
color: var(--segment-fg-hover);
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
@scope (segment-ui) {
|
|
2
9
|
:where(:scope) {
|
|
3
10
|
/* ── Layout ── */
|
|
@@ -73,11 +80,7 @@
|
|
|
73
80
|
white-space: nowrap;
|
|
74
81
|
}
|
|
75
82
|
|
|
76
|
-
/* States */
|
|
77
|
-
:scope:not([disabled]):not([selected]):hover {
|
|
78
|
-
color: var(--segment-fg-hover);
|
|
79
|
-
}
|
|
80
|
-
|
|
83
|
+
/* States — hover rule moved outside @scope; see Safari 17.x bug note at top. */
|
|
81
84
|
:scope[selected] {
|
|
82
85
|
color: var(--segment-fg-selected);
|
|
83
86
|
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope[attr]:hover` inside `@scope` doesn't match the
|
|
2
|
+
scope root. Plain selectors outside work. See docs/BROWSER-COMPAT.md §3a. */
|
|
3
|
+
switch-ui:not([disabled]):hover {
|
|
4
|
+
--switch-track-bg: var(--switch-track-bg-hover);
|
|
5
|
+
--switch-track-border: var(--switch-track-border-hover);
|
|
6
|
+
}
|
|
7
|
+
switch-ui[checked]:not([disabled]):hover {
|
|
8
|
+
--switch-track-bg: var(--switch-track-bg-checked-hover);
|
|
9
|
+
--switch-track-border: var(--switch-track-border-checked-hover);
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
@scope (switch-ui) {
|
|
2
13
|
:where(:scope) {
|
|
3
14
|
/* ── Layout ── */
|
|
@@ -66,19 +77,12 @@
|
|
|
66
77
|
background var(--switch-duration) var(--switch-easing),
|
|
67
78
|
border-color var(--switch-duration) var(--switch-easing);
|
|
68
79
|
}
|
|
69
|
-
|
|
70
|
-
--switch-track-bg: var(--switch-track-bg-hover);
|
|
71
|
-
--switch-track-border: var(--switch-track-border-hover);
|
|
72
|
-
}
|
|
80
|
+
/* hover rules moved outside @scope — see Safari 17.x bug note at top. */
|
|
73
81
|
:scope[checked] {
|
|
74
82
|
--switch-track-bg: var(--switch-track-bg-checked);
|
|
75
83
|
--switch-track-border: var(--switch-track-border-checked);
|
|
76
84
|
--switch-thumb-bg: var(--switch-thumb-bg-checked);
|
|
77
85
|
}
|
|
78
|
-
:scope[checked]:not([disabled]):hover {
|
|
79
|
-
--switch-track-bg: var(--switch-track-bg-checked-hover);
|
|
80
|
-
--switch-track-border: var(--switch-track-border-checked-hover);
|
|
81
|
-
}
|
|
82
86
|
|
|
83
87
|
[slot="thumb"] {
|
|
84
88
|
position: absolute;
|
package/components/tag/tag.css
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope[attr]:hover` inside `@scope` doesn't match the
|
|
2
|
+
scope root. Plain selector outside works. See docs/BROWSER-COMPAT.md §3a. */
|
|
3
|
+
tag-ui[removable]:not([disabled]):hover {
|
|
4
|
+
--tag-bg: var(--tag-bg-hover);
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
@scope (tag-ui) {
|
|
2
8
|
:where(:scope) {
|
|
3
9
|
/* ── Tokens ── */
|
|
@@ -75,10 +81,7 @@
|
|
|
75
81
|
|
|
76
82
|
/* Size handled by universal [size] attribute system. */
|
|
77
83
|
|
|
78
|
-
/*
|
|
79
|
-
:scope[removable]:not([disabled]):hover {
|
|
80
|
-
--tag-bg: var(--tag-bg-hover);
|
|
81
|
-
}
|
|
84
|
+
/* hover rule moved outside @scope — see Safari 17.x bug note at top. */
|
|
82
85
|
|
|
83
86
|
/* ── Focus ── */
|
|
84
87
|
:scope:focus-visible {
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope:not(...):hover` inside `@scope` doesn't match
|
|
2
|
+
the scope root. Plain selector outside works. See
|
|
3
|
+
docs/BROWSER-COMPAT.md §3a. */
|
|
4
|
+
toggle-group-ui:not([disabled]):hover {
|
|
5
|
+
--toggle-option-bg: var(--toggle-option-bg-hover);
|
|
6
|
+
--toggle-option-fg: var(--toggle-option-fg-hover);
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
@scope (toggle-group-ui) {
|
|
2
10
|
:where(:scope) {
|
|
3
11
|
/* ── Tokens ── */
|
|
@@ -69,10 +77,7 @@
|
|
|
69
77
|
border-inline-start: var(--toggle-option-border-width) solid var(--toggle-option-border-color);
|
|
70
78
|
}
|
|
71
79
|
|
|
72
|
-
|
|
73
|
-
--toggle-option-bg: var(--toggle-option-bg-hover);
|
|
74
|
-
--toggle-option-fg: var(--toggle-option-fg-hover);
|
|
75
|
-
}
|
|
80
|
+
/* hover rule moved outside @scope — see Safari 17.x bug note at top. */
|
|
76
81
|
|
|
77
82
|
:scope:focus-visible {
|
|
78
83
|
outline: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "AdiaUI web components — vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-utils.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -71,6 +71,7 @@ class AdiaAppNav extends AdiaElement {
|
|
|
71
71
|
const item = e.target.closest('app-nav-item-ui');
|
|
72
72
|
if (item && this.contains(item)) {
|
|
73
73
|
this.select(item);
|
|
74
|
+
this.#flushHoverState();
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
76
77
|
|
|
@@ -88,6 +89,18 @@ class AdiaAppNav extends AdiaElement {
|
|
|
88
89
|
}
|
|
89
90
|
};
|
|
90
91
|
|
|
92
|
+
// Safari macOS leaves `:hover` stuck on items the cursor passed through
|
|
93
|
+
// when the DOM mutates during click+route navigation (no `mouseleave`
|
|
94
|
+
// fires). Toggling pointer-events on the container forces Safari to
|
|
95
|
+
// re-evaluate hover state on next paint without flickering layout.
|
|
96
|
+
// Documented in docs/BROWSER-COMPAT.md §3a.
|
|
97
|
+
#flushHoverState() {
|
|
98
|
+
this.style.pointerEvents = 'none';
|
|
99
|
+
requestAnimationFrame(() => {
|
|
100
|
+
this.style.pointerEvents = '';
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
91
104
|
disconnected() {
|
|
92
105
|
this.removeEventListener('click', this.#onClick);
|
|
93
106
|
this.#ro?.disconnect();
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope:hover` inside `@scope` doesn't match the scope
|
|
2
|
+
root. Plain selector outside the @scope works — custom props from the
|
|
3
|
+
`:where(:scope)` block are still set on the element via inheritance, so
|
|
4
|
+
`var(--token)` lookups resolve correctly. Specificity (0,1,1) is
|
|
5
|
+
preserved. Safari < 18 is below the §1 floor (ADR-0007); this fix
|
|
6
|
+
protects opt-in consumers extending the floor downward and is
|
|
7
|
+
harmlessly redundant on engines without the bug. */
|
|
8
|
+
app-nav-item-ui:hover {
|
|
9
|
+
background: var(--nav-item-bg-hover);
|
|
10
|
+
color: var(--nav-item-fg-hover);
|
|
11
|
+
}
|
|
12
|
+
app-nav-item-ui:hover [slot="icon"] {
|
|
13
|
+
color: var(--nav-item-fg-hover);
|
|
14
|
+
}
|
|
15
|
+
|
|
1
16
|
@scope (app-nav-item-ui) {
|
|
2
17
|
:where(:scope) {
|
|
3
18
|
--nav-item-accent: var(--a-accent);
|
|
@@ -40,15 +55,6 @@
|
|
|
40
55
|
outline: none;
|
|
41
56
|
}
|
|
42
57
|
|
|
43
|
-
:scope:hover {
|
|
44
|
-
background: var(--nav-item-bg-hover);
|
|
45
|
-
color: var(--nav-item-fg-hover);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:scope:hover [slot="icon"] {
|
|
49
|
-
color: var(--nav-item-fg-hover);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
58
|
:scope:focus-visible {
|
|
53
59
|
background: var(--nav-item-bg-hover);
|
|
54
60
|
color: var(--nav-item-fg-hover);
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope:hover` inside `@scope` doesn't match the scope
|
|
2
|
+
root. Plain selector outside the @scope works. `:focus-visible` matches
|
|
3
|
+
correctly inside @scope, so the combined `:hover, :focus-visible` rule
|
|
4
|
+
is split — `:hover` moves out, `:focus-visible` stays. See
|
|
5
|
+
docs/BROWSER-COMPAT.md §3a. */
|
|
6
|
+
section-nav-item-ui:hover:not([disabled]) {
|
|
7
|
+
background: var(--section-nav-item-bg-hover);
|
|
8
|
+
color: var(--section-nav-item-fg-hover);
|
|
9
|
+
}
|
|
10
|
+
section-nav-item-ui:hover:not([disabled]) > icon-ui {
|
|
11
|
+
color: var(--section-nav-item-fg-hover);
|
|
12
|
+
}
|
|
13
|
+
|
|
1
14
|
@scope (section-nav-item-ui) {
|
|
2
15
|
:where(:scope) {
|
|
3
16
|
--section-nav-item-row-height: var(--a-size);
|
|
@@ -58,12 +71,10 @@
|
|
|
58
71
|
text-overflow: ellipsis;
|
|
59
72
|
}
|
|
60
73
|
|
|
61
|
-
:scope:hover:not([disabled]),
|
|
62
74
|
:scope:focus-visible:not([disabled]) {
|
|
63
75
|
background: var(--section-nav-item-bg-hover);
|
|
64
76
|
color: var(--section-nav-item-fg-hover);
|
|
65
77
|
}
|
|
66
|
-
:scope:hover:not([disabled]) > icon-ui,
|
|
67
78
|
:scope:focus-visible:not([disabled]) > icon-ui {
|
|
68
79
|
color: var(--section-nav-item-fg-hover);
|
|
69
80
|
}
|