@geoffcox/sterling-svelte 0.0.22 → 0.0.24
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/Button.svelte +24 -22
- package/Button.svelte.d.ts +8 -0
- package/Checkbox.svelte +54 -29
- package/Checkbox.svelte.d.ts +6 -1
- package/Dropdown.svelte +32 -7
- package/Dropdown.svelte.d.ts +6 -0
- package/Field.svelte +17 -12
- package/Field.svelte.d.ts +6 -0
- package/Input.svelte +78 -53
- package/Input.svelte.d.ts +7 -0
- package/Label.svelte +6 -0
- package/Label.svelte.d.ts +6 -0
- package/Link.svelte +6 -0
- package/Link.svelte.d.ts +6 -0
- package/List.svelte +52 -16
- package/List.svelte.d.ts +6 -0
- package/ListItem.svelte +36 -7
- package/ListItem.svelte.d.ts +6 -0
- package/Menu.svelte +7 -1
- package/Menu.svelte.d.ts +6 -0
- package/MenuBar.svelte +6 -0
- package/MenuBar.svelte.d.ts +6 -0
- package/MenuButton.svelte +6 -0
- package/MenuButton.svelte.d.ts +6 -0
- package/MenuItem.svelte +12 -7
- package/MenuItem.svelte.d.ts +6 -0
- package/MenuItemDisplay.svelte +33 -2
- package/MenuItemDisplay.svelte.d.ts +1 -0
- package/MenuSeparator.svelte +6 -0
- package/MenuSeparator.svelte.d.ts +12 -0
- package/Progress.svelte +6 -13
- package/Progress.svelte.d.ts +6 -1
- package/Radio.svelte +42 -25
- package/Radio.svelte.d.ts +6 -1
- package/Select.svelte +30 -4
- package/Select.svelte.d.ts +6 -0
- package/Slider.svelte +25 -10
- package/Slider.svelte.d.ts +6 -0
- package/Switch.svelte +37 -12
- package/Switch.svelte.d.ts +6 -1
- package/Tab.svelte +31 -3
- package/Tab.svelte.d.ts +6 -0
- package/TabList.svelte +8 -2
- package/TabList.svelte.d.ts +6 -0
- package/TextArea.svelte +81 -49
- package/TextArea.svelte.d.ts +8 -0
- package/Tooltip.svelte +0 -1
- package/Tree.svelte +50 -13
- package/Tree.svelte.d.ts +6 -0
- package/TreeChevron.svelte +6 -0
- package/TreeChevron.svelte.d.ts +6 -0
- package/TreeItem.svelte +14 -8
- package/TreeItem.svelte.d.ts +6 -1
- package/TreeItemDisplay.svelte +42 -11
- package/TreeItemDisplay.svelte.d.ts +6 -0
- package/package.json +3 -3
- package/theme/darkTheme.js +9 -0
- package/theme/lightTheme.js +9 -0
package/Link.svelte
CHANGED
package/Link.svelte.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ declare const __propDef: {
|
|
|
13
13
|
blur: FocusEvent;
|
|
14
14
|
click: MouseEvent;
|
|
15
15
|
dblclick: MouseEvent;
|
|
16
|
+
dragend: DragEvent;
|
|
17
|
+
dragenter: DragEvent;
|
|
18
|
+
dragleave: DragEvent;
|
|
19
|
+
dragover: DragEvent;
|
|
20
|
+
dragstart: DragEvent;
|
|
21
|
+
drop: DragEvent;
|
|
16
22
|
focus: FocusEvent;
|
|
17
23
|
focusin: FocusEvent;
|
|
18
24
|
focusout: FocusEvent;
|
package/List.svelte
CHANGED
|
@@ -206,6 +206,12 @@ A list of items where a single item can be selected.
|
|
|
206
206
|
on:copy
|
|
207
207
|
on:cut
|
|
208
208
|
on:dblclick
|
|
209
|
+
on:dragend
|
|
210
|
+
on:dragenter
|
|
211
|
+
on:dragleave
|
|
212
|
+
on:dragover
|
|
213
|
+
on:dragstart
|
|
214
|
+
on:drop
|
|
209
215
|
on:focus
|
|
210
216
|
on:focusin
|
|
211
217
|
on:focusout
|
|
@@ -225,7 +231,9 @@ A list of items where a single item can be selected.
|
|
|
225
231
|
on:paste
|
|
226
232
|
{...$$restProps}
|
|
227
233
|
>
|
|
228
|
-
<
|
|
234
|
+
<div class="container">
|
|
235
|
+
<slot {composed} {disabled} {horizontal} {selectedValue} />
|
|
236
|
+
</div>
|
|
229
237
|
</div>
|
|
230
238
|
|
|
231
239
|
<style>
|
|
@@ -237,13 +245,10 @@ A list of items where a single item can be selected.
|
|
|
237
245
|
border-width: var(--stsv-Common__border-width);
|
|
238
246
|
box-sizing: border-box;
|
|
239
247
|
color: var(--stsv-Common__color);
|
|
240
|
-
display: flex;
|
|
241
|
-
flex-direction: column;
|
|
242
|
-
flex-wrap: nowrap;
|
|
243
248
|
height: 100%;
|
|
244
|
-
margin: 0;
|
|
245
249
|
overflow-x: hidden;
|
|
246
|
-
overflow-y:
|
|
250
|
+
overflow-y: auto;
|
|
251
|
+
margin: 0;
|
|
247
252
|
outline: none;
|
|
248
253
|
padding: 0;
|
|
249
254
|
position: relative;
|
|
@@ -251,9 +256,8 @@ A list of items where a single item can be selected.
|
|
|
251
256
|
}
|
|
252
257
|
|
|
253
258
|
.sterling-list.horizontal {
|
|
254
|
-
flex-direction: row;
|
|
255
259
|
height: unset;
|
|
256
|
-
overflow-x:
|
|
260
|
+
overflow-x: auto;
|
|
257
261
|
overflow-y: hidden;
|
|
258
262
|
width: 100%;
|
|
259
263
|
}
|
|
@@ -272,13 +276,6 @@ A list of items where a single item can be selected.
|
|
|
272
276
|
outline-width: var(--stsv-Common__outline-width);
|
|
273
277
|
}
|
|
274
278
|
|
|
275
|
-
.sterling-list.disabled {
|
|
276
|
-
background-color: var(--stsv-Common__background-color--disabled);
|
|
277
|
-
border-color: var(--stsv--Common__border-color--disabled);
|
|
278
|
-
color: var(--stsv-Common__color--disabled);
|
|
279
|
-
cursor: not-allowed;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
279
|
.sterling-list.composed,
|
|
283
280
|
.sterling-list.composed:hover,
|
|
284
281
|
.sterling-list.composed.using-keyboard:focus-within,
|
|
@@ -288,8 +285,47 @@ A list of items where a single item can be selected.
|
|
|
288
285
|
outline: none;
|
|
289
286
|
}
|
|
290
287
|
|
|
288
|
+
.sterling-list.disabled * {
|
|
289
|
+
cursor: not-allowed;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* ----- container - a layout panel that grows with the items ----- */
|
|
293
|
+
|
|
294
|
+
.container {
|
|
295
|
+
display: flex;
|
|
296
|
+
position: relative;
|
|
297
|
+
flex-direction: column;
|
|
298
|
+
flex-wrap: nowrap;
|
|
299
|
+
width: fit-content;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.sterling-list.horizontal .container {
|
|
303
|
+
flex-direction: row;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.container::after {
|
|
307
|
+
background: var(--stsv-Disabled__background);
|
|
308
|
+
content: '';
|
|
309
|
+
bottom: 0;
|
|
310
|
+
left: 0;
|
|
311
|
+
opacity: 0;
|
|
312
|
+
position: absolute;
|
|
313
|
+
right: 0;
|
|
314
|
+
top: 0;
|
|
315
|
+
height: 100%;
|
|
316
|
+
pointer-events: none;
|
|
317
|
+
transition: opacity 250ms;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.sterling-list.disabled .container::after {
|
|
321
|
+
opacity: 1;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* ----- media queries ----- */
|
|
325
|
+
|
|
291
326
|
@media (prefers-reduced-motion) {
|
|
292
|
-
.sterling-list
|
|
327
|
+
.sterling-list,
|
|
328
|
+
.container::after {
|
|
293
329
|
transition: none;
|
|
294
330
|
}
|
|
295
331
|
}
|
package/List.svelte.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ declare const __propDef: {
|
|
|
21
21
|
copy: ClipboardEvent;
|
|
22
22
|
cut: ClipboardEvent;
|
|
23
23
|
dblclick: MouseEvent;
|
|
24
|
+
dragend: DragEvent;
|
|
25
|
+
dragenter: DragEvent;
|
|
26
|
+
dragleave: DragEvent;
|
|
27
|
+
dragover: DragEvent;
|
|
28
|
+
dragstart: DragEvent;
|
|
29
|
+
drop: DragEvent;
|
|
24
30
|
focus: FocusEvent;
|
|
25
31
|
focusin: FocusEvent;
|
|
26
32
|
focusout: FocusEvent;
|
package/ListItem.svelte
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
<script>import { getContext } from "svelte";
|
|
2
2
|
import { LIST_CONTEXT_KEY } from "./List.constants";
|
|
3
|
+
import { readable } from "svelte/store";
|
|
3
4
|
export let disabled = false;
|
|
4
5
|
export let value;
|
|
5
6
|
const {
|
|
6
7
|
disabled: listDisabled,
|
|
7
8
|
selectedValue,
|
|
8
9
|
horizontal
|
|
9
|
-
} = getContext(LIST_CONTEXT_KEY)
|
|
10
|
+
} = getContext(LIST_CONTEXT_KEY) || {
|
|
11
|
+
disabled: readable(false),
|
|
12
|
+
selectedValue: void 0,
|
|
13
|
+
horizontal: false
|
|
14
|
+
};
|
|
10
15
|
let itemRef;
|
|
11
|
-
$:
|
|
12
|
-
_disabled = disabled || $listDisabled;
|
|
13
16
|
$:
|
|
14
17
|
selected = $selectedValue === value;
|
|
15
18
|
export const click = () => {
|
|
@@ -27,13 +30,20 @@ export const focus = (options) => {
|
|
|
27
30
|
aria-selected={selected}
|
|
28
31
|
bind:this={itemRef}
|
|
29
32
|
class="sterling-list-item"
|
|
30
|
-
class:disabled={
|
|
33
|
+
class:disabled={disabled || $listDisabled}
|
|
34
|
+
class:item-disabled={disabled && !$listDisabled}
|
|
31
35
|
class:selected
|
|
32
36
|
data-value={value}
|
|
33
37
|
role="listitem"
|
|
34
38
|
on:blur
|
|
35
39
|
on:click
|
|
36
40
|
on:dblclick
|
|
41
|
+
on:dragend
|
|
42
|
+
on:dragenter
|
|
43
|
+
on:dragleave
|
|
44
|
+
on:dragover
|
|
45
|
+
on:dragstart
|
|
46
|
+
on:drop
|
|
37
47
|
on:focus
|
|
38
48
|
on:focusin
|
|
39
49
|
on:focusout
|
|
@@ -69,13 +79,14 @@ export const focus = (options) => {
|
|
|
69
79
|
cursor: pointer;
|
|
70
80
|
margin: 0;
|
|
71
81
|
padding: 0.5em;
|
|
82
|
+
position: relative;
|
|
72
83
|
outline: none;
|
|
73
84
|
text-overflow: ellipsis;
|
|
74
85
|
transition: background-color 250ms, color 250ms, border-color 250ms;
|
|
75
86
|
white-space: nowrap;
|
|
76
87
|
}
|
|
77
88
|
|
|
78
|
-
.sterling-list-item:not(.disabled):hover {
|
|
89
|
+
.sterling-list-item:not(.disabled):not(.selected):hover {
|
|
79
90
|
background-color: var(--stsv-Button__background-color--hover);
|
|
80
91
|
color: var(--stsv-Button__color--hover);
|
|
81
92
|
}
|
|
@@ -86,12 +97,30 @@ export const focus = (options) => {
|
|
|
86
97
|
}
|
|
87
98
|
|
|
88
99
|
.sterling-list-item.disabled {
|
|
89
|
-
color: var(--stsv-Common__color--disabled);
|
|
90
100
|
cursor: not-allowed;
|
|
101
|
+
outline: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.sterling-list-item::after {
|
|
105
|
+
background: var(--stsv-Disabled__background);
|
|
106
|
+
bottom: 0;
|
|
107
|
+
content: '';
|
|
108
|
+
left: 0;
|
|
109
|
+
opacity: 0;
|
|
110
|
+
position: absolute;
|
|
111
|
+
right: 0;
|
|
112
|
+
top: 0;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
transition: opacity 250ms;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.sterling-list-item.item-disabled::after {
|
|
118
|
+
opacity: 1;
|
|
91
119
|
}
|
|
92
120
|
|
|
93
121
|
@media (prefers-reduced-motion) {
|
|
94
|
-
.sterling-list-item
|
|
122
|
+
.sterling-list-item,
|
|
123
|
+
.sterling-list-item::after {
|
|
95
124
|
transition: none;
|
|
96
125
|
}
|
|
97
126
|
}
|
package/ListItem.svelte.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ declare const __propDef: {
|
|
|
12
12
|
blur: FocusEvent;
|
|
13
13
|
click: MouseEvent;
|
|
14
14
|
dblclick: MouseEvent;
|
|
15
|
+
dragend: DragEvent;
|
|
16
|
+
dragenter: DragEvent;
|
|
17
|
+
dragleave: DragEvent;
|
|
18
|
+
dragover: DragEvent;
|
|
19
|
+
dragstart: DragEvent;
|
|
20
|
+
drop: DragEvent;
|
|
15
21
|
focus: FocusEvent;
|
|
16
22
|
focusin: FocusEvent;
|
|
17
23
|
focusout: FocusEvent;
|
package/Menu.svelte
CHANGED
|
@@ -80,6 +80,12 @@ onMount(() => {
|
|
|
80
80
|
on:copy
|
|
81
81
|
on:cut
|
|
82
82
|
on:dblclick
|
|
83
|
+
on:dragend
|
|
84
|
+
on:dragenter
|
|
85
|
+
on:dragleave
|
|
86
|
+
on:dragover
|
|
87
|
+
on:dragstart
|
|
88
|
+
on:drop
|
|
83
89
|
on:focus
|
|
84
90
|
on:focusin
|
|
85
91
|
on:focusout
|
|
@@ -127,7 +133,7 @@ onMount(() => {
|
|
|
127
133
|
height: fit-content;
|
|
128
134
|
left: 0;
|
|
129
135
|
max-height: calc(50vh);
|
|
130
|
-
overflow:
|
|
136
|
+
overflow: auto;
|
|
131
137
|
overscroll-behavior: contain;
|
|
132
138
|
padding: 0.25em;
|
|
133
139
|
position: absolute;
|
package/Menu.svelte.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ declare const __propDef: {
|
|
|
13
13
|
copy: ClipboardEvent;
|
|
14
14
|
cut: ClipboardEvent;
|
|
15
15
|
dblclick: MouseEvent;
|
|
16
|
+
dragend: DragEvent;
|
|
17
|
+
dragenter: DragEvent;
|
|
18
|
+
dragleave: DragEvent;
|
|
19
|
+
dragover: DragEvent;
|
|
20
|
+
dragstart: DragEvent;
|
|
21
|
+
drop: DragEvent;
|
|
16
22
|
focus: FocusEvent;
|
|
17
23
|
focusin: FocusEvent;
|
|
18
24
|
focusout: FocusEvent;
|
package/MenuBar.svelte
CHANGED
package/MenuBar.svelte.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ declare const __propDef: {
|
|
|
11
11
|
copy: ClipboardEvent;
|
|
12
12
|
cut: ClipboardEvent;
|
|
13
13
|
dblclick: MouseEvent;
|
|
14
|
+
dragend: DragEvent;
|
|
15
|
+
dragenter: DragEvent;
|
|
16
|
+
dragleave: DragEvent;
|
|
17
|
+
dragover: DragEvent;
|
|
18
|
+
dragstart: DragEvent;
|
|
19
|
+
drop: DragEvent;
|
|
14
20
|
focus: FocusEvent;
|
|
15
21
|
focusin: FocusEvent;
|
|
16
22
|
focusout: FocusEvent;
|
package/MenuButton.svelte
CHANGED
package/MenuButton.svelte.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ declare const __propDef: {
|
|
|
14
14
|
blur: FocusEvent;
|
|
15
15
|
click: MouseEvent;
|
|
16
16
|
dblclick: MouseEvent;
|
|
17
|
+
dragend: DragEvent;
|
|
18
|
+
dragenter: DragEvent;
|
|
19
|
+
dragleave: DragEvent;
|
|
20
|
+
dragover: DragEvent;
|
|
21
|
+
dragstart: DragEvent;
|
|
22
|
+
drop: DragEvent;
|
|
17
23
|
focus: FocusEvent;
|
|
18
24
|
focusin: FocusEvent;
|
|
19
25
|
focusout: FocusEvent;
|
package/MenuItem.svelte
CHANGED
|
@@ -110,7 +110,7 @@ afterUpdate(() => {
|
|
|
110
110
|
prevOpen = open;
|
|
111
111
|
});
|
|
112
112
|
const onKeyDown = (event) => {
|
|
113
|
-
if (!event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
113
|
+
if (!disabled && !event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
114
114
|
switch (event.key) {
|
|
115
115
|
case "ArrowDown":
|
|
116
116
|
if (depth === 0 && hasChildren) {
|
|
@@ -241,6 +241,12 @@ setContext(MENU_ITEM_CONTEXT_KEY, {
|
|
|
241
241
|
on:blur
|
|
242
242
|
on:click
|
|
243
243
|
on:dblclick
|
|
244
|
+
on:dragend
|
|
245
|
+
on:dragenter
|
|
246
|
+
on:dragleave
|
|
247
|
+
on:dragover
|
|
248
|
+
on:dragstart
|
|
249
|
+
on:drop
|
|
244
250
|
on:focus
|
|
245
251
|
on:focusin
|
|
246
252
|
on:focusout
|
|
@@ -271,8 +277,11 @@ setContext(MENU_ITEM_CONTEXT_KEY, {
|
|
|
271
277
|
>
|
|
272
278
|
<div class="item" id={displayId}>
|
|
273
279
|
<slot name="item" {checked} {depth} {disabled} {hasChildren} {open} {role} {text} {value}>
|
|
274
|
-
<MenuItemDisplay
|
|
275
|
-
|
|
280
|
+
<MenuItemDisplay
|
|
281
|
+
{checked}
|
|
282
|
+
{disabled}
|
|
283
|
+
hasChildren={depth > 0 && hasChildren}
|
|
284
|
+
menuItemRole={role}>{text}</MenuItemDisplay
|
|
276
285
|
>
|
|
277
286
|
</slot>
|
|
278
287
|
</div>
|
|
@@ -327,10 +336,6 @@ setContext(MENU_ITEM_CONTEXT_KEY, {
|
|
|
327
336
|
background-color: var(--stsv-Input__background-color--selected);
|
|
328
337
|
}
|
|
329
338
|
|
|
330
|
-
.sterling-menu-item.disabled {
|
|
331
|
-
color: var(--stsv-Common__color--disabled);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
339
|
.sterling-menu-item.composed,
|
|
335
340
|
.sterling-menu-item.composed:focus,
|
|
336
341
|
.sterling-menu-item.composed:hover {
|
package/MenuItem.svelte.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ declare const __propDef: {
|
|
|
17
17
|
blur: FocusEvent;
|
|
18
18
|
click: MouseEvent;
|
|
19
19
|
dblclick: MouseEvent;
|
|
20
|
+
dragend: DragEvent;
|
|
21
|
+
dragenter: DragEvent;
|
|
22
|
+
dragleave: DragEvent;
|
|
23
|
+
dragover: DragEvent;
|
|
24
|
+
dragstart: DragEvent;
|
|
25
|
+
drop: DragEvent;
|
|
20
26
|
focus: FocusEvent;
|
|
21
27
|
focusin: FocusEvent;
|
|
22
28
|
focusout: FocusEvent;
|
package/MenuItemDisplay.svelte
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script>export let checked = false;
|
|
2
|
+
export let disabled = false;
|
|
2
3
|
export let hasChildren = false;
|
|
3
4
|
export let menuItemRole = "menuitem";
|
|
4
5
|
</script>
|
|
5
6
|
|
|
6
|
-
<div class="menu-item-display">
|
|
7
|
+
<div class="sterling-menu-item-display" class:disabled>
|
|
7
8
|
<div
|
|
8
9
|
class="check"
|
|
9
10
|
class:checkmark={menuItemRole === 'menuitemcheckbox'}
|
|
@@ -23,7 +24,7 @@ export let menuItemRole = "menuitem";
|
|
|
23
24
|
</div>
|
|
24
25
|
|
|
25
26
|
<style>
|
|
26
|
-
.menu-item-display {
|
|
27
|
+
.sterling-menu-item-display {
|
|
27
28
|
align-items: center;
|
|
28
29
|
justify-items: flex-start;
|
|
29
30
|
display: grid;
|
|
@@ -94,4 +95,34 @@ export let menuItemRole = "menuitem";
|
|
|
94
95
|
border-top: 3px solid currentColor;
|
|
95
96
|
transform: translate(-50%, -50%) rotate(45deg);
|
|
96
97
|
}
|
|
98
|
+
|
|
99
|
+
.sterling-menu-item-display.disabled {
|
|
100
|
+
cursor: not-allowed;
|
|
101
|
+
outline: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.sterling-menu-item-display::after {
|
|
105
|
+
background: var(--stsv-Disabled__background);
|
|
106
|
+
bottom: 0;
|
|
107
|
+
content: '';
|
|
108
|
+
left: 0;
|
|
109
|
+
opacity: 0;
|
|
110
|
+
position: absolute;
|
|
111
|
+
right: 0;
|
|
112
|
+
top: 0;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
transition: opacity 250ms;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.sterling-menu-item-display.disabled::after {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (prefers-reduced-motion) {
|
|
122
|
+
.sterling-menu-item-display::after,
|
|
123
|
+
.check,
|
|
124
|
+
.check::after {
|
|
125
|
+
transition: none;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
97
128
|
</style>
|
|
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
checked?: boolean | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
5
6
|
hasChildren?: boolean | undefined;
|
|
6
7
|
menuItemRole?: "menuitem" | "menuitemcheckbox" | "menuitemradio" | undefined;
|
|
7
8
|
};
|
package/MenuSeparator.svelte
CHANGED
|
@@ -8,6 +8,12 @@ export default class MenuSeparator extends SvelteComponentTyped<{
|
|
|
8
8
|
blur: FocusEvent;
|
|
9
9
|
click: MouseEvent;
|
|
10
10
|
dblclick: MouseEvent;
|
|
11
|
+
dragend: DragEvent;
|
|
12
|
+
dragenter: DragEvent;
|
|
13
|
+
dragleave: DragEvent;
|
|
14
|
+
dragover: DragEvent;
|
|
15
|
+
dragstart: DragEvent;
|
|
16
|
+
drop: DragEvent;
|
|
11
17
|
focus: FocusEvent;
|
|
12
18
|
focusin: FocusEvent;
|
|
13
19
|
focusout: FocusEvent;
|
|
@@ -46,6 +52,12 @@ declare const __propDef: {
|
|
|
46
52
|
blur: FocusEvent;
|
|
47
53
|
click: MouseEvent;
|
|
48
54
|
dblclick: MouseEvent;
|
|
55
|
+
dragend: DragEvent;
|
|
56
|
+
dragenter: DragEvent;
|
|
57
|
+
dragleave: DragEvent;
|
|
58
|
+
dragover: DragEvent;
|
|
59
|
+
dragstart: DragEvent;
|
|
60
|
+
drop: DragEvent;
|
|
49
61
|
focus: FocusEvent;
|
|
50
62
|
focusin: FocusEvent;
|
|
51
63
|
focusout: FocusEvent;
|
package/Progress.svelte
CHANGED
|
@@ -3,7 +3,6 @@ export let max = 100;
|
|
|
3
3
|
export let percent = 0;
|
|
4
4
|
export let vertical = false;
|
|
5
5
|
export let colorful = "none";
|
|
6
|
-
export let disabled = false;
|
|
7
6
|
let clientHeight;
|
|
8
7
|
let clientWidth;
|
|
9
8
|
$:
|
|
@@ -34,12 +33,17 @@ $:
|
|
|
34
33
|
|
|
35
34
|
<div
|
|
36
35
|
class="sterling-progress"
|
|
37
|
-
class:disabled
|
|
38
36
|
class:vertical
|
|
39
37
|
role="progressbar"
|
|
40
38
|
on:blur
|
|
41
39
|
on:click
|
|
42
40
|
on:dblclick
|
|
41
|
+
on:dragend
|
|
42
|
+
on:dragenter
|
|
43
|
+
on:dragleave
|
|
44
|
+
on:dragover
|
|
45
|
+
on:dragstart
|
|
46
|
+
on:drop
|
|
43
47
|
on:focus
|
|
44
48
|
on:focusin
|
|
45
49
|
on:focusout
|
|
@@ -151,17 +155,6 @@ $:
|
|
|
151
155
|
background-color: var(--stsv-Error__border-color);
|
|
152
156
|
}
|
|
153
157
|
|
|
154
|
-
/* ----- Disabled ----- */
|
|
155
|
-
|
|
156
|
-
.sterling-progress.disabled {
|
|
157
|
-
background: var(--stsv-Common__background-color--disabled);
|
|
158
|
-
border-color: var(--stsv-Common__border-color--disabled);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.sterling-progress.disabled .indicator {
|
|
162
|
-
background-color: var(--stsv-Display__color--disabled);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
158
|
@media (prefers-reduced-motion) {
|
|
166
159
|
.sterling-progress,
|
|
167
160
|
.indicator {
|
package/Progress.svelte.d.ts
CHANGED
|
@@ -7,12 +7,17 @@ declare const __propDef: {
|
|
|
7
7
|
percent?: number | undefined;
|
|
8
8
|
vertical?: boolean | undefined;
|
|
9
9
|
colorful?: string | undefined;
|
|
10
|
-
disabled?: boolean | undefined;
|
|
11
10
|
};
|
|
12
11
|
events: {
|
|
13
12
|
blur: FocusEvent;
|
|
14
13
|
click: MouseEvent;
|
|
15
14
|
dblclick: MouseEvent;
|
|
15
|
+
dragend: DragEvent;
|
|
16
|
+
dragenter: DragEvent;
|
|
17
|
+
dragleave: DragEvent;
|
|
18
|
+
dragover: DragEvent;
|
|
19
|
+
dragstart: DragEvent;
|
|
20
|
+
drop: DragEvent;
|
|
16
21
|
focus: FocusEvent;
|
|
17
22
|
focusin: FocusEvent;
|
|
18
23
|
focusout: FocusEvent;
|