@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/Radio.svelte
CHANGED
|
@@ -43,7 +43,7 @@ onMount(() => {
|
|
|
43
43
|
@component
|
|
44
44
|
A styled HTML input type=radio element with optional label.
|
|
45
45
|
-->
|
|
46
|
-
<div class="sterling-radio">
|
|
46
|
+
<div class="sterling-radio" class:disabled>
|
|
47
47
|
<div class="container">
|
|
48
48
|
<input
|
|
49
49
|
bind:this={radioRef}
|
|
@@ -56,6 +56,12 @@ onMount(() => {
|
|
|
56
56
|
on:change
|
|
57
57
|
on:change={onChange}
|
|
58
58
|
on:dblclick
|
|
59
|
+
on:dragend
|
|
60
|
+
on:dragenter
|
|
61
|
+
on:dragleave
|
|
62
|
+
on:dragover
|
|
63
|
+
on:dragstart
|
|
64
|
+
on:drop
|
|
59
65
|
on:focus
|
|
60
66
|
on:focusin
|
|
61
67
|
on:focusout
|
|
@@ -70,34 +76,30 @@ onMount(() => {
|
|
|
70
76
|
on:mouseover
|
|
71
77
|
on:mouseout
|
|
72
78
|
on:mouseup
|
|
73
|
-
on:toggle
|
|
74
79
|
on:wheel
|
|
75
80
|
{...$$restProps}
|
|
76
81
|
/>
|
|
77
82
|
<div class="indicator" />
|
|
78
83
|
</div>
|
|
79
84
|
{#if $$slots.default}
|
|
80
|
-
<
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
</Label>
|
|
86
|
-
</div>
|
|
85
|
+
<Label {disabled} for={id}>
|
|
86
|
+
<slot {checked} {disabled} {group} inputId={id} value={$$restProps.value}>
|
|
87
|
+
{$$restProps.value}
|
|
88
|
+
</slot>
|
|
89
|
+
</Label>
|
|
87
90
|
{/if}
|
|
88
91
|
</div>
|
|
89
92
|
|
|
90
93
|
<style>
|
|
91
94
|
.sterling-radio {
|
|
92
|
-
|
|
93
|
-
align-
|
|
94
|
-
align-items: stretch;
|
|
95
|
+
align-content: center;
|
|
96
|
+
align-items: center;
|
|
95
97
|
box-sizing: border-box;
|
|
98
|
+
display: inline-flex;
|
|
96
99
|
font: inherit;
|
|
97
|
-
|
|
100
|
+
margin: 0;
|
|
98
101
|
outline: none;
|
|
99
102
|
padding: 0;
|
|
100
|
-
margin: 0;
|
|
101
103
|
}
|
|
102
104
|
/*
|
|
103
105
|
The container
|
|
@@ -111,6 +113,7 @@ onMount(() => {
|
|
|
111
113
|
font: inherit;
|
|
112
114
|
display: flex;
|
|
113
115
|
align-items: center;
|
|
116
|
+
margin-right: 0.25em;
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
/*
|
|
@@ -151,6 +154,11 @@ onMount(() => {
|
|
|
151
154
|
border-color: var(--stsv-Input__border-color);
|
|
152
155
|
}
|
|
153
156
|
|
|
157
|
+
.sterling-radio:not(.disabled):hover .indicator {
|
|
158
|
+
background-color: var(--stsv-Input__background-color--hover);
|
|
159
|
+
border-color: var(--stsv-Input__border-color--hover);
|
|
160
|
+
}
|
|
161
|
+
|
|
154
162
|
input:focus-visible + .indicator {
|
|
155
163
|
outline-color: var(--stsv-Common__outline-color);
|
|
156
164
|
outline-offset: var(--stsv-Common__outline-offset);
|
|
@@ -158,11 +166,6 @@ onMount(() => {
|
|
|
158
166
|
outline-width: var(--stsv-Common__outline-width);
|
|
159
167
|
}
|
|
160
168
|
|
|
161
|
-
input:disabled + .indicator {
|
|
162
|
-
background-color: var(--stsv-Common__background-color--disabled);
|
|
163
|
-
border-color: var(--stsv-Common__border-color--disabled);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
169
|
.indicator::after {
|
|
167
170
|
background-color: transparent;
|
|
168
171
|
border-radius: 10000px;
|
|
@@ -180,18 +183,32 @@ onMount(() => {
|
|
|
180
183
|
background-color: var(--stsv-Input__color);
|
|
181
184
|
}
|
|
182
185
|
|
|
183
|
-
|
|
184
|
-
|
|
186
|
+
.sterling-radio.disabled * {
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.container::after {
|
|
191
|
+
background: var(--stsv-Disabled__background);
|
|
192
|
+
border-radius: 10000px;
|
|
193
|
+
bottom: 0;
|
|
194
|
+
content: '';
|
|
195
|
+
left: 0;
|
|
196
|
+
opacity: 0;
|
|
197
|
+
position: absolute;
|
|
198
|
+
right: 0;
|
|
199
|
+
top: 0;
|
|
200
|
+
pointer-events: none;
|
|
201
|
+
transition: opacity 250ms;
|
|
185
202
|
}
|
|
186
203
|
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
margin-top: 0.25em;
|
|
204
|
+
.sterling-radio.disabled .container::after {
|
|
205
|
+
opacity: 1;
|
|
190
206
|
}
|
|
191
207
|
|
|
192
208
|
@media (prefers-reduced-motion) {
|
|
193
209
|
.indicator,
|
|
194
|
-
.indicator::after
|
|
210
|
+
.indicator::after,
|
|
211
|
+
.container::after {
|
|
195
212
|
transition: none;
|
|
196
213
|
}
|
|
197
214
|
}
|
package/Radio.svelte.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ declare const __propDef: {
|
|
|
15
15
|
click: MouseEvent;
|
|
16
16
|
change: Event;
|
|
17
17
|
dblclick: MouseEvent;
|
|
18
|
+
dragend: DragEvent;
|
|
19
|
+
dragenter: DragEvent;
|
|
20
|
+
dragleave: DragEvent;
|
|
21
|
+
dragover: DragEvent;
|
|
22
|
+
dragstart: DragEvent;
|
|
23
|
+
drop: DragEvent;
|
|
18
24
|
focus: FocusEvent;
|
|
19
25
|
focusin: FocusEvent;
|
|
20
26
|
focusout: FocusEvent;
|
|
@@ -29,7 +35,6 @@ declare const __propDef: {
|
|
|
29
35
|
mouseover: MouseEvent;
|
|
30
36
|
mouseout: MouseEvent;
|
|
31
37
|
mouseup: MouseEvent;
|
|
32
|
-
toggle: Event;
|
|
33
38
|
wheel: WheelEvent;
|
|
34
39
|
} & {
|
|
35
40
|
[evt: string]: CustomEvent<any>;
|
package/Select.svelte
CHANGED
|
@@ -176,6 +176,12 @@ const onListSelect = (event) => {
|
|
|
176
176
|
on:copy
|
|
177
177
|
on:cut
|
|
178
178
|
on:dblclick
|
|
179
|
+
on:dragend
|
|
180
|
+
on:dragenter
|
|
181
|
+
on:dragleave
|
|
182
|
+
on:dragover
|
|
183
|
+
on:dragstart
|
|
184
|
+
on:drop
|
|
179
185
|
on:focus
|
|
180
186
|
on:focusin
|
|
181
187
|
on:focusout
|
|
@@ -249,6 +255,7 @@ const onListSelect = (event) => {
|
|
|
249
255
|
grid-template-rows: auto;
|
|
250
256
|
outline: none;
|
|
251
257
|
padding: 0;
|
|
258
|
+
position: relative;
|
|
252
259
|
transition: background-color 250ms, color 250ms, border-color 250ms;
|
|
253
260
|
}
|
|
254
261
|
|
|
@@ -269,13 +276,27 @@ const onListSelect = (event) => {
|
|
|
269
276
|
}
|
|
270
277
|
|
|
271
278
|
.sterling-select.disabled {
|
|
272
|
-
background-color: var(--stsv-Common__background-color--disabled);
|
|
273
|
-
border-color: var(--stsv--Common__border-color--disabled);
|
|
274
|
-
color: var(--stsv-Common__color--disabled);
|
|
275
279
|
cursor: not-allowed;
|
|
276
280
|
outline: none;
|
|
277
281
|
}
|
|
278
282
|
|
|
283
|
+
.sterling-select::after {
|
|
284
|
+
background: var(--stsv-Disabled__background);
|
|
285
|
+
bottom: 0;
|
|
286
|
+
content: '';
|
|
287
|
+
left: 0;
|
|
288
|
+
opacity: 0;
|
|
289
|
+
position: absolute;
|
|
290
|
+
right: 0;
|
|
291
|
+
top: 0;
|
|
292
|
+
pointer-events: none;
|
|
293
|
+
transition: opacity 250ms;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.sterling-select.disabled::after {
|
|
297
|
+
opacity: 1;
|
|
298
|
+
}
|
|
299
|
+
|
|
279
300
|
.sterling-select.composed,
|
|
280
301
|
.sterling-select.composed:hover,
|
|
281
302
|
.sterling-select.composed.focus,
|
|
@@ -285,6 +306,10 @@ const onListSelect = (event) => {
|
|
|
285
306
|
outline: none;
|
|
286
307
|
}
|
|
287
308
|
|
|
309
|
+
.sterling-select.composed.disabled::after {
|
|
310
|
+
opacity: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
288
313
|
.value {
|
|
289
314
|
padding: 0.5em;
|
|
290
315
|
}
|
|
@@ -349,7 +374,8 @@ const onListSelect = (event) => {
|
|
|
349
374
|
}
|
|
350
375
|
|
|
351
376
|
@media (prefers-reduced-motion) {
|
|
352
|
-
.sterling-select
|
|
377
|
+
.sterling-select,
|
|
378
|
+
.sterling-select::after {
|
|
353
379
|
transition: none;
|
|
354
380
|
}
|
|
355
381
|
}
|
package/Select.svelte.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ declare const __propDef: {
|
|
|
17
17
|
copy: ClipboardEvent;
|
|
18
18
|
cut: ClipboardEvent;
|
|
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/Slider.svelte
CHANGED
|
@@ -146,6 +146,12 @@ Slider lets the user chose a value within a min/max range by dragging a thumb bu
|
|
|
146
146
|
on:blur
|
|
147
147
|
on:click
|
|
148
148
|
on:dblclick
|
|
149
|
+
on:dragend
|
|
150
|
+
on:dragenter
|
|
151
|
+
on:dragleave
|
|
152
|
+
on:dragover
|
|
153
|
+
on:dragstart
|
|
154
|
+
on:drop
|
|
149
155
|
on:focus
|
|
150
156
|
on:focusin
|
|
151
157
|
on:focusout
|
|
@@ -230,6 +236,7 @@ Slider lets the user chose a value within a min/max range by dragging a thumb bu
|
|
|
230
236
|
height: 1.5em;
|
|
231
237
|
overflow: hidden;
|
|
232
238
|
padding: 0;
|
|
239
|
+
position: relative;
|
|
233
240
|
text-decoration: none;
|
|
234
241
|
transition: background-color 250ms, color 250ms, border-color 250ms;
|
|
235
242
|
white-space: nowrap;
|
|
@@ -321,19 +328,26 @@ Slider lets the user chose a value within a min/max range by dragging a thumb bu
|
|
|
321
328
|
|
|
322
329
|
/* ----- disabled ----- */
|
|
323
330
|
|
|
324
|
-
.sterling-slider.disabled .
|
|
325
|
-
|
|
331
|
+
.sterling-slider.disabled .thumb {
|
|
332
|
+
cursor: not-allowed;
|
|
333
|
+
outline: none;
|
|
326
334
|
}
|
|
327
335
|
|
|
328
|
-
.sterling-slider
|
|
329
|
-
background: var(--stsv-
|
|
336
|
+
.sterling-slider .thumb::after {
|
|
337
|
+
background: var(--stsv-Disabled__background);
|
|
338
|
+
bottom: 0;
|
|
339
|
+
content: '';
|
|
340
|
+
left: 0;
|
|
341
|
+
opacity: 0;
|
|
342
|
+
position: absolute;
|
|
343
|
+
right: 0;
|
|
344
|
+
top: 0;
|
|
345
|
+
pointer-events: none;
|
|
346
|
+
transition: opacity 250ms;
|
|
330
347
|
}
|
|
331
348
|
|
|
332
|
-
.sterling-slider.disabled .thumb {
|
|
333
|
-
|
|
334
|
-
border-color: var(--stsv-Common__border-color--disabled);
|
|
335
|
-
color: var(--stsv-Common__color--disabled);
|
|
336
|
-
cursor: not-allowed;
|
|
349
|
+
.sterling-slider.disabled .thumb::after {
|
|
350
|
+
opacity: 1;
|
|
337
351
|
}
|
|
338
352
|
|
|
339
353
|
.sterling-slider.composed,
|
|
@@ -349,7 +363,8 @@ Slider lets the user chose a value within a min/max range by dragging a thumb bu
|
|
|
349
363
|
.sterling-slider,
|
|
350
364
|
.track,
|
|
351
365
|
.fill,
|
|
352
|
-
.thumb
|
|
366
|
+
.thumb,
|
|
367
|
+
.thumb::after {
|
|
353
368
|
transition: none;
|
|
354
369
|
}
|
|
355
370
|
}
|
package/Slider.svelte.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ declare const __propDef: {
|
|
|
18
18
|
blur: FocusEvent;
|
|
19
19
|
click: MouseEvent;
|
|
20
20
|
dblclick: MouseEvent;
|
|
21
|
+
dragend: DragEvent;
|
|
22
|
+
dragenter: DragEvent;
|
|
23
|
+
dragleave: DragEvent;
|
|
24
|
+
dragover: DragEvent;
|
|
25
|
+
dragstart: DragEvent;
|
|
26
|
+
drop: DragEvent;
|
|
21
27
|
focus: FocusEvent;
|
|
22
28
|
focusin: FocusEvent;
|
|
23
29
|
focusout: FocusEvent;
|
package/Switch.svelte
CHANGED
|
@@ -49,6 +49,12 @@ export const focus = (options) => {
|
|
|
49
49
|
on:click
|
|
50
50
|
on:change
|
|
51
51
|
on:dblclick
|
|
52
|
+
on:dragend
|
|
53
|
+
on:dragenter
|
|
54
|
+
on:dragleave
|
|
55
|
+
on:dragover
|
|
56
|
+
on:dragstart
|
|
57
|
+
on:drop
|
|
52
58
|
on:focus
|
|
53
59
|
on:focusin
|
|
54
60
|
on:focusout
|
|
@@ -63,7 +69,6 @@ export const focus = (options) => {
|
|
|
63
69
|
on:mouseover
|
|
64
70
|
on:mouseout
|
|
65
71
|
on:mouseup
|
|
66
|
-
on:toggle
|
|
67
72
|
on:wheel
|
|
68
73
|
{...$$restProps}
|
|
69
74
|
/>
|
|
@@ -103,6 +108,14 @@ export const focus = (options) => {
|
|
|
103
108
|
position: relative;
|
|
104
109
|
}
|
|
105
110
|
|
|
111
|
+
.sterling-switch input {
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.sterling-switch.disabled input {
|
|
116
|
+
cursor: not-allowed;
|
|
117
|
+
}
|
|
118
|
+
|
|
106
119
|
.sterling-switch:not(.vertical) {
|
|
107
120
|
align-items: center;
|
|
108
121
|
column-gap: 0.5em;
|
|
@@ -170,12 +183,6 @@ export const focus = (options) => {
|
|
|
170
183
|
outline-width: var(--stsv-Common__outline-width);
|
|
171
184
|
}
|
|
172
185
|
|
|
173
|
-
.sterling-switch.disabled .switch {
|
|
174
|
-
background-color: var(--stsv-Common__background-color--disabled);
|
|
175
|
-
border-color: var(--stsv-Common__border-color--disabled);
|
|
176
|
-
color: var(--stsv-Common__color--disabled);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
186
|
.sterling-switch:not(.vertical) .switch {
|
|
180
187
|
width: 2em;
|
|
181
188
|
height: 1.25em;
|
|
@@ -199,7 +206,6 @@ export const focus = (options) => {
|
|
|
199
206
|
border-width: var(--stsv-Button__border-width);
|
|
200
207
|
box-sizing: border-box;
|
|
201
208
|
color: var(--stsv-Button__color);
|
|
202
|
-
cursor: pointer;
|
|
203
209
|
display: block;
|
|
204
210
|
font: inherit;
|
|
205
211
|
height: 1.25em;
|
|
@@ -220,10 +226,21 @@ export const focus = (options) => {
|
|
|
220
226
|
color: var(--stsv-Button__color--hover);
|
|
221
227
|
}
|
|
222
228
|
|
|
223
|
-
.sterling-switch
|
|
224
|
-
background
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
.sterling-switch .thumb::after {
|
|
230
|
+
background: var(--stsv-Disabled__background);
|
|
231
|
+
bottom: 0;
|
|
232
|
+
content: '';
|
|
233
|
+
left: 0;
|
|
234
|
+
opacity: 0;
|
|
235
|
+
position: absolute;
|
|
236
|
+
right: 0;
|
|
237
|
+
top: 0;
|
|
238
|
+
pointer-events: none;
|
|
239
|
+
transition: opacity 250ms;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.sterling-switch.disabled .thumb::after {
|
|
243
|
+
opacity: 1;
|
|
227
244
|
}
|
|
228
245
|
|
|
229
246
|
.sterling-switch:not(.vertical) .thumb {
|
|
@@ -235,4 +252,12 @@ export const focus = (options) => {
|
|
|
235
252
|
left: calc(-1 * var(--stsv-Button__border-width));
|
|
236
253
|
transform: translateY(calc(var(--thumb-offset) - var(--stsv-Button__border-width)));
|
|
237
254
|
}
|
|
255
|
+
|
|
256
|
+
@media (prefers-reduced-motion) {
|
|
257
|
+
.switch,
|
|
258
|
+
.thumb,
|
|
259
|
+
.thumb::after {
|
|
260
|
+
transition: none;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
238
263
|
</style>
|
package/Switch.svelte.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ declare const __propDef: {
|
|
|
16
16
|
click: MouseEvent;
|
|
17
17
|
change: Event;
|
|
18
18
|
dblclick: MouseEvent;
|
|
19
|
+
dragend: DragEvent;
|
|
20
|
+
dragenter: DragEvent;
|
|
21
|
+
dragleave: DragEvent;
|
|
22
|
+
dragover: DragEvent;
|
|
23
|
+
dragstart: DragEvent;
|
|
24
|
+
drop: DragEvent;
|
|
19
25
|
focus: FocusEvent;
|
|
20
26
|
focusin: FocusEvent;
|
|
21
27
|
focusout: FocusEvent;
|
|
@@ -30,7 +36,6 @@ declare const __propDef: {
|
|
|
30
36
|
mouseover: MouseEvent;
|
|
31
37
|
mouseout: MouseEvent;
|
|
32
38
|
mouseup: MouseEvent;
|
|
33
|
-
toggle: Event;
|
|
34
39
|
wheel: WheelEvent;
|
|
35
40
|
} & {
|
|
36
41
|
[evt: string]: CustomEvent<any>;
|
package/Tab.svelte
CHANGED
|
@@ -47,6 +47,12 @@ export const focus = (options) => {
|
|
|
47
47
|
on:blur
|
|
48
48
|
on:click
|
|
49
49
|
on:dblclick
|
|
50
|
+
on:dragend
|
|
51
|
+
on:dragenter
|
|
52
|
+
on:dragleave
|
|
53
|
+
on:dragover
|
|
54
|
+
on:dragstart
|
|
55
|
+
on:drop
|
|
50
56
|
on:focus
|
|
51
57
|
on:focusin
|
|
52
58
|
on:focusout
|
|
@@ -96,6 +102,7 @@ export const focus = (options) => {
|
|
|
96
102
|
font: inherit;
|
|
97
103
|
overflow: hidden;
|
|
98
104
|
padding: 0.5em 1em 0.25em 1em;
|
|
105
|
+
position: relative;
|
|
99
106
|
text-decoration: none;
|
|
100
107
|
text-overflow: ellipsis;
|
|
101
108
|
transition: background-color 250ms, color 250ms, border-color 250ms;
|
|
@@ -138,8 +145,25 @@ export const focus = (options) => {
|
|
|
138
145
|
}
|
|
139
146
|
|
|
140
147
|
.sterling-tab:disabled {
|
|
141
|
-
color: var(--stsv-Common__color--disabled);
|
|
142
148
|
cursor: not-allowed;
|
|
149
|
+
outline: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.sterling-tab::after {
|
|
153
|
+
background: var(--stsv-Disabled__background);
|
|
154
|
+
bottom: 0;
|
|
155
|
+
content: '';
|
|
156
|
+
left: 0;
|
|
157
|
+
opacity: 0;
|
|
158
|
+
position: absolute;
|
|
159
|
+
right: 0;
|
|
160
|
+
top: 0;
|
|
161
|
+
pointer-events: none;
|
|
162
|
+
transition: opacity 250ms;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.sterling-tab:disabled::after {
|
|
166
|
+
opacity: 1;
|
|
143
167
|
}
|
|
144
168
|
|
|
145
169
|
.content {
|
|
@@ -184,7 +208,11 @@ export const focus = (options) => {
|
|
|
184
208
|
background-color: var(--stsv-Input__color);
|
|
185
209
|
}
|
|
186
210
|
|
|
187
|
-
|
|
188
|
-
|
|
211
|
+
@media (prefers-reduced-motion) {
|
|
212
|
+
.sterling-tab,
|
|
213
|
+
.sterling-tab::after,
|
|
214
|
+
.indicator {
|
|
215
|
+
transition: none;
|
|
216
|
+
}
|
|
189
217
|
}
|
|
190
218
|
</style>
|
package/Tab.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/TabList.svelte
CHANGED
|
@@ -193,6 +193,12 @@ setContext(TAB_LIST_CONTEXT_KEY, {
|
|
|
193
193
|
on:copy
|
|
194
194
|
on:cut
|
|
195
195
|
on:dblclick
|
|
196
|
+
on:dragend
|
|
197
|
+
on:dragenter
|
|
198
|
+
on:dragleave
|
|
199
|
+
on:dragover
|
|
200
|
+
on:dragstart
|
|
201
|
+
on:drop
|
|
196
202
|
on:focus
|
|
197
203
|
on:focusin
|
|
198
204
|
on:focusout
|
|
@@ -228,7 +234,7 @@ setContext(TAB_LIST_CONTEXT_KEY, {
|
|
|
228
234
|
grid-auto-flow: column;
|
|
229
235
|
grid-template-columns: repeat(auto-fill, auto);
|
|
230
236
|
grid-template-rows: 1fr;
|
|
231
|
-
overflow-x:
|
|
237
|
+
overflow-x: auto;
|
|
232
238
|
overflow-y: hidden;
|
|
233
239
|
}
|
|
234
240
|
|
|
@@ -237,7 +243,7 @@ setContext(TAB_LIST_CONTEXT_KEY, {
|
|
|
237
243
|
grid-template-rows: auto;
|
|
238
244
|
grid-template-columns: 1fr;
|
|
239
245
|
overflow-x: hidden;
|
|
240
|
-
overflow-y:
|
|
246
|
+
overflow-y: auto;
|
|
241
247
|
row-gap: 0.5em;
|
|
242
248
|
}
|
|
243
249
|
|
package/TabList.svelte.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ declare const __propDef: {
|
|
|
18
18
|
copy: ClipboardEvent;
|
|
19
19
|
cut: ClipboardEvent;
|
|
20
20
|
dblclick: MouseEvent;
|
|
21
|
+
dragend: DragEvent;
|
|
22
|
+
dragenter: DragEvent;
|
|
23
|
+
dragleave: DragEvent;
|
|
24
|
+
dragover: DragEvent;
|
|
25
|
+
dragstart: DragEvent;
|
|
26
|
+
drop: DragEvent;
|
|
21
27
|
focus: FocusEvent;
|
|
22
28
|
focusin: FocusEvent;
|
|
23
29
|
focusout: FocusEvent;
|