@hyvor/design 0.0.66 → 0.0.68
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 +2 -7
- package/dist/components/ActionList/ActionListGroup.svelte +24 -29
- package/dist/components/ActionList/ActionListItem.svelte +86 -88
- package/dist/components/ActionList/Selected.svelte +17 -20
- package/dist/components/Avatar/Avatar.svelte +7 -11
- package/dist/components/Avatar/AvatarStack.svelte +16 -20
- package/dist/components/Base/Base.svelte +3 -3
- package/dist/components/Box/Box.svelte +8 -8
- package/dist/components/Button/Button.svelte +33 -42
- package/dist/components/Button/ButtonGroup.svelte +6 -6
- package/dist/components/Callout/Callout.svelte +88 -86
- package/dist/components/Callout/Callout.svelte.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.svelte +113 -121
- package/dist/components/CodeBlock/CodeBlock.svelte +26 -23
- package/dist/components/CodeBlock/getCode.js +6 -6
- package/dist/components/CodeBlock/hljs.scss +189 -191
- package/dist/components/CodeBlock/prism.scss +370 -7
- package/dist/components/ColorPicker/ColorPicker.svelte +42 -42
- package/dist/components/Dark/DarkProvider.svelte +9 -9
- package/dist/components/Dark/DarkToggle.svelte +7 -10
- package/dist/components/Divider/Divider.svelte +6 -7
- package/dist/components/Dropdown/Dropdown.svelte +33 -108
- package/dist/components/Dropdown/DropdownContent.svelte +120 -0
- package/dist/components/Dropdown/DropdownContent.svelte.d.ts +24 -0
- package/dist/components/FormControl/Caption.svelte +9 -9
- package/dist/components/FormControl/FormControl.svelte +18 -18
- package/dist/components/FormControl/InputGroup.svelte +7 -8
- package/dist/components/FormControl/Label.svelte +5 -5
- package/dist/components/FormControl/Validation.svelte +18 -16
- package/dist/components/FormControl/Validation.svelte.d.ts +1 -1
- package/dist/components/HyvorBar/BarProducts.svelte +52 -0
- package/dist/components/HyvorBar/BarProducts.svelte.d.ts +39 -0
- package/dist/components/HyvorBar/BarSupport.svelte +119 -0
- package/dist/components/HyvorBar/BarSupport.svelte.d.ts +19 -0
- package/dist/components/HyvorBar/BarUpdates.svelte +58 -0
- package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +18 -0
- package/dist/components/HyvorBar/BarUpdatesList.svelte +134 -0
- package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +18 -0
- package/dist/components/HyvorBar/BarUser.svelte +60 -0
- package/dist/components/HyvorBar/BarUser.svelte.d.ts +16 -0
- package/dist/components/HyvorBar/BarUserPreview.svelte +42 -0
- package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +14 -0
- package/dist/components/HyvorBar/HyvorBar.svelte +150 -0
- package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +19 -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 +23 -0
- package/dist/components/HyvorBar/img/Trustpilot.svelte +11 -0
- package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +23 -0
- package/dist/components/IconButton/IconButton.svelte +19 -23
- package/dist/components/IconMessage/IconMessage.svelte +84 -47
- package/dist/components/IconMessage/IconMessage.svelte.d.ts +9 -1
- package/dist/components/Internationalization/InternationalizationProvider.svelte +2 -2
- package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +1 -1
- package/dist/components/Internationalization/LanguageToggle.svelte +33 -36
- package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +2 -2
- package/dist/components/Internationalization/T.svelte.d.ts +3 -3
- package/dist/components/Internationalization/i18n.d.ts +4 -4
- package/dist/components/Internationalization/i18n.js +13 -11
- package/dist/components/Internationalization/t.d.ts +3 -3
- package/dist/components/Internationalization/t.js +4 -4
- package/dist/components/Internationalization/types.d.ts +1 -1
- package/dist/components/Link/Link.svelte +53 -58
- package/dist/components/Loader/LoadButton.svelte +15 -29
- package/dist/components/Loader/Loader.svelte +56 -69
- package/dist/components/Modal/ConfirmModalProvider.svelte +18 -36
- package/dist/components/Modal/Modal.svelte +134 -164
- package/dist/components/Modal/ModalFooter.svelte +23 -26
- package/dist/components/Modal/confirm.d.ts +1 -1
- package/dist/components/Modal/confirm.js +4 -4
- package/dist/components/Modal/modal-types.d.ts +2 -2
- package/dist/components/NavLink/NavLink.svelte +78 -86
- package/dist/components/Radio/Radio.svelte +23 -31
- package/dist/components/Slider/Slider.svelte +71 -80
- package/dist/components/Slider/Slider.svelte.d.ts +0 -1
- package/dist/components/SplitControl/SplitControl.svelte +28 -42
- package/dist/components/Switch/Switch.svelte +60 -65
- package/dist/components/TabNav/TabNav.svelte +6 -10
- package/dist/components/TabNav/TabNavItem.svelte +36 -43
- package/dist/components/Table/Table.svelte +7 -4
- package/dist/components/Table/TableRow.svelte +23 -23
- package/dist/components/Tag/Tag.svelte +28 -36
- package/dist/components/Text/Text.svelte +15 -22
- package/dist/components/TextInput/TextInput.svelte +26 -26
- package/dist/components/Textarea/Textarea.svelte +42 -50
- package/dist/components/Textarea/Textarea.svelte.d.ts +1 -1
- package/dist/components/Toast/ToastIcon.svelte +29 -31
- package/dist/components/Toast/ToastMessage.svelte +33 -39
- package/dist/components/Toast/ToastProvider.svelte +16 -16
- package/dist/components/Toast/cleaner.js +5 -5
- package/dist/components/Toast/toast.d.ts +2 -2
- package/dist/components/Toast/toast.js +10 -10
- package/dist/components/Tooltip/Tooltip.svelte +82 -83
- 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 +8 -8
- package/dist/marketing/Docs/Content/Content.svelte +8 -7
- package/dist/marketing/Docs/Content/DocsImage.svelte +52 -62
- package/dist/marketing/Docs/Docs.svelte +21 -24
- package/dist/marketing/Docs/Nav/Nav.svelte +21 -22
- package/dist/marketing/Docs/Nav/NavCategory.svelte +28 -28
- package/dist/marketing/Docs/Nav/NavItem.svelte +21 -24
- package/dist/marketing/Docs/Sidebar/Sidebar.svelte +22 -25
- package/dist/marketing/Docs/Toc.svelte +17 -19
- package/dist/marketing/Document/Document.svelte +59 -0
- package/dist/marketing/Document/Document.svelte.d.ts +19 -0
- package/dist/marketing/Document/DocumentTitle.svelte +63 -0
- package/dist/marketing/Document/DocumentTitle.svelte.d.ts +20 -0
- package/dist/marketing/Footer/Footer.svelte +111 -119
- package/dist/marketing/Footer/FooterLinkList.svelte +24 -26
- package/dist/marketing/Header/Header.svelte +7 -15
- package/dist/marketing/Logo/LogoBlogs.svelte +41 -0
- package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +16 -0
- package/dist/marketing/Logo/LogoCore.svelte +41 -0
- package/dist/marketing/Logo/LogoCore.svelte.d.ts +16 -0
- package/dist/marketing/Logo/LogoFortguard.svelte +49 -0
- package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +16 -0
- package/dist/marketing/Logo/LogoTalk.svelte +27 -0
- package/dist/marketing/Logo/LogoTalk.svelte.d.ts +16 -0
- package/dist/marketing/index.d.ts +1 -0
- package/dist/marketing/index.js +1 -0
- package/dist/stores/dark.js +8 -8
- package/dist/variables.scss +41 -48
- package/package.json +59 -58
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { onDestroy } from
|
|
2
|
-
import { default as toastService, toastStore } from
|
|
1
|
+
import { onDestroy } from 'svelte';
|
|
2
|
+
import { default as toastService, toastStore } from './toast.js';
|
|
3
3
|
const DEFAULT_DURATIONS = {
|
|
4
4
|
success: 2000,
|
|
5
|
-
loading: Infinity
|
|
5
|
+
loading: Infinity
|
|
6
6
|
};
|
|
7
7
|
export function useCleaner() {
|
|
8
8
|
const timeouts = new Map();
|
|
9
|
-
const unsubscribe = toastStore.subscribe(toasts => {
|
|
10
|
-
toasts.forEach(toast => {
|
|
9
|
+
const unsubscribe = toastStore.subscribe((toasts) => {
|
|
10
|
+
toasts.forEach((toast) => {
|
|
11
11
|
if (timeouts.has(toast.id)) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SvelteComponent } from
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
2
|
export interface Toast {
|
|
3
3
|
id: number;
|
|
4
4
|
type: ToastType;
|
|
@@ -6,7 +6,7 @@ export interface Toast {
|
|
|
6
6
|
duration?: number;
|
|
7
7
|
}
|
|
8
8
|
export declare const toastStore: import("svelte/store").Writable<Toast[]>;
|
|
9
|
-
export type ToastType =
|
|
9
|
+
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading' | 'blank';
|
|
10
10
|
export type ToastMessageType = typeof SvelteComponent<Record<string, any>> | string | null;
|
|
11
11
|
declare function createHandler(type: ToastType): (message: ToastMessageType, options?: Partial<Toast>) => number;
|
|
12
12
|
type ToastFunctionSignature = ReturnType<typeof createHandler>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { get, writable } from
|
|
1
|
+
import { get, writable } from 'svelte/store';
|
|
2
2
|
const MAX_TOASTS = 10;
|
|
3
3
|
export const toastStore = writable([]);
|
|
4
4
|
const storeHelper = {
|
|
@@ -6,10 +6,10 @@ const storeHelper = {
|
|
|
6
6
|
toastStore.update((toasts) => [toast, ...toasts].slice(0, MAX_TOASTS));
|
|
7
7
|
},
|
|
8
8
|
update: (toast) => {
|
|
9
|
-
toastStore.update((toasts) => toasts.map(t => t.id === toast.id ? { ...t, ...toast } : t));
|
|
9
|
+
toastStore.update((toasts) => toasts.map((t) => (t.id === toast.id ? { ...t, ...toast } : t)));
|
|
10
10
|
},
|
|
11
11
|
upsert: (toast) => {
|
|
12
|
-
if (get(toastStore).find(t => t.id === toast.id)) {
|
|
12
|
+
if (get(toastStore).find((t) => t.id === toast.id)) {
|
|
13
13
|
storeHelper.update(toast);
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
@@ -17,7 +17,7 @@ const storeHelper = {
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
remove: (id) => {
|
|
20
|
-
toastStore.update((toasts) => toasts.filter(t => t.id !== id));
|
|
20
|
+
toastStore.update((toasts) => toasts.filter((t) => t.id !== id));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
let id = 0;
|
|
@@ -33,11 +33,11 @@ function createHandler(type) {
|
|
|
33
33
|
return newId;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
const toast = createHandler(
|
|
37
|
-
toast.success = createHandler(
|
|
38
|
-
toast.error = createHandler(
|
|
39
|
-
toast.warning = createHandler(
|
|
40
|
-
toast.info = createHandler(
|
|
41
|
-
toast.loading = createHandler(
|
|
36
|
+
const toast = createHandler('blank');
|
|
37
|
+
toast.success = createHandler('success');
|
|
38
|
+
toast.error = createHandler('error');
|
|
39
|
+
toast.warning = createHandler('warning');
|
|
40
|
+
toast.info = createHandler('info');
|
|
41
|
+
toast.loading = createHandler('loading');
|
|
42
42
|
toast.close = (id) => storeHelper.remove(id);
|
|
43
43
|
export default toast;
|
|
@@ -55,100 +55,99 @@ onMount(() => {
|
|
|
55
55
|
});
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
|
-
<div
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
<div
|
|
59
|
+
class="tooltip-wrap {color}"
|
|
60
|
+
on:mouseenter={handleMouseEnter}
|
|
61
|
+
on:mouseleave={handleMouseLeave}
|
|
62
|
+
role="tooltip"
|
|
63
|
+
bind:this={wrap}
|
|
64
|
+
{...$$restProps}
|
|
65
65
|
>
|
|
66
|
-
|
|
66
|
+
<slot />
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
{#if !disabled && show}
|
|
69
|
+
<div
|
|
70
|
+
class="tooltip {position}"
|
|
71
|
+
style:max-width={maxWidth + 'px'}
|
|
72
|
+
bind:this={tooltip}
|
|
73
|
+
transition:fade={{ duration: 100 }}
|
|
74
|
+
>
|
|
75
|
+
{#if $$slots.tooltip}
|
|
76
|
+
<slot name="tooltip" />
|
|
77
|
+
{:else}
|
|
78
|
+
{text}
|
|
79
|
+
{/if}
|
|
80
|
+
</div>
|
|
81
|
+
{/if}
|
|
82
82
|
</div>
|
|
83
83
|
|
|
84
84
|
<style>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
.tooltip-wrap {
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
position: relative;
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
--local-bg: #24292f;
|
|
91
|
+
--local-color: #fff;
|
|
92
|
+
}
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
.tooltip-wrap.soft {
|
|
95
|
+
--local-bg: var(--accent-light);
|
|
96
|
+
--local-color: var(--accent);
|
|
97
|
+
}
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
.tooltip-wrap.accent {
|
|
100
|
+
--local-bg: var(--accent);
|
|
101
|
+
--local-color: var(--accent-text);
|
|
102
|
+
}
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
.tooltip-wrap.danger {
|
|
105
|
+
--local-bg: var(--red-dark);
|
|
106
|
+
--local-color: var(--text-white);
|
|
107
|
+
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
.tooltip {
|
|
110
|
+
position: fixed;
|
|
111
|
+
background-color: var(--local-bg);
|
|
112
|
+
color: var(--local-color);
|
|
113
|
+
padding: 8px 20px;
|
|
114
|
+
border-radius: 20px;
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
z-index: 10000;
|
|
117
|
+
}
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
119
|
+
.tooltip:after {
|
|
120
|
+
content: '';
|
|
121
|
+
position: absolute;
|
|
122
|
+
border: 4px solid transparent;
|
|
123
|
+
}
|
|
124
|
+
.tooltip.top:after {
|
|
125
|
+
top: 100%;
|
|
126
|
+
border-top-color: var(--local-bg);
|
|
127
|
+
left: 50%;
|
|
128
|
+
transform: translateX(-50%);
|
|
129
|
+
}
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
.tooltip.bottom:after {
|
|
132
|
+
bottom: 100%;
|
|
133
|
+
border-bottom-color: var(--local-bg);
|
|
134
|
+
left: 50%;
|
|
135
|
+
transform: translateX(-50%);
|
|
136
|
+
}
|
|
137
137
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
.tooltip.right:after {
|
|
147
|
-
right: 100%;
|
|
148
|
-
top: 50%;
|
|
149
|
-
transform: translateY(-50%);
|
|
150
|
-
border-right-color: var(--local-bg);
|
|
151
|
-
margin-right: -1px;
|
|
152
|
-
}
|
|
138
|
+
.tooltip.left:after {
|
|
139
|
+
left: 100%;
|
|
140
|
+
top: 50%;
|
|
141
|
+
transform: translateY(-50%);
|
|
142
|
+
border-left-color: var(--local-bg);
|
|
143
|
+
margin-left: -1px;
|
|
144
|
+
}
|
|
153
145
|
|
|
154
|
-
|
|
146
|
+
.tooltip.right:after {
|
|
147
|
+
right: 100%;
|
|
148
|
+
top: 50%;
|
|
149
|
+
transform: translateY(-50%);
|
|
150
|
+
border-right-color: var(--local-bg);
|
|
151
|
+
margin-right: -1px;
|
|
152
|
+
}
|
|
153
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function clickOutside(node, input) {
|
|
2
|
-
const options =
|
|
2
|
+
const options = typeof input === 'function' ? { callback: input } : input;
|
|
3
3
|
const enabled = options.enabled === undefined ? true : options.enabled;
|
|
4
4
|
if (!enabled)
|
|
5
5
|
return;
|
|
@@ -11,11 +11,11 @@ export function clickOutside(node, input) {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
setTimeout(() => {
|
|
14
|
-
document.addEventListener(
|
|
14
|
+
document.addEventListener('click', handleClick);
|
|
15
15
|
}, 0);
|
|
16
16
|
return {
|
|
17
17
|
destroy() {
|
|
18
|
-
document.removeEventListener(
|
|
19
|
-
}
|
|
18
|
+
document.removeEventListener('click', handleClick);
|
|
19
|
+
}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function debounce(func: Function, wait: number): (this: any, ...args: any[]) => void;
|
|
@@ -19,6 +19,7 @@ export { default as FormControl } from './FormControl/FormControl.svelte';
|
|
|
19
19
|
export { default as InputGroup } from './FormControl/InputGroup.svelte';
|
|
20
20
|
export { default as Label } from './FormControl/Label.svelte';
|
|
21
21
|
export { default as Validation } from './FormControl/Validation.svelte';
|
|
22
|
+
export { default as HyvorBar } from './HyvorBar/HyvorBar.svelte';
|
|
22
23
|
export { default as IconButton } from './IconButton/IconButton.svelte';
|
|
23
24
|
export { default as Link } from './Link/Link.svelte';
|
|
24
25
|
export { default as Loader } from './Loader/Loader.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export { default as FormControl } from './FormControl/FormControl.svelte';
|
|
|
19
19
|
export { default as InputGroup } from './FormControl/InputGroup.svelte';
|
|
20
20
|
export { default as Label } from './FormControl/Label.svelte';
|
|
21
21
|
export { default as Validation } from './FormControl/Validation.svelte';
|
|
22
|
+
export { default as HyvorBar } from './HyvorBar/HyvorBar.svelte';
|
|
22
23
|
export { default as IconButton } from './IconButton/IconButton.svelte';
|
|
23
24
|
export { default as Link } from './Link/Link.svelte';
|
|
24
25
|
export { default as Loader } from './Loader/Loader.svelte';
|
package/dist/index.css
CHANGED
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
|
|
2
1
|
/* font */
|
|
3
2
|
:root {
|
|
4
|
-
|
|
3
|
+
font-family: 'Readex Pro', Avenir, Inter, Helvetica, Arial, sans-serif;
|
|
5
4
|
font-size: 16px;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
text-rendering: optimizeLegibility;
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9
|
+
-webkit-text-size-adjust: 100%;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
body {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
background-color: var(--background, var(--accent-lightest));
|
|
14
|
+
color: var(--text);
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
button,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
button,
|
|
20
|
+
a {
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
border: none;
|
|
23
|
+
color: inherit;
|
|
24
|
+
appearance: none;
|
|
25
|
+
padding: 0;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-family: inherit;
|
|
29
|
+
font-size: inherit;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:focus-visible {
|
|
33
|
-
|
|
33
|
+
outline: 2px solid var(--accent-light);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
36
|
* {
|
|
38
|
-
|
|
37
|
+
box-sizing: border-box;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
|
|
42
40
|
.hds-box {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
box-shadow: var(--box-shadow);
|
|
42
|
+
border-radius: var(--box-radius);
|
|
43
|
+
background-color: var(--box-background);
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
.hds-container {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
47
|
+
width: 1000px;
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
padding: 0 15px;
|
|
50
|
+
margin: auto;
|
|
51
|
+
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
</script>
|
|
3
3
|
|
|
4
4
|
<svelte:element this={as} class="container">
|
|
5
|
-
|
|
5
|
+
<slot />
|
|
6
6
|
</svelte:element>
|
|
7
7
|
|
|
8
8
|
<style>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</style>
|
|
9
|
+
.container {
|
|
10
|
+
width: 1000px;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
padding: 0 15px;
|
|
13
|
+
margin: auto;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
@@ -29,11 +29,11 @@ onMount(() => {
|
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
31
|
<div class="content-wrap">
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
<Box>
|
|
33
|
+
<content>
|
|
34
|
+
<slot />
|
|
35
|
+
</content>
|
|
36
|
+
</Box>
|
|
37
37
|
</div>
|
|
38
38
|
|
|
39
39
|
<style>.content-wrap {
|
|
@@ -48,7 +48,8 @@ content {
|
|
|
48
48
|
padding: 30px 50px;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
content :global(p),
|
|
51
|
+
content :global(p),
|
|
52
|
+
content :global(li) {
|
|
52
53
|
line-height: var(--line-height-content);
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -161,4 +162,4 @@ content :global(h6 a:not(.heading-anchor-link)) {
|
|
|
161
162
|
content {
|
|
162
163
|
padding: 20px 25px;
|
|
163
164
|
}
|
|
164
|
-
}</style>
|
|
165
|
+
}</style>
|
|
@@ -8,72 +8,62 @@ let open = false;
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<div class="wrap">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{src}
|
|
14
|
-
{alt}
|
|
15
|
-
{...$$restProps}
|
|
16
|
-
{width}
|
|
17
|
-
on:click={() => open = true}
|
|
18
|
-
class="preview"
|
|
19
|
-
/>
|
|
11
|
+
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
12
|
+
<img {src} {alt} {...$$restProps} {width} on:click={() => (open = true)} class="preview" />
|
|
20
13
|
</div>
|
|
21
14
|
|
|
22
15
|
{#if open}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/>
|
|
35
|
-
</div>
|
|
16
|
+
<div class="modal">
|
|
17
|
+
<img
|
|
18
|
+
{src}
|
|
19
|
+
{alt}
|
|
20
|
+
{...modalImageProps}
|
|
21
|
+
use:clickOutside={{
|
|
22
|
+
callback: () => (open = false)
|
|
23
|
+
}}
|
|
24
|
+
transition:scale={{ duration: 100, opacity: 0.5, start: 0.95 }}
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
36
27
|
{/if}
|
|
37
28
|
|
|
38
29
|
<style>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
img.preview {
|
|
31
|
+
display: block;
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
max-height: 100%;
|
|
34
|
+
margin: 0 auto;
|
|
35
|
+
border-radius: 5px;
|
|
36
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
transition: 0.1s box-shadow;
|
|
39
|
+
}
|
|
40
|
+
img.preview:hover {
|
|
41
|
+
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
|
|
42
|
+
}
|
|
52
43
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</style>
|
|
44
|
+
.modal {
|
|
45
|
+
position: fixed;
|
|
46
|
+
z-index: 1000000;
|
|
47
|
+
left: 0;
|
|
48
|
+
top: 0;
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
padding: 40px;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
}
|
|
58
|
+
.modal-content {
|
|
59
|
+
min-height: 0;
|
|
60
|
+
}
|
|
61
|
+
.modal img {
|
|
62
|
+
max-width: 100%;
|
|
63
|
+
max-height: 100%;
|
|
64
|
+
border-radius: 5px;
|
|
65
|
+
}
|
|
66
|
+
.wrap {
|
|
67
|
+
padding: 25px 0;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import Sidebar from
|
|
2
|
+
import Sidebar from './Sidebar/Sidebar.svelte';
|
|
3
3
|
</script>
|
|
4
|
-
<div class="docs">
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
<div class="docs">
|
|
6
|
+
<slot name="nav" />
|
|
7
|
+
<slot name="content" />
|
|
8
|
+
<Sidebar />
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<style>
|
|
12
|
+
.docs {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
margin: auto;
|
|
16
|
+
width: 1150px;
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
padding-bottom: 40px;
|
|
19
|
+
/* min-height: calc(100vh - var(--header-height)); */
|
|
20
|
+
}
|
|
12
21
|
|
|
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>
|
|
22
|
+
@media (max-width: 992px) {
|
|
23
|
+
.docs {
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</style>
|