@oscarpalmer/oui 0.35.0 → 0.37.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 +18 -15
- package/dist/css/button.css +35 -31
- package/dist/css/color.css +20 -20
- package/dist/css/combobox.css +134 -35
- package/dist/css/content.css +29 -10
- package/dist/css/floatable.css +10 -10
- package/dist/css/form.css +393 -129
- package/dist/css/listbox.css +176 -0
- package/dist/css/message.css +13 -10
- package/dist/css/reset.css +29 -88
- package/dist/css/splitter.css +2 -2
- package/dist/css/tabs.css +103 -0
- package/dist/js/combobox/constants.combobox.d.mts +2 -2
- package/dist/js/combobox/constants.combobox.mjs +40 -33
- package/dist/js/combobox/dom.combobox.d.mts +8 -91
- package/dist/js/combobox/dom.combobox.mjs +204 -2
- package/dist/js/combobox/event.combobox.d.mts +14 -8
- package/dist/js/combobox/event.combobox.mjs +2 -2
- package/dist/js/combobox/index.d.mts +1 -1
- package/dist/js/combobox/index.mjs +20 -18
- package/dist/js/combobox/misc.combobox.d.mts +2 -2
- package/dist/js/combobox/misc.combobox.mjs +2 -2
- package/dist/js/combobox/models.combobox.d.mts +44 -2
- package/dist/js/combobox/state.combobox.d.mts +9 -10
- package/dist/js/combobox/state.combobox.mjs +2 -2
- package/dist/js/constants.combobox-DmRAMC64.d.mts +26 -0
- package/dist/js/constants.listbox-DRsXUxd3.d.mts +14 -0
- package/dist/js/focus-trap/focus-trap.embedded.mjs +6 -10
- package/dist/js/index-EfkUSals.d.mts +139 -0
- package/dist/js/index.d.mts +5 -2
- package/dist/js/index.mjs +5 -2
- package/dist/js/internal/attributable.mjs +4 -3
- package/dist/js/internal/draggable.mjs +16 -22
- package/dist/js/internal/listbox/listbox.constants.d.mts +11 -0
- package/dist/js/internal/listbox/listbox.constants.mjs +23 -0
- package/dist/js/internal/listbox/listbox.data.d.mts +20 -0
- package/dist/js/internal/listbox/listbox.data.mjs +2 -0
- package/dist/js/internal/listbox/listbox.dom.d.mts +66 -0
- package/dist/js/internal/listbox/listbox.dom.mjs +2 -0
- package/dist/js/internal/listbox/listbox.event.d.mts +5 -0
- package/dist/js/internal/listbox/listbox.event.mjs +63 -0
- package/dist/js/internal/listbox/listbox.form.d.mts +6 -0
- package/dist/js/internal/listbox/listbox.form.mjs +52 -0
- package/dist/js/internal/listbox/listbox.misc.d.mts +12 -0
- package/dist/js/internal/listbox/listbox.misc.mjs +2 -0
- package/dist/js/internal/listbox/listbox.model.d.mts +2 -0
- package/dist/js/internal/listbox/listbox.model.mjs +1 -0
- package/dist/js/internal/listbox/listbox.state.d.mts +7 -0
- package/dist/js/internal/listbox/listbox.state.mjs +40 -0
- package/dist/js/internal/misc.d.mts +6 -0
- package/dist/js/internal/misc.mjs +13 -0
- package/dist/js/internal/navigable.d.mts +11 -5
- package/dist/js/internal/navigable.mjs +44 -18
- package/dist/js/l10n-Bn-7RcwR.d.mts +20 -0
- package/dist/js/l10n.d.mts +2 -20
- package/dist/js/listbox/constants.listbox.d.mts +2 -0
- package/dist/js/listbox/constants.listbox.mjs +40 -0
- package/dist/js/listbox/event.listbox.d.mts +8 -0
- package/dist/js/listbox/event.listbox.mjs +2 -0
- package/dist/js/listbox/index.d.mts +116 -0
- package/dist/js/listbox/index.mjs +189 -0
- package/dist/js/listbox/misc.listbox.d.mts +2 -0
- package/dist/js/listbox/misc.listbox.mjs +2 -0
- package/dist/js/listbox/state.listbox.d.mts +11 -0
- package/dist/js/listbox/state.listbox.mjs +2 -0
- package/dist/js/listbox.data-BWd0PCy7.mjs +424 -0
- package/dist/js/listbox.model-CRReGOmu.d.mts +125 -0
- package/dist/js/misc.listbox-BI-XsTOf.mjs +197 -0
- package/dist/js/misc.listbox-gnoJhrTr.d.mts +20 -0
- package/dist/js/movable/movable.embedded.mjs +3 -6
- package/dist/js/resizable/resizable.embedded.mjs +16 -26
- package/dist/js/sortable/sortable.embedded.mjs +4 -2
- package/dist/js/splitter.mjs +15 -12
- package/dist/js/state.combobox-4xq0FPCF.mjs +365 -0
- package/dist/js/tabs.d.mts +25 -0
- package/dist/js/tabs.mjs +240 -0
- package/dist/js/tooltip.mjs +13 -12
- package/package.json +7 -3
- package/src/css/badge.scss +6 -18
- package/src/css/button.scss +6 -45
- package/src/css/color.scss +20 -20
- package/src/css/combobox.scss +21 -52
- package/src/css/content.scss +30 -3
- package/src/css/floatable.scss +17 -17
- package/src/css/form.scss +84 -72
- package/src/css/listbox.scss +120 -0
- package/src/css/message.scss +13 -28
- package/src/css/mixins.scss +253 -28
- package/src/css/reset.scss +37 -86
- package/src/css/splitter.scss +2 -2
- package/src/css/tabs.scss +85 -0
- package/src/js/combobox/constants.combobox.ts +46 -25
- package/src/js/combobox/dom.combobox.ts +36 -454
- package/src/js/combobox/event.combobox.ts +129 -218
- package/src/js/combobox/index.ts +37 -30
- package/src/js/combobox/misc.combobox.ts +30 -114
- package/src/js/combobox/models.combobox.ts +7 -47
- package/src/js/combobox/state.combobox.ts +126 -127
- package/src/js/focus-trap/focus-trap.embedded.ts +11 -19
- package/src/js/index.ts +2 -0
- package/src/js/internal/draggable.ts +29 -33
- package/src/js/internal/listbox/listbox.constants.ts +25 -0
- package/src/js/{combobox/data.combobox.ts → internal/listbox/listbox.data.ts} +94 -43
- package/src/js/internal/listbox/listbox.dom.ts +445 -0
- package/src/js/internal/listbox/listbox.event.ts +129 -0
- package/src/js/{combobox/form.combobox.ts → internal/listbox/listbox.form.ts} +13 -14
- package/src/js/internal/listbox/listbox.misc.ts +135 -0
- package/src/js/internal/listbox/listbox.model.ts +169 -0
- package/src/js/internal/listbox/listbox.state.ts +82 -0
- package/src/js/internal/misc.ts +27 -0
- package/src/js/internal/navigable.ts +80 -23
- package/src/js/l10n.ts +8 -8
- package/src/js/listbox/constants.listbox.ts +61 -0
- package/src/js/listbox/event.listbox.ts +106 -0
- package/src/js/listbox/index.ts +302 -0
- package/src/js/listbox/misc.listbox.ts +70 -0
- package/src/js/listbox/state.listbox.ts +196 -0
- package/src/js/movable/movable.embedded.ts +11 -13
- package/src/js/resizable/resizable.embedded.ts +25 -39
- package/src/js/splitter.ts +21 -18
- package/src/js/tabs.ts +447 -0
- package/src/js/tooltip.ts +20 -17
- package/dist/js/combobox/data.combobox.d.mts +0 -18
- package/dist/js/combobox/data.combobox.mjs +0 -2
- package/dist/js/combobox/form.combobox.d.mts +0 -6
- package/dist/js/combobox/form.combobox.mjs +0 -2
- package/dist/js/constants.combobox-h_kyDegw.d.mts +0 -248
- package/dist/js/data.combobox-B8HMkDOh.mjs +0 -1030
package/src/css/reset.scss
CHANGED
|
@@ -6,31 +6,29 @@
|
|
|
6
6
|
* A reset I use for a lot of personal stuff, and elsewhere, of course.
|
|
7
7
|
* It's a mix of a few different resets mixed together with some of my own ideas.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* with a two-letter code, all of which are listed below. My own code is "OP", which are my initials.
|
|
11
|
-
*
|
|
12
|
-
* - Andy Bell's "A (more) Modern CSS Reset" [AB]
|
|
9
|
+
* - Andy Bell's "A (more) Modern CSS Reset"
|
|
13
10
|
* https://andy-bell.co.uk/a-more-modern-css-reset/
|
|
14
11
|
*
|
|
15
|
-
* - Chris Coyier's "The Coyier CSS Starter"
|
|
12
|
+
* - Chris Coyier's "The Coyier CSS Starter"
|
|
16
13
|
* https://frontendmasters.com/blog/the-coyier-css-starter/
|
|
17
14
|
*
|
|
18
|
-
* - CSS Remedy
|
|
15
|
+
* - CSS Remedy
|
|
19
16
|
* https://github.com/jensimmons/cssremedy
|
|
20
17
|
*
|
|
21
|
-
* - Harry Roberts
|
|
18
|
+
* - Harry Roberts
|
|
22
19
|
* - https://github.com/csswizardry
|
|
23
20
|
*
|
|
24
|
-
* -
|
|
21
|
+
* - Interface Cheat sheet
|
|
22
|
+
* - https://interfaces.dev/cheat-sheet
|
|
23
|
+
*
|
|
24
|
+
* - RESS
|
|
25
25
|
* https://github.com/filipelinhares/ress
|
|
26
26
|
*
|
|
27
|
-
* - Sanitize.css
|
|
27
|
+
* - Sanitize.css
|
|
28
28
|
* https://github.com/csstools/sanitize.css
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
* Catch-alls
|
|
33
|
-
*/
|
|
31
|
+
// #region Globals
|
|
34
32
|
|
|
35
33
|
:where(*) {
|
|
36
34
|
padding: 0;
|
|
@@ -43,18 +41,19 @@
|
|
|
43
41
|
box-sizing: border-box;
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
// #endregion
|
|
45
|
+
|
|
46
|
+
// #region Document
|
|
49
47
|
|
|
50
48
|
:where(:root) {
|
|
51
49
|
font-family: system-ui, sans-serif;
|
|
52
50
|
font-size: 100%;
|
|
53
51
|
line-height: 1.5;
|
|
54
|
-
/** Prevent text size inflation (e.g., after orientation change) [AB][RE][SE] */
|
|
55
52
|
text-size-adjust: none;
|
|
56
53
|
tab-size: 4;
|
|
57
54
|
overflow-wrap: break-word;
|
|
55
|
+
-webkit-font-smoothing: antialiased;
|
|
56
|
+
-moz-osx-font-smoothing: grayscale;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
:where(body) {
|
|
@@ -62,13 +61,14 @@
|
|
|
62
61
|
font-size: 1rem;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
// #endregion
|
|
65
|
+
|
|
66
|
+
// #region General
|
|
68
67
|
|
|
69
68
|
:where(a) {
|
|
70
69
|
text-decoration-skip-ink: auto;
|
|
71
70
|
text-underline-offset: 0.125em;
|
|
71
|
+
text-underline-position: from-font;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
:where(abbr[title], dfn[title]) {
|
|
@@ -76,19 +76,15 @@
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
:where(abbr[title]) {
|
|
79
|
-
/** Add the correct text decoration in Safari [RS][SE] */
|
|
80
79
|
text-decoration: underline;
|
|
81
|
-
/** Ditto */
|
|
82
80
|
text-decoration: underline dotted;
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
:where(b, strong) {
|
|
86
|
-
/** Add the correct font weight in Chrome, Edge, and Safari [RS][SE], without compounding [HR] */
|
|
87
84
|
font-weight: bold;
|
|
88
85
|
}
|
|
89
86
|
|
|
90
87
|
:where(button, h1, h2, h3, h4, h5, h6, input, label, legend) {
|
|
91
|
-
/** Set shorter line heights on headings and interactive elements [AB] */
|
|
92
88
|
line-height: 1.125;
|
|
93
89
|
}
|
|
94
90
|
|
|
@@ -103,21 +99,16 @@
|
|
|
103
99
|
input[type='submit' i],
|
|
104
100
|
summary
|
|
105
101
|
) {
|
|
106
|
-
/** Correct the inability to style clickable types in iOS [HR][RS][SE] */
|
|
107
102
|
appearance: auto;
|
|
108
|
-
/** Ditto */
|
|
109
103
|
cursor: pointer;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
:where(code, kbd, output, pre, samp) {
|
|
113
|
-
/** Specify the font family of code elements [HR][RS][SE] */
|
|
114
107
|
font-family: monospace, monospace;
|
|
115
|
-
/** Correct the odd 'em' font sizing in all browsers [HR][RS][SE] */
|
|
116
108
|
font-size: inherit;
|
|
117
109
|
}
|
|
118
110
|
|
|
119
111
|
:where(details > summary:first-of-type) {
|
|
120
|
-
/** Add the correct display in Safari [SE] */
|
|
121
112
|
display: list-item;
|
|
122
113
|
}
|
|
123
114
|
|
|
@@ -140,7 +131,6 @@
|
|
|
140
131
|
}
|
|
141
132
|
|
|
142
133
|
:where(dl, ol, ul) :where(dl, ol, ul) {
|
|
143
|
-
/** Remove the margin on nested lists in Chrome, Edge, and Safari [SE] */
|
|
144
134
|
margin: 0;
|
|
145
135
|
}
|
|
146
136
|
|
|
@@ -149,23 +139,18 @@
|
|
|
149
139
|
}
|
|
150
140
|
|
|
151
141
|
:where(h1) {
|
|
152
|
-
/** Consistent sizing across browsers [HR] */
|
|
153
142
|
font-size: 2em;
|
|
154
143
|
}
|
|
155
144
|
|
|
156
145
|
:where(hr) {
|
|
157
|
-
/** Add the correct box sizing in Firefox [CR][RS][SE] */
|
|
158
146
|
height: 0;
|
|
159
|
-
/** Show the overflow in Edge and IE [CR][RS] */
|
|
160
147
|
overflow: visible;
|
|
161
148
|
border-style: solid;
|
|
162
149
|
border-width: 1px 0 0;
|
|
163
|
-
/** // Correct the inheritance of border colour in Firefox [CR][RS][SE] */
|
|
164
150
|
color: inherit;
|
|
165
151
|
}
|
|
166
152
|
|
|
167
153
|
:where(ins, u) {
|
|
168
|
-
/** Prevent link styling [HR] */
|
|
169
154
|
text-decoration: none;
|
|
170
155
|
}
|
|
171
156
|
|
|
@@ -176,15 +161,12 @@
|
|
|
176
161
|
}
|
|
177
162
|
|
|
178
163
|
:where(nav li)::before {
|
|
179
|
-
/** Prevent VoiceOver from ignoring list semantics in Safari [SE] */
|
|
180
164
|
content: '\200B';
|
|
181
165
|
float: left;
|
|
182
166
|
}
|
|
183
167
|
|
|
184
168
|
:where(pre) {
|
|
185
|
-
/** Prevent overflow of the container in all browsers [SE] */
|
|
186
169
|
overflow: auto;
|
|
187
|
-
/** Overflow by default is bad… [CR] */
|
|
188
170
|
white-space: pre-wrap;
|
|
189
171
|
}
|
|
190
172
|
|
|
@@ -208,29 +190,22 @@
|
|
|
208
190
|
|
|
209
191
|
:where(table) {
|
|
210
192
|
border-collapse: collapse;
|
|
211
|
-
/** Correct table border colour in Chrome, Edge, and Safari [SE] */
|
|
212
193
|
border-color: currentcolor;
|
|
213
|
-
/** Modernized border spacing [HR] */
|
|
214
194
|
border-spacing: 0;
|
|
215
|
-
/** More legible numbers [HR] */
|
|
216
195
|
font-variant-numeric: tabular-nums;
|
|
217
|
-
/** Remove text indentation from table contents in Chrome, Edge, and Safari [RS][SE] */
|
|
218
196
|
text-indent: 0;
|
|
219
197
|
}
|
|
220
198
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
199
|
+
// #endregion
|
|
200
|
+
|
|
201
|
+
// #region Forms
|
|
224
202
|
|
|
225
203
|
:where(button, input, optgroup, select, textarea) {
|
|
226
|
-
/** Correct the font inheritance in Firefox, Edge, and Safari [HR][RS][SE] */
|
|
227
204
|
font: inherit;
|
|
228
205
|
}
|
|
229
206
|
|
|
230
207
|
:where(button, input, select, textarea) {
|
|
231
|
-
/** Change the inconsistent appearance in all browsers [SE] */
|
|
232
208
|
padding: 0.25em 0.5em;
|
|
233
|
-
/** Ditto for all */
|
|
234
209
|
background-color: transparent;
|
|
235
210
|
border: 1px solid WindowFrame;
|
|
236
211
|
color: inherit;
|
|
@@ -238,24 +213,19 @@
|
|
|
238
213
|
}
|
|
239
214
|
|
|
240
215
|
:where(fieldset) {
|
|
241
|
-
/** Change the inconsistent appearance in all browsers [SE] */
|
|
242
216
|
border: 1px solid darkgrey;
|
|
243
217
|
}
|
|
244
218
|
|
|
245
219
|
:where(optgroup) {
|
|
246
|
-
/** Restore the font weight unset by previous rules [RS] */
|
|
247
220
|
font-weight: bold;
|
|
248
221
|
}
|
|
249
222
|
|
|
250
223
|
:where(progress) {
|
|
251
|
-
/** Add the correct vertical alignment in Chrome, Edge, and Firefox [RS][SE] */
|
|
252
224
|
vertical-align: baseline;
|
|
253
225
|
}
|
|
254
226
|
|
|
255
227
|
:where(select, input[list]) {
|
|
256
|
-
/** Change the inconsistent appearance in all browsers [SE] */
|
|
257
228
|
appearance: none;
|
|
258
|
-
/** Ditto for all */
|
|
259
229
|
padding-right: 1em;
|
|
260
230
|
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");
|
|
261
231
|
background-position: right center / 1em;
|
|
@@ -264,31 +234,24 @@
|
|
|
264
234
|
}
|
|
265
235
|
|
|
266
236
|
:where(select[multiple]) {
|
|
267
|
-
/** Don't show the arrow for multiple choice selects [SE] */
|
|
268
237
|
background-image: none;
|
|
269
238
|
}
|
|
270
239
|
|
|
271
240
|
:where(textarea) {
|
|
272
|
-
/** Change the resize direction in all browsers [RS][SE] */
|
|
273
241
|
resize: vertical;
|
|
274
242
|
}
|
|
275
243
|
|
|
276
244
|
:where([type='color' i], [type='range' i]) {
|
|
277
|
-
/** Remove the padding in all browsers [SE] */
|
|
278
245
|
padding: 0;
|
|
279
|
-
/** Remove the border in all browsers [SE] */
|
|
280
246
|
border-width: 0;
|
|
281
247
|
}
|
|
282
248
|
|
|
283
249
|
:where([type='search' i]) {
|
|
284
|
-
/** Correct the odd appearance in Chrome, Edge, and Safari [RS][SE] */
|
|
285
250
|
appearance: textfield;
|
|
286
|
-
/** Correct the outline style in Safari [RS][SE] */
|
|
287
251
|
outline-offset: -2px;
|
|
288
252
|
}
|
|
289
253
|
|
|
290
254
|
::file-selector-button {
|
|
291
|
-
/** Correct the inability to style upload buttons in iOS and Safari [RS][SE] */
|
|
292
255
|
appearance: auto;
|
|
293
256
|
color: inherit;
|
|
294
257
|
font: inherit;
|
|
@@ -296,26 +259,22 @@
|
|
|
296
259
|
}
|
|
297
260
|
|
|
298
261
|
::placeholder {
|
|
299
|
-
/** Better default text opacity [OP] */
|
|
300
262
|
opacity: 0.67;
|
|
301
|
-
/** Better default text color [HR][SE] */
|
|
302
263
|
color: inherit;
|
|
303
264
|
}
|
|
304
265
|
|
|
305
266
|
::-webkit-inner-spin-button,
|
|
306
267
|
::-webkit-outer-spin-button {
|
|
307
|
-
/** Correct the cursor style of increment and decrement buttons in Safari [RS][SE] */
|
|
308
268
|
height: auto;
|
|
309
269
|
}
|
|
310
270
|
|
|
311
271
|
::-webkit-search-decoration {
|
|
312
|
-
/** Remove the inner padding in Chrome, Edge, and Safari on macOS [SE] */
|
|
313
272
|
appearance: none;
|
|
314
273
|
}
|
|
315
274
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
275
|
+
// #endregion
|
|
276
|
+
|
|
277
|
+
// #region Media
|
|
319
278
|
|
|
320
279
|
:where(audio, canvas, embed, iframe, img, object, picture, svg, video) {
|
|
321
280
|
max-inline-size: 100%;
|
|
@@ -327,7 +286,6 @@
|
|
|
327
286
|
}
|
|
328
287
|
|
|
329
288
|
:where(audio) {
|
|
330
|
-
/** Better default width [CR] */
|
|
331
289
|
width: 100%;
|
|
332
290
|
}
|
|
333
291
|
|
|
@@ -336,7 +294,6 @@
|
|
|
336
294
|
}
|
|
337
295
|
|
|
338
296
|
:where(canvas, img, svg, video) {
|
|
339
|
-
/** Proportional height based on width [HR] */
|
|
340
297
|
block-size: auto;
|
|
341
298
|
}
|
|
342
299
|
|
|
@@ -345,21 +302,17 @@
|
|
|
345
302
|
}
|
|
346
303
|
|
|
347
304
|
:where(img) {
|
|
348
|
-
/** CSS magic! [HR] */
|
|
349
305
|
background-repeat: no-repeat;
|
|
350
|
-
/** Ditto */
|
|
351
306
|
background-size: cover;
|
|
352
|
-
|
|
307
|
+
outline: 1px solid light-dark(rgb(255 255 255 / 8%), rgb(0 0 0 / 8%));
|
|
353
308
|
font-style: italic;
|
|
354
309
|
}
|
|
355
310
|
|
|
356
311
|
:where(picture) {
|
|
357
|
-
/** Remove the unnecessary wrapping 'picture', while maintaining contents [CR] */
|
|
358
312
|
display: contents;
|
|
359
313
|
}
|
|
360
314
|
|
|
361
315
|
:where(source) {
|
|
362
|
-
/** Source elements have nothing to display, so we hide them entirely [CR] */
|
|
363
316
|
display: none;
|
|
364
317
|
}
|
|
365
318
|
|
|
@@ -367,9 +320,9 @@
|
|
|
367
320
|
fill: currentcolor;
|
|
368
321
|
}
|
|
369
322
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
323
|
+
// #endregion
|
|
324
|
+
|
|
325
|
+
// #region Attributes
|
|
373
326
|
|
|
374
327
|
:where([aria-busy='true' i]) {
|
|
375
328
|
cursor: progress;
|
|
@@ -399,37 +352,33 @@
|
|
|
399
352
|
display: inherit !important;
|
|
400
353
|
}
|
|
401
354
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
355
|
+
// #endregion
|
|
356
|
+
|
|
357
|
+
// #region Pseudo-classes
|
|
405
358
|
|
|
406
359
|
:where(:target) {
|
|
407
360
|
scroll-margin: 2rlh;
|
|
408
361
|
}
|
|
409
362
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
363
|
+
// #endregion
|
|
364
|
+
|
|
365
|
+
// #region Media queries
|
|
413
366
|
|
|
414
367
|
@media (prefers-reduced-motion: no-preference) {
|
|
415
368
|
:where(:root) {
|
|
416
|
-
/** Allow for animations on auto-sizes [CC] */
|
|
417
369
|
interpolate-size: allow-keywords;
|
|
418
370
|
}
|
|
419
371
|
|
|
420
372
|
:where(:root:focus-within) {
|
|
421
|
-
/** Allow for smooth scrolling to focused elements */
|
|
422
373
|
scroll-behavior: smooth;
|
|
423
374
|
}
|
|
424
375
|
}
|
|
425
376
|
|
|
426
377
|
@media (prefers-reduced-motion: reduce) {
|
|
427
378
|
:where(:root:focus-within) {
|
|
428
|
-
/** Disable smooth scrolling, when requested */
|
|
429
379
|
scroll-behavior: auto;
|
|
430
380
|
}
|
|
431
381
|
|
|
432
|
-
/** Disable animations and transitions, when requested */
|
|
433
382
|
:where(*),
|
|
434
383
|
::after,
|
|
435
384
|
::before {
|
|
@@ -439,3 +388,5 @@
|
|
|
439
388
|
scroll-behavior: auto !important;
|
|
440
389
|
}
|
|
441
390
|
}
|
|
391
|
+
|
|
392
|
+
// #endregion
|
package/src/css/splitter.scss
CHANGED
|
@@ -24,7 +24,7 @@ oui-splitter {
|
|
|
24
24
|
transition: background 0.125s ease-in-out;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
:where([oui-splitter-separator]:has([oui-splitter-handle]:focus)),
|
|
27
|
+
:where([oui-splitter-separator]:has([oui-splitter-handle]:focus-visible)),
|
|
28
28
|
:where([oui-splitter-separator]:has([oui-splitter-handle]:hover)),
|
|
29
29
|
:where([oui-splitter-separator][oui-splitter-active]) {
|
|
30
30
|
background-color: color-mix(in oklab, var(--oui-blue-6), transparent 82.5%);
|
|
@@ -58,7 +58,7 @@ oui-splitter {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
:where([oui-splitter-handle]:focus),
|
|
61
|
+
:where([oui-splitter-handle]:focus-visible),
|
|
62
62
|
:where([oui-splitter-handle]:hover),
|
|
63
63
|
:where([oui-splitter-handle][oui-splitter-active]) {
|
|
64
64
|
&::after {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@use './mixins.scss' as mixins;
|
|
2
|
+
|
|
3
|
+
oui-tabs {
|
|
4
|
+
:where(&) {
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where(&[orientation='horizontal' i]) {
|
|
9
|
+
flex-flow: column nowrap;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where(&[orientation='vertical' i]) {
|
|
13
|
+
flex-flow: row nowrap;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[oui-tabs-content] {
|
|
18
|
+
:where(&) {
|
|
19
|
+
padding: 1em;
|
|
20
|
+
flex: 1;
|
|
21
|
+
background-color: var(--oui-absolute);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(oui-tabs[orientation='horizontal' i] > &) {
|
|
25
|
+
border-radius: 0 0 0.5em 0.5em;
|
|
26
|
+
box-shadow:
|
|
27
|
+
0 0 0 1px rgb(0 0 0 / 12.5%),
|
|
28
|
+
inset 0 1px 2px -0.5px rgb(0 0 0 / 5%),
|
|
29
|
+
inset 0 2px 4px -1px rgb(0 0 0 / 5%);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(oui-tabs[orientation='vertical' i] > &) {
|
|
33
|
+
border-radius: 0 0.5em 0.5em 0;
|
|
34
|
+
box-shadow:
|
|
35
|
+
0 0 0 1px rgb(0 0 0 / 12.5%),
|
|
36
|
+
inset 1px 1px 2px -0.5px rgb(0 0 0 / 5%),
|
|
37
|
+
inset 2px 2px 4px -1px rgb(0 0 0 / 5%);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[oui-tabs-tab] {
|
|
42
|
+
:where(&) {
|
|
43
|
+
@include mixins.button;
|
|
44
|
+
@include mixins.button-blue;
|
|
45
|
+
|
|
46
|
+
font-size: 0.875rem;
|
|
47
|
+
align-self: flex-end;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(&[aria-selected='true' i]) {
|
|
51
|
+
--oui-background-percentage: 80%;
|
|
52
|
+
|
|
53
|
+
box-shadow:
|
|
54
|
+
0 0 0 1px var(--oui-shadow-value),
|
|
55
|
+
inset 0 1px 2px -0.5px var(--oui-shadow-value),
|
|
56
|
+
inset 0 2px 4px -1px var(--oui-shadow-value);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[oui-tabs-tablist] {
|
|
61
|
+
:where(&) {
|
|
62
|
+
display: flex;
|
|
63
|
+
gap: 0.5em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&[aria-orientation='horizontal' i] {
|
|
67
|
+
:where(&) {
|
|
68
|
+
flex-flow: row nowrap;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(& > [oui-tabs-tab]) {
|
|
72
|
+
border-radius: 0.25em 0.25em 0 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&[aria-orientation='vertical' i] {
|
|
77
|
+
:where(&) {
|
|
78
|
+
flex-flow: column nowrap;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where(& > [oui-tabs-tab]) {
|
|
82
|
+
border-radius: 0.25em 0 0 0.25em;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
OuiListboxAttributes,
|
|
3
|
+
OuiListboxAutoCompleteType,
|
|
4
|
+
} from '../internal/listbox/listbox.model';
|
|
2
5
|
|
|
3
6
|
// #region Variables
|
|
4
7
|
|
|
@@ -6,57 +9,75 @@ export const COMBOBOX_TAGNAME = 'oui-combobox';
|
|
|
6
9
|
|
|
7
10
|
export const COMBOBOX_ATTRIBUTE_ANCHOR = `${COMBOBOX_TAGNAME}-anchor`;
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
const attributeContent = `${COMBOBOX_TAGNAME}-content`;
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
const attributeFilter = `${COMBOBOX_TAGNAME}-filter`;
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
const attributeFilterInput = `${attributeFilter}-input`;
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
const attributeGroup = `${COMBOBOX_TAGNAME}-group`;
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
const attributeHeader = `${COMBOBOX_TAGNAME}-header`;
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
const attributeHidden = `${COMBOBOX_TAGNAME}-hidden`;
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
const attributeList = `${COMBOBOX_TAGNAME}-list`;
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
const attributeListEmpty = `${attributeList}-empty`;
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
const attributeMessage = `${COMBOBOX_TAGNAME}-message`;
|
|
29
|
+
|
|
30
|
+
const attributeOption = `${COMBOBOX_TAGNAME}-option`;
|
|
31
|
+
|
|
32
|
+
const attributeOptionActive = `${COMBOBOX_TAGNAME}-option-active`;
|
|
26
33
|
|
|
27
34
|
export const COMBOBOX_ATTRIBUTE_SELECTION = `${COMBOBOX_TAGNAME}-selection`;
|
|
28
35
|
|
|
29
36
|
export const COMBOBOX_ATTRIBUTE_SELECTION_ITEM = `${COMBOBOX_TAGNAME}-selection-item`;
|
|
30
37
|
|
|
31
|
-
export const COMBOBOX_AUTOCOMPLETES = new Set<
|
|
38
|
+
export const COMBOBOX_AUTOCOMPLETES = new Set<OuiListboxAutoCompleteType>([
|
|
32
39
|
'both',
|
|
33
40
|
'inline',
|
|
34
41
|
'list',
|
|
35
42
|
'none',
|
|
36
43
|
]);
|
|
37
44
|
|
|
38
|
-
export const
|
|
39
|
-
|
|
40
|
-
export const COMBOBOX_KEYS_NAVIGATION = new Set(['ArrowDown', 'ArrowUp', 'PageDown', 'PageUp']);
|
|
45
|
+
export const messageLabel = `<${COMBOBOX_TAGNAME}> must contain a <label> element for the <select> element`;
|
|
41
46
|
|
|
42
|
-
export const
|
|
47
|
+
export const messageSelect = `<${COMBOBOX_TAGNAME}> must contain a valid <select> element`;
|
|
43
48
|
|
|
44
|
-
export const
|
|
49
|
+
export const selectorAnchor = `[${COMBOBOX_ATTRIBUTE_ANCHOR}]`;
|
|
45
50
|
|
|
46
|
-
export const
|
|
51
|
+
export const selectorContent = `[${attributeContent}]`;
|
|
47
52
|
|
|
48
|
-
export const
|
|
53
|
+
export const selectorOption = `[${attributeOption}]`;
|
|
49
54
|
|
|
50
|
-
export const
|
|
55
|
+
export const selectorSelectionItem = `[${COMBOBOX_ATTRIBUTE_SELECTION_ITEM}]`;
|
|
51
56
|
|
|
52
|
-
export const
|
|
57
|
+
export const COMBOBOX_ATTRIBUTES: OuiListboxAttributes = {
|
|
58
|
+
active: attributeOptionActive,
|
|
59
|
+
content: attributeContent,
|
|
60
|
+
empty: attributeListEmpty,
|
|
61
|
+
filter: attributeFilter,
|
|
62
|
+
group: attributeGroup,
|
|
63
|
+
header: attributeHeader,
|
|
64
|
+
hidden: attributeHidden,
|
|
65
|
+
input: attributeFilterInput,
|
|
66
|
+
list: attributeList,
|
|
67
|
+
message: attributeMessage,
|
|
68
|
+
option: attributeOption,
|
|
69
|
+
};
|
|
53
70
|
|
|
54
|
-
export const
|
|
71
|
+
export const COMBOBOX_MESSAGES = {
|
|
72
|
+
label: messageLabel,
|
|
73
|
+
select: messageSelect,
|
|
74
|
+
};
|
|
55
75
|
|
|
56
|
-
export const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
76
|
+
export const COMBOBOX_SELECTORS = {
|
|
77
|
+
anchor: selectorAnchor,
|
|
78
|
+
content: selectorContent,
|
|
79
|
+
selectionItem: selectorSelectionItem,
|
|
80
|
+
option: selectorOption,
|
|
60
81
|
};
|
|
61
82
|
|
|
62
83
|
// #endregion
|