@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,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,6 +1,13 @@
|
|
|
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
13
|
<div
|
|
@@ -10,5 +17,5 @@ const hoverCss = hover ? "--local-hover-color: var(--hover);" : "";
|
|
|
10
17
|
{hoverCss}
|
|
11
18
|
"
|
|
12
19
|
>
|
|
13
|
-
|
|
20
|
+
{@render children?.()}
|
|
14
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;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
head?: boolean;
|
|
6
|
+
children: Snippet;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { head = false, children, ...rest }: Props = $props();
|
|
2
10
|
</script>
|
|
3
11
|
|
|
4
|
-
<div class:head {
|
|
5
|
-
|
|
12
|
+
<div class:head {...rest}>
|
|
13
|
+
{@render children()}
|
|
6
14
|
</div>
|
|
7
15
|
|
|
8
16
|
<style>
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {
|
|
11
|
-
default: {};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type TableRowProps = typeof __propDef.props;
|
|
15
|
-
export type TableRowEvents = typeof __propDef.events;
|
|
16
|
-
export type TableRowSlots = typeof __propDef.slots;
|
|
17
|
-
export default class TableRow extends SvelteComponent<TableRowProps, TableRowEvents, TableRowSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
declare const TableRow: import("svelte").Component<{
|
|
3
|
+
head?: boolean;
|
|
4
|
+
children: Snippet;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type TableRow = ReturnType<typeof TableRow>;
|
|
7
|
+
export default TableRow;
|
|
@@ -1,16 +1,50 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
as?: 'button' | 'a' | 'span';
|
|
8
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
9
|
+
color?:
|
|
10
|
+
| 'default' // default tag (categories)
|
|
11
|
+
| 'accent'
|
|
12
|
+
| 'green'
|
|
13
|
+
| 'red'
|
|
14
|
+
| 'blue'
|
|
15
|
+
| 'orange';
|
|
16
|
+
interactive?: boolean;
|
|
17
|
+
outline?: boolean;
|
|
18
|
+
fill?: boolean;
|
|
19
|
+
bg?: string | undefined;
|
|
20
|
+
fg?: string | undefined;
|
|
21
|
+
start?: import('svelte').Snippet;
|
|
22
|
+
end?: import('svelte').Snippet;
|
|
23
|
+
children?: import('svelte').Snippet;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
as = 'span',
|
|
29
|
+
size = 'medium',
|
|
30
|
+
color = 'default',
|
|
31
|
+
interactive = false,
|
|
32
|
+
outline = false,
|
|
33
|
+
fill = false,
|
|
34
|
+
bg = undefined,
|
|
35
|
+
fg = undefined,
|
|
36
|
+
start,
|
|
37
|
+
end,
|
|
38
|
+
children,
|
|
39
|
+
...rest
|
|
40
|
+
}: Props = $props();
|
|
41
|
+
|
|
42
|
+
let styleClass = $state('default');
|
|
43
|
+
if (outline) {
|
|
44
|
+
styleClass = fill ? 'outline-fill' : 'outline';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let tabindex = interactive ? 0 : undefined;
|
|
14
48
|
</script>
|
|
15
49
|
|
|
16
50
|
<svelte:element
|
|
@@ -19,30 +53,30 @@ let tabindex = interactive ? 0 : void 0;
|
|
|
19
53
|
{tabindex}
|
|
20
54
|
class="button color-{color} style-{styleClass} size-{size}"
|
|
21
55
|
class:interactive
|
|
22
|
-
class:has-start={
|
|
23
|
-
class:has-end={
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
56
|
+
class:has-start={start}
|
|
57
|
+
class:has-end={end}
|
|
58
|
+
{...rest}
|
|
59
|
+
onkeyup={bubble('keyup')}
|
|
60
|
+
onkeydown={bubble('keydown')}
|
|
61
|
+
onkeypress={bubble('keypress')}
|
|
62
|
+
onfocus={bubble('focus')}
|
|
63
|
+
onblur={bubble('blur')}
|
|
64
|
+
onclick={bubble('click')}
|
|
65
|
+
onmouseover={bubble('mouseover')}
|
|
66
|
+
onmouseenter={bubble('mouseenter')}
|
|
67
|
+
onmouseleave={bubble('mouseleave')}
|
|
68
|
+
onchange={bubble('change')}
|
|
35
69
|
style:background-color={bg}
|
|
36
70
|
style:color={fg}
|
|
37
71
|
>
|
|
38
|
-
{#if
|
|
39
|
-
|
|
72
|
+
{#if start}
|
|
73
|
+
{@render start?.()}
|
|
40
74
|
{/if}
|
|
41
75
|
|
|
42
|
-
|
|
76
|
+
{@render children?.()}
|
|
43
77
|
|
|
44
|
-
{#if
|
|
45
|
-
|
|
78
|
+
{#if end}
|
|
79
|
+
{@render end?.()}
|
|
46
80
|
{/if}
|
|
47
81
|
</svelte:element>
|
|
48
82
|
|
|
@@ -1,39 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
keypress: KeyboardEvent;
|
|
18
|
-
focus: FocusEvent;
|
|
19
|
-
blur: FocusEvent;
|
|
20
|
-
click: MouseEvent;
|
|
21
|
-
mouseover: MouseEvent;
|
|
22
|
-
mouseenter: MouseEvent;
|
|
23
|
-
mouseleave: MouseEvent;
|
|
24
|
-
change: Event;
|
|
25
|
-
} & {
|
|
26
|
-
[evt: string]: CustomEvent<any>;
|
|
27
|
-
};
|
|
28
|
-
slots: {
|
|
29
|
-
start: {};
|
|
30
|
-
default: {};
|
|
31
|
-
end: {};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export type TagProps = typeof __propDef.props;
|
|
35
|
-
export type TagEvents = typeof __propDef.events;
|
|
36
|
-
export type TagSlots = typeof __propDef.slots;
|
|
37
|
-
export default class Tag extends SvelteComponent<TagProps, TagEvents, TagSlots> {
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
1
|
+
declare const Tag: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
as?: "button" | "a" | "span";
|
|
4
|
+
size?: "x-small" | "small" | "medium" | "large";
|
|
5
|
+
color?: "default" | "accent" | "green" | "red" | "blue" | "orange";
|
|
6
|
+
interactive?: boolean;
|
|
7
|
+
outline?: boolean;
|
|
8
|
+
fill?: boolean;
|
|
9
|
+
bg?: string | undefined;
|
|
10
|
+
fg?: string | undefined;
|
|
11
|
+
start?: import("svelte").Snippet;
|
|
12
|
+
end?: import("svelte").Snippet;
|
|
13
|
+
children?: import("svelte").Snippet;
|
|
14
|
+
}, {}, "">;
|
|
15
|
+
type Tag = ReturnType<typeof Tag>;
|
|
16
|
+
export default Tag;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
small?: boolean;
|
|
4
|
+
light?: boolean;
|
|
5
|
+
normal?: boolean; // weight
|
|
6
|
+
bold?: boolean;
|
|
7
|
+
children?: import('svelte').Snippet;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let {
|
|
12
|
+
small = false,
|
|
13
|
+
light = false,
|
|
14
|
+
normal = false,
|
|
15
|
+
bold = false,
|
|
16
|
+
children,
|
|
17
|
+
...rest
|
|
18
|
+
}: Props = $props();
|
|
5
19
|
</script>
|
|
6
20
|
|
|
7
|
-
<span class:light class:small class:normal class:bold {
|
|
8
|
-
|
|
21
|
+
<span class:light class:small class:normal class:bold {...rest}>
|
|
22
|
+
{@render children?.()}
|
|
9
23
|
</span>
|
|
10
24
|
|
|
11
25
|
<style>
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export type TextProps = typeof __propDef.props;
|
|
18
|
-
export type TextEvents = typeof __propDef.events;
|
|
19
|
-
export type TextSlots = typeof __propDef.slots;
|
|
20
|
-
export default class Text extends SvelteComponent<TextProps, TextEvents, TextSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
declare const Text: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
small?: boolean;
|
|
4
|
+
light?: boolean;
|
|
5
|
+
normal?: boolean;
|
|
6
|
+
bold?: boolean;
|
|
7
|
+
children?: import("svelte").Snippet;
|
|
8
|
+
}, {}, "">;
|
|
9
|
+
type Text = ReturnType<typeof Text>;
|
|
10
|
+
export default Text;
|
|
@@ -1,37 +1,58 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
state?: 'default' | 'error' | 'success' | 'warning';
|
|
8
|
+
size?: 'small' | 'medium' | 'large' | 'x-small';
|
|
9
|
+
block?: boolean;
|
|
10
|
+
value?: any;
|
|
11
|
+
input?: HTMLInputElement;
|
|
12
|
+
start?: import('svelte').Snippet;
|
|
13
|
+
end?: import('svelte').Snippet;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
state = 'default',
|
|
19
|
+
size = 'medium',
|
|
20
|
+
block = false,
|
|
21
|
+
value = $bindable(undefined),
|
|
22
|
+
input = $bindable({} as HTMLInputElement),
|
|
23
|
+
start,
|
|
24
|
+
end,
|
|
25
|
+
...rest
|
|
26
|
+
}: Props = $props();
|
|
6
27
|
</script>
|
|
7
28
|
|
|
8
29
|
<label class="input-wrap state-{state} size-{size}" class:block>
|
|
9
|
-
{#if
|
|
30
|
+
{#if start}
|
|
10
31
|
<span class="slot start">
|
|
11
|
-
|
|
32
|
+
{@render start?.()}
|
|
12
33
|
</span>
|
|
13
34
|
{/if}
|
|
14
35
|
|
|
15
36
|
<input
|
|
16
|
-
{
|
|
37
|
+
{...rest}
|
|
17
38
|
bind:value
|
|
18
39
|
bind:this={input}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
onkeyup={bubble('keyup')}
|
|
41
|
+
onkeydown={bubble('keydown')}
|
|
42
|
+
onkeypress={bubble('keypress')}
|
|
43
|
+
onfocus={bubble('focus')}
|
|
44
|
+
onblur={bubble('blur')}
|
|
45
|
+
onclick={bubble('click')}
|
|
46
|
+
onmouseover={bubble('mouseover')}
|
|
47
|
+
onmouseenter={bubble('mouseenter')}
|
|
48
|
+
onmouseleave={bubble('mouseleave')}
|
|
49
|
+
onchange={bubble('change')}
|
|
50
|
+
oninput={bubble('input')}
|
|
30
51
|
/>
|
|
31
52
|
|
|
32
|
-
{#if
|
|
53
|
+
{#if end}
|
|
33
54
|
<span class="slot end">
|
|
34
|
-
|
|
55
|
+
{@render end?.()}
|
|
35
56
|
</span>
|
|
36
57
|
{/if}
|
|
37
58
|
</label>
|
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
keydown: KeyboardEvent;
|
|
14
|
-
keypress: KeyboardEvent;
|
|
15
|
-
focus: FocusEvent;
|
|
16
|
-
blur: FocusEvent;
|
|
17
|
-
click: MouseEvent;
|
|
18
|
-
mouseover: MouseEvent;
|
|
19
|
-
mouseenter: MouseEvent;
|
|
20
|
-
mouseleave: MouseEvent;
|
|
21
|
-
change: Event;
|
|
22
|
-
input: Event;
|
|
23
|
-
} & {
|
|
24
|
-
[evt: string]: CustomEvent<any>;
|
|
25
|
-
};
|
|
26
|
-
slots: {
|
|
27
|
-
start: {};
|
|
28
|
-
end: {};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export type TextInputProps = typeof __propDef.props;
|
|
32
|
-
export type TextInputEvents = typeof __propDef.events;
|
|
33
|
-
export type TextInputSlots = typeof __propDef.slots;
|
|
34
|
-
export default class TextInput extends SvelteComponent<TextInputProps, TextInputEvents, TextInputSlots> {
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
1
|
+
declare const TextInput: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
state?: "default" | "error" | "success" | "warning";
|
|
4
|
+
size?: "small" | "medium" | "large" | "x-small";
|
|
5
|
+
block?: boolean;
|
|
6
|
+
value?: any;
|
|
7
|
+
input?: HTMLInputElement;
|
|
8
|
+
start?: import("svelte").Snippet;
|
|
9
|
+
end?: import("svelte").Snippet;
|
|
10
|
+
}, {}, "value" | "input">;
|
|
11
|
+
type TextInput = ReturnType<typeof TextInput>;
|
|
12
|
+
export default TextInput;
|
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
value?: any;
|
|
8
|
+
block?: boolean;
|
|
9
|
+
rows?: number;
|
|
10
|
+
cols?: number;
|
|
11
|
+
state?: 'default' | 'success' | 'warning' | 'error';
|
|
12
|
+
textarea?: HTMLTextAreaElement;
|
|
13
|
+
start?: import('svelte').Snippet;
|
|
14
|
+
end?: import('svelte').Snippet;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
value = $bindable(undefined),
|
|
20
|
+
block = false,
|
|
21
|
+
rows = 5,
|
|
22
|
+
cols = 40,
|
|
23
|
+
state = 'default',
|
|
24
|
+
textarea = $bindable({} as HTMLTextAreaElement),
|
|
25
|
+
start,
|
|
26
|
+
end,
|
|
27
|
+
...rest
|
|
28
|
+
}: Props = $props();
|
|
7
29
|
</script>
|
|
8
30
|
|
|
9
31
|
<span
|
|
10
32
|
class="input-wrap state-{state}"
|
|
11
33
|
class:block
|
|
12
|
-
|
|
13
|
-
|
|
34
|
+
onclick={() => textarea.focus()}
|
|
35
|
+
onkeydown={(e) => {
|
|
14
36
|
if (e.key === 'Enter') {
|
|
15
37
|
textarea.focus();
|
|
16
38
|
}
|
|
@@ -18,34 +40,34 @@ export let textarea = {};
|
|
|
18
40
|
role="textbox"
|
|
19
41
|
tabindex="0"
|
|
20
42
|
>
|
|
21
|
-
{#if
|
|
43
|
+
{#if start}
|
|
22
44
|
<span class="slot start">
|
|
23
|
-
|
|
45
|
+
{@render start?.()}
|
|
24
46
|
</span>
|
|
25
47
|
{/if}
|
|
26
48
|
|
|
27
49
|
<textarea
|
|
28
50
|
bind:value
|
|
29
51
|
bind:this={textarea}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
onkeyup={bubble('keyup')}
|
|
53
|
+
onkeydown={bubble('keydown')}
|
|
54
|
+
onkeypress={bubble('keypress')}
|
|
55
|
+
onfocus={bubble('focus')}
|
|
56
|
+
onblur={bubble('blur')}
|
|
57
|
+
onclick={bubble('click')}
|
|
58
|
+
onmouseover={bubble('mouseover')}
|
|
59
|
+
onmouseenter={bubble('mouseenter')}
|
|
60
|
+
onmouseleave={bubble('mouseleave')}
|
|
61
|
+
onchange={bubble('change')}
|
|
62
|
+
oninput={bubble('input')}
|
|
41
63
|
{rows}
|
|
42
64
|
{cols}
|
|
43
|
-
{
|
|
65
|
+
{...rest}
|
|
44
66
|
></textarea>
|
|
45
67
|
|
|
46
|
-
{#if
|
|
68
|
+
{#if end}
|
|
47
69
|
<span class="slot end">
|
|
48
|
-
|
|
70
|
+
{@render end?.()}
|
|
49
71
|
</span>
|
|
50
72
|
{/if}
|
|
51
73
|
</span>
|
|
@@ -1,37 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
keydown: KeyboardEvent;
|
|
15
|
-
keypress: KeyboardEvent;
|
|
16
|
-
focus: FocusEvent;
|
|
17
|
-
blur: FocusEvent;
|
|
18
|
-
click: MouseEvent;
|
|
19
|
-
mouseover: MouseEvent;
|
|
20
|
-
mouseenter: MouseEvent;
|
|
21
|
-
mouseleave: MouseEvent;
|
|
22
|
-
change: Event;
|
|
23
|
-
input: Event;
|
|
24
|
-
} & {
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
26
|
-
};
|
|
27
|
-
slots: {
|
|
28
|
-
start: {};
|
|
29
|
-
end: {};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export type TextareaProps = typeof __propDef.props;
|
|
33
|
-
export type TextareaEvents = typeof __propDef.events;
|
|
34
|
-
export type TextareaSlots = typeof __propDef.slots;
|
|
35
|
-
export default class Textarea extends SvelteComponent<TextareaProps, TextareaEvents, TextareaSlots> {
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
1
|
+
declare const Textarea: import("svelte").Component<{
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
value?: any;
|
|
4
|
+
block?: boolean;
|
|
5
|
+
rows?: number;
|
|
6
|
+
cols?: number;
|
|
7
|
+
state?: "default" | "success" | "warning" | "error";
|
|
8
|
+
textarea?: HTMLTextAreaElement;
|
|
9
|
+
start?: import("svelte").Snippet;
|
|
10
|
+
end?: import("svelte").Snippet;
|
|
11
|
+
}, {}, "value" | "textarea">;
|
|
12
|
+
type Textarea = ReturnType<typeof Textarea>;
|
|
13
|
+
export default Textarea;
|