@hyvor/design 0.0.67 → 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.
Files changed (123) hide show
  1. package/dist/components/ActionList/ActionList.svelte +2 -7
  2. package/dist/components/ActionList/ActionListGroup.svelte +24 -29
  3. package/dist/components/ActionList/ActionListItem.svelte +86 -88
  4. package/dist/components/ActionList/Selected.svelte +17 -20
  5. package/dist/components/Avatar/Avatar.svelte +7 -11
  6. package/dist/components/Avatar/AvatarStack.svelte +16 -20
  7. package/dist/components/Base/Base.svelte +3 -3
  8. package/dist/components/Box/Box.svelte +8 -8
  9. package/dist/components/Button/Button.svelte +33 -42
  10. package/dist/components/Button/ButtonGroup.svelte +6 -6
  11. package/dist/components/Callout/Callout.svelte +88 -86
  12. package/dist/components/Callout/Callout.svelte.d.ts +1 -0
  13. package/dist/components/Checkbox/Checkbox.svelte +113 -121
  14. package/dist/components/CodeBlock/CodeBlock.svelte +26 -23
  15. package/dist/components/CodeBlock/getCode.js +6 -6
  16. package/dist/components/CodeBlock/hljs.scss +189 -191
  17. package/dist/components/CodeBlock/prism.scss +370 -7
  18. package/dist/components/ColorPicker/ColorPicker.svelte +42 -42
  19. package/dist/components/Dark/DarkProvider.svelte +9 -9
  20. package/dist/components/Dark/DarkToggle.svelte +7 -10
  21. package/dist/components/Divider/Divider.svelte +6 -7
  22. package/dist/components/Dropdown/Dropdown.svelte +33 -108
  23. package/dist/components/Dropdown/DropdownContent.svelte +120 -0
  24. package/dist/components/Dropdown/DropdownContent.svelte.d.ts +24 -0
  25. package/dist/components/FormControl/Caption.svelte +9 -9
  26. package/dist/components/FormControl/FormControl.svelte +18 -18
  27. package/dist/components/FormControl/InputGroup.svelte +7 -8
  28. package/dist/components/FormControl/Label.svelte +5 -5
  29. package/dist/components/FormControl/Validation.svelte +18 -16
  30. package/dist/components/FormControl/Validation.svelte.d.ts +1 -1
  31. package/dist/components/HyvorBar/BarProducts.svelte +52 -0
  32. package/dist/components/HyvorBar/BarProducts.svelte.d.ts +39 -0
  33. package/dist/components/HyvorBar/BarSupport.svelte +119 -0
  34. package/dist/components/HyvorBar/BarSupport.svelte.d.ts +19 -0
  35. package/dist/components/HyvorBar/BarUpdates.svelte +58 -0
  36. package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +18 -0
  37. package/dist/components/HyvorBar/BarUpdatesList.svelte +134 -0
  38. package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +18 -0
  39. package/dist/components/HyvorBar/BarUser.svelte +60 -0
  40. package/dist/components/HyvorBar/BarUser.svelte.d.ts +16 -0
  41. package/dist/components/HyvorBar/BarUserPreview.svelte +42 -0
  42. package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +14 -0
  43. package/dist/components/HyvorBar/HyvorBar.svelte +150 -0
  44. package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +19 -0
  45. package/dist/components/HyvorBar/bar.d.ts +33 -0
  46. package/dist/components/HyvorBar/bar.js +74 -0
  47. package/dist/components/HyvorBar/img/G2.svelte +9 -0
  48. package/dist/components/HyvorBar/img/G2.svelte.d.ts +23 -0
  49. package/dist/components/HyvorBar/img/Trustpilot.svelte +11 -0
  50. package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +23 -0
  51. package/dist/components/IconButton/IconButton.svelte +19 -23
  52. package/dist/components/IconMessage/IconMessage.svelte +89 -38
  53. package/dist/components/IconMessage/IconMessage.svelte.d.ts +9 -1
  54. package/dist/components/Internationalization/InternationalizationProvider.svelte +2 -2
  55. package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +1 -1
  56. package/dist/components/Internationalization/LanguageToggle.svelte +33 -36
  57. package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +2 -2
  58. package/dist/components/Internationalization/T.svelte.d.ts +3 -3
  59. package/dist/components/Internationalization/i18n.d.ts +4 -4
  60. package/dist/components/Internationalization/i18n.js +13 -11
  61. package/dist/components/Internationalization/t.d.ts +3 -3
  62. package/dist/components/Internationalization/t.js +4 -4
  63. package/dist/components/Internationalization/types.d.ts +1 -1
  64. package/dist/components/Link/Link.svelte +53 -58
  65. package/dist/components/Loader/LoadButton.svelte +15 -29
  66. package/dist/components/Loader/Loader.svelte +56 -69
  67. package/dist/components/Modal/ConfirmModalProvider.svelte +18 -36
  68. package/dist/components/Modal/Modal.svelte +134 -164
  69. package/dist/components/Modal/ModalFooter.svelte +23 -26
  70. package/dist/components/Modal/confirm.d.ts +1 -1
  71. package/dist/components/Modal/confirm.js +4 -4
  72. package/dist/components/Modal/modal-types.d.ts +2 -2
  73. package/dist/components/NavLink/NavLink.svelte +78 -86
  74. package/dist/components/Radio/Radio.svelte +23 -31
  75. package/dist/components/Slider/Slider.svelte +71 -79
  76. package/dist/components/SplitControl/SplitControl.svelte +28 -42
  77. package/dist/components/Switch/Switch.svelte +60 -65
  78. package/dist/components/TabNav/TabNav.svelte +6 -10
  79. package/dist/components/TabNav/TabNavItem.svelte +36 -43
  80. package/dist/components/Table/Table.svelte +7 -4
  81. package/dist/components/Table/TableRow.svelte +23 -23
  82. package/dist/components/Tag/Tag.svelte +28 -36
  83. package/dist/components/Text/Text.svelte +15 -22
  84. package/dist/components/TextInput/TextInput.svelte +26 -26
  85. package/dist/components/Textarea/Textarea.svelte +38 -38
  86. package/dist/components/Toast/ToastIcon.svelte +29 -31
  87. package/dist/components/Toast/ToastMessage.svelte +33 -39
  88. package/dist/components/Toast/ToastProvider.svelte +16 -16
  89. package/dist/components/Toast/cleaner.js +5 -5
  90. package/dist/components/Toast/toast.d.ts +2 -2
  91. package/dist/components/Toast/toast.js +10 -10
  92. package/dist/components/Tooltip/Tooltip.svelte +82 -83
  93. package/dist/components/directives/clickOutside.js +4 -4
  94. package/dist/components/directives/debounce.d.ts +1 -0
  95. package/dist/components/directives/debounce.js +8 -0
  96. package/dist/components/index.d.ts +1 -0
  97. package/dist/components/index.js +1 -0
  98. package/dist/index.css +31 -33
  99. package/dist/marketing/Container/Container.svelte +8 -8
  100. package/dist/marketing/Docs/Content/Content.svelte +8 -7
  101. package/dist/marketing/Docs/Content/DocsImage.svelte +52 -62
  102. package/dist/marketing/Docs/Docs.svelte +21 -24
  103. package/dist/marketing/Docs/Nav/Nav.svelte +21 -22
  104. package/dist/marketing/Docs/Nav/NavCategory.svelte +28 -28
  105. package/dist/marketing/Docs/Nav/NavItem.svelte +21 -24
  106. package/dist/marketing/Docs/Sidebar/Sidebar.svelte +22 -25
  107. package/dist/marketing/Docs/Toc.svelte +17 -19
  108. package/dist/marketing/Document/Document.svelte +5 -5
  109. package/dist/marketing/Document/DocumentTitle.svelte +49 -49
  110. package/dist/marketing/Footer/Footer.svelte +111 -119
  111. package/dist/marketing/Footer/FooterLinkList.svelte +24 -26
  112. package/dist/marketing/Header/Header.svelte +7 -15
  113. package/dist/marketing/Logo/LogoBlogs.svelte +41 -0
  114. package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +16 -0
  115. package/dist/marketing/Logo/LogoCore.svelte +41 -0
  116. package/dist/marketing/Logo/LogoCore.svelte.d.ts +16 -0
  117. package/dist/marketing/Logo/LogoFortguard.svelte +49 -0
  118. package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +16 -0
  119. package/dist/marketing/Logo/LogoTalk.svelte +27 -0
  120. package/dist/marketing/Logo/LogoTalk.svelte.d.ts +16 -0
  121. package/dist/stores/dark.js +8 -8
  122. package/dist/variables.scss +41 -48
  123. package/package.json +59 -58
@@ -1,46 +1,42 @@
1
- <script>import { clickOutside } from "../directives/clickOutside.js";
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
- class="dropdown"
13
- class:relative
14
- >
15
-
16
- <span
17
- class="trigger"
18
- on:click={() => show = !show}
19
- role="listbox"
20
- tabindex="0"
21
- on:keyup={e => {
22
- if (e.key === 'Escape') {
23
- show = false;
24
- }
25
- }}
26
- >
27
- <slot name="trigger" />
28
- </span>
29
-
30
- {#if show}
31
- <div
32
- class="content-wrap {align} {position}"
33
- use:clickOutside={{
34
- enabled: closeOnOutsideClick,
35
- callback: () => show = false
36
- }}
37
- >
38
- <Box class="content" style="width:{width}px">
39
- <slot name="content" />
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: absolute;
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
- <slot />
5
+ <slot />
6
6
  </div>
7
7
 
8
8
  <style>
9
- .caption {
10
- font-size: 14px;
11
- color: var(--text-light);
12
- }
13
- .caption.bold {
14
- font-weight: 600;
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
- <slot />
2
+ <slot />
3
3
  </div>
4
4
 
5
5
  <style>
6
- .form-control {
7
- display: flex;
8
- flex-direction: column;
9
- }
6
+ .form-control {
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
10
 
11
- .form-control :global(.caption) {
12
- margin-bottom: 8px;
13
- }
11
+ .form-control :global(.caption) {
12
+ margin-bottom: 8px;
13
+ }
14
14
 
15
- .form-control > :global(label) {
16
- margin-bottom: 8px;
17
- font-weight: 600;
18
- }
15
+ .form-control > :global(label) {
16
+ margin-bottom: 8px;
17
+ font-weight: 600;
18
+ }
19
19
 
20
- .form-control :global(label + .caption) {
21
- margin-top: -8px;
22
- }
20
+ .form-control :global(label + .caption) {
21
+ margin-top: -8px;
22
+ }
23
23
 
24
- .form-control :global(.validation) {
25
- margin-top: 8px;
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
- <div class="checkbox-group" style:gap={gap + "px"} {...$$restProps}>
12
- <slot />
10
+ <div class="checkbox-group" style:gap={gap + 'px'} {...$$restProps}>
11
+ <slot />
13
12
  </div>
14
13
 
15
14
  <style>
16
- .checkbox-group {
17
- display: flex;
18
- flex-direction: column;
19
- }
20
- </style>
15
+ .checkbox-group {
16
+ display: flex;
17
+ flex-direction: column;
18
+ }
19
+ </style>
@@ -1,9 +1,9 @@
1
1
  <label {...$$restProps}>
2
- <slot />
2
+ <slot />
3
3
  </label>
4
4
 
5
5
  <style>
6
- label {
7
- font-weight: 600;
8
- }
9
- </style>
6
+ label {
7
+ font-weight: 600;
8
+ }
9
+ </style>
@@ -1,23 +1,25 @@
1
- <script>import { IconCheckCircleFill, IconExclamationTriangleFill, IconInfoCircleFill } from "@hyvor/icons";
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
- <div class="icon">
8
-
9
- {#if state === 'error'}
10
- <IconExclamationTriangleFill style="color:var(--red)" />
11
- {:else if state === 'warning'}
12
- <IconInfoCircleFill style="color:var(--orange)" />
13
- {:else}
14
- <IconCheckCircleFill style="color:var(--green)" />
15
- {/if}
16
-
17
- </div>
18
- <div class="message">
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>
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { AriaRole } from "svelte/elements";
2
+ import type { AriaRole } from 'svelte/elements';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
@@ -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>