@coyalabs/bts-style 1.0.7 → 1.0.9
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/Base/BaseContainer.svelte +76 -0
- package/dist/Base/BaseContainer.svelte.d.ts +49 -0
- package/dist/Base/BaseIcon.svelte +42 -0
- package/dist/Base/BaseIcon.svelte.d.ts +30 -0
- package/dist/Base/BasePage.svelte +51 -0
- package/dist/Base/BasePage.svelte.d.ts +31 -0
- package/dist/Base/BaseText.svelte +44 -0
- package/dist/{BaseContainer.svelte.d.ts → Base/BaseText.svelte.d.ts} +7 -5
- package/dist/Components/Button.svelte +127 -0
- package/dist/Components/Button.svelte.d.ts +63 -0
- package/dist/Components/IconButton.svelte +44 -0
- package/dist/Components/IconButton.svelte.d.ts +34 -0
- package/dist/Components/InputBox.svelte +103 -0
- package/dist/Components/InputBox.svelte.d.ts +56 -0
- package/dist/Components/Popup/AlertPopup.svelte +27 -0
- package/dist/Components/Popup/AlertPopup.svelte.d.ts +28 -0
- package/dist/Components/Popup/ConfirmPopup.svelte +39 -0
- package/dist/Components/Popup/ConfirmPopup.svelte.d.ts +32 -0
- package/dist/Components/Popup/Popup.svelte +67 -0
- package/dist/{BasePage.svelte.d.ts → Components/Popup/Popup.svelte.d.ts} +15 -9
- package/dist/Components/Popup/PromptPopup.svelte +61 -0
- package/dist/Components/Popup/PromptPopup.svelte.d.ts +36 -0
- package/dist/Components/Separator.svelte +61 -0
- package/dist/Components/Separator.svelte.d.ts +30 -0
- package/dist/Components/TabBar.svelte +128 -0
- package/dist/Components/TabBar.svelte.d.ts +40 -0
- package/dist/Components/Toggle.svelte +59 -0
- package/dist/{Testing.svelte.d.ts → Components/Toggle.svelte.d.ts} +5 -9
- package/dist/Components/Tooltip.svelte +132 -0
- package/dist/Components/Tooltip.svelte.d.ts +28 -0
- package/dist/Components/TreeDirectory.svelte +148 -0
- package/dist/Components/TreeDirectory.svelte.d.ts +58 -0
- package/dist/Components/popupStore.d.ts +31 -0
- package/dist/Components/popupStore.js +99 -0
- package/dist/Structure/TextHeader.svelte +32 -0
- package/dist/Structure/TextHeader.svelte.d.ts +28 -0
- package/dist/icons.d.ts +10 -0
- package/dist/icons.js +10 -0
- package/dist/index.d.ts +19 -2
- package/dist/index.js +24 -2
- package/package.json +2 -1
- package/public/favicon.png +0 -0
- package/README.md +0 -35
- package/dist/BaseContainer.svelte +0 -43
- package/dist/BasePage.svelte +0 -30
- package/dist/Testing.svelte +0 -26
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import BaseContainer from '../Base/BaseContainer.svelte';
|
|
3
|
+
import BaseIcon from '../Base/BaseIcon.svelte';
|
|
4
|
+
import { icons } from '../icons.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @type {'full' | 'primary' | 'secondary'}
|
|
8
|
+
*/
|
|
9
|
+
export let theme = 'secondary';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
export let value = '';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
export let placeholder = '';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @type {string}
|
|
23
|
+
*/
|
|
24
|
+
export let type = 'text';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @type {string | null}
|
|
28
|
+
*/
|
|
29
|
+
export let icon = null;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @type {string}
|
|
33
|
+
*/
|
|
34
|
+
export let iconSize = '18px';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @type {string}
|
|
38
|
+
*/
|
|
39
|
+
export let borderRadiusTopLeft = '25px';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
|
+
export let borderRadiusTopRight = '25px';
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @type {string}
|
|
48
|
+
*/
|
|
49
|
+
export let borderRadiusBottomLeft = '25px';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @type {string}
|
|
53
|
+
*/
|
|
54
|
+
export let borderRadiusBottomRight = '25px';
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<div class="input-wrapper">
|
|
58
|
+
<BaseContainer {theme} {borderRadiusTopLeft} {borderRadiusTopRight} {borderRadiusBottomLeft} {borderRadiusBottomRight}>
|
|
59
|
+
<div class="input-content">
|
|
60
|
+
{#if icon}
|
|
61
|
+
<BaseIcon variant="toned" svg={icon} size={iconSize} />
|
|
62
|
+
{/if}
|
|
63
|
+
<input
|
|
64
|
+
{type}
|
|
65
|
+
{placeholder}
|
|
66
|
+
bind:value
|
|
67
|
+
on:input
|
|
68
|
+
on:change
|
|
69
|
+
on:focus
|
|
70
|
+
on:blur
|
|
71
|
+
on:keydown
|
|
72
|
+
/>
|
|
73
|
+
<BaseIcon variant="toned" svg={icons.pen} size="15px" />
|
|
74
|
+
</div>
|
|
75
|
+
</BaseContainer>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<style>
|
|
79
|
+
.input-wrapper {
|
|
80
|
+
width: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.input-content {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: 8px;
|
|
87
|
+
height: 25px; /* Match button text height */
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
input {
|
|
91
|
+
all: unset;
|
|
92
|
+
flex: 1;
|
|
93
|
+
font-family: 'Satoshi', sans-serif;
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
font-size: 18px;
|
|
96
|
+
color: #E3D8D8;
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
input::placeholder {
|
|
101
|
+
color: rgba(227, 216, 216, 0.4);
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default InputBox;
|
|
2
|
+
type InputBox = SvelteComponent<{
|
|
3
|
+
theme?: "full" | "primary" | "secondary" | undefined;
|
|
4
|
+
borderRadiusTopLeft?: string | undefined;
|
|
5
|
+
borderRadiusTopRight?: string | undefined;
|
|
6
|
+
borderRadiusBottomLeft?: string | undefined;
|
|
7
|
+
borderRadiusBottomRight?: string | undefined;
|
|
8
|
+
icon?: string | null | undefined;
|
|
9
|
+
iconSize?: string | undefined;
|
|
10
|
+
value?: string | undefined;
|
|
11
|
+
placeholder?: string | undefined;
|
|
12
|
+
type?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
input: Event;
|
|
15
|
+
change: Event;
|
|
16
|
+
focus: FocusEvent;
|
|
17
|
+
blur: FocusEvent;
|
|
18
|
+
keydown: KeyboardEvent;
|
|
19
|
+
} & {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
}, {}> & {
|
|
22
|
+
$$bindings?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
declare const InputBox: $$__sveltets_2_IsomorphicComponent<{
|
|
25
|
+
theme?: "full" | "primary" | "secondary" | undefined;
|
|
26
|
+
borderRadiusTopLeft?: string | undefined;
|
|
27
|
+
borderRadiusTopRight?: string | undefined;
|
|
28
|
+
borderRadiusBottomLeft?: string | undefined;
|
|
29
|
+
borderRadiusBottomRight?: string | undefined;
|
|
30
|
+
icon?: string | null | undefined;
|
|
31
|
+
iconSize?: string | undefined;
|
|
32
|
+
value?: string | undefined;
|
|
33
|
+
placeholder?: string | undefined;
|
|
34
|
+
type?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
input: Event;
|
|
37
|
+
change: Event;
|
|
38
|
+
focus: FocusEvent;
|
|
39
|
+
blur: FocusEvent;
|
|
40
|
+
keydown: KeyboardEvent;
|
|
41
|
+
} & {
|
|
42
|
+
[evt: string]: CustomEvent<any>;
|
|
43
|
+
}, {}, {}, string>;
|
|
44
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
45
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
46
|
+
$$bindings?: Bindings;
|
|
47
|
+
} & Exports;
|
|
48
|
+
(internal: unknown, props: Props & {
|
|
49
|
+
$$events?: Events;
|
|
50
|
+
$$slots?: Slots;
|
|
51
|
+
}): Exports & {
|
|
52
|
+
$set?: any;
|
|
53
|
+
$on?: any;
|
|
54
|
+
};
|
|
55
|
+
z_$$bindings?: Bindings;
|
|
56
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../Button.svelte';
|
|
3
|
+
import { icons } from '../../icons.js';
|
|
4
|
+
import { popupStore } from '../popupStore.js';
|
|
5
|
+
|
|
6
|
+
/** @type {() => void} */
|
|
7
|
+
export let onOk = () => {};
|
|
8
|
+
|
|
9
|
+
/** @type {string} */
|
|
10
|
+
export let okText = 'OK';
|
|
11
|
+
|
|
12
|
+
function handleOk() {
|
|
13
|
+
onOk();
|
|
14
|
+
popupStore.close();
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div class="buttons">
|
|
19
|
+
<Button actionIcon={icons.check} theme="primary" on:click={handleOk}>{okText}</Button>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
.buttons {
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default AlertPopup;
|
|
2
|
+
type AlertPopup = SvelteComponent<{
|
|
3
|
+
onOk?: (() => void) | undefined;
|
|
4
|
+
okText?: string | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
}, {}> & {
|
|
8
|
+
$$bindings?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
declare const AlertPopup: $$__sveltets_2_IsomorphicComponent<{
|
|
11
|
+
onOk?: (() => void) | undefined;
|
|
12
|
+
okText?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
}, {}, {}, string>;
|
|
16
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
17
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
18
|
+
$$bindings?: Bindings;
|
|
19
|
+
} & Exports;
|
|
20
|
+
(internal: unknown, props: Props & {
|
|
21
|
+
$$events?: Events;
|
|
22
|
+
$$slots?: Slots;
|
|
23
|
+
}): Exports & {
|
|
24
|
+
$set?: any;
|
|
25
|
+
$on?: any;
|
|
26
|
+
};
|
|
27
|
+
z_$$bindings?: Bindings;
|
|
28
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { icons } from '../../icons.js';
|
|
3
|
+
import Button from '../Button.svelte';
|
|
4
|
+
import { popupStore } from '../popupStore.js';
|
|
5
|
+
|
|
6
|
+
/** @type {() => void} */
|
|
7
|
+
export let onConfirm = () => {};
|
|
8
|
+
|
|
9
|
+
/** @type {() => void} */
|
|
10
|
+
export let onCancel = () => {};
|
|
11
|
+
|
|
12
|
+
/** @type {string} */
|
|
13
|
+
export let confirmText = 'Confirm';
|
|
14
|
+
|
|
15
|
+
/** @type {string} */
|
|
16
|
+
export let cancelText = 'Cancel';
|
|
17
|
+
|
|
18
|
+
function handleConfirm() {
|
|
19
|
+
onConfirm();
|
|
20
|
+
popupStore.close();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function handleCancel() {
|
|
24
|
+
onCancel();
|
|
25
|
+
popupStore.close();
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<div class="buttons">
|
|
30
|
+
<Button theme="primary" actionIcon={icons.check} on:click={handleConfirm}>{confirmText}</Button>
|
|
31
|
+
<Button theme="secondary" actionIcon={icons.crossb} on:click={handleCancel}>{cancelText}</Button>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
.buttons {
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: 1rem;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default ConfirmPopup;
|
|
2
|
+
type ConfirmPopup = SvelteComponent<{
|
|
3
|
+
onConfirm?: (() => void) | undefined;
|
|
4
|
+
onCancel?: (() => void) | undefined;
|
|
5
|
+
confirmText?: string | undefined;
|
|
6
|
+
cancelText?: string | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {}> & {
|
|
10
|
+
$$bindings?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
declare const ConfirmPopup: $$__sveltets_2_IsomorphicComponent<{
|
|
13
|
+
onConfirm?: (() => void) | undefined;
|
|
14
|
+
onCancel?: (() => void) | undefined;
|
|
15
|
+
confirmText?: string | undefined;
|
|
16
|
+
cancelText?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}, {}, string>;
|
|
20
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
21
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
22
|
+
$$bindings?: Bindings;
|
|
23
|
+
} & Exports;
|
|
24
|
+
(internal: unknown, props: Props & {
|
|
25
|
+
$$events?: Events;
|
|
26
|
+
$$slots?: Slots;
|
|
27
|
+
}): Exports & {
|
|
28
|
+
$set?: any;
|
|
29
|
+
$on?: any;
|
|
30
|
+
};
|
|
31
|
+
z_$$bindings?: Bindings;
|
|
32
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { fade, fly } from 'svelte/transition';
|
|
3
|
+
import { backOut } from 'svelte/easing';
|
|
4
|
+
import { popupStore } from '../popupStore.js';
|
|
5
|
+
import BaseContainer from '../../Base/BaseContainer.svelte';
|
|
6
|
+
import IconButton from '../IconButton.svelte';
|
|
7
|
+
import TextHeader from '../../Structure/TextHeader.svelte';
|
|
8
|
+
import { icons } from '../../icons.js';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
{#if $popupStore.isOpen}
|
|
12
|
+
<div class="overlay" transition:fade={{ duration: 250 }} on:click={popupStore.close} role="presentation">
|
|
13
|
+
<div
|
|
14
|
+
class="dialog"
|
|
15
|
+
transition:fly={{ y: 30, duration: 300, easing: backOut }}
|
|
16
|
+
on:click|stopPropagation
|
|
17
|
+
on:keydown|stopPropagation
|
|
18
|
+
role="dialog"
|
|
19
|
+
tabindex="-1"
|
|
20
|
+
>
|
|
21
|
+
<BaseContainer padding="1.5rem" borderRadiusTopLeft="35px" borderRadiusTopRight="35px" borderRadiusBottomLeft="35px" borderRadiusBottomRight="35px" theme="filled">
|
|
22
|
+
<header>
|
|
23
|
+
<TextHeader title={$popupStore.title} subtitle={$popupStore.subtitle || ''} />
|
|
24
|
+
<div class="close-btn">
|
|
25
|
+
<IconButton svg={icons.cross} size="20px" variant="toned" on:click={popupStore.close} />
|
|
26
|
+
</div>
|
|
27
|
+
</header>
|
|
28
|
+
<main>
|
|
29
|
+
<svelte:component this={$popupStore.component} {...$popupStore.props} />
|
|
30
|
+
</main>
|
|
31
|
+
</BaseContainer>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
{/if}
|
|
35
|
+
|
|
36
|
+
<style>
|
|
37
|
+
.overlay {
|
|
38
|
+
position: fixed;
|
|
39
|
+
inset: 0;
|
|
40
|
+
background: #0b070eda;
|
|
41
|
+
backdrop-filter: blur(3px);
|
|
42
|
+
display: grid;
|
|
43
|
+
place-items: center;
|
|
44
|
+
z-index: 9999;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dialog {
|
|
48
|
+
width: min(90%, 600px);
|
|
49
|
+
max-height: 80vh;
|
|
50
|
+
zoom: 0.92;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
header {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
align-items: flex-start;
|
|
57
|
+
gap: 1rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.close-btn {
|
|
61
|
+
opacity: 0.5;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
main {
|
|
65
|
+
margin-top: 1.5rem;
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
export default
|
|
2
|
-
type
|
|
3
|
-
[
|
|
1
|
+
export default Popup;
|
|
2
|
+
type Popup = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
4
|
}, {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
click: PointerEvent;
|
|
6
|
+
keydown: KeyboardEvent;
|
|
7
|
+
} & {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {}> & {
|
|
7
10
|
$$bindings?: string | undefined;
|
|
8
11
|
};
|
|
9
|
-
declare const
|
|
10
|
-
[
|
|
12
|
+
declare const Popup: $$__sveltets_2_IsomorphicComponent<{
|
|
13
|
+
[x: string]: never;
|
|
11
14
|
}, {
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
click: PointerEvent;
|
|
16
|
+
keydown: KeyboardEvent;
|
|
17
|
+
} & {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}, {}, string>;
|
|
14
20
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
21
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
22
|
$$bindings?: Bindings;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../Button.svelte';
|
|
3
|
+
import InputBox from '../InputBox.svelte';
|
|
4
|
+
import BaseText from '../../Base/BaseText.svelte';
|
|
5
|
+
import { icons } from '../../icons.js';
|
|
6
|
+
import { popupStore } from '../popupStore.js';
|
|
7
|
+
|
|
8
|
+
/** @type {(value: string) => void} */
|
|
9
|
+
export let onSubmit = () => {};
|
|
10
|
+
|
|
11
|
+
/** @type {() => void} */
|
|
12
|
+
export let onCancel = () => {};
|
|
13
|
+
|
|
14
|
+
/** @type {string} */
|
|
15
|
+
export let placeholder = 'Enter value...';
|
|
16
|
+
|
|
17
|
+
/** @type {string} */
|
|
18
|
+
export let submitText = 'Submit';
|
|
19
|
+
|
|
20
|
+
/** @type {string} */
|
|
21
|
+
export let cancelText = 'Cancel';
|
|
22
|
+
|
|
23
|
+
/** @type {string} */
|
|
24
|
+
export let label = '';
|
|
25
|
+
|
|
26
|
+
let value = '';
|
|
27
|
+
|
|
28
|
+
function handleSubmit() {
|
|
29
|
+
onSubmit(value);
|
|
30
|
+
popupStore.close();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function handleCancel() {
|
|
34
|
+
onCancel();
|
|
35
|
+
popupStore.close();
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<div class="prompt">
|
|
40
|
+
{#if label}
|
|
41
|
+
<BaseText variant="content">{label}</BaseText>
|
|
42
|
+
{/if}
|
|
43
|
+
<InputBox bind:value {placeholder} />
|
|
44
|
+
<div class="buttons">
|
|
45
|
+
<Button theme="primary" actionIcon={icons.check} on:click={handleSubmit}>{submitText}</Button>
|
|
46
|
+
<Button theme="secondary" actionIcon={icons.crossb} on:click={handleCancel}>{cancelText}</Button>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<style>
|
|
51
|
+
.prompt {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: 1rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.buttons {
|
|
58
|
+
display: flex;
|
|
59
|
+
gap: 1rem;
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export default PromptPopup;
|
|
2
|
+
type PromptPopup = SvelteComponent<{
|
|
3
|
+
label?: string | undefined;
|
|
4
|
+
placeholder?: string | undefined;
|
|
5
|
+
onCancel?: (() => void) | undefined;
|
|
6
|
+
cancelText?: string | undefined;
|
|
7
|
+
onSubmit?: ((value: string) => void) | undefined;
|
|
8
|
+
submitText?: string | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
}, {}> & {
|
|
12
|
+
$$bindings?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
declare const PromptPopup: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
placeholder?: string | undefined;
|
|
17
|
+
onCancel?: (() => void) | undefined;
|
|
18
|
+
cancelText?: string | undefined;
|
|
19
|
+
onSubmit?: ((value: string) => void) | undefined;
|
|
20
|
+
submitText?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
}, {}, {}, string>;
|
|
24
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
25
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
26
|
+
$$bindings?: Bindings;
|
|
27
|
+
} & Exports;
|
|
28
|
+
(internal: unknown, props: Props & {
|
|
29
|
+
$$events?: Events;
|
|
30
|
+
$$slots?: Slots;
|
|
31
|
+
}): Exports & {
|
|
32
|
+
$set?: any;
|
|
33
|
+
$on?: any;
|
|
34
|
+
};
|
|
35
|
+
z_$$bindings?: Bindings;
|
|
36
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
const svgSide = '<svg width="51" height="14" viewBox="0 0 51 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.34766 0.0117188C1.73943 0.0206734 2.04817 0.156895 2.21484 0.246094C2.40301 0.347061 2.5769 0.471392 2.71875 0.585938C3.0026 0.815356 3.30516 1.12112 3.62109 1.46484C4.13857 2.02792 4.71503 2.52735 5.34375 2.96484C6.12646 3.50981 6.96366 4.39169 7.88672 5.49609H8.48438C9.19157 5.39437 9.93448 5.3599 10.7109 5.44922C11.5804 5.54939 12.4548 5.65477 13.3242 5.75391C13.9681 5.8268 14.6202 5.75253 15.293 5.53125C16.3428 5.18618 17.4137 5.05727 18.4922 5.14453C19.3709 5.21564 20.2502 5.28987 21.1289 5.37891C22.0304 5.47028 22.9352 5.59238 23.8359 5.74219C24.6263 5.87367 25.416 5.93785 26.2031 5.94141C27.0095 5.94481 27.8211 5.89987 28.6289 5.80078C29.5372 5.68937 30.4503 5.61804 31.3594 5.57812C32.2056 5.5409 33.0559 5.47755 33.9023 5.40234C34.8753 5.3162 35.8484 5.3421 36.8203 5.46094C37.5779 5.5537 38.3368 5.55236 39.0938 5.47266C39.9604 5.3814 40.8287 5.2886 41.6953 5.19141C42.7294 5.0756 43.7635 5.12971 44.7891 5.35547C45.5064 5.51388 46.2252 5.55602 46.9336 5.48438C47.9079 5.38622 49.2439 5.3997 50.8945 5.49609H51V8.49609H50.8008C49.152 8.3975 47.9732 8.39714 47.2266 8.47266C46.1967 8.57625 45.1655 8.51061 44.1445 8.28516C43.434 8.12869 42.7253 8.10097 42.0234 8.17969C41.1525 8.27735 40.2811 8.36922 39.4102 8.46094C38.4271 8.56446 37.4395 8.5578 36.457 8.4375C35.6916 8.34387 34.9244 8.32272 34.1602 8.39062C33.2694 8.46972 32.3792 8.53898 31.4883 8.57812C30.6576 8.6146 29.8236 8.67535 28.9922 8.77734C28.0603 8.89161 27.1247 8.94535 26.1914 8.94141C25.2411 8.93721 24.2908 8.86458 23.3438 8.70703C22.5052 8.56754 21.662 8.4521 20.8242 8.36719C19.9661 8.28025 19.1041 8.20224 18.2461 8.13281C17.5864 8.07996 16.9187 8.16426 16.2305 8.39062C15.1658 8.74063 14.078 8.8547 12.9844 8.73047C12.1141 8.63124 11.2413 8.52605 10.3711 8.42578C9.62969 8.34036 9.03581 8.37464 8.57812 8.48438C8.2446 8.56426 7.92758 8.63057 7.66406 8.66016C6.72608 9.63803 5.8882 10.4341 5.09766 10.9102C4.50693 11.2662 4.00397 11.7139 3.58594 12.2695C3.30392 12.6446 3.03046 12.976 2.77734 13.2305C2.65105 13.3571 2.49298 13.4978 2.32031 13.6172C2.17514 13.7176 1.86759 13.9106 1.45312 13.957L1.26562 13.9805L1.06641 13.9453L0.84375 13.9219L1.04297 12.5508L0.996094 12.5039L0 11.3789L0.0820312 11.3086L0.609375 10.8516L0.84375 10.875C0.934721 10.7665 1.0544 10.6367 1.18359 10.4648C1.83258 9.60176 2.62756 8.88803 3.55078 8.33203C3.95922 8.08554 4.48198 7.62172 5.16797 6.9375C4.51681 6.19986 4.0219 5.69702 3.63281 5.42578C2.82398 4.86296 2.08428 4.21715 1.41797 3.49219C1.26913 3.33024 1.13246 3.21476 1.03125 3.11719L0.667969 3.21094L0.0820312 2.69531L0 2.625L0.996094 1.5L1.03125 1.45312L0.714844 0.105469L0.960938 0.046875L1.14844 0L1.34766 0.0117188Z" fill="#1D191F"/></svg>';
|
|
3
|
+
const svgStretch = '<svg width="50" height="4" viewBox="0 0 50 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19.793 0.271071C20.7035 0.362386 21.6137 0.484728 22.5234 0.634352C23.3258 0.766294 24.1266 0.830205 24.9258 0.833571C25.7413 0.836979 26.5581 0.791831 27.375 0.692946C28.2931 0.581596 29.2218 0.498462 30.1406 0.458571C30.9959 0.421352 31.8515 0.369633 32.707 0.294509C33.691 0.208078 34.6773 0.222428 35.6602 0.341384C36.429 0.434456 37.2006 0.44479 37.9688 0.364821C38.8437 0.273727 39.7188 0.180578 40.5938 0.0835715C41.6386 -0.0322773 42.6862 0.021345 43.7227 0.247634C44.4507 0.406319 45.1712 0.448468 45.8906 0.37654C46.8918 0.276437 48.2776 0.286775 49.9922 0.388259H50.0039V3.38826H49.8164C48.1444 3.28929 46.9425 3.28894 46.1836 3.36482C45.1458 3.46797 44.1073 3.40201 43.0781 3.17732C42.3554 3.01977 41.6363 2.98092 40.9219 3.06013C40.0396 3.15795 39.1557 3.26125 38.2734 3.3531C37.2824 3.45608 36.2873 3.43784 35.2969 3.31794C34.5228 3.22447 33.7496 3.21526 32.9766 3.28279C32.0761 3.36188 31.1702 3.4194 30.2695 3.45857C29.4284 3.49508 28.5802 3.5674 27.7383 3.66951C26.7976 3.78349 25.8561 3.83749 24.9141 3.83357C23.9535 3.82955 22.9886 3.74493 22.0312 3.58747C21.1841 3.44827 20.3346 3.34416 19.4883 3.25935C18.6188 3.17223 17.7444 3.09453 16.875 3.02497C16.2036 2.97193 15.5232 3.044 14.8242 3.27107C13.7509 3.62006 12.656 3.74633 11.5547 3.62263C10.6741 3.52337 9.7868 3.41824 8.9062 3.31794C8.17514 3.23508 7.43857 3.26613 6.70312 3.39997C5.77106 3.56937 4.83678 3.67782 3.90234 3.73982C2.94429 3.80324 2.00452 3.78762 1.08984 3.69294C0.66932 3.6493 0.31018 3.61128 0.04688 3.56404L0 0.388259H3.86719L3.46875 0.763259C3.54583 0.759357 3.62544 0.756682 3.70312 0.75154C4.52477 0.697065 5.35175 0.596824 6.17578 0.446852C7.1966 0.261429 8.22096 0.22495 9.2461 0.341384C10.1237 0.441342 11.0053 0.535427 11.8828 0.634352C12.5405 0.708486 13.2127 0.646387 13.8984 0.423415C14.9568 0.0795105 16.0351 -0.0619009 17.1211 0.0249777C18.0107 0.0961552 18.9034 0.181928 19.793 0.271071Z" fill="#1D191F"/></svg>';
|
|
4
|
+
|
|
5
|
+
// Convert SVG to data URL
|
|
6
|
+
const sideDataUrl = 'data:image/svg+xml,' + encodeURIComponent(svgSide);
|
|
7
|
+
const stretchDataUrl = 'data:image/svg+xml,' + encodeURIComponent(svgStretch);
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
export let height = '12px';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
export let width = '100%';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
export let margin = '2rem 0';
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<div class="separator" style="--height: {height}; --width: {width}; --margin: {margin};">
|
|
26
|
+
<img src={sideDataUrl} alt="" class="side left" />
|
|
27
|
+
<div class="middle" style="background-image: url('{stretchDataUrl}');"></div>
|
|
28
|
+
<img src={sideDataUrl} alt="" class="side right" />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<style>
|
|
32
|
+
.separator {
|
|
33
|
+
width: var(--width);
|
|
34
|
+
height: var(--height);
|
|
35
|
+
margin: var(--margin);
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.separator img {
|
|
42
|
+
height: 100%;
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.side {
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.side.right {
|
|
51
|
+
transform: scaleX(-1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.middle {
|
|
55
|
+
flex: 1;
|
|
56
|
+
height: 100%;
|
|
57
|
+
background-repeat: repeat-x;
|
|
58
|
+
background-size: auto 30%;
|
|
59
|
+
background-position: left center;
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default Separator;
|
|
2
|
+
type Separator = SvelteComponent<{
|
|
3
|
+
height?: string | undefined;
|
|
4
|
+
width?: string | undefined;
|
|
5
|
+
margin?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> & {
|
|
9
|
+
$$bindings?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
declare const Separator: $$__sveltets_2_IsomorphicComponent<{
|
|
12
|
+
height?: string | undefined;
|
|
13
|
+
width?: string | undefined;
|
|
14
|
+
margin?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
19
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
20
|
+
$$bindings?: Bindings;
|
|
21
|
+
} & Exports;
|
|
22
|
+
(internal: unknown, props: Props & {
|
|
23
|
+
$$events?: Events;
|
|
24
|
+
$$slots?: Slots;
|
|
25
|
+
}): Exports & {
|
|
26
|
+
$set?: any;
|
|
27
|
+
$on?: any;
|
|
28
|
+
};
|
|
29
|
+
z_$$bindings?: Bindings;
|
|
30
|
+
}
|