From 406e4ff8a8950b4d0ed72a79c43d1f308c6ae65d Mon Sep 17 00:00:00 2001 From: Greg Sanderson Date: Thu, 15 Feb 2024 12:50:23 +0000 Subject: [PATCH] fix: calendar weeks alignment (#344) The component's CSS adds additional padding which results in Saturday and Sunday not being aligned with the rest of the days. --------- Co-authored-by: Sadegh Barati --- .../src/lib/registry/default/ui/calendar/Calendar.vue | 10 ++-------- .../src/lib/registry/new-york/ui/calendar/Calendar.vue | 10 ++-------- .../src/public/registry/styles/default/calendar.json | 2 +- .../src/public/registry/styles/new-york/calendar.json | 2 +- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue index e44796a15..b8c60f3d0 100644 --- a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue @@ -147,16 +147,10 @@ const vCalendarSlots = computed(() => { @apply mt-4; } .calendar .vc-weekdays { - @apply flex; + @apply justify-items-center; } .calendar .vc-weekday { - @apply text-muted-foreground rounded-md w-full font-normal text-[0.8rem]; -} -.calendar .vc-weekday-1 { - @apply pr-3; -} -.calendar .vc-weekday-7 { - @apply pl-3; + @apply text-muted-foreground rounded-md font-normal text-[0.8rem]; } .calendar .vc-weeks { @apply w-full space-y-2 flex flex-col [&>_div]:grid [&>_div]:grid-cols-7; diff --git a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue index 6fadd9d1c..bada5b225 100644 --- a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue @@ -148,16 +148,10 @@ const vCalendarSlots = computed(() => { @apply mt-4; } .calendar .vc-weekdays { - @apply flex; + @apply justify-items-center; } .calendar .vc-weekday { - @apply text-muted-foreground rounded-md w-full font-normal text-[0.8rem]; -} -.calendar .vc-weekday-1 { - @apply pr-3; -} -.calendar .vc-weekday-7 { - @apply pl-3; + @apply text-muted-foreground rounded-md font-normal text-[0.8rem]; } .calendar .vc-weeks { @apply w-full space-y-2 flex flex-col [&>_div]:grid [&>_div]:grid-cols-7; diff --git a/apps/www/src/public/registry/styles/default/calendar.json b/apps/www/src/public/registry/styles/default/calendar.json index f2c24d223..40b158fb1 100644 --- a/apps/www/src/public/registry/styles/default/calendar.json +++ b/apps/www/src/public/registry/styles/default/calendar.json @@ -11,7 +11,7 @@ "files": [ { "name": "Calendar.vue", - "content": "\n\n\n\n\n" + "content": "\n\n\n\n\n" }, { "name": "index.ts", diff --git a/apps/www/src/public/registry/styles/new-york/calendar.json b/apps/www/src/public/registry/styles/new-york/calendar.json index 13324253a..5b6b65d49 100644 --- a/apps/www/src/public/registry/styles/new-york/calendar.json +++ b/apps/www/src/public/registry/styles/new-york/calendar.json @@ -11,7 +11,7 @@ "files": [ { "name": "Calendar.vue", - "content": "\n\n\n\n\n" + "content": "\n\n\n\n\n" }, { "name": "index.ts",