@rark-ui/themes 1.2.0 → 1.2.2
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 -1
- package/dist/default/crafts/message.js +1 -1
- package/dist/default/crafts/toast.js +1 -1
- package/dist/default/index.css +0 -239
- package/dist/razer/index.css +4 -329
- package/package.json +11 -8
- package/src/default/crafts/badge.ts +56 -56
- package/src/default/crafts/button.ts +68 -68
- package/src/default/crafts/checkbox.ts +75 -75
- package/src/default/crafts/collapsible.ts +61 -61
- package/src/default/crafts/date-picker.ts +261 -261
- package/src/default/crafts/dialog.ts +103 -103
- package/src/default/crafts/editable.ts +108 -108
- package/src/default/crafts/floating-panel.ts +71 -71
- package/src/default/crafts/hotkey.ts +24 -24
- package/src/default/crafts/hover-card.ts +83 -83
- package/src/default/crafts/icon.ts +15 -15
- package/src/default/crafts/index.ts +62 -62
- package/src/default/crafts/input.ts +50 -50
- package/src/default/crafts/menu.ts +118 -118
- package/src/default/crafts/message.ts +66 -66
- package/src/default/crafts/number-input.ts +51 -51
- package/src/default/crafts/pagination.ts +120 -120
- package/src/default/crafts/popover.ts +74 -74
- package/src/default/crafts/progress.ts +131 -131
- package/src/default/crafts/radio-group.ts +100 -100
- package/src/default/crafts/rating-group.ts +46 -46
- package/src/default/crafts/scroll-area.ts +116 -116
- package/src/default/crafts/select.ts +122 -122
- package/src/default/crafts/skeleton.ts +23 -23
- package/src/default/crafts/slider.ts +93 -93
- package/src/default/crafts/spin.ts +64 -64
- package/src/default/crafts/switch.ts +71 -71
- package/src/default/crafts/tabs.ts +122 -122
- package/src/default/crafts/tags-input.ts +81 -81
- package/src/default/crafts/toast.ts +70 -70
- package/src/default/crafts/toggle-group.ts +57 -57
- package/src/default/crafts/toggle.ts +34 -34
- package/src/default/crafts/tooltip.ts +63 -63
- package/src/default/crafts/tree.ts +165 -165
- package/src/default/index.ts +4 -4
- package/src/default/tailwind.config.ts +2 -0
- package/src/razer/components/arrow.css +19 -19
- package/src/razer/components/badge.css +12 -12
- package/src/razer/components/button.css +39 -39
- package/src/razer/components/checkbox.css +39 -39
- package/src/razer/components/collapsible.css +16 -16
- package/src/razer/components/date-picker.css +46 -46
- package/src/razer/components/dialog.css +28 -28
- package/src/razer/components/editable.css +26 -26
- package/src/razer/components/floating-panel.css +10 -10
- package/src/razer/components/hotkey.css +4 -4
- package/src/razer/components/hover-card.css +14 -14
- package/src/razer/components/input.css +29 -29
- package/src/razer/components/menu.css +47 -47
- package/src/razer/components/message.css +41 -41
- package/src/razer/components/number-input.css +8 -8
- package/src/razer/components/pagination.css +13 -13
- package/src/razer/components/popover.css +19 -19
- package/src/razer/components/progress.css +78 -78
- package/src/razer/components/radio-group.css +44 -44
- package/src/razer/components/rating-group.css +26 -26
- package/src/razer/components/scroll-area.css +13 -13
- package/src/razer/components/select.css +31 -31
- package/src/razer/components/skeleton.css +10 -10
- package/src/razer/components/slider.css +27 -27
- package/src/razer/components/spin.css +14 -14
- package/src/razer/components/switch.css +24 -24
- package/src/razer/components/tabs.css +10 -10
- package/src/razer/components/tags-input.css +16 -16
- package/src/razer/components/toast.css +41 -41
- package/src/razer/components/toggle-group.css +19 -19
- package/src/razer/components/toggle.css +16 -16
- package/src/razer/components/tooltip.css +16 -16
- package/src/razer/components/tree.css +18 -18
- package/src/razer/components/virtual.css +16 -16
- package/src/razer/crafts/index.ts +16 -16
- package/src/razer/index.ts +4 -4
- package/src/razer/preset.css +261 -261
- package/src/razer/tailwind.config.ts +2 -0
- package/src/shared/css/animation-easing.css +21 -21
- package/src/shared/css/animations.css +252 -252
- package/src/shared/css/index.css +2 -2
- package/src/shared/css/static.css +31 -31
- package/src/shared/utils/tv.ts +91 -91
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-tabs'
|
|
5
|
-
|
|
6
|
-
export const tvTabs = tv({
|
|
7
|
-
slots: {
|
|
8
|
-
root: '',
|
|
9
|
-
list: ['flex', 'items-center', 'relative', 'overflow-hidden'],
|
|
10
|
-
trigger: [
|
|
11
|
-
'inline-flex',
|
|
12
|
-
'items-center',
|
|
13
|
-
'justify-center',
|
|
14
|
-
'whitespace-nowrap',
|
|
15
|
-
'rounded',
|
|
16
|
-
'transition-all',
|
|
17
|
-
'outline-offset-[-2px]',
|
|
18
|
-
'disabled:pointer-events-none',
|
|
19
|
-
'disabled:opacity-(--disabled-opacity)',
|
|
20
|
-
],
|
|
21
|
-
content: ['mt-2'],
|
|
22
|
-
indicator: [],
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
variants: {
|
|
26
|
-
size: {
|
|
27
|
-
xs: {
|
|
28
|
-
trigger: 'text-xs',
|
|
29
|
-
},
|
|
30
|
-
sm: {
|
|
31
|
-
trigger: 'text-sm',
|
|
32
|
-
},
|
|
33
|
-
base: {
|
|
34
|
-
trigger: 'text-base',
|
|
35
|
-
},
|
|
36
|
-
lg: {
|
|
37
|
-
trigger: 'text-lg',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
orientation: {
|
|
41
|
-
horizontal: {
|
|
42
|
-
indicator: 'w-(--width) bottom-0',
|
|
43
|
-
},
|
|
44
|
-
vertical: {
|
|
45
|
-
indicator: 'h-(--height)',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
prev: {
|
|
49
|
-
true: '',
|
|
50
|
-
false: '',
|
|
51
|
-
},
|
|
52
|
-
next: {
|
|
53
|
-
true: '',
|
|
54
|
-
false: '',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
compoundVariants: [
|
|
58
|
-
// horizontal
|
|
59
|
-
{
|
|
60
|
-
orientation: 'horizontal',
|
|
61
|
-
size: 'xs',
|
|
62
|
-
class: {
|
|
63
|
-
trigger: 'px-3 py-2',
|
|
64
|
-
indicator: 'h-0.5',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
orientation: 'horizontal',
|
|
69
|
-
size: 'sm',
|
|
70
|
-
class: {
|
|
71
|
-
trigger: 'px-3.5 py-2.5',
|
|
72
|
-
indicator: 'h-0.75',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
orientation: 'horizontal',
|
|
77
|
-
size: 'base',
|
|
78
|
-
class: {
|
|
79
|
-
trigger: 'px-4 py-3',
|
|
80
|
-
indicator: 'h-1',
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
orientation: 'horizontal',
|
|
85
|
-
size: 'lg',
|
|
86
|
-
class: {
|
|
87
|
-
trigger: 'px-4.5 py-3.5',
|
|
88
|
-
indicator: 'h-1.25',
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
orientation: 'horizontal',
|
|
93
|
-
prev: true,
|
|
94
|
-
class: {
|
|
95
|
-
content: 'data-[state=open]:-motion-translate-x-in data-[state=open]:motion-opacity-in',
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
orientation: 'horizontal',
|
|
100
|
-
next: true,
|
|
101
|
-
class: {
|
|
102
|
-
content: 'data-[state=open]:motion-translate-x-in data-[state=open]:motion-opacity-in',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
defaultVariants: {
|
|
107
|
-
size: 'base',
|
|
108
|
-
orientation: 'horizontal',
|
|
109
|
-
prev: false,
|
|
110
|
-
next: false,
|
|
111
|
-
},
|
|
112
|
-
}, {
|
|
113
|
-
slots: {
|
|
114
|
-
root: prefix,
|
|
115
|
-
list: `${prefix}-list`,
|
|
116
|
-
trigger: `${prefix}-trigger`,
|
|
117
|
-
content: `${prefix}-content`,
|
|
118
|
-
indicator: `${prefix}-indicator`,
|
|
119
|
-
},
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
export type TabsVariants = VariantProps<typeof tvTabs>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-tabs'
|
|
5
|
+
|
|
6
|
+
export const tvTabs = tv({
|
|
7
|
+
slots: {
|
|
8
|
+
root: '',
|
|
9
|
+
list: ['flex', 'items-center', 'relative', 'overflow-hidden'],
|
|
10
|
+
trigger: [
|
|
11
|
+
'inline-flex',
|
|
12
|
+
'items-center',
|
|
13
|
+
'justify-center',
|
|
14
|
+
'whitespace-nowrap',
|
|
15
|
+
'rounded',
|
|
16
|
+
'transition-all',
|
|
17
|
+
'outline-offset-[-2px]',
|
|
18
|
+
'disabled:pointer-events-none',
|
|
19
|
+
'disabled:opacity-(--disabled-opacity)',
|
|
20
|
+
],
|
|
21
|
+
content: ['mt-2'],
|
|
22
|
+
indicator: [],
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
variants: {
|
|
26
|
+
size: {
|
|
27
|
+
xs: {
|
|
28
|
+
trigger: 'text-xs',
|
|
29
|
+
},
|
|
30
|
+
sm: {
|
|
31
|
+
trigger: 'text-sm',
|
|
32
|
+
},
|
|
33
|
+
base: {
|
|
34
|
+
trigger: 'text-base',
|
|
35
|
+
},
|
|
36
|
+
lg: {
|
|
37
|
+
trigger: 'text-lg',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
orientation: {
|
|
41
|
+
horizontal: {
|
|
42
|
+
indicator: 'w-(--width) bottom-0',
|
|
43
|
+
},
|
|
44
|
+
vertical: {
|
|
45
|
+
indicator: 'h-(--height)',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
prev: {
|
|
49
|
+
true: '',
|
|
50
|
+
false: '',
|
|
51
|
+
},
|
|
52
|
+
next: {
|
|
53
|
+
true: '',
|
|
54
|
+
false: '',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
compoundVariants: [
|
|
58
|
+
// horizontal
|
|
59
|
+
{
|
|
60
|
+
orientation: 'horizontal',
|
|
61
|
+
size: 'xs',
|
|
62
|
+
class: {
|
|
63
|
+
trigger: 'px-3 py-2',
|
|
64
|
+
indicator: 'h-0.5',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
orientation: 'horizontal',
|
|
69
|
+
size: 'sm',
|
|
70
|
+
class: {
|
|
71
|
+
trigger: 'px-3.5 py-2.5',
|
|
72
|
+
indicator: 'h-0.75',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
orientation: 'horizontal',
|
|
77
|
+
size: 'base',
|
|
78
|
+
class: {
|
|
79
|
+
trigger: 'px-4 py-3',
|
|
80
|
+
indicator: 'h-1',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
orientation: 'horizontal',
|
|
85
|
+
size: 'lg',
|
|
86
|
+
class: {
|
|
87
|
+
trigger: 'px-4.5 py-3.5',
|
|
88
|
+
indicator: 'h-1.25',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
orientation: 'horizontal',
|
|
93
|
+
prev: true,
|
|
94
|
+
class: {
|
|
95
|
+
content: 'data-[state=open]:-motion-translate-x-in data-[state=open]:motion-opacity-in',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
orientation: 'horizontal',
|
|
100
|
+
next: true,
|
|
101
|
+
class: {
|
|
102
|
+
content: 'data-[state=open]:motion-translate-x-in data-[state=open]:motion-opacity-in',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
defaultVariants: {
|
|
107
|
+
size: 'base',
|
|
108
|
+
orientation: 'horizontal',
|
|
109
|
+
prev: false,
|
|
110
|
+
next: false,
|
|
111
|
+
},
|
|
112
|
+
}, {
|
|
113
|
+
slots: {
|
|
114
|
+
root: prefix,
|
|
115
|
+
list: `${prefix}-list`,
|
|
116
|
+
trigger: `${prefix}-trigger`,
|
|
117
|
+
content: `${prefix}-content`,
|
|
118
|
+
indicator: `${prefix}-indicator`,
|
|
119
|
+
},
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
export type TabsVariants = VariantProps<typeof tvTabs>
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-tags-input'
|
|
5
|
-
|
|
6
|
-
export const tvTagsInput = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
root: ['flex flex-col'],
|
|
10
|
-
control: ['flex', 'items-center'],
|
|
11
|
-
scrollArea: '',
|
|
12
|
-
scrollAreaContent: '',
|
|
13
|
-
input: ['focus:outline-none', 'bg-transparent'],
|
|
14
|
-
item: '',
|
|
15
|
-
itemPreview: 'flex items-center gap-1 rounded-full cursor-default',
|
|
16
|
-
itemInput: 'p-0 w-fit min-w-0 outline-none',
|
|
17
|
-
itemText: '',
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
variants: {
|
|
21
|
-
size: {
|
|
22
|
-
xs: {
|
|
23
|
-
input: 'text-xs',
|
|
24
|
-
itemPreview: 'text-xs px-1.5',
|
|
25
|
-
itemInput: 'text-xs px-0.5',
|
|
26
|
-
},
|
|
27
|
-
sm: {
|
|
28
|
-
input: 'text-sm',
|
|
29
|
-
itemPreview: 'text-sm px-2',
|
|
30
|
-
itemInput: 'text-sm px-1',
|
|
31
|
-
},
|
|
32
|
-
base: {
|
|
33
|
-
input: 'text-base',
|
|
34
|
-
itemPreview: 'text-base px-2.5',
|
|
35
|
-
itemInput: 'text-base px-1.5',
|
|
36
|
-
},
|
|
37
|
-
lg: {
|
|
38
|
-
input: 'text-lg',
|
|
39
|
-
itemPreview: 'text-lg px-2.5',
|
|
40
|
-
itemInput: 'text-lg px-1.5',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
inline: {
|
|
44
|
-
true: {
|
|
45
|
-
control: ['flex-nowrap', 'p-0', 'gap-0'],
|
|
46
|
-
scrollArea: ['flex-shrink-0', 'py-1.5', 'px-2', 'max-w-[calc(100%-var(--spacing)*10)]'],
|
|
47
|
-
scrollAreaContent: ['flex', 'flex-nowrap', 'gap-2'],
|
|
48
|
-
input: ['flex-shrink-1', 'py-1.5', 'px-2', 'min-w-5'],
|
|
49
|
-
itemText: 'whitespace-nowrap',
|
|
50
|
-
},
|
|
51
|
-
false: {
|
|
52
|
-
control: 'flex-wrap',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
empty: {
|
|
56
|
-
true: {
|
|
57
|
-
scrollArea: 'p-0',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
defaultVariants: {
|
|
62
|
-
size: 'base',
|
|
63
|
-
inline: true,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
slots: {
|
|
68
|
-
root: prefix,
|
|
69
|
-
control: `${prefix}-control`,
|
|
70
|
-
input: `${prefix}-input`,
|
|
71
|
-
scrollArea: `${prefix}-scroll-area`,
|
|
72
|
-
scrollAreaContent: `${prefix}-scroll-area-content`,
|
|
73
|
-
item: `${prefix}-item`,
|
|
74
|
-
itemPreview: `${prefix}-item-preview`,
|
|
75
|
-
itemInput: `${prefix}-item-input`,
|
|
76
|
-
itemText: `${prefix}-item-text`,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
export type TagsInputVariants = VariantProps<typeof tvTagsInput>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-tags-input'
|
|
5
|
+
|
|
6
|
+
export const tvTagsInput = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
root: ['flex flex-col'],
|
|
10
|
+
control: ['flex', 'items-center'],
|
|
11
|
+
scrollArea: '',
|
|
12
|
+
scrollAreaContent: '',
|
|
13
|
+
input: ['focus:outline-none', 'bg-transparent'],
|
|
14
|
+
item: '',
|
|
15
|
+
itemPreview: 'flex items-center gap-1 rounded-full cursor-default',
|
|
16
|
+
itemInput: 'p-0 w-fit min-w-0 outline-none',
|
|
17
|
+
itemText: '',
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
variants: {
|
|
21
|
+
size: {
|
|
22
|
+
xs: {
|
|
23
|
+
input: 'text-xs',
|
|
24
|
+
itemPreview: 'text-xs px-1.5',
|
|
25
|
+
itemInput: 'text-xs px-0.5',
|
|
26
|
+
},
|
|
27
|
+
sm: {
|
|
28
|
+
input: 'text-sm',
|
|
29
|
+
itemPreview: 'text-sm px-2',
|
|
30
|
+
itemInput: 'text-sm px-1',
|
|
31
|
+
},
|
|
32
|
+
base: {
|
|
33
|
+
input: 'text-base',
|
|
34
|
+
itemPreview: 'text-base px-2.5',
|
|
35
|
+
itemInput: 'text-base px-1.5',
|
|
36
|
+
},
|
|
37
|
+
lg: {
|
|
38
|
+
input: 'text-lg',
|
|
39
|
+
itemPreview: 'text-lg px-2.5',
|
|
40
|
+
itemInput: 'text-lg px-1.5',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
inline: {
|
|
44
|
+
true: {
|
|
45
|
+
control: ['flex-nowrap', 'p-0', 'gap-0'],
|
|
46
|
+
scrollArea: ['flex-shrink-0', 'py-1.5', 'px-2', 'max-w-[calc(100%-var(--spacing)*10)]'],
|
|
47
|
+
scrollAreaContent: ['flex', 'flex-nowrap', 'gap-2'],
|
|
48
|
+
input: ['flex-shrink-1', 'py-1.5', 'px-2', 'min-w-5'],
|
|
49
|
+
itemText: 'whitespace-nowrap',
|
|
50
|
+
},
|
|
51
|
+
false: {
|
|
52
|
+
control: 'flex-wrap',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
empty: {
|
|
56
|
+
true: {
|
|
57
|
+
scrollArea: 'p-0',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
size: 'base',
|
|
63
|
+
inline: true,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
slots: {
|
|
68
|
+
root: prefix,
|
|
69
|
+
control: `${prefix}-control`,
|
|
70
|
+
input: `${prefix}-input`,
|
|
71
|
+
scrollArea: `${prefix}-scroll-area`,
|
|
72
|
+
scrollAreaContent: `${prefix}-scroll-area-content`,
|
|
73
|
+
item: `${prefix}-item`,
|
|
74
|
+
itemPreview: `${prefix}-item-preview`,
|
|
75
|
+
itemInput: `${prefix}-item-input`,
|
|
76
|
+
itemText: `${prefix}-item-text`,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
export type TagsInputVariants = VariantProps<typeof tvTagsInput>
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-toast'
|
|
5
|
-
|
|
6
|
-
export const tvToast = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
root: ['group/toast'],
|
|
10
|
-
content: ['flex', 'items-center', 'border-l-3', 'rounded-md'],
|
|
11
|
-
inner: 'flex flex-col w-max',
|
|
12
|
-
title: '',
|
|
13
|
-
description: '',
|
|
14
|
-
icon: 'size-[1lh]',
|
|
15
|
-
close: '
|
|
16
|
-
},
|
|
17
|
-
variants: {
|
|
18
|
-
size: {
|
|
19
|
-
xs: {
|
|
20
|
-
content: 'py-3 px-4 space-x-3',
|
|
21
|
-
inner: 'gap-0.5',
|
|
22
|
-
icon: 'text-sm',
|
|
23
|
-
close: 'text-xs',
|
|
24
|
-
title: 'text-sm',
|
|
25
|
-
description: 'text-xs',
|
|
26
|
-
},
|
|
27
|
-
sm: {
|
|
28
|
-
content: 'py-4 px-6 space-x-4',
|
|
29
|
-
inner: 'gap-1',
|
|
30
|
-
icon: 'text-base',
|
|
31
|
-
close: 'text-sm',
|
|
32
|
-
title: 'text-base',
|
|
33
|
-
description: 'text-sm',
|
|
34
|
-
},
|
|
35
|
-
base: {
|
|
36
|
-
content: 'py-5 px-8 space-x-5',
|
|
37
|
-
inner: 'gap-1.5',
|
|
38
|
-
icon: 'text-base',
|
|
39
|
-
close: 'text-base',
|
|
40
|
-
title: 'text-lg',
|
|
41
|
-
description: 'text-base',
|
|
42
|
-
},
|
|
43
|
-
lg: {
|
|
44
|
-
content: 'py-6 px-10 space-x-6',
|
|
45
|
-
inner: 'gap-2',
|
|
46
|
-
icon: 'text-lg',
|
|
47
|
-
close: 'text-base',
|
|
48
|
-
title: 'text-lg',
|
|
49
|
-
description: 'text-base',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
defaultVariants: {
|
|
54
|
-
size: 'base',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
slots: {
|
|
59
|
-
root: prefix,
|
|
60
|
-
content: `${prefix}-content`,
|
|
61
|
-
inner: `${prefix}-inner`,
|
|
62
|
-
title: `${prefix}-title`,
|
|
63
|
-
description: `${prefix}-description`,
|
|
64
|
-
icon: `${prefix}-icon`,
|
|
65
|
-
close: `${prefix}-close`,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
export type ToastVariants = VariantProps<typeof tvToast>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-toast'
|
|
5
|
+
|
|
6
|
+
export const tvToast = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
root: ['group/toast'],
|
|
10
|
+
content: ['flex', 'items-center', 'border-l-3', 'rounded-md'],
|
|
11
|
+
inner: 'flex flex-col w-max',
|
|
12
|
+
title: '',
|
|
13
|
+
description: '',
|
|
14
|
+
icon: 'size-[1lh]',
|
|
15
|
+
close: '',
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
size: {
|
|
19
|
+
xs: {
|
|
20
|
+
content: 'py-3 px-4 space-x-3',
|
|
21
|
+
inner: 'gap-0.5',
|
|
22
|
+
icon: 'text-sm',
|
|
23
|
+
close: 'text-xs',
|
|
24
|
+
title: 'text-sm',
|
|
25
|
+
description: 'text-xs',
|
|
26
|
+
},
|
|
27
|
+
sm: {
|
|
28
|
+
content: 'py-4 px-6 space-x-4',
|
|
29
|
+
inner: 'gap-1',
|
|
30
|
+
icon: 'text-base',
|
|
31
|
+
close: 'text-sm',
|
|
32
|
+
title: 'text-base',
|
|
33
|
+
description: 'text-sm',
|
|
34
|
+
},
|
|
35
|
+
base: {
|
|
36
|
+
content: 'py-5 px-8 space-x-5',
|
|
37
|
+
inner: 'gap-1.5',
|
|
38
|
+
icon: 'text-base',
|
|
39
|
+
close: 'text-base',
|
|
40
|
+
title: 'text-lg',
|
|
41
|
+
description: 'text-base',
|
|
42
|
+
},
|
|
43
|
+
lg: {
|
|
44
|
+
content: 'py-6 px-10 space-x-6',
|
|
45
|
+
inner: 'gap-2',
|
|
46
|
+
icon: 'text-lg',
|
|
47
|
+
close: 'text-base',
|
|
48
|
+
title: 'text-lg',
|
|
49
|
+
description: 'text-base',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
size: 'base',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
slots: {
|
|
59
|
+
root: prefix,
|
|
60
|
+
content: `${prefix}-content`,
|
|
61
|
+
inner: `${prefix}-inner`,
|
|
62
|
+
title: `${prefix}-title`,
|
|
63
|
+
description: `${prefix}-description`,
|
|
64
|
+
icon: `${prefix}-icon`,
|
|
65
|
+
close: `${prefix}-close`,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
export type ToastVariants = VariantProps<typeof tvToast>
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-toggle-group'
|
|
5
|
-
|
|
6
|
-
export const tvToggleGroup = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
root: ['w-fit', 'inline-flex', 'items-center', 'group/toggle-group', 'border', 'rounded'],
|
|
10
|
-
item: ['flex', 'items-center', 'justify-center', 'aspect-square'],
|
|
11
|
-
},
|
|
12
|
-
variants: {
|
|
13
|
-
size: {
|
|
14
|
-
xs: {
|
|
15
|
-
item: 'size-6 text-xs',
|
|
16
|
-
},
|
|
17
|
-
sm: {
|
|
18
|
-
item: 'size-7 text-sm',
|
|
19
|
-
},
|
|
20
|
-
base: {
|
|
21
|
-
item: 'size-8 text-base',
|
|
22
|
-
},
|
|
23
|
-
lg: {
|
|
24
|
-
item: 'size-9 text-lg',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
orientation: {
|
|
28
|
-
horizontal: {
|
|
29
|
-
root: 'flex-row',
|
|
30
|
-
item: [
|
|
31
|
-
'[&:not([hidden])~:not([hidden])]:border-s',
|
|
32
|
-
'[&:not([hidden])~:not([hidden])]:border-e-0',
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
vertical: {
|
|
36
|
-
root: 'flex-col',
|
|
37
|
-
item: [
|
|
38
|
-
'[&:not([hidden])~:not([hidden])]:border-t',
|
|
39
|
-
'[&:not([hidden])~:not([hidden])]:border-b-0',
|
|
40
|
-
],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: {
|
|
45
|
-
size: 'base',
|
|
46
|
-
orientation: 'horizontal',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
slots: {
|
|
51
|
-
root: prefix,
|
|
52
|
-
item: `${prefix}-item`,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
export type ToggleGroupVariants = VariantProps<typeof tvToggleGroup>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-toggle-group'
|
|
5
|
+
|
|
6
|
+
export const tvToggleGroup = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
root: ['w-fit', 'inline-flex', 'items-center', 'group/toggle-group', 'border', 'rounded'],
|
|
10
|
+
item: ['flex', 'items-center', 'justify-center', 'aspect-square'],
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
xs: {
|
|
15
|
+
item: 'size-6 text-xs',
|
|
16
|
+
},
|
|
17
|
+
sm: {
|
|
18
|
+
item: 'size-7 text-sm',
|
|
19
|
+
},
|
|
20
|
+
base: {
|
|
21
|
+
item: 'size-8 text-base',
|
|
22
|
+
},
|
|
23
|
+
lg: {
|
|
24
|
+
item: 'size-9 text-lg',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
orientation: {
|
|
28
|
+
horizontal: {
|
|
29
|
+
root: 'flex-row',
|
|
30
|
+
item: [
|
|
31
|
+
'[&:not([hidden])~:not([hidden])]:border-s',
|
|
32
|
+
'[&:not([hidden])~:not([hidden])]:border-e-0',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
vertical: {
|
|
36
|
+
root: 'flex-col',
|
|
37
|
+
item: [
|
|
38
|
+
'[&:not([hidden])~:not([hidden])]:border-t',
|
|
39
|
+
'[&:not([hidden])~:not([hidden])]:border-b-0',
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
size: 'base',
|
|
46
|
+
orientation: 'horizontal',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
slots: {
|
|
51
|
+
root: prefix,
|
|
52
|
+
item: `${prefix}-item`,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
export type ToggleGroupVariants = VariantProps<typeof tvToggleGroup>
|