@oscarpalmer/oui 0.11.0 → 0.13.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/css/badge.css +14 -7
- package/dist/css/button.css +6 -4
- package/dist/css/color.css +25 -25
- package/dist/css/content.css +193 -0
- package/dist/css/form.css +128 -66
- package/dist/css/message.css +23 -16
- package/dist/css/reset.css +3 -1
- package/dist/css/table.css +26 -9
- package/dist/css/tooltip.css +14 -0
- package/dist/js/attributable.cjs +51 -0
- package/dist/js/attributable.js +51 -0
- package/dist/js/focus-trap.cjs +19 -62
- package/dist/js/focus-trap.js +19 -62
- package/dist/js/tooltip.cjs +203 -0
- package/dist/js/tooltip.js +202 -0
- package/package.json +17 -7
- package/src/css/badge.scss +17 -10
- package/src/css/button.scss +5 -3
- package/src/css/color.scss +25 -25
- package/src/css/content.scss +156 -0
- package/src/css/form.scss +124 -56
- package/src/css/message.scss +29 -21
- package/src/css/mixins.scss +38 -6
- package/src/css/reset.scss +3 -2
- package/src/css/table.scss +32 -7
- package/src/css/tooltip.scss +14 -0
- package/src/js/attributable.ts +70 -0
- package/src/js/focus-trap.ts +16 -64
- package/src/js/tooltip.ts +289 -0
- package/types/attributable.d.cts +5 -0
- package/types/attributable.d.ts +1 -0
- package/types/tooltip.d.cts +3 -0
- package/types/tooltip.d.ts +1 -0
package/src/css/form.scss
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use 'mixins.scss' as mixins;
|
|
4
4
|
|
|
5
5
|
@mixin focus() {
|
|
6
|
-
--oui-border-value: var(--oui-blue-
|
|
6
|
+
--oui-border-value: var(--oui-blue-5);
|
|
7
7
|
--oui-foreground-value: inherit;
|
|
8
8
|
--oui-outline-percentage: 75%;
|
|
9
9
|
--oui-outline-value: var(--oui-blue-6);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
@mixin hover() {
|
|
13
13
|
--oui-border-value: var(--oui-blue-4);
|
|
14
|
-
--oui-foreground-percentage:
|
|
14
|
+
--oui-foreground-percentage: 0%;
|
|
15
15
|
--oui-foreground-value: inherit;
|
|
16
16
|
--oui-outline-percentage: 90%;
|
|
17
17
|
--oui-outline-value: var(--oui-blue-6);
|
|
@@ -23,20 +23,29 @@
|
|
|
23
23
|
|
|
24
24
|
@include outlined;
|
|
25
25
|
|
|
26
|
-
background-color: color-mix(
|
|
26
|
+
background-color: color-mix(
|
|
27
|
+
in oklab,
|
|
28
|
+
var(--oui-background-value),
|
|
29
|
+
transparent var(--oui-background-percentage)
|
|
30
|
+
);
|
|
27
31
|
border: 1px solid var(--oui-border-value, var(--oui-gray-3));
|
|
28
|
-
box-shadow: inset 0
|
|
32
|
+
box-shadow: inset 0 2px 4px -1px var(--oui-gray-3);
|
|
29
33
|
color: color-mix(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
in oklab,
|
|
35
|
+
var(--oui-foreground-value, inherit),
|
|
36
|
+
transparent var(--oui-foreground-percentage)
|
|
37
|
+
);
|
|
38
|
+
-webkit-text-fill-color: color-mix(
|
|
39
|
+
in oklab,
|
|
40
|
+
var(--oui-foreground-value, inherit),
|
|
41
|
+
transparent var(--oui-foreground-percentage)
|
|
42
|
+
);
|
|
34
43
|
}
|
|
35
44
|
|
|
36
45
|
@mixin invalid() {
|
|
37
|
-
--oui-border-value: var(--oui-red-
|
|
46
|
+
--oui-border-value: var(--oui-red-5);
|
|
38
47
|
--oui-foreground-value: var(--oui-red-9);
|
|
39
|
-
--oui-outline-percentage:
|
|
48
|
+
--oui-outline-percentage: 82.5%;
|
|
40
49
|
--oui-outline-value: var(--oui-red-6);
|
|
41
50
|
}
|
|
42
51
|
|
|
@@ -55,9 +64,9 @@
|
|
|
55
64
|
}
|
|
56
65
|
|
|
57
66
|
@mixin valid() {
|
|
58
|
-
--oui-border-value: var(--oui-green-
|
|
67
|
+
--oui-border-value: var(--oui-green-5);
|
|
59
68
|
--oui-foreground-value: var(--oui-green-9);
|
|
60
|
-
--oui-outline-percentage:
|
|
69
|
+
--oui-outline-percentage: 82.5%;
|
|
61
70
|
--oui-outline-value: var(--oui-green-6);
|
|
62
71
|
}
|
|
63
72
|
|
|
@@ -93,27 +102,32 @@
|
|
|
93
102
|
padding: 0;
|
|
94
103
|
}
|
|
95
104
|
|
|
96
|
-
:where(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
:where(
|
|
106
|
+
&:is(
|
|
107
|
+
[type='date' i],
|
|
108
|
+
[type='datetime-local' i],
|
|
109
|
+
[type='month' i],
|
|
110
|
+
[type='number' i],
|
|
111
|
+
[type='tel' i],
|
|
112
|
+
[type='time' i],
|
|
113
|
+
[type='url' i],
|
|
114
|
+
[type='week' i]
|
|
115
|
+
)
|
|
116
|
+
) {
|
|
104
117
|
font-variant-numeric: tabular-nums;
|
|
105
118
|
}
|
|
106
119
|
|
|
107
120
|
:where(&:is([type='file' i])) {
|
|
108
|
-
padding-left: .5em;
|
|
121
|
+
padding-left: 0.5em;
|
|
109
122
|
|
|
110
123
|
&::file-selector-button {
|
|
111
124
|
@include mixins.button;
|
|
112
125
|
|
|
126
|
+
--oui-background-value: var(--oui-grey-2);
|
|
113
127
|
--oui-outline-value: var(--oui-grey-6);
|
|
114
128
|
|
|
115
|
-
margin: 0 .75em 0 0;
|
|
116
|
-
font-size: .75em;
|
|
129
|
+
margin: 0 0.75em 0 0;
|
|
130
|
+
font-size: 0.75em;
|
|
117
131
|
cursor: pointer;
|
|
118
132
|
}
|
|
119
133
|
}
|
|
@@ -128,7 +142,7 @@
|
|
|
128
142
|
appearance: none;
|
|
129
143
|
width: 100%;
|
|
130
144
|
height: 0.75em;
|
|
131
|
-
border-radius: .75em;
|
|
145
|
+
border-radius: 0.75em;
|
|
132
146
|
position: relative;
|
|
133
147
|
}
|
|
134
148
|
|
|
@@ -141,12 +155,11 @@
|
|
|
141
155
|
appearance: none;
|
|
142
156
|
width: 1.25em;
|
|
143
157
|
height: 1.25em;
|
|
144
|
-
background-color:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
);
|
|
158
|
+
background-color: color-mix(
|
|
159
|
+
in oklab,
|
|
160
|
+
var(--oui-background-value),
|
|
161
|
+
transparent var(--oui-background-percentage)
|
|
162
|
+
);
|
|
150
163
|
border: 2px solid var(--oui-absolute);
|
|
151
164
|
border-radius: 1.25em;
|
|
152
165
|
box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.125);
|
|
@@ -160,11 +173,20 @@
|
|
|
160
173
|
}
|
|
161
174
|
}
|
|
162
175
|
|
|
163
|
-
:where(
|
|
176
|
+
:where(
|
|
177
|
+
&.oui-validatable:not(
|
|
178
|
+
[disabled],
|
|
179
|
+
[readonly],
|
|
180
|
+
[aria-disabled='true' i]
|
|
181
|
+
):is(
|
|
182
|
+
:user-invalid:not([aria-invalid='false' i]),
|
|
183
|
+
[aria-invalid='true' i]
|
|
184
|
+
)
|
|
185
|
+
) {
|
|
164
186
|
@include invalid;
|
|
165
187
|
|
|
166
188
|
&::file-selector-button {
|
|
167
|
-
--oui-background-value: var(--oui-red-
|
|
189
|
+
--oui-background-value: var(--oui-red-2);
|
|
168
190
|
--oui-foreground-value: var(--oui-red-8);
|
|
169
191
|
--oui-outline-value: var(--oui-red-6);
|
|
170
192
|
}
|
|
@@ -176,13 +198,24 @@
|
|
|
176
198
|
&::range-track {
|
|
177
199
|
@include invalid;
|
|
178
200
|
}
|
|
201
|
+
|
|
202
|
+
& > option:checked {
|
|
203
|
+
background-color: var(--oui-red-2);
|
|
204
|
+
color: var(--oui-red-9);
|
|
205
|
+
}
|
|
179
206
|
}
|
|
180
207
|
|
|
181
|
-
:where(
|
|
208
|
+
:where(
|
|
209
|
+
&.oui-validatable:not(
|
|
210
|
+
[disabled],
|
|
211
|
+
[readonly],
|
|
212
|
+
[aria-disabled='true' i]
|
|
213
|
+
):is(:user-valid:not([aria-invalid='true' i]), [aria-invalid='false' i])
|
|
214
|
+
) {
|
|
182
215
|
@include valid;
|
|
183
216
|
|
|
184
217
|
&::file-selector-button {
|
|
185
|
-
--oui-background-value: var(--oui-green-
|
|
218
|
+
--oui-background-value: var(--oui-green-2);
|
|
186
219
|
--oui-foreground-value: var(--oui-green-8);
|
|
187
220
|
--oui-outline-value: var(--oui-green-6);
|
|
188
221
|
}
|
|
@@ -194,19 +227,28 @@
|
|
|
194
227
|
&::range-thumb {
|
|
195
228
|
--oui-background-value: var(--oui-green-6);
|
|
196
229
|
}
|
|
230
|
+
|
|
231
|
+
& > option:checked {
|
|
232
|
+
background-color: var(--oui-green-2);
|
|
233
|
+
color: var(--oui-green-9);
|
|
234
|
+
}
|
|
197
235
|
}
|
|
198
236
|
|
|
199
|
-
:where(&:not([disabled], [readonly], [aria-disabled=
|
|
237
|
+
:where(&:not([disabled], [readonly], [aria-disabled='true' i])) {
|
|
200
238
|
&::-webkit-calendar-picker-indicator {
|
|
201
239
|
outline: 4px solid transparent;
|
|
202
240
|
outline-offset: 2px;
|
|
203
241
|
border-radius: 2em;
|
|
204
|
-
transition: .125s ease-in-out;
|
|
242
|
+
transition: 0.125s ease-in-out;
|
|
205
243
|
cursor: pointer;
|
|
206
244
|
|
|
207
245
|
@media (hover: hover) {
|
|
208
246
|
&:hover {
|
|
209
|
-
outline-color: color-mix(
|
|
247
|
+
outline-color: color-mix(
|
|
248
|
+
in oklab,
|
|
249
|
+
var(--oui-blue-6),
|
|
250
|
+
transparent 75%
|
|
251
|
+
);
|
|
210
252
|
}
|
|
211
253
|
}
|
|
212
254
|
|
|
@@ -216,12 +258,12 @@
|
|
|
216
258
|
}
|
|
217
259
|
}
|
|
218
260
|
|
|
219
|
-
:where(&:not([disabled], [readonly], [aria-disabled=
|
|
220
|
-
:where(&:not([disabled], [readonly], [aria-disabled=
|
|
261
|
+
:where(&:not([disabled], [readonly], [aria-disabled='true' i]):focus),
|
|
262
|
+
:where(&:not([disabled], [readonly], [aria-disabled='true' i]):focus-within) {
|
|
221
263
|
@include focus;
|
|
222
264
|
|
|
223
265
|
&::file-selector-button {
|
|
224
|
-
--oui-background-value: var(--oui-blue-
|
|
266
|
+
--oui-background-value: var(--oui-blue-2);
|
|
225
267
|
--oui-foreground-value: var(--oui-blue-8);
|
|
226
268
|
--oui-outline-value: var(--oui-blue-6);
|
|
227
269
|
}
|
|
@@ -239,11 +281,11 @@
|
|
|
239
281
|
}
|
|
240
282
|
|
|
241
283
|
@media (hover: hover) {
|
|
242
|
-
:where(&:not([disabled], [aria-disabled='true' i]):hover) {
|
|
284
|
+
:where(&:not([disabled], [readonly], [aria-disabled='true' i]):hover) {
|
|
243
285
|
@include hover;
|
|
244
286
|
|
|
245
287
|
&::file-selector-button {
|
|
246
|
-
--oui-background-value: var(--oui-blue-
|
|
288
|
+
--oui-background-value: var(--oui-blue-2);
|
|
247
289
|
--oui-foreground-value: var(--oui-blue-8);
|
|
248
290
|
--oui-outline-value: var(--oui-blue-6);
|
|
249
291
|
}
|
|
@@ -262,6 +304,12 @@
|
|
|
262
304
|
--oui-foreground-percentage: 25%;
|
|
263
305
|
|
|
264
306
|
font-style: italic;
|
|
307
|
+
|
|
308
|
+
&::file-selector-button {
|
|
309
|
+
--oui-background-value: var(--oui-gray-1);
|
|
310
|
+
|
|
311
|
+
cursor: default;
|
|
312
|
+
}
|
|
265
313
|
}
|
|
266
314
|
|
|
267
315
|
:where(&:is([disabled], [readonly], [aria-disabled='true' i]):focus) {
|
|
@@ -271,7 +319,6 @@
|
|
|
271
319
|
:where(&[disabled], &[aria-disabled='true' i]) {
|
|
272
320
|
--oui-background-percentage: 50%;
|
|
273
321
|
|
|
274
|
-
&::file-selector-button,
|
|
275
322
|
&::range-thumb {
|
|
276
323
|
--oui-background-value: var(--oui-gray-1);
|
|
277
324
|
|
|
@@ -284,8 +331,7 @@
|
|
|
284
331
|
}
|
|
285
332
|
|
|
286
333
|
&::-webkit-calendar-picker-indicator {
|
|
287
|
-
|
|
288
|
-
stroke: red;
|
|
334
|
+
opacity: 0.5;
|
|
289
335
|
}
|
|
290
336
|
}
|
|
291
337
|
}
|
|
@@ -315,7 +361,7 @@ select.oui-input:is([multiple]) {
|
|
|
315
361
|
}
|
|
316
362
|
|
|
317
363
|
:where(& > option:nth-of-type(2n)) {
|
|
318
|
-
background-color: color-mix(in oklab, var(--oui-blue-0), transparent
|
|
364
|
+
background-color: color-mix(in oklab, var(--oui-blue-0), transparent 50%);
|
|
319
365
|
}
|
|
320
366
|
|
|
321
367
|
:where(& > option:checked) {
|
|
@@ -324,7 +370,7 @@ select.oui-input:is([multiple]) {
|
|
|
324
370
|
|
|
325
371
|
&::before {
|
|
326
372
|
content: var(--oui-on);
|
|
327
|
-
margin: 0 .75em 0 0;
|
|
373
|
+
margin: 0 0.75em 0 0;
|
|
328
374
|
}
|
|
329
375
|
}
|
|
330
376
|
}
|
|
@@ -342,7 +388,7 @@ select.oui-input:is([multiple]) {
|
|
|
342
388
|
|
|
343
389
|
:where(.oui-label) {
|
|
344
390
|
cursor: pointer;
|
|
345
|
-
transition: .125s ease-in-out;
|
|
391
|
+
transition: 0.125s ease-in-out;
|
|
346
392
|
|
|
347
393
|
@media (hover: hover) {
|
|
348
394
|
:where(&[for]:hover) {
|
|
@@ -381,19 +427,33 @@ select.oui-input:is([multiple]) {
|
|
|
381
427
|
}
|
|
382
428
|
|
|
383
429
|
&::before {
|
|
384
|
-
background-color: color-mix(
|
|
385
|
-
box-shadow: inset 0 1px 2px 0 color-mix(in oklab, var(--oui-shadow-value), transparent var(--oui-shadow-percentage));
|
|
386
|
-
outline: 4px solid color-mix(
|
|
430
|
+
background-color: color-mix(
|
|
387
431
|
in oklab,
|
|
388
|
-
var(--oui-
|
|
389
|
-
transparent var(--oui-
|
|
432
|
+
var(--oui-background-value),
|
|
433
|
+
transparent var(--oui-background-percentage)
|
|
390
434
|
);
|
|
435
|
+
outline: 4px solid
|
|
436
|
+
color-mix(
|
|
437
|
+
in oklab,
|
|
438
|
+
var(--oui-outline-value),
|
|
439
|
+
transparent var(--oui-outline-percentage)
|
|
440
|
+
);
|
|
391
441
|
outline-offset: 0;
|
|
392
442
|
border: 1px solid var(--oui-border-value);
|
|
443
|
+
box-shadow: inset 0 1px 2px 0
|
|
444
|
+
color-mix(
|
|
445
|
+
in oklab,
|
|
446
|
+
var(--oui-shadow-value),
|
|
447
|
+
transparent var(--oui-shadow-percentage)
|
|
448
|
+
);
|
|
393
449
|
}
|
|
394
450
|
|
|
395
451
|
&::after {
|
|
396
|
-
color: color-mix(
|
|
452
|
+
color: color-mix(
|
|
453
|
+
in oklab,
|
|
454
|
+
var(--oui-foreground-value),
|
|
455
|
+
transparent var(--oui-foreground-percentage)
|
|
456
|
+
);
|
|
397
457
|
}
|
|
398
458
|
}
|
|
399
459
|
|
|
@@ -531,7 +591,11 @@ select.oui-input:is([multiple]) {
|
|
|
531
591
|
color: var(--oui-blue-8);
|
|
532
592
|
}
|
|
533
593
|
|
|
534
|
-
:where(
|
|
594
|
+
:where(
|
|
595
|
+
&:has(
|
|
596
|
+
input:not([disabled], [aria-disabled='true' i]):is(:checked)
|
|
597
|
+
):hover
|
|
598
|
+
) {
|
|
535
599
|
--oui-background-percentage: 50%;
|
|
536
600
|
--oui-background-value: var(--oui-blue-6);
|
|
537
601
|
}
|
|
@@ -544,7 +608,11 @@ select.oui-input:is([multiple]) {
|
|
|
544
608
|
--oui-foreground-percentage: 25%;
|
|
545
609
|
--oui-foreground-value: currentColor;
|
|
546
610
|
|
|
547
|
-
color: color-mix(
|
|
611
|
+
color: color-mix(
|
|
612
|
+
in oklab,
|
|
613
|
+
var(--oui-foreground-value),
|
|
614
|
+
transparent var(--oui-foreground-percentage)
|
|
615
|
+
);
|
|
548
616
|
font-style: italic;
|
|
549
617
|
cursor: default;
|
|
550
618
|
|
package/src/css/message.scss
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
/*! https://github.com/oscarpalmer/oui */
|
|
2
2
|
|
|
3
|
+
@use './mixins.scss' as mixins;
|
|
4
|
+
|
|
3
5
|
.oui-message {
|
|
4
6
|
:where(&) {
|
|
5
|
-
--oui-shadow-
|
|
6
|
-
in
|
|
7
|
-
var(--oui-shadow, var(--oui-gray-6)),
|
|
8
|
-
transparent
|
|
7
|
+
--oui-shadow-mixed: color-mix(
|
|
8
|
+
in oklab,
|
|
9
|
+
var(--oui-shadow-value, var(--oui-gray-6)),
|
|
10
|
+
transparent 92.5%
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
@include mixins.card(
|
|
14
|
+
color-mix(
|
|
15
|
+
in oklab,
|
|
16
|
+
var(--oui-background, var(--oui-gray-0)),
|
|
17
|
+
transparent 25%
|
|
18
|
+
),
|
|
19
|
+
var(--oui-shadow-mixed),
|
|
9
20
|
);
|
|
10
21
|
|
|
11
|
-
padding: 1em;
|
|
12
22
|
display: inline-flex;
|
|
13
23
|
flex-flow: column nowrap;
|
|
14
24
|
gap: 1em;
|
|
15
|
-
background-color: color-mix(
|
|
16
|
-
in oklab,
|
|
17
|
-
var(--oui-background, var(--oui-gray-0)),
|
|
18
|
-
transparent 25%
|
|
19
|
-
);
|
|
20
|
-
border-radius: 0.5em;
|
|
21
|
-
box-shadow: 0 0 0 1px var(--oui-shadow-value),
|
|
22
|
-
0 1px 2px 0 var(--oui-shadow-value), 0 2px 4px 0 var(--oui-shadow-value);
|
|
23
25
|
color: var(--oui-foreground, var(--oui-gray-8));
|
|
24
26
|
line-height: 1.25;
|
|
25
27
|
}
|
|
@@ -31,8 +33,8 @@
|
|
|
31
33
|
|
|
32
34
|
:where(& hr) {
|
|
33
35
|
height: 1px;
|
|
34
|
-
margin: 0 -
|
|
35
|
-
background-color: var(--oui-
|
|
36
|
+
margin: 0 -1.25em;
|
|
37
|
+
background-color: var(--oui-border, var(--oui-gray-2));
|
|
36
38
|
border: none;
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -44,37 +46,43 @@
|
|
|
44
46
|
|
|
45
47
|
:where(&-blue, &-info) {
|
|
46
48
|
--oui-background: var(--oui-blue-0);
|
|
49
|
+
--oui-border: var(--oui-blue-2);
|
|
47
50
|
--oui-foreground: var(--oui-blue-8);
|
|
48
|
-
--oui-shadow: var(--oui-blue-6);
|
|
51
|
+
--oui-shadow-value: var(--oui-blue-6);
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
:where(&-green, &-success) {
|
|
52
55
|
--oui-background: var(--oui-green-0);
|
|
56
|
+
--oui-border: var(--oui-green-2);
|
|
53
57
|
--oui-foreground: var(--oui-green-8);
|
|
54
|
-
--oui-shadow: var(--oui-green-6);
|
|
58
|
+
--oui-shadow-value: var(--oui-green-6);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
:where(&-orange, &-warning) {
|
|
58
62
|
--oui-background: var(--oui-orange-0);
|
|
63
|
+
--oui-border: var(--oui-orange-2);
|
|
59
64
|
--oui-foreground: var(--oui-orange-8);
|
|
60
|
-
--oui-shadow: var(--oui-orange-6);
|
|
65
|
+
--oui-shadow-value: var(--oui-orange-6);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
:where(&-purple, &-special) {
|
|
64
69
|
--oui-background: var(--oui-purple-0);
|
|
70
|
+
--oui-border: var(--oui-purple-2);
|
|
65
71
|
--oui-foreground: var(--oui-purple-8);
|
|
66
|
-
--oui-shadow: var(--oui-purple-6);
|
|
72
|
+
--oui-shadow-value: var(--oui-purple-6);
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
:where(&-red, &-error) {
|
|
70
76
|
--oui-background: var(--oui-red-0);
|
|
77
|
+
--oui-border: var(--oui-red-2);
|
|
71
78
|
--oui-foreground: var(--oui-red-8);
|
|
72
|
-
--oui-shadow: var(--oui-red-6);
|
|
79
|
+
--oui-shadow-value: var(--oui-red-6);
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
:where(&-yellow, &-notice) {
|
|
76
83
|
--oui-background: var(--oui-yellow-0);
|
|
84
|
+
--oui-border: var(--oui-yellow-2);
|
|
77
85
|
--oui-foreground: var(--oui-yellow-8);
|
|
78
|
-
--oui-shadow: var(--oui-yellow-6);
|
|
86
|
+
--oui-shadow-value: var(--oui-yellow-6);
|
|
79
87
|
}
|
|
80
88
|
}
|
package/src/css/mixins.scss
CHANGED
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
--oui-background-percentage: 25%;
|
|
3
3
|
--oui-foreground-percentage: 0%;
|
|
4
4
|
--oui-outline-percentage: 100%;
|
|
5
|
-
--oui-shadow-
|
|
5
|
+
--oui-shadow-inset: color-mix(in oklab, white, transparent 75%);
|
|
6
|
+
--oui-shadow-percentage: 82.5%;
|
|
6
7
|
|
|
7
8
|
--oui-shadow-value: color-mix(
|
|
8
|
-
in
|
|
9
|
+
in oklab,
|
|
9
10
|
var(--oui-outline-value, var(--oui-gray-6)),
|
|
10
11
|
transparent var(--oui-shadow-percentage)
|
|
11
12
|
);
|
|
12
13
|
|
|
14
|
+
@include shadow(var(--oui-shadow-value), var(--oui-shadow-inset));
|
|
15
|
+
|
|
13
16
|
padding: 0.5em 0.75em;
|
|
14
17
|
display: inline-flex;
|
|
15
18
|
flex-flow: row wrap;
|
|
@@ -28,10 +31,6 @@
|
|
|
28
31
|
transparent var(--oui-outline-percentage)
|
|
29
32
|
);
|
|
30
33
|
border: none;
|
|
31
|
-
box-shadow:
|
|
32
|
-
0 0 0 1px var(--oui-shadow-value),
|
|
33
|
-
0 1px 2px 0 var(--oui-shadow-value),
|
|
34
|
-
0 2px 4px 0 var(--oui-shadow-value);
|
|
35
34
|
color: color-mix(
|
|
36
35
|
in oklab,
|
|
37
36
|
var(--oui-foreground-value, var(--oui-gray-8)),
|
|
@@ -41,6 +40,39 @@
|
|
|
41
40
|
transition: 0.125s ease-in-out;
|
|
42
41
|
}
|
|
43
42
|
|
|
43
|
+
@mixin card($backgroundColor: var(--oui-absolute), $boxShadowColor: color-mix(
|
|
44
|
+
in oklab,
|
|
45
|
+
var(--oui-gray-6),
|
|
46
|
+
transparent 92.5%
|
|
47
|
+
)) {
|
|
48
|
+
@include shadow($boxShadowColor);
|
|
49
|
+
|
|
50
|
+
padding: 1em 1.25em;
|
|
51
|
+
background-color: $backgroundColor;
|
|
52
|
+
border-radius: 0.5em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin shadow($color: rgba(0, 0, 0, 0.05), $inset: transparent) {
|
|
56
|
+
box-shadow:
|
|
57
|
+
inset 0 1px 0 0 $inset,
|
|
58
|
+
0 0 0 1px $color,
|
|
59
|
+
0 1px 2px -.5px $color,
|
|
60
|
+
0 2px 4px -1px $color;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@mixin shadowOverlay($color: rgba(0, 0, 0, 0.05), $inset: transparent) {
|
|
64
|
+
box-shadow:
|
|
65
|
+
inset 0 1px 0 0 $inset,
|
|
66
|
+
0 0 0 1px $color,
|
|
67
|
+
0 1px 2px -.5px $color,
|
|
68
|
+
0 2px 4px -1px $color,
|
|
69
|
+
0 4px 8px -2px $color,
|
|
70
|
+
0 8px 16px -4px $color,
|
|
71
|
+
0 16px 32px -8px $color,
|
|
72
|
+
0 32px 64px -16px $color,
|
|
73
|
+
0 64px 128px -32px $color;
|
|
74
|
+
}
|
|
75
|
+
|
|
44
76
|
@mixin visuallyHidden() {
|
|
45
77
|
width: 1px !important;
|
|
46
78
|
height: 1px !important;
|
package/src/css/reset.scss
CHANGED
|
@@ -178,8 +178,9 @@
|
|
|
178
178
|
:where(select, input[list]) {
|
|
179
179
|
appearance: none; // Change the inconsistent appearance in all browsers [SE]
|
|
180
180
|
padding-right: 1em; // ditto
|
|
181
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E")
|
|
182
|
-
|
|
181
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E");
|
|
182
|
+
background-position: right center / 1em; // ditto
|
|
183
|
+
background-repeat: no-repeat; // ditto
|
|
183
184
|
border-radius: 0; // ditto
|
|
184
185
|
}
|
|
185
186
|
|
package/src/css/table.scss
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
.oui-table {
|
|
4
4
|
:where(&) {
|
|
5
5
|
width: 100%;
|
|
6
|
+
background-color: var(--oui-absolute);
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
:where(&-wrapper) {
|
|
@@ -29,41 +30,65 @@
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
:where(& tbody tr:nth-of-type(2n)) {
|
|
32
|
-
background-color: color-mix(in oklab, var(--oui-blue-0), transparent
|
|
33
|
+
background-color: color-mix(in oklab, var(--oui-blue-0), transparent 50%);
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
:where(& th, & tfoot td) {
|
|
36
37
|
background-color: var(--oui-gray-1);
|
|
37
38
|
border: solid var(--oui-gray-3);
|
|
38
39
|
border-width: 0 1px 0 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(& thead th, & tfoot td) {
|
|
39
43
|
position: sticky;
|
|
40
44
|
left: 0;
|
|
41
45
|
z-index: 1;
|
|
42
46
|
|
|
43
47
|
&::after {
|
|
44
48
|
content: '';
|
|
45
|
-
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 4px;
|
|
51
|
+
background-image: linear-gradient(
|
|
52
|
+
to var(--oui-shadow-direction),
|
|
53
|
+
rgba(0, 0, 0, 0.1),
|
|
54
|
+
transparent
|
|
55
|
+
);
|
|
46
56
|
position: absolute;
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
:where(& th, & td) {
|
|
51
|
-
padding: .5em;
|
|
61
|
+
padding: .5em .625rem;
|
|
52
62
|
}
|
|
53
63
|
|
|
54
|
-
:where(& th) {
|
|
55
|
-
|
|
64
|
+
:where(& thead th) {
|
|
65
|
+
font-size: .75rem;
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
letter-spacing: .1em;
|
|
68
|
+
text-align: left;
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
top: 0;
|
|
56
71
|
|
|
57
72
|
&::after {
|
|
58
|
-
|
|
73
|
+
--oui-shadow-direction: bottom;
|
|
74
|
+
|
|
75
|
+
border-top: 1px solid var(--oui-gray-3);
|
|
76
|
+
inset: 100% 0 0 0;
|
|
59
77
|
}
|
|
60
78
|
}
|
|
61
79
|
|
|
80
|
+
:where(&:has(caption) thead th) {
|
|
81
|
+
top: 2rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
62
84
|
:where(& tfoot td) {
|
|
63
85
|
bottom: 0;
|
|
64
86
|
|
|
65
87
|
&::after {
|
|
66
|
-
|
|
88
|
+
--oui-shadow-direction: top;
|
|
89
|
+
|
|
90
|
+
border-bottom: 1px solid var(--oui-gray-3);
|
|
91
|
+
inset: -4px 0 0 0;
|
|
67
92
|
}
|
|
68
93
|
}
|
|
69
94
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use 'mixins.scss' as mixins;
|
|
2
|
+
|
|
3
|
+
:where([oui-tooltip-content]) {
|
|
4
|
+
@include mixins.shadowOverlay;
|
|
5
|
+
|
|
6
|
+
max-width: 48ch;
|
|
7
|
+
padding: 0.75em 1em;
|
|
8
|
+
background-color: var(--oui-absolute);
|
|
9
|
+
border-radius: 0.25rem;
|
|
10
|
+
font-size: 0.875rem;
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 0 auto auto 0;
|
|
13
|
+
z-index: 10;
|
|
14
|
+
}
|