@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,28 +1,36 @@
|
|
|
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
|
|
|
12
|
+
<div class:head {...rest}>
|
|
13
|
+
{@render children()}
|
|
14
|
+
</div>
|
|
15
|
+
|
|
4
16
|
<style>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
div {
|
|
18
|
+
display: grid;
|
|
19
|
+
padding: 8px 18px;
|
|
20
|
+
border-radius: 20px;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
grid-template-columns: var(--local-columns);
|
|
23
|
+
}
|
|
24
|
+
div.head {
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
background: var(--accent-lightest);
|
|
27
|
+
margin-bottom: 5px;
|
|
28
|
+
}
|
|
29
|
+
div:hover:not(.head) {
|
|
30
|
+
background-color: var(--local-hover-color);
|
|
31
|
+
}
|
|
32
|
+
div > :global(*) {
|
|
33
|
+
padding-right: 5px;
|
|
34
|
+
word-wrap: break-word;
|
|
35
|
+
}
|
|
24
36
|
</style>
|
|
25
|
-
|
|
26
|
-
<div class:head={head} {...$$props}>
|
|
27
|
-
<slot />
|
|
28
|
-
</div>
|
|
@@ -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,59 +1,85 @@
|
|
|
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
|
-
|
|
17
50
|
<svelte:element
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
style:background-color={bg}
|
|
39
|
-
style:color={fg}
|
|
51
|
+
this={as}
|
|
52
|
+
role={interactive ? 'button' : undefined}
|
|
53
|
+
{tabindex}
|
|
54
|
+
class="button color-{color} style-{styleClass} size-{size}"
|
|
55
|
+
class:interactive
|
|
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')}
|
|
69
|
+
style:background-color={bg}
|
|
70
|
+
style:color={fg}
|
|
40
71
|
>
|
|
72
|
+
{#if start}
|
|
73
|
+
{@render start?.()}
|
|
74
|
+
{/if}
|
|
41
75
|
|
|
42
|
-
|
|
43
|
-
<slot name="start" />
|
|
44
|
-
{/if}
|
|
45
|
-
|
|
46
|
-
<slot />
|
|
47
|
-
|
|
48
|
-
{#if $$slots.end}
|
|
49
|
-
<slot name="end" />
|
|
50
|
-
{/if}
|
|
76
|
+
{@render children?.()}
|
|
51
77
|
|
|
78
|
+
{#if end}
|
|
79
|
+
{@render end?.()}
|
|
80
|
+
{/if}
|
|
52
81
|
</svelte:element>
|
|
53
82
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
83
|
<style>span {
|
|
58
84
|
vertical-align: middle;
|
|
59
85
|
border-radius: 20px;
|
|
@@ -183,4 +209,4 @@ span.style-outline-fill.color-orange {
|
|
|
183
209
|
opacity: 0.5 !important;
|
|
184
210
|
cursor: not-allowed;
|
|
185
211
|
box-shadow: none !important;
|
|
186
|
-
}</style>
|
|
212
|
+
}</style>
|
|
@@ -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,31 +1,38 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
+
}
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
let {
|
|
12
|
+
small = false,
|
|
13
|
+
light = false,
|
|
14
|
+
normal = false,
|
|
15
|
+
bold = false,
|
|
16
|
+
children,
|
|
17
|
+
...rest
|
|
18
|
+
}: Props = $props();
|
|
19
|
+
</script>
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<slot />
|
|
21
|
+
<span class:light class:small class:normal class:bold {...rest}>
|
|
22
|
+
{@render children?.()}
|
|
16
23
|
</span>
|
|
17
24
|
|
|
18
25
|
<style>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</style>
|
|
26
|
+
span.light {
|
|
27
|
+
color: var(--text-light);
|
|
28
|
+
}
|
|
29
|
+
span.small {
|
|
30
|
+
font-size: 0.8em;
|
|
31
|
+
}
|
|
32
|
+
span.normal {
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
}
|
|
35
|
+
span.bold {
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
}
|
|
38
|
+
</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,39 +1,60 @@
|
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
{#if start}
|
|
31
|
+
<span class="slot start">
|
|
32
|
+
{@render start?.()}
|
|
33
|
+
</span>
|
|
34
|
+
{/if}
|
|
35
|
+
|
|
36
|
+
<input
|
|
37
|
+
{...rest}
|
|
38
|
+
bind:value
|
|
39
|
+
bind:this={input}
|
|
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')}
|
|
51
|
+
/>
|
|
52
|
+
|
|
53
|
+
{#if end}
|
|
54
|
+
<span class="slot end">
|
|
55
|
+
{@render end?.()}
|
|
56
|
+
</span>
|
|
57
|
+
{/if}
|
|
37
58
|
</label>
|
|
38
59
|
|
|
39
60
|
<style>.slot {
|
|
@@ -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,53 +1,75 @@
|
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
32
|
+
class="input-wrap state-{state}"
|
|
33
|
+
class:block
|
|
34
|
+
onclick={() => textarea.focus()}
|
|
35
|
+
onkeydown={(e) => {
|
|
36
|
+
if (e.key === 'Enter') {
|
|
37
|
+
textarea.focus();
|
|
38
|
+
}
|
|
39
|
+
}}
|
|
40
|
+
role="textbox"
|
|
41
|
+
tabindex="0"
|
|
20
42
|
>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
{#if start}
|
|
44
|
+
<span class="slot start">
|
|
45
|
+
{@render start?.()}
|
|
46
|
+
</span>
|
|
47
|
+
{/if}
|
|
48
|
+
|
|
49
|
+
<textarea
|
|
50
|
+
bind:value
|
|
51
|
+
bind:this={textarea}
|
|
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')}
|
|
63
|
+
{rows}
|
|
64
|
+
{cols}
|
|
65
|
+
{...rest}
|
|
66
|
+
></textarea>
|
|
67
|
+
|
|
68
|
+
{#if end}
|
|
69
|
+
<span class="slot end">
|
|
70
|
+
{@render end?.()}
|
|
71
|
+
</span>
|
|
72
|
+
{/if}
|
|
51
73
|
</span>
|
|
52
74
|
|
|
53
75
|
<style>.input-wrap {
|