@hyvor/design 0.0.68 → 1.0.5
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 -19
- package/dist/components/ActionList/ActionListGroup.svelte +18 -8
- package/dist/components/ActionList/ActionListGroup.svelte.d.ts +8 -19
- package/dist/components/ActionList/ActionListItem.svelte +49 -25
- package/dist/components/ActionList/ActionListItem.svelte.d.ts +28 -25
- package/dist/components/ActionList/Selected.svelte +10 -4
- package/dist/components/ActionList/Selected.svelte.d.ts +6 -16
- package/dist/components/Avatar/Avatar.svelte +16 -9
- package/dist/components/Avatar/Avatar.svelte.d.ts +7 -17
- package/dist/components/Avatar/AvatarStack.svelte +14 -8
- package/dist/components/Avatar/AvatarStack.svelte.d.ts +6 -17
- package/dist/components/Base/Base.svelte +14 -6
- package/dist/components/Base/Base.svelte.d.ts +6 -17
- package/dist/components/Box/Box.svelte +10 -3
- package/dist/components/Box/Box.svelte.d.ts +7 -18
- package/dist/components/Button/Button.svelte +52 -25
- package/dist/components/Button/Button.svelte.d.ts +16 -38
- package/dist/components/Button/ButtonGroup.svelte +9 -1
- package/dist/components/Button/ButtonGroup.svelte.d.ts +5 -26
- package/dist/components/Callout/Callout.svelte +41 -20
- package/dist/components/Callout/Callout.svelte.d.ts +11 -22
- 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 +7 -16
- package/dist/components/CodeBlock/getCode.js +2 -0
- package/dist/components/ColorPicker/ColorPicker.svelte +34 -15
- package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +26 -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 -19
- package/dist/components/Dropdown/Dropdown.svelte +33 -14
- package/dist/components/Dropdown/Dropdown.svelte.d.ts +13 -23
- 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 -18
- package/dist/components/FormControl/FormControl.svelte +11 -2
- package/dist/components/FormControl/FormControl.svelte.d.ts +6 -26
- package/dist/components/FormControl/InputGroup.svelte +17 -9
- package/dist/components/FormControl/InputGroup.svelte.d.ts +7 -18
- package/dist/components/FormControl/Label.svelte +11 -2
- package/dist/components/FormControl/Label.svelte.d.ts +6 -26
- package/dist/components/FormControl/Validation.svelte +18 -9
- package/dist/components/FormControl/Validation.svelte.d.ts +8 -19
- package/dist/components/HyvorBar/BarProducts.svelte +44 -25
- package/dist/components/HyvorBar/BarSupport.svelte +165 -101
- package/dist/components/HyvorBar/BarSupport.svelte.d.ts +7 -17
- package/dist/components/HyvorBar/BarUpdates.svelte +25 -15
- package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +6 -16
- package/dist/components/HyvorBar/BarUpdatesList.svelte +73 -48
- package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +6 -16
- package/dist/components/HyvorBar/BarUser.svelte +36 -24
- package/dist/components/HyvorBar/BarUser.svelte.d.ts +5 -15
- 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 -32
- 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 -17
- package/dist/components/Internationalization/LanguageToggle.svelte +73 -47
- package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +10 -20
- 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 -33
- 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 -26
- 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 +32 -29
- package/dist/components/Modal/ModalFooter.svelte +14 -6
- package/dist/components/Modal/ModalFooter.svelte.d.ts +23 -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 -32
- package/dist/components/Radio/Radio.svelte +35 -16
- package/dist/components/Radio/Radio.svelte.d.ts +10 -32
- package/dist/components/Slider/Slider.svelte +86 -36
- package/dist/components/Slider/Slider.svelte.d.ts +25 -20
- package/dist/components/SplitControl/SplitControl.svelte +27 -18
- package/dist/components/SplitControl/SplitControl.svelte.d.ts +11 -23
- package/dist/components/Switch/Switch.svelte +30 -15
- package/dist/components/Switch/Switch.svelte.d.ts +8 -30
- package/dist/components/TabNav/TabNav.svelte +29 -15
- package/dist/components/TabNav/TabNav.svelte.d.ts +7 -18
- package/dist/components/TabNav/TabNavItem.svelte +36 -15
- package/dist/components/TabNav/TabNavItem.svelte.d.ts +10 -23
- package/dist/components/Table/Table.svelte +11 -4
- package/dist/components/Table/Table.svelte.d.ts +7 -18
- package/dist/components/Table/TableRow.svelte +11 -3
- package/dist/components/Table/TableRow.svelte.d.ts +7 -18
- package/dist/components/Tag/Tag.svelte +65 -31
- package/dist/components/Tag/Tag.svelte.d.ts +16 -38
- package/dist/components/Text/Text.svelte +20 -6
- package/dist/components/Text/Text.svelte.d.ts +10 -21
- package/dist/components/TextInput/TextInput.svelte +81 -28
- package/dist/components/TextInput/TextInput.svelte.d.ts +14 -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 -15
- package/dist/components/Toast/ToastMessage.svelte +11 -4
- package/dist/components/Toast/ToastMessage.svelte.d.ts +5 -15
- 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 -17
- package/dist/marketing/Docs/Content/Content.svelte +41 -29
- package/dist/marketing/Docs/Content/Content.svelte.d.ts +5 -15
- package/dist/marketing/Docs/Content/DocsImage.svelte +17 -9
- package/dist/marketing/Docs/Content/DocsImage.svelte.d.ts +9 -19
- package/dist/marketing/Docs/Docs.svelte +9 -3
- package/dist/marketing/Docs/Docs.svelte.d.ts +6 -28
- package/dist/marketing/Docs/Nav/Nav.svelte +77 -50
- package/dist/marketing/Docs/Nav/Nav.svelte.d.ts +5 -15
- package/dist/marketing/Docs/Nav/NavCategory.svelte +16 -6
- package/dist/marketing/Docs/Nav/NavCategory.svelte.d.ts +8 -19
- package/dist/marketing/Docs/Nav/NavItem.svelte +10 -3
- package/dist/marketing/Docs/Nav/NavItem.svelte.d.ts +6 -17
- 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 -18
- package/dist/marketing/Document/DocumentTitle.svelte +16 -5
- package/dist/marketing/Document/DocumentTitle.svelte.d.ts +9 -19
- package/dist/marketing/Footer/Footer.svelte +55 -38
- package/dist/marketing/Footer/Footer.svelte.d.ts +8 -19
- package/dist/marketing/Footer/FooterLinkList.svelte +8 -2
- package/dist/marketing/Footer/FooterLinkList.svelte.d.ts +6 -17
- package/dist/marketing/Header/Header.svelte +41 -23
- package/dist/marketing/Header/Header.svelte.d.ts +10 -21
- package/dist/marketing/Logo/LogoBlogs.svelte +6 -1
- package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +5 -15
- package/dist/marketing/Logo/LogoCore.svelte +6 -1
- package/dist/marketing/Logo/LogoCore.svelte.d.ts +5 -15
- package/dist/marketing/Logo/LogoFortguard.svelte +7 -2
- package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +5 -15
- package/dist/marketing/Logo/LogoTalk.svelte +6 -1
- package/dist/marketing/Logo/LogoTalk.svelte.d.ts +5 -15
- package/dist/stores/dark.d.ts +0 -1
- package/package.json +10 -10
- package/dist/components/HyvorBar/BarProducts.svelte.d.ts +0 -39
|
@@ -1,24 +1,45 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createBubbler, handlers } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
const bubble = createBubbler();
|
|
5
|
+
import { getContext } from 'svelte';
|
|
6
|
+
import type { Writable } from 'svelte/store';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
active?: boolean;
|
|
10
|
+
name: string;
|
|
11
|
+
start?: import('svelte').Snippet;
|
|
12
|
+
children?: import('svelte').Snippet;
|
|
13
|
+
end?: import('svelte').Snippet;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { active = false, name, start, children, end, ...rest }: Props = $props();
|
|
18
|
+
|
|
19
|
+
const activeStore = getContext('tab-nav-active') as Writable<string>;
|
|
20
|
+
|
|
21
|
+
let isActive = $derived($activeStore === name || active);
|
|
22
|
+
|
|
23
|
+
function handleClick() {
|
|
24
|
+
activeStore.set(name);
|
|
25
|
+
}
|
|
10
26
|
</script>
|
|
11
27
|
|
|
12
|
-
<button
|
|
13
|
-
|
|
28
|
+
<button
|
|
29
|
+
class="tab"
|
|
30
|
+
class:active={isActive}
|
|
31
|
+
onclick={handlers(handleClick, bubble('click'))}
|
|
32
|
+
{...rest}
|
|
33
|
+
>
|
|
34
|
+
{#if start}
|
|
14
35
|
<span class="start">
|
|
15
|
-
|
|
36
|
+
{@render start?.()}
|
|
16
37
|
</span>
|
|
17
38
|
{/if}
|
|
18
|
-
|
|
19
|
-
{#if
|
|
39
|
+
{@render children?.()}
|
|
40
|
+
{#if end}
|
|
20
41
|
<span class="end">
|
|
21
|
-
|
|
42
|
+
{@render end?.()}
|
|
22
43
|
</span>
|
|
23
44
|
{/if}
|
|
24
45
|
</button>
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
events: {
|
|
9
|
-
click: MouseEvent;
|
|
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> {
|
|
1
|
+
interface Props {
|
|
2
|
+
active?: boolean;
|
|
3
|
+
name: string;
|
|
4
|
+
start?: import('svelte').Snippet;
|
|
5
|
+
children?: import('svelte').Snippet;
|
|
6
|
+
end?: import('svelte').Snippet;
|
|
7
|
+
[key: string]: any;
|
|
23
8
|
}
|
|
24
|
-
|
|
9
|
+
declare const TabNavItem: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type TabNavItem = ReturnType<typeof TabNavItem>;
|
|
11
|
+
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,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
hover?: boolean | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
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> {
|
|
1
|
+
interface Props {
|
|
2
|
+
columns: string;
|
|
3
|
+
hover?: boolean;
|
|
4
|
+
children?: import('svelte').Snippet;
|
|
18
5
|
}
|
|
19
|
-
|
|
6
|
+
declare const Table: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type Table = ReturnType<typeof Table>;
|
|
8
|
+
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,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
head?: boolean | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
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> {
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
head?: boolean;
|
|
4
|
+
children: Snippet;
|
|
18
5
|
}
|
|
19
|
-
|
|
6
|
+
declare const TableRow: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type TableRow = ReturnType<typeof TableRow>;
|
|
8
|
+
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,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
events: {
|
|
15
|
-
keyup: KeyboardEvent;
|
|
16
|
-
keydown: KeyboardEvent;
|
|
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> {
|
|
1
|
+
interface Props {
|
|
2
|
+
as?: 'button' | 'a' | 'span';
|
|
3
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
4
|
+
color?: 'default' | 'accent' | 'green' | 'red' | 'blue' | 'orange';
|
|
5
|
+
interactive?: boolean;
|
|
6
|
+
outline?: boolean;
|
|
7
|
+
fill?: boolean;
|
|
8
|
+
bg?: string | undefined;
|
|
9
|
+
fg?: string | undefined;
|
|
10
|
+
start?: import('svelte').Snippet;
|
|
11
|
+
end?: import('svelte').Snippet;
|
|
12
|
+
children?: import('svelte').Snippet;
|
|
13
|
+
[key: string]: any;
|
|
38
14
|
}
|
|
39
|
-
|
|
15
|
+
declare const Tag: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type Tag = ReturnType<typeof Tag>;
|
|
17
|
+
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,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
bold?: boolean | undefined;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
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> {
|
|
1
|
+
interface Props {
|
|
2
|
+
small?: boolean;
|
|
3
|
+
light?: boolean;
|
|
4
|
+
normal?: boolean;
|
|
5
|
+
bold?: boolean;
|
|
6
|
+
children?: import('svelte').Snippet;
|
|
7
|
+
[key: string]: any;
|
|
21
8
|
}
|
|
22
|
-
|
|
9
|
+
declare const Text: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type Text = ReturnType<typeof Text>;
|
|
11
|
+
export default Text;
|
|
@@ -1,37 +1,83 @@
|
|
|
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
|
+
select?: boolean;
|
|
15
|
+
selectInput?: HTMLSelectElement;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
state = 'default',
|
|
21
|
+
size = 'medium',
|
|
22
|
+
block = false,
|
|
23
|
+
value = $bindable(undefined),
|
|
24
|
+
input = $bindable({} as HTMLInputElement),
|
|
25
|
+
start,
|
|
26
|
+
end,
|
|
27
|
+
select = false,
|
|
28
|
+
selectInput = $bindable({} as HTMLSelectElement),
|
|
29
|
+
...rest
|
|
30
|
+
}: Props = $props();
|
|
6
31
|
</script>
|
|
7
32
|
|
|
8
33
|
<label class="input-wrap state-{state} size-{size}" class:block>
|
|
9
|
-
{#if
|
|
34
|
+
{#if start}
|
|
10
35
|
<span class="slot start">
|
|
11
|
-
|
|
36
|
+
{@render start?.()}
|
|
12
37
|
</span>
|
|
13
38
|
{/if}
|
|
14
39
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
{#if select}
|
|
41
|
+
<select
|
|
42
|
+
{...rest}
|
|
43
|
+
bind:value
|
|
44
|
+
bind:this={selectInput}
|
|
45
|
+
onkeyup={bubble('keyup')}
|
|
46
|
+
onkeydown={bubble('keydown')}
|
|
47
|
+
onkeypress={bubble('keypress')}
|
|
48
|
+
onfocus={bubble('focus')}
|
|
49
|
+
onblur={bubble('blur')}
|
|
50
|
+
onclick={bubble('click')}
|
|
51
|
+
onmouseover={bubble('mouseover')}
|
|
52
|
+
onmouseenter={bubble('mouseenter')}
|
|
53
|
+
onmouseleave={bubble('mouseleave')}
|
|
54
|
+
onchange={bubble('change')}
|
|
55
|
+
oninput={bubble('input')}
|
|
56
|
+
>
|
|
57
|
+
{@render rest?.children()}
|
|
58
|
+
</select>
|
|
59
|
+
{:else}
|
|
60
|
+
<input
|
|
61
|
+
{...rest}
|
|
62
|
+
bind:value
|
|
63
|
+
bind:this={input}
|
|
64
|
+
onkeyup={bubble('keyup')}
|
|
65
|
+
onkeydown={bubble('keydown')}
|
|
66
|
+
onkeypress={bubble('keypress')}
|
|
67
|
+
onfocus={bubble('focus')}
|
|
68
|
+
onblur={bubble('blur')}
|
|
69
|
+
onclick={bubble('click')}
|
|
70
|
+
onmouseover={bubble('mouseover')}
|
|
71
|
+
onmouseenter={bubble('mouseenter')}
|
|
72
|
+
onmouseleave={bubble('mouseleave')}
|
|
73
|
+
onchange={bubble('change')}
|
|
74
|
+
oninput={bubble('input')}
|
|
75
|
+
/>
|
|
76
|
+
{/if}
|
|
77
|
+
|
|
78
|
+
{#if end}
|
|
33
79
|
<span class="slot end">
|
|
34
|
-
|
|
80
|
+
{@render end?.()}
|
|
35
81
|
</span>
|
|
36
82
|
{/if}
|
|
37
83
|
</label>
|
|
@@ -69,7 +115,8 @@ export let input = {};
|
|
|
69
115
|
width: 100%;
|
|
70
116
|
}
|
|
71
117
|
|
|
72
|
-
input
|
|
118
|
+
input,
|
|
119
|
+
select {
|
|
73
120
|
flex: 1;
|
|
74
121
|
width: 100%;
|
|
75
122
|
border: none;
|
|
@@ -79,11 +126,17 @@ input {
|
|
|
79
126
|
padding: 0;
|
|
80
127
|
margin: 0;
|
|
81
128
|
color: inherit;
|
|
129
|
+
height: 100%;
|
|
82
130
|
}
|
|
83
|
-
input:focus
|
|
131
|
+
input:focus,
|
|
132
|
+
select:focus {
|
|
84
133
|
outline: none;
|
|
85
134
|
}
|
|
86
135
|
|
|
136
|
+
select {
|
|
137
|
+
min-width: 180px;
|
|
138
|
+
}
|
|
139
|
+
|
|
87
140
|
.input-wrap.size-x-small {
|
|
88
141
|
padding: 0 15px;
|
|
89
142
|
height: 20px;
|
|
@@ -1,36 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
select?: boolean;
|
|
11
|
+
selectInput?: HTMLSelectElement;
|
|
12
|
+
}, {}, "value" | "input" | "selectInput">;
|
|
13
|
+
type TextInput = ReturnType<typeof TextInput>;
|
|
14
|
+
export default TextInput;
|