@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,114 @@
|
|
|
1
|
+
import { tv } from '../../../shared/utils/tv';
|
|
2
|
+
const prefix = 'rui-select';
|
|
3
|
+
export const tvSelect = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: '',
|
|
6
|
+
trigger: [
|
|
7
|
+
'group',
|
|
8
|
+
'flex',
|
|
9
|
+
'items-center',
|
|
10
|
+
'min-w-[10.875rem]',
|
|
11
|
+
'rounded',
|
|
12
|
+
'gap-1.5',
|
|
13
|
+
'px-2',
|
|
14
|
+
'py-1.5',
|
|
15
|
+
'text-start',
|
|
16
|
+
'transition-colors',
|
|
17
|
+
'data-[disabled]:pointer-events-none',
|
|
18
|
+
'data-[disabled]:opacity-(--disabled-opacity)',
|
|
19
|
+
],
|
|
20
|
+
indicator: ['data-[state=open]:rotate-180', 'transition-transform'],
|
|
21
|
+
value: 'flex-1 flex items-center [&>span]:truncate',
|
|
22
|
+
content: [
|
|
23
|
+
'relative',
|
|
24
|
+
'z-auto',
|
|
25
|
+
'min-w-(--reference-width)',
|
|
26
|
+
'rounded',
|
|
27
|
+
'p-0',
|
|
28
|
+
'z-(--z-popover)',
|
|
29
|
+
'data-[state=open]:motion-opacity-in',
|
|
30
|
+
'data-[state=open]:motion-scale-in-95',
|
|
31
|
+
'data-[state=open]:data-[placement^=bottom]:motion-translate-y-in-[.25rem]',
|
|
32
|
+
'data-[state=open]:data-[placement^=top]:-motion-translate-y-in-[.25rem]',
|
|
33
|
+
'data-[state=open]:data-[placement^=left]:-motion-translate-x-in-[.25rem]',
|
|
34
|
+
'data-[state=open]:data-[placement^=right]:motion-translate-x-in-[.25rem]',
|
|
35
|
+
'data-[state=closed]:motion-opacity-out',
|
|
36
|
+
'data-[state=closed]:motion-scale-out-95',
|
|
37
|
+
'data-[state=closed]:data-[placement^=bottom]:motion-translate-y-out-[.25rem]',
|
|
38
|
+
'data-[state=closed]:data-[placement^=top]:-motion-translate-y-out-[.25rem]',
|
|
39
|
+
'data-[state=closed]:data-[placement^=left]:-motion-translate-x-out-[.25rem]',
|
|
40
|
+
'data-[state=closed]:data-[placement^=right]:motion-translate-x-out-[.25rem]',
|
|
41
|
+
],
|
|
42
|
+
contentInner: '',
|
|
43
|
+
item: [
|
|
44
|
+
'w-full',
|
|
45
|
+
'relative',
|
|
46
|
+
'flex',
|
|
47
|
+
'items-center',
|
|
48
|
+
'justify-between',
|
|
49
|
+
'gap-2',
|
|
50
|
+
'rounded',
|
|
51
|
+
'cursor-default',
|
|
52
|
+
'select-none',
|
|
53
|
+
'data-[disabled]:pointer-events-none',
|
|
54
|
+
'data-[disabled]:opacity-(--disabled-opacity)',
|
|
55
|
+
],
|
|
56
|
+
itemIndicator: '[&_path]:animate-check-dash',
|
|
57
|
+
itemGroup: '',
|
|
58
|
+
itemGroupLabel: 'relative border-b',
|
|
59
|
+
clearTrigger: ['flex', 'items-center', 'justify-center'],
|
|
60
|
+
},
|
|
61
|
+
variants: {
|
|
62
|
+
size: {
|
|
63
|
+
xs: {
|
|
64
|
+
trigger: 'text-xs',
|
|
65
|
+
item: 'text-xs px-1.5 py-1',
|
|
66
|
+
contentInner: 'px-1.5 py-1',
|
|
67
|
+
itemGroupLabel: 'text-sm px-1.5 py-1.5 mb-1.5',
|
|
68
|
+
},
|
|
69
|
+
sm: {
|
|
70
|
+
trigger: 'text-sm',
|
|
71
|
+
item: 'text-sm px-2 py-1.5',
|
|
72
|
+
contentInner: 'px-2 py-1.5',
|
|
73
|
+
itemGroupLabel: 'text-base px-2 py-2 mb-2',
|
|
74
|
+
},
|
|
75
|
+
base: {
|
|
76
|
+
trigger: 'text-base',
|
|
77
|
+
item: 'text-base px-2.5 py-1.5',
|
|
78
|
+
contentInner: 'px-2.5 py-1.5',
|
|
79
|
+
itemGroupLabel: 'text-xl px-2.5 py-2.5 mb-2.5',
|
|
80
|
+
},
|
|
81
|
+
lg: {
|
|
82
|
+
trigger: 'text-lg',
|
|
83
|
+
item: 'text-lg px-3 py-2',
|
|
84
|
+
contentInner: 'px-3 py-2',
|
|
85
|
+
itemGroupLabel: 'text-xl px-3 py-3 mb-3',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
bordered: {
|
|
89
|
+
true: {
|
|
90
|
+
trigger: 'border',
|
|
91
|
+
content: 'border',
|
|
92
|
+
},
|
|
93
|
+
false: '',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
defaultVariants: {
|
|
97
|
+
size: 'base',
|
|
98
|
+
bordered: true,
|
|
99
|
+
},
|
|
100
|
+
}, {
|
|
101
|
+
slots: {
|
|
102
|
+
root: prefix,
|
|
103
|
+
trigger: `${prefix}-trigger`,
|
|
104
|
+
indicator: `${prefix}-indicator`,
|
|
105
|
+
content: `${prefix}-content`,
|
|
106
|
+
contentInner: `${prefix}-content-inner`,
|
|
107
|
+
value: `${prefix}-value`,
|
|
108
|
+
item: `${prefix}-item`,
|
|
109
|
+
itemIndicator: `${prefix}-item-indicator`,
|
|
110
|
+
itemGroup: `${prefix}-item-group`,
|
|
111
|
+
itemGroupLabel: `${prefix}-item-group-label`,
|
|
112
|
+
clearTrigger: `${prefix}-clear-trigger`,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../shared/utils/tv';
|
|
2
|
+
export declare const tvSkeleton: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
pulse: string;
|
|
5
|
+
wave: string;
|
|
6
|
+
};
|
|
7
|
+
shape: {
|
|
8
|
+
rect: string;
|
|
9
|
+
circle: string;
|
|
10
|
+
};
|
|
11
|
+
} & {
|
|
12
|
+
unstyled: {
|
|
13
|
+
true: import("tailwind-merge").ClassNameValue;
|
|
14
|
+
false: import("tailwind-merge").ClassNameValue;
|
|
15
|
+
};
|
|
16
|
+
}, undefined, "", {
|
|
17
|
+
variant: {
|
|
18
|
+
pulse: string;
|
|
19
|
+
wave: string;
|
|
20
|
+
};
|
|
21
|
+
shape: {
|
|
22
|
+
rect: string;
|
|
23
|
+
circle: string;
|
|
24
|
+
};
|
|
25
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
26
|
+
variant: {
|
|
27
|
+
pulse: string;
|
|
28
|
+
wave: string;
|
|
29
|
+
};
|
|
30
|
+
shape: {
|
|
31
|
+
rect: string;
|
|
32
|
+
circle: string;
|
|
33
|
+
};
|
|
34
|
+
}, undefined, "", unknown, unknown>>;
|
|
35
|
+
export type SkeletonVariants = VariantProps<typeof tvSkeleton>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { tv } from '../../../shared/utils/tv';
|
|
2
|
+
const prefix = 'rui-skeleton';
|
|
3
|
+
export const tvSkeleton = tv({
|
|
4
|
+
base: '',
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
pulse: 'animate-pulse',
|
|
8
|
+
wave: 'animate-skeleton-wave animate-infinite',
|
|
9
|
+
},
|
|
10
|
+
shape: {
|
|
11
|
+
rect: 'rounded',
|
|
12
|
+
circle: 'rounded-full',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
}, { class: prefix });
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../shared/utils/tv';
|
|
2
|
+
export declare const tvSlider: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: {
|
|
5
|
+
control: string;
|
|
6
|
+
track: string;
|
|
7
|
+
range: string;
|
|
8
|
+
thumb: string[];
|
|
9
|
+
markerDot: string;
|
|
10
|
+
};
|
|
11
|
+
sm: {
|
|
12
|
+
control: string;
|
|
13
|
+
track: string;
|
|
14
|
+
range: string;
|
|
15
|
+
thumb: string[];
|
|
16
|
+
markerDot: string;
|
|
17
|
+
};
|
|
18
|
+
base: {
|
|
19
|
+
control: string;
|
|
20
|
+
track: string;
|
|
21
|
+
range: string;
|
|
22
|
+
thumb: string[];
|
|
23
|
+
markerDot: string;
|
|
24
|
+
};
|
|
25
|
+
lg: {
|
|
26
|
+
control: string;
|
|
27
|
+
track: string;
|
|
28
|
+
range: string;
|
|
29
|
+
thumb: string[];
|
|
30
|
+
markerDot: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
orientation: {
|
|
34
|
+
horizontal: {
|
|
35
|
+
root: string;
|
|
36
|
+
control: string;
|
|
37
|
+
track: string;
|
|
38
|
+
range: string;
|
|
39
|
+
};
|
|
40
|
+
vertical: {
|
|
41
|
+
root: string;
|
|
42
|
+
control: string;
|
|
43
|
+
track: string;
|
|
44
|
+
range: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
} & {
|
|
48
|
+
unstyled: {
|
|
49
|
+
true: import("tailwind-merge").ClassNameValue;
|
|
50
|
+
false: import("tailwind-merge").ClassNameValue;
|
|
51
|
+
};
|
|
52
|
+
}, {
|
|
53
|
+
root: string;
|
|
54
|
+
control: string;
|
|
55
|
+
track: string;
|
|
56
|
+
range: string;
|
|
57
|
+
thumb: string;
|
|
58
|
+
marker: string;
|
|
59
|
+
markerDot: string;
|
|
60
|
+
}, undefined, {
|
|
61
|
+
size: {
|
|
62
|
+
xs: {
|
|
63
|
+
control: string;
|
|
64
|
+
track: string;
|
|
65
|
+
range: string;
|
|
66
|
+
thumb: string[];
|
|
67
|
+
markerDot: string;
|
|
68
|
+
};
|
|
69
|
+
sm: {
|
|
70
|
+
control: string;
|
|
71
|
+
track: string;
|
|
72
|
+
range: string;
|
|
73
|
+
thumb: string[];
|
|
74
|
+
markerDot: string;
|
|
75
|
+
};
|
|
76
|
+
base: {
|
|
77
|
+
control: string;
|
|
78
|
+
track: string;
|
|
79
|
+
range: string;
|
|
80
|
+
thumb: string[];
|
|
81
|
+
markerDot: string;
|
|
82
|
+
};
|
|
83
|
+
lg: {
|
|
84
|
+
control: string;
|
|
85
|
+
track: string;
|
|
86
|
+
range: string;
|
|
87
|
+
thumb: string[];
|
|
88
|
+
markerDot: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
orientation: {
|
|
92
|
+
horizontal: {
|
|
93
|
+
root: string;
|
|
94
|
+
control: string;
|
|
95
|
+
track: string;
|
|
96
|
+
range: string;
|
|
97
|
+
};
|
|
98
|
+
vertical: {
|
|
99
|
+
root: string;
|
|
100
|
+
control: string;
|
|
101
|
+
track: string;
|
|
102
|
+
range: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
}, {
|
|
106
|
+
root: string;
|
|
107
|
+
control: string;
|
|
108
|
+
track: string;
|
|
109
|
+
range: string;
|
|
110
|
+
thumb: string;
|
|
111
|
+
marker: string;
|
|
112
|
+
markerDot: string;
|
|
113
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
114
|
+
size: {
|
|
115
|
+
xs: {
|
|
116
|
+
control: string;
|
|
117
|
+
track: string;
|
|
118
|
+
range: string;
|
|
119
|
+
thumb: string[];
|
|
120
|
+
markerDot: string;
|
|
121
|
+
};
|
|
122
|
+
sm: {
|
|
123
|
+
control: string;
|
|
124
|
+
track: string;
|
|
125
|
+
range: string;
|
|
126
|
+
thumb: string[];
|
|
127
|
+
markerDot: string;
|
|
128
|
+
};
|
|
129
|
+
base: {
|
|
130
|
+
control: string;
|
|
131
|
+
track: string;
|
|
132
|
+
range: string;
|
|
133
|
+
thumb: string[];
|
|
134
|
+
markerDot: string;
|
|
135
|
+
};
|
|
136
|
+
lg: {
|
|
137
|
+
control: string;
|
|
138
|
+
track: string;
|
|
139
|
+
range: string;
|
|
140
|
+
thumb: string[];
|
|
141
|
+
markerDot: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
orientation: {
|
|
145
|
+
horizontal: {
|
|
146
|
+
root: string;
|
|
147
|
+
control: string;
|
|
148
|
+
track: string;
|
|
149
|
+
range: string;
|
|
150
|
+
};
|
|
151
|
+
vertical: {
|
|
152
|
+
root: string;
|
|
153
|
+
control: string;
|
|
154
|
+
track: string;
|
|
155
|
+
range: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
}, {
|
|
159
|
+
root: string;
|
|
160
|
+
control: string;
|
|
161
|
+
track: string;
|
|
162
|
+
range: string;
|
|
163
|
+
thumb: string;
|
|
164
|
+
marker: string;
|
|
165
|
+
markerDot: string;
|
|
166
|
+
}, undefined, unknown, unknown>>;
|
|
167
|
+
export type SliderVariants = VariantProps<typeof tvSlider>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { tv } from '../../../shared/utils/tv';
|
|
2
|
+
const prefix = 'rui-slider';
|
|
3
|
+
export const tvSlider = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: '',
|
|
6
|
+
control: '',
|
|
7
|
+
track: '',
|
|
8
|
+
range: '',
|
|
9
|
+
thumb: 'z-10 rounded-full data-dragging:scale-120 transition-transform',
|
|
10
|
+
marker: '',
|
|
11
|
+
markerDot: 'absolute left-1/2 -translate-x-1/2 rounded-full',
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xs: {
|
|
16
|
+
control: 'h-[max(var(--slider-thumb-height),.5rem)]',
|
|
17
|
+
track: 'h-0.5 rounded',
|
|
18
|
+
range: 'rounded',
|
|
19
|
+
thumb: [
|
|
20
|
+
'w-[max(var(--slider-thumb-width),.5rem)]',
|
|
21
|
+
'h-[max(var(--slider-thumb-height),.5rem)]',
|
|
22
|
+
],
|
|
23
|
+
markerDot: 'size-1.5 -top-[calc(max(var(--slider-thumb-height),.5rem)/2+var(--spacing)*0.75)]',
|
|
24
|
+
},
|
|
25
|
+
sm: {
|
|
26
|
+
control: 'h-[max(var(--slider-thumb-height),.75rem)]',
|
|
27
|
+
track: 'h-1 rounded-md',
|
|
28
|
+
range: 'rounded-md',
|
|
29
|
+
thumb: [
|
|
30
|
+
'w-[max(var(--slider-thumb-width),.75rem)]',
|
|
31
|
+
'h-[max(var(--slider-thumb-height),.75rem)]',
|
|
32
|
+
],
|
|
33
|
+
markerDot: 'size-2 -top-[calc(max(var(--slider-thumb-height),.75rem)/2+var(--spacing))]',
|
|
34
|
+
},
|
|
35
|
+
base: {
|
|
36
|
+
control: 'h-[max(var(--slider-thumb-height),1rem)]',
|
|
37
|
+
track: 'h-1.5 rounded-lg',
|
|
38
|
+
range: 'rounded-lg',
|
|
39
|
+
thumb: [
|
|
40
|
+
'w-[max(var(--slider-thumb-width),1rem)]',
|
|
41
|
+
'h-[max(var(--slider-thumb-height),1rem)]',
|
|
42
|
+
],
|
|
43
|
+
markerDot: 'size-2.5 -top-[calc(max(var(--slider-thumb-height),1rem)/2+var(--spacing)*1.25)]',
|
|
44
|
+
},
|
|
45
|
+
lg: {
|
|
46
|
+
control: 'h-[max(var(--slider-thumb-height),1.25rem)]',
|
|
47
|
+
track: 'h-2 rounded-xl',
|
|
48
|
+
range: 'rounded-xl',
|
|
49
|
+
thumb: [
|
|
50
|
+
'w-[max(var(--slider-thumb-width),1.25rem)]',
|
|
51
|
+
'h-[max(var(--slider-thumb-height),1.25rem)]',
|
|
52
|
+
],
|
|
53
|
+
markerDot: 'size-3 -top-[calc(max(var(--slider-thumb-height),1.25rem)/2+var(--spacing)*1.5)]',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
orientation: {
|
|
57
|
+
horizontal: {
|
|
58
|
+
root: 'flex flex-col',
|
|
59
|
+
control: 'w-full flex items-center',
|
|
60
|
+
track: 'w-full',
|
|
61
|
+
range: 'h-full',
|
|
62
|
+
},
|
|
63
|
+
vertical: {
|
|
64
|
+
root: 'flex items-center justify-center',
|
|
65
|
+
control: 'h-full flex items-center',
|
|
66
|
+
track: 'h-full',
|
|
67
|
+
range: 'w-full',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
defaultVariants: {
|
|
72
|
+
size: 'base',
|
|
73
|
+
orientation: 'horizontal',
|
|
74
|
+
},
|
|
75
|
+
}, {
|
|
76
|
+
slots: {
|
|
77
|
+
root: prefix,
|
|
78
|
+
control: `${prefix}-control`,
|
|
79
|
+
track: `${prefix}-track`,
|
|
80
|
+
range: `${prefix}-range`,
|
|
81
|
+
thumb: `${prefix}-thumb`,
|
|
82
|
+
marker: `${prefix}-marker`,
|
|
83
|
+
markerDot: `${prefix}-marker-dot`,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../shared/utils/tv';
|
|
2
|
+
export declare const tvSpin: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
mode: {
|
|
4
|
+
fullscreen: {
|
|
5
|
+
root: string[];
|
|
6
|
+
};
|
|
7
|
+
inline: string[];
|
|
8
|
+
};
|
|
9
|
+
size: {
|
|
10
|
+
xs: {
|
|
11
|
+
icon: string[];
|
|
12
|
+
text: string[];
|
|
13
|
+
};
|
|
14
|
+
sm: {
|
|
15
|
+
icon: string[];
|
|
16
|
+
text: string[];
|
|
17
|
+
};
|
|
18
|
+
base: {
|
|
19
|
+
icon: string[];
|
|
20
|
+
text: string[];
|
|
21
|
+
};
|
|
22
|
+
lg: {
|
|
23
|
+
icon: string[];
|
|
24
|
+
text: string[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
} & {
|
|
28
|
+
unstyled: {
|
|
29
|
+
true: import("tailwind-merge").ClassNameValue;
|
|
30
|
+
false: import("tailwind-merge").ClassNameValue;
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
root: string;
|
|
34
|
+
mask: string[];
|
|
35
|
+
indicator: string[];
|
|
36
|
+
icon: string[];
|
|
37
|
+
text: string[];
|
|
38
|
+
}, undefined, {
|
|
39
|
+
mode: {
|
|
40
|
+
fullscreen: {
|
|
41
|
+
root: string[];
|
|
42
|
+
};
|
|
43
|
+
inline: string[];
|
|
44
|
+
};
|
|
45
|
+
size: {
|
|
46
|
+
xs: {
|
|
47
|
+
icon: string[];
|
|
48
|
+
text: string[];
|
|
49
|
+
};
|
|
50
|
+
sm: {
|
|
51
|
+
icon: string[];
|
|
52
|
+
text: string[];
|
|
53
|
+
};
|
|
54
|
+
base: {
|
|
55
|
+
icon: string[];
|
|
56
|
+
text: string[];
|
|
57
|
+
};
|
|
58
|
+
lg: {
|
|
59
|
+
icon: string[];
|
|
60
|
+
text: string[];
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
root: string;
|
|
65
|
+
mask: string[];
|
|
66
|
+
indicator: string[];
|
|
67
|
+
icon: string[];
|
|
68
|
+
text: string[];
|
|
69
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
70
|
+
mode: {
|
|
71
|
+
fullscreen: {
|
|
72
|
+
root: string[];
|
|
73
|
+
};
|
|
74
|
+
inline: string[];
|
|
75
|
+
};
|
|
76
|
+
size: {
|
|
77
|
+
xs: {
|
|
78
|
+
icon: string[];
|
|
79
|
+
text: string[];
|
|
80
|
+
};
|
|
81
|
+
sm: {
|
|
82
|
+
icon: string[];
|
|
83
|
+
text: string[];
|
|
84
|
+
};
|
|
85
|
+
base: {
|
|
86
|
+
icon: string[];
|
|
87
|
+
text: string[];
|
|
88
|
+
};
|
|
89
|
+
lg: {
|
|
90
|
+
icon: string[];
|
|
91
|
+
text: string[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
}, {
|
|
95
|
+
root: string;
|
|
96
|
+
mask: string[];
|
|
97
|
+
indicator: string[];
|
|
98
|
+
icon: string[];
|
|
99
|
+
text: string[];
|
|
100
|
+
}, undefined, unknown, unknown>>;
|
|
101
|
+
export interface SpinVariants extends VariantProps<typeof tvSpin> {
|
|
102
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { tv } from '../../../shared/utils/tv';
|
|
2
|
+
const prefix = 'rui-spin';
|
|
3
|
+
export const tvSpin = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: '',
|
|
6
|
+
mask: ['absolute', 'top-0', 'left-0', 'size-full'],
|
|
7
|
+
indicator: [
|
|
8
|
+
'absolute',
|
|
9
|
+
'top-1/2',
|
|
10
|
+
'left-1/2',
|
|
11
|
+
'transform',
|
|
12
|
+
'translate-x-[-50%]',
|
|
13
|
+
'translate-y-[-50%]',
|
|
14
|
+
'flex',
|
|
15
|
+
'items-center',
|
|
16
|
+
'justify-center',
|
|
17
|
+
'gap-2',
|
|
18
|
+
],
|
|
19
|
+
icon: ['inline-block', 'size-6'],
|
|
20
|
+
text: ['text-xs'],
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
mode: {
|
|
24
|
+
fullscreen: {
|
|
25
|
+
root: ['fixed', 'top-0', 'left-0', 'w-screen', 'h-screen', 'z-(--z-loading)'],
|
|
26
|
+
},
|
|
27
|
+
inline: ['absolute', 'inset-0'],
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
xs: {
|
|
31
|
+
icon: ['size-6'],
|
|
32
|
+
text: ['text-xs'],
|
|
33
|
+
},
|
|
34
|
+
sm: {
|
|
35
|
+
icon: ['size-8'],
|
|
36
|
+
text: ['text-sm'],
|
|
37
|
+
},
|
|
38
|
+
base: {
|
|
39
|
+
icon: ['size-10'],
|
|
40
|
+
text: ['text-base'],
|
|
41
|
+
},
|
|
42
|
+
lg: {
|
|
43
|
+
icon: ['size-12'],
|
|
44
|
+
text: ['text-lg'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}, {
|
|
49
|
+
slots: {
|
|
50
|
+
root: prefix,
|
|
51
|
+
mask: `${prefix}-mask`,
|
|
52
|
+
indicator: `${prefix}-indicator`,
|
|
53
|
+
icon: `${prefix}-icon`,
|
|
54
|
+
text: `${prefix}-text`,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { VariantProps } from '../../../shared/utils/tv';
|
|
2
|
+
export declare const tvSwitch: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: {
|
|
5
|
+
control: string;
|
|
6
|
+
thumb: string;
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
sm: {
|
|
10
|
+
control: string;
|
|
11
|
+
thumb: string;
|
|
12
|
+
label: string;
|
|
13
|
+
};
|
|
14
|
+
base: {
|
|
15
|
+
control: string;
|
|
16
|
+
thumb: string;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
lg: {
|
|
20
|
+
control: string;
|
|
21
|
+
thumb: string;
|
|
22
|
+
label: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
} & {
|
|
26
|
+
unstyled: {
|
|
27
|
+
true: import("tailwind-merge").ClassNameValue;
|
|
28
|
+
false: import("tailwind-merge").ClassNameValue;
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
root: string[];
|
|
32
|
+
control: string[];
|
|
33
|
+
thumb: string[];
|
|
34
|
+
label: string;
|
|
35
|
+
}, undefined, {
|
|
36
|
+
size: {
|
|
37
|
+
xs: {
|
|
38
|
+
control: string;
|
|
39
|
+
thumb: string;
|
|
40
|
+
label: string;
|
|
41
|
+
};
|
|
42
|
+
sm: {
|
|
43
|
+
control: string;
|
|
44
|
+
thumb: string;
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
base: {
|
|
48
|
+
control: string;
|
|
49
|
+
thumb: string;
|
|
50
|
+
label: string;
|
|
51
|
+
};
|
|
52
|
+
lg: {
|
|
53
|
+
control: string;
|
|
54
|
+
thumb: string;
|
|
55
|
+
label: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
root: string[];
|
|
60
|
+
control: string[];
|
|
61
|
+
thumb: string[];
|
|
62
|
+
label: string;
|
|
63
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
64
|
+
size: {
|
|
65
|
+
xs: {
|
|
66
|
+
control: string;
|
|
67
|
+
thumb: string;
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
sm: {
|
|
71
|
+
control: string;
|
|
72
|
+
thumb: string;
|
|
73
|
+
label: string;
|
|
74
|
+
};
|
|
75
|
+
base: {
|
|
76
|
+
control: string;
|
|
77
|
+
thumb: string;
|
|
78
|
+
label: string;
|
|
79
|
+
};
|
|
80
|
+
lg: {
|
|
81
|
+
control: string;
|
|
82
|
+
thumb: string;
|
|
83
|
+
label: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}, {
|
|
87
|
+
root: string[];
|
|
88
|
+
control: string[];
|
|
89
|
+
thumb: string[];
|
|
90
|
+
label: string;
|
|
91
|
+
}, undefined, unknown, unknown>>;
|
|
92
|
+
export type SwitchVariants = VariantProps<typeof tvSwitch>;
|