@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,19 +1,27 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
export let selectionAlign = "start";
|
|
4
|
-
$:
|
|
5
|
-
setContext("action-list-selection", selection);
|
|
6
|
-
$:
|
|
7
|
-
setContext("action-list-selection-align", selectionAlign);
|
|
8
|
-
</script>
|
|
9
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { run } from 'svelte/legacy';
|
|
10
3
|
|
|
4
|
+
import { setContext } from 'svelte';
|
|
11
5
|
|
|
6
|
+
interface Props {
|
|
7
|
+
selection?: 'none' | 'single' | 'multi';
|
|
8
|
+
selectionAlign?: 'start' | 'end';
|
|
9
|
+
children?: import('svelte').Snippet;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
<slot />
|
|
15
|
-
</div>
|
|
13
|
+
let { selection = 'none', selectionAlign = 'start', children, ...rest }: Props = $props();
|
|
16
14
|
|
|
15
|
+
run(() => {
|
|
16
|
+
setContext('action-list-selection', selection);
|
|
17
|
+
});
|
|
18
|
+
run(() => {
|
|
19
|
+
setContext('action-list-selection-align', selectionAlign);
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
17
22
|
|
|
23
|
+
<div class="action-list" {...rest}>
|
|
24
|
+
{@render children?.()}
|
|
25
|
+
</div>
|
|
18
26
|
|
|
19
|
-
<style></style>
|
|
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,43 +1,48 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
$:
|
|
6
|
-
if (selection !== void 0)
|
|
7
|
-
setContext("action-list-selection", selection);
|
|
8
|
-
</script>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { run } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
import { setContext } from 'svelte';
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
interface Props {
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
divider?: boolean;
|
|
9
|
+
selection?: undefined | 'single' | 'multi';
|
|
10
|
+
children?: import('svelte').Snippet;
|
|
11
|
+
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
let { title = undefined, divider = false, selection = undefined, children }: Props = $props();
|
|
14
|
+
|
|
15
|
+
run(() => {
|
|
16
|
+
if (selection !== undefined) setContext('action-list-selection', selection);
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
<div class="action-list-group" class:has-divider={divider}>
|
|
21
|
+
{#if divider}
|
|
22
|
+
<div class="divider"></div>
|
|
23
|
+
{/if}
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
{#if title}
|
|
26
|
+
<div class="title">{title}</div>
|
|
27
|
+
{/if}
|
|
24
28
|
|
|
29
|
+
{@render children?.()}
|
|
25
30
|
</div>
|
|
26
31
|
|
|
27
32
|
<style>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</style>
|
|
33
|
+
.divider {
|
|
34
|
+
border-bottom: 2px solid var(--border);
|
|
35
|
+
margin-bottom: 14px;
|
|
36
|
+
}
|
|
37
|
+
.title {
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
text-transform: uppercase;
|
|
41
|
+
color: var(--text-light);
|
|
42
|
+
padding: 0 14px;
|
|
43
|
+
margin-bottom: 6px;
|
|
44
|
+
}
|
|
45
|
+
.action-list-group:not(:first-child) {
|
|
46
|
+
margin-top: 12px;
|
|
47
|
+
}
|
|
48
|
+
</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,119 +1,141 @@
|
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
on:click
|
|
43
|
+
class="action-list-item"
|
|
44
|
+
class:disabled
|
|
45
|
+
class:danger={type === 'danger'}
|
|
46
|
+
onclick={handlers(handleClick, bubble('click'))}
|
|
47
|
+
role="button"
|
|
48
|
+
tabindex="0"
|
|
49
|
+
onkeyup={(e) => {
|
|
50
|
+
if (e.key === 'Enter') {
|
|
51
|
+
handleClick();
|
|
52
|
+
}
|
|
53
|
+
}}
|
|
54
|
+
{...rest}
|
|
32
55
|
>
|
|
56
|
+
{#if selectionAlign === 'start'}
|
|
57
|
+
<Selected {selection} bind:selected />
|
|
58
|
+
{/if}
|
|
33
59
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
60
|
+
{#if start}
|
|
61
|
+
<span class="start">
|
|
62
|
+
{@render start?.()}
|
|
63
|
+
</span>
|
|
64
|
+
{/if}
|
|
37
65
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<slot name="start" />
|
|
41
|
-
</span>
|
|
42
|
-
{/if}
|
|
66
|
+
<span class="middle">
|
|
67
|
+
{@render children?.()}
|
|
43
68
|
|
|
44
|
-
|
|
45
|
-
|
|
69
|
+
{#if description}
|
|
70
|
+
<div class="description">
|
|
71
|
+
{@render description?.()}
|
|
72
|
+
</div>
|
|
73
|
+
{/if}
|
|
74
|
+
</span>
|
|
46
75
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</span>
|
|
53
|
-
|
|
54
|
-
{#if $$slots.end}
|
|
55
|
-
<span class="end">
|
|
56
|
-
<slot name="end" />
|
|
57
|
-
</span>
|
|
58
|
-
{/if}
|
|
59
|
-
|
|
60
|
-
{#if selectionAlign === 'end'}
|
|
61
|
-
<Selected {selection} bind:selected />
|
|
62
|
-
{/if}
|
|
76
|
+
{#if end}
|
|
77
|
+
<span class="end">
|
|
78
|
+
{@render end?.()}
|
|
79
|
+
</span>
|
|
80
|
+
{/if}
|
|
63
81
|
|
|
82
|
+
{#if selectionAlign === 'end'}
|
|
83
|
+
<Selected {selection} bind:selected />
|
|
84
|
+
{/if}
|
|
64
85
|
</div>
|
|
65
86
|
|
|
66
87
|
<style>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
88
|
+
div.action-list-item {
|
|
89
|
+
padding: 6px 14px;
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
border-radius: var(--box-radius);
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
position: relative;
|
|
95
|
+
font-size: 14px;
|
|
96
|
+
}
|
|
97
|
+
div.action-list-item:hover {
|
|
98
|
+
background-color: var(--hover);
|
|
99
|
+
}
|
|
100
|
+
div.action-list-item.danger {
|
|
101
|
+
color: var(--red-dark);
|
|
102
|
+
}
|
|
103
|
+
div.action-list-item.danger:hover {
|
|
104
|
+
background-color: #fffafa;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.start,
|
|
108
|
+
.middle,
|
|
109
|
+
.end {
|
|
110
|
+
display: inline-flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
}
|
|
113
|
+
.start {
|
|
114
|
+
margin-right: 8px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.middle {
|
|
118
|
+
flex: 1;
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
align-items: flex-start;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.end {
|
|
125
|
+
margin-left: 8px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.description {
|
|
129
|
+
font-size: 12px;
|
|
130
|
+
color: var(--text-light);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/*styles for disabled state*/
|
|
134
|
+
div.action-list-item.disabled {
|
|
135
|
+
color: var(--text-light);
|
|
136
|
+
cursor: not-allowed;
|
|
137
|
+
}
|
|
138
|
+
div.action-list-item.disabled:hover {
|
|
139
|
+
background-color: transparent;
|
|
140
|
+
}
|
|
141
|
+
</style>
|
|
@@ -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,30 +1,33 @@
|
|
|
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'}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{/if}
|
|
18
|
-
{/if}
|
|
19
|
-
</span>
|
|
14
|
+
<span class="selected">
|
|
15
|
+
{#if selection === 'multi'}
|
|
16
|
+
<span style="transform:scale(0.9);transform-origin:top">
|
|
17
|
+
<Checkbox checked={selected} tabindex="-1" />
|
|
18
|
+
</span>
|
|
19
|
+
{:else if selected}
|
|
20
|
+
<IconCheck />
|
|
21
|
+
{/if}
|
|
22
|
+
</span>
|
|
20
23
|
{/if}
|
|
21
24
|
|
|
22
25
|
<style>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</style>
|
|
26
|
+
.selected {
|
|
27
|
+
width: 30px;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -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,23 +1,26 @@
|
|
|
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
|
|
12
|
-
{alt}
|
|
13
|
-
{...$$restProps}
|
|
14
|
-
style={`width: ${size}px; height: ${size}px;`}
|
|
15
|
-
/>
|
|
18
|
+
<img {alt} {...rest} style={`width: ${size}px; height: ${size}px;`} />
|
|
16
19
|
|
|
17
20
|
<style>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</style>
|
|
21
|
+
img {
|
|
22
|
+
border-radius: 50%;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -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;
|