Skip to content

Commit

Permalink
feat: new calendar components (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
sadeghbarati authored Apr 11, 2024
1 parent 11d77fb commit cfccb8e
Show file tree
Hide file tree
Showing 205 changed files with 4,380 additions and 1,681 deletions.
18 changes: 11 additions & 7 deletions apps/www/.vitepress/theme/components/theming/Theming.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script setup lang="ts">
import { ref } from 'vue'
import { addDays, startOfToday } from 'date-fns'
import { type Ref, ref } from 'vue'
import type { DateRange } from 'radix-vue'
import { getLocalTimeZone, today } from '@internationalized/date'
import ThemingLayout from './../../layout/ThemingLayout.vue'
import CookieSettings from '@/examples/cards/components/CookieSettings.vue'
Expand All @@ -19,12 +21,14 @@ import CardStats from '@/lib/registry/new-york/example/CardStats.vue'
import {
Card,
} from '@/lib/registry/new-york/ui/card'
import { Calendar } from '@/lib/registry/new-york/ui/calendar'
import { RangeCalendar } from '@/lib/registry/new-york/ui/range-calendar'
const now = today(getLocalTimeZone())
const range = ref({
start: startOfToday(),
end: addDays(startOfToday(), 8),
})
start: now,
end: now.add({ days: 8 }),
}) as Ref<DateRange>
</script>

<template>
Expand Down Expand Up @@ -52,7 +56,7 @@ const range = ref({
<div class="space-y-4 lg:col-span-6 xl:col-span-5 xl:space-y-4">
<div class="hidden gap-1 sm:grid-cols-[280px_1fr] md:grid">
<Card class="max-w-[280px]">
<Calendar v-model.range="range" />
<RangeCalendar v-model="range" />
</Card>

<div class="pt-3 sm:pl-2 sm:pt-0 xl:pl-3">
Expand Down
16 changes: 8 additions & 8 deletions apps/www/.vitepress/theme/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export const docsConfig: DocsConfig = {
title: 'Contribution',
href: '/docs/contribution',
items: [],
label: 'New',
},
],
},
Expand Down Expand Up @@ -172,7 +171,6 @@ export const docsConfig: DocsConfig = {
title: 'Breadcrumb',
href: '/docs/components/breadcrumb',
items: [],
label: 'New',
},
{
title: 'Button',
Expand All @@ -183,6 +181,7 @@ export const docsConfig: DocsConfig = {
title: 'Calendar',
href: '/docs/components/calendar',
items: [],
label: 'Updated',
},
{
title: 'Card',
Expand All @@ -192,7 +191,6 @@ export const docsConfig: DocsConfig = {
{
title: 'Carousel',
href: '/docs/components/carousel',
label: 'New',
items: [],
},
{
Expand Down Expand Up @@ -229,6 +227,7 @@ export const docsConfig: DocsConfig = {
title: 'Date Picker',
href: '/docs/components/date-picker',
items: [],
label: 'Updated',
},
{
title: 'Dialog',
Expand All @@ -239,7 +238,6 @@ export const docsConfig: DocsConfig = {
title: 'Drawer',
href: '/docs/components/drawer',
items: [],
label: 'New',
},
{
title: 'Dropdown Menu',
Expand Down Expand Up @@ -284,7 +282,6 @@ export const docsConfig: DocsConfig = {
{
title: 'Pin Input',
href: '/docs/components/pin-input',
label: 'New',
items: [],
},
{
Expand All @@ -302,10 +299,15 @@ export const docsConfig: DocsConfig = {
href: '/docs/components/radio-group',
items: [],
},
{
title: 'Range Calendar',
href: '/docs/components/range-calendar',
items: [],
label: 'New',
},
{
title: 'Resizable',
href: '/docs/components/resizable',
label: 'New',
items: [],
},
{
Expand Down Expand Up @@ -341,7 +343,6 @@ export const docsConfig: DocsConfig = {
{
title: 'Sonner',
href: '/docs/components/sonner',
label: 'New',
items: [],
},
{
Expand All @@ -362,7 +363,6 @@ export const docsConfig: DocsConfig = {
{
title: 'Tags Input',
href: '/docs/components/tags-input',
label: 'New',
items: [],
},
{
Expand Down
Loading

0 comments on commit cfccb8e

Please sign in to comment.