@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,46 +1,42 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import Box from "./../Box/Box.svelte";
|
|
1
|
+
<script>import DropdownContent from "./DropdownContent.svelte";
|
|
3
2
|
export let show = false;
|
|
4
3
|
export let width = 225;
|
|
5
4
|
export let relative = false;
|
|
6
5
|
export let closeOnOutsideClick = true;
|
|
7
6
|
export let align = "start";
|
|
8
7
|
export let position = "bottom";
|
|
8
|
+
let trigger;
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
|
-
<span
|
|
12
|
-
|
|
13
|
-
class
|
|
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
|
-
</Box>
|
|
41
|
-
</div>
|
|
42
|
-
{/if}
|
|
43
|
-
|
|
11
|
+
<span class="dropdown" class:relative>
|
|
12
|
+
<span
|
|
13
|
+
class="trigger"
|
|
14
|
+
on:click={() => (show = !show)}
|
|
15
|
+
role="listbox"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
on:keyup={(e) => {
|
|
18
|
+
if (e.key === 'Escape') {
|
|
19
|
+
show = false;
|
|
20
|
+
}
|
|
21
|
+
}}
|
|
22
|
+
bind:this={trigger}
|
|
23
|
+
>
|
|
24
|
+
<slot name="trigger" />
|
|
25
|
+
</span>
|
|
26
|
+
|
|
27
|
+
{#if show}
|
|
28
|
+
<DropdownContent
|
|
29
|
+
bind:show
|
|
30
|
+
{width}
|
|
31
|
+
{closeOnOutsideClick}
|
|
32
|
+
{align}
|
|
33
|
+
{position}
|
|
34
|
+
{relative}
|
|
35
|
+
{trigger}
|
|
36
|
+
>
|
|
37
|
+
<slot name="content" />
|
|
38
|
+
</DropdownContent>
|
|
39
|
+
{/if}
|
|
44
40
|
</span>
|
|
45
41
|
|
|
46
42
|
<style>.dropdown {
|
|
@@ -48,77 +44,6 @@ class:relative
|
|
|
48
44
|
display: inline-block;
|
|
49
45
|
}
|
|
50
46
|
|
|
51
|
-
.dropdown .content-wrap {
|
|
52
|
-
position:
|
|
53
|
-
left: 0;
|
|
54
|
-
z-index: 1;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.content-wrap.bottom {
|
|
58
|
-
top: 100%;
|
|
59
|
-
margin-top: 5px;
|
|
60
|
-
}
|
|
61
|
-
.content-wrap.bottom.end {
|
|
62
|
-
left: auto;
|
|
63
|
-
right: 0;
|
|
64
|
-
}
|
|
65
|
-
.content-wrap.bottom.center {
|
|
66
|
-
left: 50%;
|
|
67
|
-
transform: translateX(-50%);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.content-wrap.top {
|
|
71
|
-
bottom: 100%;
|
|
72
|
-
margin-bottom: 5px;
|
|
73
|
-
}
|
|
74
|
-
.content-wrap.top.end {
|
|
75
|
-
left: auto;
|
|
76
|
-
right: 0;
|
|
77
|
-
}
|
|
78
|
-
.content-wrap.top.center {
|
|
79
|
-
left: 50%;
|
|
80
|
-
transform: translateX(-50%);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.content-wrap.left {
|
|
84
|
-
right: 100%;
|
|
85
|
-
left: auto;
|
|
86
|
-
margin-right: 5px;
|
|
87
|
-
top: 0;
|
|
88
|
-
bottom: auto;
|
|
89
|
-
}
|
|
90
|
-
.content-wrap.left.end {
|
|
91
|
-
top: auto;
|
|
92
|
-
bottom: 0;
|
|
93
|
-
}
|
|
94
|
-
.content-wrap.left.center {
|
|
95
|
-
top: 50%;
|
|
96
|
-
transform: translateY(-50%);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.content-wrap.right {
|
|
100
|
-
left: 100%;
|
|
101
|
-
margin-left: 5px;
|
|
102
|
-
top: 0;
|
|
103
|
-
bottom: auto;
|
|
104
|
-
}
|
|
105
|
-
.content-wrap.right.end {
|
|
106
|
-
bottom: 0;
|
|
107
|
-
top: auto;
|
|
108
|
-
}
|
|
109
|
-
.content-wrap.right.center {
|
|
110
|
-
top: 50%;
|
|
111
|
-
transform: translateY(-50%);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.content-wrap > :global(.content) {
|
|
115
|
-
padding: 10px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.dropdown.relative > .content-wrap {
|
|
119
|
-
position: relative;
|
|
47
|
+
.dropdown.relative > :global(.content-wrap) {
|
|
48
|
+
position: relative !important;
|
|
120
49
|
}</style>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<script>import { onMount } from "svelte";
|
|
2
|
+
import { clickOutside } from "../directives/clickOutside.js";
|
|
3
|
+
import debounce from "../directives/debounce.js";
|
|
4
|
+
import { slide } from "svelte/transition";
|
|
5
|
+
import { cubicIn } from "svelte/easing";
|
|
6
|
+
export let show;
|
|
7
|
+
export let width;
|
|
8
|
+
export let relative;
|
|
9
|
+
export let closeOnOutsideClick = true;
|
|
10
|
+
export let align;
|
|
11
|
+
export let position;
|
|
12
|
+
export let trigger;
|
|
13
|
+
let contentWrap;
|
|
14
|
+
function positionWrap() {
|
|
15
|
+
if (!trigger)
|
|
16
|
+
return;
|
|
17
|
+
if (!contentWrap)
|
|
18
|
+
return;
|
|
19
|
+
if (relative)
|
|
20
|
+
return;
|
|
21
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
22
|
+
const contentRect = contentWrap.getBoundingClientRect();
|
|
23
|
+
const documentWidth = document.documentElement.clientWidth;
|
|
24
|
+
const GAP = 5;
|
|
25
|
+
const SPACE_AROUND = 15;
|
|
26
|
+
if (position === "bottom") {
|
|
27
|
+
contentWrap.style.top = triggerRect.bottom + GAP + "px";
|
|
28
|
+
if (contentRect.height + triggerRect.bottom > window.innerHeight) {
|
|
29
|
+
contentWrap.style.bottom = SPACE_AROUND + "px";
|
|
30
|
+
} else {
|
|
31
|
+
contentWrap.style.bottom = "auto";
|
|
32
|
+
}
|
|
33
|
+
} else if (position === "top") {
|
|
34
|
+
contentWrap.style.top = triggerRect.top - contentRect.height - GAP + "px";
|
|
35
|
+
} else if (position === "left") {
|
|
36
|
+
contentWrap.style.left = triggerRect.left - width - GAP + "px";
|
|
37
|
+
} else if (position === "right") {
|
|
38
|
+
contentWrap.style.left = triggerRect.right + GAP + "px";
|
|
39
|
+
}
|
|
40
|
+
if (position === "bottom" || position === "top") {
|
|
41
|
+
if (align === "start") {
|
|
42
|
+
if (triggerRect.left + width < documentWidth) {
|
|
43
|
+
contentWrap.style.left = triggerRect.left + "px";
|
|
44
|
+
} else {
|
|
45
|
+
contentWrap.style.right = SPACE_AROUND + "px";
|
|
46
|
+
}
|
|
47
|
+
} else if (align === "center") {
|
|
48
|
+
contentWrap.style.left = Math.max(triggerRect.left + triggerRect.width / 2 - width / 2, SPACE_AROUND) + "px";
|
|
49
|
+
} else if (align === "end") {
|
|
50
|
+
contentWrap.style.left = Math.max(triggerRect.right - width, SPACE_AROUND) + "px";
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
if (align === "start") {
|
|
54
|
+
contentWrap.style.top = triggerRect.top + "px";
|
|
55
|
+
} else if (align === "center") {
|
|
56
|
+
contentWrap.style.top = triggerRect.top + triggerRect.height / 2 - contentRect.height / 2 + "px";
|
|
57
|
+
} else if (align === "end") {
|
|
58
|
+
contentWrap.style.top = triggerRect.bottom - contentRect.height + "px";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (width >= documentWidth - SPACE_AROUND * 2) {
|
|
62
|
+
contentWrap.style.width = documentWidth - SPACE_AROUND * 2 + "px";
|
|
63
|
+
} else {
|
|
64
|
+
contentWrap.style.width = width + "px";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
$:
|
|
68
|
+
if (position, align) {
|
|
69
|
+
positionWrap();
|
|
70
|
+
}
|
|
71
|
+
function debouncedPosition() {
|
|
72
|
+
debounce(positionWrap, 10)();
|
|
73
|
+
}
|
|
74
|
+
onMount(() => {
|
|
75
|
+
positionWrap();
|
|
76
|
+
const mutationObserver = new MutationObserver(positionWrap);
|
|
77
|
+
mutationObserver.observe(contentWrap, {
|
|
78
|
+
subtree: true,
|
|
79
|
+
childList: true
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
function slideIn(node) {
|
|
83
|
+
return {
|
|
84
|
+
duration: 100,
|
|
85
|
+
easing: cubicIn,
|
|
86
|
+
css: (t) => {
|
|
87
|
+
return `
|
|
88
|
+
opacity: ${0.2 + t * 0.8};
|
|
89
|
+
transform: translateY(-${(1 - t) * 5}px) scale(${0.95 + t * 0.05});
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<svelte:window on:resize={debouncedPosition} on:scroll={debouncedPosition} />
|
|
97
|
+
|
|
98
|
+
<div
|
|
99
|
+
class="content-wrap {align} {position}"
|
|
100
|
+
use:clickOutside={{
|
|
101
|
+
enabled: closeOnOutsideClick,
|
|
102
|
+
callback: () => (show = false)
|
|
103
|
+
}}
|
|
104
|
+
bind:this={contentWrap}
|
|
105
|
+
style="width: {width}px"
|
|
106
|
+
transition:slideIn
|
|
107
|
+
>
|
|
108
|
+
<div class="hds-box content">
|
|
109
|
+
<slot />
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<style>.content-wrap {
|
|
114
|
+
position: fixed;
|
|
115
|
+
z-index: 1000000;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.content-wrap > .content {
|
|
119
|
+
padding: 10px;
|
|
120
|
+
}</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
show: boolean;
|
|
5
|
+
width: number;
|
|
6
|
+
relative: boolean;
|
|
7
|
+
closeOnOutsideClick?: boolean | undefined;
|
|
8
|
+
align: 'start' | 'center' | 'end';
|
|
9
|
+
position: 'left' | 'right' | 'bottom' | 'top';
|
|
10
|
+
trigger: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {
|
|
16
|
+
default: {};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type DropdownContentProps = typeof __propDef.props;
|
|
20
|
+
export type DropdownContentEvents = typeof __propDef.events;
|
|
21
|
+
export type DropdownContentSlots = typeof __propDef.slots;
|
|
22
|
+
export default class DropdownContent extends SvelteComponent<DropdownContentProps, DropdownContentEvents, DropdownContentSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
</script>
|
|
3
3
|
|
|
4
4
|
<div class="caption" class:bold {...$$restProps}>
|
|
5
|
-
|
|
5
|
+
<slot />
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<style>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</style>
|
|
9
|
+
.caption {
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
color: var(--text-light);
|
|
12
|
+
}
|
|
13
|
+
.caption.bold {
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
<div class="form-control" {...$$restProps}>
|
|
2
|
-
|
|
2
|
+
<slot />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<style>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
.form-control {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
.form-control :global(.caption) {
|
|
12
|
+
margin-bottom: 8px;
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
.form-control > :global(label) {
|
|
16
|
+
margin-bottom: 8px;
|
|
17
|
+
font-weight: 600;
|
|
18
|
+
}
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
.form-control :global(label + .caption) {
|
|
21
|
+
margin-top: -8px;
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
.form-control :global(.validation) {
|
|
25
|
+
margin-top: 8px;
|
|
26
|
+
}
|
|
27
27
|
</style>
|
|
@@ -7,14 +7,13 @@ const gaps = {
|
|
|
7
7
|
gap = typeof gap === "number" ? gap : gaps[gap];
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
<slot />
|
|
10
|
+
<div class="checkbox-group" style:gap={gap + 'px'} {...$$restProps}>
|
|
11
|
+
<slot />
|
|
13
12
|
</div>
|
|
14
13
|
|
|
15
14
|
<style>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</style>
|
|
15
|
+
.checkbox-group {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import {
|
|
2
|
+
IconCheckCircleFill,
|
|
3
|
+
IconExclamationTriangleFill,
|
|
4
|
+
IconInfoCircleFill
|
|
5
|
+
} from "@hyvor/icons";
|
|
2
6
|
export let state = "error";
|
|
3
7
|
export let role = "alert";
|
|
4
8
|
</script>
|
|
5
9
|
|
|
6
10
|
<div class="validation {state}" {role} {...$$restProps}>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<slot />
|
|
20
|
-
</div>
|
|
11
|
+
<div class="icon">
|
|
12
|
+
{#if state === 'error'}
|
|
13
|
+
<IconExclamationTriangleFill style="color:var(--red)" />
|
|
14
|
+
{:else if state === 'warning'}
|
|
15
|
+
<IconInfoCircleFill style="color:var(--orange)" />
|
|
16
|
+
{:else}
|
|
17
|
+
<IconCheckCircleFill style="color:var(--green)" />
|
|
18
|
+
{/if}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="message">
|
|
21
|
+
<slot />
|
|
22
|
+
</div>
|
|
21
23
|
</div>
|
|
22
24
|
|
|
23
25
|
<style>.validation {
|
|
@@ -50,4 +52,4 @@ export let role = "alert";
|
|
|
50
52
|
}
|
|
51
53
|
:global(:root.dark) .validation.success {
|
|
52
54
|
color: var(--green);
|
|
53
|
-
}</style>
|
|
55
|
+
}</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
const PRODUCTS = {
|
|
3
|
+
talk: {
|
|
4
|
+
name: 'Hyvor Talk',
|
|
5
|
+
logo: LogoTalk,
|
|
6
|
+
url: 'talk.hyvor.com',
|
|
7
|
+
description: 'Comments, Newsletters, Memberships'
|
|
8
|
+
},
|
|
9
|
+
blogs: {
|
|
10
|
+
name: 'Hyvor Blogs',
|
|
11
|
+
logo: LogoBlogs,
|
|
12
|
+
url: 'blogs.hyvor.com',
|
|
13
|
+
description: 'Blogging Platform'
|
|
14
|
+
},
|
|
15
|
+
fortguard: {
|
|
16
|
+
name: 'FortGuard',
|
|
17
|
+
logo: LogoFortguard,
|
|
18
|
+
url: 'fortguard.io',
|
|
19
|
+
description: 'Spam Detection API'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export { PRODUCTS };
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<script>import LogoBlogs from "../../marketing/Logo/LogoBlogs.svelte";
|
|
26
|
+
import LogoFortguard from "../../marketing/Logo/LogoFortguard.svelte";
|
|
27
|
+
import LogoTalk from "../../marketing/Logo/LogoTalk.svelte";
|
|
28
|
+
import { ActionList, ActionListItem, Button, Dropdown } from "../index.js";
|
|
29
|
+
import { IconCaretDownFill, IconBoxArrowUpRight } from "@hyvor/icons";
|
|
30
|
+
export let mobile = false;
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<Dropdown align={mobile ? 'center' : 'end'} width={325}>
|
|
34
|
+
<Button slot="trigger" variant="invisible" color="input" size="small">
|
|
35
|
+
Products
|
|
36
|
+
<IconCaretDownFill size={10} slot="end" />
|
|
37
|
+
</Button>
|
|
38
|
+
<ActionList slot="content">
|
|
39
|
+
{#each Object.entries(PRODUCTS) as [key, product]}
|
|
40
|
+
<a href={`https://${product.url}`} target="_blank">
|
|
41
|
+
<ActionListItem>
|
|
42
|
+
{product.name}
|
|
43
|
+
<div slot="description">
|
|
44
|
+
{product.description}
|
|
45
|
+
</div>
|
|
46
|
+
<svelte:component this={product.logo} size={20} slot="start" />
|
|
47
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
48
|
+
</ActionListItem>
|
|
49
|
+
</a>
|
|
50
|
+
{/each}
|
|
51
|
+
</ActionList>
|
|
52
|
+
</Dropdown>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const PRODUCTS: {
|
|
3
|
+
talk: {
|
|
4
|
+
name: string;
|
|
5
|
+
logo: typeof LogoTalk;
|
|
6
|
+
url: string;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
blogs: {
|
|
10
|
+
name: string;
|
|
11
|
+
logo: typeof LogoBlogs;
|
|
12
|
+
url: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
fortguard: {
|
|
16
|
+
name: string;
|
|
17
|
+
logo: typeof LogoFortguard;
|
|
18
|
+
url: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export { PRODUCTS };
|
|
23
|
+
import LogoBlogs from '../../marketing/Logo/LogoBlogs.svelte';
|
|
24
|
+
import LogoFortguard from '../../marketing/Logo/LogoFortguard.svelte';
|
|
25
|
+
import LogoTalk from '../../marketing/Logo/LogoTalk.svelte';
|
|
26
|
+
declare const __propDef: {
|
|
27
|
+
props: {
|
|
28
|
+
mobile?: boolean | undefined;
|
|
29
|
+
};
|
|
30
|
+
events: {
|
|
31
|
+
[evt: string]: CustomEvent<any>;
|
|
32
|
+
};
|
|
33
|
+
slots: {};
|
|
34
|
+
};
|
|
35
|
+
export type BarProductsProps = typeof __propDef.props;
|
|
36
|
+
export type BarProductsEvents = typeof __propDef.events;
|
|
37
|
+
export type BarProductsSlots = typeof __propDef.slots;
|
|
38
|
+
export default class BarProducts extends SvelteComponent<BarProductsProps, BarProductsEvents, BarProductsSlots> {
|
|
39
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script>import { ActionList, ActionListItem, Button, Dropdown } from "../index.js";
|
|
2
|
+
import {
|
|
3
|
+
IconCaretDownFill,
|
|
4
|
+
IconBoxArrowUpRight,
|
|
5
|
+
IconChat,
|
|
6
|
+
IconDiscord,
|
|
7
|
+
IconInfoCircle,
|
|
8
|
+
IconFileEarmark,
|
|
9
|
+
IconChatDots,
|
|
10
|
+
IconTwitterX,
|
|
11
|
+
IconLinkedin
|
|
12
|
+
} from "@hyvor/icons";
|
|
13
|
+
import ActionListGroup from "../ActionList/ActionListGroup.svelte";
|
|
14
|
+
import { PRODUCTS } from "./BarProducts.svelte";
|
|
15
|
+
import G2 from "./img/G2.svelte";
|
|
16
|
+
import Trustpilot from "./img/Trustpilot.svelte";
|
|
17
|
+
let supportDropdown = false;
|
|
18
|
+
export let mobile = false;
|
|
19
|
+
export let product;
|
|
20
|
+
export let config;
|
|
21
|
+
function openLiveChat(e) {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
if (window.$crisp) {
|
|
24
|
+
window.$crisp.push(["do", "chat:open"]);
|
|
25
|
+
}
|
|
26
|
+
supportDropdown = false;
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<Dropdown align={mobile ? 'center' : 'end'} width={325} bind:show={supportDropdown}>
|
|
31
|
+
<Button slot="trigger" variant="invisible" color="input" size="small">
|
|
32
|
+
Support
|
|
33
|
+
<IconCaretDownFill size={10} slot="end" />
|
|
34
|
+
</Button>
|
|
35
|
+
<ActionList slot="content">
|
|
36
|
+
<a href="https://hyvor.community" target="_blank">
|
|
37
|
+
<ActionListItem>
|
|
38
|
+
Community Forum
|
|
39
|
+
<div slot="description">hyvor.community</div>
|
|
40
|
+
<IconChat slot="start" />
|
|
41
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
42
|
+
</ActionListItem>
|
|
43
|
+
</a>
|
|
44
|
+
{#if config.docs}
|
|
45
|
+
<a href="/docs" target="_blank">
|
|
46
|
+
<ActionListItem>
|
|
47
|
+
Documentation
|
|
48
|
+
<div slot="description">
|
|
49
|
+
Learn how to use {PRODUCTS[product].name}
|
|
50
|
+
</div>
|
|
51
|
+
<IconFileEarmark slot="start" />
|
|
52
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
53
|
+
</ActionListItem>
|
|
54
|
+
</a>
|
|
55
|
+
{/if}
|
|
56
|
+
<a href="https://hyvor.com/support" target="_blank">
|
|
57
|
+
<ActionListItem>
|
|
58
|
+
Support Form
|
|
59
|
+
<div slot="description">Get help from our team</div>
|
|
60
|
+
<IconInfoCircle slot="start" />
|
|
61
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
62
|
+
</ActionListItem>
|
|
63
|
+
</a>
|
|
64
|
+
{#if config.chat}
|
|
65
|
+
<a href="/chat" on:click={openLiveChat}>
|
|
66
|
+
<ActionListItem>
|
|
67
|
+
Live Chat
|
|
68
|
+
<div slot="description">Chat with our team</div>
|
|
69
|
+
<IconChatDots slot="start" />
|
|
70
|
+
</ActionListItem>
|
|
71
|
+
</a>
|
|
72
|
+
{/if}
|
|
73
|
+
|
|
74
|
+
<ActionListGroup title="Social">
|
|
75
|
+
<a href="https://hyvor.com/api/go/discord" target="_blank">
|
|
76
|
+
<ActionListItem>
|
|
77
|
+
Discord
|
|
78
|
+
<IconDiscord slot="start" />
|
|
79
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
80
|
+
</ActionListItem>
|
|
81
|
+
</a>
|
|
82
|
+
{#if config.twitter}
|
|
83
|
+
<a href={config.twitter} target="_blank">
|
|
84
|
+
<ActionListItem>
|
|
85
|
+
Twitter
|
|
86
|
+
<IconTwitterX slot="start" />
|
|
87
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
88
|
+
</ActionListItem>
|
|
89
|
+
</a>
|
|
90
|
+
{/if}
|
|
91
|
+
<a href="https://www.linkedin.com/company/hyvor" target="_blank">
|
|
92
|
+
<ActionListItem>
|
|
93
|
+
Linkedin
|
|
94
|
+
<IconLinkedin slot="start" />
|
|
95
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
96
|
+
</ActionListItem>
|
|
97
|
+
</a>
|
|
98
|
+
</ActionListGroup>
|
|
99
|
+
|
|
100
|
+
<ActionListGroup title="Rate us">
|
|
101
|
+
<a href="https://www.trustpilot.com/review/hyvor.com" target="_blank">
|
|
102
|
+
<ActionListItem>
|
|
103
|
+
<Trustpilot slot="start" />
|
|
104
|
+
Trustpilot
|
|
105
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
106
|
+
</ActionListItem>
|
|
107
|
+
</a>
|
|
108
|
+
{#if config.g2}
|
|
109
|
+
<a href="https://www.g2.com/products/hyvor-talk/reviews" target="_blank">
|
|
110
|
+
<ActionListItem>
|
|
111
|
+
<G2 slot="start" />
|
|
112
|
+
G2
|
|
113
|
+
<IconBoxArrowUpRight slot="end" size={12} />
|
|
114
|
+
</ActionListItem>
|
|
115
|
+
</a>
|
|
116
|
+
{/if}
|
|
117
|
+
</ActionListGroup>
|
|
118
|
+
</ActionList>
|
|
119
|
+
</Dropdown>
|