tera-system-ui 0.0.65 → 0.0.67
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/input/Input.js +3 -3
- package/dist/components/select/Select.d.ts +115 -0
- package/dist/components/select/Select.js +36 -0
- package/dist/components/select/Select.svelte +14 -0
- package/dist/components/select/Select.svelte.d.ts +4 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/select.scss +5 -0
- package/dist/components/side-navigation/SideNavigation.svelte +1 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -3,9 +3,9 @@ export const styles = tv({
|
|
|
3
3
|
base: 'relative w-full inline-flex items-center justify-center rounded outline-none transition-all duration-element-react ring-primary-token-5/50',
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
|
-
outlined: 'border border-neutral-token-5 bg-
|
|
7
|
-
filled: 'bg-neutral-token-3 border border-neutral-token-
|
|
8
|
-
borderless: 'bg-
|
|
6
|
+
outlined: 'border border-neutral-token-5 bg-neutral-token-1 focus:border-primary-token-6 hover:border-primary-token-5 focus-visible:ring-2',
|
|
7
|
+
filled: 'bg-neutral-token-3 border border-neutral-token-4 focus:bg-neutral-token-1 focus:border-primary-token-6 hover:bg-neutral-token-4 focus-visible:ring-2',
|
|
8
|
+
borderless: 'bg-neutral-token-1 border-0',
|
|
9
9
|
},
|
|
10
10
|
disabled: {
|
|
11
11
|
true: 'cursor-not-allowed opacity-70 text-neutral-token-10',
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
outlined: string;
|
|
5
|
+
filled: string;
|
|
6
|
+
borderless: string;
|
|
7
|
+
};
|
|
8
|
+
disabled: {
|
|
9
|
+
true: string;
|
|
10
|
+
false: string;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
sm: string;
|
|
14
|
+
md: string;
|
|
15
|
+
lg: string;
|
|
16
|
+
};
|
|
17
|
+
}, undefined, "relative w-full inline-flex items-center justify-center rounded outline-none transition-all duration-element-react ring-primary-token-5/50", import("tailwind-variants/dist/config").TVConfig<{
|
|
18
|
+
variant: {
|
|
19
|
+
outlined: string;
|
|
20
|
+
filled: string;
|
|
21
|
+
borderless: string;
|
|
22
|
+
};
|
|
23
|
+
disabled: {
|
|
24
|
+
true: string;
|
|
25
|
+
false: string;
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
sm: string;
|
|
29
|
+
md: string;
|
|
30
|
+
lg: string;
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
variant: {
|
|
34
|
+
outlined: string;
|
|
35
|
+
filled: string;
|
|
36
|
+
borderless: string;
|
|
37
|
+
};
|
|
38
|
+
disabled: {
|
|
39
|
+
true: string;
|
|
40
|
+
false: string;
|
|
41
|
+
};
|
|
42
|
+
size: {
|
|
43
|
+
sm: string;
|
|
44
|
+
md: string;
|
|
45
|
+
lg: string;
|
|
46
|
+
};
|
|
47
|
+
}>, {
|
|
48
|
+
variant: {
|
|
49
|
+
outlined: string;
|
|
50
|
+
filled: string;
|
|
51
|
+
borderless: string;
|
|
52
|
+
};
|
|
53
|
+
disabled: {
|
|
54
|
+
true: string;
|
|
55
|
+
false: string;
|
|
56
|
+
};
|
|
57
|
+
size: {
|
|
58
|
+
sm: string;
|
|
59
|
+
md: string;
|
|
60
|
+
lg: string;
|
|
61
|
+
};
|
|
62
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
63
|
+
variant: {
|
|
64
|
+
outlined: string;
|
|
65
|
+
filled: string;
|
|
66
|
+
borderless: string;
|
|
67
|
+
};
|
|
68
|
+
disabled: {
|
|
69
|
+
true: string;
|
|
70
|
+
false: string;
|
|
71
|
+
};
|
|
72
|
+
size: {
|
|
73
|
+
sm: string;
|
|
74
|
+
md: string;
|
|
75
|
+
lg: string;
|
|
76
|
+
};
|
|
77
|
+
}, undefined, "relative w-full inline-flex items-center justify-center rounded outline-none transition-all duration-element-react ring-primary-token-5/50", import("tailwind-variants/dist/config").TVConfig<{
|
|
78
|
+
variant: {
|
|
79
|
+
outlined: string;
|
|
80
|
+
filled: string;
|
|
81
|
+
borderless: string;
|
|
82
|
+
};
|
|
83
|
+
disabled: {
|
|
84
|
+
true: string;
|
|
85
|
+
false: string;
|
|
86
|
+
};
|
|
87
|
+
size: {
|
|
88
|
+
sm: string;
|
|
89
|
+
md: string;
|
|
90
|
+
lg: string;
|
|
91
|
+
};
|
|
92
|
+
}, {
|
|
93
|
+
variant: {
|
|
94
|
+
outlined: string;
|
|
95
|
+
filled: string;
|
|
96
|
+
borderless: string;
|
|
97
|
+
};
|
|
98
|
+
disabled: {
|
|
99
|
+
true: string;
|
|
100
|
+
false: string;
|
|
101
|
+
};
|
|
102
|
+
size: {
|
|
103
|
+
sm: string;
|
|
104
|
+
md: string;
|
|
105
|
+
lg: string;
|
|
106
|
+
};
|
|
107
|
+
}>, unknown, unknown, undefined>>;
|
|
108
|
+
type SelectVariants = VariantProps<typeof styles>;
|
|
109
|
+
export interface SelectProps extends SelectVariants {
|
|
110
|
+
children?: any;
|
|
111
|
+
class?: string;
|
|
112
|
+
value?: string;
|
|
113
|
+
ref?: HTMLInputElement;
|
|
114
|
+
}
|
|
115
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export const styles = tv({
|
|
3
|
+
base: 'relative w-full inline-flex items-center justify-center rounded outline-none transition-all duration-element-react ring-primary-token-5/50',
|
|
4
|
+
variants: {
|
|
5
|
+
variant: {
|
|
6
|
+
outlined: 'border border-neutral-token-5 bg-neutral-token-1 focus:border-primary-token-6 hover:border-primary-token-5 focus-visible:ring-2',
|
|
7
|
+
filled: 'bg-neutral-token-3 border border-neutral-token-4 focus:bg-neutral-token-1 focus:border-primary-token-6 hover:bg-neutral-token-4 focus-visible:ring-2',
|
|
8
|
+
borderless: 'bg-neutral-token-1 border-0',
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
true: 'cursor-not-allowed opacity-70 text-neutral-token-10',
|
|
12
|
+
false: 'cursor-text',
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
sm: 'h-6 px-2 text-sm',
|
|
16
|
+
md: 'h-8 px-3 text-base',
|
|
17
|
+
lg: 'h-10 px-3 text-lg',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
compoundVariants: [
|
|
21
|
+
{
|
|
22
|
+
variant: 'outlined',
|
|
23
|
+
disabled: true,
|
|
24
|
+
class: 'hover:border-neutral-token-5'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
variant: 'filled',
|
|
28
|
+
disabled: true,
|
|
29
|
+
class: 'hover:bg-neutral-token-3'
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: 'outlined',
|
|
34
|
+
size: 'md'
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import './select.scss'
|
|
3
|
+
|
|
4
|
+
import {type SelectProps, styles} from "./Select";
|
|
5
|
+
|
|
6
|
+
let {children, variant, disabled, size, class: className, ...props}: SelectProps = $props();
|
|
7
|
+
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<select {...props}
|
|
11
|
+
class={"tera-select pr-3" + styles({ variant, disabled , size, className: className})}
|
|
12
|
+
>
|
|
13
|
+
{@render children?.()}
|
|
14
|
+
</select>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Select } from './Select.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Select } from './Select.svelte';
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { LanguagePickerButton } from './components/language-picker-button';
|
|
|
14
14
|
export { LightDarkToggle } from './components/light-dark-toggle';
|
|
15
15
|
export { Popover } from './components/popover';
|
|
16
16
|
export { PopoverResponsive } from './components/popover-responsive';
|
|
17
|
+
export { Select } from './components/select';
|
|
17
18
|
export { SideNavigation, SideNavigationLayout, toggleSideNavigation } from './components/side-navigation';
|
|
18
19
|
export { Slider } from './components/slider';
|
|
19
20
|
export { StarRating } from './components/star-rating';
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { LanguagePickerButton } from './components/language-picker-button';
|
|
|
14
14
|
export { LightDarkToggle } from './components/light-dark-toggle';
|
|
15
15
|
export { Popover } from './components/popover';
|
|
16
16
|
export { PopoverResponsive } from './components/popover-responsive';
|
|
17
|
+
export { Select } from './components/select';
|
|
17
18
|
export { SideNavigation, SideNavigationLayout, toggleSideNavigation } from './components/side-navigation';
|
|
18
19
|
export { Slider } from './components/slider';
|
|
19
20
|
export { StarRating } from './components/star-rating';
|