@@ -71,6 +71,11 @@ const { code: locale, dir, t } = useLocale()
71
71
72
72
const rootProps = useForwardPropsEmits (reactiveOmit (props , ' range' , ' modelValue' , ' defaultValue' , ' color' , ' size' , ' monthControls' , ' yearControls' , ' class' , ' ui' ), emits )
73
73
74
+ const prevYearIcon = computed (() => dir .value === ' rtl' ? appConfig .ui .icons .chevronDoubleRight : appConfig .ui .icons .chevronDoubleLeft )
75
+ const prevMonthIcon = computed (() => dir .value === ' rtl' ? appConfig .ui .icons .chevronRight : appConfig .ui .icons .chevronLeft )
76
+ const nextYearIcon = computed (() => dir .value === ' rtl' ? appConfig .ui .icons .chevronDoubleLeft : appConfig .ui .icons .chevronDoubleRight )
77
+ const nextMonthIcon = computed (() => dir .value === ' rtl' ? appConfig .ui .icons .chevronLeft : appConfig .ui .icons .chevronRight )
78
+
74
79
const ui = computed (() => calendar ({
75
80
color: props .color ,
76
81
size: props .size
@@ -99,21 +104,21 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar)
99
104
>
100
105
<Calendar .Header :class =" ui.header({ class: props.ui?.header })" >
101
106
<Calendar .Prev v-if =" props.yearControls" :prev-page =" (date: DateValue) => paginateYear(date, -1)" :aria-label =" t('calendar.prevYear')" as-child >
102
- <UButton :icon =" appConfig.ui.icons.chevronDoubleLeft " :size =" props.size" color =" neutral" variant =" ghost" />
107
+ <UButton :icon =" prevYearIcon " :size =" props.size" color =" neutral" variant =" ghost" />
103
108
</Calendar .Prev >
104
109
<Calendar .Prev v-if =" props.monthControls" :aria-label =" t('calendar.prevMonth')" as-child >
105
- <UButton :icon =" appConfig.ui.icons.chevronLeft " :size =" props.size" color =" neutral" variant =" ghost" />
110
+ <UButton :icon =" prevMonthIcon " :size =" props.size" color =" neutral" variant =" ghost" />
106
111
</Calendar .Prev >
107
112
<Calendar .Heading v-slot =" { headingValue }" :class =" ui.heading({ class: props.ui?.heading })" >
108
113
<slot name =" heading" :value =" headingValue" >
109
114
{{ headingValue }}
110
115
</slot >
111
116
</Calendar .Heading >
112
117
<Calendar .Next v-if =" props.monthControls" :aria-label =" t('calendar.nextMonth')" as-child >
113
- <UButton :icon =" appConfig.ui.icons.chevronRight " :size =" props.size" color =" neutral" variant =" ghost" />
118
+ <UButton :icon =" nextMonthIcon " :size =" props.size" color =" neutral" variant =" ghost" />
114
119
</Calendar .Next >
115
120
<Calendar .Next v-if =" props.yearControls" :next-page =" (date: DateValue) => paginateYear(date, 1)" :aria-label =" t('calendar.nextYear')" as-child >
116
- <UButton :icon =" appConfig.ui.icons.chevronDoubleRight " :size =" props.size" color =" neutral" variant =" ghost" />
121
+ <UButton :icon =" nextYearIcon " :size =" props.size" color =" neutral" variant =" ghost" />
117
122
</Calendar .Next >
118
123
</Calendar .Header >
119
124
<div :class =" ui.body({ class: props.ui?.body })" >
0 commit comments