@sierra-95/svelte-scaffold 1.0.6 → 1.0.8
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/Core/others/Button/Flip/button.svelte +23 -13
- package/dist/components/Core/others/Button/Flip/button.svelte.d.ts +6 -15
- package/dist/components/Core/others/Button/Marquee/button.svelte +18 -5
- package/dist/components/Core/others/Button/Marquee/button.svelte.d.ts +4 -2
- package/dist/components/Core/others/Button/Swipe/button.css +0 -3
- package/dist/components/Core/others/Button/Swipe/button.svelte +24 -15
- package/dist/components/Core/others/Button/Swipe/button.svelte.d.ts +6 -13
- package/dist/components/Core/others/Button/default/button.css +0 -17
- package/dist/components/Core/others/Button/default/button.svelte +0 -15
- package/dist/components/Core/others/Progress/CustomProgress/customProgress.svelte +1 -1
- package/dist/components/Modules/Editor/styles/controls.css +0 -4
- package/dist/components/Modules/FilePicker/cloudStore.svelte +2 -1
- package/dist/global.css +22 -0
- package/package.json +1 -1
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
type _buttonType = 'button' | 'submit' | 'reset';
|
|
3
|
+
const {
|
|
4
|
+
back = "back",
|
|
5
|
+
front = "front",
|
|
6
|
+
bgFront = "var(--primary-bg)",
|
|
7
|
+
bgBack = "var(--primary-bg)",
|
|
8
|
+
color = "var(--button-text)",
|
|
9
|
+
title = "",
|
|
10
|
+
type = 'button' as _buttonType,
|
|
11
|
+
disabled = false,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props();
|
|
14
|
+
</script>
|
|
15
|
+
<button
|
|
16
|
+
type={type}
|
|
17
|
+
title={title}
|
|
18
|
+
disabled={disabled}
|
|
19
|
+
aria-label="Flip button"
|
|
3
20
|
class="btn-flip"
|
|
4
21
|
data-back={back}
|
|
5
22
|
data-front={front}
|
|
6
23
|
style="--bg-front: {bgFront}; --bg-back: {bgBack}; --text-color: {color}"
|
|
7
|
-
|
|
24
|
+
onclick={(e: MouseEvent) => {
|
|
25
|
+
rest.onclick?.(e);
|
|
26
|
+
}}
|
|
27
|
+
></button>
|
|
8
28
|
<style>.btn-flip {
|
|
9
29
|
position: relative;
|
|
10
30
|
display: inline-block;
|
|
@@ -57,13 +77,3 @@
|
|
|
57
77
|
transform: translateY(0) rotateX(0);
|
|
58
78
|
}
|
|
59
79
|
</style>
|
|
60
|
-
<script>
|
|
61
|
-
const {
|
|
62
|
-
link = "#",
|
|
63
|
-
back = "back",
|
|
64
|
-
front = "front",
|
|
65
|
-
bgFront = "var(--primary-bg)",
|
|
66
|
-
bgBack = "var(--primary-bg)",
|
|
67
|
-
color = "var(--button-text)",
|
|
68
|
-
} = $props();
|
|
69
|
-
</script>
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
export default Button;
|
|
2
|
-
type Button = {
|
|
3
|
-
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
-
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
-
};
|
|
6
1
|
declare const Button: import("svelte").Component<{
|
|
7
|
-
link?: string;
|
|
8
2
|
back?: string;
|
|
9
3
|
front?: string;
|
|
10
4
|
bgFront?: string;
|
|
11
5
|
bgBack?: string;
|
|
12
6
|
color?: string;
|
|
13
|
-
|
|
14
|
-
type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
bgBack?: string;
|
|
20
|
-
color?: string;
|
|
21
|
-
};
|
|
7
|
+
title?: string;
|
|
8
|
+
type?: "button" | "submit" | "reset";
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
} & Record<string, any>, {}, "">;
|
|
11
|
+
type Button = ReturnType<typeof Button>;
|
|
12
|
+
export default Button;
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
import './button.css';
|
|
4
4
|
|
|
5
|
+
type _buttonType = 'button' | 'submit' | 'reset';
|
|
5
6
|
const {
|
|
6
7
|
text = "Hover me",
|
|
7
|
-
link = "#",
|
|
8
8
|
bg = "var(--primary-bg)",
|
|
9
|
-
color = "var(--text)"
|
|
9
|
+
color = "var(--text)",
|
|
10
|
+
title = "",
|
|
11
|
+
type = 'button' as _buttonType,
|
|
12
|
+
disabled = false,
|
|
13
|
+
...rest
|
|
10
14
|
} = $props();
|
|
11
15
|
|
|
12
16
|
let scrolling = $state(false);
|
|
13
17
|
|
|
14
18
|
let container: HTMLDivElement;
|
|
15
|
-
let marquee:
|
|
19
|
+
let marquee: HTMLButtonElement;
|
|
16
20
|
|
|
17
21
|
let containerWidth = 0;
|
|
18
22
|
let textWidth = 0;
|
|
@@ -37,9 +41,18 @@
|
|
|
37
41
|
onmouseleave={() => scrolling = false}
|
|
38
42
|
style="--border-color: {bg}; --text-color: {color}"
|
|
39
43
|
>
|
|
40
|
-
<
|
|
44
|
+
<button
|
|
45
|
+
type={type}
|
|
46
|
+
title={title}
|
|
47
|
+
disabled={disabled}
|
|
48
|
+
class="marquee {scrolling ? 'scrolling' : ''}"
|
|
49
|
+
bind:this={marquee}
|
|
50
|
+
onclick={(e: MouseEvent) => {
|
|
51
|
+
rest.onclick?.(e);
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
41
54
|
<span>{text}</span>
|
|
42
55
|
<span>{text}</span>
|
|
43
56
|
<span>{text}</span>
|
|
44
|
-
</
|
|
57
|
+
</button>
|
|
45
58
|
</div>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import './button.css';
|
|
2
2
|
declare const Button: import("svelte").Component<{
|
|
3
3
|
text?: string;
|
|
4
|
-
link?: string;
|
|
5
4
|
bg?: string;
|
|
6
5
|
color?: string;
|
|
7
|
-
|
|
6
|
+
title?: string;
|
|
7
|
+
type?: "button" | "submit" | "reset";
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
} & Record<string, any>, {}, "">;
|
|
8
10
|
type Button = ReturnType<typeof Button>;
|
|
9
11
|
export default Button;
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
<
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {buttonRipple} from '../../../../../index.js'
|
|
3
|
+
|
|
4
|
+
type _buttonType = 'button' | 'submit' | 'reset';
|
|
5
|
+
const {
|
|
6
|
+
text = "Button",
|
|
7
|
+
bg = "var(--primary-bg)",
|
|
8
|
+
color = "var(--text)",
|
|
9
|
+
title = "",
|
|
10
|
+
type = 'button' as _buttonType,
|
|
11
|
+
disabled = false,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props();
|
|
14
|
+
</script>
|
|
15
|
+
<button
|
|
16
|
+
type={type}
|
|
17
|
+
title={title}
|
|
18
|
+
disabled={disabled}
|
|
19
|
+
use:buttonRipple
|
|
2
20
|
class="swipe-btn"
|
|
3
|
-
href={link}
|
|
4
21
|
style="--btn-color: {bg}; --text-color: {color}"
|
|
5
|
-
|
|
22
|
+
onclick={(e: MouseEvent) => {
|
|
23
|
+
rest.onclick?.(e);
|
|
24
|
+
}}
|
|
25
|
+
>{text}</button>
|
|
6
26
|
<style>.swipe-btn {
|
|
7
27
|
position: relative;
|
|
8
28
|
display: block;
|
|
@@ -18,9 +38,6 @@
|
|
|
18
38
|
color: var(--text-color);
|
|
19
39
|
transition: color 0.4s ease;
|
|
20
40
|
}
|
|
21
|
-
a{
|
|
22
|
-
text-decoration: none;
|
|
23
|
-
}
|
|
24
41
|
/* Swipe layer */
|
|
25
42
|
.swipe-btn::before {
|
|
26
43
|
content: '';
|
|
@@ -38,12 +55,4 @@ a{
|
|
|
38
55
|
.swipe-btn:hover {
|
|
39
56
|
color: var(--button-text);
|
|
40
57
|
}
|
|
41
|
-
</style>
|
|
42
|
-
<script>
|
|
43
|
-
const {
|
|
44
|
-
link = "#",
|
|
45
|
-
text = "Button",
|
|
46
|
-
bg = "var(--primary-bg)",
|
|
47
|
-
color = "var(--text)"
|
|
48
|
-
} = $props();
|
|
49
|
-
</script>
|
|
58
|
+
</style>
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
export default Button;
|
|
2
|
-
type Button = {
|
|
3
|
-
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
-
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
-
};
|
|
6
1
|
declare const Button: import("svelte").Component<{
|
|
7
|
-
link?: string;
|
|
8
2
|
text?: string;
|
|
9
3
|
bg?: string;
|
|
10
4
|
color?: string;
|
|
11
|
-
|
|
12
|
-
type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
5
|
+
title?: string;
|
|
6
|
+
type?: "button" | "submit" | "reset";
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
} & Record<string, any>, {}, "">;
|
|
9
|
+
type Button = ReturnType<typeof Button>;
|
|
10
|
+
export default Button;
|
|
@@ -58,20 +58,3 @@
|
|
|
58
58
|
border-radius: 50%;
|
|
59
59
|
min-width: unset;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
.ripple {
|
|
63
|
-
position: relative;
|
|
64
|
-
overflow: hidden; /* IMPORTANT */
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.ripple::after {
|
|
68
|
-
content: '';
|
|
69
|
-
position: absolute;
|
|
70
|
-
width: 20px;
|
|
71
|
-
height: 20px;
|
|
72
|
-
border-radius: 50%;
|
|
73
|
-
pointer-events: none;
|
|
74
|
-
transform: scale(0);
|
|
75
|
-
opacity: 0.4;
|
|
76
|
-
background: currentColor;
|
|
77
|
-
}
|
|
@@ -95,21 +95,6 @@
|
|
|
95
95
|
border-radius: 50%;
|
|
96
96
|
min-width: unset;
|
|
97
97
|
}
|
|
98
|
-
.ripple {
|
|
99
|
-
position: relative;
|
|
100
|
-
overflow: hidden; /* IMPORTANT */
|
|
101
|
-
}
|
|
102
|
-
.ripple::after {
|
|
103
|
-
content: '';
|
|
104
|
-
position: absolute;
|
|
105
|
-
width: 20px;
|
|
106
|
-
height: 20px;
|
|
107
|
-
border-radius: 50%;
|
|
108
|
-
pointer-events: none;
|
|
109
|
-
transform: scale(0);
|
|
110
|
-
opacity: 0.4;
|
|
111
|
-
background: currentColor;
|
|
112
|
-
}
|
|
113
98
|
</style>
|
|
114
99
|
|
|
115
100
|
<button
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
|
-
import { fileInputStore, User, isLoggedIn, setToastMessage } from '../../../index.js';
|
|
3
|
+
import { fileInputStore, User, isLoggedIn, setToastMessage, buttonRipple } from '../../../index.js';
|
|
4
4
|
import Previews from './previews.svelte';
|
|
5
5
|
|
|
6
6
|
export let processing: boolean;
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
<nav style="display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1rem; background-color: var(--background); border-bottom-left-radius:5px;">
|
|
79
79
|
{#each tabs as tab}
|
|
80
80
|
<button
|
|
81
|
+
use:buttonRipple
|
|
81
82
|
on:click={() =>
|
|
82
83
|
fileInputStore.update(store =>({
|
|
83
84
|
...store,
|
package/dist/global.css
CHANGED
|
@@ -217,4 +217,26 @@ select option {
|
|
|
217
217
|
|
|
218
218
|
::-webkit-scrollbar-thumb:hover {
|
|
219
219
|
background: var(--scroll-bar-thumb-hover);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**Button Ripple Effect */
|
|
223
|
+
button:disabled{
|
|
224
|
+
opacity: 0.6;
|
|
225
|
+
cursor: not-allowed;
|
|
226
|
+
}
|
|
227
|
+
.ripple {
|
|
228
|
+
position: relative;
|
|
229
|
+
overflow: hidden; /* IMPORTANT */
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.ripple::after {
|
|
233
|
+
content: '';
|
|
234
|
+
position: absolute;
|
|
235
|
+
width: 20px;
|
|
236
|
+
height: 20px;
|
|
237
|
+
border-radius: 50%;
|
|
238
|
+
pointer-events: none;
|
|
239
|
+
transform: scale(0);
|
|
240
|
+
opacity: 0.4;
|
|
241
|
+
background: currentColor;
|
|
220
242
|
}
|