opui-css 5.0.1 → 5.1.1
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/CHANGELOG.md +45 -0
- package/MIGRATING.md +11 -0
- package/README.md +1 -1
- package/components/Accordion/Accordion.astro +12 -2
- package/components/Anchor/Anchor.astro +5 -1
- package/components/ButtonGroup/ButtonGroup.astro +8 -1
- package/components/Card/Card.astro +3 -1
- package/components/Checkbox/Checkbox.astro +3 -3
- package/components/ClassicSelect/ClassicSelect.astro +3 -3
- package/components/Dialog/Dialog.astro +3 -1
- package/components/Radio/Radio.astro +3 -3
- package/components/Select/Select.astro +3 -3
- package/components/Switch/Switch.astro +3 -3
- package/components/TextField/TextField.astro +3 -3
- package/components/Textarea/Textarea.astro +3 -3
- package/core/normalize.css +16 -10
- package/core/palette.css +313 -58
- package/core/utils.css +2 -2
- package/css/components/accordion.css +7 -7
- package/css/components/anchor.css +23 -23
- package/css/components/badge.css +4 -4
- package/css/components/button-group.css +28 -14
- package/css/components/button.css +29 -17
- package/css/components/callout.css +95 -92
- package/css/components/card.css +6 -8
- package/css/components/checkbox.css +209 -203
- package/css/components/chip.css +11 -6
- package/css/components/description-list.css +2 -1
- package/css/components/dialog.css +2 -1
- package/css/components/drawer.css +167 -167
- package/css/components/form.css +8 -7
- package/css/components/icon-button.css +32 -13
- package/css/components/list.css +10 -12
- package/css/components/progress.css +4 -3
- package/css/components/radio.css +168 -170
- package/css/components/range.css +14 -9
- package/css/components/select.css +9 -6
- package/css/components/spinner.css +4 -3
- package/css/components/switch.css +8 -5
- package/css/components/table.css +4 -10
- package/css/components/tabs.css +17 -16
- package/css/components/text-field.css +9 -10
- package/css/components/text-input.css +8 -4
- package/css/components/textarea.css +3 -1
- package/css/components/toast.css +156 -157
- package/css/components/toggle-button.css +76 -72
- package/css/components/tooltip.css +59 -56
- package/css/components/typography.css +31 -31
- package/css/imports.css +5 -4
- package/css/theme.css +14 -20
- package/dist/op.css +0 -62
- package/dist/op.css.map +1 -1
- package/dist/opui.components.css +1259 -1184
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +1719 -1393
- package/dist/opui.css.map +1 -1
- package/open-props.css +0 -1
- package/package.json +1 -1
package/core/palette.css
CHANGED
|
@@ -1,59 +1,314 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
@property --color-1 {
|
|
2
|
+
syntax: "<color>";
|
|
3
|
+
inherits: true;
|
|
4
|
+
initial-value: transparent;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@property --color-2 {
|
|
8
|
+
syntax: "<color>";
|
|
9
|
+
inherits: true;
|
|
10
|
+
initial-value: transparent;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@property --color-3 {
|
|
14
|
+
syntax: "<color>";
|
|
15
|
+
inherits: true;
|
|
16
|
+
initial-value: transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@property --color-4 {
|
|
20
|
+
syntax: "<color>";
|
|
21
|
+
inherits: true;
|
|
22
|
+
initial-value: transparent;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@property --color-5 {
|
|
26
|
+
syntax: "<color>";
|
|
27
|
+
inherits: true;
|
|
28
|
+
initial-value: transparent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@property --color-6 {
|
|
32
|
+
syntax: "<color>";
|
|
33
|
+
inherits: true;
|
|
34
|
+
initial-value: transparent;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@property --color-7 {
|
|
38
|
+
syntax: "<color>";
|
|
39
|
+
inherits: true;
|
|
40
|
+
initial-value: transparent;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@property --color-8 {
|
|
44
|
+
syntax: "<color>";
|
|
45
|
+
inherits: true;
|
|
46
|
+
initial-value: transparent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@property --color-9 {
|
|
50
|
+
syntax: "<color>";
|
|
51
|
+
inherits: true;
|
|
52
|
+
initial-value: transparent;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@property --color-10 {
|
|
56
|
+
syntax: "<color>";
|
|
57
|
+
inherits: true;
|
|
58
|
+
initial-value: transparent;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@property --color-11 {
|
|
62
|
+
syntax: "<color>";
|
|
63
|
+
inherits: true;
|
|
64
|
+
initial-value: transparent;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@property --color-12 {
|
|
68
|
+
syntax: "<color>";
|
|
69
|
+
inherits: true;
|
|
70
|
+
initial-value: transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@property --color-13 {
|
|
74
|
+
syntax: "<color>";
|
|
75
|
+
inherits: true;
|
|
76
|
+
initial-value: transparent;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@property --color-14 {
|
|
80
|
+
syntax: "<color>";
|
|
81
|
+
inherits: true;
|
|
82
|
+
initial-value: transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@property --color-15 {
|
|
86
|
+
syntax: "<color>";
|
|
87
|
+
inherits: true;
|
|
88
|
+
initial-value: transparent;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@property --color-16 {
|
|
92
|
+
syntax: "<color>";
|
|
93
|
+
inherits: true;
|
|
94
|
+
initial-value: transparent;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@property --gray-1 {
|
|
98
|
+
syntax: "<color>";
|
|
99
|
+
inherits: true;
|
|
100
|
+
initial-value: transparent;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@property --gray-2 {
|
|
104
|
+
syntax: "<color>";
|
|
105
|
+
inherits: true;
|
|
106
|
+
initial-value: transparent;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@property --gray-3 {
|
|
110
|
+
syntax: "<color>";
|
|
111
|
+
inherits: true;
|
|
112
|
+
initial-value: transparent;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@property --gray-4 {
|
|
116
|
+
syntax: "<color>";
|
|
117
|
+
inherits: true;
|
|
118
|
+
initial-value: transparent;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@property --gray-5 {
|
|
122
|
+
syntax: "<color>";
|
|
123
|
+
inherits: true;
|
|
124
|
+
initial-value: transparent;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@property --gray-6 {
|
|
128
|
+
syntax: "<color>";
|
|
129
|
+
inherits: true;
|
|
130
|
+
initial-value: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@property --gray-7 {
|
|
134
|
+
syntax: "<color>";
|
|
135
|
+
inherits: true;
|
|
136
|
+
initial-value: transparent;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@property --gray-8 {
|
|
140
|
+
syntax: "<color>";
|
|
141
|
+
inherits: true;
|
|
142
|
+
initial-value: transparent;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@property --gray-9 {
|
|
146
|
+
syntax: "<color>";
|
|
147
|
+
inherits: true;
|
|
148
|
+
initial-value: transparent;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@property --gray-10 {
|
|
152
|
+
syntax: "<color>";
|
|
153
|
+
inherits: true;
|
|
154
|
+
initial-value: transparent;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@property --gray-11 {
|
|
158
|
+
syntax: "<color>";
|
|
159
|
+
inherits: true;
|
|
160
|
+
initial-value: transparent;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@property --gray-12 {
|
|
164
|
+
syntax: "<color>";
|
|
165
|
+
inherits: true;
|
|
166
|
+
initial-value: transparent;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@property --gray-13 {
|
|
170
|
+
syntax: "<color>";
|
|
171
|
+
inherits: true;
|
|
172
|
+
initial-value: transparent;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@property --gray-14 {
|
|
176
|
+
syntax: "<color>";
|
|
177
|
+
inherits: true;
|
|
178
|
+
initial-value: transparent;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@property --gray-15 {
|
|
182
|
+
syntax: "<color>";
|
|
183
|
+
inherits: true;
|
|
184
|
+
initial-value: transparent;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@property --gray-16 {
|
|
188
|
+
syntax: "<color>";
|
|
189
|
+
inherits: true;
|
|
190
|
+
initial-value: transparent;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@property --palette-source {
|
|
194
|
+
syntax: "<color>";
|
|
195
|
+
inherits: true;
|
|
196
|
+
initial-value: transparent;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@property --palette-hue {
|
|
200
|
+
syntax: "<number>";
|
|
201
|
+
inherits: true;
|
|
202
|
+
initial-value: 240;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@layer theme.palette {
|
|
206
|
+
:where(
|
|
207
|
+
:root,
|
|
208
|
+
.ui-warning,
|
|
209
|
+
.ui-critical,
|
|
210
|
+
.ui-info,
|
|
211
|
+
.ui-success,
|
|
212
|
+
[data-invalid],
|
|
213
|
+
del,
|
|
214
|
+
ins,
|
|
215
|
+
abbr,
|
|
216
|
+
dfn,
|
|
217
|
+
.ui-palette
|
|
218
|
+
) {
|
|
219
|
+
--palette-hue: 250;
|
|
220
|
+
--palette-hue-rotate-by: 0;
|
|
221
|
+
--palette-chroma: 0.15;
|
|
222
|
+
|
|
223
|
+
--palette-source: oklch(
|
|
224
|
+
58% calc(0.21 * var(--palette-chroma, 1)) var(--palette-hue, 250)
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
/* Colors */
|
|
228
|
+
--color-1: oklch(
|
|
229
|
+
from var(--palette-source) 98% calc(0.03 * (c / 0.21))
|
|
230
|
+
calc(h + (0 * var(--palette-hue-rotate-by)))
|
|
231
|
+
);
|
|
232
|
+
--color-2: oklch(
|
|
233
|
+
from var(--palette-source) 97% calc(0.06 * (c / 0.21))
|
|
234
|
+
calc(h + (1 * var(--palette-hue-rotate-by)))
|
|
235
|
+
);
|
|
236
|
+
--color-3: oklch(
|
|
237
|
+
from var(--palette-source) 93% calc(0.1 * (c / 0.21))
|
|
238
|
+
calc(h + (2 * var(--palette-hue-rotate-by)))
|
|
239
|
+
);
|
|
240
|
+
--color-4: oklch(
|
|
241
|
+
from var(--palette-source) 84% calc(0.12 * (c / 0.21))
|
|
242
|
+
calc(h + (3 * var(--palette-hue-rotate-by)))
|
|
243
|
+
);
|
|
244
|
+
--color-5: oklch(
|
|
245
|
+
from var(--palette-source) 80% calc(0.16 * (c / 0.21))
|
|
246
|
+
calc(h + (4 * var(--palette-hue-rotate-by)))
|
|
247
|
+
);
|
|
248
|
+
--color-6: oklch(
|
|
249
|
+
from var(--palette-source) 71% calc(0.19 * (c / 0.21))
|
|
250
|
+
calc(h + (5 * var(--palette-hue-rotate-by)))
|
|
251
|
+
);
|
|
252
|
+
--color-7: oklch(
|
|
253
|
+
from var(--palette-source) 66% calc(0.2 * (c / 0.21))
|
|
254
|
+
calc(h + (6 * var(--palette-hue-rotate-by)))
|
|
255
|
+
);
|
|
256
|
+
--color-8: oklch(
|
|
257
|
+
from var(--palette-source) 58% calc(0.21 * (c / 0.21))
|
|
258
|
+
calc(h + (7 * var(--palette-hue-rotate-by)))
|
|
259
|
+
);
|
|
260
|
+
--color-9: oklch(
|
|
261
|
+
from var(--palette-source) 53% calc(0.2 * (c / 0.21))
|
|
262
|
+
calc(h + (8 * var(--palette-hue-rotate-by)))
|
|
263
|
+
);
|
|
264
|
+
--color-10: oklch(
|
|
265
|
+
from var(--palette-source) 49% calc(0.19 * (c / 0.21))
|
|
266
|
+
calc(h + (9 * var(--palette-hue-rotate-by)))
|
|
267
|
+
);
|
|
268
|
+
--color-11: oklch(
|
|
269
|
+
from var(--palette-source) 42% calc(0.17 * (c / 0.21))
|
|
270
|
+
calc(h + (10 * var(--palette-hue-rotate-by)))
|
|
271
|
+
);
|
|
272
|
+
--color-12: oklch(
|
|
273
|
+
from var(--palette-source) 35% calc(0.15 * (c / 0.21))
|
|
274
|
+
calc(h + (11 * var(--palette-hue-rotate-by)))
|
|
275
|
+
);
|
|
276
|
+
--color-13: oklch(
|
|
277
|
+
from var(--palette-source) 27% calc(0.12 * (c / 0.21))
|
|
278
|
+
calc(h + (12 * var(--palette-hue-rotate-by)))
|
|
279
|
+
);
|
|
280
|
+
--color-14: oklch(
|
|
281
|
+
from var(--palette-source) 20% calc(0.09 * (c / 0.21))
|
|
282
|
+
calc(h + (13 * var(--palette-hue-rotate-by)))
|
|
283
|
+
);
|
|
284
|
+
--color-15: oklch(
|
|
285
|
+
from var(--palette-source) 16% calc(0.07 * (c / 0.21))
|
|
286
|
+
calc(h + (14 * var(--palette-hue-rotate-by)))
|
|
287
|
+
);
|
|
288
|
+
--color-16: oklch(
|
|
289
|
+
from var(--palette-source) 10% calc(0.05 * (c / 0.21))
|
|
290
|
+
calc(h + (15 * var(--palette-hue-rotate-by)))
|
|
291
|
+
);
|
|
292
|
+
|
|
293
|
+
/* Grays */
|
|
294
|
+
--gray-chroma: 0.01;
|
|
295
|
+
--gray-hue: 255;
|
|
296
|
+
|
|
297
|
+
--gray-1: oklch(from var(--color-1) l var(--gray-chroma) var(--gray-hue));
|
|
298
|
+
--gray-2: oklch(from var(--color-2) l var(--gray-chroma) var(--gray-hue));
|
|
299
|
+
--gray-3: oklch(from var(--color-3) l var(--gray-chroma) var(--gray-hue));
|
|
300
|
+
--gray-4: oklch(from var(--color-4) l var(--gray-chroma) var(--gray-hue));
|
|
301
|
+
--gray-5: oklch(from var(--color-5) l var(--gray-chroma) var(--gray-hue));
|
|
302
|
+
--gray-6: oklch(from var(--color-6) l var(--gray-chroma) var(--gray-hue));
|
|
303
|
+
--gray-7: oklch(from var(--color-7) l var(--gray-chroma) var(--gray-hue));
|
|
304
|
+
--gray-8: oklch(from var(--color-8) l var(--gray-chroma) var(--gray-hue));
|
|
305
|
+
--gray-9: oklch(from var(--color-9) l var(--gray-chroma) var(--gray-hue));
|
|
306
|
+
--gray-10: oklch(from var(--color-10) l var(--gray-chroma) var(--gray-hue));
|
|
307
|
+
--gray-11: oklch(from var(--color-11) l var(--gray-chroma) var(--gray-hue));
|
|
308
|
+
--gray-12: oklch(from var(--color-12) l var(--gray-chroma) var(--gray-hue));
|
|
309
|
+
--gray-13: oklch(from var(--color-13) l var(--gray-chroma) var(--gray-hue));
|
|
310
|
+
--gray-14: oklch(from var(--color-14) l var(--gray-chroma) var(--gray-hue));
|
|
311
|
+
--gray-15: oklch(from var(--color-15) l var(--gray-chroma) var(--gray-hue));
|
|
312
|
+
--gray-16: oklch(from var(--color-16) l var(--gray-chroma) var(--gray-hue));
|
|
313
|
+
}
|
|
59
314
|
}
|
package/core/utils.css
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@layer utils {
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
Screen-reader only
|
|
5
4
|
When you visibly want to hide an element but make it accessible for screen readers.
|
|
@@ -59,7 +58,8 @@ Add `.ui-scroll-lock` to any element that uses the [open] attribute (native <dia
|
|
|
59
58
|
inset-inline-start: 50%;
|
|
60
59
|
position: absolute;
|
|
61
60
|
transform-origin: center center;
|
|
62
|
-
transform: translateX(calc(var(--isRTL) * 50%)) translateY(-50%)
|
|
61
|
+
transform: translateX(calc(var(--isRTL) * 50%)) translateY(-50%)
|
|
62
|
+
translateZ(-1px) scale(var(--thumb-scale));
|
|
63
63
|
will-change: transform;
|
|
64
64
|
|
|
65
65
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/* Layout */
|
|
72
|
-
|
|
72
|
+
& > summary {
|
|
73
73
|
background-color: inherit;
|
|
74
74
|
cursor: pointer;
|
|
75
75
|
font-weight: 700;
|
|
@@ -94,17 +94,17 @@
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
&[open]>summary svg {
|
|
97
|
+
&[open] > summary svg {
|
|
98
98
|
rotate: 180deg;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
& > .ui-content {
|
|
102
102
|
margin-block-start: 0;
|
|
103
103
|
padding-block: var(--_content-padding-block);
|
|
104
104
|
padding-inline: var(--_content-padding-inline);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
& > .ui-actions {
|
|
108
108
|
display: flex;
|
|
109
109
|
gap: var(--_actions-gap);
|
|
110
110
|
justify-content: end;
|
|
@@ -129,12 +129,12 @@
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
& > .ui-content {
|
|
133
133
|
margin-block: 0;
|
|
134
134
|
padding: 0;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
& > details.ui-accordion {
|
|
138
138
|
--_border-color: transparent;
|
|
139
139
|
--_border-width: 0;
|
|
140
140
|
--_margin-inline: 0;
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
--_summary-padding-inline: var(--_item-summary-padding-inline);
|
|
144
144
|
|
|
145
145
|
/* Border between accordion items */
|
|
146
|
-
|
|
146
|
+
& + & {
|
|
147
147
|
border-block-start: 1px solid var(--_gutter-color);
|
|
148
148
|
border-radius: 0;
|
|
149
149
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
@layer components.root {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
:where(.ui-anchor) {
|
|
3
|
+
anchor-name: --anchor;
|
|
4
|
+
anchor-scope: --anchor;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
inline-size: fit-content;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
/* Always-visible */
|
|
9
|
+
& > .ui-anchor-floating:not([popover]) {
|
|
10
|
+
block-size: max-content;
|
|
11
|
+
inline-size: max-content;
|
|
12
|
+
position: absolute;
|
|
13
|
+
position-anchor: --anchor;
|
|
14
|
+
position-area: var(--anchor-position-area, start end);
|
|
15
|
+
translate: var(--_anchor-tx, 0) var(--_anchor-ty, 0);
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
/* Hover-triggered */
|
|
19
|
+
& > .ui-anchor-floating[popover] {
|
|
20
|
+
inset: unset;
|
|
21
|
+
margin: 0;
|
|
22
|
+
position: absolute;
|
|
23
|
+
position-area: var(--anchor-position-area, start end);
|
|
24
|
+
translate: var(--_anchor-tx, 0) var(--_anchor-ty, 0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
27
|
}
|
package/css/components/badge.css
CHANGED
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
/* Floating wrapper: traditional inset-based positioning so this works
|
|
17
17
|
in browsers without position-area support (Firefox, older Safari). */
|
|
18
|
-
|
|
18
|
+
& > .ui-anchor-floating:not([popover]) {
|
|
19
19
|
inset: var(--_badge-inset);
|
|
20
20
|
position-anchor: auto;
|
|
21
21
|
position-area: none;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/* Indicator */
|
|
25
|
-
|
|
25
|
+
& > .ui-anchor-floating > .ui-badge-indicator {
|
|
26
26
|
background-color: var(--_bg-color);
|
|
27
27
|
block-size: var(--_size);
|
|
28
28
|
border: 2px solid var(--_border-color);
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
--_anchor-ty: var(--_dot-size);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
&.ui-dot
|
|
94
|
+
&.ui-dot > .ui-anchor-floating > .ui-badge-indicator {
|
|
95
95
|
block-size: var(--_dot-size);
|
|
96
96
|
inline-size: var(--_dot-size);
|
|
97
97
|
min-inline-size: var(--_dot-size);
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/* Visibility */
|
|
102
|
-
&.ui-invisible
|
|
102
|
+
&.ui-invisible > .ui-anchor-floating > .ui-badge-indicator {
|
|
103
103
|
opacity: 0;
|
|
104
104
|
pointer-events: none;
|
|
105
105
|
}
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
border-radius: 0;
|
|
12
12
|
|
|
13
13
|
/* button.css > --_accent-tonal */
|
|
14
|
-
--_divider-color: light-dark(
|
|
15
|
-
|
|
14
|
+
--_divider-color: light-dark(
|
|
15
|
+
oklch(from var(--_accent-tonal) calc(l - 0.1) c h),
|
|
16
|
+
oklch(from var(--_accent-tonal) calc(l + 0.1) c h)
|
|
17
|
+
);
|
|
16
18
|
|
|
17
19
|
&.ui-outlined {
|
|
18
20
|
--_divider-color: var(--_border-color);
|
|
@@ -29,16 +31,19 @@
|
|
|
29
31
|
/* Color inheritance from Button Group — shared interaction model.
|
|
30
32
|
The .critical scope class in theme.css redirects --palette-source so
|
|
31
33
|
--color-6 below becomes a tint of the active color. */
|
|
32
|
-
:where(.ui-button-group.ui-critical,
|
|
33
|
-
.ui-button-group.ui-primary) & {
|
|
34
|
+
:where(.ui-button-group.ui-critical, .ui-button-group.ui-primary) & {
|
|
34
35
|
--_color-contrast: var(--gray-1);
|
|
35
36
|
--_color-tonal: var(--color-6);
|
|
36
37
|
--_accent-tonal-contrast: var(--text-primary-contrast);
|
|
37
38
|
--_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
|
|
38
39
|
--_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
|
|
39
40
|
--_filled-hover-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
|
|
40
|
-
--_filled-active-bg-color: oklch(
|
|
41
|
-
|
|
41
|
+
--_filled-active-bg-color: oklch(
|
|
42
|
+
from var(--_accent) calc(l - 0.15) c h
|
|
43
|
+
);
|
|
44
|
+
--_outlined-active-bg-color: oklch(
|
|
45
|
+
from var(--_accent) calc(l - 0.1) c h
|
|
46
|
+
);
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
:where(.ui-button-group.ui-critical) & {
|
|
@@ -101,10 +106,11 @@
|
|
|
101
106
|
--_text-color: var(--_accent-contrast);
|
|
102
107
|
--_divider-color: currentColor;
|
|
103
108
|
|
|
104
|
-
:where(.ui-button-group.ui-critical,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
:where(.ui-button-group.ui-critical, .ui-button-group.ui-primary) & {
|
|
110
|
+
--_divider-color: light-dark(
|
|
111
|
+
oklch(from var(--_accent) calc(l - 0.1) c h),
|
|
112
|
+
oklch(from var(--_accent) calc(l + 0.1) c h)
|
|
113
|
+
);
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
&:where(:not([disabled])) {
|
|
@@ -132,13 +138,17 @@
|
|
|
132
138
|
}
|
|
133
139
|
|
|
134
140
|
/* Siblings */
|
|
135
|
-
|
|
141
|
+
& + & {
|
|
136
142
|
border-inline-start-color: var(--_divider-color);
|
|
137
143
|
border-inline-width: 1px;
|
|
138
144
|
margin-inline-start: -1px;
|
|
139
145
|
|
|
140
146
|
&[disabled] {
|
|
141
|
-
border-inline-start-color: color-mix(
|
|
147
|
+
border-inline-start-color: color-mix(
|
|
148
|
+
in oklch,
|
|
149
|
+
var(--_divider-color) 40%,
|
|
150
|
+
transparent
|
|
151
|
+
);
|
|
142
152
|
}
|
|
143
153
|
}
|
|
144
154
|
}
|
|
@@ -165,12 +175,16 @@
|
|
|
165
175
|
border-end-end-radius: var(--_border-radius);
|
|
166
176
|
}
|
|
167
177
|
|
|
168
|
-
|
|
178
|
+
& + & {
|
|
169
179
|
border-block-start: 1px solid var(--_divider-color);
|
|
170
180
|
margin-block-start: -1px;
|
|
171
181
|
|
|
172
182
|
&[disabled] {
|
|
173
|
-
border-block-start-color: color-mix(
|
|
183
|
+
border-block-start-color: color-mix(
|
|
184
|
+
in oklch,
|
|
185
|
+
var(--_divider-color) 40%,
|
|
186
|
+
transparent
|
|
187
|
+
);
|
|
174
188
|
}
|
|
175
189
|
}
|
|
176
190
|
}
|