@softwareone/spi-sv5-library 1.10.3 → 1.10.4
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Attachment } from 'svelte/attachments';
|
|
3
4
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
4
5
|
|
|
5
6
|
type Variant = 'primary' | 'secondary' | 'outline' | 'outline-none';
|
|
@@ -19,9 +20,14 @@
|
|
|
19
20
|
children,
|
|
20
21
|
...props
|
|
21
22
|
}: ButtonProps = $props();
|
|
23
|
+
|
|
24
|
+
const clearButtonFocus: Attachment<HTMLButtonElement> = (element: HTMLButtonElement) => {
|
|
25
|
+
if (loading) element.blur();
|
|
26
|
+
};
|
|
22
27
|
</script>
|
|
23
28
|
|
|
24
29
|
<button
|
|
30
|
+
{@attach clearButtonFocus}
|
|
25
31
|
class={['btn', `btn-${variant}-${variantColor}`, loading && 'loading']}
|
|
26
32
|
disabled={loading || props.disabled}
|
|
27
33
|
{...props}
|
|
@@ -101,10 +107,6 @@
|
|
|
101
107
|
color: #dc182c;
|
|
102
108
|
}
|
|
103
109
|
|
|
104
|
-
.btn.loading {
|
|
105
|
-
cursor: wait;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
110
|
@keyframes spin {
|
|
109
111
|
from {
|
|
110
112
|
transform: rotate(0deg);
|
|
@@ -119,8 +121,8 @@
|
|
|
119
121
|
cursor: pointer;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
.btn:focus:not(:disabled),
|
|
123
|
-
.btn:focus-visible:not(:disabled) {
|
|
124
|
+
.btn:focus:not(:disabled):not(.loading),
|
|
125
|
+
.btn:focus-visible:not(:disabled):not(.loading) {
|
|
124
126
|
box-shadow: 0px 0px 0px 3px #959bff;
|
|
125
127
|
outline: none;
|
|
126
128
|
}
|
package/dist/Table/Header.svelte
CHANGED