@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,14 +1,27 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { run } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
import { setContext } from 'svelte';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
selection?: 'none' | 'single' | 'multi';
|
|
8
|
+
selectionAlign?: 'start' | 'end';
|
|
9
|
+
children?: import('svelte').Snippet;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { selection = 'none', selectionAlign = 'start', children, ...rest }: Props = $props();
|
|
14
|
+
|
|
15
|
+
run(() => {
|
|
16
|
+
setContext('action-list-selection', selection);
|
|
17
|
+
});
|
|
18
|
+
run(() => {
|
|
19
|
+
setContext('action-list-selection-align', selectionAlign);
|
|
20
|
+
});
|
|
8
21
|
</script>
|
|
9
22
|
|
|
10
|
-
<div class="action-list" {
|
|
11
|
-
|
|
23
|
+
<div class="action-list" {...rest}>
|
|
24
|
+
{@render children?.()}
|
|
12
25
|
</div>
|
|
13
26
|
|
|
14
27
|
<style></style>
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {
|
|
12
|
-
default: {};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type ActionListProps = typeof __propDef.props;
|
|
16
|
-
export type ActionListEvents = typeof __propDef.events;
|
|
17
|
-
export type ActionListSlots = typeof __propDef.slots;
|
|
18
|
-
export default class ActionList extends SvelteComponent<ActionListProps, ActionListEvents, ActionListSlots> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
declare const ActionList: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
selection?: "none" | "single" | "multi";
|
|
4
|
+
selectionAlign?: "start" | "end";
|
|
5
|
+
children?: import("svelte").Snippet;
|
|
6
|
+
}, {}, "">;
|
|
7
|
+
type ActionList = ReturnType<typeof ActionList>;
|
|
8
|
+
export default ActionList;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { run } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
import { setContext } from 'svelte';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
divider?: boolean;
|
|
9
|
+
selection?: undefined | 'single' | 'multi';
|
|
10
|
+
children?: import('svelte').Snippet;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { title = undefined, divider = false, selection = undefined, children }: Props = $props();
|
|
14
|
+
|
|
15
|
+
run(() => {
|
|
16
|
+
if (selection !== undefined) setContext('action-list-selection', selection);
|
|
17
|
+
});
|
|
8
18
|
</script>
|
|
9
19
|
|
|
10
20
|
<div class="action-list-group" class:has-divider={divider}>
|
|
@@ -16,7 +26,7 @@ $:
|
|
|
16
26
|
<div class="title">{title}</div>
|
|
17
27
|
{/if}
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
{@render children?.()}
|
|
20
30
|
</div>
|
|
21
31
|
|
|
22
32
|
<style>
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {
|
|
12
|
-
default: {};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type ActionListGroupProps = typeof __propDef.props;
|
|
16
|
-
export type ActionListGroupEvents = typeof __propDef.events;
|
|
17
|
-
export type ActionListGroupSlots = typeof __propDef.slots;
|
|
18
|
-
export default class ActionListGroup extends SvelteComponent<ActionListGroupProps, ActionListGroupEvents, ActionListGroupSlots> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
declare const ActionListGroup: import("svelte").Component<{
|
|
2
|
+
title?: string | undefined;
|
|
3
|
+
divider?: boolean;
|
|
4
|
+
selection?: undefined | "single" | "multi";
|
|
5
|
+
children?: import("svelte").Snippet;
|
|
6
|
+
}, {}, "">;
|
|
7
|
+
type ActionListGroup = ReturnType<typeof ActionListGroup>;
|
|
8
|
+
export default ActionListGroup;
|
|
@@ -1,57 +1,81 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler, handlers } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
import { getContext, createEventDispatcher } from 'svelte';
|
|
6
|
+
import Selected from './Selected.svelte';
|
|
7
|
+
|
|
8
|
+
const selection: 'none' | 'single' | 'multi' = getContext('action-list-selection');
|
|
9
|
+
const selectionAlign: 'start' | 'end' = getContext('action-list-selection-align');
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
type?: 'default' | 'danger';
|
|
15
|
+
start?: import('svelte').Snippet;
|
|
16
|
+
children?: import('svelte').Snippet;
|
|
17
|
+
description?: import('svelte').Snippet;
|
|
18
|
+
end?: import('svelte').Snippet;
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let {
|
|
23
|
+
selected = $bindable(false),
|
|
24
|
+
disabled = false,
|
|
25
|
+
type = 'default',
|
|
26
|
+
start,
|
|
27
|
+
children,
|
|
28
|
+
description,
|
|
29
|
+
end,
|
|
30
|
+
...rest
|
|
31
|
+
}: Props = $props();
|
|
32
|
+
|
|
33
|
+
selected = selection !== 'none' && selected;
|
|
34
|
+
|
|
35
|
+
const dispatch = createEventDispatcher();
|
|
36
|
+
|
|
37
|
+
function handleClick() {
|
|
38
|
+
dispatch('select');
|
|
39
|
+
}
|
|
15
40
|
</script>
|
|
16
41
|
|
|
17
42
|
<div
|
|
18
43
|
class="action-list-item"
|
|
19
44
|
class:disabled
|
|
20
45
|
class:danger={type === 'danger'}
|
|
21
|
-
|
|
46
|
+
onclick={handlers(handleClick, bubble('click'))}
|
|
22
47
|
role="button"
|
|
23
48
|
tabindex="0"
|
|
24
|
-
|
|
49
|
+
onkeyup={(e) => {
|
|
25
50
|
if (e.key === 'Enter') {
|
|
26
51
|
handleClick();
|
|
27
52
|
}
|
|
28
53
|
}}
|
|
29
|
-
{
|
|
30
|
-
on:click
|
|
54
|
+
{...rest}
|
|
31
55
|
>
|
|
32
56
|
{#if selectionAlign === 'start'}
|
|
33
57
|
<Selected {selection} bind:selected />
|
|
34
58
|
{/if}
|
|
35
59
|
|
|
36
|
-
{#if
|
|
60
|
+
{#if start}
|
|
37
61
|
<span class="start">
|
|
38
|
-
|
|
62
|
+
{@render start?.()}
|
|
39
63
|
</span>
|
|
40
64
|
{/if}
|
|
41
65
|
|
|
42
66
|
<span class="middle">
|
|
43
|
-
|
|
67
|
+
{@render children?.()}
|
|
44
68
|
|
|
45
|
-
{#if
|
|
69
|
+
{#if description}
|
|
46
70
|
<div class="description">
|
|
47
|
-
|
|
71
|
+
{@render description?.()}
|
|
48
72
|
</div>
|
|
49
73
|
{/if}
|
|
50
74
|
</span>
|
|
51
75
|
|
|
52
|
-
{#if
|
|
76
|
+
{#if end}
|
|
53
77
|
<span class="end">
|
|
54
|
-
|
|
78
|
+
{@render end?.()}
|
|
55
79
|
</span>
|
|
56
80
|
{/if}
|
|
57
81
|
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
|
8
11
|
};
|
|
9
|
-
|
|
10
|
-
click: MouseEvent;
|
|
11
|
-
select: CustomEvent<any>;
|
|
12
|
-
} & {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {
|
|
16
|
-
start: {};
|
|
17
|
-
default: {};
|
|
18
|
-
description: {};
|
|
19
|
-
end: {};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export type ActionListItemProps = typeof __propDef.props;
|
|
23
|
-
export type ActionListItemEvents = typeof __propDef.events;
|
|
24
|
-
export type ActionListItemSlots = typeof __propDef.slots;
|
|
25
|
-
export default class ActionListItem extends SvelteComponent<ActionListItemProps, ActionListItemEvents, ActionListItemSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
27
|
-
|
|
14
|
+
declare const ActionListItem: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
type?: "default" | "danger";
|
|
19
|
+
start?: import("svelte").Snippet;
|
|
20
|
+
children?: import("svelte").Snippet;
|
|
21
|
+
description?: import("svelte").Snippet;
|
|
22
|
+
end?: import("svelte").Snippet;
|
|
23
|
+
}, {
|
|
24
|
+
select: CustomEvent<any>;
|
|
25
|
+
} & {
|
|
26
|
+
[evt: string]: CustomEvent<any>;
|
|
27
|
+
}, {}, {}, "selected">;
|
|
28
|
+
type ActionListItem = InstanceType<typeof ActionListItem>;
|
|
29
|
+
export default ActionListItem;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Checkbox from '../Checkbox/Checkbox.svelte';
|
|
3
|
+
import { IconCheck } from '@hyvor/icons';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
selection: 'none' | 'single' | 'multi';
|
|
7
|
+
selected: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { selection, selected = $bindable(false) }: Props = $props();
|
|
5
11
|
</script>
|
|
6
12
|
|
|
7
13
|
{#if selection !== 'none'}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
};
|
|
12
|
-
export type SelectedProps = typeof __propDef.props;
|
|
13
|
-
export type SelectedEvents = typeof __propDef.events;
|
|
14
|
-
export type SelectedSlots = typeof __propDef.slots;
|
|
15
|
-
export default class Selected extends SvelteComponent<SelectedProps, SelectedEvents, SelectedSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
1
|
+
declare const Selected: import("svelte").Component<{
|
|
2
|
+
selection: "none" | "single" | "multi";
|
|
3
|
+
selected: boolean;
|
|
4
|
+
}, {}, "selected">;
|
|
5
|
+
type Selected = ReturnType<typeof Selected>;
|
|
6
|
+
export default Selected;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
size =
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
size?: number | 'small' | 'medium' | 'large';
|
|
4
|
+
alt?: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let { size = $bindable('medium'), alt = '', ...rest }: Props = $props();
|
|
9
|
+
|
|
10
|
+
const sizes = {
|
|
11
|
+
small: 24,
|
|
12
|
+
medium: 32,
|
|
13
|
+
large: 48
|
|
14
|
+
};
|
|
15
|
+
size = typeof size === 'number' ? size : sizes[size];
|
|
9
16
|
</script>
|
|
10
17
|
|
|
11
|
-
<img {alt} {
|
|
18
|
+
<img {alt} {...rest} style={`width: ${size}px; height: ${size}px;`} />
|
|
12
19
|
|
|
13
20
|
<style>
|
|
14
21
|
img {
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
};
|
|
13
|
-
export type AvatarProps = typeof __propDef.props;
|
|
14
|
-
export type AvatarEvents = typeof __propDef.events;
|
|
15
|
-
export type AvatarSlots = typeof __propDef.slots;
|
|
16
|
-
export default class Avatar extends SvelteComponent<AvatarProps, AvatarEvents, AvatarSlots> {
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
declare const Avatar: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
size?: number | "small" | "medium" | "large";
|
|
4
|
+
alt?: string;
|
|
5
|
+
}, {}, "size">;
|
|
6
|
+
type Avatar = ReturnType<typeof Avatar>;
|
|
7
|
+
export default Avatar;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
size =
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
size?: number | 'small' | 'medium' | 'large';
|
|
4
|
+
children?: import('svelte').Snippet;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
let { size = $bindable('medium'), children }: Props = $props();
|
|
8
|
+
const sizes = {
|
|
9
|
+
small: 24,
|
|
10
|
+
medium: 32,
|
|
11
|
+
large: 48
|
|
12
|
+
};
|
|
13
|
+
size = typeof size === 'number' ? size : sizes[size];
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<div class="stack" style:--local-size={size + 'px'}>
|
|
11
|
-
|
|
17
|
+
{@render children?.()}
|
|
12
18
|
</div>
|
|
13
19
|
|
|
14
20
|
<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 AvatarStackProps = typeof __propDef.props;
|
|
14
|
-
export type AvatarStackEvents = typeof __propDef.events;
|
|
15
|
-
export type AvatarStackSlots = typeof __propDef.slots;
|
|
16
|
-
export default class AvatarStack extends SvelteComponent<AvatarStackProps, AvatarStackEvents, AvatarStackSlots> {
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
declare const AvatarStack: import("svelte").Component<{
|
|
2
|
+
size?: number | "small" | "medium" | "large";
|
|
3
|
+
children?: import("svelte").Snippet;
|
|
4
|
+
}, {}, "size">;
|
|
5
|
+
type AvatarStack = ReturnType<typeof AvatarStack>;
|
|
6
|
+
export default AvatarStack;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ConfirmModalProvider from './../Modal/ConfirmModalProvider.svelte';
|
|
3
|
+
// import InternationalizationProvider from './../Internationalization/InternationalizationProvider.svelte';
|
|
4
|
+
import DarkProvider from './../Dark/DarkProvider.svelte';
|
|
5
|
+
import '../../index.js';
|
|
6
|
+
import ToastProvider from '../Toast/ToastProvider.svelte';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
dark?: boolean;
|
|
10
|
+
children?: import('svelte').Snippet;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { dark = false, children }: Props = $props();
|
|
6
14
|
</script>
|
|
7
15
|
|
|
8
16
|
<div id="base">
|
|
9
|
-
|
|
17
|
+
{@render children?.()}
|
|
10
18
|
</div>
|
|
11
19
|
|
|
12
20
|
{#if dark}
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import '../../index.js';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
slots: {
|
|
11
|
-
default: {};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type BaseProps = typeof __propDef.props;
|
|
15
|
-
export type BaseEvents = typeof __propDef.events;
|
|
16
|
-
export type BaseSlots = typeof __propDef.slots;
|
|
17
|
-
export default class Base extends SvelteComponent<BaseProps, BaseEvents, BaseSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
2
|
+
declare const Base: import("svelte").Component<{
|
|
3
|
+
dark?: boolean;
|
|
4
|
+
children?: import("svelte").Snippet;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type Base = ReturnType<typeof Base>;
|
|
7
|
+
export default Base;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
as?: string;
|
|
4
|
+
children?: import('svelte').Snippet;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let { as = 'div', children, ...rest }: Props = $props();
|
|
2
9
|
</script>
|
|
3
10
|
|
|
4
11
|
<svelte:element
|
|
@@ -6,7 +13,7 @@
|
|
|
6
13
|
style:box-shadow="var(--box-shadow)"
|
|
7
14
|
style:border-radius="var(--box-radius)"
|
|
8
15
|
style:background-color="var(--box-background)"
|
|
9
|
-
{
|
|
16
|
+
{...rest}
|
|
10
17
|
>
|
|
11
|
-
|
|
18
|
+
{@render children?.()}
|
|
12
19
|
</svelte:element>
|
|
@@ -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 BoxProps = typeof __propDef.props;
|
|
15
|
-
export type BoxEvents = typeof __propDef.events;
|
|
16
|
-
export type BoxSlots = typeof __propDef.slots;
|
|
17
|
-
export default class Box extends SvelteComponent<BoxProps, BoxEvents, BoxSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
declare const Box: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
as?: string;
|
|
4
|
+
children?: import("svelte").Snippet;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type Box = ReturnType<typeof Box>;
|
|
7
|
+
export default Box;
|
|
@@ -1,46 +1,73 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
as?: 'button' | 'a';
|
|
8
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
9
|
+
color?: 'accent' | 'gray' | 'green' | 'red' | 'blue' | 'orange' | 'input';
|
|
10
|
+
block?: boolean;
|
|
11
|
+
variant?: 'fill' | 'fill-light' | 'outline' | 'invisible' | 'outline-fill';
|
|
12
|
+
align?: 'start' | 'center';
|
|
13
|
+
button?: any;
|
|
14
|
+
start?: import('svelte').Snippet;
|
|
15
|
+
children?: import('svelte').Snippet;
|
|
16
|
+
end?: import('svelte').Snippet;
|
|
17
|
+
action?: import('svelte').Snippet;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let {
|
|
22
|
+
as = 'button',
|
|
23
|
+
size = 'medium',
|
|
24
|
+
color = 'accent',
|
|
25
|
+
block = false,
|
|
26
|
+
variant = 'fill',
|
|
27
|
+
align = 'center',
|
|
28
|
+
button = $bindable({} as HTMLButtonElement | HTMLAnchorElement),
|
|
29
|
+
start,
|
|
30
|
+
children,
|
|
31
|
+
end,
|
|
32
|
+
action,
|
|
33
|
+
...rest
|
|
34
|
+
}: Props = $props();
|
|
8
35
|
</script>
|
|
9
36
|
|
|
10
37
|
<svelte:element
|
|
11
38
|
this={as}
|
|
12
39
|
class="button {size} {color} {variant} {align}"
|
|
13
40
|
class:block
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
41
|
+
onkeyup={bubble('keyup')}
|
|
42
|
+
onkeydown={bubble('keydown')}
|
|
43
|
+
onkeypress={bubble('keypress')}
|
|
44
|
+
onfocus={bubble('focus')}
|
|
45
|
+
onblur={bubble('blur')}
|
|
46
|
+
onclick={bubble('click')}
|
|
47
|
+
onmouseover={bubble('mouseover')}
|
|
48
|
+
onmouseenter={bubble('mouseenter')}
|
|
49
|
+
onmouseleave={bubble('mouseleave')}
|
|
50
|
+
onchange={bubble('change')}
|
|
24
51
|
role="button"
|
|
25
52
|
tabindex="0"
|
|
26
53
|
bind:this={button}
|
|
27
|
-
{
|
|
54
|
+
{...rest}
|
|
28
55
|
>
|
|
29
56
|
<span class="button-content">
|
|
30
|
-
{#if
|
|
31
|
-
<span class="slot start"
|
|
57
|
+
{#if start}
|
|
58
|
+
<span class="slot start">{@render start?.()}</span>
|
|
32
59
|
{/if}
|
|
33
60
|
|
|
34
|
-
|
|
61
|
+
{@render children?.()}
|
|
35
62
|
|
|
36
|
-
{#if
|
|
37
|
-
<span class="slot end"
|
|
63
|
+
{#if end}
|
|
64
|
+
<span class="slot end">{@render end?.()}</span>
|
|
38
65
|
{/if}
|
|
39
66
|
</span>
|
|
40
67
|
|
|
41
|
-
{#if
|
|
68
|
+
{#if action}
|
|
42
69
|
<span class="action">
|
|
43
|
-
|
|
70
|
+
{@render action?.()}
|
|
44
71
|
</span>
|
|
45
72
|
{/if}
|
|
46
73
|
</svelte:element>
|