@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
|
@@ -80,75 +80,87 @@
|
|
|
80
80
|
{/if}
|
|
81
81
|
</div>
|
|
82
82
|
|
|
83
|
-
<style
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
}
|
|
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);
|
|
98
88
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
}
|
|
89
|
+
&[hidden] {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
133
92
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
border-color: var(--sui-error-border-color);
|
|
143
|
-
}
|
|
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
|
+
}
|
|
144
101
|
|
|
145
|
-
.clone {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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;
|
|
149
124
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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>
|
|
@@ -127,109 +127,141 @@
|
|
|
127
127
|
{/if}
|
|
128
128
|
</div>
|
|
129
129
|
|
|
130
|
-
<style
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
input {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
.label {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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>
|
|
@@ -137,92 +137,107 @@
|
|
|
137
137
|
{@render children?.()}
|
|
138
138
|
</div>
|
|
139
139
|
|
|
140
|
-
<style
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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>
|