@sveltia/ui 0.42.0 → 0.42.1

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 (72) hide show
  1. package/dist/components/alert/alert.svelte +30 -36
  2. package/dist/components/alert/infobar.svelte +45 -55
  3. package/dist/components/bottom-navigation/bottom-navigation.svelte +15 -21
  4. package/dist/components/button/button-group.svelte +5 -7
  5. package/dist/components/button/button.svelte +175 -274
  6. package/dist/components/button/floating-action-button-wrapper.svelte +18 -23
  7. package/dist/components/button/select-button-group.svelte +41 -57
  8. package/dist/components/button/split-button.svelte +18 -25
  9. package/dist/components/calendar/calendar.svelte +80 -103
  10. package/dist/components/checkbox/checkbox-group.svelte +19 -22
  11. package/dist/components/checkbox/checkbox.svelte +63 -91
  12. package/dist/components/dialog/dialog.svelte +87 -105
  13. package/dist/components/dialog/prompt-dialog.svelte +3 -5
  14. package/dist/components/disclosure/disclosure.svelte +21 -34
  15. package/dist/components/divider/divider.svelte +14 -18
  16. package/dist/components/divider/spacer.svelte +8 -13
  17. package/dist/components/drawer/drawer.svelte +190 -343
  18. package/dist/components/grid/grid-body.svelte +14 -16
  19. package/dist/components/grid/grid-cell.svelte +3 -5
  20. package/dist/components/grid/grid-col-header.svelte +3 -5
  21. package/dist/components/grid/grid-foot.svelte +3 -5
  22. package/dist/components/grid/grid-head.svelte +3 -5
  23. package/dist/components/grid/grid-row-header.svelte +4 -6
  24. package/dist/components/grid/grid-row.svelte +4 -6
  25. package/dist/components/grid/grid.svelte +12 -18
  26. package/dist/components/icon/icon.svelte +5 -7
  27. package/dist/components/listbox/listbox.svelte +61 -78
  28. package/dist/components/listbox/option-group.svelte +11 -15
  29. package/dist/components/listbox/option.svelte +39 -54
  30. package/dist/components/menu/menu-item-group.svelte +3 -5
  31. package/dist/components/menu/menu-item.svelte +51 -67
  32. package/dist/components/menu/menu.svelte +17 -21
  33. package/dist/components/progressbar/progressbar.svelte +15 -24
  34. package/dist/components/radio/radio-group.svelte +31 -40
  35. package/dist/components/radio/radio.svelte +63 -81
  36. package/dist/components/resizable-pane/resizable-handle.svelte +48 -60
  37. package/dist/components/resizable-pane/resizable-pane-group.svelte +14 -18
  38. package/dist/components/select/combobox.svelte +112 -135
  39. package/dist/components/select/select-tags.svelte +57 -73
  40. package/dist/components/slider/slider.svelte +74 -94
  41. package/dist/components/switch/switch.svelte +81 -115
  42. package/dist/components/table/table-body.svelte +14 -16
  43. package/dist/components/table/table-cell.svelte +3 -5
  44. package/dist/components/table/table-col-header.svelte +3 -5
  45. package/dist/components/table/table-foot.svelte +3 -5
  46. package/dist/components/table/table-head.svelte +3 -5
  47. package/dist/components/table/table-row-header.svelte +4 -6
  48. package/dist/components/table/table-row.svelte +4 -6
  49. package/dist/components/table/table.svelte +12 -18
  50. package/dist/components/tabs/tab-box.svelte +6 -9
  51. package/dist/components/tabs/tab-list.svelte +73 -91
  52. package/dist/components/tabs/tab-panel.svelte +7 -11
  53. package/dist/components/tabs/tab-panels.svelte +14 -19
  54. package/dist/components/text-editor/code-editor.svelte +7 -10
  55. package/dist/components/text-editor/lexical-root.svelte +160 -221
  56. package/dist/components/text-editor/text-editor.svelte +18 -25
  57. package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +37 -44
  58. package/dist/components/text-field/number-input.svelte +68 -87
  59. package/dist/components/text-field/password-input.svelte +42 -52
  60. package/dist/components/text-field/search-bar.svelte +53 -64
  61. package/dist/components/text-field/secret-input.svelte +46 -61
  62. package/dist/components/text-field/text-area.svelte +68 -80
  63. package/dist/components/text-field/text-input.svelte +106 -138
  64. package/dist/components/toast/toast.svelte +89 -104
  65. package/dist/components/toolbar/toolbar.svelte +54 -70
  66. package/dist/components/typography/truncated-text.svelte +7 -9
  67. package/dist/components/util/app-shell.svelte +493 -35
  68. package/dist/components/util/empty-state.svelte +11 -13
  69. package/dist/components/util/group.svelte +3 -5
  70. package/dist/components/util/modal.svelte +48 -59
  71. package/dist/components/util/popup.svelte +67 -87
  72. package/package.json +1 -1
@@ -80,87 +80,75 @@
80
80
  {/if}
81
81
  </div>
82
82
 
83
- <style lang="scss">
84
- .text-area {
85
- display: inline-grid;
86
- margin: var(--sui-focus-ring-width);
87
- min-width: var(--sui-textbox-multiline-min-width);
83
+ <style>.text-area {
84
+ display: inline-grid;
85
+ margin: var(--sui-focus-ring-width);
86
+ min-width: var(--sui-textbox-multiline-min-width);
87
+ }
88
+ .text-area[hidden] {
89
+ display: none;
90
+ }
91
+ .text-area.flex:not([hidden]) {
92
+ display: inline-grid;
93
+ width: -moz-available;
94
+ width: -webkit-fill-available;
95
+ width: stretch;
96
+ min-width: 0;
97
+ }
88
98
 
89
- &[hidden] {
90
- display: none;
91
- }
99
+ :is(textarea, .clone) {
100
+ grid-area: 1/1/2/2;
101
+ display: block;
102
+ margin: 0;
103
+ border-width: var(--sui-textbox-border-width, 1px);
104
+ border-color: var(--sui-textbox-border-color);
105
+ border-radius: var(--sui-textbox-border-radius);
106
+ padding: var(--sui-textbox-multiline-padding);
107
+ width: 100%;
108
+ min-height: 8em;
109
+ color: var(--sui-textbox-foreground-color);
110
+ background-color: var(--sui-textbox-background-color);
111
+ font-family: var(--sui-textbox-font-family);
112
+ font-size: var(--sui-textbox-font-size);
113
+ line-height: var(--sui-textbox-multiline-line-height);
114
+ font-weight: var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));
115
+ text-align: var(--sui-textbox-text-align, start);
116
+ text-indent: var(--sui-textbox-text-indent, 0);
117
+ text-transform: var(--sui-textbox-text-transform, none);
118
+ letter-spacing: var(--sui-textbox-letter-spacing, normal);
119
+ word-spacing: var(--sui-word-spacing-normal, normal);
120
+ transition: all 200ms;
121
+ }
122
+ :is(textarea, .clone).resizing {
123
+ transition-duration: 0ms;
124
+ }
125
+ :is(textarea, .clone):focus {
126
+ border-color: var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));
127
+ color: var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));
128
+ background-color: var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));
129
+ }
130
+ :is(textarea, .clone):is(:disabled, :read-only) {
131
+ background-color: var(--sui-disabled-background-color);
132
+ }
92
133
 
93
- &.flex:not([hidden]) {
94
- display: inline-grid; // Avoid Tailwind .flex class collisions
95
- width: -moz-available;
96
- width: -webkit-fill-available;
97
- width: stretch;
98
- min-width: 0;
99
- }
100
- }
134
+ textarea {
135
+ resize: vertical;
136
+ }
137
+ textarea.auto-resize {
138
+ overflow: hidden;
139
+ resize: none;
140
+ }
141
+ textarea[aria-invalid=true] {
142
+ border-color: var(--sui-error-border-color);
143
+ }
101
144
 
102
- :is(textarea, .clone) {
103
- grid-area: 1 / 1 / 2 / 2;
104
- display: block;
105
- margin: 0;
106
- border-width: var(--sui-textbox-border-width, 1px);
107
- border-color: var(--sui-textbox-border-color);
108
- border-radius: var(--sui-textbox-border-radius);
109
- padding: var(--sui-textbox-multiline-padding);
110
- width: 100%;
111
- min-height: 8em;
112
- color: var(--sui-textbox-foreground-color);
113
- background-color: var(--sui-textbox-background-color);
114
- font-family: var(--sui-textbox-font-family);
115
- font-size: var(--sui-textbox-font-size);
116
- line-height: var(--sui-textbox-multiline-line-height);
117
- font-weight: var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));
118
- text-align: var(--sui-textbox-text-align, start);
119
- text-indent: var(--sui-textbox-text-indent, 0);
120
- text-transform: var(--sui-textbox-text-transform, none);
121
- letter-spacing: var(--sui-textbox-letter-spacing, normal);
122
- word-spacing: var(--sui-word-spacing-normal, normal);
123
- transition: all 200ms;
145
+ .clone {
146
+ overflow: hidden;
147
+ visibility: hidden;
148
+ }
124
149
 
125
- &.resizing {
126
- transition-duration: 0ms;
127
- }
128
-
129
- &:focus {
130
- border-color: var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));
131
- color: var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));
132
- background-color: var(
133
- --sui-textbox-background-color-focus,
134
- var(--sui-textbox-background-color)
135
- );
136
- }
137
-
138
- &:is(:disabled, :read-only) {
139
- background-color: var(--sui-disabled-background-color);
140
- }
141
- }
142
-
143
- textarea {
144
- resize: vertical;
145
-
146
- &.auto-resize {
147
- overflow: hidden;
148
- resize: none;
149
- }
150
-
151
- &[aria-invalid='true'] {
152
- border-color: var(--sui-error-border-color);
153
- }
154
- }
155
-
156
- .clone {
157
- overflow: hidden;
158
- visibility: hidden;
159
- }
160
-
161
- textarea,
162
- .clone {
163
- white-space: pre-wrap;
164
- word-break: break-all;
165
- }
166
- </style>
150
+ textarea,
151
+ .clone {
152
+ white-space: pre-wrap;
153
+ word-break: break-all;
154
+ }</style>
@@ -127,141 +127,109 @@
127
127
  {/if}
128
128
  </div>
129
129
 
130
- <style lang="scss">
131
- .text-input {
132
- display: inline-flex;
133
- align-items: center;
134
- position: relative;
135
- margin: var(--sui-focus-ring-width);
136
- min-width: var(--sui-textbox-singleline-min-width);
137
-
138
- &.flex:not([hidden]) {
139
- display: inline-flex; // Avoid Tailwind .flex class collisions
140
- width: -moz-available;
141
- width: -webkit-fill-available;
142
- width: stretch;
143
- min-width: 0;
144
- }
145
-
146
- &.monospace {
147
- --sui-textbox-font-family: var(--sui-font-family-monospace, monospace);
148
- }
149
- }
150
-
151
- // https://stackoverflow.com/a/68240841
152
- input:is(:-webkit-autofill, :-webkit-autofill:focus) {
153
- transition:
154
- background-color 0s 600000s,
155
- color 0s 600000s;
156
- }
157
-
158
- input {
159
- display: inline-block;
160
- flex: auto;
161
- border-width: var(--sui-textbox-border-width, 1px);
162
- border-color: var(--sui-textbox-border-color);
163
- border-radius: var(--sui-textbox-border-radius);
164
- padding: var(--sui-textbox-singleline-padding);
165
- min-width: 0;
166
- height: var(--sui-textbox-height);
167
- color: var(--sui-textbox-foreground-color);
168
- background-color: var(--sui-textbox-background-color);
169
- font-family: var(--sui-textbox-font-family);
170
- font-size: var(--sui-textbox-font-size);
171
- line-height: var(--sui-textbox-singleline-line-height);
172
- font-weight: var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));
173
- text-align: var(--sui-textbox-text-align, start);
174
- text-indent: var(--sui-textbox-text-indent, 0);
175
- text-transform: var(--sui-textbox-text-transform, none);
176
- letter-spacing: var(--sui-textbox-letter-spacing, normal);
177
- word-spacing: var(--sui-word-spacing-normal, normal);
178
- transition: all 200ms;
179
-
180
- &:focus {
181
- border-color: var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));
182
- color: var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));
183
- background-color: var(
184
- --sui-textbox-background-color-focus,
185
- var(--sui-textbox-background-color)
186
- );
187
- }
188
-
189
- &:read-only {
190
- color: var(--sui-tertiary-foreground-color);
191
- border-color: var(--sui-textbox-border-color) !important;
192
- }
193
-
194
- &:is(:disabled, :read-only) {
195
- background-color: var(--sui-disabled-background-color);
196
- }
197
-
198
- &[aria-invalid='true'] {
199
- border-color: var(--sui-error-border-color);
200
- }
201
-
202
- :global {
203
- & ~ button {
204
- flex: none;
205
- margin-inline-start: -1px;
206
- border-width: 1px;
207
- border-color: var(--sui-textbox-border-color);
208
- height: var(--sui-textbox-height);
209
- aspect-ratio: 1 / 1;
210
-
211
- &:last-child {
212
- border-start-start-radius: 0;
213
- border-start-end-radius: 4px;
214
- border-end-end-radius: 4px;
215
- border-end-start-radius: 0;
216
- }
217
-
218
- .icon {
219
- font-size: var(--sui-font-size-xx-large);
220
- }
221
- }
222
- }
223
- }
224
-
225
- .label {
226
- position: absolute;
227
- inset: var(--sui-textbox-singleline-padding);
228
- z-index: 2;
229
- display: flex;
230
- align-items: center;
231
- justify-content: var(
232
- --sui-textbox-placeholder-text-align,
233
- var(--sui-textbox-text-align, start)
234
- );
235
- pointer-events: none;
236
-
237
- &.hidden {
238
- opacity: 0;
239
- }
240
- }
241
-
242
- input:focus + .label {
243
- opacity: 0;
244
- }
245
-
246
- input::placeholder,
247
- .label {
248
- color: var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));
249
- opacity: var(--sui-textbox-placeholder-opacity, 0.5);
250
- font-family: var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));
251
- font-size: var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));
252
- line-height: var(
253
- --sui-textbox-placeholder-singleline-line-height,
254
- var(--sui-textbox-singleline-line-height)
255
- );
256
- font-weight: var(
257
- --sui-textbox-placeholder-font-weight,
258
- var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal))
259
- );
260
- text-align: var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));
261
- text-indent: var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));
262
- letter-spacing: var(
263
- --sui-textbox-placeholder-letter-spacing,
264
- var(--sui-textbox-letter-spacing, normal)
265
- );
266
- }
267
- </style>
130
+ <style>.text-input {
131
+ display: inline-flex;
132
+ align-items: center;
133
+ position: relative;
134
+ margin: var(--sui-focus-ring-width);
135
+ min-width: var(--sui-textbox-singleline-min-width);
136
+ }
137
+ .text-input.flex:not([hidden]) {
138
+ display: inline-flex;
139
+ width: -moz-available;
140
+ width: -webkit-fill-available;
141
+ width: stretch;
142
+ min-width: 0;
143
+ }
144
+ .text-input.monospace {
145
+ --sui-textbox-font-family: var(--sui-font-family-monospace, monospace);
146
+ }
147
+
148
+ input:is(:-webkit-autofill, :-webkit-autofill:focus) {
149
+ transition: background-color 0s 600000s, color 0s 600000s;
150
+ }
151
+
152
+ input {
153
+ display: inline-block;
154
+ flex: auto;
155
+ border-width: var(--sui-textbox-border-width, 1px);
156
+ border-color: var(--sui-textbox-border-color);
157
+ border-radius: var(--sui-textbox-border-radius);
158
+ padding: var(--sui-textbox-singleline-padding);
159
+ min-width: 0;
160
+ height: var(--sui-textbox-height);
161
+ color: var(--sui-textbox-foreground-color);
162
+ background-color: var(--sui-textbox-background-color);
163
+ font-family: var(--sui-textbox-font-family);
164
+ font-size: var(--sui-textbox-font-size);
165
+ line-height: var(--sui-textbox-singleline-line-height);
166
+ font-weight: var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));
167
+ text-align: var(--sui-textbox-text-align, start);
168
+ text-indent: var(--sui-textbox-text-indent, 0);
169
+ text-transform: var(--sui-textbox-text-transform, none);
170
+ letter-spacing: var(--sui-textbox-letter-spacing, normal);
171
+ word-spacing: var(--sui-word-spacing-normal, normal);
172
+ transition: all 200ms;
173
+ }
174
+ input:focus {
175
+ border-color: var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));
176
+ color: var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));
177
+ background-color: var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));
178
+ }
179
+ input:read-only {
180
+ color: var(--sui-tertiary-foreground-color);
181
+ border-color: var(--sui-textbox-border-color) !important;
182
+ }
183
+ input:is(:disabled, :read-only) {
184
+ background-color: var(--sui-disabled-background-color);
185
+ }
186
+ input[aria-invalid=true] {
187
+ border-color: var(--sui-error-border-color);
188
+ }
189
+ input ~ :global(button) {
190
+ flex: none;
191
+ margin-inline-start: -1px;
192
+ border-width: 1px;
193
+ border-color: var(--sui-textbox-border-color);
194
+ height: var(--sui-textbox-height);
195
+ aspect-ratio: 1/1;
196
+ }
197
+ input ~ :global(button:last-child) {
198
+ border-start-start-radius: 0;
199
+ border-start-end-radius: 4px;
200
+ border-end-end-radius: 4px;
201
+ border-end-start-radius: 0;
202
+ }
203
+ input ~ :global(button) :global(.icon) {
204
+ font-size: var(--sui-font-size-xx-large);
205
+ }
206
+
207
+ .label {
208
+ position: absolute;
209
+ inset: var(--sui-textbox-singleline-padding);
210
+ z-index: 2;
211
+ display: flex;
212
+ align-items: center;
213
+ justify-content: var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));
214
+ pointer-events: none;
215
+ }
216
+ .label.hidden {
217
+ opacity: 0;
218
+ }
219
+
220
+ input:focus + .label {
221
+ opacity: 0;
222
+ }
223
+
224
+ input::placeholder,
225
+ .label {
226
+ color: var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));
227
+ opacity: var(--sui-textbox-placeholder-opacity, 0.5);
228
+ font-family: var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));
229
+ font-size: var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));
230
+ line-height: var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));
231
+ font-weight: var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal)));
232
+ text-align: var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));
233
+ text-indent: var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));
234
+ letter-spacing: var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal));
235
+ }</style>
@@ -137,107 +137,92 @@
137
137
  {@render children?.()}
138
138
  </div>
139
139
 
140
- <style lang="scss">
141
- .toast-base {
142
- position: fixed;
143
- inset: 16px;
144
- z-index: 99999;
145
- display: flex;
146
- flex-direction: column;
147
- justify-content: flex-end;
148
- align-items: flex-end;
149
- gap: 8px;
150
- margin: 0;
151
- border: 0;
152
- padding: 0;
153
- width: auto;
154
- height: auto;
155
- background-color: transparent;
156
- font-family: var(--sui-font-family-default);
157
- font-size: var(--sui-font-size-default);
158
- font-weight: var(--sui-font-weight-normal, normal);
159
- text-align: center;
160
- pointer-events: none;
161
- -webkit-user-select: none;
162
- user-select: none;
163
- }
164
-
165
- :global {
166
- body:has(.sui.bottom-navigation:not([inert]:not([hidden]))) .toast-base {
167
- bottom: calc(var(--sui-bottom-navigation-height) + 16px);
168
- }
169
- }
170
-
171
- .toast {
172
- position: absolute;
173
- width: max-content;
174
- max-width: 80dvw;
175
- box-shadow: 0 8px 16px var(--sui-popup-shadow-color);
176
- opacity: 1;
177
- transition-duration: 250ms;
178
- will-change: opacity;
179
-
180
- &[aria-hidden='true'] {
181
- display: block;
182
- opacity: 0;
183
- }
184
-
185
- &.top-left {
186
- inset-block-start: 0;
187
- inset-block-end: auto;
188
- inset-inline-start: 0;
189
- inset-inline-end: auto;
190
- }
191
-
192
- &.top-center {
193
- inset-block-start: 0;
194
- inset-block-end: auto;
195
- inset-inline-start: 50%;
196
- inset-inline-end: auto;
197
-
198
- &:dir(ltr) {
199
- transform: translateX(-50%);
200
- }
201
-
202
- &:dir(rtl) {
203
- transform: translateX(50%);
204
- }
205
- }
206
-
207
- &.top-right {
208
- inset-block-start: 0;
209
- inset-block-end: auto;
210
- inset-inline-start: auto;
211
- inset-inline-end: 0;
212
- }
213
-
214
- &.bottom-left {
215
- inset-block-start: auto;
216
- inset-block-end: 0;
217
- inset-inline-start: 0;
218
- inset-inline-end: auto;
219
- }
220
-
221
- &.bottom-center {
222
- inset-block-start: auto;
223
- inset-block-end: 0;
224
- inset-inline-start: 50%;
225
- inset-inline-end: auto;
226
-
227
- &:dir(ltr) {
228
- transform: translateX(-50%);
229
- }
230
-
231
- &:dir(rtl) {
232
- transform: translateX(50%);
233
- }
234
- }
235
-
236
- &.bottom-right {
237
- inset-block-start: auto;
238
- inset-block-end: 0;
239
- inset-inline-start: auto;
240
- inset-inline-end: 0;
241
- }
242
- }
243
- </style>
140
+ <style>.toast-base {
141
+ position: fixed;
142
+ inset: 16px;
143
+ z-index: 99999;
144
+ display: flex;
145
+ flex-direction: column;
146
+ justify-content: flex-end;
147
+ align-items: flex-end;
148
+ gap: 8px;
149
+ margin: 0;
150
+ border: 0;
151
+ padding: 0;
152
+ width: auto;
153
+ height: auto;
154
+ background-color: transparent;
155
+ font-family: var(--sui-font-family-default);
156
+ font-size: var(--sui-font-size-default);
157
+ font-weight: var(--sui-font-weight-normal, normal);
158
+ text-align: center;
159
+ pointer-events: none;
160
+ -webkit-user-select: none;
161
+ user-select: none;
162
+ }
163
+
164
+ :global(body:has(.sui.bottom-navigation:not([inert]:not([hidden])))) :global(.toast-base) {
165
+ bottom: calc(var(--sui-bottom-navigation-height) + 16px);
166
+ }
167
+
168
+ .toast {
169
+ position: absolute;
170
+ width: max-content;
171
+ max-width: 80dvw;
172
+ box-shadow: 0 8px 16px var(--sui-popup-shadow-color);
173
+ opacity: 1;
174
+ transition-duration: 250ms;
175
+ will-change: opacity;
176
+ }
177
+ .toast[aria-hidden=true] {
178
+ display: block;
179
+ opacity: 0;
180
+ }
181
+ .toast.top-left {
182
+ inset-block-start: 0;
183
+ inset-block-end: auto;
184
+ inset-inline-start: 0;
185
+ inset-inline-end: auto;
186
+ }
187
+ .toast.top-center {
188
+ inset-block-start: 0;
189
+ inset-block-end: auto;
190
+ inset-inline-start: 50%;
191
+ inset-inline-end: auto;
192
+ }
193
+ .toast.top-center:dir(ltr) {
194
+ transform: translateX(-50%);
195
+ }
196
+ .toast.top-center:dir(rtl) {
197
+ transform: translateX(50%);
198
+ }
199
+ .toast.top-right {
200
+ inset-block-start: 0;
201
+ inset-block-end: auto;
202
+ inset-inline-start: auto;
203
+ inset-inline-end: 0;
204
+ }
205
+ .toast.bottom-left {
206
+ inset-block-start: auto;
207
+ inset-block-end: 0;
208
+ inset-inline-start: 0;
209
+ inset-inline-end: auto;
210
+ }
211
+ .toast.bottom-center {
212
+ inset-block-start: auto;
213
+ inset-block-end: 0;
214
+ inset-inline-start: 50%;
215
+ inset-inline-end: auto;
216
+ }
217
+ .toast.bottom-center:dir(ltr) {
218
+ transform: translateX(-50%);
219
+ }
220
+ .toast.bottom-center:dir(rtl) {
221
+ transform: translateX(50%);
222
+ }
223
+ .toast.bottom-right {
224
+ inset-block-start: auto;
225
+ inset-block-end: 0;
226
+ inset-inline-start: auto;
227
+ inset-inline-end: 0;
228
+ }</style>