@hyvor/design 0.0.68 → 1.0.5
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/ActionList/ActionList.svelte +22 -9
- package/dist/components/ActionList/ActionList.svelte.d.ts +8 -19
- package/dist/components/ActionList/ActionListGroup.svelte +18 -8
- package/dist/components/ActionList/ActionListGroup.svelte.d.ts +8 -19
- package/dist/components/ActionList/ActionListItem.svelte +49 -25
- package/dist/components/ActionList/ActionListItem.svelte.d.ts +28 -25
- package/dist/components/ActionList/Selected.svelte +10 -4
- package/dist/components/ActionList/Selected.svelte.d.ts +6 -16
- package/dist/components/Avatar/Avatar.svelte +16 -9
- package/dist/components/Avatar/Avatar.svelte.d.ts +7 -17
- package/dist/components/Avatar/AvatarStack.svelte +14 -8
- package/dist/components/Avatar/AvatarStack.svelte.d.ts +6 -17
- package/dist/components/Base/Base.svelte +14 -6
- package/dist/components/Base/Base.svelte.d.ts +6 -17
- package/dist/components/Box/Box.svelte +10 -3
- package/dist/components/Box/Box.svelte.d.ts +7 -18
- package/dist/components/Button/Button.svelte +52 -25
- package/dist/components/Button/Button.svelte.d.ts +16 -38
- package/dist/components/Button/ButtonGroup.svelte +9 -1
- package/dist/components/Button/ButtonGroup.svelte.d.ts +5 -26
- package/dist/components/Callout/Callout.svelte +41 -20
- package/dist/components/Callout/Callout.svelte.d.ts +11 -22
- package/dist/components/Checkbox/Checkbox.svelte +58 -38
- package/dist/components/Checkbox/Checkbox.svelte.d.ts +11 -34
- package/dist/components/CodeBlock/CodeBlock.svelte +21 -11
- package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +7 -16
- package/dist/components/CodeBlock/getCode.js +2 -0
- package/dist/components/ColorPicker/ColorPicker.svelte +34 -15
- package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +26 -19
- package/dist/components/Dark/DarkProvider.svelte +7 -5
- package/dist/components/Dark/DarkProvider.svelte.d.ts +16 -12
- package/dist/components/Dark/DarkToggle.svelte +8 -6
- package/dist/components/Dark/DarkToggle.svelte.d.ts +16 -12
- package/dist/components/Divider/Divider.svelte +17 -6
- package/dist/components/Divider/Divider.svelte.d.ts +9 -19
- package/dist/components/Dropdown/Dropdown.svelte +33 -14
- package/dist/components/Dropdown/Dropdown.svelte.d.ts +13 -23
- package/dist/components/Dropdown/DropdownContent.svelte +124 -92
- package/dist/components/Dropdown/DropdownContent.svelte.d.ts +12 -24
- package/dist/components/FormControl/Caption.svelte +10 -3
- package/dist/components/FormControl/Caption.svelte.d.ts +7 -18
- package/dist/components/FormControl/FormControl.svelte +11 -2
- package/dist/components/FormControl/FormControl.svelte.d.ts +6 -26
- package/dist/components/FormControl/InputGroup.svelte +17 -9
- package/dist/components/FormControl/InputGroup.svelte.d.ts +7 -18
- package/dist/components/FormControl/Label.svelte +11 -2
- package/dist/components/FormControl/Label.svelte.d.ts +6 -26
- package/dist/components/FormControl/Validation.svelte +18 -9
- package/dist/components/FormControl/Validation.svelte.d.ts +8 -19
- package/dist/components/HyvorBar/BarProducts.svelte +44 -25
- package/dist/components/HyvorBar/BarSupport.svelte +165 -101
- package/dist/components/HyvorBar/BarSupport.svelte.d.ts +7 -17
- package/dist/components/HyvorBar/BarUpdates.svelte +25 -15
- package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +6 -16
- package/dist/components/HyvorBar/BarUpdatesList.svelte +73 -48
- package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +6 -16
- package/dist/components/HyvorBar/BarUser.svelte +36 -24
- package/dist/components/HyvorBar/BarUser.svelte.d.ts +5 -15
- package/dist/components/HyvorBar/BarUserPreview.svelte +2 -1
- package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +16 -12
- package/dist/components/HyvorBar/HyvorBar.svelte +69 -36
- package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +7 -18
- package/dist/components/HyvorBar/bar.d.ts +2 -2
- package/dist/components/HyvorBar/img/G2.svelte.d.ts +22 -19
- package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +22 -19
- package/dist/components/IconButton/IconButton.svelte +43 -22
- package/dist/components/IconButton/IconButton.svelte.d.ts +10 -32
- package/dist/components/IconMessage/IconMessage.svelte +111 -56
- package/dist/components/IconMessage/IconMessage.svelte.d.ts +19 -35
- package/dist/components/Internationalization/InternationalizationProvider.svelte +14 -7
- package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +6 -17
- package/dist/components/Internationalization/LanguageToggle.svelte +73 -47
- package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +10 -20
- package/dist/components/Internationalization/T.svelte +158 -114
- package/dist/components/Internationalization/T.svelte.d.ts +17 -15
- package/dist/components/Internationalization/i18n.d.ts +1 -3
- package/dist/components/Internationalization/t.d.ts +1 -2
- package/dist/components/Internationalization/types.d.ts +1 -0
- package/dist/components/Link/Link.svelte +31 -19
- package/dist/components/Link/Link.svelte.d.ts +11 -33
- package/dist/components/Loader/LoadButton.svelte +24 -9
- package/dist/components/Loader/LoadButton.svelte.d.ts +29 -42
- package/dist/components/Loader/Loader.svelte +69 -42
- package/dist/components/Loader/Loader.svelte.d.ts +15 -26
- package/dist/components/Modal/ConfirmModalProvider.svelte +28 -20
- package/dist/components/Modal/ConfirmModalProvider.svelte.d.ts +3 -14
- package/dist/components/Modal/Modal.svelte +76 -47
- package/dist/components/Modal/Modal.svelte.d.ts +32 -29
- package/dist/components/Modal/ModalFooter.svelte +14 -6
- package/dist/components/Modal/ModalFooter.svelte.d.ts +23 -18
- package/dist/components/Modal/confirm.d.ts +2 -2
- package/dist/components/Modal/modal-types.d.ts +2 -2
- package/dist/components/NavLink/NavLink.svelte +31 -18
- package/dist/components/NavLink/NavLink.svelte.d.ts +11 -32
- package/dist/components/Radio/Radio.svelte +35 -16
- package/dist/components/Radio/Radio.svelte.d.ts +10 -32
- package/dist/components/Slider/Slider.svelte +86 -36
- package/dist/components/Slider/Slider.svelte.d.ts +25 -20
- package/dist/components/SplitControl/SplitControl.svelte +27 -18
- package/dist/components/SplitControl/SplitControl.svelte.d.ts +11 -23
- package/dist/components/Switch/Switch.svelte +30 -15
- package/dist/components/Switch/Switch.svelte.d.ts +8 -30
- package/dist/components/TabNav/TabNav.svelte +29 -15
- package/dist/components/TabNav/TabNav.svelte.d.ts +7 -18
- package/dist/components/TabNav/TabNavItem.svelte +36 -15
- package/dist/components/TabNav/TabNavItem.svelte.d.ts +10 -23
- package/dist/components/Table/Table.svelte +11 -4
- package/dist/components/Table/Table.svelte.d.ts +7 -18
- package/dist/components/Table/TableRow.svelte +11 -3
- package/dist/components/Table/TableRow.svelte.d.ts +7 -18
- package/dist/components/Tag/Tag.svelte +65 -31
- package/dist/components/Tag/Tag.svelte.d.ts +16 -38
- package/dist/components/Text/Text.svelte +20 -6
- package/dist/components/Text/Text.svelte.d.ts +10 -21
- package/dist/components/TextInput/TextInput.svelte +81 -28
- package/dist/components/TextInput/TextInput.svelte.d.ts +14 -36
- package/dist/components/Textarea/Textarea.svelte +46 -24
- package/dist/components/Textarea/Textarea.svelte.d.ts +13 -37
- package/dist/components/Toast/ToastIcon.svelte +26 -15
- package/dist/components/Toast/ToastIcon.svelte.d.ts +5 -15
- package/dist/components/Toast/ToastMessage.svelte +11 -4
- package/dist/components/Toast/ToastMessage.svelte.d.ts +5 -15
- package/dist/components/Toast/ToastProvider.svelte +6 -4
- package/dist/components/Toast/ToastProvider.svelte.d.ts +16 -12
- package/dist/components/Toast/toast.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.svelte +71 -55
- package/dist/components/Tooltip/Tooltip.svelte.d.ts +35 -23
- package/dist/marketing/Container/Container.svelte +8 -2
- package/dist/marketing/Container/Container.svelte.d.ts +6 -17
- package/dist/marketing/Docs/Content/Content.svelte +41 -29
- package/dist/marketing/Docs/Content/Content.svelte.d.ts +5 -15
- package/dist/marketing/Docs/Content/DocsImage.svelte +17 -9
- package/dist/marketing/Docs/Content/DocsImage.svelte.d.ts +9 -19
- package/dist/marketing/Docs/Docs.svelte +9 -3
- package/dist/marketing/Docs/Docs.svelte.d.ts +6 -28
- package/dist/marketing/Docs/Nav/Nav.svelte +77 -50
- package/dist/marketing/Docs/Nav/Nav.svelte.d.ts +5 -15
- package/dist/marketing/Docs/Nav/NavCategory.svelte +16 -6
- package/dist/marketing/Docs/Nav/NavCategory.svelte.d.ts +8 -19
- package/dist/marketing/Docs/Nav/NavItem.svelte +10 -3
- package/dist/marketing/Docs/Nav/NavItem.svelte.d.ts +6 -17
- package/dist/marketing/Docs/Sidebar/Sidebar.svelte.d.ts +22 -19
- package/dist/marketing/Docs/Toc.svelte +49 -39
- package/dist/marketing/Docs/Toc.svelte.d.ts +3 -14
- package/dist/marketing/Document/Document.svelte +11 -4
- package/dist/marketing/Document/Document.svelte.d.ts +7 -18
- package/dist/marketing/Document/DocumentTitle.svelte +16 -5
- package/dist/marketing/Document/DocumentTitle.svelte.d.ts +9 -19
- package/dist/marketing/Footer/Footer.svelte +55 -38
- package/dist/marketing/Footer/Footer.svelte.d.ts +8 -19
- package/dist/marketing/Footer/FooterLinkList.svelte +8 -2
- package/dist/marketing/Footer/FooterLinkList.svelte.d.ts +6 -17
- package/dist/marketing/Header/Header.svelte +41 -23
- package/dist/marketing/Header/Header.svelte.d.ts +10 -21
- package/dist/marketing/Logo/LogoBlogs.svelte +6 -1
- package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +5 -15
- package/dist/marketing/Logo/LogoCore.svelte +6 -1
- package/dist/marketing/Logo/LogoCore.svelte.d.ts +5 -15
- package/dist/marketing/Logo/LogoFortguard.svelte +7 -2
- package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +5 -15
- package/dist/marketing/Logo/LogoTalk.svelte +6 -1
- package/dist/marketing/Logo/LogoTalk.svelte.d.ts +5 -15
- package/dist/stores/dark.d.ts +0 -1
- package/package.json +10 -10
- package/dist/components/HyvorBar/BarProducts.svelte.d.ts +0 -39
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
value?: any;
|
|
8
|
+
block?: boolean;
|
|
9
|
+
rows?: number;
|
|
10
|
+
cols?: number;
|
|
11
|
+
state?: 'default' | 'success' | 'warning' | 'error';
|
|
12
|
+
textarea?: HTMLTextAreaElement;
|
|
13
|
+
start?: import('svelte').Snippet;
|
|
14
|
+
end?: import('svelte').Snippet;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
value = $bindable(undefined),
|
|
20
|
+
block = false,
|
|
21
|
+
rows = 5,
|
|
22
|
+
cols = 40,
|
|
23
|
+
state = 'default',
|
|
24
|
+
textarea = $bindable({} as HTMLTextAreaElement),
|
|
25
|
+
start,
|
|
26
|
+
end,
|
|
27
|
+
...rest
|
|
28
|
+
}: Props = $props();
|
|
7
29
|
</script>
|
|
8
30
|
|
|
9
31
|
<span
|
|
10
32
|
class="input-wrap state-{state}"
|
|
11
33
|
class:block
|
|
12
|
-
|
|
13
|
-
|
|
34
|
+
onclick={() => textarea.focus()}
|
|
35
|
+
onkeydown={(e) => {
|
|
14
36
|
if (e.key === 'Enter') {
|
|
15
37
|
textarea.focus();
|
|
16
38
|
}
|
|
@@ -18,34 +40,34 @@ export let textarea = {};
|
|
|
18
40
|
role="textbox"
|
|
19
41
|
tabindex="0"
|
|
20
42
|
>
|
|
21
|
-
{#if
|
|
43
|
+
{#if start}
|
|
22
44
|
<span class="slot start">
|
|
23
|
-
|
|
45
|
+
{@render start?.()}
|
|
24
46
|
</span>
|
|
25
47
|
{/if}
|
|
26
48
|
|
|
27
49
|
<textarea
|
|
28
50
|
bind:value
|
|
29
51
|
bind:this={textarea}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
onkeyup={bubble('keyup')}
|
|
53
|
+
onkeydown={bubble('keydown')}
|
|
54
|
+
onkeypress={bubble('keypress')}
|
|
55
|
+
onfocus={bubble('focus')}
|
|
56
|
+
onblur={bubble('blur')}
|
|
57
|
+
onclick={bubble('click')}
|
|
58
|
+
onmouseover={bubble('mouseover')}
|
|
59
|
+
onmouseenter={bubble('mouseenter')}
|
|
60
|
+
onmouseleave={bubble('mouseleave')}
|
|
61
|
+
onchange={bubble('change')}
|
|
62
|
+
oninput={bubble('input')}
|
|
41
63
|
{rows}
|
|
42
64
|
{cols}
|
|
43
|
-
{
|
|
65
|
+
{...rest}
|
|
44
66
|
></textarea>
|
|
45
67
|
|
|
46
|
-
{#if
|
|
68
|
+
{#if end}
|
|
47
69
|
<span class="slot end">
|
|
48
|
-
|
|
70
|
+
{@render end?.()}
|
|
49
71
|
</span>
|
|
50
72
|
{/if}
|
|
51
73
|
</span>
|
|
@@ -1,37 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
keydown: KeyboardEvent;
|
|
15
|
-
keypress: KeyboardEvent;
|
|
16
|
-
focus: FocusEvent;
|
|
17
|
-
blur: FocusEvent;
|
|
18
|
-
click: MouseEvent;
|
|
19
|
-
mouseover: MouseEvent;
|
|
20
|
-
mouseenter: MouseEvent;
|
|
21
|
-
mouseleave: MouseEvent;
|
|
22
|
-
change: Event;
|
|
23
|
-
input: Event;
|
|
24
|
-
} & {
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
26
|
-
};
|
|
27
|
-
slots: {
|
|
28
|
-
start: {};
|
|
29
|
-
end: {};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export type TextareaProps = typeof __propDef.props;
|
|
33
|
-
export type TextareaEvents = typeof __propDef.events;
|
|
34
|
-
export type TextareaSlots = typeof __propDef.slots;
|
|
35
|
-
export default class Textarea extends SvelteComponent<TextareaProps, TextareaEvents, TextareaSlots> {
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
1
|
+
declare const Textarea: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
value?: any;
|
|
4
|
+
block?: boolean;
|
|
5
|
+
rows?: number;
|
|
6
|
+
cols?: number;
|
|
7
|
+
state?: "default" | "success" | "warning" | "error";
|
|
8
|
+
textarea?: HTMLTextAreaElement;
|
|
9
|
+
start?: import("svelte").Snippet;
|
|
10
|
+
end?: import("svelte").Snippet;
|
|
11
|
+
}, {}, "value" | "textarea">;
|
|
12
|
+
type Textarea = ReturnType<typeof Textarea>;
|
|
13
|
+
export default Textarea;
|
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Toast } from './toast.ts';
|
|
3
|
+
import Loader from '../Loader/Loader.svelte';
|
|
4
|
+
import {
|
|
5
|
+
IconCheckCircleFill,
|
|
6
|
+
IconXCircleFill,
|
|
7
|
+
IconExclamationCircleFill,
|
|
8
|
+
IconInfoCircleFill
|
|
9
|
+
} from '@hyvor/icons';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
toast: Toast;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let { toast }: Props = $props();
|
|
16
|
+
|
|
17
|
+
let color = $derived(
|
|
18
|
+
(
|
|
19
|
+
{
|
|
20
|
+
success: 'var(--green)',
|
|
21
|
+
error: 'var(--red)',
|
|
22
|
+
warning: 'var(--orange)',
|
|
23
|
+
info: 'var(--blue)'
|
|
24
|
+
} as any
|
|
25
|
+
)[toast.type] || 'inherit'
|
|
26
|
+
);
|
|
16
27
|
</script>
|
|
17
28
|
|
|
18
29
|
<span style:color>
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { Toast } from './toast.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
toast: Toast;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
};
|
|
12
|
-
export type ToastIconProps = typeof __propDef.props;
|
|
13
|
-
export type ToastIconEvents = typeof __propDef.events;
|
|
14
|
-
export type ToastIconSlots = typeof __propDef.slots;
|
|
15
|
-
export default class ToastIcon extends SvelteComponent<ToastIconProps, ToastIconEvents, ToastIconSlots> {
|
|
2
|
+
interface Props {
|
|
3
|
+
toast: Toast;
|
|
16
4
|
}
|
|
17
|
-
|
|
5
|
+
declare const ToastIcon: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type ToastIcon = ReturnType<typeof ToastIcon>;
|
|
7
|
+
export default ToastIcon;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ToastIcon from './ToastIcon.svelte';
|
|
3
|
+
import type { Toast } from './toast.ts';
|
|
4
|
+
import { fade } from 'svelte/transition';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
toast: Toast;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { toast }: Props = $props();
|
|
4
11
|
</script>
|
|
5
12
|
|
|
6
13
|
<div class="toast" out:fade={{ duration: 200 }} in:fade={{ duration: 50 }}>
|
|
@@ -14,7 +21,7 @@ export let toast;
|
|
|
14
21
|
{#if typeof toast.message === 'string' || toast.message === null}
|
|
15
22
|
{@html toast.message}
|
|
16
23
|
{:else}
|
|
17
|
-
<
|
|
24
|
+
<toast.message {toast} />
|
|
18
25
|
{/if}
|
|
19
26
|
</div>
|
|
20
27
|
</div>
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { Toast } from './toast.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
toast: Toast;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
};
|
|
12
|
-
export type ToastMessageProps = typeof __propDef.props;
|
|
13
|
-
export type ToastMessageEvents = typeof __propDef.events;
|
|
14
|
-
export type ToastMessageSlots = typeof __propDef.slots;
|
|
15
|
-
export default class ToastMessage extends SvelteComponent<ToastMessageProps, ToastMessageEvents, ToastMessageSlots> {
|
|
2
|
+
interface Props {
|
|
3
|
+
toast: Toast;
|
|
16
4
|
}
|
|
17
|
-
|
|
5
|
+
declare const ToastMessage: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type ToastMessage = ReturnType<typeof ToastMessage>;
|
|
7
|
+
export default ToastMessage;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
useCleaner
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ToastMessage from './ToastMessage.svelte';
|
|
3
|
+
import { toastStore } from './toast.js';
|
|
4
|
+
import { useCleaner } from './cleaner.js';
|
|
5
|
+
|
|
6
|
+
useCleaner();
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<div id="toasts-wrap">
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
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> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
6
11
|
};
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export type ToastProviderProps = typeof __propDef.props;
|
|
10
|
-
export type ToastProviderEvents = typeof __propDef.events;
|
|
11
|
-
export type ToastProviderSlots = typeof __propDef.slots;
|
|
12
|
-
export default class ToastProvider extends SvelteComponent<ToastProviderProps, ToastProviderEvents, ToastProviderSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
declare const ToastProvider: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type ToastProvider = InstanceType<typeof ToastProvider>;
|
|
18
|
+
export default ToastProvider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Component } from 'svelte';
|
|
2
2
|
export interface Toast {
|
|
3
3
|
id: number;
|
|
4
4
|
type: ToastType;
|
|
@@ -7,7 +7,7 @@ export interface Toast {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const toastStore: import("svelte/store").Writable<Toast[]>;
|
|
9
9
|
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading' | 'blank';
|
|
10
|
-
export type ToastMessageType =
|
|
10
|
+
export type ToastMessageType = Component<any> | string | null;
|
|
11
11
|
declare function createHandler(type: ToastType): (message: ToastMessageType, options?: Partial<Toast>) => number;
|
|
12
12
|
type ToastFunctionSignature = ReturnType<typeof createHandler>;
|
|
13
13
|
interface ToastSignature {
|
|
@@ -1,58 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export let
|
|
7
|
-
export let
|
|
8
|
-
export let
|
|
9
|
-
let
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
<!-- @migration-task Error while migrating Svelte code: This migration would change the name of a slot making the component unusable -->
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
import { tick, onMount, onDestroy } from 'svelte';
|
|
4
|
+
import { fade } from 'svelte/transition';
|
|
5
|
+
|
|
6
|
+
export let text: string = '';
|
|
7
|
+
export let position: 'top' | 'bottom' | 'left' | 'right' = 'top';
|
|
8
|
+
export let color: 'black' | 'accent' | 'soft' | 'danger' = 'black';
|
|
9
|
+
export let show = false;
|
|
10
|
+
export let maxWidth: number = 300;
|
|
11
|
+
export let disabled = false;
|
|
12
|
+
|
|
13
|
+
let wrap: HTMLDivElement;
|
|
14
|
+
let tooltip: HTMLDivElement;
|
|
15
|
+
|
|
16
|
+
function positionTooltip() {
|
|
17
|
+
if (wrap && tooltip && show) {
|
|
18
|
+
const wrapRect = wrap.getBoundingClientRect();
|
|
19
|
+
const tooltipRect = tooltip.getBoundingClientRect();
|
|
20
|
+
|
|
21
|
+
let top, left;
|
|
22
|
+
|
|
23
|
+
if (position === 'top' || position === 'bottom') {
|
|
24
|
+
const topVal = wrapRect.top - tooltipRect.height - 10;
|
|
25
|
+
const leftVal = wrapRect.left + wrapRect.width / 2 - tooltipRect.width / 2;
|
|
26
|
+
|
|
27
|
+
top = position === 'top' ? topVal : wrapRect.bottom + 10;
|
|
28
|
+
left = leftVal;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (position === 'left' || position === 'right') {
|
|
32
|
+
const topVal = wrapRect.top + wrapRect.height / 2 - tooltipRect.height / 2;
|
|
33
|
+
const leftVal = wrapRect.left - tooltipRect.width - 10;
|
|
34
|
+
|
|
35
|
+
top = topVal;
|
|
36
|
+
left = position === 'left' ? leftVal : wrapRect.right + 10;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
tooltip.style.top = top + 'px';
|
|
40
|
+
tooltip.style.left = left + 'px';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function handleMouseEnter() {
|
|
45
|
+
if (!disabled) {
|
|
46
|
+
show = true;
|
|
47
|
+
await tick();
|
|
48
|
+
positionTooltip();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function handleMouseLeave() {
|
|
53
|
+
show = false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
$: {
|
|
57
|
+
if (text) {
|
|
58
|
+
tick().then(() => {
|
|
59
|
+
positionTooltip();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
onMount(() => {
|
|
65
|
+
positionTooltip();
|
|
66
|
+
document.addEventListener('scroll', positionTooltip);
|
|
67
|
+
|
|
68
|
+
return () => {
|
|
69
|
+
document.removeEventListener('scroll', positionTooltip);
|
|
70
|
+
};
|
|
71
|
+
});
|
|
56
72
|
</script>
|
|
57
73
|
|
|
58
74
|
<div
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
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> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {
|
|
16
|
-
default: {};
|
|
17
|
-
tooltip: {};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export type TooltipProps = typeof __propDef.props;
|
|
21
|
-
export type TooltipEvents = typeof __propDef.events;
|
|
22
|
-
export type TooltipSlots = typeof __propDef.slots;
|
|
23
|
-
export default class Tooltip extends SvelteComponent<TooltipProps, TooltipEvents, TooltipSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
24
13
|
}
|
|
25
|
-
|
|
14
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
+
default: any;
|
|
16
|
+
} ? Props extends Record<string, never> ? any : {
|
|
17
|
+
children?: any;
|
|
18
|
+
} : {});
|
|
19
|
+
declare const Tooltip: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
text?: string | undefined;
|
|
22
|
+
position?: "top" | "bottom" | "left" | "right" | undefined;
|
|
23
|
+
color?: "black" | "accent" | "soft" | "danger" | undefined;
|
|
24
|
+
show?: boolean | undefined;
|
|
25
|
+
maxWidth?: number | undefined;
|
|
26
|
+
disabled?: boolean | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
default: {};
|
|
29
|
+
tooltip: {};
|
|
30
|
+
}>, {
|
|
31
|
+
[evt: string]: CustomEvent<any>;
|
|
32
|
+
}, {
|
|
33
|
+
default: {};
|
|
34
|
+
tooltip: {};
|
|
35
|
+
}, {}, string>;
|
|
36
|
+
type Tooltip = InstanceType<typeof Tooltip>;
|
|
37
|
+
export default Tooltip;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
as?: string;
|
|
4
|
+
children?: import('svelte').Snippet;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
let { as = 'div', children }: Props = $props();
|
|
2
8
|
</script>
|
|
3
9
|
|
|
4
10
|
<svelte:element this={as} class="container">
|
|
5
|
-
|
|
11
|
+
{@render children?.()}
|
|
6
12
|
</svelte:element>
|
|
7
13
|
|
|
8
14
|
<style>
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
as?: string | undefined;
|
|
5
|
-
};
|
|
6
|
-
events: {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {
|
|
10
|
-
default: {};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export type ContainerProps = typeof __propDef.props;
|
|
14
|
-
export type ContainerEvents = typeof __propDef.events;
|
|
15
|
-
export type ContainerSlots = typeof __propDef.slots;
|
|
16
|
-
export default class Container extends SvelteComponent<ContainerProps, ContainerEvents, ContainerSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
as?: string;
|
|
3
|
+
children?: import('svelte').Snippet;
|
|
17
4
|
}
|
|
18
|
-
|
|
5
|
+
declare const Container: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type Container = ReturnType<typeof Container>;
|
|
7
|
+
export default Container;
|
|
@@ -1,37 +1,49 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Box from '../../../components/Box/Box.svelte';
|
|
3
|
+
import { page } from '$app/stores';
|
|
4
|
+
import { onMount } from 'svelte';
|
|
5
|
+
interface Props {
|
|
6
|
+
children?: import('svelte').Snippet;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { children }: Props = $props();
|
|
10
|
+
|
|
11
|
+
function linkifyHeadings() {
|
|
12
|
+
var hs = document.querySelectorAll('h2[id],h3[id],h4[id]');
|
|
13
|
+
for (var i = 0; i < hs.length; i++) {
|
|
14
|
+
var h = hs[i];
|
|
15
|
+
|
|
16
|
+
var icon = document.createElement('a');
|
|
17
|
+
icon.className = 'heading-anchor-link';
|
|
18
|
+
icon.innerHTML =
|
|
19
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-link-45deg" viewBox="0 0 16 16"><path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z"/><path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z"/></svg>';
|
|
20
|
+
icon.tabIndex = -1;
|
|
21
|
+
h.appendChild(icon);
|
|
22
|
+
|
|
23
|
+
var id = h.getAttribute('id');
|
|
24
|
+
var link = document.createElement('a');
|
|
25
|
+
link.className = 'heading-anchor';
|
|
26
|
+
link.setAttribute('href', '#' + id);
|
|
27
|
+
link.innerHTML = h.innerHTML;
|
|
28
|
+
h.innerHTML = link.outerHTML;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
onMount(() => {
|
|
33
|
+
const unsubscribe = page.subscribe(() => {
|
|
34
|
+
linkifyHeadings();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
return () => {
|
|
38
|
+
unsubscribe();
|
|
39
|
+
};
|
|
40
|
+
});
|
|
29
41
|
</script>
|
|
30
42
|
|
|
31
43
|
<div class="content-wrap">
|
|
32
44
|
<Box>
|
|
33
45
|
<content>
|
|
34
|
-
|
|
46
|
+
{@render children?.()}
|
|
35
47
|
</content>
|
|
36
48
|
</Box>
|
|
37
49
|
</div>
|