@oscarpalmer/oui 0.32.0 → 0.33.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.
@@ -22,15 +22,16 @@
22
22
  background-position: right 0.5em center;
23
23
  background-repeat: no-repeat;
24
24
  background-size: 1em;
25
+ position: relative;
25
26
  }
26
- :where([oui-combobox-anchor]:not([disabled], [readonly], [aria-disabled=true i]):focus), :where([oui-combobox-anchor]:not([disabled], [readonly], [aria-disabled=true i]):has(+ [oui-combobox-content]:focus-within)) {
27
+ :where([oui-combobox-anchor]:not([disabled], [readonly], [aria-disabled=true i]):focus), :where([oui-combobox-anchor]:not([disabled], [readonly], [aria-disabled=true i]):focus-within), :where([oui-combobox-anchor]:not([disabled], [readonly], [aria-disabled=true i]):has(+ [oui-combobox-content]:focus-within)) {
27
28
  --oui-border-value: var(--oui-blue-5);
28
29
  --oui-foreground-value: inherit;
29
30
  --oui-outline-percentage: 75%;
30
31
  --oui-outline-value: var(--oui-blue-6);
31
32
  }
32
33
  @media (hover: hover) {
33
- :where([oui-combobox-anchor]:not([disabled], [readonly], [aria-disabled=true i]):hover) {
34
+ :where([oui-combobox-anchor]:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):hover) {
34
35
  --oui-border-value: var(--oui-blue-4);
35
36
  --oui-foreground-percentage: 0%;
36
37
  --oui-foreground-value: inherit;
@@ -38,16 +39,25 @@
38
39
  --oui-outline-value: var(--oui-blue-6);
39
40
  }
40
41
  }
41
- :where([oui-combobox-anchor]:is([disabled], [readonly], [aria-disabled=true i])) {
42
+ :where([oui-combobox-anchor]:is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i])) {
42
43
  --oui-foreground-percentage: 25%;
43
44
  font-style: italic;
44
45
  }
45
- :where([oui-combobox-anchor]:is([disabled], [readonly], [aria-disabled=true i]):focus) {
46
+ :where([oui-combobox-anchor]:is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):focus) {
46
47
  --oui-outline-percentage: 75%;
47
48
  }
48
49
  :where([oui-combobox-anchor]:is([disabled], [aria-disabled=true i])) {
49
50
  --oui-background-percentage: 50%;
50
51
  }
52
+ :where([oui-combobox-anchor] > button) {
53
+ border: none;
54
+ position: absolute;
55
+ inset: 0;
56
+ z-index: 1;
57
+ }
58
+ :where([oui-combobox-anchor] > button:focus) {
59
+ outline: none;
60
+ }
51
61
 
52
62
  :where([oui-combobox-content]) {
53
63
  --margin-bottom: 0.5em;
@@ -77,7 +87,7 @@
77
87
  height: fit-content;
78
88
  max-width: max(25vw, 32rem);
79
89
  max-height: max(25vh, 32rem);
80
- min-width: var(--oui-combobox-width, auto);
90
+ min-width: anchor-size(width);
81
91
  flex-flow: column nowrap;
82
92
  border-radius: 0.25em;
83
93
  }
@@ -85,12 +95,6 @@
85
95
  display: flex !important;
86
96
  }
87
97
 
88
- :where([oui-combobox-empty]) {
89
- padding: 1em;
90
- text-align: center;
91
- font-style: italic;
92
- }
93
-
94
98
  :where([oui-combobox-filter], [oui-combobox-header])::after {
95
99
  content: "";
96
100
  width: 100%;
@@ -131,14 +135,14 @@
131
135
  border-radius: 0.25em;
132
136
  font-size: 0.875rem;
133
137
  }
134
- :where(:where([oui-combobox-filter-input]):not([disabled], [readonly], [aria-disabled=true i]):focus) {
138
+ :where(:where([oui-combobox-filter-input]):focus) {
135
139
  --oui-border-value: var(--oui-blue-5);
136
140
  --oui-foreground-value: inherit;
137
141
  --oui-outline-percentage: 75%;
138
142
  --oui-outline-value: var(--oui-blue-6);
139
143
  }
140
144
  @media (hover: hover) {
141
- :where(:where([oui-combobox-filter-input]):not([disabled], [readonly], [aria-disabled=true i]):hover) {
145
+ :where(:where([oui-combobox-filter-input]):hover) {
142
146
  --oui-border-value: var(--oui-blue-4);
143
147
  --oui-foreground-percentage: 0%;
144
148
  --oui-foreground-value: inherit;
@@ -146,29 +150,17 @@
146
150
  --oui-outline-value: var(--oui-blue-6);
147
151
  }
148
152
  }
149
- :where(:where([oui-combobox-filter-input]):is([disabled], [readonly], [aria-disabled=true i])) {
153
+ :where(:where([oui-combobox-filter-input]):is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i])) {
150
154
  --oui-foreground-percentage: 25%;
151
155
  font-style: italic;
152
156
  }
153
- :where(:where([oui-combobox-filter-input]):is([disabled], [readonly], [aria-disabled=true i]):focus) {
157
+ :where(:where([oui-combobox-filter-input]):is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):focus) {
154
158
  --oui-outline-percentage: 75%;
155
159
  }
156
160
  :where(:where([oui-combobox-filter-input]):is([disabled], [aria-disabled=true i])) {
157
161
  --oui-background-percentage: 50%;
158
162
  }
159
163
 
160
- :where([oui-combobox-filter-label]) {
161
- width: 1px !important;
162
- height: 1px !important;
163
- padding: 0 !important;
164
- clip-path: inset(50%) !important;
165
- overflow: hidden !important;
166
- border: 0 !important;
167
- white-space: nowrap !important;
168
- display: inline-flex;
169
- position: absolute;
170
- }
171
-
172
164
  :where([oui-combobox-header]) {
173
165
  padding: 0.5em 1em;
174
166
  background-color: var(--oui-gray-0);
@@ -179,11 +171,28 @@
179
171
  z-index: 1;
180
172
  }
181
173
 
174
+ :where([oui-combobox-hidden]) {
175
+ width: 1px !important;
176
+ height: 1px !important;
177
+ padding: 0 !important;
178
+ clip-path: inset(50%) !important;
179
+ overflow: hidden !important;
180
+ border: 0 !important;
181
+ white-space: nowrap !important;
182
+ position: absolute;
183
+ }
184
+
182
185
  :where([oui-combobox-list]) {
183
186
  overflow: auto;
184
187
  position: relative;
185
188
  }
186
189
 
190
+ :where([oui-combobox-message]) {
191
+ padding: 1em;
192
+ text-align: center;
193
+ font-style: italic;
194
+ }
195
+
187
196
  :where([oui-combobox-option]) {
188
197
  padding: 0.5em 0.75em;
189
198
  outline: 4px solid transparent;
@@ -201,7 +210,7 @@
201
210
  margin: 0 0.75em 0 0;
202
211
  }
203
212
  @media (hover: hover) {
204
- :where(:where(oui-combobox:not([disabled], [readonly], [aria-disabled=true i]) [oui-combobox-option]):hover) {
213
+ :where(:where(oui-combobox:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-combobox-option]):hover) {
205
214
  background-color: var(--oui-blue-1);
206
215
  color: var(--oui-blue-8);
207
216
  }
@@ -222,29 +231,71 @@
222
231
  gap: 0.5em;
223
232
  overflow: auto;
224
233
  list-style: none;
234
+ position: relative;
235
+ z-index: 2;
225
236
  }
226
237
 
227
238
  :where([oui-combobox-selection-item]) {
228
- --oui-shadow-mixed: color-mix(in oklab, var(--oui-shadow, var(--oui-gray-6)), transparent 92.5%);
229
- box-shadow: inset 0 1px 0 0 transparent, 0 0 0 1px var(--oui-shadow-mixed), 0 1px 2px -0.5px var(--oui-shadow-mixed), 0 2px 4px -1px var(--oui-shadow-mixed);
239
+ --oui-background-percentage: 25%;
240
+ --oui-foreground-percentage: 0%;
241
+ --oui-outline-percentage: 100%;
242
+ --oui-shadow-inset: color-mix(in oklab, white, transparent 75%);
243
+ --oui-shadow-percentage: 82.5%;
244
+ --oui-shadow-value: color-mix(
245
+ in oklab,
246
+ var(--oui-outline-value, var(--oui-gray-6)),
247
+ transparent var(--oui-shadow-percentage)
248
+ );
249
+ box-shadow: inset 0 1px 0 0 var(--oui-shadow-inset), 0 0 0 1px var(--oui-shadow-value), 0 1px 2px -0.5px var(--oui-shadow-value), 0 2px 4px -1px var(--oui-shadow-value);
250
+ padding: 0.5em 0.75em;
230
251
  display: inline-flex;
231
- flex-flow: row nowrap;
232
- gap: 0.5em;
233
- background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
234
- color: var(--oui-foreground, var(--oui-gray-8));
235
- line-height: 1.25;
236
- border-radius: 3em;
237
- padding: 0.5em 1em;
252
+ flex-flow: row wrap;
238
253
  gap: 0.75em;
239
- font-size: 0.875em;
254
+ align-items: center;
255
+ border-radius: 0.25em;
256
+ background-color: color-mix(in oklab, var(--oui-background-value, var(--oui-gray-2)), transparent var(--oui-background-percentage));
257
+ outline: 4px solid color-mix(in oklab, var(--oui-outline-value, var(--oui-gray-6)), transparent var(--oui-outline-percentage));
258
+ border: none;
259
+ color: color-mix(in oklab, var(--oui-foreground-value, var(--oui-gray-8)), transparent var(--oui-foreground-percentage));
260
+ line-height: 1.25;
240
261
  transition: 0.125s ease-in-out;
262
+ --oui-background-value: var(--oui-blue-1);
263
+ --oui-foreground-percentage: 12.5%;
264
+ --oui-foreground-value: var(--oui-blue-8);
265
+ --oui-shadow-percentage: 90%;
266
+ padding: 0.5em 1em;
267
+ flex-wrap: nowrap;
268
+ border-radius: 5em;
269
+ font-size: 0.75em;
270
+ white-space: nowrap;
271
+ }
272
+ :where(oui-combobox:is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-combobox-selection-item]:focus-visible) {
273
+ --oui-outline-percentage: 87.5%;
274
+ --oui-outline-value: var(--oui-blue-6);
275
+ }
276
+ :where(oui-combobox:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-combobox-selection-item]:focus-visible) {
277
+ --oui-background-value: var(--oui-red-1);
278
+ --oui-foreground-value: var(--oui-red-8);
279
+ --oui-outline-percentage: 75%;
280
+ --oui-outline-value: var(--oui-red-6);
241
281
  }
242
282
  @media (hover: hover) {
243
- :where(oui-combobox:not([disabled], [readonly], [aria-disabled=true i]) [oui-combobox-selection-item]:hover) {
244
- --oui-background: var(--oui-red-0);
245
- --oui-foreground: var(--oui-red-8);
246
- --oui-shadow: var(--oui-red-6);
283
+ :where(oui-combobox:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-combobox-selection-item]:hover) {
284
+ --oui-background-value: var(--oui-red-1);
285
+ --oui-foreground-value: var(--oui-red-8);
286
+ --oui-outline-value: var(--oui-red-6);
287
+ --oui-background-percentage: 50%;
288
+ --oui-foreground-percentage: 25%;
247
289
  }
248
290
  }
291
+ :where(oui-combobox:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-combobox-selection-item]:active) {
292
+ box-shadow: 0 0 0 1px var(--oui-shadow-value), inset 0 1px 2px 0 var(--oui-shadow-value), inset 0 2px 4px 0 var(--oui-shadow-value);
293
+ }
294
+ :where(oui-combobox:is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-combobox-selection-item]) {
295
+ --oui-background-percentage: 80%;
296
+ --oui-foreground-percentage: 20%;
297
+ --oui-shadow-percentage: 95%;
298
+ font-style: italic;
299
+ }
249
300
 
250
301