@sveltia/ui 0.19.3 → 0.20.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.
- package/package/components/alert/alert.svelte.d.ts +18 -0
- package/package/components/button/button-group.svelte.d.ts +14 -0
- package/package/components/button/button.svelte.d.ts +4 -0
- package/package/components/button/select-button-group.svelte.d.ts +42 -0
- package/package/components/button/select-button.svelte.d.ts +11 -0
- package/package/components/button/split-button.svelte.d.ts +23 -0
- package/package/components/calendar/calendar.svelte.d.ts +10 -0
- package/package/components/checkbox/checkbox-group.svelte.d.ts +28 -0
- package/package/components/checkbox/checkbox.svelte.d.ts +37 -0
- package/package/components/dialog/alert-dialog.svelte.d.ts +4 -0
- package/package/components/dialog/confirmation-dialog.svelte.d.ts +4 -0
- package/package/components/dialog/dialog.svelte +8 -1
- package/package/components/dialog/dialog.svelte.d.ts +4 -0
- package/package/components/dialog/prompt-dialog.svelte.d.ts +22 -0
- package/package/components/disclosure/disclosure.svelte.d.ts +41 -0
- package/package/components/divider/divider.svelte.d.ts +20 -0
- package/package/components/divider/spacer.svelte.d.ts +14 -0
- package/package/components/drawer/drawer.svelte.d.ts +55 -0
- package/package/components/grid/grid-body.svelte.d.ts +18 -0
- package/package/components/grid/grid-cell.svelte.d.ts +14 -0
- package/package/components/grid/grid-col-header.svelte.d.ts +14 -0
- package/package/components/grid/grid-foot.svelte.d.ts +14 -0
- package/package/components/grid/grid-head.svelte.d.ts +14 -0
- package/package/components/grid/grid-row-header.svelte.d.ts +14 -0
- package/package/components/grid/grid-row.svelte.d.ts +27 -0
- package/package/components/grid/grid.svelte.d.ts +31 -0
- package/package/components/icon/icon.svelte.d.ts +14 -0
- package/package/components/listbox/listbox.svelte.d.ts +56 -0
- package/package/components/listbox/option-group.svelte.d.ts +28 -0
- package/package/components/listbox/option.svelte.d.ts +31 -0
- package/package/components/menu/menu-button.svelte.d.ts +13 -0
- package/package/components/menu/menu-item-checkbox.svelte.d.ts +4 -0
- package/package/components/menu/menu-item-group.svelte.d.ts +24 -0
- package/package/components/menu/menu-item-radio.svelte.d.ts +4 -0
- package/package/components/menu/menu-item.svelte.d.ts +4 -0
- package/package/components/menu/menu.svelte.d.ts +28 -0
- package/package/components/progressbar/progressbar.svelte +54 -0
- package/package/components/progressbar/progressbar.svelte.d.ts +53 -0
- package/package/components/radio/radio-group.svelte.d.ts +47 -0
- package/package/components/radio/radio.svelte.d.ts +52 -0
- package/package/components/select/combobox.svelte.d.ts +4 -0
- package/package/components/select/select-tags.svelte.d.ts +63 -0
- package/package/components/select/select.svelte.d.ts +4 -0
- package/package/components/slider/slider.svelte.d.ts +77 -0
- package/package/components/switch/switch.svelte.d.ts +46 -0
- package/package/components/table/table-body.svelte.d.ts +18 -0
- package/package/components/table/table-cell.svelte.d.ts +14 -0
- package/package/components/table/table-col-header.svelte.d.ts +14 -0
- package/package/components/table/table-foot.svelte.d.ts +14 -0
- package/package/components/table/table-head.svelte.d.ts +14 -0
- package/package/components/table/table-row-header.svelte.d.ts +14 -0
- package/package/components/table/table-row.svelte.d.ts +14 -0
- package/package/components/table/table.svelte.d.ts +14 -0
- package/package/components/tabs/tab-box.svelte.d.ts +19 -0
- package/package/components/tabs/tab-list.svelte.d.ts +36 -0
- package/package/components/tabs/tab-panel.svelte.d.ts +14 -0
- package/package/components/tabs/tab-panels.svelte.d.ts +14 -0
- package/package/components/tabs/tab.svelte.d.ts +11 -0
- package/package/components/text-editor/core.d.ts +1 -0
- package/package/components/text-editor/core.js +13 -1
- package/package/components/text-editor/lexical-root.svelte +6 -0
- package/package/components/text-editor/lexical-root.svelte.d.ts +42 -0
- package/package/components/text-editor/text-editor.svelte.d.ts +54 -0
- package/package/components/text-editor/toolbar/editor-toolbar.svelte.d.ts +20 -0
- package/package/components/text-editor/toolbar/format-text-button.svelte +3 -1
- package/package/components/text-editor/toolbar/format-text-button.svelte.d.ts +10 -0
- package/package/components/text-editor/toolbar/insert-link-button.svelte +41 -33
- package/package/components/text-editor/toolbar/insert-link-button.svelte.d.ts +4 -0
- package/package/components/text-editor/toolbar/toggle-block-menu-item.svelte +4 -6
- package/package/components/text-editor/toolbar/toggle-block-menu-item.svelte.d.ts +10 -0
- package/package/components/text-field/number-input.svelte.d.ts +27 -0
- package/package/components/text-field/password-input.svelte.d.ts +10 -0
- package/package/components/text-field/search-bar.svelte.d.ts +16 -0
- package/package/components/text-field/text-area.svelte.d.ts +55 -0
- package/package/components/text-field/text-input.svelte.d.ts +4 -0
- package/package/components/toast/toast.svelte.d.ts +28 -0
- package/package/components/toolbar/toolbar.svelte.d.ts +32 -0
- package/package/components/util/app-shell.svelte +5 -496
- package/package/components/util/app-shell.svelte.d.ts +15 -0
- package/package/components/util/group.svelte.d.ts +23 -0
- package/package/components/util/modal.svelte +8 -4
- package/package/components/util/modal.svelte.d.ts +6 -0
- package/package/components/util/placeholder.svelte.d.ts +10 -0
- package/package/components/util/popup.svelte.d.ts +49 -0
- package/package/index.d.ts +1 -0
- package/package/index.js +1 -0
- package/package/styles/core.scss +4 -2
- package/package.json +29 -29
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
-->
|
|
7
7
|
<script>
|
|
8
8
|
import { onMount } from 'svelte';
|
|
9
|
+
import '../../styles/core.scss';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* @typedef {object} Props
|
|
@@ -98,505 +99,13 @@
|
|
|
98
99
|
{@render children?.()}
|
|
99
100
|
</div>
|
|
100
101
|
|
|
101
|
-
<style
|
|
102
|
-
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block");
|
|
103
|
-
:global(:root),
|
|
104
|
-
:global(:host) {
|
|
105
|
-
--sui-base-hue: 210;
|
|
106
|
-
--sui-highlight-foreground-color: hsl(var(--sui-foreground-color-1-hsl));
|
|
107
|
-
--sui-primary-foreground-color: hsl(var(--sui-foreground-color-2-hsl));
|
|
108
|
-
--sui-secondary-foreground-color: hsl(var(--sui-foreground-color-3-hsl));
|
|
109
|
-
--sui-tertiary-foreground-color: hsl(var(--sui-foreground-color-4-hsl));
|
|
110
|
-
--sui-disabled-foreground-color: hsl(var(--sui-foreground-color-5-hsl));
|
|
111
|
-
--sui-error-foreground-color: hsl(
|
|
112
|
-
var(--sui-error-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
113
|
-
var(--sui-alert-foreground-color-lightness)
|
|
114
|
-
);
|
|
115
|
-
--sui-warning-foreground-color: hsl(
|
|
116
|
-
var(--sui-warning-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
117
|
-
var(--sui-alert-foreground-color-lightness)
|
|
118
|
-
);
|
|
119
|
-
--sui-info-foreground-color: hsl(
|
|
120
|
-
var(--sui-info-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
121
|
-
var(--sui-alert-foreground-color-lightness)
|
|
122
|
-
);
|
|
123
|
-
--sui-success-foreground-color: hsl(
|
|
124
|
-
var(--sui-success-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
125
|
-
var(--sui-alert-foreground-color-lightness)
|
|
126
|
-
);
|
|
127
|
-
--sui-hover-background-color: hsl(var(--sui-background-color-5-hsl) / 35%);
|
|
128
|
-
--sui-selected-background-color: hsl(var(--sui-background-color-5-hsl) / 75%);
|
|
129
|
-
--sui-active-background-color: hsl(var(--sui-background-color-5-hsl) / 100%);
|
|
130
|
-
--sui-content-background-color: hsl(var(--sui-background-color-1-hsl));
|
|
131
|
-
--sui-code-background-color: hsl(var(--sui-background-color-4-hsl));
|
|
132
|
-
--sui-primary-background-color: hsl(var(--sui-background-color-2-hsl));
|
|
133
|
-
--sui-primary-background-color-translucent: hsl(var(--sui-background-color-2-hsl) / 80%);
|
|
134
|
-
--sui-secondary-background-color: hsl(var(--sui-background-color-3-hsl));
|
|
135
|
-
--sui-secondary-background-color-translucent: hsl(var(--sui-background-color-3-hsl) / 80%);
|
|
136
|
-
--sui-tertiary-background-color: hsl(var(--sui-background-color-4-hsl));
|
|
137
|
-
--sui-tertiary-background-color-translucent: hsl(var(--sui-background-color-4-hsl) / 80%);
|
|
138
|
-
--sui-disabled-background-color: hsl(var(--sui-background-color-4-hsl));
|
|
139
|
-
--sui-error-background-color: hsl(
|
|
140
|
-
var(--sui-error-color-hue) var(--sui-alert-background-color-saturation)
|
|
141
|
-
var(--sui-alert-background-color-lightness)
|
|
142
|
-
);
|
|
143
|
-
--sui-warning-background-color: hsl(
|
|
144
|
-
var(--sui-warning-color-hue) var(--sui-alert-background-color-saturation)
|
|
145
|
-
var(--sui-alert-background-color-lightness)
|
|
146
|
-
);
|
|
147
|
-
--sui-info-background-color: hsl(
|
|
148
|
-
var(--sui-info-color-hue) var(--sui-alert-background-color-saturation)
|
|
149
|
-
var(--sui-alert-background-color-lightness)
|
|
150
|
-
);
|
|
151
|
-
--sui-success-background-color: hsl(
|
|
152
|
-
var(--sui-success-color-hue) var(--sui-alert-background-color-saturation)
|
|
153
|
-
var(--sui-alert-background-color-lightness)
|
|
154
|
-
);
|
|
155
|
-
--sui-focus-ring-width: 4px;
|
|
156
|
-
--sui-primary-border-color: hsl(var(--sui-border-color-2-hsl));
|
|
157
|
-
--sui-secondary-border-color: hsl(var(--sui-border-color-3-hsl));
|
|
158
|
-
--sui-error-border-color: hsl(
|
|
159
|
-
var(--sui-error-color-hue) var(--sui-alert-border-color-saturation)
|
|
160
|
-
var(--sui-alert-border-color-lightness)
|
|
161
|
-
);
|
|
162
|
-
--sui-warning-border-color: hsl(
|
|
163
|
-
var(--sui-warning-color-hue) var(--sui-alert-border-color-saturation)
|
|
164
|
-
var(--sui-alert-border-color-lightness)
|
|
165
|
-
);
|
|
166
|
-
--sui-info-border-color: hsl(
|
|
167
|
-
var(--sui-info-color-hue) var(--sui-alert-border-color-saturation)
|
|
168
|
-
var(--sui-alert-border-color-lightness)
|
|
169
|
-
);
|
|
170
|
-
--sui-success-border-color: hsl(
|
|
171
|
-
var(--sui-success-color-hue) var(--sui-alert-border-color-saturation)
|
|
172
|
-
var(--sui-alert-border-color-lightness)
|
|
173
|
-
);
|
|
174
|
-
--sui-popup-shadow-color: hsl(var(--sui-shadow-color) / 40%);
|
|
175
|
-
--sui-popup-backdrop-color: hsl(var(--sui-shadow-color) / 40%);
|
|
176
|
-
--sui-font-family-default: "Merriweather Sans", sans-serif;
|
|
177
|
-
--sui-font-size-xxx-large: 23px;
|
|
178
|
-
--sui-font-size-xx-large: 19px;
|
|
179
|
-
--sui-font-size-x-large: 17px;
|
|
180
|
-
--sui-font-size-large: 15px;
|
|
181
|
-
--sui-font-size-default: 13px;
|
|
182
|
-
--sui-font-size-small: 11px;
|
|
183
|
-
--sui-font-size-x-small: 9px;
|
|
184
|
-
--sui-font-weight-normal: 325;
|
|
185
|
-
--sui-font-weight-bold: 625;
|
|
186
|
-
--sui-font-family-monospace: "Noto Sans Mono", monospace;
|
|
187
|
-
--sui-font-size-monospace: 0.9em;
|
|
188
|
-
--sui-line-height-default: 1.25;
|
|
189
|
-
--sui-line-height-compact: 1.5;
|
|
190
|
-
--sui-line-height-comfortable: 1.75;
|
|
191
|
-
--sui-word-spacing-normal: 0.1ex;
|
|
192
|
-
--sui-paragraph-margin: 1.75em;
|
|
193
|
-
--sui-control-small-border-width: 1px;
|
|
194
|
-
--sui-control-small-border-radius: calc(var(--sui-control-small-height) / 8);
|
|
195
|
-
--sui-control-small-padding: 0 calc((var(--sui-control-small-height) / 5));
|
|
196
|
-
--sui-control-small-height: 24px;
|
|
197
|
-
--sui-control-medium-border-width: 1px;
|
|
198
|
-
--sui-control-medium-border-radius: calc(var(--sui-control-medium-height) / 8);
|
|
199
|
-
--sui-control-medium-padding: 0 calc((var(--sui-control-medium-height) / 4));
|
|
200
|
-
--sui-control-medium-height: 32px;
|
|
201
|
-
--sui-control-large-border-width: 1px;
|
|
202
|
-
--sui-control-large-border-radius: calc(var(--sui-control-large-height) / 8);
|
|
203
|
-
--sui-control-large-padding: 0 calc((var(--sui-control-large-height) / 3));
|
|
204
|
-
--sui-control-large-height: 48px;
|
|
205
|
-
--sui-control-border-color: hsl(var(--sui-border-color-2-hsl));
|
|
206
|
-
--sui-control-foreground-color: var(--sui-primary-foreground-color);
|
|
207
|
-
--sui-control-background-color: hsl(var(--sui-background-color-4-hsl));
|
|
208
|
-
--sui-control-font-family: var(--sui-font-family-default);
|
|
209
|
-
--sui-control-font-size: var(--sui-font-size-default);
|
|
210
|
-
--sui-control-line-height: var(--sui-line-height-compact);
|
|
211
|
-
--sui-button-small-border-radius: var(--sui-control-small-border-radius);
|
|
212
|
-
--sui-button-small-padding: var(--sui-control-small-padding);
|
|
213
|
-
--sui-button-small-height: var(--sui-control-small-height);
|
|
214
|
-
--sui-button-medium-border-radius: var(--sui-control-medium-border-radius);
|
|
215
|
-
--sui-button-medium-padding: var(--sui-control-medium-padding);
|
|
216
|
-
--sui-button-medium-height: var(--sui-control-medium-height);
|
|
217
|
-
--sui-button-large-border-radius: var(--sui-control-large-border-radius);
|
|
218
|
-
--sui-button-large-padding: var(--sui-control-large-padding);
|
|
219
|
-
--sui-button-large-height: var(--sui-control-large-height);
|
|
220
|
-
--sui-button-border-color: var(--sui-control-border-color);
|
|
221
|
-
--sui-button-background-color: var(--sui-control-background-color);
|
|
222
|
-
--sui-checkbox-border-radius: var(--sui-control-medium-border-radius);
|
|
223
|
-
--sui-checkbox-height: 20px;
|
|
224
|
-
--sui-checkbox-border-color: hsl(var(--sui-border-color-1-hsl));
|
|
225
|
-
--sui-checkbox-background-color: var(--sui-control-background-color);
|
|
226
|
-
--sui-option-border-radius: var(--sui-control-medium-border-radius);
|
|
227
|
-
--sui-option-padding: calc((var(--sui-control-medium-height) / 6))
|
|
228
|
-
calc((var(--sui-control-medium-height) / 5));
|
|
229
|
-
--sui-option-height: var(--sui-control-medium-height);
|
|
230
|
-
--sui-listbox-border-radius: var(--sui-control-medium-border-radius);
|
|
231
|
-
--sui-listbox-border-color: var(--sui-control-border-color);
|
|
232
|
-
--sui-listbox-foreground-color: var(--sui-control-foreground-color);
|
|
233
|
-
--sui-listbox-background-color: hsl(var(--sui-background-color-1-hsl));
|
|
234
|
-
--sui-textbox-border-radius: var(--sui-control-medium-border-radius);
|
|
235
|
-
--sui-textbox-height: var(--sui-control-medium-height);
|
|
236
|
-
--sui-textbox-border-color: var(--sui-control-border-color);
|
|
237
|
-
--sui-textbox-foreground-color: var(--sui-control-foreground-color);
|
|
238
|
-
--sui-textbox-background-color: hsl(var(--sui-background-color-1-hsl));
|
|
239
|
-
--sui-textbox-font-family: var(--sui-font-family-default);
|
|
240
|
-
--sui-textbox-font-size: var(--sui-font-size-default);
|
|
241
|
-
--sui-textbox-singleline-padding: 0 8px;
|
|
242
|
-
--sui-textbox-singleline-min-width: 240px;
|
|
243
|
-
--sui-textbox-singleline-line-height: var(--sui-line-height-compact);
|
|
244
|
-
--sui-textbox-multiline-padding: 16px;
|
|
245
|
-
--sui-textbox-multiline-min-width: 480px;
|
|
246
|
-
--sui-textbox-multiline-line-height: var(--sui-line-height-comfortable);
|
|
247
|
-
--sui-tab-height: var(--sui-control-medium-height);
|
|
248
|
-
--sui-tab-small-height: var(--sui-control-small-height);
|
|
249
|
-
--sui-tab-medium-height: var(--sui-control-medium-height);
|
|
250
|
-
--sui-tab-large-height: var(--sui-control-large-height);
|
|
251
|
-
--sui-primary-toolbar-size: 48px;
|
|
252
|
-
--sui-secondary-toolbar-size: 40px;
|
|
253
|
-
--sui-primary-row-height: 48px;
|
|
254
|
-
--sui-secondary-row-height: 40px;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
@media (pointer: coarse) {
|
|
258
|
-
:global(:root),
|
|
259
|
-
:global(:host) {
|
|
260
|
-
--sui-control-small-height: 30px;
|
|
261
|
-
--sui-control-medium-height: 40px;
|
|
262
|
-
--sui-control-large-height: 60px;
|
|
263
|
-
--sui-checkbox-height: 24px;
|
|
264
|
-
--sui-primary-toolbar-size: 56px;
|
|
265
|
-
--sui-secondary-toolbar-size: 48px;
|
|
266
|
-
--sui-primary-row-height: 56px;
|
|
267
|
-
--sui-secondary-row-height: 48px;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
@media (prefers-reduced-transparency) {
|
|
271
|
-
:global(:root),
|
|
272
|
-
:global(:host) {
|
|
273
|
-
--sui-primary-background-color-translucent: hsl(var(--sui-background-color-2-hsl));
|
|
274
|
-
--sui-secondary-background-color-translucent: hsl(var(--sui-background-color-3-hsl));
|
|
275
|
-
--sui-tertiary-background-color-translucent: hsl(var(--sui-background-color-4-hsl));
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
:global(:root[data-theme=light]),
|
|
279
|
-
:global(:host[data-theme=light]) {
|
|
280
|
-
color-scheme: light;
|
|
281
|
-
--sui-foreground-color-1-hsl: var(--sui-base-hue) 5% 5%;
|
|
282
|
-
--sui-foreground-color-2-hsl: var(--sui-base-hue) 5% 25%;
|
|
283
|
-
--sui-foreground-color-3-hsl: var(--sui-base-hue) 5% 35%;
|
|
284
|
-
--sui-foreground-color-4-hsl: var(--sui-base-hue) 5% 45%;
|
|
285
|
-
--sui-foreground-color-5-hsl: var(--sui-base-hue) 5% 65%;
|
|
286
|
-
--sui-background-color-1-hsl: var(--sui-base-hue) 5% 100%;
|
|
287
|
-
--sui-background-color-2-hsl: var(--sui-base-hue) 5% 98%;
|
|
288
|
-
--sui-background-color-3-hsl: var(--sui-base-hue) 5% 96%;
|
|
289
|
-
--sui-background-color-4-hsl: var(--sui-base-hue) 5% 94%;
|
|
290
|
-
--sui-background-color-5-hsl: var(--sui-base-hue) 5% 84%;
|
|
291
|
-
--sui-border-color-1-hsl: var(--sui-base-hue) 5% 65%;
|
|
292
|
-
--sui-border-color-2-hsl: var(--sui-base-hue) 5% 84%;
|
|
293
|
-
--sui-border-color-3-hsl: var(--sui-base-hue) 5% 88%;
|
|
294
|
-
--sui-shadow-color: var(--sui-base-hue) 10% 0%;
|
|
295
|
-
--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 80% 40%);
|
|
296
|
-
--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 80% 45%);
|
|
297
|
-
--sui-primary-accent-color: hsl(var(--sui-base-hue) 80% 40%);
|
|
298
|
-
--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 80% 35%);
|
|
299
|
-
--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);
|
|
300
|
-
--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 40%);
|
|
301
|
-
--sui-error-color-hue: 0;
|
|
302
|
-
--sui-warning-color-hue: 40;
|
|
303
|
-
--sui-info-color-hue: 210;
|
|
304
|
-
--sui-success-color-hue: 100;
|
|
305
|
-
--sui-alert-foreground-color-saturation: 85%;
|
|
306
|
-
--sui-alert-foreground-color-lightness: 25%;
|
|
307
|
-
--sui-alert-background-color-saturation: 65%;
|
|
308
|
-
--sui-alert-background-color-lightness: 90%;
|
|
309
|
-
--sui-alert-border-color-saturation: 48%;
|
|
310
|
-
--sui-alert-border-color-lightness: 68%;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
:global(:root[data-theme=dark]),
|
|
314
|
-
:global(:host[data-theme=dark]) {
|
|
315
|
-
color-scheme: dark;
|
|
316
|
-
--sui-foreground-color-1-hsl: var(--sui-base-hue) 10% 95%;
|
|
317
|
-
--sui-foreground-color-2-hsl: var(--sui-base-hue) 10% 75%;
|
|
318
|
-
--sui-foreground-color-3-hsl: var(--sui-base-hue) 10% 65%;
|
|
319
|
-
--sui-foreground-color-4-hsl: var(--sui-base-hue) 10% 55%;
|
|
320
|
-
--sui-foreground-color-5-hsl: var(--sui-base-hue) 10% 35%;
|
|
321
|
-
--sui-background-color-1-hsl: var(--sui-base-hue) 10% 10%;
|
|
322
|
-
--sui-background-color-2-hsl: var(--sui-base-hue) 10% 12%;
|
|
323
|
-
--sui-background-color-3-hsl: var(--sui-base-hue) 10% 14%;
|
|
324
|
-
--sui-background-color-4-hsl: var(--sui-base-hue) 10% 16%;
|
|
325
|
-
--sui-background-color-5-hsl: var(--sui-base-hue) 10% 26%;
|
|
326
|
-
--sui-border-color-1-hsl: var(--sui-base-hue) 10% 45%;
|
|
327
|
-
--sui-border-color-2-hsl: var(--sui-base-hue) 10% 26%;
|
|
328
|
-
--sui-border-color-3-hsl: var(--sui-base-hue) 10% 22%;
|
|
329
|
-
--sui-shadow-color: var(--sui-base-hue) 10% 0%;
|
|
330
|
-
--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 100% 60%);
|
|
331
|
-
--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 100% 45%);
|
|
332
|
-
--sui-primary-accent-color: hsl(var(--sui-base-hue) 100% 40%);
|
|
333
|
-
--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 100% 35%);
|
|
334
|
-
--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);
|
|
335
|
-
--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 40%);
|
|
336
|
-
--sui-error-color-hue: 0;
|
|
337
|
-
--sui-warning-color-hue: 40;
|
|
338
|
-
--sui-info-color-hue: 210;
|
|
339
|
-
--sui-success-color-hue: 100;
|
|
340
|
-
--sui-alert-foreground-color-saturation: 85%;
|
|
341
|
-
--sui-alert-foreground-color-lightness: 75%;
|
|
342
|
-
--sui-alert-background-color-saturation: 40%;
|
|
343
|
-
--sui-alert-background-color-lightness: 10%;
|
|
344
|
-
--sui-alert-border-color-saturation: 38%;
|
|
345
|
-
--sui-alert-border-color-lightness: 18%;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
@media (prefers-color-scheme: light) {
|
|
349
|
-
:global(:root:not([data-theme])),
|
|
350
|
-
:global(:host:not([data-theme])) {
|
|
351
|
-
color-scheme: light;
|
|
352
|
-
--sui-foreground-color-1-hsl: var(--sui-base-hue) 5% 5%;
|
|
353
|
-
--sui-foreground-color-2-hsl: var(--sui-base-hue) 5% 25%;
|
|
354
|
-
--sui-foreground-color-3-hsl: var(--sui-base-hue) 5% 35%;
|
|
355
|
-
--sui-foreground-color-4-hsl: var(--sui-base-hue) 5% 45%;
|
|
356
|
-
--sui-foreground-color-5-hsl: var(--sui-base-hue) 5% 65%;
|
|
357
|
-
--sui-background-color-1-hsl: var(--sui-base-hue) 5% 100%;
|
|
358
|
-
--sui-background-color-2-hsl: var(--sui-base-hue) 5% 98%;
|
|
359
|
-
--sui-background-color-3-hsl: var(--sui-base-hue) 5% 96%;
|
|
360
|
-
--sui-background-color-4-hsl: var(--sui-base-hue) 5% 94%;
|
|
361
|
-
--sui-background-color-5-hsl: var(--sui-base-hue) 5% 84%;
|
|
362
|
-
--sui-border-color-1-hsl: var(--sui-base-hue) 5% 65%;
|
|
363
|
-
--sui-border-color-2-hsl: var(--sui-base-hue) 5% 84%;
|
|
364
|
-
--sui-border-color-3-hsl: var(--sui-base-hue) 5% 88%;
|
|
365
|
-
--sui-shadow-color: var(--sui-base-hue) 10% 0%;
|
|
366
|
-
--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 80% 40%);
|
|
367
|
-
--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 80% 45%);
|
|
368
|
-
--sui-primary-accent-color: hsl(var(--sui-base-hue) 80% 40%);
|
|
369
|
-
--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 80% 35%);
|
|
370
|
-
--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);
|
|
371
|
-
--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 40%);
|
|
372
|
-
--sui-error-color-hue: 0;
|
|
373
|
-
--sui-warning-color-hue: 40;
|
|
374
|
-
--sui-info-color-hue: 210;
|
|
375
|
-
--sui-success-color-hue: 100;
|
|
376
|
-
--sui-alert-foreground-color-saturation: 85%;
|
|
377
|
-
--sui-alert-foreground-color-lightness: 25%;
|
|
378
|
-
--sui-alert-background-color-saturation: 65%;
|
|
379
|
-
--sui-alert-background-color-lightness: 90%;
|
|
380
|
-
--sui-alert-border-color-saturation: 48%;
|
|
381
|
-
--sui-alert-border-color-lightness: 68%;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
@media (prefers-color-scheme: dark) {
|
|
385
|
-
:global(:root:not([data-theme])),
|
|
386
|
-
:global(:host:not([data-theme])) {
|
|
387
|
-
color-scheme: dark;
|
|
388
|
-
--sui-foreground-color-1-hsl: var(--sui-base-hue) 10% 95%;
|
|
389
|
-
--sui-foreground-color-2-hsl: var(--sui-base-hue) 10% 75%;
|
|
390
|
-
--sui-foreground-color-3-hsl: var(--sui-base-hue) 10% 65%;
|
|
391
|
-
--sui-foreground-color-4-hsl: var(--sui-base-hue) 10% 55%;
|
|
392
|
-
--sui-foreground-color-5-hsl: var(--sui-base-hue) 10% 35%;
|
|
393
|
-
--sui-background-color-1-hsl: var(--sui-base-hue) 10% 10%;
|
|
394
|
-
--sui-background-color-2-hsl: var(--sui-base-hue) 10% 12%;
|
|
395
|
-
--sui-background-color-3-hsl: var(--sui-base-hue) 10% 14%;
|
|
396
|
-
--sui-background-color-4-hsl: var(--sui-base-hue) 10% 16%;
|
|
397
|
-
--sui-background-color-5-hsl: var(--sui-base-hue) 10% 26%;
|
|
398
|
-
--sui-border-color-1-hsl: var(--sui-base-hue) 10% 45%;
|
|
399
|
-
--sui-border-color-2-hsl: var(--sui-base-hue) 10% 26%;
|
|
400
|
-
--sui-border-color-3-hsl: var(--sui-base-hue) 10% 22%;
|
|
401
|
-
--sui-shadow-color: var(--sui-base-hue) 10% 0%;
|
|
402
|
-
--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 100% 60%);
|
|
403
|
-
--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 100% 45%);
|
|
404
|
-
--sui-primary-accent-color: hsl(var(--sui-base-hue) 100% 40%);
|
|
405
|
-
--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 100% 35%);
|
|
406
|
-
--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);
|
|
407
|
-
--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 40%);
|
|
408
|
-
--sui-error-color-hue: 0;
|
|
409
|
-
--sui-warning-color-hue: 40;
|
|
410
|
-
--sui-info-color-hue: 210;
|
|
411
|
-
--sui-success-color-hue: 100;
|
|
412
|
-
--sui-alert-foreground-color-saturation: 85%;
|
|
413
|
-
--sui-alert-foreground-color-lightness: 75%;
|
|
414
|
-
--sui-alert-background-color-saturation: 40%;
|
|
415
|
-
--sui-alert-background-color-lightness: 10%;
|
|
416
|
-
--sui-alert-border-color-saturation: 38%;
|
|
417
|
-
--sui-alert-border-color-lightness: 18%;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
:global(.material-symbols-outlined) {
|
|
421
|
-
font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
:global(*),
|
|
425
|
-
:global(::before),
|
|
426
|
-
:global(::after) {
|
|
427
|
-
overflow-anchor: none;
|
|
428
|
-
scroll-behavior: smooth;
|
|
429
|
-
box-sizing: border-box;
|
|
430
|
-
outline-offset: 0px;
|
|
431
|
-
outline-width: var(--sui-focus-ring-width) !important;
|
|
432
|
-
outline-style: solid;
|
|
433
|
-
outline-color: transparent;
|
|
434
|
-
border-width: 0;
|
|
435
|
-
border-style: solid;
|
|
436
|
-
vertical-align: top;
|
|
437
|
-
}
|
|
438
|
-
@media (prefers-reduced-motion) {
|
|
439
|
-
:global(*),
|
|
440
|
-
:global(::before),
|
|
441
|
-
:global(::after) {
|
|
442
|
-
scroll-behavior: auto;
|
|
443
|
-
transition-duration: 1ms !important;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
:global(::selection) {
|
|
448
|
-
background-color: var(--sui-primary-accent-color-translucent);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
:global(*) {
|
|
452
|
-
-webkit-tap-highlight-color: transparent;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
:global(:focus) {
|
|
456
|
-
z-index: 1;
|
|
457
|
-
outline-width: 0;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
:global(:focus-visible) {
|
|
461
|
-
outline-color: var(--sui-primary-accent-color-translucent);
|
|
462
|
-
z-index: 2;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
:global(h1),
|
|
466
|
-
:global(h2),
|
|
467
|
-
:global(h3),
|
|
468
|
-
:global(h4),
|
|
469
|
-
:global(h5),
|
|
470
|
-
:global(h6) {
|
|
471
|
-
margin: 0;
|
|
472
|
-
font-weight: var(--sui-font-weight-bold, bold);
|
|
473
|
-
line-height: var(--sui-line-height-default);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
:global(h1) {
|
|
477
|
-
font-size: 32px;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
:global(h2) {
|
|
481
|
-
font-size: 28px;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
:global(h3) {
|
|
485
|
-
font-size: 24px;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
:global(h4) {
|
|
489
|
-
font-size: 20px;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
:global(h5) {
|
|
493
|
-
font-size: 16px;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
:global(h6) {
|
|
497
|
-
font-size: 12px;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
:global(strong) {
|
|
501
|
-
font-weight: var(--sui-font-weight-bold, bold);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
:global(a) {
|
|
505
|
-
color: var(--sui-primary-accent-color-text);
|
|
506
|
-
text-decoration: none;
|
|
507
|
-
text-underline-offset: 2px;
|
|
508
|
-
}
|
|
509
|
-
:global(a:hover), :global(a:focus), :global(a:active) {
|
|
510
|
-
text-decoration: underline;
|
|
511
|
-
}
|
|
512
|
-
:global(:root[data-underline-links=true]) :global(a), :global(:host[data-underline-links=true]) :global(a) {
|
|
513
|
-
text-decoration: underline;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
:global(p),
|
|
517
|
-
:global(li) {
|
|
518
|
-
margin: var(--sui-paragraph-margin) 0;
|
|
519
|
-
line-height: var(--sui-line-height-comfortable);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
:global(ul),
|
|
523
|
-
:global(ol) {
|
|
524
|
-
padding-inline: 2em;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
:global(code),
|
|
528
|
-
:global(pre) {
|
|
529
|
-
border-radius: 4px;
|
|
530
|
-
background-color: var(--sui-code-background-color);
|
|
531
|
-
font-family: var(--sui-font-family-monospace);
|
|
532
|
-
font-size: var(--sui-font-size-monospace);
|
|
533
|
-
vertical-align: -0.05em;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
:global(pre) {
|
|
537
|
-
padding: 8px;
|
|
538
|
-
line-height: var(--sui-line-height-compact);
|
|
539
|
-
-webkit-user-select: text;
|
|
540
|
-
user-select: text;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
:global(code) {
|
|
544
|
-
padding: 2px 4px;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
:global(table) {
|
|
548
|
-
border-collapse: collapse;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
:global(th),
|
|
552
|
-
:global(td) {
|
|
553
|
-
border: 1px solid var(--sui-textbox-border-color);
|
|
554
|
-
padding: 8px;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
:global(blockquote) {
|
|
558
|
-
margin-inline: 16px 0;
|
|
559
|
-
border-inline-start: 4px solid var(--sui-textbox-border-color);
|
|
560
|
-
padding-inline-start: 12px;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
:global(.disabled),
|
|
564
|
-
:global(.readonly),
|
|
565
|
-
:global([aria-disabled=true]),
|
|
566
|
-
:global([aria-readonly=true]),
|
|
567
|
-
:global([inert]) {
|
|
568
|
-
cursor: default;
|
|
569
|
-
pointer-events: none;
|
|
570
|
-
-webkit-user-select: none;
|
|
571
|
-
user-select: none;
|
|
572
|
-
filter: grayscale(1) opacity(0.35);
|
|
573
|
-
}
|
|
574
|
-
:global(.disabled) :global(*),
|
|
575
|
-
:global(.readonly) :global(*),
|
|
576
|
-
:global([aria-disabled=true]) :global(*),
|
|
577
|
-
:global([aria-readonly=true]) :global(*),
|
|
578
|
-
:global([inert]) :global(*) {
|
|
579
|
-
filter: grayscale(0) opacity(1);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
:global(.disabled) :global(*),
|
|
583
|
-
:global(.readonly) :global(*),
|
|
584
|
-
:global([aria-disabled=true]) :global(*),
|
|
585
|
-
:global([aria-readonly=true]) :global(*),
|
|
586
|
-
:global([inert]) :global(*) {
|
|
587
|
-
cursor: default;
|
|
588
|
-
pointer-events: none;
|
|
589
|
-
-webkit-user-select: none;
|
|
590
|
-
user-select: none;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
:global(.font-loader) {
|
|
102
|
+
<style>.font-loader {
|
|
594
103
|
position: absolute;
|
|
595
104
|
left: -99999px;
|
|
596
105
|
font-family: var(--sui-font-family-default);
|
|
597
106
|
}
|
|
598
107
|
|
|
599
|
-
|
|
108
|
+
.app-shell {
|
|
600
109
|
position: fixed;
|
|
601
110
|
inset: 0;
|
|
602
111
|
overflow: hidden;
|
|
@@ -613,12 +122,12 @@
|
|
|
613
122
|
touch-action: none;
|
|
614
123
|
cursor: default;
|
|
615
124
|
}
|
|
616
|
-
|
|
125
|
+
.app-shell.horizontal {
|
|
617
126
|
display: flex;
|
|
618
127
|
flex-direction: row;
|
|
619
128
|
overflow: hidden;
|
|
620
129
|
}
|
|
621
|
-
|
|
130
|
+
.app-shell.vertical {
|
|
622
131
|
display: flex;
|
|
623
132
|
flex-direction: column;
|
|
624
133
|
overflow: hidden;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default AppShell;
|
|
2
|
+
type AppShell = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* Provide an application’s shell that makes the web app more like a native app. It also handles the
|
|
4
8
|
* dark/light mode switching. This component has to be placed directly under `<body>` (or
|
|
@@ -15,3 +19,14 @@ declare const AppShell: import("svelte").Component<{
|
|
|
15
19
|
*/
|
|
16
20
|
children?: import("svelte").Snippet<[]> | undefined;
|
|
17
21
|
} & Record<string, any>, {}, "">;
|
|
22
|
+
type Props = {
|
|
23
|
+
/**
|
|
24
|
+
* - Orientation of the app
|
|
25
|
+
* shell’s children..
|
|
26
|
+
*/
|
|
27
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* - Primary slot content.
|
|
30
|
+
*/
|
|
31
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
32
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Group;
|
|
2
|
+
type Group = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A generic group layout.
|
|
4
8
|
* @see https://w3c.github.io/aria/#group
|
|
@@ -22,3 +26,22 @@ declare const Group: import("svelte").Component<{
|
|
|
22
26
|
*/
|
|
23
27
|
children?: import("svelte").Snippet<[]> | undefined;
|
|
24
28
|
} & Record<string, any>, {}, "">;
|
|
29
|
+
type Props = {
|
|
30
|
+
/**
|
|
31
|
+
* - The `class` attribute on the wrapper element.
|
|
32
|
+
*/
|
|
33
|
+
class?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* - Whether to hide the widget.
|
|
36
|
+
*/
|
|
37
|
+
hidden?: boolean | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
40
|
+
* attribute.
|
|
41
|
+
*/
|
|
42
|
+
disabled?: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* - Primary slot content.
|
|
45
|
+
*/
|
|
46
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
47
|
+
};
|
|
@@ -95,23 +95,27 @@
|
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
const { returnValue } = dialog;
|
|
99
|
+
|
|
98
100
|
onClosing?.(new CustomEvent('Closing'));
|
|
101
|
+
// Prevent a button behind the `<dialog>` from being clicked erroneously (Svelte bug)
|
|
102
|
+
document.body.inert = true;
|
|
99
103
|
dialog.close();
|
|
104
|
+
document.body.inert = false;
|
|
100
105
|
setActiveClass = false;
|
|
101
106
|
setOpenClass = false;
|
|
102
107
|
await waitForTransition();
|
|
103
108
|
showContent = false;
|
|
104
109
|
|
|
105
|
-
if (
|
|
110
|
+
if (returnValue === 'ok') {
|
|
106
111
|
onOk?.(new CustomEvent('Ok'));
|
|
107
|
-
onClose?.(new CustomEvent('Close', { detail: { returnValue: 'ok' } }));
|
|
108
112
|
}
|
|
109
113
|
|
|
110
|
-
if (
|
|
114
|
+
if (returnValue === 'cancel') {
|
|
111
115
|
onCancel?.(new CustomEvent('Cancel'));
|
|
112
|
-
onClose?.(new CustomEvent('Close', { detail: { returnValue: 'cancel' } }));
|
|
113
116
|
}
|
|
114
117
|
|
|
118
|
+
onClose?.(new CustomEvent('Close', { detail: { returnValue } }));
|
|
115
119
|
dialog.returnValue = '';
|
|
116
120
|
};
|
|
117
121
|
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export default Modal;
|
|
2
|
+
type Modal = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ModalProps & Record<string, any>>): void;
|
|
5
|
+
} & {
|
|
6
|
+
close: (returnValue: string) => void;
|
|
7
|
+
};
|
|
2
8
|
/** A generic modal top-layer helper based on the HTML `<dialog>` element. */
|
|
3
9
|
declare const Modal: import("svelte").Component<import("../../typedefs").ModalProps & Record<string, any>, {
|
|
4
10
|
close: (returnValue: string) => void;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Placeholder;
|
|
2
|
+
type Placeholder = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/** @see https://github.com/sveltejs/svelte/issues/3088 */
|
|
3
7
|
declare const Placeholder: import("svelte").Component<{
|
|
4
8
|
/**
|
|
@@ -6,3 +10,9 @@ declare const Placeholder: import("svelte").Component<{
|
|
|
6
10
|
*/
|
|
7
11
|
children?: import("svelte").Snippet<[]> | undefined;
|
|
8
12
|
} & Record<string, any>, {}, "">;
|
|
13
|
+
type Props = {
|
|
14
|
+
/**
|
|
15
|
+
* - Primary slot content.
|
|
16
|
+
*/
|
|
17
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
18
|
+
};
|