@hyvor/design 0.0.67 → 1.0.3
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 +21 -13
- package/dist/components/ActionList/ActionList.svelte.d.ts +8 -20
- package/dist/components/ActionList/ActionListGroup.svelte +40 -35
- package/dist/components/ActionList/ActionListGroup.svelte.d.ts +8 -20
- package/dist/components/ActionList/ActionListItem.svelte +129 -107
- package/dist/components/ActionList/ActionListItem.svelte.d.ts +27 -25
- package/dist/components/ActionList/Selected.svelte +27 -24
- package/dist/components/ActionList/Selected.svelte.d.ts +6 -17
- package/dist/components/Avatar/Avatar.svelte +22 -19
- package/dist/components/Avatar/Avatar.svelte.d.ts +7 -18
- package/dist/components/Avatar/AvatarStack.svelte +29 -27
- package/dist/components/Avatar/AvatarStack.svelte.d.ts +6 -18
- package/dist/components/Base/Base.svelte +16 -8
- package/dist/components/Base/Base.svelte.d.ts +6 -18
- package/dist/components/Box/Box.svelte +16 -9
- package/dist/components/Box/Box.svelte.d.ts +7 -19
- package/dist/components/Button/Button.svelte +65 -47
- package/dist/components/Button/Button.svelte.d.ts +16 -39
- package/dist/components/Button/ButtonGroup.svelte +14 -6
- package/dist/components/Button/ButtonGroup.svelte.d.ts +5 -27
- package/dist/components/Callout/Callout.svelte +110 -87
- package/dist/components/Callout/Callout.svelte.d.ts +11 -22
- package/dist/components/Checkbox/Checkbox.svelte +156 -144
- package/dist/components/Checkbox/Checkbox.svelte.d.ts +11 -34
- package/dist/components/CodeBlock/CodeBlock.svelte +45 -32
- package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +6 -17
- package/dist/components/CodeBlock/getCode.js +8 -6
- package/dist/components/CodeBlock/hljs.scss +189 -191
- package/dist/components/CodeBlock/prism.scss +370 -7
- package/dist/components/ColorPicker/ColorPicker.svelte +75 -56
- package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +25 -19
- package/dist/components/Dark/DarkProvider.svelte +16 -14
- package/dist/components/Dark/DarkProvider.svelte.d.ts +16 -12
- package/dist/components/Dark/DarkToggle.svelte +15 -16
- package/dist/components/Dark/DarkToggle.svelte.d.ts +16 -12
- package/dist/components/Divider/Divider.svelte +23 -13
- package/dist/components/Divider/Divider.svelte.d.ts +9 -20
- package/dist/components/Dropdown/Dropdown.svelte +58 -114
- package/dist/components/Dropdown/Dropdown.svelte.d.ts +13 -24
- package/dist/components/Dropdown/DropdownContent.svelte +152 -0
- package/dist/components/Dropdown/DropdownContent.svelte.d.ts +12 -0
- package/dist/components/FormControl/Caption.svelte +18 -11
- package/dist/components/FormControl/Caption.svelte.d.ts +7 -19
- package/dist/components/FormControl/FormControl.svelte +28 -19
- package/dist/components/FormControl/FormControl.svelte.d.ts +6 -27
- package/dist/components/FormControl/InputGroup.svelte +22 -15
- package/dist/components/FormControl/InputGroup.svelte.d.ts +7 -19
- package/dist/components/FormControl/Label.svelte +15 -6
- package/dist/components/FormControl/Label.svelte.d.ts +6 -27
- package/dist/components/FormControl/Validation.svelte +30 -19
- package/dist/components/FormControl/Validation.svelte.d.ts +9 -21
- package/dist/components/HyvorBar/BarProducts.svelte +71 -0
- package/dist/components/HyvorBar/BarProducts.svelte.d.ts +32 -0
- package/dist/components/HyvorBar/BarSupport.svelte +183 -0
- package/dist/components/HyvorBar/BarSupport.svelte.d.ts +8 -0
- package/dist/components/HyvorBar/BarUpdates.svelte +68 -0
- package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +7 -0
- package/dist/components/HyvorBar/BarUpdatesList.svelte +159 -0
- package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +7 -0
- package/dist/components/HyvorBar/BarUser.svelte +72 -0
- package/dist/components/HyvorBar/BarUser.svelte.d.ts +5 -0
- package/dist/components/HyvorBar/BarUserPreview.svelte +43 -0
- package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +18 -0
- package/dist/components/HyvorBar/HyvorBar.svelte +183 -0
- package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +8 -0
- package/dist/components/HyvorBar/bar.d.ts +33 -0
- package/dist/components/HyvorBar/bar.js +74 -0
- package/dist/components/HyvorBar/img/G2.svelte +9 -0
- package/dist/components/HyvorBar/img/G2.svelte.d.ts +26 -0
- package/dist/components/HyvorBar/img/Trustpilot.svelte +11 -0
- package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +26 -0
- package/dist/components/IconButton/IconButton.svelte +49 -32
- package/dist/components/IconButton/IconButton.svelte.d.ts +10 -33
- package/dist/components/IconMessage/IconMessage.svelte +157 -51
- package/dist/components/IconMessage/IconMessage.svelte.d.ts +19 -27
- package/dist/components/Internationalization/InternationalizationProvider.svelte +15 -8
- package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +7 -19
- package/dist/components/Internationalization/LanguageToggle.svelte +80 -57
- package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +11 -22
- 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 +3 -5
- package/dist/components/Internationalization/i18n.js +13 -11
- package/dist/components/Internationalization/t.d.ts +2 -3
- package/dist/components/Internationalization/t.js +4 -4
- package/dist/components/Internationalization/types.d.ts +2 -1
- package/dist/components/Link/Link.svelte +68 -61
- package/dist/components/Link/Link.svelte.d.ts +11 -34
- package/dist/components/Loader/LoadButton.svelte +39 -38
- package/dist/components/Loader/LoadButton.svelte.d.ts +29 -42
- package/dist/components/Loader/Loader.svelte +121 -107
- package/dist/components/Loader/Loader.svelte.d.ts +15 -27
- package/dist/components/Modal/ConfirmModalProvider.svelte +41 -51
- package/dist/components/Modal/ConfirmModalProvider.svelte.d.ts +3 -14
- package/dist/components/Modal/Modal.svelte +202 -203
- package/dist/components/Modal/Modal.svelte.d.ts +31 -29
- package/dist/components/Modal/ModalFooter.svelte +36 -31
- package/dist/components/Modal/ModalFooter.svelte.d.ts +22 -18
- package/dist/components/Modal/confirm.d.ts +2 -2
- package/dist/components/Modal/confirm.js +4 -4
- package/dist/components/Modal/modal-types.d.ts +4 -4
- package/dist/components/NavLink/NavLink.svelte +94 -89
- package/dist/components/NavLink/NavLink.svelte.d.ts +11 -33
- package/dist/components/Radio/Radio.svelte +46 -35
- package/dist/components/Radio/Radio.svelte.d.ts +10 -33
- package/dist/components/Slider/Slider.svelte +129 -120
- package/dist/components/Slider/Slider.svelte.d.ts +24 -20
- package/dist/components/SplitControl/SplitControl.svelte +43 -48
- package/dist/components/SplitControl/SplitControl.svelte.d.ts +11 -24
- package/dist/components/Switch/Switch.svelte +77 -67
- package/dist/components/Switch/Switch.svelte.d.ts +8 -31
- package/dist/components/TabNav/TabNav.svelte +33 -23
- package/dist/components/TabNav/TabNav.svelte.d.ts +7 -19
- package/dist/components/TabNav/TabNavItem.svelte +65 -51
- package/dist/components/TabNav/TabNavItem.svelte.d.ts +10 -24
- package/dist/components/Table/Table.svelte +17 -7
- package/dist/components/Table/Table.svelte.d.ts +7 -19
- package/dist/components/Table/TableRow.svelte +32 -24
- package/dist/components/Table/TableRow.svelte.d.ts +7 -19
- package/dist/components/Tag/Tag.svelte +75 -49
- package/dist/components/Tag/Tag.svelte.d.ts +16 -39
- package/dist/components/Text/Text.svelte +33 -26
- package/dist/components/Text/Text.svelte.d.ts +10 -22
- package/dist/components/TextInput/TextInput.svelte +54 -33
- package/dist/components/TextInput/TextInput.svelte.d.ts +12 -36
- package/dist/components/Textarea/Textarea.svelte +68 -46
- package/dist/components/Textarea/Textarea.svelte.d.ts +13 -37
- package/dist/components/Toast/ToastIcon.svelte +55 -46
- package/dist/components/Toast/ToastIcon.svelte.d.ts +5 -16
- package/dist/components/Toast/ToastMessage.svelte +42 -41
- package/dist/components/Toast/ToastMessage.svelte.d.ts +5 -16
- package/dist/components/Toast/ToastProvider.svelte +22 -20
- package/dist/components/Toast/ToastProvider.svelte.d.ts +16 -12
- package/dist/components/Toast/cleaner.js +5 -5
- package/dist/components/Toast/toast.d.ts +3 -3
- package/dist/components/Toast/toast.js +10 -10
- package/dist/components/Tooltip/Tooltip.svelte +163 -148
- package/dist/components/Tooltip/Tooltip.svelte.d.ts +35 -23
- package/dist/components/directives/clickOutside.js +4 -4
- package/dist/components/directives/debounce.d.ts +1 -0
- package/dist/components/directives/debounce.js +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/index.css +31 -33
- package/dist/marketing/Container/Container.svelte +15 -9
- package/dist/marketing/Container/Container.svelte.d.ts +6 -18
- package/dist/marketing/Docs/Content/Content.svelte +48 -35
- package/dist/marketing/Docs/Content/Content.svelte.d.ts +5 -16
- package/dist/marketing/Docs/Content/DocsImage.svelte +67 -69
- package/dist/marketing/Docs/Content/DocsImage.svelte.d.ts +9 -20
- package/dist/marketing/Docs/Docs.svelte +28 -25
- package/dist/marketing/Docs/Docs.svelte.d.ts +6 -29
- package/dist/marketing/Docs/Nav/Nav.svelte +96 -70
- package/dist/marketing/Docs/Nav/Nav.svelte.d.ts +5 -16
- package/dist/marketing/Docs/Nav/NavCategory.svelte +39 -29
- package/dist/marketing/Docs/Nav/NavCategory.svelte.d.ts +8 -20
- package/dist/marketing/Docs/Nav/NavItem.svelte +30 -26
- package/dist/marketing/Docs/Nav/NavItem.svelte.d.ts +6 -18
- package/dist/marketing/Docs/Sidebar/Sidebar.svelte +22 -25
- package/dist/marketing/Docs/Sidebar/Sidebar.svelte.d.ts +22 -19
- package/dist/marketing/Docs/Toc.svelte +64 -56
- package/dist/marketing/Docs/Toc.svelte.d.ts +3 -14
- package/dist/marketing/Document/Document.svelte +15 -8
- package/dist/marketing/Document/Document.svelte.d.ts +7 -19
- package/dist/marketing/Document/DocumentTitle.svelte +65 -54
- package/dist/marketing/Document/DocumentTitle.svelte.d.ts +9 -20
- package/dist/marketing/Footer/Footer.svelte +154 -145
- package/dist/marketing/Footer/Footer.svelte.d.ts +8 -20
- package/dist/marketing/Footer/FooterLinkList.svelte +31 -27
- package/dist/marketing/Footer/FooterLinkList.svelte.d.ts +6 -18
- package/dist/marketing/Header/Header.svelte +47 -37
- package/dist/marketing/Header/Header.svelte.d.ts +10 -22
- package/dist/marketing/Logo/LogoBlogs.svelte +46 -0
- package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +5 -0
- package/dist/marketing/Logo/LogoCore.svelte +46 -0
- package/dist/marketing/Logo/LogoCore.svelte.d.ts +5 -0
- package/dist/marketing/Logo/LogoFortguard.svelte +54 -0
- package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +5 -0
- package/dist/marketing/Logo/LogoTalk.svelte +32 -0
- package/dist/marketing/Logo/LogoTalk.svelte.d.ts +5 -0
- package/dist/stores/dark.d.ts +0 -1
- package/dist/stores/dark.js +8 -8
- package/dist/variables.scss +41 -48
- package/package.json +59 -58
|
@@ -1,39 +1,49 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
<div class="name">
|
|
16
|
+
<span class="button-content">
|
|
17
|
+
{#if start}
|
|
18
|
+
<span class="slot start">{@render start?.()}</span>
|
|
19
|
+
{/if}
|
|
10
20
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
{#if end}
|
|
22
|
+
<span class="slot end">{@render end?.()}</span>
|
|
23
|
+
{/if}
|
|
24
|
+
</span>
|
|
25
|
+
{name}
|
|
26
|
+
</div>
|
|
27
|
+
<div class="nav-items">
|
|
28
|
+
{@render children?.()}
|
|
29
|
+
</div>
|
|
20
30
|
</div>
|
|
21
31
|
|
|
22
32
|
<style>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
.nav-category {
|
|
34
|
+
margin-bottom: 20px;
|
|
35
|
+
}
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
.name {
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
padding: 10px 25px;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
}
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
.slot.start {
|
|
45
|
+
margin-right: 5px;
|
|
46
|
+
margin-left: 0;
|
|
47
|
+
display: flex;
|
|
48
|
+
}
|
|
39
49
|
</style>
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
declare const NavCategory: import("svelte").Component<{
|
|
2
|
+
name: string;
|
|
3
|
+
start?: import("svelte").Snippet;
|
|
4
|
+
end?: import("svelte").Snippet;
|
|
5
|
+
children?: import("svelte").Snippet;
|
|
6
|
+
}, {}, "">;
|
|
7
|
+
type NavCategory = ReturnType<typeof NavCategory>;
|
|
8
|
+
export default NavCategory;
|
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { page } from '$app/stores';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
href: string;
|
|
6
|
+
children?: import('svelte').Snippet;
|
|
7
|
+
}
|
|
4
8
|
|
|
9
|
+
let { href, children }: Props = $props();
|
|
10
|
+
</script>
|
|
5
11
|
|
|
6
|
-
<a
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
<a
|
|
13
|
+
{href}
|
|
14
|
+
class:active={href === $page.url.pathname}
|
|
15
|
+
aria-current={href === $page.url.pathname ? 'page' : undefined}
|
|
10
16
|
>
|
|
11
|
-
|
|
17
|
+
{@render children?.()}
|
|
12
18
|
</a>
|
|
13
19
|
|
|
14
20
|
<style>
|
|
21
|
+
a {
|
|
22
|
+
display: block;
|
|
23
|
+
padding: 4px 25px;
|
|
24
|
+
color: var(--text-light);
|
|
25
|
+
font-size: 14px;
|
|
26
|
+
letter-spacing: 0.3px;
|
|
27
|
+
border-left: 3px solid transparent;
|
|
28
|
+
}
|
|
15
29
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
color: var(--text-light);
|
|
20
|
-
font-size: 14px;
|
|
21
|
-
letter-spacing: .3px;
|
|
22
|
-
border-left: 3px solid transparent;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
a:hover {
|
|
26
|
-
background-color: var(--hover);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
a.active {
|
|
30
|
-
background-color: var(--accent-lightest);
|
|
31
|
-
border-left: 3px solid var(--accent);
|
|
32
|
-
}
|
|
30
|
+
a:hover {
|
|
31
|
+
background-color: var(--hover);
|
|
32
|
+
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
a.active {
|
|
35
|
+
background-color: var(--accent-lightest);
|
|
36
|
+
border-left: 3px solid var(--accent);
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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> {
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
declare const NavItem: import("svelte").Component<{
|
|
2
|
+
href: string;
|
|
3
|
+
children?: import("svelte").Snippet;
|
|
4
|
+
}, {}, "">;
|
|
5
|
+
type NavItem = ReturnType<typeof NavItem>;
|
|
6
|
+
export default NavItem;
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import Toc from '../Toc.svelte';
|
|
4
3
|
</script>
|
|
4
|
+
|
|
5
5
|
<div class="sidebar">
|
|
6
|
-
|
|
6
|
+
<Toc />
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
<style>
|
|
10
|
+
.sidebar {
|
|
11
|
+
width: 220px;
|
|
12
|
+
top: var(--header-height, 0);
|
|
13
|
+
padding: 25px 0;
|
|
14
|
+
position: sticky;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
align-self: flex-start;
|
|
17
|
+
}
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
order: 1;
|
|
24
|
-
position: relative;
|
|
25
|
-
top: initial;
|
|
26
|
-
padding: 0 15px;
|
|
27
|
-
margin-bottom: 20px;
|
|
28
|
-
width: 100%;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
</style>
|
|
19
|
+
@media (max-width: 992px) {
|
|
20
|
+
.sidebar {
|
|
21
|
+
order: 1;
|
|
22
|
+
position: relative;
|
|
23
|
+
top: initial;
|
|
24
|
+
padding: 0 15px;
|
|
25
|
+
margin-bottom: 20px;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -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,58 +1,69 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import Loader from "../../components/Loader/Loader.svelte";
|
|
5
|
-
import { IconCaretDown, IconCaretRight } from "@hyvor/icons";
|
|
6
|
-
import Button from "../../components/Button/Button.svelte";
|
|
7
|
-
let tocElement;
|
|
8
|
-
onMount(() => {
|
|
9
|
-
tocbot.init({
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
tocElement,
|
|
12
|
-
contentSelector: ".docs .content-wrap",
|
|
13
|
-
headingSelector: "h2, h3, h4, h5, h6",
|
|
14
|
-
orderedList: false,
|
|
15
|
-
hasInnerContainers: true,
|
|
16
|
-
headingsOffset: 75,
|
|
17
|
-
scrollSmooth: true,
|
|
18
|
-
scrollSmoothOffset: -75
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
afterNavigate(() => {
|
|
22
|
-
tocbot.refresh();
|
|
23
|
-
});
|
|
24
|
-
let mobileShown = false;
|
|
25
|
-
function handleMobileClick(e) {
|
|
26
|
-
e.stopPropagation();
|
|
27
|
-
if (!mobileShown) {
|
|
28
|
-
tocElement.style.display = "block";
|
|
29
|
-
mobileShown = true;
|
|
30
|
-
} else {
|
|
31
|
-
tocElement.style.display = "none";
|
|
32
|
-
mobileShown = false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { afterNavigate } from '$app/navigation';
|
|
3
|
+
import { onMount } from 'svelte';
|
|
36
4
|
|
|
37
|
-
|
|
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
|
+
});
|
|
38
27
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<svelte:fragment slot="end">
|
|
43
|
-
{#if mobileShown}
|
|
44
|
-
<IconCaretDown size={14} />
|
|
45
|
-
{:else}
|
|
46
|
-
<IconCaretRight size={14} />
|
|
47
|
-
{/if}
|
|
48
|
-
</svelte:fragment>
|
|
49
|
-
</Button>
|
|
50
|
-
</div>
|
|
28
|
+
afterNavigate(() => {
|
|
29
|
+
tocbot.refresh();
|
|
30
|
+
});
|
|
51
31
|
|
|
52
|
-
|
|
53
|
-
<Loader block padding={30} size="small" />
|
|
54
|
-
</div>
|
|
32
|
+
let mobileShown = $state(false);
|
|
55
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
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<div class="wrap hds-box">
|
|
51
|
+
<div class="mobile">
|
|
52
|
+
<Button color="input" on:click={handleMobileClick}>
|
|
53
|
+
Table of Contents
|
|
54
|
+
{#snippet end()}
|
|
55
|
+
{#if mobileShown}
|
|
56
|
+
<IconCaretDown size={14} />
|
|
57
|
+
{:else}
|
|
58
|
+
<IconCaretRight size={14} />
|
|
59
|
+
{/if}
|
|
60
|
+
{/snippet}
|
|
61
|
+
</Button>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="toc-wrap" bind:this={tocElement}>
|
|
65
|
+
<Loader block padding={30} size="small" />
|
|
66
|
+
</div>
|
|
56
67
|
</div>
|
|
57
68
|
|
|
58
69
|
<style>.wrap {
|
|
@@ -63,9 +74,6 @@ function handleMobileClick(e) {
|
|
|
63
74
|
align-self: flex-start;
|
|
64
75
|
overflow-y: auto;
|
|
65
76
|
}
|
|
66
|
-
.toc-wrap :global(&.toc) {
|
|
67
|
-
overflow-y: auto;
|
|
68
|
-
}
|
|
69
77
|
.toc-wrap :global(> .toc-list) {
|
|
70
78
|
overflow: hidden;
|
|
71
79
|
position: relative;
|
|
@@ -112,7 +120,7 @@ function handleMobileClick(e) {
|
|
|
112
120
|
font-weight: 700;
|
|
113
121
|
}
|
|
114
122
|
.toc-wrap :global(.toc-link::before) {
|
|
115
|
-
background-color: #
|
|
123
|
+
background-color: #eee;
|
|
116
124
|
content: " ";
|
|
117
125
|
display: inline-block;
|
|
118
126
|
height: inherit;
|
|
@@ -146,4 +154,4 @@ function handleMobileClick(e) {
|
|
|
146
154
|
:global(.is-active-link::before) {
|
|
147
155
|
background-color: #eee !important;
|
|
148
156
|
}
|
|
149
|
-
}</style>
|
|
157
|
+
}</style>
|
|
@@ -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,14 +1,21 @@
|
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
<div class="hds-container container">
|
|
15
|
+
<FeatureSectionTitle {title} />
|
|
16
|
+
<div class="date">{subtitle}</div>
|
|
17
|
+
<content>{@render children?.()}</content>
|
|
18
|
+
</div>
|
|
12
19
|
</section>
|
|
13
20
|
|
|
14
21
|
<style>* {
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
declare const Document: import("svelte").Component<{
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle: string;
|
|
4
|
+
children?: import("svelte").Snippet;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type Document = ReturnType<typeof Document>;
|
|
7
|
+
export default Document;
|
|
@@ -1,63 +1,74 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string | undefined;
|
|
5
|
+
icon?: null | string;
|
|
6
|
+
h2Style?: string | undefined;
|
|
7
|
+
wrapStyle?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
title,
|
|
12
|
+
subtitle = undefined,
|
|
13
|
+
icon = null,
|
|
14
|
+
h2Style = undefined,
|
|
15
|
+
wrapStyle = undefined
|
|
16
|
+
}: Props = $props();
|
|
6
17
|
</script>
|
|
7
18
|
|
|
8
19
|
<div class="wrap document-title" style={wrapStyle}>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
<h2 style={h2Style}>
|
|
21
|
+
{title}
|
|
22
|
+
{#if icon}
|
|
23
|
+
<div class="img-wrap">
|
|
24
|
+
<img src={icon} alt={title} />
|
|
25
|
+
</div>
|
|
26
|
+
{/if}
|
|
27
|
+
</h2>
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
{#if subtitle}
|
|
30
|
+
<h3>{@html subtitle}</h3>
|
|
31
|
+
{/if}
|
|
21
32
|
</div>
|
|
22
33
|
|
|
23
34
|
<style>
|
|
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
|
-
|
|
35
|
+
.wrap {
|
|
36
|
+
margin-top: 100px;
|
|
37
|
+
}
|
|
38
|
+
h2 {
|
|
39
|
+
font-size: 38px;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
margin-bottom: 10px;
|
|
42
|
+
margin-top: 20px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
}
|
|
48
|
+
h3 {
|
|
49
|
+
font-size: 20px;
|
|
50
|
+
width: 650px;
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
margin: 0 auto;
|
|
53
|
+
font-weight: normal;
|
|
54
|
+
line-height: 1.4;
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
.img-wrap {
|
|
58
|
+
text-align: center;
|
|
59
|
+
margin-left: 20px;
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
}
|
|
63
|
+
img {
|
|
64
|
+
width: 85px;
|
|
65
|
+
height: 85px;
|
|
66
|
+
}
|
|
56
67
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
@media (max-width: 992px) {
|
|
69
|
+
h2 {
|
|
70
|
+
flex-direction: column-reverse;
|
|
71
|
+
gap: 15px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
63
74
|
</style>
|