@rark-ui/themes 1.2.0 → 1.2.1
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/razer/index.css +4 -4
- package/package.json +6 -7
- 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/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/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,34 +1,34 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-toggle'
|
|
5
|
-
|
|
6
|
-
export const tvToggle = tv({
|
|
7
|
-
base: [
|
|
8
|
-
'inline-flex',
|
|
9
|
-
'items-center',
|
|
10
|
-
'justify-center',
|
|
11
|
-
'rounded',
|
|
12
|
-
'border',
|
|
13
|
-
'transition-all',
|
|
14
|
-
'disabled:pointer-events-none',
|
|
15
|
-
'disabled:opacity-(--disabled-opacity)',
|
|
16
|
-
'[&_svg]:pointer-events-none',
|
|
17
|
-
'[&_svg]:shrink-0',
|
|
18
|
-
],
|
|
19
|
-
variants: {
|
|
20
|
-
size: {
|
|
21
|
-
xs: 'h-6 text-xs gap-1.5 px-3',
|
|
22
|
-
sm: 'h-7 text-sm gap-2.5 px-4',
|
|
23
|
-
base: 'h-8 text-base gap-3 px-5',
|
|
24
|
-
lg: 'h-9 text-lg gap-3.5 px-6',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
size: 'base',
|
|
29
|
-
},
|
|
30
|
-
}, {
|
|
31
|
-
class: prefix,
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
export type ToggleVariants = VariantProps<typeof tvToggle>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-toggle'
|
|
5
|
+
|
|
6
|
+
export const tvToggle = tv({
|
|
7
|
+
base: [
|
|
8
|
+
'inline-flex',
|
|
9
|
+
'items-center',
|
|
10
|
+
'justify-center',
|
|
11
|
+
'rounded',
|
|
12
|
+
'border',
|
|
13
|
+
'transition-all',
|
|
14
|
+
'disabled:pointer-events-none',
|
|
15
|
+
'disabled:opacity-(--disabled-opacity)',
|
|
16
|
+
'[&_svg]:pointer-events-none',
|
|
17
|
+
'[&_svg]:shrink-0',
|
|
18
|
+
],
|
|
19
|
+
variants: {
|
|
20
|
+
size: {
|
|
21
|
+
xs: 'h-6 text-xs gap-1.5 px-3',
|
|
22
|
+
sm: 'h-7 text-sm gap-2.5 px-4',
|
|
23
|
+
base: 'h-8 text-base gap-3 px-5',
|
|
24
|
+
lg: 'h-9 text-lg gap-3.5 px-6',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
size: 'base',
|
|
29
|
+
},
|
|
30
|
+
}, {
|
|
31
|
+
class: prefix,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export type ToggleVariants = VariantProps<typeof tvToggle>
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-tooltip'
|
|
5
|
-
|
|
6
|
-
export const tvTooltip = 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
|
-
},
|
|
26
|
-
variants: {
|
|
27
|
-
size: {
|
|
28
|
-
xs: {
|
|
29
|
-
contentInner: 'px-1.5 py-0.5 text-xs',
|
|
30
|
-
},
|
|
31
|
-
sm: {
|
|
32
|
-
contentInner: 'px-2 py-1 text-sm',
|
|
33
|
-
},
|
|
34
|
-
base: {
|
|
35
|
-
contentInner: 'px-2.5 py-1.5 text-base',
|
|
36
|
-
},
|
|
37
|
-
lg: {
|
|
38
|
-
contentInner: 'px-3 py-2 text-lg',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
bordered: {
|
|
42
|
-
true: {
|
|
43
|
-
content: 'border',
|
|
44
|
-
},
|
|
45
|
-
false: {
|
|
46
|
-
content: 'border-none',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
size: 'base',
|
|
52
|
-
bordered: true,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
slots: {
|
|
57
|
-
content: `${prefix}-content`,
|
|
58
|
-
contentInner: `${prefix}-content-inner`,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
export type TooltipVariants = VariantProps<typeof tvTooltip>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-tooltip'
|
|
5
|
+
|
|
6
|
+
export const tvTooltip = 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
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
size: {
|
|
28
|
+
xs: {
|
|
29
|
+
contentInner: 'px-1.5 py-0.5 text-xs',
|
|
30
|
+
},
|
|
31
|
+
sm: {
|
|
32
|
+
contentInner: 'px-2 py-1 text-sm',
|
|
33
|
+
},
|
|
34
|
+
base: {
|
|
35
|
+
contentInner: 'px-2.5 py-1.5 text-base',
|
|
36
|
+
},
|
|
37
|
+
lg: {
|
|
38
|
+
contentInner: 'px-3 py-2 text-lg',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
bordered: {
|
|
42
|
+
true: {
|
|
43
|
+
content: 'border',
|
|
44
|
+
},
|
|
45
|
+
false: {
|
|
46
|
+
content: 'border-none',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
size: 'base',
|
|
52
|
+
bordered: true,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
slots: {
|
|
57
|
+
content: `${prefix}-content`,
|
|
58
|
+
contentInner: `${prefix}-content-inner`,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
export type TooltipVariants = VariantProps<typeof tvTooltip>
|
|
@@ -1,165 +1,165 @@
|
|
|
1
|
-
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
-
import { tv } from '../../shared/utils/tv'
|
|
3
|
-
|
|
4
|
-
const prefix = 'rui-tree'
|
|
5
|
-
|
|
6
|
-
export const tvTree = tv(
|
|
7
|
-
{
|
|
8
|
-
slots: {
|
|
9
|
-
root: '',
|
|
10
|
-
tree: '',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
slots: {
|
|
15
|
-
root: prefix,
|
|
16
|
-
tree: `${prefix}-tree`,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
export type TreeVariants = VariantProps<typeof tvTree>
|
|
22
|
-
|
|
23
|
-
export const tvTreeBranch = tv(
|
|
24
|
-
{
|
|
25
|
-
slots: {
|
|
26
|
-
root: 'data-[disabled]:pointer-events-none',
|
|
27
|
-
control: 'flex items-center justify-between data-[disabled]:pointer-events-none',
|
|
28
|
-
title: 'flex items-center',
|
|
29
|
-
text: '',
|
|
30
|
-
icon: 'size-[1lh]',
|
|
31
|
-
indicator: [
|
|
32
|
-
'data-[state=open]:rotate-90',
|
|
33
|
-
'data-[state=closed]:rotate-0',
|
|
34
|
-
'transition-transform',
|
|
35
|
-
],
|
|
36
|
-
content: [
|
|
37
|
-
'overflow-hidden',
|
|
38
|
-
'data-[state=open]:animate-collapsible-down',
|
|
39
|
-
'data-[state=closed]:animate-collapsible-up',
|
|
40
|
-
],
|
|
41
|
-
indentGuide: '',
|
|
42
|
-
checkbox: '',
|
|
43
|
-
checkboxIndicator: '',
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
variants: {
|
|
47
|
-
size: {
|
|
48
|
-
xs: {
|
|
49
|
-
control: [
|
|
50
|
-
'text-xs',
|
|
51
|
-
'min-h-6',
|
|
52
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*3.5)))]',
|
|
53
|
-
],
|
|
54
|
-
title: 'gap-2',
|
|
55
|
-
},
|
|
56
|
-
sm: {
|
|
57
|
-
control: [
|
|
58
|
-
'text-sm',
|
|
59
|
-
'min-h-8',
|
|
60
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4)))]',
|
|
61
|
-
],
|
|
62
|
-
title: 'gap-2.5',
|
|
63
|
-
},
|
|
64
|
-
base: {
|
|
65
|
-
control: [
|
|
66
|
-
'text-base',
|
|
67
|
-
'min-h-10',
|
|
68
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4.5)))]',
|
|
69
|
-
],
|
|
70
|
-
title: 'gap-3',
|
|
71
|
-
},
|
|
72
|
-
lg: {
|
|
73
|
-
control: [
|
|
74
|
-
'text-lg',
|
|
75
|
-
'min-h-12',
|
|
76
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*5)))]',
|
|
77
|
-
],
|
|
78
|
-
title: 'gap-3.5',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
defaultVariants: {
|
|
83
|
-
size: 'base',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
slots: {
|
|
88
|
-
root: `${prefix}-branch`,
|
|
89
|
-
control: `${prefix}-branch-control`,
|
|
90
|
-
title: `${prefix}-branch-title`,
|
|
91
|
-
text: `${prefix}-branch-text`,
|
|
92
|
-
icon: `${prefix}-branch-icon`,
|
|
93
|
-
indicator: `${prefix}-branch-indicator`,
|
|
94
|
-
content: `${prefix}-branch-content`,
|
|
95
|
-
indentGuide: `${prefix}-branch-indent-guide`,
|
|
96
|
-
checkbox: `${prefix}-branch-checkbox`,
|
|
97
|
-
checkboxIndicator: `${prefix}-branch-checkbox-indicator`,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
)
|
|
101
|
-
export type TreeBranchVariants = VariantProps<typeof tvTreeBranch>
|
|
102
|
-
|
|
103
|
-
export const tvTreeItem = tv(
|
|
104
|
-
{
|
|
105
|
-
slots: {
|
|
106
|
-
root: 'data-[disabled]:pointer-events-none',
|
|
107
|
-
title: 'flex items-center gap-2',
|
|
108
|
-
icon: 'size-[1lh]',
|
|
109
|
-
text: '',
|
|
110
|
-
checkbox: '',
|
|
111
|
-
checkboxIndicator: '',
|
|
112
|
-
},
|
|
113
|
-
variants: {
|
|
114
|
-
size: {
|
|
115
|
-
xs: {
|
|
116
|
-
title: [
|
|
117
|
-
'gap-2',
|
|
118
|
-
'min-h-6',
|
|
119
|
-
'text-xs',
|
|
120
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*3.5)))]',
|
|
121
|
-
],
|
|
122
|
-
},
|
|
123
|
-
sm: {
|
|
124
|
-
title: [
|
|
125
|
-
'gap-2.5',
|
|
126
|
-
'min-h-8',
|
|
127
|
-
'text-sm',
|
|
128
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4)))]',
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
base: {
|
|
132
|
-
title: [
|
|
133
|
-
'gap-3',
|
|
134
|
-
'min-h-10',
|
|
135
|
-
'text-base',
|
|
136
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4.5)))]',
|
|
137
|
-
],
|
|
138
|
-
},
|
|
139
|
-
lg: {
|
|
140
|
-
title: [
|
|
141
|
-
'gap-3.5',
|
|
142
|
-
'min-h-12',
|
|
143
|
-
'text-lg',
|
|
144
|
-
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*5)))]',
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
defaultVariants: {
|
|
150
|
-
size: 'base',
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
slots: {
|
|
155
|
-
root: `${prefix}-item`,
|
|
156
|
-
title: `${prefix}-item-title`,
|
|
157
|
-
icon: `${prefix}-item-icon`,
|
|
158
|
-
text: `${prefix}-item-text`,
|
|
159
|
-
checkbox: `${prefix}-item-checkbox`,
|
|
160
|
-
checkboxIndicator: `${prefix}-item-checkbox-indicator`,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
)
|
|
164
|
-
|
|
165
|
-
export type TreeItemVariants = VariantProps<typeof tvTreeItem>
|
|
1
|
+
import type { VariantProps } from '../../shared/utils/tv'
|
|
2
|
+
import { tv } from '../../shared/utils/tv'
|
|
3
|
+
|
|
4
|
+
const prefix = 'rui-tree'
|
|
5
|
+
|
|
6
|
+
export const tvTree = tv(
|
|
7
|
+
{
|
|
8
|
+
slots: {
|
|
9
|
+
root: '',
|
|
10
|
+
tree: '',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
slots: {
|
|
15
|
+
root: prefix,
|
|
16
|
+
tree: `${prefix}-tree`,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export type TreeVariants = VariantProps<typeof tvTree>
|
|
22
|
+
|
|
23
|
+
export const tvTreeBranch = tv(
|
|
24
|
+
{
|
|
25
|
+
slots: {
|
|
26
|
+
root: 'data-[disabled]:pointer-events-none',
|
|
27
|
+
control: 'flex items-center justify-between data-[disabled]:pointer-events-none',
|
|
28
|
+
title: 'flex items-center',
|
|
29
|
+
text: '',
|
|
30
|
+
icon: 'size-[1lh]',
|
|
31
|
+
indicator: [
|
|
32
|
+
'data-[state=open]:rotate-90',
|
|
33
|
+
'data-[state=closed]:rotate-0',
|
|
34
|
+
'transition-transform',
|
|
35
|
+
],
|
|
36
|
+
content: [
|
|
37
|
+
'overflow-hidden',
|
|
38
|
+
'data-[state=open]:animate-collapsible-down',
|
|
39
|
+
'data-[state=closed]:animate-collapsible-up',
|
|
40
|
+
],
|
|
41
|
+
indentGuide: '',
|
|
42
|
+
checkbox: '',
|
|
43
|
+
checkboxIndicator: '',
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
variants: {
|
|
47
|
+
size: {
|
|
48
|
+
xs: {
|
|
49
|
+
control: [
|
|
50
|
+
'text-xs',
|
|
51
|
+
'min-h-6',
|
|
52
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*3.5)))]',
|
|
53
|
+
],
|
|
54
|
+
title: 'gap-2',
|
|
55
|
+
},
|
|
56
|
+
sm: {
|
|
57
|
+
control: [
|
|
58
|
+
'text-sm',
|
|
59
|
+
'min-h-8',
|
|
60
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4)))]',
|
|
61
|
+
],
|
|
62
|
+
title: 'gap-2.5',
|
|
63
|
+
},
|
|
64
|
+
base: {
|
|
65
|
+
control: [
|
|
66
|
+
'text-base',
|
|
67
|
+
'min-h-10',
|
|
68
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4.5)))]',
|
|
69
|
+
],
|
|
70
|
+
title: 'gap-3',
|
|
71
|
+
},
|
|
72
|
+
lg: {
|
|
73
|
+
control: [
|
|
74
|
+
'text-lg',
|
|
75
|
+
'min-h-12',
|
|
76
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*5)))]',
|
|
77
|
+
],
|
|
78
|
+
title: 'gap-3.5',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
size: 'base',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
slots: {
|
|
88
|
+
root: `${prefix}-branch`,
|
|
89
|
+
control: `${prefix}-branch-control`,
|
|
90
|
+
title: `${prefix}-branch-title`,
|
|
91
|
+
text: `${prefix}-branch-text`,
|
|
92
|
+
icon: `${prefix}-branch-icon`,
|
|
93
|
+
indicator: `${prefix}-branch-indicator`,
|
|
94
|
+
content: `${prefix}-branch-content`,
|
|
95
|
+
indentGuide: `${prefix}-branch-indent-guide`,
|
|
96
|
+
checkbox: `${prefix}-branch-checkbox`,
|
|
97
|
+
checkboxIndicator: `${prefix}-branch-checkbox-indicator`,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
)
|
|
101
|
+
export type TreeBranchVariants = VariantProps<typeof tvTreeBranch>
|
|
102
|
+
|
|
103
|
+
export const tvTreeItem = tv(
|
|
104
|
+
{
|
|
105
|
+
slots: {
|
|
106
|
+
root: 'data-[disabled]:pointer-events-none',
|
|
107
|
+
title: 'flex items-center gap-2',
|
|
108
|
+
icon: 'size-[1lh]',
|
|
109
|
+
text: '',
|
|
110
|
+
checkbox: '',
|
|
111
|
+
checkboxIndicator: '',
|
|
112
|
+
},
|
|
113
|
+
variants: {
|
|
114
|
+
size: {
|
|
115
|
+
xs: {
|
|
116
|
+
title: [
|
|
117
|
+
'gap-2',
|
|
118
|
+
'min-h-6',
|
|
119
|
+
'text-xs',
|
|
120
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*3.5)))]',
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
sm: {
|
|
124
|
+
title: [
|
|
125
|
+
'gap-2.5',
|
|
126
|
+
'min-h-8',
|
|
127
|
+
'text-sm',
|
|
128
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4)))]',
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
base: {
|
|
132
|
+
title: [
|
|
133
|
+
'gap-3',
|
|
134
|
+
'min-h-10',
|
|
135
|
+
'text-base',
|
|
136
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*4.5)))]',
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
lg: {
|
|
140
|
+
title: [
|
|
141
|
+
'gap-3.5',
|
|
142
|
+
'min-h-12',
|
|
143
|
+
'text-lg',
|
|
144
|
+
'pl-[calc((var(--depth)-1)*var(--indent,calc(var(--spacing)*5)))]',
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
defaultVariants: {
|
|
150
|
+
size: 'base',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
slots: {
|
|
155
|
+
root: `${prefix}-item`,
|
|
156
|
+
title: `${prefix}-item-title`,
|
|
157
|
+
icon: `${prefix}-item-icon`,
|
|
158
|
+
text: `${prefix}-item-text`,
|
|
159
|
+
checkbox: `${prefix}-item-checkbox`,
|
|
160
|
+
checkboxIndicator: `${prefix}-item-checkbox-indicator`,
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
export type TreeItemVariants = VariantProps<typeof tvTreeItem>
|
package/src/default/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { cn } from '../shared/utils/cn'
|
|
2
|
-
export { tv } from '../shared/utils/tv'
|
|
3
|
-
export * as crafts from './crafts'
|
|
4
|
-
export type * from './crafts'
|
|
1
|
+
export { cn } from '../shared/utils/cn'
|
|
2
|
+
export { tv } from '../shared/utils/tv'
|
|
3
|
+
export * as crafts from './crafts'
|
|
4
|
+
export type * from './crafts'
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
*:where([data-part='arrow']) {
|
|
3
|
-
--arrow-border: var(--color-h00);
|
|
4
|
-
--arrow-background: var(--color-hff);
|
|
5
|
-
|
|
6
|
-
&[data-theme-surface='dark'] {
|
|
7
|
-
--arrow-border: var(--color-h33);
|
|
8
|
-
--arrow-background: var(--color-h00);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&[data-theme-surface='razer'] {
|
|
12
|
-
--arrow-border: var(--color-h00);
|
|
13
|
-
--arrow-background: var(--color-rz-green);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
*:where([data-part='arrow-tip']) {
|
|
18
|
-
@apply bg-(--arrow-background) data-theme-bordered:border-(--arrow-border);
|
|
19
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
*:where([data-part='arrow']) {
|
|
3
|
+
--arrow-border: var(--color-h00);
|
|
4
|
+
--arrow-background: var(--color-hff);
|
|
5
|
+
|
|
6
|
+
&[data-theme-surface='dark'] {
|
|
7
|
+
--arrow-border: var(--color-h33);
|
|
8
|
+
--arrow-background: var(--color-h00);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&[data-theme-surface='razer'] {
|
|
12
|
+
--arrow-border: var(--color-h00);
|
|
13
|
+
--arrow-background: var(--color-rz-green);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
*:where([data-part='arrow-tip']) {
|
|
18
|
+
@apply bg-(--arrow-background) data-theme-bordered:border-(--arrow-border);
|
|
19
|
+
}
|
|
20
20
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.rui-badge {
|
|
3
|
-
&[data-variant="default"] {
|
|
4
|
-
@apply bg-rz-green text-h00 font-rob-bold
|
|
5
|
-
}
|
|
6
|
-
&[data-variant="secondary"] {
|
|
7
|
-
@apply bg-h00 text-rz-green
|
|
8
|
-
}
|
|
9
|
-
&[data-variant="dot"] {
|
|
10
|
-
@apply bg-rz-red
|
|
11
|
-
}
|
|
12
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
.rui-badge {
|
|
3
|
+
&[data-variant="default"] {
|
|
4
|
+
@apply bg-rz-green text-h00 font-rob-bold
|
|
5
|
+
}
|
|
6
|
+
&[data-variant="secondary"] {
|
|
7
|
+
@apply bg-h00 text-rz-green
|
|
8
|
+
}
|
|
9
|
+
&[data-variant="dot"] {
|
|
10
|
+
@apply bg-rz-red
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
13
|
}
|