@sveltia/ui 0.10.1 → 0.10.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.
- package/package/components/button/button.svelte +24 -23
- package/package/components/dialog/dialog.svelte +8 -8
- package/package/components/drawer/drawer.svelte +28 -18
- package/package/components/text-field/text-area.svelte +4 -2
- package/package/components/text-field/text-input.svelte +21 -17
- package/package.json +1 -1
|
@@ -231,12 +231,12 @@ button:global(.primary) {
|
|
|
231
231
|
font-weight: var(--sui-button-primary-font-weight, normal);
|
|
232
232
|
}
|
|
233
233
|
button:global(.primary):hover, button:global(.primary):focus-visible, button:global(.primary)[aria-expanded=true] {
|
|
234
|
-
color: var(--sui-button-primary-foreground-color-focus
|
|
235
|
-
background-color: var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light
|
|
234
|
+
color: var(--sui-button-primary-foreground-color-focus);
|
|
235
|
+
background-color: var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));
|
|
236
236
|
}
|
|
237
237
|
button:global(.primary):active {
|
|
238
|
-
color: var(--sui-button-primary-foreground-color-active
|
|
239
|
-
background-color: var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark
|
|
238
|
+
color: var(--sui-button-primary-foreground-color-active);
|
|
239
|
+
background-color: var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));
|
|
240
240
|
}
|
|
241
241
|
button:global(.secondary) {
|
|
242
242
|
border-width: var(--sui-button-secondary-border-width, 1px);
|
|
@@ -247,16 +247,16 @@ button:global(.secondary) {
|
|
|
247
247
|
font-weight: var(--sui-button-secondary-font-weight, normal);
|
|
248
248
|
}
|
|
249
249
|
button:global(.secondary):hover, button:global(.secondary):focus-visible, button:global(.secondary)[aria-expanded=true] {
|
|
250
|
-
color: var(--sui-button-secondary-foreground-color-focus
|
|
251
|
-
background-color: var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color
|
|
250
|
+
color: var(--sui-button-secondary-foreground-color-focus);
|
|
251
|
+
background-color: var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));
|
|
252
252
|
}
|
|
253
253
|
button:global(.secondary):active {
|
|
254
|
-
color: var(--sui-button-secondary-foreground-color-active
|
|
254
|
+
color: var(--sui-button-secondary-foreground-color-active);
|
|
255
255
|
background-color: var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));
|
|
256
256
|
}
|
|
257
257
|
button:global(.secondary)[aria-pressed=true] {
|
|
258
|
-
color: var(--sui-button-secondary-foreground-color-pressed
|
|
259
|
-
background-color: var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color
|
|
258
|
+
color: var(--sui-button-secondary-foreground-color-pressed);
|
|
259
|
+
background-color: var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));
|
|
260
260
|
}
|
|
261
261
|
button:global(.tertiary) {
|
|
262
262
|
border-width: var(--sui-button-tertiary-border-width, 1px);
|
|
@@ -267,31 +267,31 @@ button:global(.tertiary) {
|
|
|
267
267
|
font-weight: var(--sui-button-tertiary-font-weight, normal);
|
|
268
268
|
}
|
|
269
269
|
button:global(.tertiary):hover, button:global(.tertiary):focus-visible, button:global(.tertiary)[aria-expanded=true] {
|
|
270
|
-
color: var(--sui-button-tertiary-foreground-color-focus
|
|
271
|
-
background-color: var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color
|
|
270
|
+
color: var(--sui-button-tertiary-foreground-color-focus);
|
|
271
|
+
background-color: var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));
|
|
272
272
|
}
|
|
273
273
|
button:global(.tertiary):active {
|
|
274
|
-
color: var(--sui-button-tertiary-foreground-color-active
|
|
275
|
-
background-color: var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color
|
|
274
|
+
color: var(--sui-button-tertiary-foreground-color-active);
|
|
275
|
+
background-color: var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));
|
|
276
276
|
}
|
|
277
277
|
button:global(.tertiary)[aria-pressed=true] {
|
|
278
|
-
color: var(--sui-button-tertiary-foreground-color-pressed
|
|
279
|
-
background-color: var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color
|
|
278
|
+
color: var(--sui-button-tertiary-foreground-color-pressed);
|
|
279
|
+
background-color: var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));
|
|
280
280
|
}
|
|
281
281
|
button:global(.ghost) {
|
|
282
282
|
font-weight: var(--sui-button-ghost-font-weight, normal);
|
|
283
283
|
}
|
|
284
284
|
button:global(.ghost):hover, button:global(.ghost):focus-visible, button:global(.ghost)[aria-expanded=true] {
|
|
285
|
-
color: var(--sui-button-ghost-foreground-color-focus
|
|
286
|
-
background-color: var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color
|
|
285
|
+
color: var(--sui-button-ghost-foreground-color-focus);
|
|
286
|
+
background-color: var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));
|
|
287
287
|
}
|
|
288
288
|
button:global(.ghost):active {
|
|
289
|
-
color: var(--sui-button-ghost-foreground-color-active
|
|
290
|
-
background-color: var(--sui-button-ghost-background-color-active, var(--sui-active-background-color
|
|
289
|
+
color: var(--sui-button-ghost-foreground-color-active);
|
|
290
|
+
background-color: var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));
|
|
291
291
|
}
|
|
292
292
|
button:global(.ghost)[aria-pressed=true] {
|
|
293
|
-
color: var(--sui-button-ghost-foreground-color-pressed
|
|
294
|
-
background-color: var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color
|
|
293
|
+
color: var(--sui-button-ghost-foreground-color-pressed);
|
|
294
|
+
background-color: var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));
|
|
295
295
|
}
|
|
296
296
|
button:global(.link) {
|
|
297
297
|
outline: 0;
|
|
@@ -299,15 +299,16 @@ button:global(.link) {
|
|
|
299
299
|
border-radius: 0 !important;
|
|
300
300
|
padding: 0 !important;
|
|
301
301
|
height: auto !important;
|
|
302
|
-
color: var(--sui-primary-accent-color-text);
|
|
302
|
+
color: var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));
|
|
303
303
|
}
|
|
304
304
|
button:global(.link) :global(.label) {
|
|
305
305
|
padding: 0;
|
|
306
306
|
line-height: var(--sui-line-height-compact);
|
|
307
|
+
text-decoration: var(--sui-button-link-text-decoration, none);
|
|
307
308
|
white-space: normal;
|
|
308
309
|
}
|
|
309
310
|
button:global(.link):hover :global(.label), button:global(.link):focus :global(.label), button:global(.link):active :global(.label) {
|
|
310
|
-
text-decoration: underline;
|
|
311
|
+
text-decoration: var(--sui-button-link-text-decoration-focus, underline);
|
|
311
312
|
}
|
|
312
313
|
button:global(.small) {
|
|
313
314
|
border-radius: var(--sui-button-small-border-radius);
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
transform: scale(90%);
|
|
201
201
|
}
|
|
202
202
|
.content.small {
|
|
203
|
-
width: 400px;
|
|
204
|
-
max-height: 400px;
|
|
203
|
+
width: var(--sui-dialog-small-content-width, 400px);
|
|
204
|
+
max-height: var(--sui-dialog-small-content-max-height, 400px);
|
|
205
205
|
}
|
|
206
206
|
@media (max-height: 400px) {
|
|
207
207
|
.content.small {
|
|
@@ -209,8 +209,8 @@
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
.content.medium {
|
|
212
|
-
width: 600px;
|
|
213
|
-
max-height: 600px;
|
|
212
|
+
width: var(--sui-dialog-medium-content-width, 600px);
|
|
213
|
+
max-height: var(--sui-dialog-medium-content-max-height, 600px);
|
|
214
214
|
}
|
|
215
215
|
@media (max-height: 600px) {
|
|
216
216
|
.content.medium {
|
|
@@ -218,8 +218,8 @@
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
.content.large {
|
|
221
|
-
width: 800px;
|
|
222
|
-
max-height: 800px;
|
|
221
|
+
width: var(--sui-dialog-large-content-width, 800px);
|
|
222
|
+
max-height: var(--sui-dialog-large-content-max-height, 800px);
|
|
223
223
|
}
|
|
224
224
|
@media (max-height: 800px) {
|
|
225
225
|
.content.large {
|
|
@@ -227,8 +227,8 @@
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
.content.x-large {
|
|
230
|
-
width: 1000px;
|
|
231
|
-
max-height: 1000px;
|
|
230
|
+
width: var(--sui-dialog-x-large-content-width, 1000px);
|
|
231
|
+
max-height: var(--sui-dialog-x-large-content-max-height, 1000px);
|
|
232
232
|
}
|
|
233
233
|
@media (max-height: 1000px) {
|
|
234
234
|
.content.x-large {
|
|
@@ -174,6 +174,9 @@
|
|
|
174
174
|
inset: 0 0 0 auto;
|
|
175
175
|
border-radius: var(--sui-drawer-right-content-border-radius, var(--sui-drawer-content-border-radius, 4px 0 0 4px));
|
|
176
176
|
}
|
|
177
|
+
.content.right.full {
|
|
178
|
+
border-radius: var(--sui-drawer-right-full-content-border-radius, 0);
|
|
179
|
+
}
|
|
177
180
|
.content.right .extra-control {
|
|
178
181
|
inset: 0 100% auto auto;
|
|
179
182
|
}
|
|
@@ -184,6 +187,9 @@
|
|
|
184
187
|
inset: 0 auto 0 0;
|
|
185
188
|
border-radius: var(--sui-drawer-left-content-border-radius, var(--sui-drawer-content-border-radius, 0 4px 4px 0));
|
|
186
189
|
}
|
|
190
|
+
.content.left.full {
|
|
191
|
+
border-radius: var(--sui-drawer-left-full-content-border-radius, 0);
|
|
192
|
+
}
|
|
187
193
|
.content.left .extra-control {
|
|
188
194
|
inset: 0 auto auto 100%;
|
|
189
195
|
}
|
|
@@ -191,34 +197,36 @@
|
|
|
191
197
|
transform: translateX(-105%);
|
|
192
198
|
}
|
|
193
199
|
.content.vertical {
|
|
194
|
-
|
|
195
|
-
|
|
200
|
+
max-width: var(--sui-drawer-vertical-max-width, calc(100dvw - 56px));
|
|
201
|
+
height: var(--sui-drawer-vertical-height, 100dvh);
|
|
196
202
|
}
|
|
197
203
|
:global(dialog.open) .content.vertical {
|
|
198
|
-
max-width: calc(100dvw - 56px);
|
|
199
204
|
transform: translateX(0%);
|
|
200
205
|
}
|
|
201
206
|
.content.vertical.small {
|
|
202
|
-
width: 400px;
|
|
207
|
+
width: var(--sui-drawer-vertical-small-width, 400px);
|
|
203
208
|
}
|
|
204
209
|
.content.vertical.medium {
|
|
205
|
-
width: 600px;
|
|
210
|
+
width: var(--sui-drawer-vertical-medium-width, 600px);
|
|
206
211
|
}
|
|
207
212
|
.content.vertical.large {
|
|
208
|
-
width: 800px;
|
|
213
|
+
width: var(--sui-drawer-vertical-large-width, 800px);
|
|
209
214
|
}
|
|
210
215
|
.content.vertical.x-large {
|
|
211
|
-
width: 1000px;
|
|
216
|
+
width: var(--sui-drawer-vertical-x-large-width, 1000px);
|
|
212
217
|
}
|
|
213
218
|
.content.vertical.full {
|
|
214
|
-
border-radius: 0 !important;
|
|
215
219
|
width: 100dvw;
|
|
216
|
-
max-width:
|
|
220
|
+
max-width: 100dvw;
|
|
221
|
+
height: 100dvh;
|
|
217
222
|
}
|
|
218
223
|
.content.top {
|
|
219
224
|
inset: 0 0 auto 0;
|
|
220
225
|
border-radius: var(--sui-drawer-top-content-border-radius, var(--sui-drawer-content-border-radius, 0 0 4px 4px));
|
|
221
226
|
}
|
|
227
|
+
.content.top.full {
|
|
228
|
+
border-radius: var(--sui-drawer-top-full-content-border-radius, 0);
|
|
229
|
+
}
|
|
222
230
|
.content.top .extra-control {
|
|
223
231
|
inset: 100% 0 auto auto;
|
|
224
232
|
}
|
|
@@ -229,6 +237,9 @@
|
|
|
229
237
|
inset: auto 0 0 0;
|
|
230
238
|
border-radius: var(--sui-drawer-bottom-content-border-radius, var(--sui-drawer-content-border-radius, 4px 4px 0 0));
|
|
231
239
|
}
|
|
240
|
+
.content.bottom.full {
|
|
241
|
+
border-radius: var(--sui-drawer-bottom-full-content-border-radius, 0);
|
|
242
|
+
}
|
|
232
243
|
.content.bottom .extra-control {
|
|
233
244
|
inset: auto 0 100% auto;
|
|
234
245
|
}
|
|
@@ -236,29 +247,28 @@
|
|
|
236
247
|
transform: translateY(105%);
|
|
237
248
|
}
|
|
238
249
|
.content.horizontal {
|
|
239
|
-
width:
|
|
240
|
-
max-height: 100dvh;
|
|
250
|
+
width: var(--sui-drawer-horizontal-width, 100dvw);
|
|
251
|
+
max-height: var(--sui-drawer-horizontal-max-height, calc(100dvh - 56px));
|
|
241
252
|
}
|
|
242
253
|
:global(dialog.open) .content.horizontal {
|
|
243
|
-
max-height: calc(100dvh - 56px);
|
|
244
254
|
transform: translateY(0%);
|
|
245
255
|
}
|
|
246
256
|
.content.horizontal.small {
|
|
247
|
-
height: 400px;
|
|
257
|
+
height: var(--sui-drawer-horizontal-small-height, 400px);
|
|
248
258
|
}
|
|
249
259
|
.content.horizontal.medium {
|
|
250
|
-
height: 600px;
|
|
260
|
+
height: var(--sui-drawer-horizontal-medium-height, 600px);
|
|
251
261
|
}
|
|
252
262
|
.content.horizontal.large {
|
|
253
|
-
height: 800px;
|
|
263
|
+
height: var(--sui-drawer-horizontal-large-height, 800px);
|
|
254
264
|
}
|
|
255
265
|
.content.horizontal.x-large {
|
|
256
|
-
height: 1000px;
|
|
266
|
+
height: var(--sui-drawer-horizontal-x-large-height, 1000px);
|
|
257
267
|
}
|
|
258
268
|
.content.horizontal.full {
|
|
259
|
-
|
|
269
|
+
width: 100dvw;
|
|
260
270
|
height: 100dvh;
|
|
261
|
-
max-height:
|
|
271
|
+
max-height: 100dvh;
|
|
262
272
|
}
|
|
263
273
|
|
|
264
274
|
.header,
|
|
@@ -107,7 +107,7 @@ textarea,
|
|
|
107
107
|
grid-area: 1/1/2/2;
|
|
108
108
|
display: block;
|
|
109
109
|
margin: 0;
|
|
110
|
-
border-width: 1px;
|
|
110
|
+
border-width: var(--sui-textbox-border-width, 1px);
|
|
111
111
|
border-color: var(--sui-textbox-border-color);
|
|
112
112
|
border-radius: var(--sui-textbox-border-radius);
|
|
113
113
|
padding: 8px;
|
|
@@ -126,7 +126,9 @@ textarea.resizing,
|
|
|
126
126
|
}
|
|
127
127
|
textarea:focus,
|
|
128
128
|
.clone:focus {
|
|
129
|
-
border-color: var(--sui-primary-accent-color);
|
|
129
|
+
border-color: var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));
|
|
130
|
+
color: var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));
|
|
131
|
+
background-color: var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));
|
|
130
132
|
}
|
|
131
133
|
textarea:disabled, textarea:read-only,
|
|
132
134
|
.clone:disabled,
|
|
@@ -150,7 +150,7 @@ input:-webkit-autofill:focus {
|
|
|
150
150
|
input {
|
|
151
151
|
display: inline-block;
|
|
152
152
|
flex: auto;
|
|
153
|
-
border-width: 1px;
|
|
153
|
+
border-width: var(--sui-textbox-border-width, 1px);
|
|
154
154
|
border-color: var(--sui-textbox-border-color);
|
|
155
155
|
border-radius: var(--sui-textbox-border-radius);
|
|
156
156
|
padding: var(--sui-textbox-padding, 0 8px);
|
|
@@ -164,11 +164,14 @@ input {
|
|
|
164
164
|
font-weight: var(--sui-textbox-font-weight, normal);
|
|
165
165
|
text-align: var(--sui-textbox-text-align, left);
|
|
166
166
|
text-indent: var(--sui-textbox-text-indent, 0);
|
|
167
|
+
text-transform: var(--sui-textbox-text-transform, none);
|
|
167
168
|
letter-spacing: var(--sui-textbox-letter-spacing, normal);
|
|
168
169
|
transition: all 200ms;
|
|
169
170
|
}
|
|
170
171
|
input:focus {
|
|
171
|
-
border-color: var(--sui-primary-accent-color);
|
|
172
|
+
border-color: var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));
|
|
173
|
+
color: var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));
|
|
174
|
+
background-color: var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));
|
|
172
175
|
}
|
|
173
176
|
input:read-only {
|
|
174
177
|
color: var(--sui-tertiary-foreground-color);
|
|
@@ -180,17 +183,6 @@ input:disabled, input:read-only {
|
|
|
180
183
|
input[aria-invalid=true] {
|
|
181
184
|
border-color: var(--sui-error-foreground-color);
|
|
182
185
|
}
|
|
183
|
-
input::placeholder {
|
|
184
|
-
color: var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));
|
|
185
|
-
opacity: var(--sui-textbox-placeholder-opacity, 0.5);
|
|
186
|
-
font-family: var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));
|
|
187
|
-
font-size: var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));
|
|
188
|
-
line-height: var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));
|
|
189
|
-
font-weight: var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, normal));
|
|
190
|
-
text-align: var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, left));
|
|
191
|
-
text-indent: var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));
|
|
192
|
-
letter-spacing: var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal));
|
|
193
|
-
}
|
|
194
186
|
input ~ :global(button) {
|
|
195
187
|
flex: none;
|
|
196
188
|
margin-left: -1px;
|
|
@@ -208,13 +200,12 @@ input ~ :global(button) :global(.icon) {
|
|
|
208
200
|
|
|
209
201
|
.label {
|
|
210
202
|
position: absolute;
|
|
211
|
-
inset: 0 8px;
|
|
203
|
+
inset: var(--sui-textbox-padding, 0 8px);
|
|
212
204
|
z-index: 2;
|
|
213
205
|
display: flex;
|
|
214
|
-
justify-content: var(--sui-textbox-label-align, flex-start);
|
|
215
206
|
align-items: center;
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
justify-content: var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, left));
|
|
208
|
+
white-space: nowrap;
|
|
218
209
|
pointer-events: none;
|
|
219
210
|
}
|
|
220
211
|
.label.hidden {
|
|
@@ -223,4 +214,17 @@ input ~ :global(button) :global(.icon) {
|
|
|
223
214
|
|
|
224
215
|
input:focus + .label {
|
|
225
216
|
opacity: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
input::placeholder,
|
|
220
|
+
.label {
|
|
221
|
+
color: var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));
|
|
222
|
+
opacity: var(--sui-textbox-placeholder-opacity, 0.5);
|
|
223
|
+
font-family: var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));
|
|
224
|
+
font-size: var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));
|
|
225
|
+
line-height: var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));
|
|
226
|
+
font-weight: var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, normal));
|
|
227
|
+
text-align: var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, left));
|
|
228
|
+
text-indent: var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));
|
|
229
|
+
letter-spacing: var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal));
|
|
226
230
|
}</style>
|