diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index 9088c48d..404c73f9 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -359,6 +359,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/DatePickerWithRange.vue').then(m => m.default), files: ['../src/lib/registry/default/example/DatePickerWithRange.vue'], }, + DateTimePickerDemo: { + name: 'DateTimePickerDemo', + type: 'components:example', + registryDependencies: ['utils', 'button', 'calendar', 'popover'], + component: () => import('../src/lib/registry/default/example/DateTimePickerDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/DateTimePickerDemo.vue'], + }, DialogCustomCloseButton: { name: 'DialogCustomCloseButton', type: 'components:example', @@ -1194,6 +1201,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/DatePickerWithRange.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/DatePickerWithRange.vue'], }, + DateTimePickerDemo: { + name: 'DateTimePickerDemo', + type: 'components:example', + registryDependencies: ['utils', 'button', 'calendar', 'popover'], + component: () => import('../src/lib/registry/new-york/example/DateTimePickerDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/DateTimePickerDemo.vue'], + }, DialogCustomCloseButton: { name: 'DialogCustomCloseButton', type: 'components:example', diff --git a/apps/www/src/content/docs/components/date-picker.md b/apps/www/src/content/docs/components/date-picker.md index 43aef149..d2070ad2 100644 --- a/apps/www/src/content/docs/components/date-picker.md +++ b/apps/www/src/content/docs/components/date-picker.md @@ -64,6 +64,10 @@ const date = ref() +### Date Time Picker + + + ### With Presets diff --git a/apps/www/src/lib/registry/default/example/DateTimePickerDemo.vue b/apps/www/src/lib/registry/default/example/DateTimePickerDemo.vue new file mode 100644 index 00000000..883f7a89 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/DateTimePickerDemo.vue @@ -0,0 +1,36 @@ + + + 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 181a43da..64f8cf3f 100644 --- a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue @@ -236,4 +236,49 @@ onMounted(async () => { -webkit-transform: translateY(calc(-1 * var(--vc-slide-translate))); transform: translateY(calc(-1 * var(--vc-slide-translate))); } +/** + * Timepicker styles + */ +.vc-time-picker { + @apply flex flex-col items-center p-2; +} +.vc-time-picker.vc-invalid { + @apply pointer-events-none opacity-50; +} +.vc-time-picker.vc-attached { + @apply border-t border-solid border-secondary mt-2; +} +.vc-time-picker > * + * { + @apply mt-1; +} +.vc-time-header { + @apply flex items-center text-sm font-semibold uppercase mt-1 px-1 leading-6; +} +.vc-time-select-group { + @apply inline-flex items-center px-1 rounded-md bg-primary-foreground border border-solid border-secondary; +} +.vc-time-select-group .vc-base-icon { + @apply mr-1 text-primary stroke-primary; +} +.vc-time-select-group select { + @apply bg-primary-foreground p-1 appearance-none outline-none text-center; +} +.vc-time-weekday { + @apply text-muted-foreground tracking-wide; +} +.vc-time-month { + @apply text-primary ml-2; +} +.vc-time-day { + @apply text-primary ml-1; +} +.vc-time-year { + @apply text-muted-foreground ml-2; +} +.vc-time-colon { + @apply mb-0.5; +} +.vc-time-decimal { + @apply ml-0.5; +} diff --git a/apps/www/src/lib/registry/new-york/example/DateTimePickerDemo.vue b/apps/www/src/lib/registry/new-york/example/DateTimePickerDemo.vue new file mode 100644 index 00000000..401d89a8 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/DateTimePickerDemo.vue @@ -0,0 +1,36 @@ + + + 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 580e6097..409b07f7 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 @@ -242,4 +242,49 @@ onMounted(async () => { -webkit-transform: translateY(calc(-1 * var(--vc-slide-translate))); transform: translateY(calc(-1 * var(--vc-slide-translate))); } +/** + * Timepicker styles + */ +.vc-time-picker { + @apply flex flex-col items-center p-2; +} +.vc-time-picker.vc-invalid { + @apply pointer-events-none opacity-50; +} +.vc-time-picker.vc-attached { + @apply border-t border-solid border-secondary mt-2; +} +.vc-time-picker > * + * { + @apply mt-1; +} +.vc-time-header { + @apply flex items-center text-sm font-semibold uppercase mt-1 px-1 leading-6; +} +.vc-time-select-group { + @apply inline-flex items-center px-1 rounded-md bg-primary-foreground border border-solid border-secondary; +} +.vc-time-select-group .vc-base-icon { + @apply mr-1 text-primary stroke-primary; +} +.vc-time-select-group select { + @apply bg-primary-foreground p-1 appearance-none outline-none text-center; +} +.vc-time-weekday { + @apply text-muted-foreground tracking-wide; +} +.vc-time-month { + @apply text-primary ml-2; +} +.vc-time-day { + @apply text-primary ml-1; +} +.vc-time-year { + @apply text-muted-foreground ml-2; +} +.vc-time-colon { + @apply mb-0.5; +} +.vc-time-decimal { + @apply ml-0.5; +} diff --git a/apps/www/src/public/registry/styles/default/calendar.json b/apps/www/src/public/registry/styles/default/calendar.json index 585f8f5a..e8f631e2 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 b03e1e38..b83d724f 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",