@@ -43,7 +43,7 @@ import { cn } from '@/server/cn';
43
43
const contextMenuSubTriggerVariants = cva (
44
44
[
45
45
'group relative flex cursor-pointer select-none items-center gap-2 rounded px-2 py-1.5 text-sm outline-none' ,
46
- 'data-disabled:opacity-50 data-disabled:pointer-events-none' ,
46
+ 'data-[ disabled] :opacity-50 data-[ disabled] :pointer-events-none' ,
47
47
] ,
48
48
{
49
49
defaultVariants : {
@@ -57,15 +57,15 @@ const contextMenuSubTriggerVariants = cva(
57
57
variant : {
58
58
default : [
59
59
'focus:bg-accent focus:text-accent-foreground' ,
60
- 'data-state- open:bg-accent data-state- open:text-accent-foreground' ,
61
- 'data-highlighted:bg-accent data-highlighted:text-accent-foreground' ,
62
- 'data-highlighted:data-state- open:bg-accent data-highlighted:data-state- open:text-accent-foreground' ,
60
+ 'data-[ state= open] :bg-accent data-[ state= open] :text-accent-foreground' ,
61
+ 'data-[ highlighted] :bg-accent data-[ highlighted] :text-accent-foreground' ,
62
+ 'data-[ highlighted] :data-[ state= open] :bg-accent data-[ highlighted] :data-[ state= open] :text-accent-foreground' ,
63
63
] ,
64
64
destructive : [
65
65
'focus:bg-destructive-foreground focus:text-destructive' ,
66
- 'data-state- open:bg-destructive-foreground data-state- open:text-destructive' ,
67
- 'data-highlighted:bg-destructive-foreground data-highlighted:text-destructive' ,
68
- 'data-highlighted:data-state- open:bg-destructive-foreground data-highlighted:data-state- open:text-destructive' ,
66
+ 'data-[ state= open] :bg-destructive-foreground data-[ state= open] :text-destructive' ,
67
+ 'data-[ highlighted] :bg-destructive-foreground data-[ highlighted] :text-destructive' ,
68
+ 'data-[ highlighted] :data-[ state= open] :bg-destructive-foreground data-[ highlighted] :data-[ state= open] :text-destructive' ,
69
69
] ,
70
70
} ,
71
71
} ,
@@ -79,7 +79,7 @@ type ContextMenuSubTriggerVariantsProps = VariantProps<
79
79
const contextMenuItemVariants = cva (
80
80
[
81
81
'group relative flex cursor-pointer select-none items-center gap-2 rounded px-2 py-1.5 text-sm outline-none' ,
82
- 'data-disabled:opacity-50 data-disabled:pointer-events-none' ,
82
+ 'data-[ disabled] :opacity-50 data-[ disabled] :pointer-events-none' ,
83
83
] ,
84
84
{
85
85
defaultVariants : {
@@ -93,12 +93,12 @@ const contextMenuItemVariants = cva(
93
93
variant : {
94
94
default : [
95
95
'focus:bg-accent focus:text-accent-foreground' ,
96
- 'data-highlighted:bg-accent data-highlighted:text-accent-foreground' ,
96
+ 'data-[ highlighted] :bg-accent data-[ highlighted] :text-accent-foreground' ,
97
97
] ,
98
98
destructive : [
99
99
'text-destructive' ,
100
100
'focus:bg-destructive-foreground focus:text-destructive' ,
101
- 'data-highlighted:bg-destructive-foreground data-highlighted:text-destructive' ,
101
+ 'data-[ highlighted] :bg-destructive-foreground data-[ highlighted] :text-destructive' ,
102
102
] ,
103
103
} ,
104
104
} ,
@@ -112,7 +112,7 @@ type ContextMenuItemVariantsProps = VariantProps<
112
112
const contextMenuCheckboxItemVariants = cva (
113
113
[
114
114
'group relative flex cursor-pointer select-none items-center gap-2 rounded px-2 py-1.5 pl-8 text-sm outline-none' ,
115
- 'data-disabled:opacity-50 data-disabled:pointer-events-none' ,
115
+ 'data-[ disabled] :opacity-50 data-[ disabled] :pointer-events-none' ,
116
116
] ,
117
117
{
118
118
defaultVariants : {
@@ -122,12 +122,12 @@ const contextMenuCheckboxItemVariants = cva(
122
122
variant : {
123
123
default : [
124
124
'focus:bg-accent focus:text-accent-foreground' ,
125
- 'data-highlighted:bg-accent data-highlighted:text-accent-foreground' ,
125
+ 'data-[ highlighted] :bg-accent data-[ highlighted] :text-accent-foreground' ,
126
126
] ,
127
127
destructive : [
128
128
'text-destructive' ,
129
129
'focus:bg-destructive-foreground focus:text-destructive' ,
130
- 'data-highlighted:bg-destructive-foreground data-highlighted:text-destructive' ,
130
+ 'data-[ highlighted] :bg-destructive-foreground data-[ highlighted] :text-destructive' ,
131
131
] ,
132
132
} ,
133
133
} ,
@@ -141,7 +141,7 @@ type ContextMenuCheckboxItemVariantsProps = VariantProps<
141
141
const contextMenuRadioItemVariants = cva (
142
142
[
143
143
'group relative flex cursor-pointer select-none items-center gap-2 rounded px-2 py-1.5 pl-8 text-sm outline-none' ,
144
- 'data-disabled:opacity-50 data-disabled:pointer-events-none' ,
144
+ 'data-[ disabled] :opacity-50 data-[ disabled] :pointer-events-none' ,
145
145
] ,
146
146
{
147
147
defaultVariants : {
@@ -151,12 +151,12 @@ const contextMenuRadioItemVariants = cva(
151
151
variant : {
152
152
default : [
153
153
'focus:bg-accent focus:text-accent-foreground' ,
154
- 'data-highlighted:bg-accent data-highlighted:text-accent-foreground' ,
154
+ 'data-[ highlighted] :bg-accent data-[ highlighted] :text-accent-foreground' ,
155
155
] ,
156
156
destructive : [
157
157
'text-destructive' ,
158
158
'focus:bg-destructive-foreground focus:text-destructive' ,
159
- 'data-highlighted:bg-destructive-foreground data-highlighted:text-destructive' ,
159
+ 'data-[ highlighted] :bg-destructive-foreground data-[ highlighted] :text-destructive' ,
160
160
] ,
161
161
} ,
162
162
} ,
@@ -267,16 +267,16 @@ export const ContextMenuSubContent = React.forwardRef<
267
267
className = { cn (
268
268
'bg-popover text-popover-foreground relative z-40 min-w-[8rem] rounded-md border p-1 shadow-lg will-change-[opacity,transform]' ,
269
269
[
270
- 'data-state- open:data-side- top:animate-slide-in-from-bottom' ,
271
- 'data-state- open:data-side- bottom:animate-slide-in-from-top' ,
272
- 'data-state- open:data-side- left:animate-slide-in-from-right' ,
273
- 'data-state- open:data-side- right:animate-slide-in-from-left' ,
270
+ 'data-[ state= open] :data-[ side= top] :animate-slide-in-from-bottom' ,
271
+ 'data-[ state= open] :data-[ side= bottom] :animate-slide-in-from-top' ,
272
+ 'data-[ state= open] :data-[ side= left] :animate-slide-in-from-right' ,
273
+ 'data-[ state= open] :data-[ side= right] :animate-slide-in-from-left' ,
274
274
] ,
275
275
[
276
- 'data-state- closed:data-side- top:animate-slide-out-to-bottom' ,
277
- 'data-state- closed:data-side- bottom:animate-slide-out-to-top' ,
278
- 'data-state- closed:data-side- left:animate-slide-out-to-right' ,
279
- 'data-state- closed:data-side- right:animate-slide-out-to-left' ,
276
+ 'data-[ state= closed] :data-[ side= top] :animate-slide-out-to-bottom' ,
277
+ 'data-[ state= closed] :data-[ side= bottom] :animate-slide-out-to-top' ,
278
+ 'data-[ state= closed] :data-[ side= left] :animate-slide-out-to-right' ,
279
+ 'data-[ state= closed] :data-[ side= right] :animate-slide-out-to-left' ,
280
280
] ,
281
281
className ,
282
282
) }
0 commit comments