@oscarpalmer/oui 0.4.1 → 0.5.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.
@@ -0,0 +1,56 @@
1
+ :where(.oui-pill, .oui-tag) {
2
+ display: inline-flex;
3
+ flex-flow: row nowrap;
4
+ gap: 0.5em;
5
+ background-color: var(--background, var(--oui-grey-1, #eee));
6
+ border: 1px solid var(--border, var(--oui-grey-3, #ccc));
7
+ color: var(--foreground, var(--oui-grey-8, #333));
8
+ line-height: 1.125;
9
+ }
10
+ :where(.oui-pill) {
11
+ border-radius: 3em;
12
+ padding: 0.5em 1em;
13
+ }
14
+ :where(.oui-tag) {
15
+ border-radius: 0.25em;
16
+ padding: 0.5em 0.75em;
17
+ }
18
+ :where(.oui-pill-small, .oui-tag-small) {
19
+ font-size: 0.875em;
20
+ }
21
+ :where(.oui-pill-tiny, .oui-tag-tiny) {
22
+ font-size: 0.75em;
23
+ font-weight: bold;
24
+ letter-spacing: 0.1em;
25
+ text-transform: uppercase;
26
+ }
27
+ :where(.oui-pill-blue, .oui-tag-blue) {
28
+ --background: var(--oui-blue-1);
29
+ --border: var(--oui-blue-3);
30
+ --foreground: var(--oui-blue-9);
31
+ }
32
+ :where(.oui-pill-green, .oui-tag-green) {
33
+ --background: var(--oui-green-1);
34
+ --border: var(--oui-green-3);
35
+ --foreground: var(--oui-green-9);
36
+ }
37
+ :where(.oui-pill-orange, .oui-tag-orange) {
38
+ --background: var(--oui-orange-1);
39
+ --border: var(--oui-orange-3);
40
+ --foreground: var(--oui-orange-9);
41
+ }
42
+ :where(.oui-pill-purple, .oui-tag-purple) {
43
+ --background: var(--oui-purple-1);
44
+ --border: var(--oui-purple-3);
45
+ --foreground: var(--oui-purple-9);
46
+ }
47
+ :where(.oui-pill-red, .oui-tag-red) {
48
+ --background: var(--oui-red-1);
49
+ --border: var(--oui-red-3);
50
+ --foreground: var(--oui-red-9);
51
+ }
52
+ :where(.oui-pill-yellow, .oui-tag-yellow) {
53
+ --background: var(--oui-yellow-1);
54
+ --border: var(--oui-yellow-3);
55
+ --foreground: var(--oui-yellow-9);
56
+ }
package/dist/css/form.css CHANGED
@@ -1,473 +1,4 @@
1
1
  @charset "UTF-8";
2
- :root {
3
- --oui-blue-0: #f4f8fd;
4
- --oui-blue-1: color-mix(
5
- in srgb,
6
- var(--oui-blue-0),
7
- var(--oui-blue-6) 5%
8
- );
9
- --oui-blue-2: color-mix(
10
- in srgb,
11
- var(--oui-blue-0),
12
- var(--oui-blue-6) 15%
13
- );
14
- --oui-blue-3: color-mix(
15
- in srgb,
16
- var(--oui-blue-0),
17
- var(--oui-blue-6) 30%
18
- );
19
- --oui-blue-4: color-mix(
20
- in srgb,
21
- var(--oui-blue-0),
22
- var(--oui-blue-6) 50%
23
- );
24
- --oui-blue-5: color-mix(
25
- in srgb,
26
- var(--oui-blue-0),
27
- var(--oui-blue-6) 75%
28
- );
29
- --oui-blue-6: #48d;
30
- --oui-blue-7: color-mix(
31
- in srgb,
32
- var(--oui-blue-10),
33
- var(--oui-blue-6) 75%
34
- );
35
- --oui-blue-8: color-mix(
36
- in srgb,
37
- var(--oui-blue-10),
38
- var(--oui-blue-6) 50%
39
- );
40
- --oui-blue-9: color-mix(
41
- in srgb,
42
- var(--oui-blue-10),
43
- var(--oui-blue-6) 25%
44
- );
45
- --oui-blue-10: #123;
46
- }
47
- @media (prefers-color-scheme: dark) {
48
- :root {
49
- --oui-blue-0: #012;
50
- --oui-blue-6: #15a;
51
- --oui-blue-10: #d1d5da;
52
- }
53
- }
54
- :root {
55
- --oui-green-0: #f4fbf5;
56
- --oui-green-1: color-mix(
57
- in srgb,
58
- var(--oui-green-0),
59
- var(--oui-green-6) 5%
60
- );
61
- --oui-green-2: color-mix(
62
- in srgb,
63
- var(--oui-green-0),
64
- var(--oui-green-6) 15%
65
- );
66
- --oui-green-3: color-mix(
67
- in srgb,
68
- var(--oui-green-0),
69
- var(--oui-green-6) 30%
70
- );
71
- --oui-green-4: color-mix(
72
- in srgb,
73
- var(--oui-green-0),
74
- var(--oui-green-6) 50%
75
- );
76
- --oui-green-5: color-mix(
77
- in srgb,
78
- var(--oui-green-0),
79
- var(--oui-green-6) 75%
80
- );
81
- --oui-green-6: #4b5;
82
- --oui-green-7: color-mix(
83
- in srgb,
84
- var(--oui-green-10),
85
- var(--oui-green-6) 75%
86
- );
87
- --oui-green-8: color-mix(
88
- in srgb,
89
- var(--oui-green-10),
90
- var(--oui-green-6) 50%
91
- );
92
- --oui-green-9: color-mix(
93
- in srgb,
94
- var(--oui-green-10),
95
- var(--oui-green-6) 25%
96
- );
97
- --oui-green-10: #231;
98
- }
99
- @media (prefers-color-scheme: dark) {
100
- :root {
101
- --oui-green-0: #0a1a0a;
102
- --oui-green-6: #182;
103
- --oui-green-10: #d1d8d2;
104
- }
105
- }
106
- :root {
107
- --oui-grey-0: #f8f8f8;
108
- --oui-grey-1: color-mix(
109
- in srgb,
110
- var(--oui-grey-0),
111
- var(--oui-grey-6) 5%
112
- );
113
- --oui-grey-2: color-mix(
114
- in srgb,
115
- var(--oui-grey-0),
116
- var(--oui-grey-6) 15%
117
- );
118
- --oui-grey-3: color-mix(
119
- in srgb,
120
- var(--oui-grey-0),
121
- var(--oui-grey-6) 30%
122
- );
123
- --oui-grey-4: color-mix(
124
- in srgb,
125
- var(--oui-grey-0),
126
- var(--oui-grey-6) 50%
127
- );
128
- --oui-grey-5: color-mix(
129
- in srgb,
130
- var(--oui-grey-0),
131
- var(--oui-grey-6) 75%
132
- );
133
- --oui-grey-6: #888;
134
- --oui-grey-7: color-mix(
135
- in srgb,
136
- var(--oui-grey-10),
137
- var(--oui-grey-6) 75%
138
- );
139
- --oui-grey-8: color-mix(
140
- in srgb,
141
- var(--oui-grey-10),
142
- var(--oui-grey-6) 50%
143
- );
144
- --oui-grey-9: color-mix(
145
- in srgb,
146
- var(--oui-grey-10),
147
- var(--oui-grey-6) 25%
148
- );
149
- --oui-grey-10: #222;
150
- }
151
- @media (prefers-color-scheme: dark) {
152
- :root {
153
- --oui-grey-0: #111;
154
- --oui-grey-6: #555;
155
- --oui-grey-10: #d8d8d8;
156
- }
157
- }
158
- :root {
159
- --oui-orange-0: #fef7f2;
160
- --oui-orange-1: color-mix(
161
- in srgb,
162
- var(--oui-orange-0),
163
- var(--oui-orange-6) 5%
164
- );
165
- --oui-orange-2: color-mix(
166
- in srgb,
167
- var(--oui-orange-0),
168
- var(--oui-orange-6) 15%
169
- );
170
- --oui-orange-3: color-mix(
171
- in srgb,
172
- var(--oui-orange-0),
173
- var(--oui-orange-6) 30%
174
- );
175
- --oui-orange-4: color-mix(
176
- in srgb,
177
- var(--oui-orange-0),
178
- var(--oui-orange-6) 50%
179
- );
180
- --oui-orange-5: color-mix(
181
- in srgb,
182
- var(--oui-orange-0),
183
- var(--oui-orange-6) 75%
184
- );
185
- --oui-orange-6: #e72;
186
- --oui-orange-7: color-mix(
187
- in srgb,
188
- var(--oui-orange-10),
189
- var(--oui-orange-6) 75%
190
- );
191
- --oui-orange-8: color-mix(
192
- in srgb,
193
- var(--oui-orange-10),
194
- var(--oui-orange-6) 50%
195
- );
196
- --oui-orange-9: color-mix(
197
- in srgb,
198
- var(--oui-orange-10),
199
- var(--oui-orange-6) 25%
200
- );
201
- --oui-orange-10: #420;
202
- }
203
- @media (prefers-color-scheme: dark) {
204
- :root {
205
- --oui-orange-0: #2a1500;
206
- --oui-orange-6: #b40;
207
- --oui-orange-10: #dbd4d0;
208
- }
209
- }
210
- :root {
211
- --oui-purple-0: #fcf7fb;
212
- --oui-purple-1: color-mix(
213
- in srgb,
214
- var(--oui-purple-0),
215
- var(--oui-purple-6) 5%
216
- );
217
- --oui-purple-2: color-mix(
218
- in srgb,
219
- var(--oui-purple-0),
220
- var(--oui-purple-6) 15%
221
- );
222
- --oui-purple-3: color-mix(
223
- in srgb,
224
- var(--oui-purple-0),
225
- var(--oui-purple-6) 30%
226
- );
227
- --oui-purple-4: color-mix(
228
- in srgb,
229
- var(--oui-purple-0),
230
- var(--oui-purple-6) 50%
231
- );
232
- --oui-purple-5: color-mix(
233
- in srgb,
234
- var(--oui-purple-0),
235
- var(--oui-purple-6) 75%
236
- );
237
- --oui-purple-6: #c7b;
238
- --oui-purple-7: color-mix(
239
- in srgb,
240
- var(--oui-purple-10),
241
- var(--oui-purple-6) 75%
242
- );
243
- --oui-purple-8: color-mix(
244
- in srgb,
245
- var(--oui-purple-10),
246
- var(--oui-purple-6) 50%
247
- );
248
- --oui-purple-9: color-mix(
249
- in srgb,
250
- var(--oui-purple-10),
251
- var(--oui-purple-6) 25%
252
- );
253
- --oui-purple-10: #313;
254
- }
255
- @media (prefers-color-scheme: dark) {
256
- :root {
257
- --oui-purple-0: #1a0a1a;
258
- --oui-purple-6: #94a;
259
- --oui-purple-10: #d9d4da;
260
- }
261
- }
262
- :root {
263
- --oui-slate-0: #f6f7f8;
264
- --oui-slate-1: color-mix(
265
- in srgb,
266
- var(--oui-slate-0),
267
- var(--oui-slate-6) 5%
268
- );
269
- --oui-slate-2: color-mix(
270
- in srgb,
271
- var(--oui-slate-0),
272
- var(--oui-slate-6) 15%
273
- );
274
- --oui-slate-3: color-mix(
275
- in srgb,
276
- var(--oui-slate-0),
277
- var(--oui-slate-6) 30%
278
- );
279
- --oui-slate-4: color-mix(
280
- in srgb,
281
- var(--oui-slate-0),
282
- var(--oui-slate-6) 50%
283
- );
284
- --oui-slate-5: color-mix(
285
- in srgb,
286
- var(--oui-slate-0),
287
- var(--oui-slate-6) 75%
288
- );
289
- --oui-slate-6: #708090;
290
- --oui-slate-7: color-mix(
291
- in srgb,
292
- var(--oui-slate-10),
293
- var(--oui-slate-6) 75%
294
- );
295
- --oui-slate-8: color-mix(
296
- in srgb,
297
- var(--oui-slate-10),
298
- var(--oui-slate-6) 50%
299
- );
300
- --oui-slate-9: color-mix(
301
- in srgb,
302
- var(--oui-slate-10),
303
- var(--oui-slate-6) 25%
304
- );
305
- --oui-slate-10: #242f2f;
306
- }
307
- @media (prefers-color-scheme: dark) {
308
- :root {
309
- --oui-slate-0: #011;
310
- --oui-slate-6: #405060;
311
- --oui-slate-10: #d6d7d8;
312
- }
313
- }
314
- :root {
315
- --oui-stone-0: #f8f8f6;
316
- --oui-stone-1: color-mix(
317
- in srgb,
318
- var(--oui-stone-0),
319
- var(--oui-stone-6) 5%
320
- );
321
- --oui-stone-2: color-mix(
322
- in srgb,
323
- var(--oui-stone-0),
324
- var(--oui-stone-6) 15%
325
- );
326
- --oui-stone-3: color-mix(
327
- in srgb,
328
- var(--oui-stone-0),
329
- var(--oui-stone-6) 30%
330
- );
331
- --oui-stone-4: color-mix(
332
- in srgb,
333
- var(--oui-stone-0),
334
- var(--oui-stone-6) 50%
335
- );
336
- --oui-stone-5: color-mix(
337
- in srgb,
338
- var(--oui-stone-0),
339
- var(--oui-stone-6) 75%
340
- );
341
- --oui-stone-6: #928e85;
342
- --oui-stone-7: color-mix(
343
- in srgb,
344
- var(--oui-stone-10),
345
- var(--oui-stone-6) 75%
346
- );
347
- --oui-stone-8: color-mix(
348
- in srgb,
349
- var(--oui-stone-10),
350
- var(--oui-stone-6) 50%
351
- );
352
- --oui-stone-9: color-mix(
353
- in srgb,
354
- var(--oui-stone-10),
355
- var(--oui-stone-6) 25%
356
- );
357
- --oui-stone-10: #2f2f24;
358
- }
359
- @media (prefers-color-scheme: dark) {
360
- :root {
361
- --oui-stone-0: #110;
362
- --oui-stone-6: #625e55;
363
- --oui-stone-10: #d8d8d6;
364
- }
365
- }
366
- :root {
367
- --oui-red-0: #fdf4f4;
368
- --oui-red-1: color-mix(
369
- in srgb,
370
- var(--oui-red-0),
371
- var(--oui-red-6) 5%
372
- );
373
- --oui-red-2: color-mix(
374
- in srgb,
375
- var(--oui-red-0),
376
- var(--oui-red-6) 15%
377
- );
378
- --oui-red-3: color-mix(
379
- in srgb,
380
- var(--oui-red-0),
381
- var(--oui-red-6) 30%
382
- );
383
- --oui-red-4: color-mix(
384
- in srgb,
385
- var(--oui-red-0),
386
- var(--oui-red-6) 50%
387
- );
388
- --oui-red-5: color-mix(
389
- in srgb,
390
- var(--oui-red-0),
391
- var(--oui-red-6) 75%
392
- );
393
- --oui-red-6: #d44;
394
- --oui-red-7: color-mix(
395
- in srgb,
396
- var(--oui-red-10),
397
- var(--oui-red-6) 75%
398
- );
399
- --oui-red-8: color-mix(
400
- in srgb,
401
- var(--oui-red-10),
402
- var(--oui-red-6) 50%
403
- );
404
- --oui-red-9: color-mix(
405
- in srgb,
406
- var(--oui-red-10),
407
- var(--oui-red-6) 25%
408
- );
409
- --oui-red-10: #422;
410
- }
411
- @media (prefers-color-scheme: dark) {
412
- :root {
413
- --oui-red-0: #200;
414
- --oui-red-6: #a11;
415
- --oui-red-10: #dad1d1;
416
- }
417
- }
418
- :root {
419
- --oui-yellow-0: #fefbf0;
420
- --oui-yellow-1: color-mix(
421
- in srgb,
422
- var(--oui-yellow-0),
423
- var(--oui-yellow-6) 5%
424
- );
425
- --oui-yellow-2: color-mix(
426
- in srgb,
427
- var(--oui-yellow-0),
428
- var(--oui-yellow-6) 15%
429
- );
430
- --oui-yellow-3: color-mix(
431
- in srgb,
432
- var(--oui-yellow-0),
433
- var(--oui-yellow-6) 30%
434
- );
435
- --oui-yellow-4: color-mix(
436
- in srgb,
437
- var(--oui-yellow-0),
438
- var(--oui-yellow-6) 50%
439
- );
440
- --oui-yellow-5: color-mix(
441
- in srgb,
442
- var(--oui-yellow-0),
443
- var(--oui-yellow-6) 75%
444
- );
445
- --oui-yellow-6: #eb0;
446
- --oui-yellow-7: color-mix(
447
- in srgb,
448
- var(--oui-yellow-10),
449
- var(--oui-yellow-6) 75%
450
- );
451
- --oui-yellow-8: color-mix(
452
- in srgb,
453
- var(--oui-yellow-10),
454
- var(--oui-yellow-6) 50%
455
- );
456
- --oui-yellow-9: color-mix(
457
- in srgb,
458
- var(--oui-yellow-10),
459
- var(--oui-yellow-6) 25%
460
- );
461
- --oui-yellow-10: #320;
462
- }
463
- @media (prefers-color-scheme: dark) {
464
- :root {
465
- --oui-yellow-0: #281f00;
466
- --oui-yellow-6: #b80;
467
- --oui-yellow-10: #dbd8d0;
468
- }
469
- }
470
-
471
2
  :where(.oui-fieldset) {
472
3
  padding: 1em;
473
4
  border: 1px solid var(--oui-grey-3);
@@ -0,0 +1,56 @@
1
+ :where(.oui-message) {
2
+ padding: 1em;
3
+ display: inline-flex;
4
+ flex-flow: column nowrap;
5
+ gap: 1em;
6
+ background-color: var(--background, var(--oui-grey-0, #eee));
7
+ border: 1px solid var(--border, var(--oui-grey-2, #ccc));
8
+ border-radius: 0.5em;
9
+ color: var(--foreground, var(--oui-grey-8, #333));
10
+ line-height: 1.25;
11
+ }
12
+ :where(.oui-message h2, .oui-message h3, .oui-message h4, .oui-message h5, .oui-message h6) {
13
+ font-size: 1em;
14
+ font-weight: bold;
15
+ }
16
+ :where(.oui-message hr) {
17
+ height: 1px;
18
+ margin: 0 -1em;
19
+ background-color: var(--border, var(--oui-grey-2));
20
+ border: none;
21
+ }
22
+ :where(.oui-message p) {
23
+ display: inline-flex;
24
+ flex-flow: row wrap;
25
+ gap: 1em;
26
+ }
27
+ :where(.oui-message-blue, .oui-message-info) {
28
+ --background: var(--oui-blue-0);
29
+ --border: var(--oui-blue-2);
30
+ --foreground: var(--oui-blue-8);
31
+ }
32
+ :where(.oui-message-green, .oui-message-success) {
33
+ --background: var(--oui-green-0);
34
+ --border: var(--oui-green-2);
35
+ --foreground: var(--oui-green-8);
36
+ }
37
+ :where(.oui-message-orange, .oui-message-warning) {
38
+ --background: var(--oui-orange-0);
39
+ --border: var(--oui-orange-2);
40
+ --foreground: var(--oui-orange-8);
41
+ }
42
+ :where(.oui-message-purple, .oui-message-special) {
43
+ --background: var(--oui-purple-0);
44
+ --border: var(--oui-purple-2);
45
+ --foreground: var(--oui-purple-8);
46
+ }
47
+ :where(.oui-message-red, .oui-message-error) {
48
+ --background: var(--oui-red-0);
49
+ --border: var(--oui-red-2);
50
+ --foreground: var(--oui-red-8);
51
+ }
52
+ :where(.oui-message-yellow, .oui-message-notice) {
53
+ --background: var(--oui-yellow-0);
54
+ --border: var(--oui-yellow-2);
55
+ --foreground: var(--oui-yellow-8);
56
+ }
@@ -0,0 +1,65 @@
1
+ :where(.oui-table) {
2
+ width: 100%;
3
+ }
4
+ :where(.oui-table-wrapper) {
5
+ max-height: 32em;
6
+ overflow: auto;
7
+ border: 1px solid var(--border, var(--oui-grey-3, #ccc));
8
+ border-radius: 0.25em;
9
+ position: relative;
10
+ overscroll-behavior-y: none;
11
+ }
12
+ :where(.oui-table caption) {
13
+ height: 2rem;
14
+ align-content: center;
15
+ background-color: var(--header, var(--oui-grey-1, #eee));
16
+ border: solid var(--border, var(--oui-grey-3, #ccc));
17
+ border-width: 0 0 1px 0;
18
+ font-size: 0.875rem;
19
+ text-align: left;
20
+ text-indent: 0.5rem;
21
+ position: sticky;
22
+ top: 0;
23
+ z-index: 2;
24
+ }
25
+ :where(.oui-table tbody tr:nth-child(2n)) {
26
+ background-color: var(--alternate, var(--oui-blue-0, #fafcff));
27
+ }
28
+ :where(.oui-table th, .oui-table tfoot td) {
29
+ background-color: var(--header, var(--oui-grey-1, #eee));
30
+ border: solid var(--border, var(--oui-grey-3, #ccc));
31
+ border-width: 0 1px 0 0;
32
+ position: sticky;
33
+ left: 0;
34
+ z-index: 1;
35
+ }
36
+ :where(.oui-table th, .oui-table tfoot td)::after {
37
+ content: "";
38
+ border-bottom: 1px solid var(--border, var(--oui-grey-3, #ccc));
39
+ position: absolute;
40
+ }
41
+ :where(.oui-table th, .oui-table td) {
42
+ padding: 0.5em;
43
+ }
44
+ :where(.oui-table th) {
45
+ top: 2em;
46
+ }
47
+ :where(.oui-table th)::after {
48
+ inset: auto 0 0 0;
49
+ }
50
+ :where(.oui-table tfoot td) {
51
+ bottom: 0;
52
+ }
53
+ :where(.oui-table tfoot td)::after {
54
+ inset: 0 0 auto 0;
55
+ }
56
+ :where(.oui-table tbody td) {
57
+ border: solid var(--border, var(--oui-grey-3, #ccc));
58
+ border-width: 0 1px 1px 0;
59
+ }
60
+ :where(.oui-table tbody tr:last-child td) {
61
+ border-bottom-width: 0;
62
+ }
63
+ :where(.oui-table tr th:last-child, .oui-table tr td:last-child) {
64
+ border-right-width: 0;
65
+ }
package/package.json CHANGED
@@ -36,5 +36,5 @@
36
36
  "watch": "npx sass ./src/css:./dist/css --no-source-map --watch"
37
37
  },
38
38
  "type": "module",
39
- "version": "0.4.1"
39
+ "version": "0.5.0"
40
40
  }
@@ -0,0 +1,68 @@
1
+ .oui {
2
+ :where(&-pill, &-tag) {
3
+ display: inline-flex;
4
+ flex-flow: row nowrap;
5
+ gap: .5em;
6
+ background-color: var(--background, var(--oui-grey-1, #eee));
7
+ border: 1px solid var(--border, var(--oui-grey-3, #ccc));
8
+ color: var(--foreground, var(--oui-grey-8, #333));
9
+ line-height: 1.125;
10
+ }
11
+
12
+ :where(&-pill) {
13
+ border-radius: 3em;
14
+ padding: .5em 1em;
15
+ }
16
+
17
+ :where(&-tag) {
18
+ border-radius: .25em;
19
+ padding: .5em .75em;
20
+ }
21
+
22
+ :where(&-pill-small, &-tag-small) {
23
+ font-size: .875em;
24
+ }
25
+
26
+ :where(&-pill-tiny, &-tag-tiny) {
27
+ font-size: .75em;
28
+ font-weight: bold;
29
+ letter-spacing: .1em;
30
+ text-transform: uppercase;
31
+ }
32
+
33
+ :where(&-pill-blue, &-tag-blue) {
34
+ --background: var(--oui-blue-1);
35
+ --border: var(--oui-blue-3);
36
+ --foreground: var(--oui-blue-9);
37
+ }
38
+
39
+ :where(&-pill-green, &-tag-green) {
40
+ --background: var(--oui-green-1);
41
+ --border: var(--oui-green-3);
42
+ --foreground: var(--oui-green-9);
43
+ }
44
+
45
+ :where(&-pill-orange, &-tag-orange) {
46
+ --background: var(--oui-orange-1);
47
+ --border: var(--oui-orange-3);
48
+ --foreground: var(--oui-orange-9);
49
+ }
50
+
51
+ :where(&-pill-purple, &-tag-purple) {
52
+ --background: var(--oui-purple-1);
53
+ --border: var(--oui-purple-3);
54
+ --foreground: var(--oui-purple-9);
55
+ }
56
+
57
+ :where(&-pill-red, &-tag-red) {
58
+ --background: var(--oui-red-1);
59
+ --border: var(--oui-red-3);
60
+ --foreground: var(--oui-red-9);
61
+ }
62
+
63
+ :where(&-pill-yellow, &-tag-yellow) {
64
+ --background: var(--oui-yellow-1);
65
+ --border: var(--oui-yellow-3);
66
+ --foreground: var(--oui-yellow-9);
67
+ }
68
+ }
package/src/css/form.scss CHANGED
@@ -1,4 +1,3 @@
1
- @use 'colours.scss' as colours;
2
1
  @use 'mixins.scss' as mixins;
3
2
 
4
3
  :where(.oui-fieldset) {
@@ -0,0 +1,67 @@
1
+ .oui-message {
2
+ :where(&) {
3
+ padding: 1em;
4
+ display: inline-flex;
5
+ flex-flow: column nowrap;
6
+ gap: 1em;
7
+ background-color: var(--background, var(--oui-grey-0, #eee));
8
+ border: 1px solid var(--border, var(--oui-grey-2, #ccc));
9
+ border-radius: .5em;
10
+ color: var(--foreground, var(--oui-grey-8, #333));
11
+ line-height: 1.25;
12
+ }
13
+
14
+ :where(& h2, & h3, & h4, & h5, & h6) {
15
+ font-size: 1em;
16
+ font-weight: bold;
17
+ }
18
+
19
+ :where(& hr) {
20
+ height: 1px;
21
+ margin: 0 -1em;
22
+ background-color: var(--border, var(--oui-grey-2));
23
+ border: none;
24
+ }
25
+
26
+ :where(& p) {
27
+ display: inline-flex;
28
+ flex-flow: row wrap;
29
+ gap: 1em;
30
+ }
31
+
32
+ :where(&-blue, &-info) {
33
+ --background: var(--oui-blue-0);
34
+ --border: var(--oui-blue-2);
35
+ --foreground: var(--oui-blue-8);
36
+ }
37
+
38
+ :where(&-green, &-success) {
39
+ --background: var(--oui-green-0);
40
+ --border: var(--oui-green-2);
41
+ --foreground: var(--oui-green-8);
42
+ }
43
+
44
+ :where(&-orange, &-warning) {
45
+ --background: var(--oui-orange-0);
46
+ --border: var(--oui-orange-2);
47
+ --foreground: var(--oui-orange-8);
48
+ }
49
+
50
+ :where(&-purple, &-special) {
51
+ --background: var(--oui-purple-0);
52
+ --border: var(--oui-purple-2);
53
+ --foreground: var(--oui-purple-8);
54
+ }
55
+
56
+ :where(&-red, &-error) {
57
+ --background: var(--oui-red-0);
58
+ --border: var(--oui-red-2);
59
+ --foreground: var(--oui-red-8);
60
+ }
61
+
62
+ :where(&-yellow, &-notice) {
63
+ --background: var(--oui-yellow-0);
64
+ --border: var(--oui-yellow-2);
65
+ --foreground: var(--oui-yellow-8);
66
+ }
67
+ }
@@ -0,0 +1,80 @@
1
+ .oui-table {
2
+ :where(&) {
3
+ width: 100%;
4
+ }
5
+
6
+ :where(&-wrapper) {
7
+ max-height: 32em;
8
+ overflow: auto;
9
+ border: 1px solid var(--border, var(--oui-grey-3, #ccc));
10
+ border-radius: .25em;
11
+ position: relative;
12
+ overscroll-behavior-y: none;
13
+ }
14
+
15
+ :where(& caption) {
16
+ height: 2rem;
17
+ align-content: center;
18
+ background-color: var(--header, var(--oui-grey-1, #eee));
19
+ border: solid var(--border, var(--oui-grey-3, #ccc));
20
+ border-width: 0 0 1px 0;
21
+ font-size: .875rem;
22
+ text-align: left;
23
+ text-indent: .5rem;
24
+ position: sticky;
25
+ top: 0;
26
+ z-index: 2;
27
+ }
28
+
29
+ :where(& tbody tr:nth-child(2n)) {
30
+ background-color: var(--alternate, var(--oui-blue-0, #fafcff));
31
+ }
32
+
33
+ :where(& th, & tfoot td) {
34
+ background-color: var(--header, var(--oui-grey-1, #eee));
35
+ border: solid var(--border, var(--oui-grey-3, #ccc));
36
+ border-width: 0 1px 0 0;
37
+ position: sticky;
38
+ left: 0;
39
+ z-index: 1;
40
+
41
+ &::after {
42
+ content: '';
43
+ border-bottom: 1px solid var(--border, var(--oui-grey-3, #ccc));
44
+ position: absolute;
45
+ }
46
+ }
47
+
48
+ :where(& th, & td) {
49
+ padding: .5em;
50
+ }
51
+
52
+ :where(& th) {
53
+ top: 2em;
54
+
55
+ &::after {
56
+ inset: auto 0 0 0;
57
+ }
58
+ }
59
+
60
+ :where(& tfoot td) {
61
+ bottom: 0;
62
+
63
+ &::after {
64
+ inset: 0 0 auto 0;
65
+ }
66
+ }
67
+
68
+ :where(& tbody td) {
69
+ border: solid var(--border, var(--oui-grey-3, #ccc));
70
+ border-width: 0 1px 1px 0;
71
+ }
72
+
73
+ :where(& tbody tr:last-child td) {
74
+ border-bottom-width: 0;
75
+ }
76
+
77
+ :where(& tr th:last-child, & tr td:last-child) {
78
+ border-right-width: 0;
79
+ }
80
+ }