@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,66 +1,66 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-message'
|
|
5
|
-
|
|
6
|
-
export const tvMessage = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
root: ['group/message'],
|
|
10
|
-
content: ['flex', 'items-center', 'rounded-md'],
|
|
11
|
-
description: 'w-max',
|
|
12
|
-
icon: 'size-[1lh]',
|
|
13
|
-
close: '
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
xs: {
|
|
18
|
-
content: 'py-3 px-4 space-x-3',
|
|
19
|
-
inner: 'gap-0.5',
|
|
20
|
-
icon: 'text-sm',
|
|
21
|
-
close: 'text-xs',
|
|
22
|
-
title: 'text-xs',
|
|
23
|
-
description: 'text-xs',
|
|
24
|
-
},
|
|
25
|
-
sm: {
|
|
26
|
-
content: 'py-4 px-6 space-x-4',
|
|
27
|
-
inner: 'gap-1',
|
|
28
|
-
icon: 'text-base',
|
|
29
|
-
close: 'text-sm',
|
|
30
|
-
title: 'text-sm',
|
|
31
|
-
description: 'text-sm',
|
|
32
|
-
},
|
|
33
|
-
base: {
|
|
34
|
-
content: 'py-5 px-8 space-x-5',
|
|
35
|
-
inner: 'gap-1.5',
|
|
36
|
-
icon: 'text-lg',
|
|
37
|
-
close: 'text-base',
|
|
38
|
-
title: 'text-base',
|
|
39
|
-
description: 'text-base',
|
|
40
|
-
},
|
|
41
|
-
lg: {
|
|
42
|
-
content: 'py-6 px-10 space-x-6',
|
|
43
|
-
inner: 'gap-2',
|
|
44
|
-
icon: 'text-xl',
|
|
45
|
-
close: 'text-lg',
|
|
46
|
-
title: 'text-lg',
|
|
47
|
-
description: 'text-lg',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
size: 'base',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
slots: {
|
|
57
|
-
root: prefix,
|
|
58
|
-
content: `${prefix}-content`,
|
|
59
|
-
description: `${prefix}-description`,
|
|
60
|
-
icon: `${prefix}-icon`,
|
|
61
|
-
close: `${prefix}-close`,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
export type MessageVariants = VariantProps<typeof tvMessage>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-message'
|
|
5
|
+
|
|
6
|
+
export const tvMessage = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
root: ['group/message'],
|
|
10
|
+
content: ['flex', 'items-center', 'rounded-md'],
|
|
11
|
+
description: 'w-max',
|
|
12
|
+
icon: 'size-[1lh]',
|
|
13
|
+
close: '',
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
xs: {
|
|
18
|
+
content: 'py-3 px-4 space-x-3',
|
|
19
|
+
inner: 'gap-0.5',
|
|
20
|
+
icon: 'text-sm',
|
|
21
|
+
close: 'text-xs',
|
|
22
|
+
title: 'text-xs',
|
|
23
|
+
description: 'text-xs',
|
|
24
|
+
},
|
|
25
|
+
sm: {
|
|
26
|
+
content: 'py-4 px-6 space-x-4',
|
|
27
|
+
inner: 'gap-1',
|
|
28
|
+
icon: 'text-base',
|
|
29
|
+
close: 'text-sm',
|
|
30
|
+
title: 'text-sm',
|
|
31
|
+
description: 'text-sm',
|
|
32
|
+
},
|
|
33
|
+
base: {
|
|
34
|
+
content: 'py-5 px-8 space-x-5',
|
|
35
|
+
inner: 'gap-1.5',
|
|
36
|
+
icon: 'text-lg',
|
|
37
|
+
close: 'text-base',
|
|
38
|
+
title: 'text-base',
|
|
39
|
+
description: 'text-base',
|
|
40
|
+
},
|
|
41
|
+
lg: {
|
|
42
|
+
content: 'py-6 px-10 space-x-6',
|
|
43
|
+
inner: 'gap-2',
|
|
44
|
+
icon: 'text-xl',
|
|
45
|
+
close: 'text-lg',
|
|
46
|
+
title: 'text-lg',
|
|
47
|
+
description: 'text-lg',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
size: 'base',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
slots: {
|
|
57
|
+
root: prefix,
|
|
58
|
+
content: `${prefix}-content`,
|
|
59
|
+
description: `${prefix}-description`,
|
|
60
|
+
icon: `${prefix}-icon`,
|
|
61
|
+
close: `${prefix}-close`,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
export type MessageVariants = VariantProps<typeof tvMessage>
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-number-input'
|
|
5
|
-
|
|
6
|
-
export const tvNumberInput = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
root: '',
|
|
10
|
-
control: 'p-0',
|
|
11
|
-
input: '',
|
|
12
|
-
triggerGroup: 'flex flex-col',
|
|
13
|
-
trigger: '[&>svg]:size-full',
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
xs: {
|
|
18
|
-
input: 'text-xs py-1 px-1.5',
|
|
19
|
-
trigger: 'h-3 w-6 [&>svg]:size-full',
|
|
20
|
-
},
|
|
21
|
-
sm: {
|
|
22
|
-
input: 'text-sm py-1.5 px-2',
|
|
23
|
-
trigger: 'h-4 w-8 [&>svg]:size-full',
|
|
24
|
-
},
|
|
25
|
-
base: {
|
|
26
|
-
input: 'text-base py-2 px-2.5',
|
|
27
|
-
trigger: 'h-4.5 w-8 [&>svg]:size-full',
|
|
28
|
-
},
|
|
29
|
-
lg: {
|
|
30
|
-
input: 'text-lg py-2.5 px-3',
|
|
31
|
-
trigger: 'h-5 w-10 [&>svg]:size-full',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
defaultVariants: {
|
|
37
|
-
size: 'base',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
slots: {
|
|
42
|
-
root: prefix,
|
|
43
|
-
control: `${prefix}-control`,
|
|
44
|
-
input: `${prefix}-input`,
|
|
45
|
-
triggerGroup: `${prefix}-trigger-group`,
|
|
46
|
-
trigger: `${prefix}-trigger`,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
export type NumberInputVariants = VariantProps<typeof tvNumberInput>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-number-input'
|
|
5
|
+
|
|
6
|
+
export const tvNumberInput = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
root: '',
|
|
10
|
+
control: 'p-0',
|
|
11
|
+
input: '',
|
|
12
|
+
triggerGroup: 'flex flex-col',
|
|
13
|
+
trigger: '[&>svg]:size-full',
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
xs: {
|
|
18
|
+
input: 'text-xs py-1 px-1.5',
|
|
19
|
+
trigger: 'h-3 w-6 [&>svg]:size-full',
|
|
20
|
+
},
|
|
21
|
+
sm: {
|
|
22
|
+
input: 'text-sm py-1.5 px-2',
|
|
23
|
+
trigger: 'h-4 w-8 [&>svg]:size-full',
|
|
24
|
+
},
|
|
25
|
+
base: {
|
|
26
|
+
input: 'text-base py-2 px-2.5',
|
|
27
|
+
trigger: 'h-4.5 w-8 [&>svg]:size-full',
|
|
28
|
+
},
|
|
29
|
+
lg: {
|
|
30
|
+
input: 'text-lg py-2.5 px-3',
|
|
31
|
+
trigger: 'h-5 w-10 [&>svg]:size-full',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
size: 'base',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
slots: {
|
|
42
|
+
root: prefix,
|
|
43
|
+
control: `${prefix}-control`,
|
|
44
|
+
input: `${prefix}-input`,
|
|
45
|
+
triggerGroup: `${prefix}-trigger-group`,
|
|
46
|
+
trigger: `${prefix}-trigger`,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
export type NumberInputVariants = VariantProps<typeof tvNumberInput>
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-pagination'
|
|
5
|
-
|
|
6
|
-
export const tvPagination = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
root: 'flex items-center gap-2',
|
|
10
|
-
control: 'flex items-center gap-2',
|
|
11
|
-
item: ['inline-flex', 'items-center', 'justify-center', 'transition-all', 'rounded'],
|
|
12
|
-
ellipsis: 'inline-flex items-center justify-center',
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
xs: {
|
|
18
|
-
item: ['h-6', 'min-w-6', 'text-xs'],
|
|
19
|
-
ellipsis: 'size-6',
|
|
20
|
-
},
|
|
21
|
-
sm: {
|
|
22
|
-
item: ['h-8', 'min-w-8', 'text-sm'],
|
|
23
|
-
ellipsis: 'size-8',
|
|
24
|
-
},
|
|
25
|
-
base: {
|
|
26
|
-
item: ['h-10', 'min-w-10', 'text-base'],
|
|
27
|
-
ellipsis: 'size-10',
|
|
28
|
-
},
|
|
29
|
-
lg: {
|
|
30
|
-
item: ['h-12', 'min-w-12', 'text-lg'],
|
|
31
|
-
ellipsis: 'size-12',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
defaultVariants: {
|
|
37
|
-
size: 'base',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
slots: {
|
|
42
|
-
root: prefix,
|
|
43
|
-
control: `${prefix}-control`,
|
|
44
|
-
item: `${prefix}-item`,
|
|
45
|
-
ellipsis: `${prefix}-ellipsis`,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
export type PaginationVariants = VariantProps<typeof tvPagination>
|
|
51
|
-
|
|
52
|
-
export const tvPaginationGoto = tv(
|
|
53
|
-
{
|
|
54
|
-
slots: {
|
|
55
|
-
root: 'flex items-center gap-2',
|
|
56
|
-
input: ['[&_[data-part="input"]]:px-0 [&_[data-part="input"]]:text-center'],
|
|
57
|
-
},
|
|
58
|
-
variants: {
|
|
59
|
-
size: {
|
|
60
|
-
xs: {
|
|
61
|
-
input: 'text-xs size-6',
|
|
62
|
-
},
|
|
63
|
-
sm: {
|
|
64
|
-
input: 'text-sm size-8',
|
|
65
|
-
},
|
|
66
|
-
base: {
|
|
67
|
-
input: 'text-base size-10',
|
|
68
|
-
},
|
|
69
|
-
lg: {
|
|
70
|
-
input: 'text-lg size-12',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
defaultVariants: {
|
|
75
|
-
size: 'base',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
slots: {
|
|
80
|
-
root: `${prefix}-goto`,
|
|
81
|
-
input: `${prefix}-goto-input`,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
)
|
|
85
|
-
export type PaginationGotoVariants = VariantProps<typeof tvPaginationGoto>
|
|
86
|
-
|
|
87
|
-
export const tvPaginationPageSize = tv(
|
|
88
|
-
{
|
|
89
|
-
slots: {
|
|
90
|
-
root: 'flex items-center gap-2',
|
|
91
|
-
control: '',
|
|
92
|
-
trigger: 'min-w-0',
|
|
93
|
-
value: '',
|
|
94
|
-
content: '',
|
|
95
|
-
item: '',
|
|
96
|
-
},
|
|
97
|
-
variants: {
|
|
98
|
-
size: {
|
|
99
|
-
xs: '',
|
|
100
|
-
sm: '',
|
|
101
|
-
base: '',
|
|
102
|
-
lg: '',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
defaultVariants: {
|
|
106
|
-
size: 'base',
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
slots: {
|
|
111
|
-
root: `${prefix}-page-size`,
|
|
112
|
-
control: `${prefix}-page-size-control`,
|
|
113
|
-
trigger: `${prefix}-page-size-trigger`,
|
|
114
|
-
value: `${prefix}-page-size-value`,
|
|
115
|
-
content: `${prefix}-page-size-content`,
|
|
116
|
-
item: `${prefix}-page-size-item`,
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
)
|
|
120
|
-
export type PaginationPageSizeVariants = VariantProps<typeof tvPaginationPageSize>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-pagination'
|
|
5
|
+
|
|
6
|
+
export const tvPagination = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
root: 'flex items-center gap-2',
|
|
10
|
+
control: 'flex items-center gap-2',
|
|
11
|
+
item: ['inline-flex', 'items-center', 'justify-center', 'transition-all', 'rounded'],
|
|
12
|
+
ellipsis: 'inline-flex items-center justify-center',
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
xs: {
|
|
18
|
+
item: ['h-6', 'min-w-6', 'text-xs'],
|
|
19
|
+
ellipsis: 'size-6',
|
|
20
|
+
},
|
|
21
|
+
sm: {
|
|
22
|
+
item: ['h-8', 'min-w-8', 'text-sm'],
|
|
23
|
+
ellipsis: 'size-8',
|
|
24
|
+
},
|
|
25
|
+
base: {
|
|
26
|
+
item: ['h-10', 'min-w-10', 'text-base'],
|
|
27
|
+
ellipsis: 'size-10',
|
|
28
|
+
},
|
|
29
|
+
lg: {
|
|
30
|
+
item: ['h-12', 'min-w-12', 'text-lg'],
|
|
31
|
+
ellipsis: 'size-12',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
size: 'base',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
slots: {
|
|
42
|
+
root: prefix,
|
|
43
|
+
control: `${prefix}-control`,
|
|
44
|
+
item: `${prefix}-item`,
|
|
45
|
+
ellipsis: `${prefix}-ellipsis`,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
export type PaginationVariants = VariantProps<typeof tvPagination>
|
|
51
|
+
|
|
52
|
+
export const tvPaginationGoto = tv(
|
|
53
|
+
{
|
|
54
|
+
slots: {
|
|
55
|
+
root: 'flex items-center gap-2',
|
|
56
|
+
input: ['[&_[data-part="input"]]:px-0 [&_[data-part="input"]]:text-center'],
|
|
57
|
+
},
|
|
58
|
+
variants: {
|
|
59
|
+
size: {
|
|
60
|
+
xs: {
|
|
61
|
+
input: 'text-xs size-6',
|
|
62
|
+
},
|
|
63
|
+
sm: {
|
|
64
|
+
input: 'text-sm size-8',
|
|
65
|
+
},
|
|
66
|
+
base: {
|
|
67
|
+
input: 'text-base size-10',
|
|
68
|
+
},
|
|
69
|
+
lg: {
|
|
70
|
+
input: 'text-lg size-12',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: {
|
|
75
|
+
size: 'base',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
slots: {
|
|
80
|
+
root: `${prefix}-goto`,
|
|
81
|
+
input: `${prefix}-goto-input`,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
)
|
|
85
|
+
export type PaginationGotoVariants = VariantProps<typeof tvPaginationGoto>
|
|
86
|
+
|
|
87
|
+
export const tvPaginationPageSize = tv(
|
|
88
|
+
{
|
|
89
|
+
slots: {
|
|
90
|
+
root: 'flex items-center gap-2',
|
|
91
|
+
control: '',
|
|
92
|
+
trigger: 'min-w-0',
|
|
93
|
+
value: '',
|
|
94
|
+
content: '',
|
|
95
|
+
item: '',
|
|
96
|
+
},
|
|
97
|
+
variants: {
|
|
98
|
+
size: {
|
|
99
|
+
xs: '',
|
|
100
|
+
sm: '',
|
|
101
|
+
base: '',
|
|
102
|
+
lg: '',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
defaultVariants: {
|
|
106
|
+
size: 'base',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
slots: {
|
|
111
|
+
root: `${prefix}-page-size`,
|
|
112
|
+
control: `${prefix}-page-size-control`,
|
|
113
|
+
trigger: `${prefix}-page-size-trigger`,
|
|
114
|
+
value: `${prefix}-page-size-value`,
|
|
115
|
+
content: `${prefix}-page-size-content`,
|
|
116
|
+
item: `${prefix}-page-size-item`,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
)
|
|
120
|
+
export type PaginationPageSizeVariants = VariantProps<typeof tvPaginationPageSize>
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-popover'
|
|
5
|
-
|
|
6
|
-
export const tvPopover = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
content: [
|
|
10
|
-
'rounded-(--border-radius)',
|
|
11
|
-
'data-[state=open]:motion-opacity-in',
|
|
12
|
-
'data-[state=open]:motion-scale-in-95',
|
|
13
|
-
'data-[state=open]:data-[placement^=bottom]:motion-translate-y-in-[.25rem]',
|
|
14
|
-
'data-[state=open]:data-[placement^=top]:-motion-translate-y-in-[.25rem]',
|
|
15
|
-
'data-[state=open]:data-[placement^=left]:-motion-translate-x-in-[.25rem]',
|
|
16
|
-
'data-[state=open]:data-[placement^=right]:motion-translate-x-in-[.25rem]',
|
|
17
|
-
'data-[state=closed]:motion-opacity-out',
|
|
18
|
-
'data-[state=closed]:motion-scale-out-95',
|
|
19
|
-
'data-[state=closed]:data-[placement^=bottom]:motion-translate-y-out-[.25rem]',
|
|
20
|
-
'data-[state=closed]:data-[placement^=top]:-motion-translate-y-out-[.25rem]',
|
|
21
|
-
'data-[state=closed]:data-[placement^=left]:-motion-translate-x-out-[.25rem]',
|
|
22
|
-
'data-[state=closed]:data-[placement^=right]:motion-translate-x-out-[.25rem]',
|
|
23
|
-
],
|
|
24
|
-
contentInner: ['relative', 'rounded-(--border-radius)', 'z-10'],
|
|
25
|
-
close: 'inline-flex w-fit items-center justify-center',
|
|
26
|
-
indicator: [
|
|
27
|
-
'data-[state=open]:motion-rotate-out-180',
|
|
28
|
-
'data-[state=closed]:motion-rotate-in-180',
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
variants: {
|
|
32
|
-
size: {
|
|
33
|
-
xs: {
|
|
34
|
-
contentInner: 'px-1.5 py-0.5 text-xs',
|
|
35
|
-
close: 'p-1 text-xs',
|
|
36
|
-
indicator: 'text-xs',
|
|
37
|
-
},
|
|
38
|
-
sm: {
|
|
39
|
-
contentInner: 'px-2 py-1 text-sm',
|
|
40
|
-
close: 'p-1.5 text-sm',
|
|
41
|
-
indicator: 'text-sm',
|
|
42
|
-
},
|
|
43
|
-
base: {
|
|
44
|
-
contentInner: 'px-2.5 py-1.5 text-base',
|
|
45
|
-
close: 'p-2 text-base',
|
|
46
|
-
indicator: 'text-base',
|
|
47
|
-
},
|
|
48
|
-
lg: {
|
|
49
|
-
contentInner: 'px-3 py-2 text-lg',
|
|
50
|
-
close: 'p-2.5 text-lg',
|
|
51
|
-
indicator: 'text-lg',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
bordered: {
|
|
55
|
-
true: '',
|
|
56
|
-
false: '',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
defaultVariants: {
|
|
60
|
-
size: 'base',
|
|
61
|
-
bordered: true,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
slots: {
|
|
66
|
-
content: `${prefix}-content`,
|
|
67
|
-
contentInner: `${prefix}-content-inner`,
|
|
68
|
-
close: `${prefix}-close`,
|
|
69
|
-
indicator: `${prefix}-indicator`,
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
export type PopoverVariants = VariantProps<typeof tvPopover>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-popover'
|
|
5
|
+
|
|
6
|
+
export const tvPopover = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
content: [
|
|
10
|
+
'rounded-(--border-radius)',
|
|
11
|
+
'data-[state=open]:motion-opacity-in',
|
|
12
|
+
'data-[state=open]:motion-scale-in-95',
|
|
13
|
+
'data-[state=open]:data-[placement^=bottom]:motion-translate-y-in-[.25rem]',
|
|
14
|
+
'data-[state=open]:data-[placement^=top]:-motion-translate-y-in-[.25rem]',
|
|
15
|
+
'data-[state=open]:data-[placement^=left]:-motion-translate-x-in-[.25rem]',
|
|
16
|
+
'data-[state=open]:data-[placement^=right]:motion-translate-x-in-[.25rem]',
|
|
17
|
+
'data-[state=closed]:motion-opacity-out',
|
|
18
|
+
'data-[state=closed]:motion-scale-out-95',
|
|
19
|
+
'data-[state=closed]:data-[placement^=bottom]:motion-translate-y-out-[.25rem]',
|
|
20
|
+
'data-[state=closed]:data-[placement^=top]:-motion-translate-y-out-[.25rem]',
|
|
21
|
+
'data-[state=closed]:data-[placement^=left]:-motion-translate-x-out-[.25rem]',
|
|
22
|
+
'data-[state=closed]:data-[placement^=right]:motion-translate-x-out-[.25rem]',
|
|
23
|
+
],
|
|
24
|
+
contentInner: ['relative', 'rounded-(--border-radius)', 'z-10'],
|
|
25
|
+
close: 'inline-flex w-fit items-center justify-center',
|
|
26
|
+
indicator: [
|
|
27
|
+
'data-[state=open]:motion-rotate-out-180',
|
|
28
|
+
'data-[state=closed]:motion-rotate-in-180',
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
variants: {
|
|
32
|
+
size: {
|
|
33
|
+
xs: {
|
|
34
|
+
contentInner: 'px-1.5 py-0.5 text-xs',
|
|
35
|
+
close: 'p-1 text-xs',
|
|
36
|
+
indicator: 'text-xs',
|
|
37
|
+
},
|
|
38
|
+
sm: {
|
|
39
|
+
contentInner: 'px-2 py-1 text-sm',
|
|
40
|
+
close: 'p-1.5 text-sm',
|
|
41
|
+
indicator: 'text-sm',
|
|
42
|
+
},
|
|
43
|
+
base: {
|
|
44
|
+
contentInner: 'px-2.5 py-1.5 text-base',
|
|
45
|
+
close: 'p-2 text-base',
|
|
46
|
+
indicator: 'text-base',
|
|
47
|
+
},
|
|
48
|
+
lg: {
|
|
49
|
+
contentInner: 'px-3 py-2 text-lg',
|
|
50
|
+
close: 'p-2.5 text-lg',
|
|
51
|
+
indicator: 'text-lg',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
bordered: {
|
|
55
|
+
true: '',
|
|
56
|
+
false: '',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
size: 'base',
|
|
61
|
+
bordered: true,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
slots: {
|
|
66
|
+
content: `${prefix}-content`,
|
|
67
|
+
contentInner: `${prefix}-content-inner`,
|
|
68
|
+
close: `${prefix}-close`,
|
|
69
|
+
indicator: `${prefix}-indicator`,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
export type PopoverVariants = VariantProps<typeof tvPopover>
|