@sveltia/ui 0.41.5 → 0.42.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/components/alert/alert.svelte +36 -30
- package/dist/components/alert/infobar.svelte +55 -45
- package/dist/components/bottom-navigation/bottom-navigation.svelte +21 -15
- package/dist/components/button/button-group.svelte +7 -5
- package/dist/components/button/button.svelte +274 -175
- package/dist/components/button/floating-action-button-wrapper.svelte +23 -18
- package/dist/components/button/select-button-group.svelte +57 -41
- package/dist/components/button/split-button.svelte +25 -18
- package/dist/components/calendar/calendar.svelte +103 -80
- package/dist/components/checkbox/checkbox-group.svelte +22 -19
- package/dist/components/checkbox/checkbox.svelte +91 -63
- package/dist/components/dialog/dialog.svelte +105 -87
- package/dist/components/dialog/prompt-dialog.svelte +5 -3
- package/dist/components/disclosure/disclosure.svelte +34 -21
- package/dist/components/divider/divider.svelte +18 -14
- package/dist/components/divider/spacer.svelte +13 -8
- package/dist/components/drawer/drawer.svelte +343 -190
- package/dist/components/grid/grid-body.svelte +16 -14
- package/dist/components/grid/grid-cell.svelte +5 -3
- package/dist/components/grid/grid-col-header.svelte +5 -3
- package/dist/components/grid/grid-foot.svelte +5 -3
- package/dist/components/grid/grid-head.svelte +5 -3
- package/dist/components/grid/grid-row-header.svelte +6 -4
- package/dist/components/grid/grid-row.svelte +6 -4
- package/dist/components/grid/grid.svelte +18 -12
- package/dist/components/icon/icon.svelte +7 -5
- package/dist/components/listbox/listbox.svelte +78 -61
- package/dist/components/listbox/option-group.svelte +15 -11
- package/dist/components/listbox/option.svelte +54 -39
- package/dist/components/menu/menu-item-group.svelte +5 -3
- package/dist/components/menu/menu-item.svelte +67 -51
- package/dist/components/menu/menu.svelte +21 -17
- package/dist/components/progressbar/progressbar.svelte +24 -15
- package/dist/components/radio/radio-group.svelte +40 -31
- package/dist/components/radio/radio.svelte +81 -63
- package/dist/components/resizable-pane/resizable-handle.svelte +60 -48
- package/dist/components/resizable-pane/resizable-pane-group.svelte +18 -14
- package/dist/components/select/combobox.svelte +135 -112
- package/dist/components/select/select-tags.svelte +73 -57
- package/dist/components/slider/slider.svelte +94 -74
- package/dist/components/switch/switch.svelte +115 -81
- package/dist/components/table/table-body.svelte +16 -14
- package/dist/components/table/table-cell.svelte +5 -3
- package/dist/components/table/table-col-header.svelte +5 -3
- package/dist/components/table/table-foot.svelte +5 -3
- package/dist/components/table/table-head.svelte +5 -3
- package/dist/components/table/table-row-header.svelte +6 -4
- package/dist/components/table/table-row.svelte +6 -4
- package/dist/components/table/table.svelte +18 -12
- package/dist/components/tabs/tab-box.svelte +9 -6
- package/dist/components/tabs/tab-list.svelte +91 -73
- package/dist/components/tabs/tab-panel.svelte +11 -7
- package/dist/components/tabs/tab-panels.svelte +19 -14
- package/dist/components/text-editor/code-editor.svelte +10 -7
- package/dist/components/text-editor/lexical-root.svelte +221 -160
- package/dist/components/text-editor/text-editor.svelte +25 -18
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +44 -37
- package/dist/components/text-field/number-input.svelte +87 -68
- package/dist/components/text-field/password-input.svelte +52 -42
- package/dist/components/text-field/search-bar.svelte +64 -53
- package/dist/components/text-field/secret-input.svelte +61 -46
- package/dist/components/text-field/text-area.svelte +80 -68
- package/dist/components/text-field/text-input.svelte +138 -106
- package/dist/components/toast/toast.svelte +104 -89
- package/dist/components/toolbar/toolbar.svelte +70 -54
- package/dist/components/typography/truncated-text.svelte +9 -7
- package/dist/components/util/app-shell.svelte +40 -493
- package/dist/components/util/empty-state.svelte +13 -11
- package/dist/components/util/group.svelte +5 -3
- package/dist/components/util/modal.svelte +59 -48
- package/dist/components/util/popup.svelte +87 -67
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -4
- package/dist/services/i18n.d.ts +6 -0
- package/dist/services/i18n.js +19 -14
- package/package.json +20 -20
|
@@ -109,178 +109,277 @@
|
|
|
109
109
|
</Popup>
|
|
110
110
|
{/if}
|
|
111
111
|
|
|
112
|
-
<style>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
button
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
button
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
button
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
button
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
button
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
112
|
+
<style lang="scss">
|
|
113
|
+
button {
|
|
114
|
+
flex: none;
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 4px;
|
|
118
|
+
margin: var(--sui-focus-ring-width);
|
|
119
|
+
border-width: 0;
|
|
120
|
+
border-style: solid;
|
|
121
|
+
border-color: transparent;
|
|
122
|
+
padding: 0;
|
|
123
|
+
color: var(--sui-control-foreground-color, inherit);
|
|
124
|
+
background-color: transparent;
|
|
125
|
+
box-shadow: none;
|
|
126
|
+
font-family: var(--sui-control-font-family);
|
|
127
|
+
font-size: var(--sui-control-font-size);
|
|
128
|
+
line-height: var(--sui-control-line-height);
|
|
129
|
+
font-weight: var(--sui-font-weight-normal, normal);
|
|
130
|
+
text-align: start;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
transition: all 200ms;
|
|
133
|
+
|
|
134
|
+
&[hidden] {
|
|
135
|
+
display: none !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:not(:disabled):focus-visible {
|
|
139
|
+
z-index: 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:is(.primary, .secondary, .tertiary, .ghost) {
|
|
143
|
+
justify-content: center;
|
|
144
|
+
border-width: 1px;
|
|
145
|
+
|
|
146
|
+
.label:only-child {
|
|
147
|
+
padding: 0 4px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.primary {
|
|
152
|
+
border-width: var(--sui-button-primary-border-width, 1px);
|
|
153
|
+
border-style: var(--sui-button-primary-border-style, solid);
|
|
154
|
+
border-color: var(--sui-button-primary-border-color, var(--sui-primary-accent-color));
|
|
155
|
+
color: var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));
|
|
156
|
+
background-color: var(--sui-button-primary-background-color, var(--sui-primary-accent-color));
|
|
157
|
+
font-weight: var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));
|
|
158
|
+
|
|
159
|
+
&:is(:hover, :focus-visible, [aria-expanded='true']) {
|
|
160
|
+
color: var(
|
|
161
|
+
--sui-button-primary-foreground-color-focus,
|
|
162
|
+
var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted))
|
|
163
|
+
);
|
|
164
|
+
background-color: var(
|
|
165
|
+
--sui-button-primary-background-color-focus,
|
|
166
|
+
var(--sui-primary-accent-color-light)
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:active {
|
|
171
|
+
color: var(
|
|
172
|
+
--sui-button-primary-foreground-color-active,
|
|
173
|
+
var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted))
|
|
174
|
+
);
|
|
175
|
+
background-color: var(
|
|
176
|
+
--sui-button-primary-background-color-active,
|
|
177
|
+
var(--sui-primary-accent-color-dark)
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&.secondary {
|
|
183
|
+
border-width: var(--sui-button-secondary-border-width, 1px);
|
|
184
|
+
border-style: var(--sui-button-secondary-border-style, solid);
|
|
185
|
+
border-color: var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));
|
|
186
|
+
color: var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));
|
|
187
|
+
background-color: var(
|
|
188
|
+
--sui-button-secondary-background-color,
|
|
189
|
+
var(--sui-button-background-color)
|
|
190
|
+
);
|
|
191
|
+
font-weight: var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));
|
|
192
|
+
|
|
193
|
+
&:is(:hover, :focus-visible, [aria-expanded='true']) {
|
|
194
|
+
color: var(
|
|
195
|
+
--sui-button-secondary-foreground-color-focus,
|
|
196
|
+
var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text))
|
|
197
|
+
);
|
|
198
|
+
background-color: var(
|
|
199
|
+
--sui-button-secondary-background-color-focus,
|
|
200
|
+
var(--sui-hover-background-color)
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&:active {
|
|
205
|
+
color: var(
|
|
206
|
+
--sui-button-secondary-foreground-color-active,
|
|
207
|
+
var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text))
|
|
208
|
+
);
|
|
209
|
+
background-color: var(
|
|
210
|
+
--sui-button-secondary-background-color-active,
|
|
211
|
+
var(--sui-active-background-color)
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&[aria-pressed='true'] {
|
|
216
|
+
color: var(--sui-button-secondary-foreground-color-pressed);
|
|
217
|
+
background-color: var(
|
|
218
|
+
--sui-button-secondary-background-color-pressed,
|
|
219
|
+
var(--sui-primary-accent-color)
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&.tertiary {
|
|
225
|
+
border-width: var(--sui-button-tertiary-border-width, 1px);
|
|
226
|
+
border-style: var(--sui-button-tertiary-border-style, solid);
|
|
227
|
+
border-color: var(--sui-button-tertiary-border-color, var(--sui-button-border-color));
|
|
228
|
+
color: var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));
|
|
229
|
+
background-color: var(
|
|
230
|
+
--sui-button-tertiary-background-color,
|
|
231
|
+
var(--sui-button-background-color)
|
|
232
|
+
);
|
|
233
|
+
font-weight: var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));
|
|
234
|
+
|
|
235
|
+
&:is(:hover, :focus-visible, [aria-expanded='true']) {
|
|
236
|
+
color: var(
|
|
237
|
+
--sui-button-tertiary-foreground-color-focus,
|
|
238
|
+
var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color))
|
|
239
|
+
);
|
|
240
|
+
background-color: var(
|
|
241
|
+
--sui-button-tertiary-background-color-focus,
|
|
242
|
+
var(--sui-hover-background-color)
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&:active {
|
|
247
|
+
color: var(
|
|
248
|
+
--sui-button-tertiary-foreground-color-active,
|
|
249
|
+
var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color))
|
|
250
|
+
);
|
|
251
|
+
background-color: var(
|
|
252
|
+
--sui-button-tertiary-background-color-active,
|
|
253
|
+
var(--sui-active-background-color)
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&[aria-pressed='true'] {
|
|
258
|
+
color: var(--sui-button-tertiary-foreground-color-pressed);
|
|
259
|
+
background-color: var(
|
|
260
|
+
--sui-button-tertiary-background-color-pressed,
|
|
261
|
+
var(--sui-selected-background-color)
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&.ghost {
|
|
267
|
+
font-weight: var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));
|
|
268
|
+
|
|
269
|
+
&:is(:hover, :focus-visible, [aria-expanded='true']) {
|
|
270
|
+
color: var(--sui-button-ghost-foreground-color-focus);
|
|
271
|
+
background-color: var(
|
|
272
|
+
--sui-button-ghost-background-color-focus,
|
|
273
|
+
var(--sui-hover-background-color)
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
&:active {
|
|
278
|
+
color: var(--sui-button-ghost-foreground-color-active);
|
|
279
|
+
background-color: var(
|
|
280
|
+
--sui-button-ghost-background-color-active,
|
|
281
|
+
var(--sui-active-background-color)
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&[aria-pressed='true'] {
|
|
286
|
+
color: var(--sui-button-ghost-foreground-color-pressed);
|
|
287
|
+
background-color: var(
|
|
288
|
+
--sui-button-ghost-background-color-pressed,
|
|
289
|
+
var(--sui-selected-background-color)
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&.link {
|
|
295
|
+
outline: 0;
|
|
296
|
+
margin: 0;
|
|
297
|
+
border-radius: 0 !important;
|
|
298
|
+
padding: 0 !important;
|
|
299
|
+
height: auto !important;
|
|
300
|
+
color: var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));
|
|
301
|
+
|
|
302
|
+
.label {
|
|
303
|
+
padding: 0;
|
|
304
|
+
line-height: var(--sui-line-height-compact);
|
|
305
|
+
text-decoration: var(--sui-button-link-text-decoration, none);
|
|
306
|
+
text-underline-offset: 2px;
|
|
307
|
+
white-space: normal;
|
|
308
|
+
|
|
309
|
+
:global(:is(:root, :host)[data-underline-links='true']) & {
|
|
310
|
+
text-decoration: underline;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&:is(:hover, :focus, :active) {
|
|
315
|
+
.label {
|
|
316
|
+
text-decoration: var(--sui-button-link-text-decoration-focus, underline);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
&.small {
|
|
322
|
+
border-radius: var(--sui-button-small-border-radius);
|
|
323
|
+
padding: var(--sui-button-small-padding);
|
|
324
|
+
height: var(--sui-button-small-height);
|
|
325
|
+
font-size: var(--sui-button-small-font-size, var(--sui-font-size-small));
|
|
326
|
+
|
|
327
|
+
:global {
|
|
328
|
+
.icon {
|
|
329
|
+
font-size: var(--sui-font-size-large);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&.medium {
|
|
335
|
+
border-radius: var(--sui-button-medium-border-radius);
|
|
336
|
+
padding: var(--sui-button-medium-padding);
|
|
337
|
+
height: var(--sui-button-medium-height);
|
|
338
|
+
font-size: var(--sui-button-medium-font-size, var(--sui-font-size-default));
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
&.large {
|
|
342
|
+
border-radius: var(--sui-button-large-border-radius);
|
|
343
|
+
padding: var(--sui-button-large-padding);
|
|
344
|
+
height: var(--sui-button-large-height);
|
|
345
|
+
font-size: var(--sui-button-large-font-size, var(--sui-font-size-large));
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
&.pill {
|
|
349
|
+
border-radius: 80px;
|
|
350
|
+
padding: var(--sui-button-medium-pill-padding, 0 12px);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
&.flex:not([hidden]) {
|
|
354
|
+
display: inline-flex; // Avoid Tailwind .flex class collisions
|
|
355
|
+
flex: auto;
|
|
356
|
+
width: -moz-available;
|
|
357
|
+
width: -webkit-fill-available;
|
|
358
|
+
width: stretch;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
&.iconic {
|
|
362
|
+
justify-content: center;
|
|
363
|
+
padding: 0;
|
|
364
|
+
aspect-ratio: 1 / 1;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
&.danger {
|
|
368
|
+
background-color: var(--sui-error-background-color);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.label {
|
|
372
|
+
padding: 0 4px;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
:global {
|
|
376
|
+
& > * {
|
|
377
|
+
pointer-events: none;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
&:has([slot='start-icon'] + [slot='end-icon']) {
|
|
381
|
+
gap: 0;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
</style>
|
|
@@ -20,23 +20,28 @@
|
|
|
20
20
|
{@render children?.()}
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
|
-
<style
|
|
24
|
-
display: contents;
|
|
25
|
-
}
|
|
26
|
-
@media (width < 768px) {
|
|
23
|
+
<style lang="scss">
|
|
27
24
|
.floating-action-button-wrapper {
|
|
28
|
-
display:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
25
|
+
display: contents;
|
|
26
|
+
|
|
27
|
+
@media (width < 768px) {
|
|
28
|
+
display: block;
|
|
29
|
+
position: fixed;
|
|
30
|
+
inset-inline-end: 16px;
|
|
31
|
+
inset-block-end: 72px;
|
|
32
|
+
z-index: 100;
|
|
33
|
+
|
|
34
|
+
:global {
|
|
35
|
+
button {
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
height: 56px;
|
|
38
|
+
box-shadow: 0 4px 8px #0006;
|
|
39
|
+
|
|
40
|
+
.icon {
|
|
41
|
+
font-size: 32px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
41
46
|
}
|
|
42
|
-
|
|
47
|
+
</style>
|
|
@@ -65,45 +65,61 @@
|
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
67
67
|
|
|
68
|
-
<style
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
.select-button-group:focus-visible {
|
|
75
|
-
outline-width: 0 !important;
|
|
76
|
-
}
|
|
77
|
-
.select-button-group :global(button) {
|
|
78
|
-
margin: 0 !important;
|
|
79
|
-
border-radius: 0 !important;
|
|
80
|
-
color: var(--sui-primary-foreground-color);
|
|
81
|
-
}
|
|
82
|
-
.select-button-group :global(button:first-child) {
|
|
83
|
-
border-start-start-radius: 4px !important;
|
|
84
|
-
border-end-start-radius: 4px !important;
|
|
85
|
-
}
|
|
86
|
-
.select-button-group :global(button:not(:first-child)) {
|
|
87
|
-
border-inline-start-width: 0;
|
|
88
|
-
}
|
|
89
|
-
.select-button-group :global(button:last-child) {
|
|
90
|
-
border-start-end-radius: 4px !important;
|
|
91
|
-
border-end-end-radius: 4px !important;
|
|
92
|
-
}
|
|
93
|
-
.select-button-group :global(button[aria-checked=true]) {
|
|
94
|
-
color: var(--sui-highlight-foreground-color);
|
|
95
|
-
background-color: var(--sui-selected-background-color);
|
|
96
|
-
}
|
|
97
|
-
.select-button-group :global([aria-invalid=true]) :global(button) {
|
|
98
|
-
border-color: var(--sui-error-border-color);
|
|
99
|
-
}
|
|
100
|
-
.select-button-group :global([aria-disabled=false]) :global(button[aria-disabled=true]) {
|
|
101
|
-
filter: grayscale(0) opacity(1);
|
|
102
|
-
}
|
|
103
|
-
.select-button-group :global([aria-disabled=false]) :global(button[aria-disabled=true]) :global(*) {
|
|
104
|
-
filter: grayscale(1) opacity(0.35);
|
|
105
|
-
}
|
|
68
|
+
<style lang="scss">
|
|
69
|
+
.select-button-group {
|
|
70
|
+
flex: none;
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
margin: var(--sui-focus-ring-width);
|
|
106
74
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
75
|
+
&:focus-visible {
|
|
76
|
+
outline-width: 0 !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:global {
|
|
80
|
+
button {
|
|
81
|
+
margin: 0 !important;
|
|
82
|
+
border-radius: 0 !important;
|
|
83
|
+
color: var(--sui-primary-foreground-color);
|
|
84
|
+
|
|
85
|
+
&:first-child {
|
|
86
|
+
border-start-start-radius: 4px !important;
|
|
87
|
+
border-end-start-radius: 4px !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:not(:first-child) {
|
|
91
|
+
border-inline-start-width: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:last-child {
|
|
95
|
+
border-start-end-radius: 4px !important;
|
|
96
|
+
border-end-end-radius: 4px !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&[aria-checked='true'] {
|
|
100
|
+
color: var(--sui-highlight-foreground-color);
|
|
101
|
+
background-color: var(--sui-selected-background-color);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[aria-invalid='true'] button {
|
|
106
|
+
border-color: var(--sui-error-border-color);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Maintain the border opacity
|
|
110
|
+
&[aria-disabled='false'] {
|
|
111
|
+
button[aria-disabled='true'] {
|
|
112
|
+
filter: grayscale(0) opacity(1);
|
|
113
|
+
|
|
114
|
+
* {
|
|
115
|
+
filter: grayscale(1) opacity(0.35);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.inner {
|
|
123
|
+
display: contents;
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
@@ -82,21 +82,28 @@
|
|
|
82
82
|
</MenuButton>
|
|
83
83
|
</div>
|
|
84
84
|
|
|
85
|
-
<style
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
85
|
+
<style lang="scss">
|
|
86
|
+
.split-button {
|
|
87
|
+
flex: none;
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
margin: var(--sui-focus-ring-width);
|
|
90
|
+
|
|
91
|
+
:global {
|
|
92
|
+
button {
|
|
93
|
+
margin: 0;
|
|
94
|
+
|
|
95
|
+
&.menu-button {
|
|
96
|
+
border-inline-start-width: 0;
|
|
97
|
+
border-start-start-radius: 0;
|
|
98
|
+
border-end-start-radius: 0;
|
|
99
|
+
aspect-ratio: 3 / 4;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:not(.menu-button) {
|
|
103
|
+
border-start-end-radius: 0;
|
|
104
|
+
border-end-end-radius: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
</style>
|