@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,32 +1,34 @@
|
|
|
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
|
-
<div
|
|
11
|
-
|
|
12
|
-
style:--local-size={size + "px"}
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
16
|
+
<div class="stack" style:--local-size={size + 'px'}>
|
|
17
|
+
{@render children?.()}
|
|
15
18
|
</div>
|
|
16
19
|
|
|
17
|
-
|
|
18
20
|
<style>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</style>
|
|
21
|
+
.stack {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
.stack :global(img) {
|
|
26
|
+
transition: 0.2s;
|
|
27
|
+
}
|
|
28
|
+
.stack :global(img:not(:first-child)) {
|
|
29
|
+
margin-left: calc(var(--local-size) * -0.5);
|
|
30
|
+
}
|
|
31
|
+
.stack:hover :global(img:not(:first-child)) {
|
|
32
|
+
margin-left: 3px;
|
|
33
|
+
}
|
|
34
|
+
</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,17 +1,25 @@
|
|
|
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}
|
|
13
|
-
|
|
21
|
+
<DarkProvider />
|
|
14
22
|
{/if}
|
|
15
23
|
|
|
16
24
|
<ToastProvider />
|
|
17
|
-
<ConfirmModalProvider />
|
|
25
|
+
<ConfirmModalProvider />
|
|
@@ -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,12 +1,19 @@
|
|
|
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
|
-
<svelte:element
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
<svelte:element
|
|
12
|
+
this={as}
|
|
13
|
+
style:box-shadow="var(--box-shadow)"
|
|
14
|
+
style:border-radius="var(--box-radius)"
|
|
15
|
+
style:background-color="var(--box-background)"
|
|
16
|
+
{...rest}
|
|
10
17
|
>
|
|
11
|
-
|
|
12
|
-
</svelte:element>
|
|
18
|
+
{@render children?.()}
|
|
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,59 +1,77 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
export let color = "accent";
|
|
4
|
-
export let block = false;
|
|
5
|
-
export let variant = "fill";
|
|
6
|
-
export let align = "center";
|
|
7
|
-
export let button = {};
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<svelte:element
|
|
11
|
-
this={as}
|
|
12
|
-
class="button {size} {color} {variant} {align}"
|
|
13
|
-
class:block={block}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
14
3
|
|
|
15
|
-
|
|
16
|
-
on:keydown
|
|
17
|
-
on:keypress
|
|
18
|
-
on:focus
|
|
19
|
-
on:blur
|
|
20
|
-
on:click
|
|
21
|
-
on:mouseover
|
|
22
|
-
on:mouseenter
|
|
23
|
-
on:mouseleave
|
|
24
|
-
on:change
|
|
4
|
+
const bubble = createBubbler();
|
|
25
5
|
|
|
26
|
-
|
|
27
|
-
|
|
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
|
+
}
|
|
28
20
|
|
|
29
|
-
|
|
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();
|
|
35
|
+
</script>
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
<svelte:element
|
|
38
|
+
this={as}
|
|
39
|
+
class="button {size} {color} {variant} {align}"
|
|
40
|
+
class:block
|
|
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')}
|
|
51
|
+
role="button"
|
|
52
|
+
tabindex="0"
|
|
53
|
+
bind:this={button}
|
|
54
|
+
{...rest}
|
|
32
55
|
>
|
|
56
|
+
<span class="button-content">
|
|
57
|
+
{#if start}
|
|
58
|
+
<span class="slot start">{@render start?.()}</span>
|
|
59
|
+
{/if}
|
|
33
60
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{#if $$slots.start}
|
|
37
|
-
<span class="slot start"><slot name="start" /></span>
|
|
38
|
-
{/if}
|
|
61
|
+
{@render children?.()}
|
|
39
62
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{/if}
|
|
45
|
-
|
|
46
|
-
</span>
|
|
47
|
-
|
|
48
|
-
{#if $$slots.action}
|
|
49
|
-
<span class="action">
|
|
50
|
-
<slot name="action" />
|
|
51
|
-
</span>
|
|
52
|
-
{/if}
|
|
63
|
+
{#if end}
|
|
64
|
+
<span class="slot end">{@render end?.()}</span>
|
|
65
|
+
{/if}
|
|
66
|
+
</span>
|
|
53
67
|
|
|
68
|
+
{#if action}
|
|
69
|
+
<span class="action">
|
|
70
|
+
{@render action?.()}
|
|
71
|
+
</span>
|
|
72
|
+
{/if}
|
|
54
73
|
</svelte:element>
|
|
55
74
|
|
|
56
|
-
|
|
57
75
|
<style>.slot.start {
|
|
58
76
|
margin-right: 6px;
|
|
59
77
|
display: inline-flex;
|
|
@@ -398,4 +416,4 @@ export let button = {};
|
|
|
398
416
|
}
|
|
399
417
|
.button[disabled]:hover {
|
|
400
418
|
box-shadow: none !important;
|
|
401
|
-
}</style>
|
|
419
|
+
}</style>
|
|
@@ -1,39 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
focus: FocusEvent;
|
|
18
|
-
blur: FocusEvent;
|
|
19
|
-
click: MouseEvent;
|
|
20
|
-
mouseover: MouseEvent;
|
|
21
|
-
mouseenter: MouseEvent;
|
|
22
|
-
mouseleave: MouseEvent;
|
|
23
|
-
change: Event;
|
|
24
|
-
} & {
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
26
|
-
};
|
|
27
|
-
slots: {
|
|
28
|
-
start: {};
|
|
29
|
-
default: {};
|
|
30
|
-
end: {};
|
|
31
|
-
action: {};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export type ButtonProps = typeof __propDef.props;
|
|
35
|
-
export type ButtonEvents = typeof __propDef.events;
|
|
36
|
-
export type ButtonSlots = typeof __propDef.slots;
|
|
37
|
-
export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
1
|
+
declare const Button: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
as?: "button" | "a";
|
|
4
|
+
size?: "x-small" | "small" | "medium" | "large";
|
|
5
|
+
color?: "accent" | "gray" | "green" | "red" | "blue" | "orange" | "input";
|
|
6
|
+
block?: boolean;
|
|
7
|
+
variant?: "fill" | "fill-light" | "outline" | "invisible" | "outline-fill";
|
|
8
|
+
align?: "start" | "center";
|
|
9
|
+
button?: any;
|
|
10
|
+
start?: import("svelte").Snippet;
|
|
11
|
+
children?: import("svelte").Snippet;
|
|
12
|
+
end?: import("svelte").Snippet;
|
|
13
|
+
action?: import("svelte").Snippet;
|
|
14
|
+
}, {}, "button">;
|
|
15
|
+
type Button = ReturnType<typeof Button>;
|
|
16
|
+
export default Button;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
children?: import('svelte').Snippet;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
let { children }: Props = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
1
9
|
<div class="button-group">
|
|
2
|
-
|
|
10
|
+
{@render children?.()}
|
|
3
11
|
</div>
|
|
4
12
|
|
|
5
13
|
<style>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
</style>
|
|
14
|
+
.button-group {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
gap: 6px;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type ButtonGroupProps = typeof __propDef.props;
|
|
13
|
-
export type ButtonGroupEvents = typeof __propDef.events;
|
|
14
|
-
export type ButtonGroupSlots = typeof __propDef.slots;
|
|
15
|
-
import { SvelteComponent } from "svelte";
|
|
16
|
-
declare const __propDef: {
|
|
17
|
-
props: {
|
|
18
|
-
[x: string]: never;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
[evt: string]: CustomEvent<any>;
|
|
22
|
-
};
|
|
23
|
-
slots: {
|
|
24
|
-
default: {};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
1
|
+
declare const ButtonGroup: import("svelte").Component<{
|
|
2
|
+
children?: import("svelte").Snippet;
|
|
3
|
+
}, {}, "">;
|
|
4
|
+
type ButtonGroup = ReturnType<typeof ButtonGroup>;
|
|
5
|
+
export default ButtonGroup;
|
|
@@ -1,92 +1,115 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
type = 'soft',
|
|
6
|
+
title = undefined,
|
|
7
|
+
children = undefined,
|
|
8
|
+
text = undefined,
|
|
9
|
+
icon = undefined,
|
|
10
|
+
...rest
|
|
11
|
+
}: {
|
|
12
|
+
type?: 'info' | 'success' | 'warning' | 'danger' | 'soft';
|
|
13
|
+
title?: string | Snippet;
|
|
14
|
+
icon?: Snippet;
|
|
15
|
+
text?: string | Snippet;
|
|
16
|
+
children?: Snippet;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
} = $props();
|
|
2
19
|
</script>
|
|
3
20
|
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
<div class={'callout ' + type} {...rest}>
|
|
22
|
+
{#if typeof title === 'string'}
|
|
23
|
+
<div class="title-wrap">
|
|
24
|
+
{#if icon}
|
|
25
|
+
<span
|
|
26
|
+
class="title-icon
|
|
27
|
+
"
|
|
28
|
+
>
|
|
29
|
+
{@render icon()}
|
|
30
|
+
</span>
|
|
31
|
+
{/if}
|
|
32
|
+
<div class="title">{title}</div>
|
|
33
|
+
</div>
|
|
34
|
+
{:else if title !== undefined}
|
|
35
|
+
<div class="title-wrap">
|
|
36
|
+
{#if icon}
|
|
37
|
+
<span class="title-icon">{@render icon()}</span>
|
|
38
|
+
{/if}
|
|
39
|
+
|
|
40
|
+
<div class="title">{@render title?.()}</div>
|
|
41
|
+
</div>
|
|
42
|
+
{/if}
|
|
43
|
+
|
|
44
|
+
<div class="text-wrap">
|
|
45
|
+
{#if icon && !title}
|
|
46
|
+
<span class="icon">{@render icon()}</span>
|
|
47
|
+
{/if}
|
|
48
|
+
|
|
49
|
+
<div class="text">
|
|
50
|
+
{#if children}
|
|
51
|
+
{@render children()}
|
|
52
|
+
{/if}
|
|
53
|
+
{#if typeof text === 'string'}
|
|
54
|
+
{text}
|
|
55
|
+
{:else}
|
|
56
|
+
{@render text?.()}
|
|
57
|
+
{/if}
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
34
60
|
</div>
|
|
35
61
|
|
|
36
|
-
|
|
37
62
|
<style>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
</style>
|
|
63
|
+
.callout {
|
|
64
|
+
padding: 15px 25px;
|
|
65
|
+
border-radius: var(--box-radius);
|
|
66
|
+
/* line-height: var(--line-height-content); */
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.callout.soft {
|
|
70
|
+
background-color: var(--accent-light);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.callout.info {
|
|
74
|
+
background-color: var(--blue-light);
|
|
75
|
+
color: var(--blue-dark);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.callout.warning {
|
|
79
|
+
background-color: var(--orange-light);
|
|
80
|
+
color: var(--orange-dark);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.callout.danger {
|
|
84
|
+
background-color: var(--red-light);
|
|
85
|
+
color: var(--red-dark);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.callout.success {
|
|
89
|
+
background-color: var(--green-light);
|
|
90
|
+
color: var(--green-dark);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.title-wrap {
|
|
94
|
+
margin-bottom: 4px;
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
font-weight: 600;
|
|
98
|
+
font-size: 18px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.title-icon {
|
|
102
|
+
vertical-align: middle;
|
|
103
|
+
margin-right: 8px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.text-wrap {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: flex-start;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.icon {
|
|
112
|
+
margin-right: 8px;
|
|
113
|
+
font-size: 18px;
|
|
114
|
+
}
|
|
115
|
+
</style>
|