@sveltia/ui 0.41.3 → 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 +39 -31
- package/dist/components/alert/alert.svelte.d.ts +8 -0
- package/dist/components/alert/infobar.svelte +58 -46
- package/dist/components/alert/infobar.svelte.d.ts +8 -0
- package/dist/components/bottom-navigation/bottom-navigation.svelte +21 -15
- package/dist/components/button/button-group.svelte +10 -6
- package/dist/components/button/button-group.svelte.d.ts +8 -0
- 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 +60 -41
- package/dist/components/button/select-button-group.svelte.d.ts +8 -0
- package/dist/components/button/split-button.svelte +25 -18
- package/dist/components/calendar/calendar.svelte +103 -80
- package/dist/components/checkbox/checkbox-group.svelte +25 -19
- package/dist/components/checkbox/checkbox-group.svelte.d.ts +8 -0
- package/dist/components/checkbox/checkbox.svelte +93 -65
- package/dist/components/checkbox/checkbox.svelte.d.ts +2 -2
- 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 +21 -14
- package/dist/components/divider/divider.svelte.d.ts +8 -0
- 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 +21 -12
- package/dist/components/grid/grid.svelte.d.ts +8 -0
- package/dist/components/icon/icon.svelte +7 -5
- package/dist/components/listbox/listbox.svelte +81 -61
- package/dist/components/listbox/listbox.svelte.d.ts +8 -0
- 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 +24 -17
- package/dist/components/menu/menu.svelte.d.ts +8 -0
- package/dist/components/progressbar/progressbar.svelte +27 -15
- package/dist/components/progressbar/progressbar.svelte.d.ts +8 -0
- package/dist/components/radio/radio-group.svelte +43 -31
- package/dist/components/radio/radio-group.svelte.d.ts +8 -0
- package/dist/components/radio/radio.svelte +81 -63
- package/dist/components/resizable-pane/resizable-handle.svelte +63 -48
- package/dist/components/resizable-pane/resizable-handle.svelte.d.ts +8 -0
- package/dist/components/resizable-pane/resizable-pane-group.svelte +18 -14
- package/dist/components/select/combobox.svelte +139 -113
- package/dist/components/select/select-tags.svelte +73 -57
- package/dist/components/slider/slider.svelte +94 -74
- package/dist/components/switch/switch.svelte +118 -81
- package/dist/components/switch/switch.svelte.d.ts +8 -0
- 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 +21 -13
- package/dist/components/table/table.svelte.d.ts +8 -0
- package/dist/components/tabs/tab-box.svelte +9 -6
- package/dist/components/tabs/tab-list.svelte +94 -73
- package/dist/components/tabs/tab-list.svelte.d.ts +8 -0
- 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/core.js +3 -0
- 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/insert-link-button.svelte +2 -1
- 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 +139 -107
- package/dist/components/toast/toast.svelte +104 -89
- package/dist/components/toolbar/toolbar.svelte +73 -54
- package/dist/components/toolbar/toolbar.svelte.d.ts +8 -0
- 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 +8 -3
- package/dist/components/util/group.svelte.d.ts +8 -0
- 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/locales/en.yaml +50 -3
- package/dist/locales/ja.yaml +49 -2
- package/dist/services/i18n.d.ts +6 -0
- package/dist/services/i18n.js +19 -14
- package/dist/typedefs.d.ts +5 -1
- package/dist/typedefs.js +2 -1
- package/package.json +23 -23
|
@@ -176,100 +176,118 @@
|
|
|
176
176
|
</div>
|
|
177
177
|
</Modal>
|
|
178
178
|
|
|
179
|
-
<style
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
:global(dialog
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
@media (max-height:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
179
|
+
<style lang="scss">
|
|
180
|
+
.content {
|
|
181
|
+
position: relative;
|
|
182
|
+
display: flex;
|
|
183
|
+
flex-direction: column;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
border-radius: var(--sui-dialog-content-border-radius, 4px);
|
|
186
|
+
max-width: calc(100dvw - var(--sui-dialog-content-margin, 16px) * 2);
|
|
187
|
+
background-color: var(
|
|
188
|
+
--sui-dialog-content-background-color,
|
|
189
|
+
var(--sui-secondary-background-color-translucent)
|
|
190
|
+
);
|
|
191
|
+
box-shadow: var(--sui-dialog-content-box-shadow, 0 8px 16px var(--sui-popup-shadow-color));
|
|
192
|
+
-webkit-backdrop-filter: var(--sui-dialog-content-backdrop-filter, blur(16px));
|
|
193
|
+
backdrop-filter: var(--sui-dialog-content-backdrop-filter, blur(16px));
|
|
194
|
+
transition-property: transform;
|
|
195
|
+
|
|
196
|
+
:global(dialog.open) & {
|
|
197
|
+
transition-duration: 150ms;
|
|
198
|
+
transform: scale(100%);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:global(dialog:not(.open)) & {
|
|
202
|
+
transition-duration: 300ms;
|
|
203
|
+
transform: scale(90%);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&.small {
|
|
207
|
+
width: var(--sui-dialog-small-content-width, var(--sui-dialog-content-width, 400px));
|
|
208
|
+
max-height: var(
|
|
209
|
+
--sui-dialog-small-content-max-height,
|
|
210
|
+
var(--sui-dialog-content-max-height, 400px)
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
@media (max-height: 400px) {
|
|
214
|
+
max-height: calc(100dvh - 32px);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&.medium {
|
|
219
|
+
width: var(--sui-dialog-medium-content-width, var(--sui-dialog-content-width, 600px));
|
|
220
|
+
max-height: var(
|
|
221
|
+
--sui-dialog-medium-content-max-height,
|
|
222
|
+
var(--sui-dialog-content-max-height, 600px)
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
@media (max-height: 600px) {
|
|
226
|
+
max-height: calc(100dvh - 32px);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.large {
|
|
231
|
+
width: var(--sui-dialog-large-content-width, var(--sui-dialog-content-width, 800px));
|
|
232
|
+
max-height: var(
|
|
233
|
+
--sui-dialog-large-content-max-height,
|
|
234
|
+
var(--sui-dialog-content-max-height, 800px)
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
@media (max-height: 800px) {
|
|
238
|
+
max-height: calc(100dvh - 32px);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&.x-large {
|
|
243
|
+
width: var(--sui-dialog-x-large-content-width, var(--sui-dialog-content-width, 1000px));
|
|
244
|
+
max-height: var(
|
|
245
|
+
--sui-dialog-x-large-content-max-height,
|
|
246
|
+
var(--sui-dialog-content-max-height, 1000px)
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
@media (max-height: 1000px) {
|
|
250
|
+
max-height: calc(100dvh - 32px);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
225
253
|
}
|
|
226
|
-
|
|
227
|
-
.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
@media (max-height: 1000px) {
|
|
232
|
-
.content.x-large {
|
|
233
|
-
max-height: calc(100dvh - 32px);
|
|
254
|
+
|
|
255
|
+
:is(.header, .footer) {
|
|
256
|
+
display: flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
gap: 4px;
|
|
234
259
|
}
|
|
235
|
-
}
|
|
236
260
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
261
|
+
.header {
|
|
262
|
+
box-sizing: content-box;
|
|
263
|
+
margin: var(--sui-dialog-header-margin, 0 16px);
|
|
264
|
+
border-width: var(--sui-dialog-header-border-width, 0 0 1px);
|
|
265
|
+
border-color: var(--sui-dialog-header-border-color, var(--sui-secondary-border-color));
|
|
266
|
+
padding: var(--sui-dialog-header-padding, 16px 8px);
|
|
267
|
+
height: var(--sui-dialog-header-height, 32px);
|
|
242
268
|
|
|
243
|
-
.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
padding: var(--sui-dialog-header-padding, 16px 8px);
|
|
249
|
-
height: var(--sui-dialog-header-height, 32px);
|
|
250
|
-
}
|
|
251
|
-
.header .title {
|
|
252
|
-
font-size: var(--sui-font-size-large);
|
|
253
|
-
font-weight: var(--sui-font-weight-bold);
|
|
254
|
-
}
|
|
269
|
+
.title {
|
|
270
|
+
font-size: var(--sui-font-size-large);
|
|
271
|
+
font-weight: var(--sui-font-weight-bold);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
255
274
|
|
|
256
|
-
.footer {
|
|
257
|
-
margin: var(--sui-dialog-footer-margin, 0 24px 24px);
|
|
258
|
-
}
|
|
259
|
-
@media (width < 768px) {
|
|
260
275
|
.footer {
|
|
261
|
-
margin: var(--sui-dialog-footer-margin, 0
|
|
276
|
+
margin: var(--sui-dialog-footer-margin, 0 24px 24px);
|
|
277
|
+
|
|
278
|
+
@media (width < 768px) {
|
|
279
|
+
margin: var(--sui-dialog-footer-margin, 0 16px 16px);
|
|
280
|
+
}
|
|
262
281
|
}
|
|
263
|
-
}
|
|
264
282
|
|
|
265
|
-
.body {
|
|
266
|
-
overflow: auto;
|
|
267
|
-
margin: var(--sui-dialog-body-margin, 24px 24px);
|
|
268
|
-
white-space: normal;
|
|
269
|
-
line-height: var(--sui-line-height-compact);
|
|
270
|
-
}
|
|
271
|
-
@media (width < 768px) {
|
|
272
283
|
.body {
|
|
273
|
-
|
|
284
|
+
overflow: auto;
|
|
285
|
+
margin: var(--sui-dialog-body-margin, 24px 24px);
|
|
286
|
+
white-space: normal;
|
|
287
|
+
line-height: var(--sui-line-height-compact);
|
|
288
|
+
|
|
289
|
+
@media (width < 768px) {
|
|
290
|
+
margin: var(--sui-dialog-body-margin, 16px 16px);
|
|
291
|
+
}
|
|
274
292
|
}
|
|
275
|
-
|
|
293
|
+
</style>
|
|
@@ -85,26 +85,39 @@
|
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
87
87
|
|
|
88
|
-
<style
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
.disclosure :global(button[aria-expanded=false]) :global(.icon:dir(ltr)) {
|
|
96
|
-
transform: rotate(-90deg);
|
|
97
|
-
}
|
|
98
|
-
.disclosure :global(button[aria-expanded=false]) :global(.icon:dir(rtl)) {
|
|
99
|
-
transform: rotate(90deg);
|
|
100
|
-
}
|
|
88
|
+
<style lang="scss">
|
|
89
|
+
.disclosure {
|
|
90
|
+
:global {
|
|
91
|
+
button {
|
|
92
|
+
display: flex;
|
|
93
|
+
width: 100%;
|
|
101
94
|
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
}
|
|
95
|
+
.icon {
|
|
96
|
+
transition: all 200ms;
|
|
97
|
+
}
|
|
105
98
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
&[aria-expanded='false'] .icon {
|
|
100
|
+
&:dir(ltr) {
|
|
101
|
+
transform: rotate(-90deg);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:dir(rtl) {
|
|
105
|
+
transform: rotate(90deg);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.inner {
|
|
113
|
+
display: contents;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.content {
|
|
117
|
+
&[hidden] {
|
|
118
|
+
display: block;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
height: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* attribute.
|
|
12
12
|
* @property {'horizontal'|'vertical'} [orientation] Orientation of the widget. An alias of the
|
|
13
13
|
* `aria-orientation` attribute.
|
|
14
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
class: className,
|
|
22
23
|
hidden = false,
|
|
23
24
|
orientation = 'horizontal',
|
|
25
|
+
ariaLabel = undefined,
|
|
24
26
|
...restProps
|
|
25
27
|
/* eslint-enable prefer-const */
|
|
26
28
|
} = $props();
|
|
@@ -33,19 +35,24 @@
|
|
|
33
35
|
{hidden}
|
|
34
36
|
aria-hidden={hidden}
|
|
35
37
|
aria-orientation={orientation}
|
|
38
|
+
aria-label={ariaLabel}
|
|
36
39
|
></div>
|
|
37
40
|
|
|
38
|
-
<style
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
<style lang="scss">
|
|
42
|
+
.divider {
|
|
43
|
+
flex: none;
|
|
44
|
+
background-color: var(--sui-secondary-border-color);
|
|
45
|
+
|
|
46
|
+
&[aria-orientation='horizontal'] {
|
|
47
|
+
margin: 8px 0;
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 1px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&[aria-orientation='vertical'] {
|
|
53
|
+
margin: 0 8px;
|
|
54
|
+
width: 1px;
|
|
55
|
+
height: 100%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -22,6 +22,10 @@ declare const Divider: import("svelte").Component<{
|
|
|
22
22
|
* `aria-orientation` attribute.
|
|
23
23
|
*/
|
|
24
24
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The `aria-label` attribute on the wrapper element.
|
|
27
|
+
*/
|
|
28
|
+
ariaLabel?: string | undefined;
|
|
25
29
|
} & Record<string, any>, {}, "">;
|
|
26
30
|
type Props = {
|
|
27
31
|
/**
|
|
@@ -38,4 +42,8 @@ type Props = {
|
|
|
38
42
|
* `aria-orientation` attribute.
|
|
39
43
|
*/
|
|
40
44
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The `aria-label` attribute on the wrapper element.
|
|
47
|
+
*/
|
|
48
|
+
ariaLabel?: string | undefined;
|
|
41
49
|
};
|
|
@@ -23,11 +23,16 @@
|
|
|
23
23
|
|
|
24
24
|
<div {...restProps} role="none" class="sui spacer {className}" class:flex></div>
|
|
25
25
|
|
|
26
|
-
<style
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
<style lang="scss">
|
|
27
|
+
.spacer {
|
|
28
|
+
&.flex:not([hidden]) {
|
|
29
|
+
display: block; // Avoid Tailwind .flex class collisions
|
|
30
|
+
flex: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:not(.flex) {
|
|
34
|
+
width: 8px;
|
|
35
|
+
height: 8px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</style>
|