Skip to content

Commit 4a501fc

Browse files
authored
feat(v3)!: normalize data-state to the open/closed and checked/unchecked axes (#2914)
1 parent b35ad69 commit 4a501fc

115 files changed

Lines changed: 466 additions & 328 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/.vitepress/components/HeroCodeGroup.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ watch(open, () => {
6969
:key="index"
7070
:value="tab.label"
7171
tabindex="-1"
72-
class="text-white/70 py-2.5 px-4 border-box data-[state=active]:shadow-[0_1px_0_#10b981] data-[state=active]:font-medium data-[state=active]:text-white"
72+
class="text-white/70 py-2.5 px-4 border-box data-[state=checked]:shadow-[0_1px_0_#10b981] data-[state=checked]:font-medium data-[state=checked]:text-white"
7373
>
7474
{{ tab.label }}
7575
</TabsTrigger>

‎docs/.vitepress/components/InstallationTabs.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { store } from '../store'
1717
:key="index"
1818
:value="pkg"
1919
tabindex="-1"
20-
class="text-white/70 py-2.5 px-4 data-[state=active]:shadow-[0_1px_0_#10b981] data-[state=active]:font-medium data-[state=active]:text-white hover:text-white"
20+
class="text-white/70 py-2.5 px-4 data-[state=checked]:shadow-[0_1px_0_#10b981] data-[state=checked]:font-medium data-[state=checked]:text-white hover:text-white"
2121
>
2222
{{ pkg }}
2323
</TabsTrigger>

‎docs/.vitepress/config.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ export default defineConfig({
134134
text: `Migration ${BadgeHTML('New')}`,
135135
link: '/docs/guides/migration',
136136
},
137+
{
138+
text: `Migration to v3 ${BadgeHTML('New')}`,
139+
link: '/docs/guides/migration-v3',
140+
},
137141

138142
{ text: `llms.txt ${BadgeHTML('New')}`, link: '/llms.txt' },
139143
],

‎docs/components/Tooltip.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ defineProps<{
1616
</TooltipTrigger>
1717
<TooltipPortal>
1818
<TooltipContent
19-
class="border border-muted data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade text-foreground select-none rounded-md bg-background px-[15px] py-[10px] text-xs leading-none will-change-[transform,opacity]"
19+
class="border border-muted data-[state=open]:data-[delayed]:data-[side=top]:animate-slideDownAndFade data-[state=open]:data-[delayed]:data-[side=right]:animate-slideLeftAndFade data-[state=open]:data-[delayed]:data-[side=left]:animate-slideRightAndFade data-[state=open]:data-[delayed]:data-[side=bottom]:animate-slideUpAndFade text-foreground select-none rounded-md bg-background px-[15px] py-[10px] text-xs leading-none will-change-[transform,opacity]"
2020
:side-offset="6"
2121
>
2222
<span

‎docs/components/demo/NavigationMenu/css/styles.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ p {
9999
z-index: 1;
100100
transition: width, transform 250ms ease;
101101
}
102-
.NavigationMenuIndicator[data-state='visible'] {
102+
.NavigationMenuIndicator[data-state='open'] {
103103
animation: fadeIn 200ms ease;
104104
}
105-
.NavigationMenuIndicator[data-state='hidden'] {
105+
.NavigationMenuIndicator[data-state='closed'] {
106106
animation: fadeOut 200ms ease;
107107
}
108108

‎docs/components/demo/NavigationMenu/tailwind/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const currentTrigger = ref('')
136136
</NavigationMenuItem>
137137

138138
<NavigationMenuIndicator
139-
class="absolute data-[state=hidden]:opacity-0 duration-200 data-[state=visible]:animate-fadeIn data-[state=hidden]:animate-fadeOut top-full w-[--reka-navigation-menu-indicator-size] translate-x-[--reka-navigation-menu-indicator-position] mt-[1px] z-[100] flex h-[10px] items-end justify-center overflow-hidden transition-[all,transform_250ms_ease]"
139+
class="absolute data-[state=closed]:opacity-0 duration-200 data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut top-full w-[--reka-navigation-menu-indicator-size] translate-x-[--reka-navigation-menu-indicator-position] mt-[1px] z-[100] flex h-[10px] items-end justify-center overflow-hidden transition-[all,transform_250ms_ease]"
140140
>
141141
<div class="relative top-[70%] h-[12px] w-[12px] rotate-[45deg] bg-white border" />
142142
</NavigationMenuIndicator>

‎docs/components/demo/Rating/css/styles.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
z-index: var(--reka-rating-item-step-z-index);
2727
}
2828

29-
.RatingItemIndicator[data-state="active"] {
29+
.RatingItemIndicator[data-state="checked"] {
3030
color: hsl(142.1 70.6% 45.3%);
3131
filter: drop-shadow(0 1px 4px hsl(142.1 70.6% 45.3% / 0.5));
3232
}

‎docs/components/demo/Rating/tailwind/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const rating = ref(3)
2424
:key="step"
2525
:step="step"
2626
:aria-label="`Rate ${step}`"
27-
class="absolute overflow-hidden text-stone-200 transition-colors duration-150 data-[state=active]:text-[hsl(142.1_70.6%_45.3%)] data-[state=active]:drop-shadow-[0_1px_4px_hsl(142.1_70.6%_45.3%/0.5)] w-[var(--reka-rating-item-step-width)] opacity-[var(--reka-rating-item-step-opacity)] z-[var(--reka-rating-item-step-z-index)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(142.1_70.6%_45.3%)] rounded"
27+
class="absolute overflow-hidden text-stone-200 transition-colors duration-150 data-[state=checked]:text-[hsl(142.1_70.6%_45.3%)] data-[state=checked]:drop-shadow-[0_1px_4px_hsl(142.1_70.6%_45.3%/0.5)] w-[var(--reka-rating-item-step-width)] opacity-[var(--reka-rating-item-step-opacity)] z-[var(--reka-rating-item-step-z-index)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(142.1_70.6%_45.3%)] rounded"
2828
>
2929
<Icon
3030
icon="material-symbols:star-rounded"

‎docs/components/demo/Tabs/css/styles.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ input {
6666
.TabsTrigger:hover {
6767
color: var(--grass-11);
6868
}
69-
.TabsTrigger[data-state='active'] {
69+
.TabsTrigger[data-state='checked'] {
7070
color: var(--grass-11);
7171
box-shadow: inset 0 -1px 0 0 currentColor, 0 1px 0 0 currentColor;
7272
}

‎docs/components/demo/Tabs/tailwind/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from 'rek
1515
<div class="bg-grass8 w-full h-full" />
1616
</TabsIndicator>
1717
<TabsTrigger
18-
class="bg-white px-5 h-[45px] flex-1 flex items-center justify-center text-sm leading-none text-mauve11 select-none rounded-tl-md hover:text-grass11 data-[state=active]:text-grass11 outline-none cursor-default focus-visible:relative focus-visible:shadow-[0_0_0_2px] focus-visible:shadow-black"
18+
class="bg-white px-5 h-[45px] flex-1 flex items-center justify-center text-sm leading-none text-mauve11 select-none rounded-tl-md hover:text-grass11 data-[state=checked]:text-grass11 outline-none cursor-default focus-visible:relative focus-visible:shadow-[0_0_0_2px] focus-visible:shadow-black"
1919
value="tab1"
2020
>
2121
Account
2222
</TabsTrigger>
2323
<TabsTrigger
24-
class="bg-white px-5 h-[45px] flex-1 flex items-center justify-center text-sm leading-none text-mauve11 select-none rounded-tr-md hover:text-grass11 data-[state=active]:text-grass11 outline-none cursor-default focus-visible:relative focus-visible:shadow-[0_0_0_2px] focus-visible:shadow-black"
24+
class="bg-white px-5 h-[45px] flex-1 flex items-center justify-center text-sm leading-none text-mauve11 select-none rounded-tr-md hover:text-grass11 data-[state=checked]:text-grass11 outline-none cursor-default focus-visible:relative focus-visible:shadow-[0_0_0_2px] focus-visible:shadow-black"
2525
value="tab2"
2626
>
2727
Password

0 commit comments

Comments
 (0)