@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.
Files changed (184) hide show
  1. package/dist/components/ActionList/ActionList.svelte +21 -13
  2. package/dist/components/ActionList/ActionList.svelte.d.ts +8 -20
  3. package/dist/components/ActionList/ActionListGroup.svelte +40 -35
  4. package/dist/components/ActionList/ActionListGroup.svelte.d.ts +8 -20
  5. package/dist/components/ActionList/ActionListItem.svelte +129 -107
  6. package/dist/components/ActionList/ActionListItem.svelte.d.ts +27 -25
  7. package/dist/components/ActionList/Selected.svelte +27 -24
  8. package/dist/components/ActionList/Selected.svelte.d.ts +6 -17
  9. package/dist/components/Avatar/Avatar.svelte +22 -19
  10. package/dist/components/Avatar/Avatar.svelte.d.ts +7 -18
  11. package/dist/components/Avatar/AvatarStack.svelte +29 -27
  12. package/dist/components/Avatar/AvatarStack.svelte.d.ts +6 -18
  13. package/dist/components/Base/Base.svelte +16 -8
  14. package/dist/components/Base/Base.svelte.d.ts +6 -18
  15. package/dist/components/Box/Box.svelte +16 -9
  16. package/dist/components/Box/Box.svelte.d.ts +7 -19
  17. package/dist/components/Button/Button.svelte +65 -47
  18. package/dist/components/Button/Button.svelte.d.ts +16 -39
  19. package/dist/components/Button/ButtonGroup.svelte +14 -6
  20. package/dist/components/Button/ButtonGroup.svelte.d.ts +5 -27
  21. package/dist/components/Callout/Callout.svelte +110 -87
  22. package/dist/components/Callout/Callout.svelte.d.ts +11 -22
  23. package/dist/components/Checkbox/Checkbox.svelte +156 -144
  24. package/dist/components/Checkbox/Checkbox.svelte.d.ts +11 -34
  25. package/dist/components/CodeBlock/CodeBlock.svelte +45 -32
  26. package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +6 -17
  27. package/dist/components/CodeBlock/getCode.js +8 -6
  28. package/dist/components/CodeBlock/hljs.scss +189 -191
  29. package/dist/components/CodeBlock/prism.scss +370 -7
  30. package/dist/components/ColorPicker/ColorPicker.svelte +75 -56
  31. package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +25 -19
  32. package/dist/components/Dark/DarkProvider.svelte +16 -14
  33. package/dist/components/Dark/DarkProvider.svelte.d.ts +16 -12
  34. package/dist/components/Dark/DarkToggle.svelte +15 -16
  35. package/dist/components/Dark/DarkToggle.svelte.d.ts +16 -12
  36. package/dist/components/Divider/Divider.svelte +23 -13
  37. package/dist/components/Divider/Divider.svelte.d.ts +9 -20
  38. package/dist/components/Dropdown/Dropdown.svelte +58 -114
  39. package/dist/components/Dropdown/Dropdown.svelte.d.ts +13 -24
  40. package/dist/components/Dropdown/DropdownContent.svelte +152 -0
  41. package/dist/components/Dropdown/DropdownContent.svelte.d.ts +12 -0
  42. package/dist/components/FormControl/Caption.svelte +18 -11
  43. package/dist/components/FormControl/Caption.svelte.d.ts +7 -19
  44. package/dist/components/FormControl/FormControl.svelte +28 -19
  45. package/dist/components/FormControl/FormControl.svelte.d.ts +6 -27
  46. package/dist/components/FormControl/InputGroup.svelte +22 -15
  47. package/dist/components/FormControl/InputGroup.svelte.d.ts +7 -19
  48. package/dist/components/FormControl/Label.svelte +15 -6
  49. package/dist/components/FormControl/Label.svelte.d.ts +6 -27
  50. package/dist/components/FormControl/Validation.svelte +30 -19
  51. package/dist/components/FormControl/Validation.svelte.d.ts +9 -21
  52. package/dist/components/HyvorBar/BarProducts.svelte +71 -0
  53. package/dist/components/HyvorBar/BarProducts.svelte.d.ts +32 -0
  54. package/dist/components/HyvorBar/BarSupport.svelte +183 -0
  55. package/dist/components/HyvorBar/BarSupport.svelte.d.ts +8 -0
  56. package/dist/components/HyvorBar/BarUpdates.svelte +68 -0
  57. package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +7 -0
  58. package/dist/components/HyvorBar/BarUpdatesList.svelte +159 -0
  59. package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +7 -0
  60. package/dist/components/HyvorBar/BarUser.svelte +72 -0
  61. package/dist/components/HyvorBar/BarUser.svelte.d.ts +5 -0
  62. package/dist/components/HyvorBar/BarUserPreview.svelte +43 -0
  63. package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +18 -0
  64. package/dist/components/HyvorBar/HyvorBar.svelte +183 -0
  65. package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +8 -0
  66. package/dist/components/HyvorBar/bar.d.ts +33 -0
  67. package/dist/components/HyvorBar/bar.js +74 -0
  68. package/dist/components/HyvorBar/img/G2.svelte +9 -0
  69. package/dist/components/HyvorBar/img/G2.svelte.d.ts +26 -0
  70. package/dist/components/HyvorBar/img/Trustpilot.svelte +11 -0
  71. package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +26 -0
  72. package/dist/components/IconButton/IconButton.svelte +49 -32
  73. package/dist/components/IconButton/IconButton.svelte.d.ts +10 -33
  74. package/dist/components/IconMessage/IconMessage.svelte +157 -51
  75. package/dist/components/IconMessage/IconMessage.svelte.d.ts +19 -27
  76. package/dist/components/Internationalization/InternationalizationProvider.svelte +15 -8
  77. package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +7 -19
  78. package/dist/components/Internationalization/LanguageToggle.svelte +80 -57
  79. package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +11 -22
  80. package/dist/components/Internationalization/T.svelte +158 -114
  81. package/dist/components/Internationalization/T.svelte.d.ts +17 -15
  82. package/dist/components/Internationalization/i18n.d.ts +3 -5
  83. package/dist/components/Internationalization/i18n.js +13 -11
  84. package/dist/components/Internationalization/t.d.ts +2 -3
  85. package/dist/components/Internationalization/t.js +4 -4
  86. package/dist/components/Internationalization/types.d.ts +2 -1
  87. package/dist/components/Link/Link.svelte +68 -61
  88. package/dist/components/Link/Link.svelte.d.ts +11 -34
  89. package/dist/components/Loader/LoadButton.svelte +39 -38
  90. package/dist/components/Loader/LoadButton.svelte.d.ts +29 -42
  91. package/dist/components/Loader/Loader.svelte +121 -107
  92. package/dist/components/Loader/Loader.svelte.d.ts +15 -27
  93. package/dist/components/Modal/ConfirmModalProvider.svelte +41 -51
  94. package/dist/components/Modal/ConfirmModalProvider.svelte.d.ts +3 -14
  95. package/dist/components/Modal/Modal.svelte +202 -203
  96. package/dist/components/Modal/Modal.svelte.d.ts +31 -29
  97. package/dist/components/Modal/ModalFooter.svelte +36 -31
  98. package/dist/components/Modal/ModalFooter.svelte.d.ts +22 -18
  99. package/dist/components/Modal/confirm.d.ts +2 -2
  100. package/dist/components/Modal/confirm.js +4 -4
  101. package/dist/components/Modal/modal-types.d.ts +4 -4
  102. package/dist/components/NavLink/NavLink.svelte +94 -89
  103. package/dist/components/NavLink/NavLink.svelte.d.ts +11 -33
  104. package/dist/components/Radio/Radio.svelte +46 -35
  105. package/dist/components/Radio/Radio.svelte.d.ts +10 -33
  106. package/dist/components/Slider/Slider.svelte +129 -120
  107. package/dist/components/Slider/Slider.svelte.d.ts +24 -20
  108. package/dist/components/SplitControl/SplitControl.svelte +43 -48
  109. package/dist/components/SplitControl/SplitControl.svelte.d.ts +11 -24
  110. package/dist/components/Switch/Switch.svelte +77 -67
  111. package/dist/components/Switch/Switch.svelte.d.ts +8 -31
  112. package/dist/components/TabNav/TabNav.svelte +33 -23
  113. package/dist/components/TabNav/TabNav.svelte.d.ts +7 -19
  114. package/dist/components/TabNav/TabNavItem.svelte +65 -51
  115. package/dist/components/TabNav/TabNavItem.svelte.d.ts +10 -24
  116. package/dist/components/Table/Table.svelte +17 -7
  117. package/dist/components/Table/Table.svelte.d.ts +7 -19
  118. package/dist/components/Table/TableRow.svelte +32 -24
  119. package/dist/components/Table/TableRow.svelte.d.ts +7 -19
  120. package/dist/components/Tag/Tag.svelte +75 -49
  121. package/dist/components/Tag/Tag.svelte.d.ts +16 -39
  122. package/dist/components/Text/Text.svelte +33 -26
  123. package/dist/components/Text/Text.svelte.d.ts +10 -22
  124. package/dist/components/TextInput/TextInput.svelte +54 -33
  125. package/dist/components/TextInput/TextInput.svelte.d.ts +12 -36
  126. package/dist/components/Textarea/Textarea.svelte +68 -46
  127. package/dist/components/Textarea/Textarea.svelte.d.ts +13 -37
  128. package/dist/components/Toast/ToastIcon.svelte +55 -46
  129. package/dist/components/Toast/ToastIcon.svelte.d.ts +5 -16
  130. package/dist/components/Toast/ToastMessage.svelte +42 -41
  131. package/dist/components/Toast/ToastMessage.svelte.d.ts +5 -16
  132. package/dist/components/Toast/ToastProvider.svelte +22 -20
  133. package/dist/components/Toast/ToastProvider.svelte.d.ts +16 -12
  134. package/dist/components/Toast/cleaner.js +5 -5
  135. package/dist/components/Toast/toast.d.ts +3 -3
  136. package/dist/components/Toast/toast.js +10 -10
  137. package/dist/components/Tooltip/Tooltip.svelte +163 -148
  138. package/dist/components/Tooltip/Tooltip.svelte.d.ts +35 -23
  139. package/dist/components/directives/clickOutside.js +4 -4
  140. package/dist/components/directives/debounce.d.ts +1 -0
  141. package/dist/components/directives/debounce.js +8 -0
  142. package/dist/components/index.d.ts +1 -0
  143. package/dist/components/index.js +1 -0
  144. package/dist/index.css +31 -33
  145. package/dist/marketing/Container/Container.svelte +15 -9
  146. package/dist/marketing/Container/Container.svelte.d.ts +6 -18
  147. package/dist/marketing/Docs/Content/Content.svelte +48 -35
  148. package/dist/marketing/Docs/Content/Content.svelte.d.ts +5 -16
  149. package/dist/marketing/Docs/Content/DocsImage.svelte +67 -69
  150. package/dist/marketing/Docs/Content/DocsImage.svelte.d.ts +9 -20
  151. package/dist/marketing/Docs/Docs.svelte +28 -25
  152. package/dist/marketing/Docs/Docs.svelte.d.ts +6 -29
  153. package/dist/marketing/Docs/Nav/Nav.svelte +96 -70
  154. package/dist/marketing/Docs/Nav/Nav.svelte.d.ts +5 -16
  155. package/dist/marketing/Docs/Nav/NavCategory.svelte +39 -29
  156. package/dist/marketing/Docs/Nav/NavCategory.svelte.d.ts +8 -20
  157. package/dist/marketing/Docs/Nav/NavItem.svelte +30 -26
  158. package/dist/marketing/Docs/Nav/NavItem.svelte.d.ts +6 -18
  159. package/dist/marketing/Docs/Sidebar/Sidebar.svelte +22 -25
  160. package/dist/marketing/Docs/Sidebar/Sidebar.svelte.d.ts +22 -19
  161. package/dist/marketing/Docs/Toc.svelte +64 -56
  162. package/dist/marketing/Docs/Toc.svelte.d.ts +3 -14
  163. package/dist/marketing/Document/Document.svelte +15 -8
  164. package/dist/marketing/Document/Document.svelte.d.ts +7 -19
  165. package/dist/marketing/Document/DocumentTitle.svelte +65 -54
  166. package/dist/marketing/Document/DocumentTitle.svelte.d.ts +9 -20
  167. package/dist/marketing/Footer/Footer.svelte +154 -145
  168. package/dist/marketing/Footer/Footer.svelte.d.ts +8 -20
  169. package/dist/marketing/Footer/FooterLinkList.svelte +31 -27
  170. package/dist/marketing/Footer/FooterLinkList.svelte.d.ts +6 -18
  171. package/dist/marketing/Header/Header.svelte +47 -37
  172. package/dist/marketing/Header/Header.svelte.d.ts +10 -22
  173. package/dist/marketing/Logo/LogoBlogs.svelte +46 -0
  174. package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +5 -0
  175. package/dist/marketing/Logo/LogoCore.svelte +46 -0
  176. package/dist/marketing/Logo/LogoCore.svelte.d.ts +5 -0
  177. package/dist/marketing/Logo/LogoFortguard.svelte +54 -0
  178. package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +5 -0
  179. package/dist/marketing/Logo/LogoTalk.svelte +32 -0
  180. package/dist/marketing/Logo/LogoTalk.svelte.d.ts +5 -0
  181. package/dist/stores/dark.d.ts +0 -1
  182. package/dist/stores/dark.js +8 -8
  183. package/dist/variables.scss +41 -48
  184. package/package.json +59 -58
@@ -1,20 +1,27 @@
1
- <script>export let gap = "medium";
2
- const gaps = {
3
- small: 4,
4
- medium: 8,
5
- large: 16
6
- };
7
- gap = typeof gap === "number" ? gap : gaps[gap];
8
- </script>
1
+ <script lang="ts">
2
+ interface Props {
3
+ gap?: number | 'small' | 'medium' | 'large';
4
+ children?: import('svelte').Snippet;
5
+ [key: string]: any;
6
+ }
7
+
8
+ let { gap = $bindable('medium'), children, ...rest }: Props = $props();
9
9
 
10
+ const gaps = {
11
+ small: 4,
12
+ medium: 8,
13
+ large: 16
14
+ };
15
+ gap = typeof gap === 'number' ? gap : gaps[gap];
16
+ </script>
10
17
 
11
- <div class="checkbox-group" style:gap={gap + "px"} {...$$restProps}>
12
- <slot />
18
+ <div class="checkbox-group" style:gap={gap + 'px'} {...rest}>
19
+ {@render children?.()}
13
20
  </div>
14
21
 
15
22
  <style>
16
- .checkbox-group {
17
- display: flex;
18
- flex-direction: column;
19
- }
20
- </style>
23
+ .checkbox-group {
24
+ display: flex;
25
+ flex-direction: column;
26
+ }
27
+ </style>
@@ -1,19 +1,7 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- [x: string]: any;
5
- gap?: number | "small" | "medium" | "large" | undefined;
6
- };
7
- events: {
8
- [evt: string]: CustomEvent<any>;
9
- };
10
- slots: {
11
- default: {};
12
- };
13
- };
14
- export type InputGroupProps = typeof __propDef.props;
15
- export type InputGroupEvents = typeof __propDef.events;
16
- export type InputGroupSlots = typeof __propDef.slots;
17
- export default class InputGroup extends SvelteComponent<InputGroupProps, InputGroupEvents, InputGroupSlots> {
18
- }
19
- export {};
1
+ declare const InputGroup: import("svelte").Component<{
2
+ [key: string]: any;
3
+ gap?: number | "small" | "medium" | "large";
4
+ children?: import("svelte").Snippet;
5
+ }, {}, "gap">;
6
+ type InputGroup = ReturnType<typeof InputGroup>;
7
+ export default InputGroup;
@@ -1,9 +1,18 @@
1
- <label {...$$restProps}>
2
- <slot />
1
+ <script lang="ts">
2
+ interface Props {
3
+ children?: import('svelte').Snippet;
4
+ [key: string]: any;
5
+ }
6
+
7
+ let { children, ...rest }: Props = $props();
8
+ </script>
9
+
10
+ <label {...rest}>
11
+ {@render children?.()}
3
12
  </label>
4
13
 
5
14
  <style>
6
- label {
7
- font-weight: 600;
8
- }
9
- </style>
15
+ label {
16
+ font-weight: 600;
17
+ }
18
+ </style>
@@ -1,27 +1,6 @@
1
- /** @typedef {typeof __propDef.props} LabelProps */
2
- /** @typedef {typeof __propDef.events} LabelEvents */
3
- /** @typedef {typeof __propDef.slots} LabelSlots */
4
- export default class Label extends SvelteComponent<{
5
- [x: string]: any;
6
- }, {
7
- [evt: string]: CustomEvent<any>;
8
- }, {
9
- default: {};
10
- }> {
11
- }
12
- export type LabelProps = typeof __propDef.props;
13
- export type LabelEvents = typeof __propDef.events;
14
- export type LabelSlots = typeof __propDef.slots;
15
- import { SvelteComponent } from "svelte";
16
- declare const __propDef: {
17
- props: {
18
- [x: string]: any;
19
- };
20
- events: {
21
- [evt: string]: CustomEvent<any>;
22
- };
23
- slots: {
24
- default: {};
25
- };
26
- };
27
- export {};
1
+ declare const Label: import("svelte").Component<{
2
+ [key: string]: any;
3
+ children?: import("svelte").Snippet;
4
+ }, {}, "">;
5
+ type Label = ReturnType<typeof Label>;
6
+ export default Label;
@@ -1,23 +1,34 @@
1
- <script>import { IconCheckCircleFill, IconExclamationTriangleFill, IconInfoCircleFill } from "@hyvor/icons";
2
- export let state = "error";
3
- export let role = "alert";
1
+ <script lang="ts">
2
+ import {
3
+ IconCheckCircleFill,
4
+ IconExclamationTriangleFill,
5
+ IconInfoCircleFill
6
+ } from '@hyvor/icons';
7
+ import type { AriaRole } from 'svelte/elements';
8
+
9
+ interface Props {
10
+ state?: 'error' | 'warning' | 'success';
11
+ role?: AriaRole | undefined;
12
+ children?: import('svelte').Snippet;
13
+ [key: string]: any;
14
+ }
15
+
16
+ let { state = 'error', role = 'alert', children, ...rest }: Props = $props();
4
17
  </script>
5
18
 
6
- <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>
19
+ <div class="validation {state}" {role} {...rest}>
20
+ <div class="icon">
21
+ {#if state === 'error'}
22
+ <IconExclamationTriangleFill style="color:var(--red)" />
23
+ {:else if state === 'warning'}
24
+ <IconInfoCircleFill style="color:var(--orange)" />
25
+ {:else}
26
+ <IconCheckCircleFill style="color:var(--green)" />
27
+ {/if}
28
+ </div>
29
+ <div class="message">
30
+ {@render children?.()}
31
+ </div>
21
32
  </div>
22
33
 
23
34
  <style>.validation {
@@ -50,4 +61,4 @@ export let role = "alert";
50
61
  }
51
62
  :global(:root.dark) .validation.success {
52
63
  color: var(--green);
53
- }</style>
64
+ }</style>
@@ -1,21 +1,9 @@
1
- import { SvelteComponent } from "svelte";
2
- import type { AriaRole } from "svelte/elements";
3
- declare const __propDef: {
4
- props: {
5
- [x: string]: any;
6
- state?: "error" | "success" | "warning" | undefined;
7
- role?: AriaRole | undefined;
8
- };
9
- events: {
10
- [evt: string]: CustomEvent<any>;
11
- };
12
- slots: {
13
- default: {};
14
- };
15
- };
16
- export type ValidationProps = typeof __propDef.props;
17
- export type ValidationEvents = typeof __propDef.events;
18
- export type ValidationSlots = typeof __propDef.slots;
19
- export default class Validation extends SvelteComponent<ValidationProps, ValidationEvents, ValidationSlots> {
20
- }
21
- export {};
1
+ import type { AriaRole } from 'svelte/elements';
2
+ declare const Validation: import("svelte").Component<{
3
+ [key: string]: any;
4
+ state?: "error" | "warning" | "success";
5
+ role?: AriaRole | undefined;
6
+ children?: import("svelte").Snippet;
7
+ }, {}, "">;
8
+ type Validation = ReturnType<typeof Validation>;
9
+ export default Validation;
@@ -0,0 +1,71 @@
1
+ <script 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 lang="ts">
26
+ import LogoBlogs from '../../marketing/Logo/LogoBlogs.svelte';
27
+ import LogoCore from '../../marketing/Logo/LogoCore.svelte';
28
+ import LogoFortguard from '../../marketing/Logo/LogoFortguard.svelte';
29
+ import LogoTalk from '../../marketing/Logo/LogoTalk.svelte';
30
+ import { ActionList, ActionListItem, Button, Dropdown } from '../index.js';
31
+ import { IconCaretDownFill, IconBoxArrowUpRight } from '@hyvor/icons';
32
+
33
+ interface Props {
34
+ mobile?: boolean;
35
+ }
36
+
37
+ let { mobile = false }: Props = $props();
38
+ </script>
39
+
40
+ <Dropdown align={mobile ? 'center' : 'end'} width={325}>
41
+ {#snippet trigger()}
42
+ <Button variant="invisible" color="input" size="small">
43
+ Products
44
+ {#snippet end()}
45
+ <IconCaretDownFill size={10} />
46
+ {/snippet}
47
+ </Button>
48
+ {/snippet}
49
+ {#snippet content()}
50
+ <ActionList>
51
+ {#each Object.entries(PRODUCTS) as [key, product]}
52
+ <a href={`https://${product.url}`} target="_blank">
53
+ <ActionListItem>
54
+ {product.name}
55
+ {#snippet description()}
56
+ <div>
57
+ {product.description}
58
+ </div>
59
+ {/snippet}
60
+ {#snippet start()}
61
+ <product.logo size={20} />
62
+ {/snippet}
63
+ {#snippet end()}
64
+ <IconBoxArrowUpRight size={12} />
65
+ {/snippet}
66
+ </ActionListItem>
67
+ </a>
68
+ {/each}
69
+ </ActionList>
70
+ {/snippet}
71
+ </Dropdown>
@@ -0,0 +1,32 @@
1
+ declare const PRODUCTS: {
2
+ talk: {
3
+ name: string;
4
+ logo: import("svelte").Component<{
5
+ size?: number;
6
+ }, {}, "">;
7
+ url: string;
8
+ description: string;
9
+ };
10
+ blogs: {
11
+ name: string;
12
+ logo: import("svelte").Component<{
13
+ size?: number;
14
+ }, {}, "">;
15
+ url: string;
16
+ description: string;
17
+ };
18
+ fortguard: {
19
+ name: string;
20
+ logo: import("svelte").Component<{
21
+ size?: number;
22
+ }, {}, "">;
23
+ url: string;
24
+ description: string;
25
+ };
26
+ };
27
+ export { PRODUCTS };
28
+ declare const BarProducts: import("svelte").Component<{
29
+ mobile?: boolean;
30
+ }, {}, "">;
31
+ type BarProducts = ReturnType<typeof BarProducts>;
32
+ export default BarProducts;
@@ -0,0 +1,183 @@
1
+ <script lang="ts">
2
+ import { ActionList, ActionListItem, Button, Dropdown } from '../index.js';
3
+ import {
4
+ IconCaretDownFill,
5
+ IconBoxArrowUpRight,
6
+ IconChat,
7
+ IconDiscord,
8
+ IconInfoCircle,
9
+ IconFileEarmark,
10
+ IconChatDots,
11
+ IconTwitterX,
12
+ IconLinkedin
13
+ } from '@hyvor/icons';
14
+ import ActionListGroup from '../ActionList/ActionListGroup.svelte';
15
+ import { PRODUCTS } from './BarProducts.svelte';
16
+ import type { BarConfig, BarProduct } from './bar.js';
17
+ import G2 from './img/G2.svelte';
18
+ import Trustpilot from './img/Trustpilot.svelte';
19
+
20
+ let supportDropdown = $state(false);
21
+
22
+ interface Props {
23
+ mobile?: boolean;
24
+ product: BarProduct;
25
+ config: BarConfig;
26
+ }
27
+
28
+ let { mobile = false, product, config }: Props = $props();
29
+
30
+ function openLiveChat(e: any) {
31
+ e.preventDefault();
32
+ if ((window as any).$crisp) {
33
+ (window as any).$crisp.push(['do', 'chat:open']);
34
+ }
35
+ supportDropdown = false;
36
+ }
37
+
38
+ function getName() {
39
+ if (config.name) {
40
+ return config.name;
41
+ }
42
+ return PRODUCTS[product as keyof typeof PRODUCTS]?.name || '';
43
+ }
44
+ </script>
45
+
46
+ <Dropdown align={mobile ? 'center' : 'end'} width={325} bind:show={supportDropdown}>
47
+ {#snippet trigger()}
48
+ <Button variant="invisible" color="input" size="small">
49
+ Support
50
+ {#snippet end()}
51
+ <IconCaretDownFill size={10} />
52
+ {/snippet}
53
+ </Button>
54
+ {/snippet}
55
+ {#snippet content()}
56
+ <ActionList>
57
+ <a href="https://hyvor.community" target="_blank">
58
+ <ActionListItem>
59
+ Community Forum
60
+ {#snippet description()}
61
+ <div>hyvor.community</div>
62
+ {/snippet}
63
+ {#snippet start()}
64
+ <IconChat />
65
+ {/snippet}
66
+ {#snippet end()}
67
+ <IconBoxArrowUpRight size={12} />
68
+ {/snippet}
69
+ </ActionListItem>
70
+ </a>
71
+ {#if config.docs}
72
+ <a href="/docs" target="_blank">
73
+ <ActionListItem>
74
+ Documentation
75
+ {#snippet description()}
76
+ <div>
77
+ Learn how to use {getName()}
78
+ </div>
79
+ {/snippet}
80
+ {#snippet start()}
81
+ <IconFileEarmark />
82
+ {/snippet}
83
+ {#snippet end()}
84
+ <IconBoxArrowUpRight size={12} />
85
+ {/snippet}
86
+ </ActionListItem>
87
+ </a>
88
+ {/if}
89
+ <a href="https://hyvor.com/support" target="_blank">
90
+ <ActionListItem>
91
+ Support Form
92
+ {#snippet description()}
93
+ <div>Get help from our team</div>
94
+ {/snippet}
95
+ {#snippet start()}
96
+ <IconInfoCircle />
97
+ {/snippet}
98
+ {#snippet end()}
99
+ <IconBoxArrowUpRight size={12} />
100
+ {/snippet}
101
+ </ActionListItem>
102
+ </a>
103
+ {#if config.chat}
104
+ <a href="/chat" onclick={openLiveChat}>
105
+ <ActionListItem>
106
+ Live Chat
107
+ {#snippet description()}
108
+ <div>Chat with our team</div>
109
+ {/snippet}
110
+ {#snippet start()}
111
+ <IconChatDots />
112
+ {/snippet}
113
+ </ActionListItem>
114
+ </a>
115
+ {/if}
116
+
117
+ <ActionListGroup title="Social">
118
+ <a href="https://hyvor.com/api/go/discord" target="_blank">
119
+ <ActionListItem>
120
+ Discord
121
+ {#snippet start()}
122
+ <IconDiscord />
123
+ {/snippet}
124
+ {#snippet end()}
125
+ <IconBoxArrowUpRight size={12} />
126
+ {/snippet}
127
+ </ActionListItem>
128
+ </a>
129
+ {#if config.twitter}
130
+ <a href={config.twitter} target="_blank">
131
+ <ActionListItem>
132
+ Twitter
133
+ {#snippet start()}
134
+ <IconTwitterX />
135
+ {/snippet}
136
+ {#snippet end()}
137
+ <IconBoxArrowUpRight size={12} />
138
+ {/snippet}
139
+ </ActionListItem>
140
+ </a>
141
+ {/if}
142
+ <a href="https://www.linkedin.com/company/hyvor" target="_blank">
143
+ <ActionListItem>
144
+ Linkedin
145
+ {#snippet start()}
146
+ <IconLinkedin />
147
+ {/snippet}
148
+ {#snippet end()}
149
+ <IconBoxArrowUpRight size={12} />
150
+ {/snippet}
151
+ </ActionListItem>
152
+ </a>
153
+ </ActionListGroup>
154
+
155
+ <ActionListGroup title="Rate us">
156
+ <a href="https://www.trustpilot.com/review/hyvor.com" target="_blank">
157
+ <ActionListItem>
158
+ {#snippet start()}
159
+ <Trustpilot />
160
+ {/snippet}
161
+ Trustpilot
162
+ {#snippet end()}
163
+ <IconBoxArrowUpRight size={12} />
164
+ {/snippet}
165
+ </ActionListItem>
166
+ </a>
167
+ {#if config.g2}
168
+ <a href="https://www.g2.com/products/hyvor-talk/reviews" target="_blank">
169
+ <ActionListItem>
170
+ {#snippet start()}
171
+ <G2 />
172
+ {/snippet}
173
+ G2
174
+ {#snippet end()}
175
+ <IconBoxArrowUpRight size={12} />
176
+ {/snippet}
177
+ </ActionListItem>
178
+ </a>
179
+ {/if}
180
+ </ActionListGroup>
181
+ </ActionList>
182
+ {/snippet}
183
+ </Dropdown>
@@ -0,0 +1,8 @@
1
+ import type { BarConfig, BarProduct } from './bar.js';
2
+ declare const BarSupport: import("svelte").Component<{
3
+ mobile?: boolean;
4
+ product: BarProduct;
5
+ config: BarConfig;
6
+ }, {}, "">;
7
+ type BarSupport = ReturnType<typeof BarSupport>;
8
+ export default BarSupport;
@@ -0,0 +1,68 @@
1
+ <script lang="ts">
2
+ import { IconButton, Dropdown } from '../index.js';
3
+ import { IconMegaphone } from '@hyvor/icons';
4
+ import BarUpdatesList from './BarUpdatesList.svelte';
5
+ import { type BarProduct, barUnreadUpdates } from './bar.js';
6
+
7
+ interface Props {
8
+ instance: string;
9
+ product: BarProduct;
10
+ }
11
+
12
+ let { instance, product }: Props = $props();
13
+ </script>
14
+
15
+ <div class="updates">
16
+ <Dropdown align="end" width={525}>
17
+ {#snippet trigger()}
18
+ <IconButton color="input" variant="invisible">
19
+ <IconMegaphone size={14} />
20
+
21
+ {#if $barUnreadUpdates > 0}
22
+ <span class="unread">{$barUnreadUpdates}</span>
23
+ {/if}
24
+ </IconButton>
25
+ {/snippet}
26
+
27
+ {#snippet content()}
28
+ <div class="content-inner">
29
+ <BarUpdatesList {instance} {product} />
30
+ </div>
31
+ {/snippet}
32
+ </Dropdown>
33
+ </div>
34
+
35
+ <style>
36
+ .updates {
37
+ height: 100%;
38
+ }
39
+ .content-inner {
40
+ height: 100%;
41
+ display: flex;
42
+ flex-direction: column;
43
+ }
44
+ .updates :global(.dropdown .content) {
45
+ padding: 0;
46
+ height: 100%;
47
+ }
48
+ .unread {
49
+ position: absolute;
50
+ top: 0;
51
+ right: 0;
52
+ font-size: 8px;
53
+ width: 15px;
54
+ height: 15px;
55
+ display: inline-flex;
56
+ border-radius: 50%;
57
+ margin-right: -5px;
58
+ margin-top: -3px;
59
+ background: var(--accent);
60
+ align-items: center;
61
+ justify-content: center;
62
+ color: var(--accent-text);
63
+ font-weight: 600;
64
+ }
65
+ .updates :global(.trigger) {
66
+ position: relative;
67
+ }
68
+ </style>
@@ -0,0 +1,7 @@
1
+ import { type BarProduct } from './bar.js';
2
+ declare const BarUpdates: import("svelte").Component<{
3
+ instance: string;
4
+ product: BarProduct;
5
+ }, {}, "">;
6
+ type BarUpdates = ReturnType<typeof BarUpdates>;
7
+ export default BarUpdates;