@hyvor/design 0.0.68 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionList/ActionList.svelte +22 -9
- package/dist/components/ActionList/ActionList.svelte.d.ts +8 -20
- package/dist/components/ActionList/ActionListGroup.svelte +18 -8
- package/dist/components/ActionList/ActionListGroup.svelte.d.ts +8 -20
- package/dist/components/ActionList/ActionListItem.svelte +49 -25
- package/dist/components/ActionList/ActionListItem.svelte.d.ts +27 -25
- package/dist/components/ActionList/Selected.svelte +10 -4
- package/dist/components/ActionList/Selected.svelte.d.ts +6 -17
- package/dist/components/Avatar/Avatar.svelte +16 -9
- package/dist/components/Avatar/Avatar.svelte.d.ts +7 -18
- package/dist/components/Avatar/AvatarStack.svelte +14 -8
- package/dist/components/Avatar/AvatarStack.svelte.d.ts +6 -18
- package/dist/components/Base/Base.svelte +14 -6
- package/dist/components/Base/Base.svelte.d.ts +6 -18
- package/dist/components/Box/Box.svelte +10 -3
- package/dist/components/Box/Box.svelte.d.ts +7 -19
- package/dist/components/Button/Button.svelte +52 -25
- package/dist/components/Button/Button.svelte.d.ts +16 -39
- package/dist/components/Button/ButtonGroup.svelte +9 -1
- package/dist/components/Button/ButtonGroup.svelte.d.ts +5 -27
- package/dist/components/Callout/Callout.svelte +41 -20
- package/dist/components/Callout/Callout.svelte.d.ts +11 -23
- package/dist/components/Checkbox/Checkbox.svelte +58 -38
- package/dist/components/Checkbox/Checkbox.svelte.d.ts +11 -34
- package/dist/components/CodeBlock/CodeBlock.svelte +21 -11
- package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +6 -17
- package/dist/components/CodeBlock/getCode.js +2 -0
- package/dist/components/ColorPicker/ColorPicker.svelte +34 -15
- package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +25 -19
- package/dist/components/Dark/DarkProvider.svelte +7 -5
- package/dist/components/Dark/DarkProvider.svelte.d.ts +16 -12
- package/dist/components/Dark/DarkToggle.svelte +8 -6
- package/dist/components/Dark/DarkToggle.svelte.d.ts +16 -12
- package/dist/components/Divider/Divider.svelte +17 -6
- package/dist/components/Divider/Divider.svelte.d.ts +9 -20
- package/dist/components/Dropdown/Dropdown.svelte +33 -14
- package/dist/components/Dropdown/Dropdown.svelte.d.ts +13 -24
- package/dist/components/Dropdown/DropdownContent.svelte +124 -92
- package/dist/components/Dropdown/DropdownContent.svelte.d.ts +12 -24
- package/dist/components/FormControl/Caption.svelte +10 -3
- package/dist/components/FormControl/Caption.svelte.d.ts +7 -19
- package/dist/components/FormControl/FormControl.svelte +11 -2
- package/dist/components/FormControl/FormControl.svelte.d.ts +6 -27
- package/dist/components/FormControl/InputGroup.svelte +17 -9
- package/dist/components/FormControl/InputGroup.svelte.d.ts +7 -19
- package/dist/components/FormControl/Label.svelte +11 -2
- package/dist/components/FormControl/Label.svelte.d.ts +6 -27
- package/dist/components/FormControl/Validation.svelte +18 -9
- package/dist/components/FormControl/Validation.svelte.d.ts +8 -20
- package/dist/components/HyvorBar/BarProducts.svelte +44 -25
- package/dist/components/HyvorBar/BarProducts.svelte.d.ts +14 -21
- package/dist/components/HyvorBar/BarSupport.svelte +165 -101
- package/dist/components/HyvorBar/BarSupport.svelte.d.ts +7 -18
- package/dist/components/HyvorBar/BarUpdates.svelte +25 -15
- package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +6 -17
- package/dist/components/HyvorBar/BarUpdatesList.svelte +73 -48
- package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +6 -17
- package/dist/components/HyvorBar/BarUser.svelte +36 -24
- package/dist/components/HyvorBar/BarUser.svelte.d.ts +5 -16
- package/dist/components/HyvorBar/BarUserPreview.svelte +2 -1
- package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +16 -12
- package/dist/components/HyvorBar/HyvorBar.svelte +69 -36
- package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +7 -18
- package/dist/components/HyvorBar/bar.d.ts +2 -2
- package/dist/components/HyvorBar/img/G2.svelte.d.ts +22 -19
- package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +22 -19
- package/dist/components/IconButton/IconButton.svelte +43 -22
- package/dist/components/IconButton/IconButton.svelte.d.ts +10 -33
- package/dist/components/IconMessage/IconMessage.svelte +111 -56
- package/dist/components/IconMessage/IconMessage.svelte.d.ts +19 -35
- package/dist/components/Internationalization/InternationalizationProvider.svelte +14 -7
- package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +6 -18
- package/dist/components/Internationalization/LanguageToggle.svelte +73 -47
- package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +10 -21
- package/dist/components/Internationalization/T.svelte +158 -114
- package/dist/components/Internationalization/T.svelte.d.ts +17 -15
- package/dist/components/Internationalization/i18n.d.ts +1 -3
- package/dist/components/Internationalization/t.d.ts +1 -2
- package/dist/components/Internationalization/types.d.ts +1 -0
- package/dist/components/Link/Link.svelte +31 -19
- package/dist/components/Link/Link.svelte.d.ts +11 -34
- package/dist/components/Loader/LoadButton.svelte +24 -9
- package/dist/components/Loader/LoadButton.svelte.d.ts +29 -42
- package/dist/components/Loader/Loader.svelte +69 -42
- package/dist/components/Loader/Loader.svelte.d.ts +15 -27
- package/dist/components/Modal/ConfirmModalProvider.svelte +28 -20
- package/dist/components/Modal/ConfirmModalProvider.svelte.d.ts +3 -14
- package/dist/components/Modal/Modal.svelte +76 -47
- package/dist/components/Modal/Modal.svelte.d.ts +31 -29
- package/dist/components/Modal/ModalFooter.svelte +14 -6
- package/dist/components/Modal/ModalFooter.svelte.d.ts +22 -18
- package/dist/components/Modal/confirm.d.ts +2 -2
- package/dist/components/Modal/modal-types.d.ts +2 -2
- package/dist/components/NavLink/NavLink.svelte +31 -18
- package/dist/components/NavLink/NavLink.svelte.d.ts +11 -33
- package/dist/components/Radio/Radio.svelte +35 -16
- package/dist/components/Radio/Radio.svelte.d.ts +10 -33
- package/dist/components/Slider/Slider.svelte +53 -36
- package/dist/components/Slider/Slider.svelte.d.ts +24 -20
- package/dist/components/SplitControl/SplitControl.svelte +27 -18
- package/dist/components/SplitControl/SplitControl.svelte.d.ts +11 -24
- package/dist/components/Switch/Switch.svelte +30 -15
- package/dist/components/Switch/Switch.svelte.d.ts +8 -31
- package/dist/components/TabNav/TabNav.svelte +29 -15
- package/dist/components/TabNav/TabNav.svelte.d.ts +7 -19
- package/dist/components/TabNav/TabNavItem.svelte +36 -15
- package/dist/components/TabNav/TabNavItem.svelte.d.ts +10 -24
- package/dist/components/Table/Table.svelte +11 -4
- package/dist/components/Table/Table.svelte.d.ts +7 -19
- package/dist/components/Table/TableRow.svelte +11 -3
- package/dist/components/Table/TableRow.svelte.d.ts +7 -19
- package/dist/components/Tag/Tag.svelte +65 -31
- package/dist/components/Tag/Tag.svelte.d.ts +16 -39
- package/dist/components/Text/Text.svelte +20 -6
- package/dist/components/Text/Text.svelte.d.ts +10 -22
- package/dist/components/TextInput/TextInput.svelte +42 -21
- package/dist/components/TextInput/TextInput.svelte.d.ts +12 -36
- package/dist/components/Textarea/Textarea.svelte +46 -24
- package/dist/components/Textarea/Textarea.svelte.d.ts +13 -37
- package/dist/components/Toast/ToastIcon.svelte +26 -15
- package/dist/components/Toast/ToastIcon.svelte.d.ts +5 -16
- package/dist/components/Toast/ToastMessage.svelte +11 -4
- package/dist/components/Toast/ToastMessage.svelte.d.ts +5 -16
- package/dist/components/Toast/ToastProvider.svelte +6 -4
- package/dist/components/Toast/ToastProvider.svelte.d.ts +16 -12
- package/dist/components/Toast/toast.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.svelte +71 -55
- package/dist/components/Tooltip/Tooltip.svelte.d.ts +35 -23
- package/dist/marketing/Container/Container.svelte +8 -2
- package/dist/marketing/Container/Container.svelte.d.ts +6 -18
- package/dist/marketing/Docs/Content/Content.svelte +41 -29
- package/dist/marketing/Docs/Content/Content.svelte.d.ts +5 -16
- package/dist/marketing/Docs/Content/DocsImage.svelte +17 -9
- package/dist/marketing/Docs/Content/DocsImage.svelte.d.ts +9 -20
- package/dist/marketing/Docs/Docs.svelte +9 -3
- package/dist/marketing/Docs/Docs.svelte.d.ts +6 -29
- package/dist/marketing/Docs/Nav/Nav.svelte +77 -50
- package/dist/marketing/Docs/Nav/Nav.svelte.d.ts +5 -16
- package/dist/marketing/Docs/Nav/NavCategory.svelte +16 -6
- package/dist/marketing/Docs/Nav/NavCategory.svelte.d.ts +8 -20
- package/dist/marketing/Docs/Nav/NavItem.svelte +10 -3
- package/dist/marketing/Docs/Nav/NavItem.svelte.d.ts +6 -18
- package/dist/marketing/Docs/Sidebar/Sidebar.svelte.d.ts +22 -19
- package/dist/marketing/Docs/Toc.svelte +49 -39
- package/dist/marketing/Docs/Toc.svelte.d.ts +3 -14
- package/dist/marketing/Document/Document.svelte +11 -4
- package/dist/marketing/Document/Document.svelte.d.ts +7 -19
- package/dist/marketing/Document/DocumentTitle.svelte +16 -5
- package/dist/marketing/Document/DocumentTitle.svelte.d.ts +9 -20
- package/dist/marketing/Footer/Footer.svelte +55 -38
- package/dist/marketing/Footer/Footer.svelte.d.ts +8 -20
- package/dist/marketing/Footer/FooterLinkList.svelte +8 -2
- package/dist/marketing/Footer/FooterLinkList.svelte.d.ts +6 -18
- package/dist/marketing/Header/Header.svelte +41 -23
- package/dist/marketing/Header/Header.svelte.d.ts +10 -22
- package/dist/marketing/Logo/LogoBlogs.svelte +6 -1
- package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +5 -16
- package/dist/marketing/Logo/LogoCore.svelte +6 -1
- package/dist/marketing/Logo/LogoCore.svelte.d.ts +5 -16
- package/dist/marketing/Logo/LogoFortguard.svelte +7 -2
- package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +5 -16
- package/dist/marketing/Logo/LogoTalk.svelte +6 -1
- package/dist/marketing/Logo/LogoTalk.svelte.d.ts +5 -16
- package/dist/stores/dark.d.ts +0 -1
- package/package.json +8 -8
|
@@ -1,38 +1,57 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import Loader from '../Loader/Loader.svelte';
|
|
4
|
+
import ActionList from '../ActionList/ActionList.svelte';
|
|
5
|
+
import ActionListItem from '../ActionList/ActionListItem.svelte';
|
|
6
|
+
import {
|
|
7
|
+
barUnreadUpdates,
|
|
8
|
+
UnreadUpdatesTimeLocalStorage,
|
|
9
|
+
type BarProduct,
|
|
10
|
+
type BarUpdate
|
|
11
|
+
} from './bar.js';
|
|
12
|
+
import { IconBoxArrowUpRight } from '@hyvor/icons';
|
|
13
|
+
import Button from '../Button/Button.svelte';
|
|
14
|
+
import Tag from '../Tag/Tag.svelte';
|
|
15
|
+
import IconMessage from '../IconMessage/IconMessage.svelte';
|
|
16
|
+
|
|
17
|
+
interface Props {
|
|
18
|
+
instance: string;
|
|
19
|
+
product: BarProduct;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let { instance, product }: Props = $props();
|
|
23
|
+
|
|
24
|
+
let updates: BarUpdate[] = $state([]);
|
|
25
|
+
let loading = $state(true);
|
|
26
|
+
let error = $state(false);
|
|
27
|
+
|
|
28
|
+
let lastReadTime: null | number = $state(null);
|
|
29
|
+
|
|
30
|
+
function fetchUpdates() {
|
|
31
|
+
error = false;
|
|
32
|
+
lastReadTime = UnreadUpdatesTimeLocalStorage.get();
|
|
33
|
+
loading = true;
|
|
34
|
+
|
|
35
|
+
fetch(instance + '/api/public/updates?types=company,' + product)
|
|
36
|
+
.then((response) => response.json())
|
|
37
|
+
.then((data) => {
|
|
38
|
+
updates = data;
|
|
39
|
+
|
|
40
|
+
barUnreadUpdates.set(0);
|
|
41
|
+
// set as last read now
|
|
42
|
+
UnreadUpdatesTimeLocalStorage.setNow();
|
|
43
|
+
})
|
|
44
|
+
.catch(() => {
|
|
45
|
+
error = true;
|
|
46
|
+
})
|
|
47
|
+
.finally(() => {
|
|
48
|
+
loading = false;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
onMount(() => {
|
|
53
|
+
fetchUpdates();
|
|
54
|
+
});
|
|
36
55
|
</script>
|
|
37
56
|
|
|
38
57
|
{#if loading}
|
|
@@ -70,19 +89,23 @@ onMount(() => {
|
|
|
70
89
|
<div class="title">
|
|
71
90
|
{update.title}
|
|
72
91
|
</div>
|
|
73
|
-
|
|
74
|
-
<div
|
|
75
|
-
|
|
92
|
+
{#snippet description()}
|
|
93
|
+
<div>
|
|
94
|
+
<div class="description">
|
|
95
|
+
{update.content}
|
|
96
|
+
</div>
|
|
97
|
+
<div class="date">
|
|
98
|
+
{new Intl.DateTimeFormat('en-US').format(new Date(update.created_at * 1000))}
|
|
99
|
+
</div>
|
|
76
100
|
</div>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
</span>
|
|
101
|
+
{/snippet}
|
|
102
|
+
{#snippet end()}
|
|
103
|
+
<span>
|
|
104
|
+
{#if update.url}
|
|
105
|
+
<IconBoxArrowUpRight size={12} />
|
|
106
|
+
{/if}
|
|
107
|
+
</span>
|
|
108
|
+
{/snippet}
|
|
86
109
|
</ActionListItem>
|
|
87
110
|
</a>
|
|
88
111
|
{/each}
|
|
@@ -93,7 +116,9 @@ onMount(() => {
|
|
|
93
116
|
<div class="top">
|
|
94
117
|
<Button size="small" color="input" as="a" href={instance + '/updates'} target="_blank">
|
|
95
118
|
View all updates
|
|
96
|
-
|
|
119
|
+
{#snippet end()}
|
|
120
|
+
<IconBoxArrowUpRight size={12} />
|
|
121
|
+
{/snippet}
|
|
97
122
|
</Button>
|
|
98
123
|
</div>
|
|
99
124
|
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import { type BarProduct } from './bar.js';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
};
|
|
13
|
-
export type BarUpdatesListProps = typeof __propDef.props;
|
|
14
|
-
export type BarUpdatesListEvents = typeof __propDef.events;
|
|
15
|
-
export type BarUpdatesListSlots = typeof __propDef.slots;
|
|
16
|
-
export default class BarUpdatesList extends SvelteComponent<BarUpdatesListProps, BarUpdatesListEvents, BarUpdatesListSlots> {
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
2
|
+
declare const BarUpdatesList: import("svelte").Component<{
|
|
3
|
+
instance: string;
|
|
4
|
+
product: BarProduct;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type BarUpdatesList = ReturnType<typeof BarUpdatesList>;
|
|
7
|
+
export default BarUpdatesList;
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ActionList from '../ActionList/ActionList.svelte';
|
|
3
|
+
import ActionListItem from '../ActionList/ActionListItem.svelte';
|
|
4
|
+
import Dropdown from '../Dropdown/Dropdown.svelte';
|
|
5
|
+
import { IconBoxArrowUpRight } from '@hyvor/icons';
|
|
6
|
+
import { barUser } from './bar.js';
|
|
7
|
+
import BarUserPreview from './BarUserPreview.svelte';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
instance: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { instance }: Props = $props();
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<div class="wrap">
|
|
11
17
|
<Dropdown align="end" width={325}>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
{#snippet trigger()}
|
|
19
|
+
<button class="user-wrap">
|
|
20
|
+
{#if $barUser}
|
|
21
|
+
<img class="user-picture" src={$barUser?.picture_url} alt={$barUser?.name} />
|
|
22
|
+
{/if}
|
|
23
|
+
</button>
|
|
24
|
+
{/snippet}
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
<
|
|
26
|
+
{#snippet content()}
|
|
27
|
+
<ActionList>
|
|
28
|
+
<BarUserPreview />
|
|
20
29
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
<a href="{instance}/account" target="_blank">
|
|
31
|
+
<ActionListItem>
|
|
32
|
+
Manage Account
|
|
33
|
+
{#snippet end()}
|
|
34
|
+
<IconBoxArrowUpRight size={12} />
|
|
35
|
+
{/snippet}
|
|
36
|
+
</ActionListItem>
|
|
37
|
+
</a>
|
|
38
|
+
<a href="{instance}/account/logout">
|
|
39
|
+
<ActionListItem>Logout</ActionListItem>
|
|
40
|
+
</a>
|
|
41
|
+
</ActionList>
|
|
42
|
+
{/snippet}
|
|
31
43
|
</Dropdown>
|
|
32
44
|
</div>
|
|
33
45
|
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
events: {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {};
|
|
10
|
-
};
|
|
11
|
-
export type BarUserProps = typeof __propDef.props;
|
|
12
|
-
export type BarUserEvents = typeof __propDef.events;
|
|
13
|
-
export type BarUserSlots = typeof __propDef.slots;
|
|
14
|
-
export default class BarUser extends SvelteComponent<BarUserProps, BarUserEvents, BarUserSlots> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
1
|
+
declare const BarUser: import("svelte").Component<{
|
|
2
|
+
instance: string;
|
|
3
|
+
}, {}, "">;
|
|
4
|
+
type BarUser = ReturnType<typeof BarUser>;
|
|
5
|
+
export default BarUser;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
6
11
|
};
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export type BarUserPreviewProps = typeof __propDef.props;
|
|
10
|
-
export type BarUserPreviewEvents = typeof __propDef.events;
|
|
11
|
-
export type BarUserPreviewSlots = typeof __propDef.slots;
|
|
12
|
-
export default class BarUserPreview extends SvelteComponent<BarUserPreviewProps, BarUserPreviewEvents, BarUserPreviewSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
declare const BarUserPreview: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type BarUserPreview = InstanceType<typeof BarUserPreview>;
|
|
18
|
+
export default BarUserPreview;
|
|
@@ -1,45 +1,78 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import BarUser from './BarUser.svelte';
|
|
3
|
+
import { onMount } from 'svelte';
|
|
4
|
+
import BarProducts, { PRODUCTS } from './BarProducts.svelte';
|
|
5
|
+
import BarSupport from './BarSupport.svelte';
|
|
6
|
+
import { loadBarUser, type BarConfig, type BarProduct } from './bar.js';
|
|
7
|
+
import BarUpdates from './BarUpdates.svelte';
|
|
8
|
+
import { IconCaretDownFill } from '@hyvor/icons';
|
|
9
|
+
import LogoTalk from '../../marketing/Logo/LogoTalk.svelte';
|
|
10
|
+
import LogoBlogs from '../../marketing/Logo/LogoBlogs.svelte';
|
|
11
|
+
import LogoCore from '../../marketing/Logo/LogoCore.svelte';
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
instance?: string;
|
|
15
|
+
product: BarProduct;
|
|
16
|
+
config?: Partial<BarConfig>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let { instance = 'https://hyvor.com', product, config = {} }: Props = $props();
|
|
20
|
+
|
|
21
|
+
let mobileShow = $state(false);
|
|
22
|
+
|
|
23
|
+
const configComplete: BarConfig = {
|
|
24
|
+
...{
|
|
25
|
+
name: null,
|
|
26
|
+
docs: true,
|
|
27
|
+
chat: true,
|
|
28
|
+
twitter: null,
|
|
29
|
+
g2: null
|
|
30
|
+
},
|
|
31
|
+
...config
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
function handleBarClick(e: MouseEvent) {
|
|
35
|
+
if (mobileShow && e.target instanceof Element && e.target.closest('.dropdown .trigger')) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (window.innerWidth <= 600) {
|
|
39
|
+
mobileShow = !mobileShow;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
onMount(() => {
|
|
44
|
+
loadBarUser(instance, product);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
function getLogo() {
|
|
48
|
+
if (product === 'talk') {
|
|
49
|
+
return LogoTalk;
|
|
50
|
+
} else if (product === 'blogs') {
|
|
51
|
+
return LogoBlogs;
|
|
52
|
+
} else {
|
|
53
|
+
return LogoCore;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function getName() {
|
|
58
|
+
if (config.name) {
|
|
59
|
+
return config.name;
|
|
60
|
+
}
|
|
61
|
+
return (PRODUCTS as any)[product]?.name || 'HYVOR';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const LogoComponent = getLogo();
|
|
32
65
|
</script>
|
|
33
66
|
|
|
34
|
-
<!-- svelte-ignore
|
|
35
|
-
<!-- svelte-ignore
|
|
36
|
-
<div id="bar"
|
|
67
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
68
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
69
|
+
<div id="bar" onclick={handleBarClick} class:mobile-show={mobileShow}>
|
|
37
70
|
<div class="inner hds-box">
|
|
38
71
|
<div class="left">
|
|
39
72
|
<a class="logo" href="/">
|
|
40
|
-
<
|
|
73
|
+
<LogoComponent size={20} />
|
|
41
74
|
<span class="name">
|
|
42
|
-
{
|
|
75
|
+
{getName()}
|
|
43
76
|
</span>
|
|
44
77
|
</a>
|
|
45
78
|
</div>
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import { type BarConfig, type BarProduct } from './bar.js';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {};
|
|
13
|
-
};
|
|
14
|
-
export type HyvorBarProps = typeof __propDef.props;
|
|
15
|
-
export type HyvorBarEvents = typeof __propDef.events;
|
|
16
|
-
export type HyvorBarSlots = typeof __propDef.slots;
|
|
17
|
-
export default class HyvorBar extends SvelteComponent<HyvorBarProps, HyvorBarEvents, HyvorBarSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
2
|
+
declare const HyvorBar: import("svelte").Component<{
|
|
3
|
+
instance?: string;
|
|
4
|
+
product: BarProduct;
|
|
5
|
+
config?: Partial<BarConfig>;
|
|
6
|
+
}, {}, "">;
|
|
7
|
+
type HyvorBar = ReturnType<typeof HyvorBar>;
|
|
8
|
+
export default HyvorBar;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** @typedef {typeof __propDef.slots} G2Slots */
|
|
4
|
-
export default class G2 extends SvelteComponent<{
|
|
1
|
+
export default G2;
|
|
2
|
+
type G2 = SvelteComponent<{
|
|
5
3
|
[x: string]: never;
|
|
6
4
|
}, {
|
|
7
5
|
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
|
|
10
|
-
export type G2Props = typeof __propDef.props;
|
|
11
|
-
export type G2Events = typeof __propDef.events;
|
|
12
|
-
export type G2Slots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
22
8
|
};
|
|
23
|
-
|
|
9
|
+
declare const G2: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** @typedef {typeof __propDef.slots} TrustpilotSlots */
|
|
4
|
-
export default class Trustpilot extends SvelteComponent<{
|
|
1
|
+
export default Trustpilot;
|
|
2
|
+
type Trustpilot = SvelteComponent<{
|
|
5
3
|
[x: string]: never;
|
|
6
4
|
}, {
|
|
7
5
|
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
|
|
10
|
-
export type TrustpilotProps = typeof __propDef.props;
|
|
11
|
-
export type TrustpilotEvents = typeof __propDef.events;
|
|
12
|
-
export type TrustpilotSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
22
8
|
};
|
|
23
|
-
|
|
9
|
+
declare const Trustpilot: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -1,13 +1,34 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
size?: 'small' | 'medium' | 'large' | number;
|
|
8
|
+
// export let color : 'accent' | 'soft' | 'invisible' | 'danger' = 'accent';
|
|
9
|
+
color?: 'accent' | 'gray' | 'input' | 'green' | 'red' | 'blue' | 'orange';
|
|
10
|
+
variant?: 'fill' | 'fill-light' | 'outline' | 'outline-fill' | 'invisible';
|
|
11
|
+
as?: 'button' | 'a';
|
|
12
|
+
children?: import('svelte').Snippet;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
size = $bindable('medium'),
|
|
18
|
+
color = 'accent',
|
|
19
|
+
variant = 'fill',
|
|
20
|
+
as = 'button',
|
|
21
|
+
children,
|
|
22
|
+
...rest
|
|
23
|
+
}: Props = $props();
|
|
24
|
+
|
|
25
|
+
const sizes = {
|
|
26
|
+
small: 26,
|
|
27
|
+
medium: 30,
|
|
28
|
+
large: 36
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
size = (typeof size === 'number' ? size : sizes[size]) + 'px';
|
|
11
32
|
</script>
|
|
12
33
|
|
|
13
34
|
<svelte:element
|
|
@@ -15,21 +36,21 @@ size = (typeof size === "number" ? size : sizes[size]) + "px";
|
|
|
15
36
|
class="button {color} {variant}"
|
|
16
37
|
style:width={size}
|
|
17
38
|
style:height={size}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
onkeyup={bubble('keyup')}
|
|
40
|
+
onkeydown={bubble('keydown')}
|
|
41
|
+
onkeypress={bubble('keypress')}
|
|
42
|
+
onfocus={bubble('focus')}
|
|
43
|
+
onblur={bubble('blur')}
|
|
44
|
+
onclick={bubble('click')}
|
|
45
|
+
onmouseover={bubble('mouseover')}
|
|
46
|
+
onmouseenter={bubble('mouseenter')}
|
|
47
|
+
onmouseleave={bubble('mouseleave')}
|
|
48
|
+
onchange={bubble('change')}
|
|
28
49
|
role="button"
|
|
29
50
|
tabindex="0"
|
|
30
|
-
{
|
|
51
|
+
{...rest}
|
|
31
52
|
>
|
|
32
|
-
|
|
53
|
+
{@render children?.()}
|
|
33
54
|
</svelte:element>
|
|
34
55
|
|
|
35
56
|
<style>.button {
|