@sveltia/ui 0.26.1 → 0.26.3

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.
Files changed (37) hide show
  1. package/dist/components/bottom-navigation/bottom-navigation.svelte +3 -0
  2. package/dist/components/button/button.svelte +37 -37
  3. package/dist/components/button/select-button-group.svelte +9 -9
  4. package/dist/components/button/split-button.svelte +4 -4
  5. package/dist/components/calendar/calendar.svelte +5 -7
  6. package/dist/components/checkbox/checkbox.svelte +8 -8
  7. package/dist/components/dialog/dialog.svelte +1 -2
  8. package/dist/components/disclosure/disclosure.svelte +2 -2
  9. package/dist/components/drawer/drawer.svelte +1 -2
  10. package/dist/components/grid/grid-body.svelte +2 -2
  11. package/dist/components/grid/grid.svelte +2 -4
  12. package/dist/components/listbox/listbox.svelte +13 -8
  13. package/dist/components/listbox/option.svelte +10 -11
  14. package/dist/components/menu/menu-item.svelte +4 -4
  15. package/dist/components/menu/menu.svelte +6 -1
  16. package/dist/components/radio/radio-group.svelte +3 -3
  17. package/dist/components/radio/radio.svelte +9 -8
  18. package/dist/components/select/combobox.svelte +31 -28
  19. package/dist/components/table/table-body.svelte +2 -2
  20. package/dist/components/table/table.svelte +2 -4
  21. package/dist/components/text-editor/lexical-root.svelte +16 -63
  22. package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +2 -2
  23. package/dist/components/text-field/number-input.svelte +6 -6
  24. package/dist/components/text-field/password-input.svelte +1 -1
  25. package/dist/components/text-field/search-bar.svelte +4 -4
  26. package/dist/components/text-field/text-area.svelte +4 -9
  27. package/dist/components/text-field/text-input.svelte +4 -6
  28. package/dist/components/toast/toast.svelte +6 -6
  29. package/dist/components/toolbar/toolbar.svelte +5 -6
  30. package/dist/components/util/app-shell.svelte +13 -36
  31. package/dist/components/util/modal.svelte +20 -7
  32. package/dist/components/util/popup.svelte +1 -1
  33. package/dist/styles/core.scss +16 -36
  34. package/dist/styles/variables.scss +3 -3
  35. package/dist/typedefs.d.ts +5 -0
  36. package/dist/typedefs.js +2 -0
  37. package/package.json +8 -8
@@ -33,6 +33,7 @@
33
33
  invalid = false,
34
34
  editable = true,
35
35
  position = 'bottom-left',
36
+ filterThreshold = 5,
36
37
  children,
37
38
  chevronIcon,
38
39
  onChange,
@@ -193,11 +194,13 @@
193
194
  class="combobox"
194
195
  {anchor}
195
196
  {position}
196
- showBackdrop={true}
197
197
  touchOptimized={true}
198
198
  bind:open={isPopupOpen}
199
199
  onOpen={() => {
200
- showFilter = (popupContent?.querySelectorAll('[role="option"]')?.length ?? 0) > 5;
200
+ showFilter =
201
+ filterThreshold === -1
202
+ ? false
203
+ : (popupContent?.querySelectorAll('[role="option"]')?.length ?? 0) > filterThreshold;
201
204
  searchTerms = '';
202
205
  }}
203
206
  >
@@ -248,29 +251,6 @@
248
251
  position: relative;
249
252
  min-width: var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5));
250
253
  }
251
- .combobox :global(.icon) {
252
- font-size: var(--sui-font-size-xx-large);
253
- opacity: 0.5;
254
- }
255
- .combobox > :global(.icon) {
256
- position: absolute;
257
- inset: 8px auto auto 8px;
258
- z-index: 1;
259
- }
260
- .combobox > :global(button) {
261
- position: absolute;
262
- inset: 0 0 auto auto;
263
- z-index: 1;
264
- margin: 0 !important;
265
- border-top-left-radius: 0;
266
- border-bottom-left-radius: 0;
267
- }
268
- .combobox:not(.editable) > :global(button) {
269
- background-color: transparent !important;
270
- }
271
- .combobox > :global(button[tabindex="-1"]) {
272
- pointer-events: none;
273
- }
274
254
  .combobox div[role=combobox] {
275
255
  display: flex;
276
256
  align-items: center;
@@ -293,7 +273,7 @@
293
273
  .combobox div[role=combobox]:not(.selected) {
294
274
  font-style: italic;
295
275
  }
296
- .combobox div[role=combobox]:hover, .combobox div[role=combobox]:focus {
276
+ .combobox div[role=combobox]:is(:hover, :focus) {
297
277
  background-color: var(--sui-hover-background-color);
298
278
  }
299
279
  .combobox div[role=combobox][aria-invalid=true] {
@@ -302,6 +282,29 @@
302
282
  .combobox div[role=combobox] .label {
303
283
  width: 100%;
304
284
  }
285
+ .combobox :global(.icon) {
286
+ font-size: var(--sui-font-size-xx-large);
287
+ opacity: 0.5;
288
+ }
289
+ .combobox > :global(.icon) {
290
+ position: absolute;
291
+ inset: 8px auto auto 8px;
292
+ z-index: 1;
293
+ }
294
+ .combobox > :global(button) {
295
+ position: absolute;
296
+ inset: 0 0 auto auto;
297
+ z-index: 1;
298
+ margin: 0 !important;
299
+ border-top-left-radius: 0;
300
+ border-bottom-left-radius: 0;
301
+ }
302
+ .combobox > :global(button[tabindex="-1"]) {
303
+ pointer-events: none;
304
+ }
305
+ .combobox :global(:not(.editable)) > :global(button) {
306
+ background-color: transparent !important;
307
+ }
305
308
  .combobox :global(.text-input) {
306
309
  margin: 0 !important;
307
310
  width: 100% !important;
@@ -310,7 +313,7 @@
310
313
  padding: 0 32px 0 8px;
311
314
  width: 0;
312
315
  }
313
- .combobox + :global([role="listbox"]) {
316
+ .combobox + :global([role=listbox]) {
314
317
  position: fixed;
315
318
  z-index: 100;
316
319
  border-radius: var(--sui-control-medium-border-radius);
@@ -322,7 +325,7 @@
322
325
  /* Add .1s delay before the position can be determined */
323
326
  transition: opacity 100ms 100ms;
324
327
  }
325
- .combobox + :global([role="listbox"]:not(.open)) {
328
+ .combobox + :global([role=listbox]:not(.open)) {
326
329
  opacity: 0;
327
330
  pointer-events: none;
328
331
  }
@@ -41,7 +41,7 @@
41
41
  {#if label}
42
42
  <div role="row" class="row-group-caption">
43
43
  <!-- We need `colspan` here but cannot place `<th>` under `<div>`, so use a hack -->
44
- <svelte:element this={'th'} role="rowheader" id="{id}-label" colspan="9999">
44
+ <svelte:element this={'th'} role="columnheader" id="{id}-label" colspan="9999">
45
45
  {label}
46
46
  </svelte:element>
47
47
  </div>
@@ -57,7 +57,7 @@
57
57
  display: table-row;
58
58
  }
59
59
 
60
- [role=rowheader] {
60
+ [role=columnheader] {
61
61
  display: table-cell;
62
62
  padding: 8px;
63
63
  color: var(--sui-secondary-foreground-color);
@@ -36,12 +36,10 @@
36
36
  margin: var(--sui-focus-ring-width);
37
37
  width: calc(100% - var(--sui-focus-ring-width) * 2);
38
38
  }
39
- .table:global(.data) {
39
+ .table.data {
40
40
  border-collapse: collapse;
41
41
  }
42
- .table:global(.data) :global(.table-col-header),
43
- .table:global(.data) :global(.table-row-header),
44
- .table:global(.data) :global(.table-cell) {
42
+ .table.data :global(:is(.table-col-header, .table-row-header, .table-cell)) {
45
43
  border: 1px solid var(--sui-secondary-border-color);
46
44
  padding: 8px 8px;
47
45
  }</style>
@@ -192,17 +192,13 @@
192
192
  .lexical-root :global([data-lexical-text=true]) {
193
193
  cursor: text;
194
194
  }
195
- .lexical-root :global(th) > :global(p),
196
- .lexical-root :global(td) > :global(p) {
195
+ .lexical-root :global(:is(th, td)) > :global(p) {
197
196
  margin: 0;
198
197
  white-space: normal;
199
198
  word-break: normal;
200
199
  }
201
200
 
202
- :root[data-theme=light] .lexical-root :global(.token.comment),
203
- :root[data-theme=light] .lexical-root :global(.token.prolog),
204
- :root[data-theme=light] .lexical-root :global(.token.doctype),
205
- :root[data-theme=light] .lexical-root :global(.token.cdata) {
201
+ :root[data-theme=light] .lexical-root :global(.token:is(.comment, .prolog, .doctype, .cdata)) {
206
202
  color: slategray;
207
203
  }
208
204
  :root[data-theme=light] .lexical-root :global(.token.punctuation) {
@@ -211,96 +207,53 @@
211
207
  :root[data-theme=light] .lexical-root :global(.token.namespace) {
212
208
  opacity: 0.7;
213
209
  }
214
- :root[data-theme=light] .lexical-root :global(.token.property),
215
- :root[data-theme=light] .lexical-root :global(.token.tag),
216
- :root[data-theme=light] .lexical-root :global(.token.boolean),
217
- :root[data-theme=light] .lexical-root :global(.token.number),
218
- :root[data-theme=light] .lexical-root :global(.token.constant),
219
- :root[data-theme=light] .lexical-root :global(.token.symbol),
220
- :root[data-theme=light] .lexical-root :global(.token.deleted) {
210
+ :root[data-theme=light] .lexical-root :global(.token:is(.property, .tag, .boolean, .number, .constant, .symbol, .deleted)) {
221
211
  color: #905;
222
212
  }
223
- :root[data-theme=light] .lexical-root :global(.token.selector),
224
- :root[data-theme=light] .lexical-root :global(.token.attr-name),
225
- :root[data-theme=light] .lexical-root :global(.token.string),
226
- :root[data-theme=light] .lexical-root :global(.token.char),
227
- :root[data-theme=light] .lexical-root :global(.token.builtin),
228
- :root[data-theme=light] .lexical-root :global(.token.inserted) {
213
+ :root[data-theme=light] .lexical-root :global(.token:is(.selector, .attr-name, .string, .char, .builtin, .inserted)) {
229
214
  color: #690;
230
215
  }
231
- :root[data-theme=light] .lexical-root :global(.token.operator),
232
- :root[data-theme=light] .lexical-root :global(.token.entity),
233
- :root[data-theme=light] .lexical-root :global(.token.url),
234
- :root[data-theme=light] .lexical-root :global(.language-css) :global(.token.string),
235
- :root[data-theme=light] .lexical-root :global(.style) :global(.token.string) {
216
+ :root[data-theme=light] .lexical-root :global(.token:is(.operator, .entity, .url)), :root[data-theme=light] .lexical-root :global(.language-css) :global(.token.string), :root[data-theme=light] .lexical-root :global(.style) :global(.token.string) {
236
217
  color: #9a6e3a;
237
218
  }
238
- :root[data-theme=light] .lexical-root :global(.token.atrule),
239
- :root[data-theme=light] .lexical-root :global(.token.attr-value),
240
- :root[data-theme=light] .lexical-root :global(.token.keyword) {
219
+ :root[data-theme=light] .lexical-root :global(.token:is(.atrule, .attr-value, .keyword)) {
241
220
  color: #07a;
242
221
  }
243
- :root[data-theme=light] .lexical-root :global(.token.function),
244
- :root[data-theme=light] .lexical-root :global(.token.class-name) {
222
+ :root[data-theme=light] .lexical-root :global(.token:is(.function, .class-name)) {
245
223
  color: #dd4a68;
246
224
  }
247
- :root[data-theme=light] .lexical-root :global(.token.regex),
248
- :root[data-theme=light] .lexical-root :global(.token.important),
249
- :root[data-theme=light] .lexical-root :global(.token.variable) {
225
+ :root[data-theme=light] .lexical-root :global(.token:is(.regex, .important, .variable)) {
250
226
  color: #e90;
251
227
  }
252
228
 
253
- :root[data-theme=dark] .lexical-root :global(.token.comment),
254
- :root[data-theme=dark] .lexical-root :global(.token.block-comment),
255
- :root[data-theme=dark] .lexical-root :global(.token.prolog),
256
- :root[data-theme=dark] .lexical-root :global(.token.doctype),
257
- :root[data-theme=dark] .lexical-root :global(.token.cdata) {
229
+ :root[data-theme=dark] .lexical-root :global(.token:is(.comment, .block-comment, .prolog, .doctype, .cdata)) {
258
230
  color: #999;
259
231
  }
260
232
  :root[data-theme=dark] .lexical-root :global(.token.punctuation) {
261
233
  color: #ccc;
262
234
  }
263
- :root[data-theme=dark] .lexical-root :global(.token.tag),
264
- :root[data-theme=dark] .lexical-root :global(.token.attr-name),
265
- :root[data-theme=dark] .lexical-root :global(.token.namespace),
266
- :root[data-theme=dark] .lexical-root :global(.token.deleted) {
235
+ :root[data-theme=dark] .lexical-root :global(.token:is(.tag, .attr-name, .namespace, .deleted)) {
267
236
  color: #e2777a;
268
237
  }
269
238
  :root[data-theme=dark] .lexical-root :global(.token.function-name) {
270
239
  color: #6196cc;
271
240
  }
272
- :root[data-theme=dark] .lexical-root :global(.token.boolean),
273
- :root[data-theme=dark] .lexical-root :global(.token.number),
274
- :root[data-theme=dark] .lexical-root :global(.token.function) {
241
+ :root[data-theme=dark] .lexical-root :global(.token:is(.boolean, .number, .function)) {
275
242
  color: #f08d49;
276
243
  }
277
- :root[data-theme=dark] .lexical-root :global(.token.property),
278
- :root[data-theme=dark] .lexical-root :global(.token.class-name),
279
- :root[data-theme=dark] .lexical-root :global(.token.constant),
280
- :root[data-theme=dark] .lexical-root :global(.token.symbol) {
244
+ :root[data-theme=dark] .lexical-root :global(.token:is(.property, .class-name, .constant, .symbol)) {
281
245
  color: #f8c555;
282
246
  }
283
- :root[data-theme=dark] .lexical-root :global(.token.selector),
284
- :root[data-theme=dark] .lexical-root :global(.token.important),
285
- :root[data-theme=dark] .lexical-root :global(.token.atrule),
286
- :root[data-theme=dark] .lexical-root :global(.token.keyword),
287
- :root[data-theme=dark] .lexical-root :global(.token.builtin) {
247
+ :root[data-theme=dark] .lexical-root :global(.token:is(.selector, .important, .atrule, .keyword, .builtin)) {
288
248
  color: #cc99cd;
289
249
  }
290
- :root[data-theme=dark] .lexical-root :global(.token.string),
291
- :root[data-theme=dark] .lexical-root :global(.token.char),
292
- :root[data-theme=dark] .lexical-root :global(.token.attr-value),
293
- :root[data-theme=dark] .lexical-root :global(.token.regex),
294
- :root[data-theme=dark] .lexical-root :global(.token.variable) {
250
+ :root[data-theme=dark] .lexical-root :global(.token:is(.string, .char, .attr-value, .regex, .variable)) {
295
251
  color: #7ec699;
296
252
  }
297
- :root[data-theme=dark] .lexical-root :global(.token.operator),
298
- :root[data-theme=dark] .lexical-root :global(.token.entity),
299
- :root[data-theme=dark] .lexical-root :global(.token.url) {
253
+ :root[data-theme=dark] .lexical-root :global(.token:is(.operator, .entity, .url)) {
300
254
  color: #67cdcc;
301
255
  }
302
- :root[data-theme=dark] .lexical-root :global(.token.important),
303
- :root[data-theme=dark] .lexical-root :global(.token.bold) {
256
+ :root[data-theme=dark] .lexical-root :global(.token:is(.important, .bold)) {
304
257
  font-weight: bold;
305
258
  }
306
259
  :root[data-theme=dark] .lexical-root :global(.token.italic) {
@@ -37,7 +37,7 @@
37
37
  <style>.wrapper {
38
38
  display: contents;
39
39
  }
40
- .wrapper :global([role="toolbar"]) {
40
+ .wrapper :global([role=toolbar]) {
41
41
  position: sticky;
42
42
  top: 0;
43
43
  z-index: 1;
@@ -51,7 +51,7 @@
51
51
  background-color: var(--sui-tertiary-background-color);
52
52
  }
53
53
  @media (width < 768px) {
54
- .wrapper :global([role="toolbar"]) {
54
+ .wrapper :global([role=toolbar]) {
55
55
  flex-wrap: wrap;
56
56
  height: auto;
57
57
  }
@@ -210,18 +210,18 @@
210
210
  width: stretch;
211
211
  min-width: 0;
212
212
  }
213
- .number-input :global(:not(:first-child) input) {
213
+ .number-input :global(:not(:first-child)) :global(input) {
214
214
  border-top-left-radius: 0;
215
215
  border-bottom-left-radius: 0;
216
216
  }
217
- .number-input :global(:not(:last-child) input) {
217
+ .number-input :global(:not(:last-child)) :global(input) {
218
218
  border-top-right-radius: 0;
219
219
  border-bottom-right-radius: 0;
220
220
  }
221
- .number-input:not(.disabled) :global(button[aria-disabled="true"]) {
221
+ .number-input :global(:not(.disabled)) :global(button[aria-disabled=true]) {
222
222
  filter: grayscale(0) opacity(1);
223
223
  }
224
- .number-input:not(.disabled) :global(button[aria-disabled="true"]) :global(*) {
224
+ .number-input :global(:not(.disabled)) :global(button[aria-disabled=true]) :global(*) {
225
225
  filter: grayscale(1) opacity(0.35);
226
226
  }
227
227
  .number-input :global(.text-input) {
@@ -245,13 +245,13 @@
245
245
  width: 100%;
246
246
  height: 50%;
247
247
  }
248
- .buttons :global(button):first-of-type {
248
+ .buttons :global(button:first-of-type) {
249
249
  border-top-right-radius: 0;
250
250
  border-bottom-right-radius: 0;
251
251
  border-bottom-left-radius: 0;
252
252
  border-width: 1px 0 0 1px;
253
253
  }
254
- .buttons :global(button):last-of-type {
254
+ .buttons :global(button:last-of-type) {
255
255
  border-top-left-radius: 0;
256
256
  border-top-right-radius: 0;
257
257
  border-bottom-right-radius: 0;
@@ -129,7 +129,7 @@
129
129
  width: var(--sui-textbox-height);
130
130
  aspect-ratio: 1/1;
131
131
  }
132
- .password-input :global(button):last-child {
132
+ .password-input :global(button:last-child) {
133
133
  border-radius: 0 4px 4px 0;
134
134
  }
135
135
  .password-input :global(button) :global(.icon) {
@@ -129,10 +129,6 @@
129
129
  width: stretch;
130
130
  min-width: 0;
131
131
  }
132
- .search-bar :global(.icon) {
133
- font-size: var(--sui-font-size-xx-large);
134
- opacity: 0.5;
135
- }
136
132
  .search-bar > span {
137
133
  position: absolute;
138
134
  inset: 0 auto 0 0;
@@ -143,6 +139,10 @@
143
139
  width: var(--sui-button-medium-height);
144
140
  height: var(--sui-button-medium-height);
145
141
  }
142
+ .search-bar :global(.icon) {
143
+ font-size: calc(var(--sui-textbox-height) * 0.6);
144
+ opacity: 0.5;
145
+ }
146
146
  .search-bar > :global(button) {
147
147
  position: absolute;
148
148
  inset: 0 0 auto auto;
@@ -94,8 +94,7 @@
94
94
  min-width: 0;
95
95
  }
96
96
 
97
- textarea,
98
- .clone {
97
+ :is(textarea, .clone) {
99
98
  grid-area: 1/1/2/2;
100
99
  display: block;
101
100
  margin: 0;
@@ -118,19 +117,15 @@ textarea,
118
117
  word-spacing: var(--sui-word-spacing-normal, normal);
119
118
  transition: all 200ms;
120
119
  }
121
- textarea.resizing,
122
- .clone.resizing {
120
+ :is(textarea, .clone).resizing {
123
121
  transition-duration: 0ms;
124
122
  }
125
- textarea:focus,
126
- .clone:focus {
123
+ :is(textarea, .clone):focus {
127
124
  border-color: var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));
128
125
  color: var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));
129
126
  background-color: var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));
130
127
  }
131
- textarea:disabled, textarea:read-only,
132
- .clone:disabled,
133
- .clone:read-only {
128
+ :is(textarea, .clone):is(:disabled, :read-only) {
134
129
  background-color: var(--sui-disabled-background-color);
135
130
  }
136
131
 
@@ -97,8 +97,7 @@
97
97
  min-width: 0;
98
98
  }
99
99
 
100
- input:-webkit-autofill,
101
- input:-webkit-autofill:focus {
100
+ input:is(:-webkit-autofill, :-webkit-autofill:focus) {
102
101
  transition: background-color 0s 600000s, color 0s 600000s;
103
102
  }
104
103
 
@@ -133,7 +132,7 @@ input:read-only {
133
132
  color: var(--sui-tertiary-foreground-color);
134
133
  border-color: var(--sui-textbox-border-color) !important;
135
134
  }
136
- input:disabled, input:read-only {
135
+ input:is(:disabled, :read-only) {
137
136
  background-color: var(--sui-disabled-background-color);
138
137
  }
139
138
  input[aria-invalid=true] {
@@ -147,7 +146,7 @@ input ~ :global(button) {
147
146
  height: var(--sui-textbox-height);
148
147
  aspect-ratio: 1/1;
149
148
  }
150
- input ~ :global(button):last-child {
149
+ input ~ :global(button:last-child) {
151
150
  border-radius: 0 4px 4px 0;
152
151
  }
153
152
  input ~ :global(button) :global(.icon) {
@@ -171,8 +170,7 @@ input:focus + .label {
171
170
  opacity: 0;
172
171
  }
173
172
 
174
- input::placeholder,
175
- .label {
173
+ :is(input::placeholder, .label) {
176
174
  color: var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));
177
175
  opacity: var(--sui-textbox-placeholder-opacity, 0.5);
178
176
  font-family: var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));
@@ -167,22 +167,22 @@
167
167
  opacity: 0;
168
168
  }
169
169
  .toast.top-left {
170
- inset: 16px auto auto 16px;
170
+ inset: 0 auto auto 0;
171
171
  }
172
172
  .toast.top-center {
173
- inset: 16px auto auto 50%;
173
+ inset: 0 auto auto 50%;
174
174
  transform: translateX(-50%);
175
175
  }
176
176
  .toast.top-right {
177
- inset: 16px 16px auto auto;
177
+ inset: 0 0 auto auto;
178
178
  }
179
179
  .toast.bottom-left {
180
- inset: auto auto 16px 16px;
180
+ inset: auto auto 0 0;
181
181
  }
182
182
  .toast.bottom-center {
183
- inset: auto auto 16px 50%;
183
+ inset: auto auto 0 50%;
184
184
  transform: translateX(-50%);
185
185
  }
186
186
  .toast.bottom-right {
187
- inset: auto 16px 16px auto;
187
+ inset: auto 0 0 auto;
188
188
  }</style>
@@ -74,8 +74,7 @@
74
74
  flex-direction: column;
75
75
  width: var(--toolbar-size);
76
76
  }
77
- [role=toolbar] :global(button[role="button"][aria-pressed="true"]),
78
- [role=toolbar] :global(button[role="button"][aria-checked="true"]) {
77
+ [role=toolbar] :global(button[role=button]:is([aria-pressed=true], [aria-checked=true])) {
79
78
  background-color: var(--sui-selected-background-color);
80
79
  }
81
80
  [role=toolbar] :global(h2) {
@@ -88,19 +87,19 @@
88
87
  min-width: 0;
89
88
  font-size: var(--sui-font-size-x-large);
90
89
  }
91
- [role=toolbar] :global(h2):first-child {
90
+ [role=toolbar] :global(h2:first-child) {
92
91
  padding-inline-start: 12px;
93
92
  }
94
- [role=toolbar] :global(h2) :global(span) {
93
+ [role=toolbar] :global(h2) :global(span:not(.sui.truncated-text)) {
95
94
  font-size: var(--sui-font-size-small);
96
95
  font-weight: var(--sui-font-weight-normal, normal);
97
96
  opacity: 0.8;
98
97
  }
99
- [role=toolbar] :global(.divider[aria-orientation="horizontal"]) {
98
+ [role=toolbar] :global(.divider[aria-orientation=horizontal]) {
100
99
  margin: 0 4px;
101
100
  width: calc(100% - 8px);
102
101
  }
103
- [role=toolbar] :global(.divider[aria-orientation="vertical"]) {
102
+ [role=toolbar] :global(.divider[aria-orientation=vertical]) {
104
103
  margin: 4px 0;
105
104
  height: calc(100% - 8px);
106
105
  }
@@ -258,9 +258,9 @@
258
258
  @media (pointer: coarse) {
259
259
  :global(:root),
260
260
  :global(:host) {
261
- --sui-control-small-height: 40px;
262
- --sui-control-medium-height: 48px;
263
- --sui-control-large-height: 56px;
261
+ --sui-control-small-height: 32px;
262
+ --sui-control-medium-height: 40px;
263
+ --sui-control-large-height: 48px;
264
264
  --sui-checkbox-height: 24px;
265
265
  --sui-secondary-row-height: 48px;
266
266
  }
@@ -453,12 +453,7 @@
453
453
  outline-color: var(--sui-primary-accent-color-translucent);
454
454
  z-index: 2;
455
455
  }
456
- :global(h1),
457
- :global(h2),
458
- :global(h3),
459
- :global(h4),
460
- :global(h5),
461
- :global(h6) {
456
+ :global(:is(h1, h2, h3, h4, h5, h6)) {
462
457
  margin: 0;
463
458
  font-weight: var(--sui-font-weight-bold, bold);
464
459
  line-height: var(--sui-line-height-default);
@@ -489,25 +484,20 @@
489
484
  text-decoration: none;
490
485
  text-underline-offset: 2px;
491
486
  }
492
- :global(a:hover), :global(a:focus), :global(a:active) {
487
+ :global(a:is(:hover, :focus, :active)) {
493
488
  text-decoration: underline;
494
489
  }
495
- :global(:root[data-underline-links="true"]) :global(a), :global(:host[data-underline-links="true"]) :global(a) {
490
+ :is(:root, :host)[data-underline-links=true] :global(a) {
496
491
  text-decoration: underline;
497
492
  }
498
- :global(p),
499
- :global(ul),
500
- :global(ol),
501
- :global(dl) {
493
+ :global(:is(p, ul, ol, dl)) {
502
494
  margin: var(--sui-paragraph-margin) 0;
503
495
  line-height: var(--sui-line-height-comfortable);
504
496
  }
505
- :global(ul),
506
- :global(ol) {
497
+ :global(:is(ul, ol)) {
507
498
  padding-inline: 2em;
508
499
  }
509
- :global(code),
510
- :global(pre) {
500
+ :global(:is(code, pre)) {
511
501
  border-radius: 4px;
512
502
  background-color: var(--sui-code-background-color);
513
503
  font-family: var(--sui-font-family-monospace);
@@ -526,8 +516,7 @@
526
516
  :global(table) {
527
517
  border-collapse: collapse;
528
518
  }
529
- :global(th),
530
- :global(td) {
519
+ :global(:is(th, td)) {
531
520
  border: 1px solid var(--sui-textbox-border-color);
532
521
  padding: 8px;
533
522
  }
@@ -536,29 +525,17 @@
536
525
  border-inline-start: 4px solid var(--sui-textbox-border-color);
537
526
  padding-inline-start: 12px;
538
527
  }
539
- :global(.disabled),
540
- :global(.readonly),
541
- :global([aria-disabled=true]),
542
- :global([aria-readonly=true]),
543
- :global([inert]:not(body)) {
528
+ :global(:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body)) {
544
529
  cursor: default;
545
530
  pointer-events: none;
546
531
  -webkit-user-select: none;
547
532
  user-select: none;
548
533
  filter: grayscale(1) opacity(0.35);
549
534
  }
550
- :global(.disabled) :global(*),
551
- :global(.readonly) :global(*),
552
- :global([aria-disabled=true]) :global(*),
553
- :global([aria-readonly=true]) :global(*),
554
- :global([inert]:not(body)) :global(*) {
535
+ :global(:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body)) :global(*) {
555
536
  filter: grayscale(0) opacity(1);
556
537
  }
557
- :global(.disabled) :global(*),
558
- :global(.readonly) :global(*),
559
- :global([aria-disabled=true]) :global(*),
560
- :global([aria-readonly=true]) :global(*),
561
- :global([inert]) :global(*) {
538
+ :global(:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert])) :global(*) {
562
539
  cursor: default;
563
540
  pointer-events: none;
564
541
  -webkit-user-select: none;