@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,57 +1,52 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export let column = false;
|
|
6
|
-
export let flex = [1, 2];
|
|
7
|
-
</script>
|
|
8
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import Caption from '../FormControl/Caption.svelte';
|
|
4
|
+
import Label from '../FormControl/Label.svelte';
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
interface Props {
|
|
7
|
+
label?: string | Snippet;
|
|
8
|
+
caption?: string | Snippet;
|
|
9
|
+
column?: boolean;
|
|
10
|
+
flex?: number[];
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
nested?: Snippet;
|
|
13
|
+
}
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
style:flex={flex[0]}
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
-
<div class="label-wrap">
|
|
22
|
-
{#if $$slots.label}
|
|
23
|
-
<slot name="label" />
|
|
24
|
-
{:else}
|
|
25
|
-
<Label>{label}</Label>
|
|
26
|
-
{/if}
|
|
27
|
-
</div>
|
|
15
|
+
const { label, caption, column = false, flex = [1, 2], children, nested }: Props = $props();
|
|
16
|
+
</script>
|
|
28
17
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</div>
|
|
18
|
+
<div class="split-control" class:has-nested={!!nested} class:column>
|
|
19
|
+
<div class="left" style:flex={flex[0]}>
|
|
20
|
+
<div class="label-wrap">
|
|
21
|
+
{#if typeof label === 'string'}
|
|
22
|
+
<Label>{label}</Label>
|
|
23
|
+
{:else}
|
|
24
|
+
{@render label?.()}
|
|
25
|
+
{/if}
|
|
26
|
+
</div>
|
|
39
27
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
{#if caption}
|
|
29
|
+
<div class="caption-wrap">
|
|
30
|
+
{#if typeof caption === 'string'}
|
|
31
|
+
<Caption>{caption}</Caption>
|
|
32
|
+
{:else}
|
|
33
|
+
{@render caption()}
|
|
34
|
+
{/if}
|
|
35
|
+
</div>
|
|
36
|
+
{/if}
|
|
37
|
+
</div>
|
|
48
38
|
|
|
39
|
+
{#if children}
|
|
40
|
+
<div class="right" style:flex={flex[1]}>
|
|
41
|
+
{@render children()}
|
|
42
|
+
</div>
|
|
43
|
+
{/if}
|
|
49
44
|
</div>
|
|
50
45
|
|
|
51
|
-
{#if
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
{#if nested}
|
|
47
|
+
<div class="nested">
|
|
48
|
+
{@render nested()}
|
|
49
|
+
</div>
|
|
55
50
|
{/if}
|
|
56
51
|
|
|
57
52
|
<style>.split-control {
|
|
@@ -89,4 +84,4 @@ export let flex = [1, 2];
|
|
|
89
84
|
|
|
90
85
|
.caption-wrap {
|
|
91
86
|
margin-top: 4px;
|
|
92
|
-
}</style>
|
|
87
|
+
}</style>
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
slots: {
|
|
13
|
-
label: {};
|
|
14
|
-
caption: {};
|
|
15
|
-
default: {};
|
|
16
|
-
nested: {};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export type SplitControlProps = typeof __propDef.props;
|
|
20
|
-
export type SplitControlEvents = typeof __propDef.events;
|
|
21
|
-
export type SplitControlSlots = typeof __propDef.slots;
|
|
22
|
-
export default class SplitControl extends SvelteComponent<SplitControlProps, SplitControlEvents, SplitControlSlots> {
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
declare const SplitControl: import("svelte").Component<{
|
|
3
|
+
label?: string | Snippet;
|
|
4
|
+
caption?: string | Snippet;
|
|
5
|
+
column?: boolean;
|
|
6
|
+
flex?: number[];
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
nested?: Snippet;
|
|
9
|
+
}, {}, "">;
|
|
10
|
+
type SplitControl = ReturnType<typeof SplitControl>;
|
|
11
|
+
export default SplitControl;
|
|
@@ -1,62 +1,72 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
interface Props {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
input?: any;
|
|
8
|
+
children?: import('svelte').Snippet;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
checked = $bindable(false),
|
|
14
|
+
input = $bindable({} as HTMLInputElement),
|
|
15
|
+
children,
|
|
16
|
+
...rest
|
|
17
|
+
}: Props = $props();
|
|
3
18
|
</script>
|
|
4
19
|
|
|
5
20
|
<label class="switch-wrap">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<slot />
|
|
31
|
-
</span>
|
|
32
|
-
{/if}
|
|
21
|
+
<span class="switch">
|
|
22
|
+
<input
|
|
23
|
+
type="checkbox"
|
|
24
|
+
bind:checked
|
|
25
|
+
bind:this={input}
|
|
26
|
+
{...rest}
|
|
27
|
+
onkeyup={bubble('keyup')}
|
|
28
|
+
onkeydown={bubble('keydown')}
|
|
29
|
+
onkeypress={bubble('keypress')}
|
|
30
|
+
onfocus={bubble('focus')}
|
|
31
|
+
onblur={bubble('blur')}
|
|
32
|
+
onclick={bubble('click')}
|
|
33
|
+
onmouseover={bubble('mouseover')}
|
|
34
|
+
onmouseenter={bubble('mouseenter')}
|
|
35
|
+
onmouseleave={bubble('mouseleave')}
|
|
36
|
+
onchange={bubble('change')}
|
|
37
|
+
/>
|
|
38
|
+
<span class="slider"></span>
|
|
39
|
+
</span>
|
|
40
|
+
{#if children}
|
|
41
|
+
<span class="message">
|
|
42
|
+
{@render children?.()}
|
|
43
|
+
</span>
|
|
44
|
+
{/if}
|
|
33
45
|
</label>
|
|
34
46
|
|
|
35
47
|
<style>
|
|
48
|
+
.switch-wrap {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
36
53
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
}
|
|
54
|
+
.message {
|
|
55
|
+
margin-left: 8px;
|
|
56
|
+
}
|
|
42
57
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
58
|
+
.switch {
|
|
59
|
+
position: relative;
|
|
60
|
+
display: inline-block;
|
|
61
|
+
width: 40px;
|
|
62
|
+
height: 24px;
|
|
63
|
+
vertical-align: middle;
|
|
64
|
+
}
|
|
46
65
|
|
|
47
|
-
.switch {
|
|
48
|
-
position: relative;
|
|
49
|
-
display: inline-block;
|
|
50
|
-
width:40px;
|
|
51
|
-
height:24px;
|
|
52
|
-
vertical-align: middle;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
66
|
input {
|
|
56
|
-
|
|
67
|
+
opacity: 0;
|
|
57
68
|
}
|
|
58
69
|
|
|
59
|
-
|
|
60
70
|
.slider {
|
|
61
71
|
position: absolute;
|
|
62
72
|
cursor: pointer;
|
|
@@ -65,41 +75,41 @@ export let input = {};
|
|
|
65
75
|
right: 0;
|
|
66
76
|
bottom: 0;
|
|
67
77
|
background-color: var(--input);
|
|
68
|
-
transition: .2s;
|
|
78
|
+
transition: 0.2s;
|
|
69
79
|
border-radius: 30px;
|
|
70
80
|
}
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
.slider:hover {
|
|
83
|
+
box-shadow: 0 0 0 2px var(--accent-light);
|
|
84
|
+
}
|
|
85
|
+
|
|
76
86
|
.slider:before {
|
|
77
87
|
position: absolute;
|
|
78
|
-
content:
|
|
88
|
+
content: '';
|
|
79
89
|
border-radius: 50%;
|
|
80
90
|
background-color: var(--accent-text);
|
|
81
|
-
transition: .1s;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
transition: 0.1s;
|
|
92
|
+
width: 18px;
|
|
93
|
+
height: 18px;
|
|
94
|
+
left: 3px;
|
|
95
|
+
top: 3px;
|
|
96
|
+
bottom: 3px;
|
|
87
97
|
}
|
|
88
|
-
|
|
98
|
+
|
|
89
99
|
input:checked + .slider {
|
|
90
100
|
background-color: var(--accent);
|
|
91
101
|
}
|
|
92
|
-
|
|
102
|
+
|
|
93
103
|
input:focus-visible + .slider {
|
|
94
104
|
box-shadow: 0 0 0 3px var(--accent-light);
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
.switch:active .slider,
|
|
108
|
+
input:active + .slider {
|
|
109
|
+
box-shadow: 0 0 0 3px var(--accent-light);
|
|
110
|
+
}
|
|
111
|
+
|
|
101
112
|
input:checked + .slider:before {
|
|
102
113
|
transform: translateX(16px);
|
|
103
114
|
}
|
|
104
|
-
|
|
105
|
-
</style>
|
|
115
|
+
</style>
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
keyup: KeyboardEvent;
|
|
10
|
-
keydown: KeyboardEvent;
|
|
11
|
-
keypress: KeyboardEvent;
|
|
12
|
-
focus: FocusEvent;
|
|
13
|
-
blur: FocusEvent;
|
|
14
|
-
click: MouseEvent;
|
|
15
|
-
mouseover: MouseEvent;
|
|
16
|
-
mouseenter: MouseEvent;
|
|
17
|
-
mouseleave: MouseEvent;
|
|
18
|
-
change: Event;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
};
|
|
22
|
-
slots: {
|
|
23
|
-
default: {};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export type SwitchProps = typeof __propDef.props;
|
|
27
|
-
export type SwitchEvents = typeof __propDef.events;
|
|
28
|
-
export type SwitchSlots = typeof __propDef.slots;
|
|
29
|
-
export default class Switch extends SvelteComponent<SwitchProps, SwitchEvents, SwitchSlots> {
|
|
30
|
-
}
|
|
31
|
-
export {};
|
|
1
|
+
declare const Switch: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
input?: any;
|
|
5
|
+
children?: import("svelte").Snippet;
|
|
6
|
+
}, {}, "checked" | "input">;
|
|
7
|
+
type Switch = ReturnType<typeof Switch>;
|
|
8
|
+
export default Switch;
|
|
@@ -1,28 +1,38 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { run } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
import { onMount, setContext } from 'svelte';
|
|
5
|
+
import { writable } from 'svelte/store';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
active: string;
|
|
9
|
+
children?: import('svelte').Snippet;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { active = $bindable(), children, ...rest }: Props = $props();
|
|
14
|
+
|
|
15
|
+
const activeStore = writable(active);
|
|
16
|
+
setContext('tab-nav-active', activeStore);
|
|
17
|
+
|
|
18
|
+
$effect(() => {
|
|
19
|
+
activeStore.set(active);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
onMount(() => {
|
|
23
|
+
const unsubscribe = activeStore.subscribe((value) => {
|
|
24
|
+
active = value;
|
|
25
|
+
});
|
|
26
|
+
return unsubscribe;
|
|
27
|
+
});
|
|
14
28
|
</script>
|
|
15
29
|
|
|
16
|
-
<div
|
|
17
|
-
|
|
18
|
-
{...$$restProps}
|
|
19
|
-
>
|
|
20
|
-
<slot />
|
|
30
|
+
<div class="tab-nav" {...rest}>
|
|
31
|
+
{@render children?.()}
|
|
21
32
|
</div>
|
|
22
33
|
|
|
23
|
-
|
|
24
34
|
<style>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</style>
|
|
35
|
+
div {
|
|
36
|
+
display: flex;
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {
|
|
11
|
-
default: {};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type TabNavProps = typeof __propDef.props;
|
|
15
|
-
export type TabNavEvents = typeof __propDef.events;
|
|
16
|
-
export type TabNavSlots = typeof __propDef.slots;
|
|
17
|
-
export default class TabNav extends SvelteComponent<TabNavProps, TabNavEvents, TabNavSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
declare const TabNav: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
active: string;
|
|
4
|
+
children?: import("svelte").Snippet;
|
|
5
|
+
}, {}, "active">;
|
|
6
|
+
type TabNav = ReturnType<typeof TabNav>;
|
|
7
|
+
export default TabNav;
|
|
@@ -1,57 +1,71 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler, handlers } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
import { getContext } from 'svelte';
|
|
6
|
+
import type { Writable } from 'svelte/store';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
active?: boolean;
|
|
10
|
+
name: string;
|
|
11
|
+
start?: import('svelte').Snippet;
|
|
12
|
+
children?: import('svelte').Snippet;
|
|
13
|
+
end?: import('svelte').Snippet;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { active = false, name, start, children, end, ...rest }: Props = $props();
|
|
11
18
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
const activeStore = getContext('tab-nav-active') as Writable<string>;
|
|
20
|
+
|
|
21
|
+
let isActive = $derived($activeStore === name || active);
|
|
22
|
+
|
|
23
|
+
function handleClick() {
|
|
24
|
+
activeStore.set(name);
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
17
27
|
|
|
18
|
-
|
|
28
|
+
<button
|
|
29
|
+
class="tab"
|
|
30
|
+
class:active={isActive}
|
|
31
|
+
onclick={handlers(handleClick, bubble('click'))}
|
|
32
|
+
{...rest}
|
|
19
33
|
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
{#if start}
|
|
35
|
+
<span class="start">
|
|
36
|
+
{@render start?.()}
|
|
37
|
+
</span>
|
|
38
|
+
{/if}
|
|
39
|
+
{@render children?.()}
|
|
40
|
+
{#if end}
|
|
41
|
+
<span class="end">
|
|
42
|
+
{@render end?.()}
|
|
43
|
+
</span>
|
|
44
|
+
{/if}
|
|
31
45
|
</button>
|
|
32
46
|
|
|
33
47
|
<style>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</style>
|
|
48
|
+
.tab {
|
|
49
|
+
position: relative;
|
|
50
|
+
padding: 10px 15px;
|
|
51
|
+
border-bottom: 3px solid #f1f1f1;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
.tab.active {
|
|
58
|
+
border-bottom-color: var(--accent);
|
|
59
|
+
color: var(--accent);
|
|
60
|
+
}
|
|
61
|
+
.start {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
margin-right: 7px;
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
.end {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
margin-left: 4px;
|
|
69
|
+
align-items: center;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
start: {};
|
|
15
|
-
default: {};
|
|
16
|
-
end: {};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export type TabNavItemProps = typeof __propDef.props;
|
|
20
|
-
export type TabNavItemEvents = typeof __propDef.events;
|
|
21
|
-
export type TabNavItemSlots = typeof __propDef.slots;
|
|
22
|
-
export default class TabNavItem extends SvelteComponent<TabNavItemProps, TabNavItemEvents, TabNavItemSlots> {
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
1
|
+
declare const TabNavItem: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
active?: boolean;
|
|
4
|
+
name: string;
|
|
5
|
+
start?: import("svelte").Snippet;
|
|
6
|
+
children?: import("svelte").Snippet;
|
|
7
|
+
end?: import("svelte").Snippet;
|
|
8
|
+
}, {}, "">;
|
|
9
|
+
type TabNavItem = ReturnType<typeof TabNavItem>;
|
|
10
|
+
export default TabNavItem;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
columns: string;
|
|
4
|
+
hover?: boolean;
|
|
5
|
+
children?: import('svelte').Snippet;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let { columns, hover = false, children }: Props = $props();
|
|
9
|
+
|
|
10
|
+
const hoverCss = hover ? '--local-hover-color: var(--hover);' : '';
|
|
4
11
|
</script>
|
|
5
12
|
|
|
6
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
class="table"
|
|
15
|
+
style="
|
|
7
16
|
--local-columns: {columns};
|
|
8
17
|
{hoverCss}
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
</div>
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {
|
|
11
|
-
default: {};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type TableProps = typeof __propDef.props;
|
|
15
|
-
export type TableEvents = typeof __propDef.events;
|
|
16
|
-
export type TableSlots = typeof __propDef.slots;
|
|
17
|
-
export default class Table extends SvelteComponent<TableProps, TableEvents, TableSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
declare const Table: import("svelte").Component<{
|
|
2
|
+
columns: string;
|
|
3
|
+
hover?: boolean;
|
|
4
|
+
children?: import("svelte").Snippet;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type Table = ReturnType<typeof Table>;
|
|
7
|
+
export default Table;
|