@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,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
props: Record<string, never>;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {
|
|
8
|
-
default: {};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type ContentProps = typeof __propDef.props;
|
|
12
|
-
export type ContentEvents = typeof __propDef.events;
|
|
13
|
-
export type ContentSlots = typeof __propDef.slots;
|
|
14
|
-
export default class Content extends SvelteComponent<ContentProps, ContentEvents, ContentSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
children?: import('svelte').Snippet;
|
|
15
3
|
}
|
|
16
|
-
|
|
4
|
+
declare const Content: import("svelte").Component<Props, {}, "">;
|
|
5
|
+
type Content = ReturnType<typeof Content>;
|
|
6
|
+
export default Content;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { scale } from 'svelte/transition';
|
|
3
|
+
import { clickOutside } from '../../../components/index.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
src: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
width?: undefined | number;
|
|
9
|
+
modalImageProps?: any;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { src, alt, width = undefined, modalImageProps = {}, ...rest }: Props = $props();
|
|
14
|
+
|
|
15
|
+
let open = $state(false);
|
|
8
16
|
</script>
|
|
9
17
|
|
|
10
18
|
<div class="wrap">
|
|
11
|
-
<!-- svelte-ignore
|
|
12
|
-
<img {src} {alt} {
|
|
19
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
20
|
+
<img {src} {alt} {...rest} {width} onclick={() => (open = true)} class="preview" />
|
|
13
21
|
</div>
|
|
14
22
|
|
|
15
23
|
{#if open}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
width?: undefined | number;
|
|
8
|
-
modalImageProps?: any;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {};
|
|
14
|
-
};
|
|
15
|
-
export type DocsImageProps = typeof __propDef.props;
|
|
16
|
-
export type DocsImageEvents = typeof __propDef.events;
|
|
17
|
-
export type DocsImageSlots = typeof __propDef.slots;
|
|
18
|
-
export default class DocsImage extends SvelteComponent<DocsImageProps, DocsImageEvents, DocsImageSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
width?: undefined | number;
|
|
5
|
+
modalImageProps?: any;
|
|
6
|
+
[key: string]: any;
|
|
19
7
|
}
|
|
20
|
-
|
|
8
|
+
declare const DocsImage: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type DocsImage = ReturnType<typeof DocsImage>;
|
|
10
|
+
export default DocsImage;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script lang="ts">
|
|
2
2
|
import Sidebar from './Sidebar/Sidebar.svelte';
|
|
3
|
+
interface Props {
|
|
4
|
+
nav?: import('svelte').Snippet;
|
|
5
|
+
content?: import('svelte').Snippet;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let { nav, content }: Props = $props();
|
|
3
9
|
</script>
|
|
4
10
|
|
|
5
11
|
<div class="docs">
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
{@render nav?.()}
|
|
13
|
+
{@render content?.()}
|
|
8
14
|
<Sidebar />
|
|
9
15
|
</div>
|
|
10
16
|
|
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default class Docs extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
nav: {};
|
|
10
|
-
content: {};
|
|
11
|
-
}> {
|
|
1
|
+
interface Props {
|
|
2
|
+
nav?: import('svelte').Snippet;
|
|
3
|
+
content?: import('svelte').Snippet;
|
|
12
4
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
import { SvelteComponent } from "svelte";
|
|
17
|
-
declare const __propDef: {
|
|
18
|
-
props: {
|
|
19
|
-
[x: string]: never;
|
|
20
|
-
};
|
|
21
|
-
events: {
|
|
22
|
-
[evt: string]: CustomEvent<any>;
|
|
23
|
-
};
|
|
24
|
-
slots: {
|
|
25
|
-
nav: {};
|
|
26
|
-
content: {};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export {};
|
|
5
|
+
declare const Docs: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type Docs = ReturnType<typeof Docs>;
|
|
7
|
+
export default Docs;
|
|
@@ -1,56 +1,83 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { afterNavigate, onNavigate } from '$app/navigation';
|
|
3
|
+
import { page } from '$app/stores';
|
|
4
|
+
import { IconList } from '@hyvor/icons';
|
|
5
|
+
import { onMount } from 'svelte';
|
|
6
|
+
import { clickOutside } from '../../../components/index.js';
|
|
7
|
+
interface Props {
|
|
8
|
+
children?: import('svelte').Snippet;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { children }: Props = $props();
|
|
12
|
+
|
|
13
|
+
let navEl: HTMLElement | undefined = $state();
|
|
14
|
+
|
|
15
|
+
interface Active {
|
|
16
|
+
name: string;
|
|
17
|
+
category: string | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let active: Active | null = $state(null);
|
|
21
|
+
|
|
22
|
+
function setActive() {
|
|
23
|
+
const activeEl = navEl?.querySelector('a.active');
|
|
24
|
+
|
|
25
|
+
if (!activeEl || !(activeEl instanceof HTMLElement)) {
|
|
26
|
+
active = null;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const category =
|
|
31
|
+
(activeEl.closest('.nav-category')?.querySelector('.name') as HTMLElement)?.innerText || null;
|
|
32
|
+
|
|
33
|
+
active = {
|
|
34
|
+
name: activeEl.innerText,
|
|
35
|
+
category
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
onMount(() => {
|
|
40
|
+
setActive();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
afterNavigate(() => {
|
|
44
|
+
setActive();
|
|
45
|
+
hideNavOnMobile();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
let mobileNavShown = false;
|
|
49
|
+
|
|
50
|
+
function handleMobileClick(e: any) {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
if (!navEl) return;
|
|
53
|
+
if (navEl.style.display !== 'block') {
|
|
54
|
+
navEl.style.display = 'block';
|
|
55
|
+
mobileNavShown = true;
|
|
56
|
+
} else {
|
|
57
|
+
navEl.style.display = 'none';
|
|
58
|
+
mobileNavShown = false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function handleNavOutsideClick() {
|
|
63
|
+
if (!navEl) return;
|
|
64
|
+
if (mobileNavShown) {
|
|
65
|
+
navEl.style.display = 'none';
|
|
66
|
+
mobileNavShown = false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function hideNavOnMobile() {
|
|
71
|
+
if (!navEl) return;
|
|
72
|
+
if (window.innerWidth < 992) {
|
|
73
|
+
navEl.style.display = 'none';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
49
76
|
</script>
|
|
50
77
|
|
|
51
78
|
<div class="docs-nav">
|
|
52
79
|
{#if active}
|
|
53
|
-
<button class="mobile hds-box"
|
|
80
|
+
<button class="mobile hds-box" onclick={handleMobileClick}>
|
|
54
81
|
<div class="left">
|
|
55
82
|
{#if active.category}
|
|
56
83
|
<span class="category">{active.category}</span> »
|
|
@@ -68,7 +95,7 @@ function hideNavOnMobile() {
|
|
|
68
95
|
callback: handleNavOutsideClick
|
|
69
96
|
}}
|
|
70
97
|
>
|
|
71
|
-
|
|
98
|
+
{@render children?.()}
|
|
72
99
|
</nav>
|
|
73
100
|
</div>
|
|
74
101
|
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
props: Record<string, never>;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {
|
|
8
|
-
default: {};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type NavProps = typeof __propDef.props;
|
|
12
|
-
export type NavEvents = typeof __propDef.events;
|
|
13
|
-
export type NavSlots = typeof __propDef.slots;
|
|
14
|
-
export default class Nav extends SvelteComponent<NavProps, NavEvents, NavSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
children?: import('svelte').Snippet;
|
|
15
3
|
}
|
|
16
|
-
|
|
4
|
+
declare const Nav: import("svelte").Component<Props, {}, "">;
|
|
5
|
+
type Nav = ReturnType<typeof Nav>;
|
|
6
|
+
export default Nav;
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ComponentType } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
name: string;
|
|
6
|
+
start?: import('svelte').Snippet;
|
|
7
|
+
end?: import('svelte').Snippet;
|
|
8
|
+
children?: import('svelte').Snippet;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { name, start, end, children }: Props = $props();
|
|
2
12
|
</script>
|
|
3
13
|
|
|
4
14
|
<div class="nav-category">
|
|
5
15
|
<div class="name">
|
|
6
16
|
<span class="button-content">
|
|
7
|
-
{#if
|
|
8
|
-
<span class="slot start"
|
|
17
|
+
{#if start}
|
|
18
|
+
<span class="slot start">{@render start?.()}</span>
|
|
9
19
|
{/if}
|
|
10
20
|
|
|
11
|
-
{#if
|
|
12
|
-
<span class="slot end"
|
|
21
|
+
{#if end}
|
|
22
|
+
<span class="slot end">{@render end?.()}</span>
|
|
13
23
|
{/if}
|
|
14
24
|
</span>
|
|
15
25
|
{name}
|
|
16
26
|
</div>
|
|
17
27
|
<div class="nav-items">
|
|
18
|
-
|
|
28
|
+
{@render children?.()}
|
|
19
29
|
</div>
|
|
20
30
|
</div>
|
|
21
31
|
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
events: {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {
|
|
10
|
-
start: {};
|
|
11
|
-
end: {};
|
|
12
|
-
default: {};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type NavCategoryProps = typeof __propDef.props;
|
|
16
|
-
export type NavCategoryEvents = typeof __propDef.events;
|
|
17
|
-
export type NavCategorySlots = typeof __propDef.slots;
|
|
18
|
-
export default class NavCategory extends SvelteComponent<NavCategoryProps, NavCategoryEvents, NavCategorySlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
name: string;
|
|
3
|
+
start?: import('svelte').Snippet;
|
|
4
|
+
end?: import('svelte').Snippet;
|
|
5
|
+
children?: import('svelte').Snippet;
|
|
19
6
|
}
|
|
20
|
-
|
|
7
|
+
declare const NavCategory: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type NavCategory = ReturnType<typeof NavCategory>;
|
|
9
|
+
export default NavCategory;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { page } from '$app/stores';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
href: string;
|
|
6
|
+
children?: import('svelte').Snippet;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { href, children }: Props = $props();
|
|
3
10
|
</script>
|
|
4
11
|
|
|
5
12
|
<a
|
|
@@ -7,7 +14,7 @@ export let href;
|
|
|
7
14
|
class:active={href === $page.url.pathname}
|
|
8
15
|
aria-current={href === $page.url.pathname ? 'page' : undefined}
|
|
9
16
|
>
|
|
10
|
-
|
|
17
|
+
{@render children?.()}
|
|
11
18
|
</a>
|
|
12
19
|
|
|
13
20
|
<style>
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
href: string;
|
|
5
|
-
};
|
|
6
|
-
events: {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {
|
|
10
|
-
default: {};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export type NavItemProps = typeof __propDef.props;
|
|
14
|
-
export type NavItemEvents = typeof __propDef.events;
|
|
15
|
-
export type NavItemSlots = typeof __propDef.slots;
|
|
16
|
-
export default class NavItem extends SvelteComponent<NavItemProps, NavItemEvents, NavItemSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
href: string;
|
|
3
|
+
children?: import('svelte').Snippet;
|
|
17
4
|
}
|
|
18
|
-
|
|
5
|
+
declare const NavItem: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type NavItem = ReturnType<typeof NavItem>;
|
|
7
|
+
export default NavItem;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SidebarSlots */
|
|
4
|
-
export default class Sidebar extends SvelteComponent<{
|
|
1
|
+
export default Sidebar;
|
|
2
|
+
type Sidebar = SvelteComponent<{
|
|
5
3
|
[x: string]: never;
|
|
6
4
|
}, {
|
|
7
5
|
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
|
|
10
|
-
export type SidebarProps = typeof __propDef.props;
|
|
11
|
-
export type SidebarEvents = typeof __propDef.events;
|
|
12
|
-
export type SidebarSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
22
8
|
};
|
|
23
|
-
|
|
9
|
+
declare const Sidebar: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
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
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -1,50 +1,63 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { afterNavigate } from '$app/navigation';
|
|
3
|
+
import { onMount } from 'svelte';
|
|
4
|
+
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import tocbot from 'tocbot';
|
|
7
|
+
|
|
8
|
+
import Loader from '../../components/Loader/Loader.svelte';
|
|
9
|
+
import { IconCaretDown, IconCaretRight } from '@hyvor/icons';
|
|
10
|
+
import Button from '../../components/Button/Button.svelte';
|
|
11
|
+
|
|
12
|
+
let tocElement: HTMLDivElement | undefined = $state();
|
|
13
|
+
|
|
14
|
+
onMount(() => {
|
|
15
|
+
tocbot.init({
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
tocElement: tocElement,
|
|
18
|
+
contentSelector: '.docs .content-wrap',
|
|
19
|
+
headingSelector: 'h2, h3, h4, h5, h6',
|
|
20
|
+
orderedList: false,
|
|
21
|
+
hasInnerContainers: true,
|
|
22
|
+
headingsOffset: 75,
|
|
23
|
+
scrollSmooth: true,
|
|
24
|
+
scrollSmoothOffset: -75
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
afterNavigate(() => {
|
|
29
|
+
tocbot.refresh();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
let mobileShown = $state(false);
|
|
33
|
+
|
|
34
|
+
function handleMobileClick(e: any) {
|
|
35
|
+
if (!tocElement) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
e.stopPropagation();
|
|
40
|
+
if (!mobileShown) {
|
|
41
|
+
tocElement.style.display = 'block';
|
|
42
|
+
mobileShown = true;
|
|
43
|
+
} else {
|
|
44
|
+
tocElement.style.display = 'none';
|
|
45
|
+
mobileShown = false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
35
48
|
</script>
|
|
36
49
|
|
|
37
50
|
<div class="wrap hds-box">
|
|
38
51
|
<div class="mobile">
|
|
39
52
|
<Button color="input" on:click={handleMobileClick}>
|
|
40
53
|
Table of Contents
|
|
41
|
-
|
|
54
|
+
{#snippet end()}
|
|
42
55
|
{#if mobileShown}
|
|
43
56
|
<IconCaretDown size={14} />
|
|
44
57
|
{:else}
|
|
45
58
|
<IconCaretRight size={14} />
|
|
46
59
|
{/if}
|
|
47
|
-
|
|
60
|
+
{/snippet}
|
|
48
61
|
</Button>
|
|
49
62
|
</div>
|
|
50
63
|
|
|
@@ -61,9 +74,6 @@ function handleMobileClick(e) {
|
|
|
61
74
|
align-self: flex-start;
|
|
62
75
|
overflow-y: auto;
|
|
63
76
|
}
|
|
64
|
-
.toc-wrap :global(&.toc) {
|
|
65
|
-
overflow-y: auto;
|
|
66
|
-
}
|
|
67
77
|
.toc-wrap :global(> .toc-list) {
|
|
68
78
|
overflow: hidden;
|
|
69
79
|
position: relative;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
};
|
|
9
|
-
export type TocProps = typeof __propDef.props;
|
|
10
|
-
export type TocEvents = typeof __propDef.events;
|
|
11
|
-
export type TocSlots = typeof __propDef.slots;
|
|
12
|
-
export default class Toc extends SvelteComponent<TocProps, TocEvents, TocSlots> {
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
1
|
+
declare const Toc: import("svelte").Component<Record<string, never>, {}, "">;
|
|
2
|
+
type Toc = ReturnType<typeof Toc>;
|
|
3
|
+
export default Toc;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import FeatureSectionTitle from './DocumentTitle.svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
children?: import('svelte').Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { title, subtitle, children }: Props = $props();
|
|
4
11
|
</script>
|
|
5
12
|
|
|
6
13
|
<section>
|
|
7
14
|
<div class="hds-container container">
|
|
8
15
|
<FeatureSectionTitle {title} />
|
|
9
16
|
<div class="date">{subtitle}</div>
|
|
10
|
-
<content
|
|
17
|
+
<content>{@render children?.()}</content>
|
|
11
18
|
</div>
|
|
12
19
|
</section>
|
|
13
20
|
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
subtitle: string;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {
|
|
11
|
-
default: {};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type DocumentProps = typeof __propDef.props;
|
|
15
|
-
export type DocumentEvents = typeof __propDef.events;
|
|
16
|
-
export type DocumentSlots = typeof __propDef.slots;
|
|
17
|
-
export default class Document extends SvelteComponent<DocumentProps, DocumentEvents, DocumentSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle: string;
|
|
4
|
+
children?: import('svelte').Snippet;
|
|
18
5
|
}
|
|
19
|
-
|
|
6
|
+
declare const Document: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type Document = ReturnType<typeof Document>;
|
|
8
|
+
export default Document;
|