fix: add rotation on rtl for chevrons and arrows
This commit is contained in:
parent
71fea4ff3a
commit
71d97fac57
|
|
@ -5,6 +5,6 @@ import { Button } from '@/lib/registry/default/ui/button'
|
|||
|
||||
<template>
|
||||
<Button variant="outline" size="icon">
|
||||
<ChevronRight class="w-4 h-4" />
|
||||
<ChevronRight class="w-4 h-4 rtl:rotate-180" />
|
||||
</Button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ const vCalendarSlots = computed(() => {
|
|||
<div class="relative">
|
||||
<div v-if="$attrs.mode !== 'time'" class="absolute flex justify-between w-full px-4 top-3 z-[1]">
|
||||
<button :class="cn(buttonVariants({ variant: 'outline' }), 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100')" @click="handleNav('prev')">
|
||||
<ChevronLeft class="w-4 h-4" />
|
||||
<ChevronLeft class="w-4 h-4 rtl:rotate-180" />
|
||||
</button>
|
||||
<button :class="cn(buttonVariants({ variant: 'outline' }), 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100')" @click="handleNav('next')">
|
||||
<ChevronRight class="w-4 h-4" />
|
||||
<ChevronRight class="w-4 h-4 rtl:rotate-180" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
@ -102,11 +102,11 @@ const vCalendarSlots = computed(() => {
|
|||
</template>
|
||||
|
||||
<template #nav-prev-button>
|
||||
<ChevronLeft />
|
||||
<ChevronLeft class="rtl:rotate-180" />
|
||||
</template>
|
||||
|
||||
<template #nav-next-button>
|
||||
<ChevronRight />
|
||||
<ChevronRight class="rtl:rotate-180" />
|
||||
</template>
|
||||
</DatePicker>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const { orientation, canScrollNext, scrollNext } = useCarousel()
|
|||
@click="scrollNext"
|
||||
>
|
||||
<slot>
|
||||
<ArrowRight class="h-4 w-4 text-current" />
|
||||
<ArrowRight class="h-4 w-4 text-current rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const { orientation, canScrollPrev, scrollPrev } = useCarousel()
|
|||
@click="scrollPrev"
|
||||
>
|
||||
<slot>
|
||||
<ArrowLeft class="h-4 w-4 text-current" />
|
||||
<ArrowLeft class="h-4 w-4 text-current rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||
)"
|
||||
>
|
||||
<slot />
|
||||
<ChevronRight class="ms-auto h-4 w-4" />
|
||||
<ChevronRight class="ms-auto h-4 w-4 rtl:rotate-180" />
|
||||
</ContextMenuSubTrigger>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||
)"
|
||||
>
|
||||
<slot />
|
||||
<ChevronRight class="ms-auto h-4 w-4" />
|
||||
<ChevronRight class="ms-auto h-4 w-4 rtl:rotate-180" />
|
||||
</DropdownMenuSubTrigger>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||
)"
|
||||
>
|
||||
<slot />
|
||||
<ChevronRight class="ms-auto h-4 w-4" />
|
||||
<ChevronRight class="ms-auto h-4 w-4 rtl:rotate-180" />
|
||||
</MenubarSubTrigger>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const delegatedProps = computed(() => {
|
|||
<PaginationNext v-bind="delegatedProps">
|
||||
<Button :class="cn('w-10 h-10 p-0', props.class)" variant="outline">
|
||||
<slot>
|
||||
<ChevronRight class="h-4 w-4" />
|
||||
<ChevronRight class="h-4 w-4 rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</PaginationNext>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const delegatedProps = computed(() => {
|
|||
<PaginationPrev v-bind="delegatedProps">
|
||||
<Button :class="cn('w-10 h-10 p-0', props.class)" variant="outline">
|
||||
<slot>
|
||||
<ChevronLeft class="h-4 w-4" />
|
||||
<ChevronLeft class="h-4 w-4 rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</PaginationPrev>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ import { Button } from '@/lib/registry/new-york/ui/button'
|
|||
|
||||
<template>
|
||||
<Button variant="outline" size="icon">
|
||||
<ChevronRightIcon class="w-4 h-4" />
|
||||
<ChevronRightIcon class="w-4 h-4 rtl:rotate-180" />
|
||||
</Button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -81,10 +81,10 @@ const vCalendarSlots = computed(() => {
|
|||
<div class="relative">
|
||||
<div v-if="$attrs.mode !== 'time'" class="absolute flex justify-between w-full px-4 top-3 z-[1]">
|
||||
<button :class="cn(buttonVariants({ variant: 'outline' }), 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100')" @click="handleNav('prev')">
|
||||
<ChevronLeftIcon class="w-4 h-4" />
|
||||
<ChevronLeftIcon class="w-4 h-4 rtl:rotate-180" />
|
||||
</button>
|
||||
<button :class="cn(buttonVariants({ variant: 'outline' }), 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100')" @click="handleNav('next')">
|
||||
<ChevronRightIcon class="w-4 h-4" />
|
||||
<ChevronRightIcon class="w-4 h-4 rtl:rotate-180" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
@ -103,11 +103,11 @@ const vCalendarSlots = computed(() => {
|
|||
</template>
|
||||
|
||||
<template #nav-prev-button>
|
||||
<ChevronLeft />
|
||||
<ChevronLeftIcon class="rtl:rotate-180" />
|
||||
</template>
|
||||
|
||||
<template #nav-next-button>
|
||||
<ChevronRight />
|
||||
<ChevronRightIcon class="rtl:rotate-180" />
|
||||
</template>
|
||||
</DatePicker>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const { orientation, canScrollNext, scrollNext } = useCarousel()
|
|||
@click="scrollNext"
|
||||
>
|
||||
<slot>
|
||||
<ArrowRightIcon class="h-4 w-4 text-current" />
|
||||
<ArrowRightIcon class="h-4 w-4 text-current rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const { orientation, canScrollPrev, scrollPrev } = useCarousel()
|
|||
@click="scrollPrev"
|
||||
>
|
||||
<slot>
|
||||
<ArrowLeftIcon class="h-4 w-4 text-current" />
|
||||
<ArrowLeftIcon class="h-4 w-4 text-current rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||
)"
|
||||
>
|
||||
<slot />
|
||||
<ChevronRightIcon class="ms-auto h-4 w-4" />
|
||||
<ChevronRightIcon class="ms-auto h-4 w-4 rtl:rotate-180" />
|
||||
</ContextMenuSubTrigger>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||
)"
|
||||
>
|
||||
<slot />
|
||||
<ChevronRightIcon class="ms-auto h-4 w-4" />
|
||||
<ChevronRightIcon class="ms-auto h-4 w-4 rtl:rotate-180" />
|
||||
</DropdownMenuSubTrigger>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|||
)"
|
||||
>
|
||||
<slot />
|
||||
<ChevronRightIcon class="ms-auto h-4 w-4" />
|
||||
<ChevronRightIcon class="ms-auto h-4 w-4 rtl:rotate-180" />
|
||||
</MenubarSubTrigger>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const delegatedProps = computed(() => {
|
|||
<PaginationFirst v-bind="delegatedProps">
|
||||
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline">
|
||||
<slot>
|
||||
<DoubleArrowLeftIcon />
|
||||
<DoubleArrowLeftIcon class="rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</PaginationFirst>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const delegatedProps = computed(() => {
|
|||
<PaginationLast v-bind="delegatedProps">
|
||||
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline">
|
||||
<slot>
|
||||
<DoubleArrowRightIcon />
|
||||
<DoubleArrowRightIcon class="rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</PaginationLast>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const delegatedProps = computed(() => {
|
|||
<PaginationNext v-bind="delegatedProps">
|
||||
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline">
|
||||
<slot>
|
||||
<ChevronRightIcon />
|
||||
<ChevronRightIcon class="rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</PaginationNext>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const delegatedProps = computed(() => {
|
|||
<PaginationPrev v-bind="delegatedProps">
|
||||
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline">
|
||||
<slot>
|
||||
<ChevronLeftIcon />
|
||||
<ChevronLeftIcon class="rtl:rotate-180" />
|
||||
</slot>
|
||||
</Button>
|
||||
</PaginationPrev>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user