@rark-ui/themes 1.0.0
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/.tsbuildinfo +1 -0
- package/dist/default/crafts/addons/index.d.ts +2 -0
- package/dist/default/crafts/addons/index.js +2 -0
- package/dist/default/crafts/addons/v-title.d.ts +47 -0
- package/dist/default/crafts/addons/v-title.js +33 -0
- package/dist/default/crafts/addons/virtual.d.ts +112 -0
- package/dist/default/crafts/addons/virtual.js +86 -0
- package/dist/default/crafts/core/badge.d.ts +44 -0
- package/dist/default/crafts/core/badge.js +48 -0
- package/dist/default/crafts/core/button.d.ts +107 -0
- package/dist/default/crafts/core/button.js +60 -0
- package/dist/default/crafts/core/checkbox.d.ts +62 -0
- package/dist/default/crafts/core/checkbox.js +70 -0
- package/dist/default/crafts/core/collapsible.d.ts +111 -0
- package/dist/default/crafts/core/collapsible.js +55 -0
- package/dist/default/crafts/core/date-picker.d.ts +369 -0
- package/dist/default/crafts/core/date-picker.js +242 -0
- package/dist/default/crafts/core/dialog.d.ts +116 -0
- package/dist/default/crafts/core/dialog.js +95 -0
- package/dist/default/crafts/core/editable.d.ts +197 -0
- package/dist/default/crafts/core/editable.js +95 -0
- package/dist/default/crafts/core/floating-panel.d.ts +143 -0
- package/dist/default/crafts/core/floating-panel.js +63 -0
- package/dist/default/crafts/core/hotkey.d.ts +149 -0
- package/dist/default/crafts/core/hotkey.js +16 -0
- package/dist/default/crafts/core/hover-card.d.ts +50 -0
- package/dist/default/crafts/core/hover-card.js +75 -0
- package/dist/default/crafts/core/icon.d.ts +8 -0
- package/dist/default/crafts/core/icon.js +7 -0
- package/dist/default/crafts/core/index.d.ts +33 -0
- package/dist/default/crafts/core/index.js +33 -0
- package/dist/default/crafts/core/input.d.ts +77 -0
- package/dist/default/crafts/core/input.js +45 -0
- package/dist/default/crafts/core/menu.d.ts +71 -0
- package/dist/default/crafts/core/menu.js +111 -0
- package/dist/default/crafts/core/message.d.ts +131 -0
- package/dist/default/crafts/core/message.js +58 -0
- package/dist/default/crafts/core/number-input.d.ts +83 -0
- package/dist/default/crafts/core/number-input.js +42 -0
- package/dist/default/crafts/core/pagination.d.ts +190 -0
- package/dist/default/crafts/core/pagination.js +100 -0
- package/dist/default/crafts/core/popover.d.ts +104 -0
- package/dist/default/crafts/core/popover.js +66 -0
- package/dist/default/crafts/core/progress.d.ts +110 -0
- package/dist/default/crafts/core/progress.js +121 -0
- package/dist/default/crafts/core/radio-group.d.ts +119 -0
- package/dist/default/crafts/core/radio-group.js +92 -0
- package/dist/default/crafts/core/rating-group.d.ts +71 -0
- package/dist/default/crafts/core/rating-group.js +38 -0
- package/dist/default/crafts/core/scroll-area.d.ts +74 -0
- package/dist/default/crafts/core/scroll-area.js +109 -0
- package/dist/default/crafts/core/select.d.ts +146 -0
- package/dist/default/crafts/core/select.js +114 -0
- package/dist/default/crafts/core/skeleton.d.ts +35 -0
- package/dist/default/crafts/core/skeleton.js +15 -0
- package/dist/default/crafts/core/slider.d.ts +167 -0
- package/dist/default/crafts/core/slider.js +85 -0
- package/dist/default/crafts/core/spin.d.ts +102 -0
- package/dist/default/crafts/core/spin.js +56 -0
- package/dist/default/crafts/core/switch.d.ts +92 -0
- package/dist/default/crafts/core/switch.js +66 -0
- package/dist/default/crafts/core/tabs.d.ts +119 -0
- package/dist/default/crafts/core/tabs.js +116 -0
- package/dist/default/crafts/core/tags-input.d.ts +158 -0
- package/dist/default/crafts/core/tags-input.js +72 -0
- package/dist/default/crafts/core/toast.d.ts +137 -0
- package/dist/default/crafts/core/toast.js +62 -0
- package/dist/default/crafts/core/toggle-group.d.ts +92 -0
- package/dist/default/crafts/core/toggle-group.js +49 -0
- package/dist/default/crafts/core/toggle.d.ts +29 -0
- package/dist/default/crafts/core/toggle.js +29 -0
- package/dist/default/crafts/core/tooltip.d.ts +86 -0
- package/dist/default/crafts/core/tooltip.js +55 -0
- package/dist/default/crafts/core/tree.d.ts +208 -0
- package/dist/default/crafts/core/tree.js +145 -0
- package/dist/default/crafts/index.d.ts +4 -0
- package/dist/default/crafts/index.js +2 -0
- package/dist/default/index.d.ts +4 -0
- package/dist/default/index.js +3 -0
- package/dist/razer/crafts/addons/index.d.ts +1 -0
- package/dist/razer/crafts/addons/index.js +1 -0
- package/dist/razer/crafts/core/index.d.ts +15 -0
- package/dist/razer/crafts/core/index.js +15 -0
- package/dist/razer/crafts/index.d.ts +4 -0
- package/dist/razer/crafts/index.js +2 -0
- package/dist/razer/index.css +5233 -0
- package/dist/razer/index.d.ts +4 -0
- package/dist/razer/index.js +3 -0
- package/dist/shared/utils/cn.d.ts +1 -0
- package/dist/shared/utils/cn.js +1 -0
- package/dist/shared/utils/tv.d.ts +37 -0
- package/dist/shared/utils/tv.js +29 -0
- package/package.json +47 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { tv } from '../../../shared/utils/tv';
|
|
2
|
+
const prefix = 'rui-switch';
|
|
3
|
+
export const tvSwitch = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
'inline-flex',
|
|
7
|
+
'items-center',
|
|
8
|
+
'gap-2',
|
|
9
|
+
'w-fit',
|
|
10
|
+
'group/switch',
|
|
11
|
+
],
|
|
12
|
+
control: [
|
|
13
|
+
'block',
|
|
14
|
+
'shrink-0',
|
|
15
|
+
'rounded-full',
|
|
16
|
+
'border-2',
|
|
17
|
+
'transition-colors',
|
|
18
|
+
'disabled:opacity-(--disabled-opacity)',
|
|
19
|
+
],
|
|
20
|
+
thumb: [
|
|
21
|
+
'pointer-events-none',
|
|
22
|
+
'block',
|
|
23
|
+
'size-3.5',
|
|
24
|
+
'rounded-full',
|
|
25
|
+
'origin-center',
|
|
26
|
+
'transition-transform',
|
|
27
|
+
'data-[state=checked]:translate-x-full',
|
|
28
|
+
'data-[state=unchecked]:translate-x-0',
|
|
29
|
+
],
|
|
30
|
+
label: '',
|
|
31
|
+
},
|
|
32
|
+
variants: {
|
|
33
|
+
size: {
|
|
34
|
+
xs: {
|
|
35
|
+
control: 'w-7 h-4',
|
|
36
|
+
thumb: 'size-3',
|
|
37
|
+
label: 'text-xs',
|
|
38
|
+
},
|
|
39
|
+
sm: {
|
|
40
|
+
control: 'w-8 h-4.5',
|
|
41
|
+
thumb: 'size-3.5',
|
|
42
|
+
label: 'text-sm',
|
|
43
|
+
},
|
|
44
|
+
base: {
|
|
45
|
+
control: 'w-9 h-5',
|
|
46
|
+
thumb: 'size-4',
|
|
47
|
+
label: 'text-base',
|
|
48
|
+
},
|
|
49
|
+
lg: {
|
|
50
|
+
control: 'w-10 h-5.5',
|
|
51
|
+
thumb: 'size-4.5',
|
|
52
|
+
label: 'text-lg',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
size: 'base',
|
|
58
|
+
},
|
|
59
|
+
}, {
|
|
60
|
+
slots: {
|
|
61
|
+
root: prefix,
|
|
62
|
+
control: `${prefix}-control`,
|
|
63
|
+
thumb: `${prefix}-thumb`,
|
|
64
|
+
label: `${prefix}-label`,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../shared/utils/tv';
|
|
2
|
+
export declare const tvTabs: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: {
|
|
5
|
+
trigger: string;
|
|
6
|
+
};
|
|
7
|
+
sm: {
|
|
8
|
+
trigger: string;
|
|
9
|
+
};
|
|
10
|
+
base: {
|
|
11
|
+
trigger: string;
|
|
12
|
+
};
|
|
13
|
+
lg: {
|
|
14
|
+
trigger: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
orientation: {
|
|
18
|
+
horizontal: {
|
|
19
|
+
indicator: string;
|
|
20
|
+
};
|
|
21
|
+
vertical: {
|
|
22
|
+
indicator: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
prev: {
|
|
26
|
+
true: string;
|
|
27
|
+
false: string;
|
|
28
|
+
};
|
|
29
|
+
next: {
|
|
30
|
+
true: string;
|
|
31
|
+
false: string;
|
|
32
|
+
};
|
|
33
|
+
} & {
|
|
34
|
+
unstyled: {
|
|
35
|
+
true: import("tailwind-merge").ClassNameValue;
|
|
36
|
+
false: import("tailwind-merge").ClassNameValue;
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
root: string;
|
|
40
|
+
list: string[];
|
|
41
|
+
trigger: string[];
|
|
42
|
+
content: string[];
|
|
43
|
+
indicator: never[];
|
|
44
|
+
}, undefined, {
|
|
45
|
+
size: {
|
|
46
|
+
xs: {
|
|
47
|
+
trigger: string;
|
|
48
|
+
};
|
|
49
|
+
sm: {
|
|
50
|
+
trigger: string;
|
|
51
|
+
};
|
|
52
|
+
base: {
|
|
53
|
+
trigger: string;
|
|
54
|
+
};
|
|
55
|
+
lg: {
|
|
56
|
+
trigger: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
orientation: {
|
|
60
|
+
horizontal: {
|
|
61
|
+
indicator: string;
|
|
62
|
+
};
|
|
63
|
+
vertical: {
|
|
64
|
+
indicator: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
prev: {
|
|
68
|
+
true: string;
|
|
69
|
+
false: string;
|
|
70
|
+
};
|
|
71
|
+
next: {
|
|
72
|
+
true: string;
|
|
73
|
+
false: string;
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
root: string;
|
|
77
|
+
list: string[];
|
|
78
|
+
trigger: string[];
|
|
79
|
+
content: string[];
|
|
80
|
+
indicator: never[];
|
|
81
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
82
|
+
size: {
|
|
83
|
+
xs: {
|
|
84
|
+
trigger: string;
|
|
85
|
+
};
|
|
86
|
+
sm: {
|
|
87
|
+
trigger: string;
|
|
88
|
+
};
|
|
89
|
+
base: {
|
|
90
|
+
trigger: string;
|
|
91
|
+
};
|
|
92
|
+
lg: {
|
|
93
|
+
trigger: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
orientation: {
|
|
97
|
+
horizontal: {
|
|
98
|
+
indicator: string;
|
|
99
|
+
};
|
|
100
|
+
vertical: {
|
|
101
|
+
indicator: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
prev: {
|
|
105
|
+
true: string;
|
|
106
|
+
false: string;
|
|
107
|
+
};
|
|
108
|
+
next: {
|
|
109
|
+
true: string;
|
|
110
|
+
false: string;
|
|
111
|
+
};
|
|
112
|
+
}, {
|
|
113
|
+
root: string;
|
|
114
|
+
list: string[];
|
|
115
|
+
trigger: string[];
|
|
116
|
+
content: string[];
|
|
117
|
+
indicator: never[];
|
|
118
|
+
}, undefined, unknown, unknown>>;
|
|
119
|
+
export type TabsVariants = VariantProps<typeof tvTabs>;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { tv } from '../../../shared/utils/tv';
|
|
2
|
+
const prefix = 'rui-tabs';
|
|
3
|
+
export const tvTabs = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: '',
|
|
6
|
+
list: ['flex', 'items-center', 'relative', 'overflow-hidden'],
|
|
7
|
+
trigger: [
|
|
8
|
+
'inline-flex',
|
|
9
|
+
'items-center',
|
|
10
|
+
'justify-center',
|
|
11
|
+
'whitespace-nowrap',
|
|
12
|
+
'rounded',
|
|
13
|
+
'transition-all',
|
|
14
|
+
'outline-offset-[-2px]',
|
|
15
|
+
'disabled:pointer-events-none',
|
|
16
|
+
'disabled:opacity-(--disabled-opacity)',
|
|
17
|
+
],
|
|
18
|
+
content: ['mt-2'],
|
|
19
|
+
indicator: [],
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
xs: {
|
|
24
|
+
trigger: 'text-xs',
|
|
25
|
+
},
|
|
26
|
+
sm: {
|
|
27
|
+
trigger: 'text-sm',
|
|
28
|
+
},
|
|
29
|
+
base: {
|
|
30
|
+
trigger: 'text-base',
|
|
31
|
+
},
|
|
32
|
+
lg: {
|
|
33
|
+
trigger: 'text-lg',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
orientation: {
|
|
37
|
+
horizontal: {
|
|
38
|
+
indicator: 'w-(--width) bottom-0',
|
|
39
|
+
},
|
|
40
|
+
vertical: {
|
|
41
|
+
indicator: 'h-(--height)',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
prev: {
|
|
45
|
+
true: '',
|
|
46
|
+
false: '',
|
|
47
|
+
},
|
|
48
|
+
next: {
|
|
49
|
+
true: '',
|
|
50
|
+
false: '',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
compoundVariants: [
|
|
54
|
+
// horizontal
|
|
55
|
+
{
|
|
56
|
+
orientation: 'horizontal',
|
|
57
|
+
size: 'xs',
|
|
58
|
+
class: {
|
|
59
|
+
trigger: 'px-3 py-2',
|
|
60
|
+
indicator: 'h-0.5',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
orientation: 'horizontal',
|
|
65
|
+
size: 'sm',
|
|
66
|
+
class: {
|
|
67
|
+
trigger: 'px-3.5 py-2.5',
|
|
68
|
+
indicator: 'h-0.75',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
orientation: 'horizontal',
|
|
73
|
+
size: 'base',
|
|
74
|
+
class: {
|
|
75
|
+
trigger: 'px-4 py-3',
|
|
76
|
+
indicator: 'h-1',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
orientation: 'horizontal',
|
|
81
|
+
size: 'lg',
|
|
82
|
+
class: {
|
|
83
|
+
trigger: 'px-4.5 py-3.5',
|
|
84
|
+
indicator: 'h-1.25',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
orientation: 'horizontal',
|
|
89
|
+
prev: true,
|
|
90
|
+
class: {
|
|
91
|
+
content: 'data-[state=open]:-motion-translate-x-in data-[state=open]:motion-opacity-in',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
orientation: 'horizontal',
|
|
96
|
+
next: true,
|
|
97
|
+
class: {
|
|
98
|
+
content: 'data-[state=open]:motion-translate-x-in data-[state=open]:motion-opacity-in',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
defaultVariants: {
|
|
103
|
+
size: 'base',
|
|
104
|
+
orientation: 'horizontal',
|
|
105
|
+
prev: false,
|
|
106
|
+
next: false,
|
|
107
|
+
},
|
|
108
|
+
}, {
|
|
109
|
+
slots: {
|
|
110
|
+
root: prefix,
|
|
111
|
+
list: `${prefix}-list`,
|
|
112
|
+
trigger: `${prefix}-trigger`,
|
|
113
|
+
content: `${prefix}-content`,
|
|
114
|
+
indicator: `${prefix}-indicator`,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../shared/utils/tv';
|
|
2
|
+
export declare const tvTagsInput: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: {
|
|
5
|
+
input: string;
|
|
6
|
+
itemPreview: string;
|
|
7
|
+
itemInput: string;
|
|
8
|
+
};
|
|
9
|
+
sm: {
|
|
10
|
+
input: string;
|
|
11
|
+
itemPreview: string;
|
|
12
|
+
itemInput: string;
|
|
13
|
+
};
|
|
14
|
+
base: {
|
|
15
|
+
input: string;
|
|
16
|
+
itemPreview: string;
|
|
17
|
+
itemInput: string;
|
|
18
|
+
};
|
|
19
|
+
lg: {
|
|
20
|
+
input: string;
|
|
21
|
+
itemPreview: string;
|
|
22
|
+
itemInput: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
inline: {
|
|
26
|
+
true: {
|
|
27
|
+
control: string[];
|
|
28
|
+
scrollArea: string[];
|
|
29
|
+
scrollAreaContent: string[];
|
|
30
|
+
input: string[];
|
|
31
|
+
itemText: string;
|
|
32
|
+
};
|
|
33
|
+
false: {
|
|
34
|
+
control: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
empty: {
|
|
38
|
+
true: {
|
|
39
|
+
scrollArea: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
} & {
|
|
43
|
+
unstyled: {
|
|
44
|
+
true: import("tailwind-merge").ClassNameValue;
|
|
45
|
+
false: import("tailwind-merge").ClassNameValue;
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
root: string[];
|
|
49
|
+
control: string[];
|
|
50
|
+
scrollArea: string;
|
|
51
|
+
scrollAreaContent: string;
|
|
52
|
+
input: string[];
|
|
53
|
+
item: string;
|
|
54
|
+
itemPreview: string;
|
|
55
|
+
itemInput: string;
|
|
56
|
+
itemText: string;
|
|
57
|
+
}, undefined, {
|
|
58
|
+
size: {
|
|
59
|
+
xs: {
|
|
60
|
+
input: string;
|
|
61
|
+
itemPreview: string;
|
|
62
|
+
itemInput: string;
|
|
63
|
+
};
|
|
64
|
+
sm: {
|
|
65
|
+
input: string;
|
|
66
|
+
itemPreview: string;
|
|
67
|
+
itemInput: string;
|
|
68
|
+
};
|
|
69
|
+
base: {
|
|
70
|
+
input: string;
|
|
71
|
+
itemPreview: string;
|
|
72
|
+
itemInput: string;
|
|
73
|
+
};
|
|
74
|
+
lg: {
|
|
75
|
+
input: string;
|
|
76
|
+
itemPreview: string;
|
|
77
|
+
itemInput: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
inline: {
|
|
81
|
+
true: {
|
|
82
|
+
control: string[];
|
|
83
|
+
scrollArea: string[];
|
|
84
|
+
scrollAreaContent: string[];
|
|
85
|
+
input: string[];
|
|
86
|
+
itemText: string;
|
|
87
|
+
};
|
|
88
|
+
false: {
|
|
89
|
+
control: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
empty: {
|
|
93
|
+
true: {
|
|
94
|
+
scrollArea: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
}, {
|
|
98
|
+
root: string[];
|
|
99
|
+
control: string[];
|
|
100
|
+
scrollArea: string;
|
|
101
|
+
scrollAreaContent: string;
|
|
102
|
+
input: string[];
|
|
103
|
+
item: string;
|
|
104
|
+
itemPreview: string;
|
|
105
|
+
itemInput: string;
|
|
106
|
+
itemText: string;
|
|
107
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
108
|
+
size: {
|
|
109
|
+
xs: {
|
|
110
|
+
input: string;
|
|
111
|
+
itemPreview: string;
|
|
112
|
+
itemInput: string;
|
|
113
|
+
};
|
|
114
|
+
sm: {
|
|
115
|
+
input: string;
|
|
116
|
+
itemPreview: string;
|
|
117
|
+
itemInput: string;
|
|
118
|
+
};
|
|
119
|
+
base: {
|
|
120
|
+
input: string;
|
|
121
|
+
itemPreview: string;
|
|
122
|
+
itemInput: string;
|
|
123
|
+
};
|
|
124
|
+
lg: {
|
|
125
|
+
input: string;
|
|
126
|
+
itemPreview: string;
|
|
127
|
+
itemInput: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
inline: {
|
|
131
|
+
true: {
|
|
132
|
+
control: string[];
|
|
133
|
+
scrollArea: string[];
|
|
134
|
+
scrollAreaContent: string[];
|
|
135
|
+
input: string[];
|
|
136
|
+
itemText: string;
|
|
137
|
+
};
|
|
138
|
+
false: {
|
|
139
|
+
control: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
empty: {
|
|
143
|
+
true: {
|
|
144
|
+
scrollArea: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}, {
|
|
148
|
+
root: string[];
|
|
149
|
+
control: string[];
|
|
150
|
+
scrollArea: string;
|
|
151
|
+
scrollAreaContent: string;
|
|
152
|
+
input: string[];
|
|
153
|
+
item: string;
|
|
154
|
+
itemPreview: string;
|
|
155
|
+
itemInput: string;
|
|
156
|
+
itemText: string;
|
|
157
|
+
}, undefined, unknown, unknown>>;
|
|
158
|
+
export type TagsInputVariants = VariantProps<typeof tvTagsInput>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { tv } from '../../../shared/utils/tv';
|
|
2
|
+
const prefix = 'rui-tags-input';
|
|
3
|
+
export const tvTagsInput = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: ['flex flex-col'],
|
|
6
|
+
control: ['flex', 'items-center'],
|
|
7
|
+
scrollArea: '',
|
|
8
|
+
scrollAreaContent: '',
|
|
9
|
+
input: ['focus:outline-none', 'bg-transparent'],
|
|
10
|
+
item: '',
|
|
11
|
+
itemPreview: 'flex items-center gap-1 rounded-full cursor-default',
|
|
12
|
+
itemInput: 'p-0 w-fit min-w-0 outline-none',
|
|
13
|
+
itemText: '',
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
xs: {
|
|
18
|
+
input: 'text-xs',
|
|
19
|
+
itemPreview: 'text-xs px-1.5',
|
|
20
|
+
itemInput: 'text-xs px-0.5',
|
|
21
|
+
},
|
|
22
|
+
sm: {
|
|
23
|
+
input: 'text-sm',
|
|
24
|
+
itemPreview: 'text-sm px-2',
|
|
25
|
+
itemInput: 'text-sm px-1',
|
|
26
|
+
},
|
|
27
|
+
base: {
|
|
28
|
+
input: 'text-base',
|
|
29
|
+
itemPreview: 'text-base px-2.5',
|
|
30
|
+
itemInput: 'text-base px-1.5',
|
|
31
|
+
},
|
|
32
|
+
lg: {
|
|
33
|
+
input: 'text-lg',
|
|
34
|
+
itemPreview: 'text-lg px-2.5',
|
|
35
|
+
itemInput: 'text-lg px-1.5',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
inline: {
|
|
39
|
+
true: {
|
|
40
|
+
control: ['flex-nowrap', 'p-0', 'gap-0'],
|
|
41
|
+
scrollArea: ['flex-shrink-0', 'py-1.5', 'px-2', 'max-w-[calc(100%-var(--spacing)*10)]'],
|
|
42
|
+
scrollAreaContent: ['flex', 'flex-nowrap', 'gap-2'],
|
|
43
|
+
input: ['flex-shrink-1', 'py-1.5', 'px-2', 'min-w-5'],
|
|
44
|
+
itemText: 'whitespace-nowrap',
|
|
45
|
+
},
|
|
46
|
+
false: {
|
|
47
|
+
control: 'flex-wrap',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
empty: {
|
|
51
|
+
true: {
|
|
52
|
+
scrollArea: 'p-0',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
size: 'base',
|
|
58
|
+
inline: true,
|
|
59
|
+
},
|
|
60
|
+
}, {
|
|
61
|
+
slots: {
|
|
62
|
+
root: prefix,
|
|
63
|
+
control: `${prefix}-control`,
|
|
64
|
+
input: `${prefix}-input`,
|
|
65
|
+
scrollArea: `${prefix}-scroll-area`,
|
|
66
|
+
scrollAreaContent: `${prefix}-scroll-area-content`,
|
|
67
|
+
item: `${prefix}-item`,
|
|
68
|
+
itemPreview: `${prefix}-item-preview`,
|
|
69
|
+
itemInput: `${prefix}-item-input`,
|
|
70
|
+
itemText: `${prefix}-item-text`,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../shared/utils/tv';
|
|
2
|
+
export declare const tvToast: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: {
|
|
5
|
+
content: string;
|
|
6
|
+
inner: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
close: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
sm: {
|
|
13
|
+
content: string;
|
|
14
|
+
inner: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
close: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
base: {
|
|
21
|
+
content: string;
|
|
22
|
+
inner: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
close: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
lg: {
|
|
29
|
+
content: string;
|
|
30
|
+
inner: string;
|
|
31
|
+
icon: string;
|
|
32
|
+
close: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
} & {
|
|
38
|
+
unstyled: {
|
|
39
|
+
true: import("tailwind-merge").ClassNameValue;
|
|
40
|
+
false: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
root: string[];
|
|
44
|
+
content: string[];
|
|
45
|
+
inner: string;
|
|
46
|
+
title: string;
|
|
47
|
+
description: string;
|
|
48
|
+
icon: string;
|
|
49
|
+
close: string;
|
|
50
|
+
}, undefined, {
|
|
51
|
+
size: {
|
|
52
|
+
xs: {
|
|
53
|
+
content: string;
|
|
54
|
+
inner: string;
|
|
55
|
+
icon: string;
|
|
56
|
+
close: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
sm: {
|
|
61
|
+
content: string;
|
|
62
|
+
inner: string;
|
|
63
|
+
icon: string;
|
|
64
|
+
close: string;
|
|
65
|
+
title: string;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
base: {
|
|
69
|
+
content: string;
|
|
70
|
+
inner: string;
|
|
71
|
+
icon: string;
|
|
72
|
+
close: string;
|
|
73
|
+
title: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
lg: {
|
|
77
|
+
content: string;
|
|
78
|
+
inner: string;
|
|
79
|
+
icon: string;
|
|
80
|
+
close: string;
|
|
81
|
+
title: string;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}, {
|
|
86
|
+
root: string[];
|
|
87
|
+
content: string[];
|
|
88
|
+
inner: string;
|
|
89
|
+
title: string;
|
|
90
|
+
description: string;
|
|
91
|
+
icon: string;
|
|
92
|
+
close: string;
|
|
93
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
94
|
+
size: {
|
|
95
|
+
xs: {
|
|
96
|
+
content: string;
|
|
97
|
+
inner: string;
|
|
98
|
+
icon: string;
|
|
99
|
+
close: string;
|
|
100
|
+
title: string;
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
103
|
+
sm: {
|
|
104
|
+
content: string;
|
|
105
|
+
inner: string;
|
|
106
|
+
icon: string;
|
|
107
|
+
close: string;
|
|
108
|
+
title: string;
|
|
109
|
+
description: string;
|
|
110
|
+
};
|
|
111
|
+
base: {
|
|
112
|
+
content: string;
|
|
113
|
+
inner: string;
|
|
114
|
+
icon: string;
|
|
115
|
+
close: string;
|
|
116
|
+
title: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
lg: {
|
|
120
|
+
content: string;
|
|
121
|
+
inner: string;
|
|
122
|
+
icon: string;
|
|
123
|
+
close: string;
|
|
124
|
+
title: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
}, {
|
|
129
|
+
root: string[];
|
|
130
|
+
content: string[];
|
|
131
|
+
inner: string;
|
|
132
|
+
title: string;
|
|
133
|
+
description: string;
|
|
134
|
+
icon: string;
|
|
135
|
+
close: string;
|
|
136
|
+
}, undefined, unknown, unknown>>;
|
|
137
|
+
export type ToastVariants = VariantProps<typeof tvToast>;
|