@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.
- package/dist/components/ActionList/ActionList.svelte +21 -13
- package/dist/components/ActionList/ActionList.svelte.d.ts +8 -20
- package/dist/components/ActionList/ActionListGroup.svelte +40 -35
- package/dist/components/ActionList/ActionListGroup.svelte.d.ts +8 -20
- package/dist/components/ActionList/ActionListItem.svelte +129 -107
- package/dist/components/ActionList/ActionListItem.svelte.d.ts +27 -25
- package/dist/components/ActionList/Selected.svelte +27 -24
- package/dist/components/ActionList/Selected.svelte.d.ts +6 -17
- package/dist/components/Avatar/Avatar.svelte +22 -19
- package/dist/components/Avatar/Avatar.svelte.d.ts +7 -18
- package/dist/components/Avatar/AvatarStack.svelte +29 -27
- package/dist/components/Avatar/AvatarStack.svelte.d.ts +6 -18
- package/dist/components/Base/Base.svelte +16 -8
- package/dist/components/Base/Base.svelte.d.ts +6 -18
- package/dist/components/Box/Box.svelte +16 -9
- package/dist/components/Box/Box.svelte.d.ts +7 -19
- package/dist/components/Button/Button.svelte +65 -47
- package/dist/components/Button/Button.svelte.d.ts +16 -39
- package/dist/components/Button/ButtonGroup.svelte +14 -6
- package/dist/components/Button/ButtonGroup.svelte.d.ts +5 -27
- package/dist/components/Callout/Callout.svelte +110 -87
- package/dist/components/Callout/Callout.svelte.d.ts +11 -22
- package/dist/components/Checkbox/Checkbox.svelte +156 -144
- package/dist/components/Checkbox/Checkbox.svelte.d.ts +11 -34
- package/dist/components/CodeBlock/CodeBlock.svelte +45 -32
- package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +6 -17
- package/dist/components/CodeBlock/getCode.js +8 -6
- package/dist/components/CodeBlock/hljs.scss +189 -191
- package/dist/components/CodeBlock/prism.scss +370 -7
- package/dist/components/ColorPicker/ColorPicker.svelte +75 -56
- package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +25 -19
- package/dist/components/Dark/DarkProvider.svelte +16 -14
- package/dist/components/Dark/DarkProvider.svelte.d.ts +16 -12
- package/dist/components/Dark/DarkToggle.svelte +15 -16
- package/dist/components/Dark/DarkToggle.svelte.d.ts +16 -12
- package/dist/components/Divider/Divider.svelte +23 -13
- package/dist/components/Divider/Divider.svelte.d.ts +9 -20
- package/dist/components/Dropdown/Dropdown.svelte +58 -114
- package/dist/components/Dropdown/Dropdown.svelte.d.ts +13 -24
- package/dist/components/Dropdown/DropdownContent.svelte +152 -0
- package/dist/components/Dropdown/DropdownContent.svelte.d.ts +12 -0
- package/dist/components/FormControl/Caption.svelte +18 -11
- package/dist/components/FormControl/Caption.svelte.d.ts +7 -19
- package/dist/components/FormControl/FormControl.svelte +28 -19
- package/dist/components/FormControl/FormControl.svelte.d.ts +6 -27
- package/dist/components/FormControl/InputGroup.svelte +22 -15
- package/dist/components/FormControl/InputGroup.svelte.d.ts +7 -19
- package/dist/components/FormControl/Label.svelte +15 -6
- package/dist/components/FormControl/Label.svelte.d.ts +6 -27
- package/dist/components/FormControl/Validation.svelte +30 -19
- package/dist/components/FormControl/Validation.svelte.d.ts +9 -21
- package/dist/components/HyvorBar/BarProducts.svelte +71 -0
- package/dist/components/HyvorBar/BarProducts.svelte.d.ts +32 -0
- package/dist/components/HyvorBar/BarSupport.svelte +183 -0
- package/dist/components/HyvorBar/BarSupport.svelte.d.ts +8 -0
- package/dist/components/HyvorBar/BarUpdates.svelte +68 -0
- package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +7 -0
- package/dist/components/HyvorBar/BarUpdatesList.svelte +159 -0
- package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +7 -0
- package/dist/components/HyvorBar/BarUser.svelte +72 -0
- package/dist/components/HyvorBar/BarUser.svelte.d.ts +5 -0
- package/dist/components/HyvorBar/BarUserPreview.svelte +43 -0
- package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +18 -0
- package/dist/components/HyvorBar/HyvorBar.svelte +183 -0
- package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +8 -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 +26 -0
- package/dist/components/HyvorBar/img/Trustpilot.svelte +11 -0
- package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +26 -0
- package/dist/components/IconButton/IconButton.svelte +49 -32
- package/dist/components/IconButton/IconButton.svelte.d.ts +10 -33
- package/dist/components/IconMessage/IconMessage.svelte +157 -51
- package/dist/components/IconMessage/IconMessage.svelte.d.ts +19 -27
- package/dist/components/Internationalization/InternationalizationProvider.svelte +15 -8
- package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +7 -19
- package/dist/components/Internationalization/LanguageToggle.svelte +80 -57
- package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +11 -22
- 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 +3 -5
- package/dist/components/Internationalization/i18n.js +13 -11
- package/dist/components/Internationalization/t.d.ts +2 -3
- package/dist/components/Internationalization/t.js +4 -4
- package/dist/components/Internationalization/types.d.ts +2 -1
- package/dist/components/Link/Link.svelte +68 -61
- package/dist/components/Link/Link.svelte.d.ts +11 -34
- package/dist/components/Loader/LoadButton.svelte +39 -38
- package/dist/components/Loader/LoadButton.svelte.d.ts +29 -42
- package/dist/components/Loader/Loader.svelte +121 -107
- package/dist/components/Loader/Loader.svelte.d.ts +15 -27
- package/dist/components/Modal/ConfirmModalProvider.svelte +41 -51
- package/dist/components/Modal/ConfirmModalProvider.svelte.d.ts +3 -14
- package/dist/components/Modal/Modal.svelte +202 -203
- package/dist/components/Modal/Modal.svelte.d.ts +31 -29
- package/dist/components/Modal/ModalFooter.svelte +36 -31
- package/dist/components/Modal/ModalFooter.svelte.d.ts +22 -18
- package/dist/components/Modal/confirm.d.ts +2 -2
- package/dist/components/Modal/confirm.js +4 -4
- package/dist/components/Modal/modal-types.d.ts +4 -4
- package/dist/components/NavLink/NavLink.svelte +94 -89
- package/dist/components/NavLink/NavLink.svelte.d.ts +11 -33
- package/dist/components/Radio/Radio.svelte +46 -35
- package/dist/components/Radio/Radio.svelte.d.ts +10 -33
- package/dist/components/Slider/Slider.svelte +129 -120
- package/dist/components/Slider/Slider.svelte.d.ts +24 -20
- package/dist/components/SplitControl/SplitControl.svelte +43 -48
- package/dist/components/SplitControl/SplitControl.svelte.d.ts +11 -24
- package/dist/components/Switch/Switch.svelte +77 -67
- package/dist/components/Switch/Switch.svelte.d.ts +8 -31
- package/dist/components/TabNav/TabNav.svelte +33 -23
- package/dist/components/TabNav/TabNav.svelte.d.ts +7 -19
- package/dist/components/TabNav/TabNavItem.svelte +65 -51
- package/dist/components/TabNav/TabNavItem.svelte.d.ts +10 -24
- package/dist/components/Table/Table.svelte +17 -7
- package/dist/components/Table/Table.svelte.d.ts +7 -19
- package/dist/components/Table/TableRow.svelte +32 -24
- package/dist/components/Table/TableRow.svelte.d.ts +7 -19
- package/dist/components/Tag/Tag.svelte +75 -49
- package/dist/components/Tag/Tag.svelte.d.ts +16 -39
- package/dist/components/Text/Text.svelte +33 -26
- package/dist/components/Text/Text.svelte.d.ts +10 -22
- package/dist/components/TextInput/TextInput.svelte +54 -33
- package/dist/components/TextInput/TextInput.svelte.d.ts +12 -36
- package/dist/components/Textarea/Textarea.svelte +68 -46
- package/dist/components/Textarea/Textarea.svelte.d.ts +13 -37
- package/dist/components/Toast/ToastIcon.svelte +55 -46
- package/dist/components/Toast/ToastIcon.svelte.d.ts +5 -16
- package/dist/components/Toast/ToastMessage.svelte +42 -41
- package/dist/components/Toast/ToastMessage.svelte.d.ts +5 -16
- package/dist/components/Toast/ToastProvider.svelte +22 -20
- package/dist/components/Toast/ToastProvider.svelte.d.ts +16 -12
- package/dist/components/Toast/cleaner.js +5 -5
- package/dist/components/Toast/toast.d.ts +3 -3
- package/dist/components/Toast/toast.js +10 -10
- package/dist/components/Tooltip/Tooltip.svelte +163 -148
- package/dist/components/Tooltip/Tooltip.svelte.d.ts +35 -23
- 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 +15 -9
- package/dist/marketing/Container/Container.svelte.d.ts +6 -18
- package/dist/marketing/Docs/Content/Content.svelte +48 -35
- package/dist/marketing/Docs/Content/Content.svelte.d.ts +5 -16
- package/dist/marketing/Docs/Content/DocsImage.svelte +67 -69
- package/dist/marketing/Docs/Content/DocsImage.svelte.d.ts +9 -20
- package/dist/marketing/Docs/Docs.svelte +28 -25
- package/dist/marketing/Docs/Docs.svelte.d.ts +6 -29
- package/dist/marketing/Docs/Nav/Nav.svelte +96 -70
- package/dist/marketing/Docs/Nav/Nav.svelte.d.ts +5 -16
- package/dist/marketing/Docs/Nav/NavCategory.svelte +39 -29
- package/dist/marketing/Docs/Nav/NavCategory.svelte.d.ts +8 -20
- package/dist/marketing/Docs/Nav/NavItem.svelte +30 -26
- package/dist/marketing/Docs/Nav/NavItem.svelte.d.ts +6 -18
- package/dist/marketing/Docs/Sidebar/Sidebar.svelte +22 -25
- package/dist/marketing/Docs/Sidebar/Sidebar.svelte.d.ts +22 -19
- package/dist/marketing/Docs/Toc.svelte +64 -56
- package/dist/marketing/Docs/Toc.svelte.d.ts +3 -14
- package/dist/marketing/Document/Document.svelte +15 -8
- package/dist/marketing/Document/Document.svelte.d.ts +7 -19
- package/dist/marketing/Document/DocumentTitle.svelte +65 -54
- package/dist/marketing/Document/DocumentTitle.svelte.d.ts +9 -20
- package/dist/marketing/Footer/Footer.svelte +154 -145
- package/dist/marketing/Footer/Footer.svelte.d.ts +8 -20
- package/dist/marketing/Footer/FooterLinkList.svelte +31 -27
- package/dist/marketing/Footer/FooterLinkList.svelte.d.ts +6 -18
- package/dist/marketing/Header/Header.svelte +47 -37
- package/dist/marketing/Header/Header.svelte.d.ts +10 -22
- package/dist/marketing/Logo/LogoBlogs.svelte +46 -0
- package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +5 -0
- package/dist/marketing/Logo/LogoCore.svelte +46 -0
- package/dist/marketing/Logo/LogoCore.svelte.d.ts +5 -0
- package/dist/marketing/Logo/LogoFortguard.svelte +54 -0
- package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +5 -0
- package/dist/marketing/Logo/LogoTalk.svelte +32 -0
- package/dist/marketing/Logo/LogoTalk.svelte.d.ts +5 -0
- package/dist/stores/dark.d.ts +0 -1
- package/dist/stores/dark.js +8 -8
- package/dist/variables.scss +41 -48
- package/package.json +59 -58
|
@@ -1,154 +1,169 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export let
|
|
7
|
-
export let
|
|
8
|
-
export let
|
|
9
|
-
let
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
<!-- @migration-task Error while migrating Svelte code: This migration would change the name of a slot making the component unusable -->
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
import { tick, onMount, onDestroy } from 'svelte';
|
|
4
|
+
import { fade } from 'svelte/transition';
|
|
5
|
+
|
|
6
|
+
export let text: string = '';
|
|
7
|
+
export let position: 'top' | 'bottom' | 'left' | 'right' = 'top';
|
|
8
|
+
export let color: 'black' | 'accent' | 'soft' | 'danger' = 'black';
|
|
9
|
+
export let show = false;
|
|
10
|
+
export let maxWidth: number = 300;
|
|
11
|
+
export let disabled = false;
|
|
12
|
+
|
|
13
|
+
let wrap: HTMLDivElement;
|
|
14
|
+
let tooltip: HTMLDivElement;
|
|
15
|
+
|
|
16
|
+
function positionTooltip() {
|
|
17
|
+
if (wrap && tooltip && show) {
|
|
18
|
+
const wrapRect = wrap.getBoundingClientRect();
|
|
19
|
+
const tooltipRect = tooltip.getBoundingClientRect();
|
|
20
|
+
|
|
21
|
+
let top, left;
|
|
22
|
+
|
|
23
|
+
if (position === 'top' || position === 'bottom') {
|
|
24
|
+
const topVal = wrapRect.top - tooltipRect.height - 10;
|
|
25
|
+
const leftVal = wrapRect.left + wrapRect.width / 2 - tooltipRect.width / 2;
|
|
26
|
+
|
|
27
|
+
top = position === 'top' ? topVal : wrapRect.bottom + 10;
|
|
28
|
+
left = leftVal;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (position === 'left' || position === 'right') {
|
|
32
|
+
const topVal = wrapRect.top + wrapRect.height / 2 - tooltipRect.height / 2;
|
|
33
|
+
const leftVal = wrapRect.left - tooltipRect.width - 10;
|
|
34
|
+
|
|
35
|
+
top = topVal;
|
|
36
|
+
left = position === 'left' ? leftVal : wrapRect.right + 10;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
tooltip.style.top = top + 'px';
|
|
40
|
+
tooltip.style.left = left + 'px';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function handleMouseEnter() {
|
|
45
|
+
if (!disabled) {
|
|
46
|
+
show = true;
|
|
47
|
+
await tick();
|
|
48
|
+
positionTooltip();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function handleMouseLeave() {
|
|
53
|
+
show = false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
$: {
|
|
57
|
+
if (text) {
|
|
58
|
+
tick().then(() => {
|
|
59
|
+
positionTooltip();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
onMount(() => {
|
|
65
|
+
positionTooltip();
|
|
66
|
+
document.addEventListener('scroll', positionTooltip);
|
|
67
|
+
|
|
68
|
+
return () => {
|
|
69
|
+
document.removeEventListener('scroll', positionTooltip);
|
|
70
|
+
};
|
|
71
|
+
});
|
|
56
72
|
</script>
|
|
57
73
|
|
|
58
|
-
<div
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
<div
|
|
75
|
+
class="tooltip-wrap {color}"
|
|
76
|
+
on:mouseenter={handleMouseEnter}
|
|
77
|
+
on:mouseleave={handleMouseLeave}
|
|
78
|
+
role="tooltip"
|
|
79
|
+
bind:this={wrap}
|
|
80
|
+
{...$$restProps}
|
|
65
81
|
>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
<slot />
|
|
83
|
+
|
|
84
|
+
{#if !disabled && show}
|
|
85
|
+
<div
|
|
86
|
+
class="tooltip {position}"
|
|
87
|
+
style:max-width={maxWidth + 'px'}
|
|
88
|
+
bind:this={tooltip}
|
|
89
|
+
transition:fade={{ duration: 100 }}
|
|
90
|
+
>
|
|
91
|
+
{#if $$slots.tooltip}
|
|
92
|
+
<slot name="tooltip" />
|
|
93
|
+
{:else}
|
|
94
|
+
{text}
|
|
95
|
+
{/if}
|
|
96
|
+
</div>
|
|
97
|
+
{/if}
|
|
82
98
|
</div>
|
|
83
99
|
|
|
84
100
|
<style>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</style>
|
|
101
|
+
.tooltip-wrap {
|
|
102
|
+
display: inline-flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
position: relative;
|
|
105
|
+
|
|
106
|
+
--local-bg: #24292f;
|
|
107
|
+
--local-color: #fff;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.tooltip-wrap.soft {
|
|
111
|
+
--local-bg: var(--accent-light);
|
|
112
|
+
--local-color: var(--accent);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.tooltip-wrap.accent {
|
|
116
|
+
--local-bg: var(--accent);
|
|
117
|
+
--local-color: var(--accent-text);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.tooltip-wrap.danger {
|
|
121
|
+
--local-bg: var(--red-dark);
|
|
122
|
+
--local-color: var(--text-white);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.tooltip {
|
|
126
|
+
position: fixed;
|
|
127
|
+
background-color: var(--local-bg);
|
|
128
|
+
color: var(--local-color);
|
|
129
|
+
padding: 8px 20px;
|
|
130
|
+
border-radius: 20px;
|
|
131
|
+
font-size: 14px;
|
|
132
|
+
z-index: 10000;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.tooltip:after {
|
|
136
|
+
content: '';
|
|
137
|
+
position: absolute;
|
|
138
|
+
border: 4px solid transparent;
|
|
139
|
+
}
|
|
140
|
+
.tooltip.top:after {
|
|
141
|
+
top: 100%;
|
|
142
|
+
border-top-color: var(--local-bg);
|
|
143
|
+
left: 50%;
|
|
144
|
+
transform: translateX(-50%);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.tooltip.bottom:after {
|
|
148
|
+
bottom: 100%;
|
|
149
|
+
border-bottom-color: var(--local-bg);
|
|
150
|
+
left: 50%;
|
|
151
|
+
transform: translateX(-50%);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.tooltip.left:after {
|
|
155
|
+
left: 100%;
|
|
156
|
+
top: 50%;
|
|
157
|
+
transform: translateY(-50%);
|
|
158
|
+
border-left-color: var(--local-bg);
|
|
159
|
+
margin-left: -1px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.tooltip.right:after {
|
|
163
|
+
right: 100%;
|
|
164
|
+
top: 50%;
|
|
165
|
+
transform: translateY(-50%);
|
|
166
|
+
border-right-color: var(--local-bg);
|
|
167
|
+
margin-right: -1px;
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {
|
|
16
|
-
default: {};
|
|
17
|
-
tooltip: {};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export type TooltipProps = typeof __propDef.props;
|
|
21
|
-
export type TooltipEvents = typeof __propDef.events;
|
|
22
|
-
export type TooltipSlots = typeof __propDef.slots;
|
|
23
|
-
export default class Tooltip extends SvelteComponent<TooltipProps, TooltipEvents, TooltipSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
24
13
|
}
|
|
25
|
-
|
|
14
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
+
default: any;
|
|
16
|
+
} ? Props extends Record<string, never> ? any : {
|
|
17
|
+
children?: any;
|
|
18
|
+
} : {});
|
|
19
|
+
declare const Tooltip: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
text?: string | undefined;
|
|
22
|
+
position?: ("top" | "bottom" | "left" | "right") | undefined;
|
|
23
|
+
color?: ("black" | "accent" | "soft" | "danger") | undefined;
|
|
24
|
+
show?: boolean | undefined;
|
|
25
|
+
maxWidth?: number | undefined;
|
|
26
|
+
disabled?: boolean | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
default: {};
|
|
29
|
+
tooltip: {};
|
|
30
|
+
}>, {
|
|
31
|
+
[evt: string]: CustomEvent<any>;
|
|
32
|
+
}, {
|
|
33
|
+
default: {};
|
|
34
|
+
tooltip: {};
|
|
35
|
+
}, {}, string>;
|
|
36
|
+
type Tooltip = InstanceType<typeof Tooltip>;
|
|
37
|
+
export default Tooltip;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function clickOutside(node, input) {
|
|
2
|
-
const options =
|
|
2
|
+
const options = typeof input === 'function' ? { callback: input } : input;
|
|
3
3
|
const enabled = options.enabled === undefined ? true : options.enabled;
|
|
4
4
|
if (!enabled)
|
|
5
5
|
return;
|
|
@@ -11,11 +11,11 @@ export function clickOutside(node, input) {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
setTimeout(() => {
|
|
14
|
-
document.addEventListener(
|
|
14
|
+
document.addEventListener('click', handleClick);
|
|
15
15
|
}, 0);
|
|
16
16
|
return {
|
|
17
17
|
destroy() {
|
|
18
|
-
document.removeEventListener(
|
|
19
|
-
}
|
|
18
|
+
document.removeEventListener('click', handleClick);
|
|
19
|
+
}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function debounce(func: Function, wait: number): (this: any, ...args: any[]) => void;
|
|
@@ -19,6 +19,7 @@ export { default as FormControl } from './FormControl/FormControl.svelte';
|
|
|
19
19
|
export { default as InputGroup } from './FormControl/InputGroup.svelte';
|
|
20
20
|
export { default as Label } from './FormControl/Label.svelte';
|
|
21
21
|
export { default as Validation } from './FormControl/Validation.svelte';
|
|
22
|
+
export { default as HyvorBar } from './HyvorBar/HyvorBar.svelte';
|
|
22
23
|
export { default as IconButton } from './IconButton/IconButton.svelte';
|
|
23
24
|
export { default as Link } from './Link/Link.svelte';
|
|
24
25
|
export { default as Loader } from './Loader/Loader.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export { default as FormControl } from './FormControl/FormControl.svelte';
|
|
|
19
19
|
export { default as InputGroup } from './FormControl/InputGroup.svelte';
|
|
20
20
|
export { default as Label } from './FormControl/Label.svelte';
|
|
21
21
|
export { default as Validation } from './FormControl/Validation.svelte';
|
|
22
|
+
export { default as HyvorBar } from './HyvorBar/HyvorBar.svelte';
|
|
22
23
|
export { default as IconButton } from './IconButton/IconButton.svelte';
|
|
23
24
|
export { default as Link } from './Link/Link.svelte';
|
|
24
25
|
export { default as Loader } from './Loader/Loader.svelte';
|
package/dist/index.css
CHANGED
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
|
|
2
1
|
/* font */
|
|
3
2
|
:root {
|
|
4
|
-
|
|
3
|
+
font-family: 'Readex Pro', Avenir, Inter, Helvetica, Arial, sans-serif;
|
|
5
4
|
font-size: 16px;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
text-rendering: optimizeLegibility;
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9
|
+
-webkit-text-size-adjust: 100%;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
body {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
background-color: var(--background, var(--accent-lightest));
|
|
14
|
+
color: var(--text);
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
button,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
button,
|
|
20
|
+
a {
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
border: none;
|
|
23
|
+
color: inherit;
|
|
24
|
+
appearance: none;
|
|
25
|
+
padding: 0;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-family: inherit;
|
|
29
|
+
font-size: inherit;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:focus-visible {
|
|
33
|
-
|
|
33
|
+
outline: 2px solid var(--accent-light);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
36
|
* {
|
|
38
|
-
|
|
37
|
+
box-sizing: border-box;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
|
|
42
40
|
.hds-box {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
box-shadow: var(--box-shadow);
|
|
42
|
+
border-radius: var(--box-radius);
|
|
43
|
+
background-color: var(--box-background);
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
.hds-container {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
47
|
+
width: 1000px;
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
padding: 0 15px;
|
|
50
|
+
margin: auto;
|
|
51
|
+
}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
as?: string;
|
|
4
|
+
children?: import('svelte').Snippet;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
let { as = 'div', children }: Props = $props();
|
|
2
8
|
</script>
|
|
3
9
|
|
|
4
10
|
<svelte:element this={as} class="container">
|
|
5
|
-
|
|
11
|
+
{@render children?.()}
|
|
6
12
|
</svelte:element>
|
|
7
13
|
|
|
8
14
|
<style>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</style>
|
|
15
|
+
.container {
|
|
16
|
+
width: 1000px;
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
padding: 0 15px;
|
|
19
|
+
margin: auto;
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {
|
|
10
|
-
default: {};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export type ContainerProps = typeof __propDef.props;
|
|
14
|
-
export type ContainerEvents = typeof __propDef.events;
|
|
15
|
-
export type ContainerSlots = typeof __propDef.slots;
|
|
16
|
-
export default class Container extends SvelteComponent<ContainerProps, ContainerEvents, ContainerSlots> {
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
declare const Container: import("svelte").Component<{
|
|
2
|
+
as?: string;
|
|
3
|
+
children?: import("svelte").Snippet;
|
|
4
|
+
}, {}, "">;
|
|
5
|
+
type Container = ReturnType<typeof Container>;
|
|
6
|
+
export default Container;
|