tera-system-ui 0.1.41 → 0.1.61
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/accordion/Accordion.d.ts +15 -13
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/avatar/Avatar.d.ts +5 -3
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/brand-logo/BrandLogo.d.ts +5 -2
- package/dist/components/brand-logo/index.d.ts +1 -0
- package/dist/components/button/Button.d.ts +58 -14
- package/dist/components/button/Button.js +90 -27
- package/dist/components/button/Button.svelte +35 -30
- package/dist/components/button/Button.svelte.d.ts +1 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +5 -2
- package/dist/components/checkbox/Checkbox.svelte +15 -8
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/combobox/Combobox.d.ts +5 -2
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/dialog/Dialog.d.ts +8 -6
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +26 -8
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/header/Header.d.ts +6 -3
- package/dist/components/header/Header.svelte.d.ts +1 -1
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/input/Input.d.ts +22 -6
- package/dist/components/input/Input.js +19 -10
- package/dist/components/input/Input.svelte +42 -9
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/label/Label.d.ts +33 -3
- package/dist/components/label/Label.js +14 -3
- package/dist/components/label/Label.svelte +7 -7
- package/dist/components/label/Label.svelte.d.ts +2 -2
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/language-picker-button/LanguagePickerButton.d.ts +5 -2
- package/dist/components/language-picker-button/index.d.ts +1 -0
- package/dist/components/light-dark-toggle/LightDarkToggle.d.ts +5 -2
- package/dist/components/light-dark-toggle/index.d.ts +1 -0
- package/dist/components/popover/Popover.d.ts +6 -3
- package/dist/components/popover/Popover.js +0 -1
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover-responsive/PopoverResponsive.d.ts +5 -2
- package/dist/components/popover-responsive/index.d.ts +1 -0
- package/dist/components/select/Select.d.ts +19 -5
- package/dist/components/select/Select.js +18 -9
- package/dist/components/select/Select.svelte +17 -4
- package/dist/components/select/Select.svelte.d.ts +1 -1
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/side-navigation/SideNavigation.d.ts +6 -3
- package/dist/components/side-navigation/index.d.ts +1 -1
- package/dist/components/slider/Slider.d.ts +7 -4
- package/dist/components/slider/Slider.svelte +26 -51
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/star-rating/StarRating.d.ts +5 -2
- package/dist/components/star-rating/StarRating.svelte +5 -5
- package/dist/components/star-rating/index.d.ts +1 -0
- package/dist/components/switch/Switch.d.ts +6 -2
- package/dist/components/switch/Switch.svelte +13 -7
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/tabs/Tabs.svelte.d.ts +23 -3
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tera-ui-context/TeraUiContext.d.ts +4 -6
- package/dist/components/tera-ui-context/index.d.ts +1 -0
- package/dist/components/text-area/TextArea.d.ts +22 -8
- package/dist/components/text-area/TextArea.js +19 -10
- package/dist/components/text-area/TextArea.svelte +36 -30
- package/dist/components/text-area/index.d.ts +1 -0
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.d.ts +5 -2
- package/dist/components/user-avatar-with-menu/index.d.ts +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/paraglide/README.md +93 -0
- package/dist/paraglide/messages/_index.d.ts +8 -7
- package/dist/paraglide/messages/_index.js +361 -360
- package/dist/paraglide/messages/ar.d.ts +9 -7
- package/dist/paraglide/messages/ar.js +16 -15
- package/dist/paraglide/messages/bg.d.ts +9 -7
- package/dist/paraglide/messages/bg.js +16 -15
- package/dist/paraglide/messages/bn.d.ts +9 -7
- package/dist/paraglide/messages/bn.js +16 -15
- package/dist/paraglide/messages/ca.d.ts +9 -7
- package/dist/paraglide/messages/ca.js +16 -15
- package/dist/paraglide/messages/cs.d.ts +9 -7
- package/dist/paraglide/messages/cs.js +16 -15
- package/dist/paraglide/messages/da.d.ts +9 -7
- package/dist/paraglide/messages/da.js +16 -15
- package/dist/paraglide/messages/de.d.ts +9 -7
- package/dist/paraglide/messages/de.js +16 -15
- package/dist/paraglide/messages/el.d.ts +9 -7
- package/dist/paraglide/messages/el.js +16 -15
- package/dist/paraglide/messages/en.d.ts +9 -7
- package/dist/paraglide/messages/en.js +16 -15
- package/dist/paraglide/messages/es.d.ts +9 -7
- package/dist/paraglide/messages/es.js +16 -15
- package/dist/paraglide/messages/fi.d.ts +9 -7
- package/dist/paraglide/messages/fi.js +16 -15
- package/dist/paraglide/messages/fr.d.ts +9 -7
- package/dist/paraglide/messages/fr.js +16 -15
- package/dist/paraglide/messages/he.d.ts +9 -7
- package/dist/paraglide/messages/he.js +16 -15
- package/dist/paraglide/messages/hi.d.ts +9 -7
- package/dist/paraglide/messages/hi.js +16 -15
- package/dist/paraglide/messages/hu.d.ts +9 -7
- package/dist/paraglide/messages/hu.js +16 -15
- package/dist/paraglide/messages/id.d.ts +9 -7
- package/dist/paraglide/messages/id.js +16 -15
- package/dist/paraglide/messages/it.d.ts +9 -7
- package/dist/paraglide/messages/it.js +16 -15
- package/dist/paraglide/messages/ja.d.ts +9 -7
- package/dist/paraglide/messages/ja.js +16 -15
- package/dist/paraglide/messages/ko.d.ts +9 -7
- package/dist/paraglide/messages/ko.js +16 -15
- package/dist/paraglide/messages/lt.d.ts +9 -7
- package/dist/paraglide/messages/lt.js +16 -15
- package/dist/paraglide/messages/lv.d.ts +9 -7
- package/dist/paraglide/messages/lv.js +16 -15
- package/dist/paraglide/messages/ms.d.ts +9 -7
- package/dist/paraglide/messages/ms.js +16 -15
- package/dist/paraglide/messages/nl.d.ts +9 -7
- package/dist/paraglide/messages/nl.js +16 -15
- package/dist/paraglide/messages/no.d.ts +9 -7
- package/dist/paraglide/messages/no.js +16 -15
- package/dist/paraglide/messages/pl.d.ts +9 -7
- package/dist/paraglide/messages/pl.js +16 -15
- package/dist/paraglide/messages/pt.d.ts +9 -7
- package/dist/paraglide/messages/pt.js +16 -15
- package/dist/paraglide/messages/ro.d.ts +9 -7
- package/dist/paraglide/messages/ro.js +16 -15
- package/dist/paraglide/messages/ru.d.ts +9 -7
- package/dist/paraglide/messages/ru.js +16 -15
- package/dist/paraglide/messages/sk.d.ts +9 -7
- package/dist/paraglide/messages/sk.js +16 -15
- package/dist/paraglide/messages/sl.d.ts +9 -7
- package/dist/paraglide/messages/sl.js +16 -15
- package/dist/paraglide/messages/sq.d.ts +9 -7
- package/dist/paraglide/messages/sq.js +16 -15
- package/dist/paraglide/messages/sr.d.ts +9 -7
- package/dist/paraglide/messages/sr.js +16 -15
- package/dist/paraglide/messages/sv.d.ts +9 -7
- package/dist/paraglide/messages/sv.js +16 -15
- package/dist/paraglide/messages/sw.d.ts +9 -7
- package/dist/paraglide/messages/sw.js +16 -15
- package/dist/paraglide/messages/ta.d.ts +9 -7
- package/dist/paraglide/messages/ta.js +16 -15
- package/dist/paraglide/messages/te.d.ts +9 -7
- package/dist/paraglide/messages/te.js +16 -15
- package/dist/paraglide/messages/th.d.ts +9 -7
- package/dist/paraglide/messages/th.js +16 -15
- package/dist/paraglide/messages/tl.d.ts +9 -7
- package/dist/paraglide/messages/tl.js +16 -15
- package/dist/paraglide/messages/tr.d.ts +9 -7
- package/dist/paraglide/messages/tr.js +16 -15
- package/dist/paraglide/messages/uk.d.ts +9 -7
- package/dist/paraglide/messages/uk.js +16 -15
- package/dist/paraglide/messages/vi.d.ts +9 -7
- package/dist/paraglide/messages/vi.js +16 -15
- package/dist/paraglide/messages/zh-CN.d.ts +9 -7
- package/dist/paraglide/messages/zh-CN.js +16 -15
- package/dist/paraglide/messages/zh-TW.d.ts +9 -7
- package/dist/paraglide/messages/zh-TW.js +16 -15
- package/dist/paraglide/messages.js +1 -1
- package/dist/paraglide/registry.js +1 -1
- package/dist/paraglide/runtime.d.ts +221 -45
- package/dist/paraglide/runtime.js +378 -65
- package/dist/paraglide/server.d.ts +40 -4
- package/dist/paraglide/server.js +83 -46
- package/dist/tera-i18n/projects/tera-system-ui/project.inlang/.meta.json +3 -0
- package/dist/tera-i18n/projects/tera-system-ui/project.inlang/README.md +103 -0
- package/dist/themes/tera-ui-base.css +70 -7
- package/dist/types/index.d.ts +25 -0
- package/dist/types/index.js +3 -0
- package/package.json +150 -36
- package/scripts/add-component-template.js +1 -1
- package/scripts/generate-ts-index.js +38 -12
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
-
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
export declare const styles: import("tailwind-variants", { with: { "resolution-mode": "import" } }).TVReturnType<{}, undefined, "", {}, undefined, import("tailwind-variants", { with: { "resolution-mode": "import" } }).TVReturnType<{}, undefined, "", unknown, unknown, undefined>>;
|
|
3
5
|
type HeaderVariants = VariantProps<typeof styles>;
|
|
4
|
-
export interface HeaderProps extends HeaderVariants {
|
|
5
|
-
children
|
|
6
|
+
export interface HeaderProps extends HTMLAttributes<HTMLElement>, HeaderVariants {
|
|
7
|
+
children?: Snippet;
|
|
6
8
|
onHamburgerClick?: () => void;
|
|
9
|
+
ref?: HTMLElement | null;
|
|
7
10
|
}
|
|
8
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HeaderProps } from "./Header";
|
|
2
2
|
import './header.scss';
|
|
3
|
-
declare const Header: import("svelte").Component<HeaderProps, {}, "">;
|
|
3
|
+
declare const Header: import("svelte", { with: { "resolution-mode": "import" } }).Component<HeaderProps, {}, "">;
|
|
4
4
|
type Header = ReturnType<typeof Header>;
|
|
5
5
|
export default Header;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLInputAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
3
5
|
variant: {
|
|
4
6
|
outlined: string;
|
|
@@ -14,7 +16,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
14
16
|
md: string;
|
|
15
17
|
lg: string;
|
|
16
18
|
};
|
|
17
|
-
|
|
19
|
+
status: {
|
|
20
|
+
error: string;
|
|
21
|
+
warning: string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-neutral-token-13 placeholder:text-neutral-token-7", {
|
|
18
24
|
variant: {
|
|
19
25
|
outlined: string;
|
|
20
26
|
filled: string;
|
|
@@ -29,6 +35,10 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
29
35
|
md: string;
|
|
30
36
|
lg: string;
|
|
31
37
|
};
|
|
38
|
+
status: {
|
|
39
|
+
error: string;
|
|
40
|
+
warning: string;
|
|
41
|
+
};
|
|
32
42
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
33
43
|
variant: {
|
|
34
44
|
outlined: string;
|
|
@@ -44,13 +54,19 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
44
54
|
md: string;
|
|
45
55
|
lg: string;
|
|
46
56
|
};
|
|
47
|
-
|
|
57
|
+
status: {
|
|
58
|
+
error: string;
|
|
59
|
+
warning: string;
|
|
60
|
+
};
|
|
61
|
+
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-neutral-token-13 placeholder:text-neutral-token-7", unknown, unknown, undefined>>;
|
|
48
62
|
type InputVariants = VariantProps<typeof styles>;
|
|
49
|
-
export interface InputProps extends InputVariants {
|
|
50
|
-
children?:
|
|
63
|
+
export interface InputProps extends Omit<HTMLInputAttributes, 'disabled' | 'size' | 'value' | 'prefix'>, InputVariants {
|
|
64
|
+
children?: Snippet;
|
|
51
65
|
class?: string;
|
|
52
66
|
value?: string;
|
|
53
|
-
ref?: HTMLInputElement;
|
|
54
|
-
prefix?:
|
|
67
|
+
ref?: HTMLInputElement | null;
|
|
68
|
+
prefix?: Snippet;
|
|
69
|
+
suffix?: Snippet;
|
|
70
|
+
allowClear?: boolean;
|
|
55
71
|
}
|
|
56
72
|
export {};
|
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const styles = tv({
|
|
3
|
-
base: '
|
|
3
|
+
base: 'w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-neutral-token-13 placeholder:text-neutral-token-7',
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
|
-
outlined: 'border border-neutral-token-5 bg-neutral-token-1
|
|
7
|
-
filled: 'bg-
|
|
8
|
-
borderless: 'bg-neutral-token-
|
|
6
|
+
outlined: 'border border-neutral-token-5 bg-neutral-token-1 hover:border-primary-500 focus:border-primary-600 focus:shadow-[0_0_0_2px_rgba(59,130,246,0.1)] transition-all duration-200',
|
|
7
|
+
filled: 'bg-neutral-token-3 border border-transparent hover:bg-neutral-token-4 focus:bg-neutral-token-1 focus:border-primary-600 focus:shadow-[0_0_0_2px_rgba(59,130,246,0.1)] transition-all duration-200',
|
|
8
|
+
borderless: 'bg-transparent border-0 hover:bg-neutral-token-2 focus:bg-neutral-token-2 transition-all duration-200',
|
|
9
9
|
},
|
|
10
10
|
disabled: {
|
|
11
|
-
true: 'cursor-not-allowed
|
|
11
|
+
true: 'cursor-not-allowed bg-neutral-token-3 text-neutral-token-7 border-neutral-token-5',
|
|
12
12
|
false: 'cursor-text',
|
|
13
13
|
},
|
|
14
14
|
size: {
|
|
15
|
-
sm: 'h-6 px-
|
|
16
|
-
md: 'h-8 px-3 text-
|
|
17
|
-
lg: 'h-10 px-3 text-
|
|
15
|
+
sm: 'h-6 px-3 text-sm',
|
|
16
|
+
md: 'h-8 px-3 text-sm',
|
|
17
|
+
lg: 'h-10 px-3 text-base',
|
|
18
|
+
},
|
|
19
|
+
status: {
|
|
20
|
+
error: 'border-error-500 hover:border-error-400 focus:border-error-500 focus:shadow-[0_0_0_2px_rgba(239,68,68,0.1)]',
|
|
21
|
+
warning: 'border-warning-500 hover:border-warning-400 focus:border-warning-500 focus:shadow-[0_0_0_2px_rgba(249,115,22,0.1)]',
|
|
18
22
|
},
|
|
19
23
|
},
|
|
20
24
|
compoundVariants: [
|
|
21
25
|
{
|
|
22
26
|
variant: 'outlined',
|
|
23
27
|
disabled: true,
|
|
24
|
-
class: 'hover:border-
|
|
28
|
+
class: 'hover:border-neutral-token-5'
|
|
25
29
|
},
|
|
26
30
|
{
|
|
27
31
|
variant: 'filled',
|
|
28
32
|
disabled: true,
|
|
29
|
-
class: 'hover:bg-
|
|
33
|
+
class: 'hover:bg-neutral-token-3'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
variant: 'borderless',
|
|
37
|
+
disabled: true,
|
|
38
|
+
class: 'hover:bg-transparent'
|
|
30
39
|
}
|
|
31
40
|
],
|
|
32
41
|
defaultVariants: {
|
|
@@ -1,25 +1,58 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import {type InputProps, styles} from "./Input";
|
|
3
|
+
import {IconX} from "../icons";
|
|
3
4
|
|
|
4
5
|
let {
|
|
5
6
|
children,
|
|
6
7
|
class: className,
|
|
7
8
|
value = $bindable(),
|
|
8
9
|
ref = $bindable(),
|
|
9
|
-
size,
|
|
10
|
+
size = 'md',
|
|
10
11
|
disabled,
|
|
11
12
|
variant = 'outlined',
|
|
12
13
|
prefix,
|
|
14
|
+
suffix,
|
|
15
|
+
allowClear,
|
|
16
|
+
status,
|
|
13
17
|
...props
|
|
14
18
|
}: InputProps = $props();
|
|
15
19
|
|
|
20
|
+
function clearInput() {
|
|
21
|
+
value = '';
|
|
22
|
+
ref?.focus();
|
|
23
|
+
}
|
|
16
24
|
</script>
|
|
17
25
|
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
<div class="relative inline-flex w-full">
|
|
27
|
+
{#if prefix}
|
|
28
|
+
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-neutral-token-7 pointer-events-none">
|
|
29
|
+
{@render prefix()}
|
|
30
|
+
</span>
|
|
31
|
+
{/if}
|
|
32
|
+
|
|
33
|
+
<input
|
|
34
|
+
type="text"
|
|
35
|
+
bind:this={ref}
|
|
36
|
+
class={styles({ variant, disabled , size, status, className })}
|
|
37
|
+
class:pl-9={prefix}
|
|
38
|
+
class:pr-9={allowClear && value || suffix}
|
|
39
|
+
{disabled}
|
|
40
|
+
{...props}
|
|
41
|
+
bind:value
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
{#if allowClear && value && !disabled}
|
|
45
|
+
<button
|
|
46
|
+
type="button"
|
|
47
|
+
onclick={clearInput}
|
|
48
|
+
class="absolute right-3 top-1/2 -translate-y-1/2 text-neutral-token-7 hover:text-neutral-token-10 transition-colors"
|
|
49
|
+
tabindex="-1"
|
|
50
|
+
>
|
|
51
|
+
<IconX class="size-3.5"/>
|
|
52
|
+
</button>
|
|
53
|
+
{:else if suffix}
|
|
54
|
+
<span class="absolute right-3 top-1/2 -translate-y-1/2 text-neutral-token-7 pointer-events-none">
|
|
55
|
+
{@render suffix()}
|
|
56
|
+
</span>
|
|
57
|
+
{/if}
|
|
58
|
+
</div>
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
-
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLLabelAttributes } from "svelte/elements";
|
|
4
|
+
export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
size: {
|
|
6
|
+
sm: string;
|
|
7
|
+
md: string;
|
|
8
|
+
lg: string;
|
|
9
|
+
};
|
|
10
|
+
required: {
|
|
11
|
+
true: string;
|
|
12
|
+
};
|
|
13
|
+
}, undefined, "text-sm font-medium text-neutral-token-13 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50", {
|
|
14
|
+
size: {
|
|
15
|
+
sm: string;
|
|
16
|
+
md: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
};
|
|
19
|
+
required: {
|
|
20
|
+
true: string;
|
|
21
|
+
};
|
|
22
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
23
|
+
size: {
|
|
24
|
+
sm: string;
|
|
25
|
+
md: string;
|
|
26
|
+
lg: string;
|
|
27
|
+
};
|
|
28
|
+
required: {
|
|
29
|
+
true: string;
|
|
30
|
+
};
|
|
31
|
+
}, undefined, "text-sm font-medium text-neutral-token-13 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50", unknown, unknown, undefined>>;
|
|
3
32
|
type LabelVariants = VariantProps<typeof styles>;
|
|
4
|
-
export interface LabelProps extends LabelVariants {
|
|
5
|
-
children?:
|
|
33
|
+
export interface LabelProps extends HTMLLabelAttributes, LabelVariants {
|
|
34
|
+
children?: Snippet;
|
|
6
35
|
class?: string;
|
|
36
|
+
ref?: HTMLLabelElement | null;
|
|
7
37
|
}
|
|
8
38
|
export {};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const styles = tv({
|
|
3
|
-
base: '',
|
|
4
|
-
variants: {
|
|
3
|
+
base: 'text-sm font-medium text-neutral-token-13 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
4
|
+
variants: {
|
|
5
|
+
size: {
|
|
6
|
+
sm: 'text-xs',
|
|
7
|
+
md: 'text-sm',
|
|
8
|
+
lg: 'text-base',
|
|
9
|
+
},
|
|
10
|
+
required: {
|
|
11
|
+
true: "after:content-['*'] after:ml-0.5 after:text-error-500",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
5
14
|
compoundVariants: [],
|
|
6
|
-
defaultVariants: {
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: 'md',
|
|
17
|
+
},
|
|
7
18
|
});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Label as LabelPrimitive } from "bits-ui";
|
|
3
3
|
import { cn } from "../../utils";
|
|
4
|
+
import { type LabelProps, styles } from "./Label";
|
|
4
5
|
|
|
5
6
|
let {
|
|
6
7
|
ref = $bindable(null),
|
|
7
8
|
class: className,
|
|
9
|
+
size = 'md',
|
|
10
|
+
required,
|
|
8
11
|
...restProps
|
|
9
|
-
}:
|
|
12
|
+
}: LabelProps = $props();
|
|
10
13
|
</script>
|
|
11
14
|
|
|
12
15
|
<LabelPrimitive.Root
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...restProps}
|
|
16
|
+
bind:ref
|
|
17
|
+
class={cn(styles({ size, required }), className)}
|
|
18
|
+
{...restProps}
|
|
19
19
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const Label: import("svelte").Component<
|
|
1
|
+
import { type LabelProps } from "./Label";
|
|
2
|
+
declare const Label: import("svelte").Component<LabelProps, {}, "ref">;
|
|
3
3
|
type Label = ReturnType<typeof Label>;
|
|
4
4
|
export default Label;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", unknown, unknown, undefined>>;
|
|
3
5
|
type LanguagePickerButtonVariants = VariantProps<typeof styles>;
|
|
4
|
-
export interface LanguagePickerButtonProps extends LanguagePickerButtonVariants {
|
|
5
|
-
children?:
|
|
6
|
+
export interface LanguagePickerButtonProps extends HTMLButtonAttributes, LanguagePickerButtonVariants {
|
|
7
|
+
children?: Snippet;
|
|
6
8
|
class?: string;
|
|
7
9
|
language?: string;
|
|
8
10
|
supportLanguages?: string[];
|
|
9
11
|
basePath?: string;
|
|
10
12
|
open?: boolean;
|
|
13
|
+
ref?: HTMLButtonElement | null;
|
|
11
14
|
}
|
|
12
15
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", unknown, unknown, undefined>>;
|
|
3
5
|
type LightDarkToggleVariants = VariantProps<typeof styles>;
|
|
4
|
-
export interface LightDarkToggleProps extends LightDarkToggleVariants {
|
|
5
|
-
children?:
|
|
6
|
+
export interface LightDarkToggleProps extends HTMLButtonAttributes, LightDarkToggleVariants {
|
|
7
|
+
children?: Snippet;
|
|
6
8
|
class?: string;
|
|
9
|
+
ref?: HTMLButtonElement | null;
|
|
7
10
|
}
|
|
8
11
|
export {};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", unknown, unknown, undefined>>;
|
|
3
5
|
type PopoverVariants = VariantProps<typeof styles>;
|
|
4
|
-
export interface PopoverProps extends PopoverVariants {
|
|
5
|
-
children?:
|
|
6
|
+
export interface PopoverProps extends HTMLAttributes<HTMLDivElement>, PopoverVariants {
|
|
7
|
+
children?: Snippet;
|
|
6
8
|
class?: string;
|
|
7
|
-
triggerRef:
|
|
9
|
+
triggerRef: HTMLElement | null;
|
|
8
10
|
offset?: number;
|
|
9
11
|
padding?: number;
|
|
10
12
|
open?: boolean;
|
|
11
13
|
focusTriggerAfterClose?: boolean;
|
|
12
14
|
flip?: boolean;
|
|
13
15
|
autoTrigger?: boolean;
|
|
16
|
+
ref?: HTMLDivElement | null;
|
|
14
17
|
}
|
|
15
18
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", unknown, unknown, undefined>>;
|
|
3
5
|
type PopoverResponsiveVariants = VariantProps<typeof styles>;
|
|
4
|
-
export interface PopoverResponsiveProps extends PopoverResponsiveVariants {
|
|
5
|
-
children?:
|
|
6
|
+
export interface PopoverResponsiveProps extends HTMLAttributes<HTMLDivElement>, PopoverResponsiveVariants {
|
|
7
|
+
children?: Snippet;
|
|
6
8
|
class?: string;
|
|
9
|
+
ref?: HTMLDivElement | null;
|
|
7
10
|
}
|
|
8
11
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLSelectAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
3
5
|
variant: {
|
|
4
6
|
outlined: string;
|
|
@@ -14,7 +16,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
14
16
|
md: string;
|
|
15
17
|
lg: string;
|
|
16
18
|
};
|
|
17
|
-
|
|
19
|
+
status: {
|
|
20
|
+
error: string;
|
|
21
|
+
warning: string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-neutral-token-13 appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E)] bg-[length:16px] bg-[right_0.75rem_center] bg-no-repeat", {
|
|
18
24
|
variant: {
|
|
19
25
|
outlined: string;
|
|
20
26
|
filled: string;
|
|
@@ -29,6 +35,10 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
29
35
|
md: string;
|
|
30
36
|
lg: string;
|
|
31
37
|
};
|
|
38
|
+
status: {
|
|
39
|
+
error: string;
|
|
40
|
+
warning: string;
|
|
41
|
+
};
|
|
32
42
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
33
43
|
variant: {
|
|
34
44
|
outlined: string;
|
|
@@ -44,12 +54,16 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
44
54
|
md: string;
|
|
45
55
|
lg: string;
|
|
46
56
|
};
|
|
47
|
-
|
|
57
|
+
status: {
|
|
58
|
+
error: string;
|
|
59
|
+
warning: string;
|
|
60
|
+
};
|
|
61
|
+
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-neutral-token-13 appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E)] bg-[length:16px] bg-[right_0.75rem_center] bg-no-repeat", unknown, unknown, undefined>>;
|
|
48
62
|
type SelectVariants = VariantProps<typeof styles>;
|
|
49
|
-
export interface SelectProps extends SelectVariants {
|
|
50
|
-
children?:
|
|
63
|
+
export interface SelectProps extends Omit<HTMLSelectAttributes, 'disabled' | 'size' | 'value'>, SelectVariants {
|
|
64
|
+
children?: Snippet;
|
|
51
65
|
class?: string;
|
|
52
66
|
value?: string;
|
|
53
|
-
ref?:
|
|
67
|
+
ref?: HTMLSelectElement | null;
|
|
54
68
|
}
|
|
55
69
|
export {};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const styles = tv({
|
|
3
|
-
base: '
|
|
3
|
+
base: 'w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-neutral-token-13 appearance-none bg-[url(\'data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E)] bg-[length:16px] bg-[right_0.75rem_center] bg-no-repeat',
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
|
-
outlined: 'border border-neutral-token-5 bg-neutral-token-1
|
|
7
|
-
filled: 'bg-neutral-token-
|
|
8
|
-
borderless: 'bg-neutral-token-
|
|
6
|
+
outlined: 'border border-neutral-token-5 bg-neutral-token-1 hover:border-primary-500 focus:border-primary-600 focus:shadow-[0_0_0_2px_rgba(59,130,246,0.1)] transition-all duration-200',
|
|
7
|
+
filled: 'bg-neutral-token-3 border border-transparent hover:bg-neutral-token-4 focus:bg-neutral-token-1 focus:border-primary-600 focus:shadow-[0_0_0_2px_rgba(59,130,246,0.1)] transition-all duration-200',
|
|
8
|
+
borderless: 'bg-transparent border-0 hover:bg-neutral-token-2 focus:bg-neutral-token-2 transition-all duration-200',
|
|
9
9
|
},
|
|
10
10
|
disabled: {
|
|
11
|
-
true: 'cursor-not-allowed
|
|
12
|
-
false: 'cursor-
|
|
11
|
+
true: 'cursor-not-allowed bg-neutral-token-3 text-neutral-token-7 border-neutral-token-5',
|
|
12
|
+
false: 'cursor-pointer',
|
|
13
13
|
},
|
|
14
14
|
size: {
|
|
15
|
-
sm: 'h-6 px-
|
|
16
|
-
md: 'h-8 px-3 text-
|
|
17
|
-
lg: 'h-10 px-3 text-
|
|
15
|
+
sm: 'h-6 px-3 pr-8 text-sm',
|
|
16
|
+
md: 'h-8 px-3 pr-8 text-sm',
|
|
17
|
+
lg: 'h-10 px-3 pr-10 text-base',
|
|
18
|
+
},
|
|
19
|
+
status: {
|
|
20
|
+
error: 'border-error-500 hover:border-error-400 focus:border-error-500 focus:shadow-[0_0_0_2px_rgba(239,68,68,0.1)]',
|
|
21
|
+
warning: 'border-warning-500 hover:border-warning-400 focus:border-warning-500 focus:shadow-[0_0_0_2px_rgba(249,115,22,0.1)]',
|
|
18
22
|
},
|
|
19
23
|
},
|
|
20
24
|
compoundVariants: [
|
|
@@ -27,6 +31,11 @@ export const styles = tv({
|
|
|
27
31
|
variant: 'filled',
|
|
28
32
|
disabled: true,
|
|
29
33
|
class: 'hover:bg-neutral-token-3'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
variant: 'borderless',
|
|
37
|
+
disabled: true,
|
|
38
|
+
class: 'hover:bg-transparent'
|
|
30
39
|
}
|
|
31
40
|
],
|
|
32
41
|
defaultVariants: {
|
|
@@ -3,13 +3,26 @@
|
|
|
3
3
|
|
|
4
4
|
import {type SelectProps, styles} from "./Select";
|
|
5
5
|
|
|
6
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
children,
|
|
8
|
+
variant = 'outlined',
|
|
9
|
+
disabled,
|
|
10
|
+
size = 'md',
|
|
11
|
+
status,
|
|
12
|
+
class: className,
|
|
13
|
+
value = $bindable(),
|
|
14
|
+
ref = $bindable(),
|
|
15
|
+
...props
|
|
16
|
+
}: SelectProps = $props();
|
|
7
17
|
|
|
8
18
|
</script>
|
|
9
19
|
|
|
10
|
-
<select
|
|
11
|
-
|
|
12
|
-
|
|
20
|
+
<select
|
|
21
|
+
bind:this={ref}
|
|
22
|
+
bind:value
|
|
23
|
+
class={styles({ variant, disabled, size, status, className })}
|
|
24
|
+
{disabled}
|
|
25
|
+
{...props}
|
|
13
26
|
>
|
|
14
27
|
{@render children?.()}
|
|
15
28
|
</select>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './select.scss';
|
|
2
2
|
import { type SelectProps } from "./Select";
|
|
3
|
-
declare const Select: import("svelte").Component<SelectProps, {}, "value">;
|
|
3
|
+
declare const Select: import("svelte").Component<SelectProps, {}, "value" | "ref">;
|
|
4
4
|
type Select = ReturnType<typeof Select>;
|
|
5
5
|
export default Select;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", unknown, unknown, undefined>>;
|
|
3
5
|
type SideNavigationVariants = VariantProps<typeof styles>;
|
|
4
6
|
export type SideNavigationItem = {
|
|
@@ -7,13 +9,14 @@ export type SideNavigationItem = {
|
|
|
7
9
|
icon?: any;
|
|
8
10
|
title: string;
|
|
9
11
|
};
|
|
10
|
-
export interface SideNavigationProps extends SideNavigationVariants {
|
|
11
|
-
children?:
|
|
12
|
+
export interface SideNavigationProps extends HTMLAttributes<HTMLElement>, SideNavigationVariants {
|
|
13
|
+
children?: Snippet;
|
|
12
14
|
class?: string;
|
|
13
15
|
sideNavHref?: string;
|
|
14
16
|
language?: string;
|
|
15
17
|
items?: SideNavigationItem[];
|
|
16
|
-
bottomChildren?:
|
|
18
|
+
bottomChildren?: Snippet;
|
|
19
|
+
ref?: HTMLElement | null;
|
|
17
20
|
}
|
|
18
21
|
export declare const SCREEN_BREAK_POINTS: {
|
|
19
22
|
sm: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as SideNavigation } from './SideNavigation.svelte';
|
|
2
2
|
export { default as SideNavigationLayout } from './SideNavigationLayout.svelte';
|
|
3
3
|
export { toggleSideNavigation } from './SideNavigation';
|
|
4
|
-
export type { SideNavigationItem } from "./SideNavigation";
|
|
4
|
+
export type { SideNavigationItem, SideNavigationProps } from "./SideNavigation";
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
4
|
export declare const styles: import("tailwind-variants").TVReturnType<{}, undefined, "", {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "", unknown, unknown, undefined>>;
|
|
3
5
|
type SliderVariants = VariantProps<typeof styles>;
|
|
4
|
-
export interface SliderProps extends SliderVariants {
|
|
5
|
-
children?:
|
|
6
|
+
export interface SliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onchange'>, SliderVariants {
|
|
7
|
+
children?: Snippet;
|
|
6
8
|
class?: string;
|
|
7
9
|
min: number;
|
|
8
10
|
max: number;
|
|
9
11
|
step: number;
|
|
10
12
|
value: number;
|
|
11
|
-
showTicks
|
|
12
|
-
onchange
|
|
13
|
+
showTicks?: boolean;
|
|
14
|
+
onchange?: (value: number) => void;
|
|
15
|
+
ref?: HTMLDivElement | null;
|
|
13
16
|
}
|
|
14
17
|
export type SliderContextProps = {};
|
|
15
18
|
export {};
|