@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,51 @@
|
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
<Box>
|
|
45
|
+
<content>
|
|
46
|
+
{@render children?.()}
|
|
47
|
+
</content>
|
|
48
|
+
</Box>
|
|
37
49
|
</div>
|
|
38
50
|
|
|
39
51
|
<style>.content-wrap {
|
|
@@ -48,7 +60,8 @@ content {
|
|
|
48
60
|
padding: 30px 50px;
|
|
49
61
|
}
|
|
50
62
|
|
|
51
|
-
content :global(p),
|
|
63
|
+
content :global(p),
|
|
64
|
+
content :global(li) {
|
|
52
65
|
line-height: var(--line-height-content);
|
|
53
66
|
}
|
|
54
67
|
|
|
@@ -161,4 +174,4 @@ content :global(h6 a:not(.heading-anchor-link)) {
|
|
|
161
174
|
content {
|
|
162
175
|
padding: 20px 25px;
|
|
163
176
|
}
|
|
164
|
-
}</style>
|
|
177
|
+
}</style>
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
1
|
+
declare const Content: import("svelte").Component<{
|
|
2
|
+
children?: import("svelte").Snippet;
|
|
3
|
+
}, {}, "">;
|
|
4
|
+
type Content = ReturnType<typeof Content>;
|
|
5
|
+
export default Content;
|
|
@@ -1,79 +1,77 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
{src}
|
|
14
|
-
{alt}
|
|
15
|
-
{...$$restProps}
|
|
16
|
-
{width}
|
|
17
|
-
on:click={() => open = true}
|
|
18
|
-
class="preview"
|
|
19
|
-
/>
|
|
19
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
20
|
+
<img {src} {alt} {...rest} {width} onclick={() => (open = true)} class="preview" />
|
|
20
21
|
</div>
|
|
21
22
|
|
|
22
23
|
{#if open}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/>
|
|
35
|
-
</div>
|
|
24
|
+
<div class="modal">
|
|
25
|
+
<img
|
|
26
|
+
{src}
|
|
27
|
+
{alt}
|
|
28
|
+
{...modalImageProps}
|
|
29
|
+
use:clickOutside={{
|
|
30
|
+
callback: () => (open = false)
|
|
31
|
+
}}
|
|
32
|
+
transition:scale={{ duration: 100, opacity: 0.5, start: 0.95 }}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
36
35
|
{/if}
|
|
37
36
|
|
|
38
37
|
<style>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.modal {
|
|
54
|
-
position: fixed;
|
|
55
|
-
z-index: 1000000;
|
|
56
|
-
left: 0;
|
|
57
|
-
top: 0;
|
|
58
|
-
width: 100%;
|
|
59
|
-
height: 100%;
|
|
60
|
-
background-color: rgba(0,0,0,0.5);
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: center;
|
|
64
|
-
padding: 40px;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
}
|
|
67
|
-
.modal-content {
|
|
68
|
-
min-height: 0;
|
|
69
|
-
}
|
|
70
|
-
.modal img {
|
|
71
|
-
max-width: 100%;
|
|
72
|
-
max-height: 100%;
|
|
73
|
-
border-radius: 5px;
|
|
74
|
-
}
|
|
75
|
-
.wrap {
|
|
76
|
-
padding: 25px 0;
|
|
77
|
-
}
|
|
38
|
+
img.preview {
|
|
39
|
+
display: block;
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
max-height: 100%;
|
|
42
|
+
margin: 0 auto;
|
|
43
|
+
border-radius: 5px;
|
|
44
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
transition: 0.1s box-shadow;
|
|
47
|
+
}
|
|
48
|
+
img.preview:hover {
|
|
49
|
+
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
|
|
50
|
+
}
|
|
78
51
|
|
|
79
|
-
|
|
52
|
+
.modal {
|
|
53
|
+
position: fixed;
|
|
54
|
+
z-index: 1000000;
|
|
55
|
+
left: 0;
|
|
56
|
+
top: 0;
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
padding: 40px;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
.modal-content {
|
|
67
|
+
min-height: 0;
|
|
68
|
+
}
|
|
69
|
+
.modal img {
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
max-height: 100%;
|
|
72
|
+
border-radius: 5px;
|
|
73
|
+
}
|
|
74
|
+
.wrap {
|
|
75
|
+
padding: 25px 0;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
declare const DocsImage: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
width?: undefined | number;
|
|
6
|
+
modalImageProps?: any;
|
|
7
|
+
}, {}, "">;
|
|
8
|
+
type DocsImage = ReturnType<typeof DocsImage>;
|
|
9
|
+
export default DocsImage;
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Sidebar from
|
|
1
|
+
<script lang="ts">
|
|
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
|
-
<div class="docs">
|
|
5
10
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
<div class="docs">
|
|
12
|
+
{@render nav?.()}
|
|
13
|
+
{@render content?.()}
|
|
14
|
+
<Sidebar />
|
|
9
15
|
</div>
|
|
10
16
|
|
|
11
17
|
<style>
|
|
18
|
+
.docs {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
margin: auto;
|
|
22
|
+
width: 1150px;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
padding-bottom: 40px;
|
|
25
|
+
/* min-height: calc(100vh - var(--header-height)); */
|
|
26
|
+
}
|
|
12
27
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* min-height: calc(100vh - var(--header-height)); */
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@media (max-width: 992px) {
|
|
25
|
-
.docs {
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
width: 100%;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
</style>
|
|
28
|
+
@media (max-width: 992px) {
|
|
29
|
+
.docs {
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
nav: {};
|
|
10
|
-
content: {};
|
|
11
|
-
}> {
|
|
12
|
-
}
|
|
13
|
-
export type DocsProps = typeof __propDef.props;
|
|
14
|
-
export type DocsEvents = typeof __propDef.events;
|
|
15
|
-
export type DocsSlots = typeof __propDef.slots;
|
|
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 {};
|
|
1
|
+
declare const Docs: import("svelte").Component<{
|
|
2
|
+
nav?: import("svelte").Snippet;
|
|
3
|
+
content?: import("svelte").Snippet;
|
|
4
|
+
}, {}, "">;
|
|
5
|
+
type Docs = ReturnType<typeof Docs>;
|
|
6
|
+
export default Docs;
|
|
@@ -1,76 +1,102 @@
|
|
|
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">
|
|
79
|
+
{#if active}
|
|
80
|
+
<button class="mobile hds-box" onclick={handleMobileClick}>
|
|
81
|
+
<div class="left">
|
|
82
|
+
{#if active.category}
|
|
83
|
+
<span class="category">{active.category}</span> »
|
|
84
|
+
{/if}
|
|
85
|
+
<span class="name">{active.name}</span>
|
|
86
|
+
</div>
|
|
87
|
+
<IconList size={18} />
|
|
88
|
+
</button>
|
|
89
|
+
{/if}
|
|
52
90
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</button>
|
|
63
|
-
{/if}
|
|
64
|
-
|
|
65
|
-
<nav
|
|
66
|
-
class="hds-box nav-inner"
|
|
67
|
-
bind:this={navEl}
|
|
68
|
-
use:clickOutside={{
|
|
69
|
-
callback: handleNavOutsideClick
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
<slot />
|
|
73
|
-
</nav>
|
|
91
|
+
<nav
|
|
92
|
+
class="hds-box nav-inner"
|
|
93
|
+
bind:this={navEl}
|
|
94
|
+
use:clickOutside={{
|
|
95
|
+
callback: handleNavOutsideClick
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
{@render children?.()}
|
|
99
|
+
</nav>
|
|
74
100
|
</div>
|
|
75
101
|
|
|
76
102
|
<style>.docs-nav {
|
|
@@ -128,4 +154,4 @@ nav {
|
|
|
128
154
|
max-height: 500px;
|
|
129
155
|
z-index: 100;
|
|
130
156
|
}
|
|
131
|
-
}</style>
|
|
157
|
+
}</style>
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
1
|
+
declare const Nav: import("svelte").Component<{
|
|
2
|
+
children?: import("svelte").Snippet;
|
|
3
|
+
}, {}, "">;
|
|
4
|
+
type Nav = ReturnType<typeof Nav>;
|
|
5
|
+
export default Nav;
|