diff --git a/apps/www/package.json b/apps/www/package.json index 429bbd61..2c8d1d78 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -33,7 +33,7 @@ "embla-carousel-vue": "^8.0.0", "lucide-vue-next": "^0.359.0", "magic-string": "^0.30.8", - "radix-vue": "^1.6.2", + "radix-vue": "^1.7.0", "tailwindcss-animate": "^1.0.7", "v-calendar": "^3.1.2", "vaul-vue": "^0.1.0", diff --git a/apps/www/src/examples/dashboard/components/DateRangePicker.vue b/apps/www/src/examples/dashboard/components/DateRangePicker.vue index 687e2f10..3ffb582e 100644 --- a/apps/www/src/examples/dashboard/components/DateRangePicker.vue +++ b/apps/www/src/examples/dashboard/components/DateRangePicker.vue @@ -57,6 +57,7 @@ const value = ref({ :number-of-months="2" initial-focus :placeholder="value.start" + @update:start-value="(startDate) => value.start = startDate" /> diff --git a/apps/www/src/lib/registry/default/example/CalendarForm.vue b/apps/www/src/lib/registry/default/example/CalendarForm.vue index 151dc42d..5b6b762e 100644 --- a/apps/www/src/lib/registry/default/example/CalendarForm.vue +++ b/apps/www/src/lib/registry/default/example/CalendarForm.vue @@ -1,7 +1,7 @@ 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 6e89d6fe..0486e496 100644 --- a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue @@ -29,10 +29,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) -
+
- + @@ -40,8 +40,8 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) - - + + diff --git a/apps/www/src/lib/registry/default/ui/range-calendar/RangeCalendar.vue b/apps/www/src/lib/registry/default/ui/range-calendar/RangeCalendar.vue index 0ad318fc..3033f05b 100644 --- a/apps/www/src/lib/registry/default/ui/range-calendar/RangeCalendar.vue +++ b/apps/www/src/lib/registry/default/ui/range-calendar/RangeCalendar.vue @@ -29,10 +29,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) -
+
- + @@ -40,8 +40,8 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) - - + + import { computed, h, ref } from 'vue' import { CalendarDate, DateFormatter, getLocalTimeZone, parseDate, today } from '@internationalized/date' -import { toDate } from 'radix-vue' +import { toDate } from 'radix-vue/date' import { CalendarIcon } from '@radix-icons/vue' import { useForm } from 'vee-validate' import { toTypedSchema } from '@vee-validate/zod' @@ -69,7 +69,7 @@ const onSubmit = handleSubmit((values) => { - + import { type HTMLAttributes, type Ref, computed, toRef } from 'vue' -import { CalendarRoot, type CalendarRootEmits, type CalendarRootProps, toDate, useForwardPropsEmits } from 'radix-vue' +import { CalendarRoot, type CalendarRootEmits, type CalendarRootProps, useDateFormatter, useForwardPropsEmits } from 'radix-vue' +import { createDecade, createYear, toDate } from 'radix-vue/date' import { type DateValue, getLocalTimeZone, today } from '@internationalized/date' import { useVModel } from '@vueuse/core' import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading } from '@/lib/registry/new-york/ui/calendar' @@ -34,11 +35,13 @@ const placeholder = useVModel(props, 'modelValue', emits, { }) as Ref const forwarded = useForwardPropsEmits(delegatedProps, emits) + +const formatter = useDateFormatter('en') 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 6e89d6fe..0486e496 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 @@ -29,10 +29,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) -
+
- + @@ -40,8 +40,8 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) - - + + diff --git a/apps/www/src/lib/registry/new-york/ui/range-calendar/RangeCalendar.vue b/apps/www/src/lib/registry/new-york/ui/range-calendar/RangeCalendar.vue index 0ad318fc..3033f05b 100644 --- a/apps/www/src/lib/registry/new-york/ui/range-calendar/RangeCalendar.vue +++ b/apps/www/src/lib/registry/new-york/ui/range-calendar/RangeCalendar.vue @@ -29,10 +29,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) -
+
- + @@ -40,8 +40,8 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits) - - + + diff --git a/apps/www/tsconfig.json b/apps/www/tsconfig.json index 2150c34e..b74b9c13 100644 --- a/apps/www/tsconfig.json +++ b/apps/www/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "lib": ["ESNext", "DOM", "DOM.Iterable"], "baseUrl": ".", - "moduleResolution": "Node", "paths": { "@/*": ["./src/*"] }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99a622a8..24d4935e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,8 +96,8 @@ importers: specifier: ^0.30.8 version: 0.30.8 radix-vue: - specifier: ^1.6.2 - version: 1.6.2(vue@3.4.21) + specifier: ^1.7.0 + version: 1.7.0(vue@3.4.21) tailwindcss-animate: specifier: ^1.0.7 version: 1.0.7(tailwindcss@3.4.1) @@ -3784,6 +3784,10 @@ packages: engines: {node: '>=12'} dev: false + /@tanstack/virtual-core@3.2.0: + resolution: {integrity: sha512-P5XgYoAw/vfW65byBbJQCw+cagdXDT/qH6wmABiLt4v4YBT2q2vqCOhihe+D1Nt325F/S/0Tkv6C5z0Lv+VBQQ==} + dev: false + /@tanstack/vue-table@8.14.0(vue@3.4.21): resolution: {integrity: sha512-mQWgUe+cw2YybTC68x54XkMCeALW+NwO8FYWUripqfJUiWm9haR4tWlTWUU81d/3GPb7chAKaqwQ/9j2u6dXYw==} engines: {node: '>=12'} @@ -3794,6 +3798,15 @@ packages: vue: 3.4.21(typescript@5.4.2) dev: false + /@tanstack/vue-virtual@3.2.0(vue@3.4.21): + resolution: {integrity: sha512-KbmQVvw1k5Js2Fk4DJw9aDxFT5+e8a2Ba4UBJAFCRnWBCnzd3NlmEHI9JCeLv1tYDZ/iHwwv+Z9Le0BENIEP8A==} + peerDependencies: + vue: ^2.7.0 || ^3.0.0 + dependencies: + '@tanstack/virtual-core': 3.2.0 + vue: 3.4.21(typescript@5.4.2) + dev: false + /@trysound/sax@0.2.0: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} @@ -12231,6 +12244,26 @@ packages: - '@vue/composition-api' dev: false + /radix-vue@1.7.0(vue@3.4.21): + resolution: {integrity: sha512-lyAllebKbEGECEIKdC74gjOxgCtHjGKbINH/RUOP6p0Qk2HOsV06WGONStDl+c3FZKzoiH0rhPSI85Y6gKhMnw==} + peerDependencies: + vue: '>= 3.2.0' + dependencies: + '@floating-ui/dom': 1.6.1 + '@floating-ui/vue': 1.0.6(vue@3.4.21) + '@internationalized/date': 3.5.2 + '@tanstack/vue-virtual': 3.2.0(vue@3.4.21) + '@vueuse/core': 10.9.0(vue@3.4.21) + '@vueuse/shared': 10.9.0(vue@3.4.21) + aria-hidden: 1.2.4 + defu: 6.1.4 + fast-deep-equal: 3.1.3 + nanoid: 5.0.6 + vue: 3.4.21(typescript@5.4.2) + transitivePeerDependencies: + - '@vue/composition-api' + dev: false + /radix3@1.1.1: resolution: {integrity: sha512-yUUd5VTiFtcMEx0qFUxGAv5gbMc1un4RvEO1JZdP7ZUl/RHygZK6PknIKntmQRZxnMY3ZXD2ISaw1ij8GYW1yg==} dev: true @@ -14229,7 +14262,7 @@ packages: resolution: {integrity: sha512-3PYWMbN3cSdsciv3fzewskxZFnX61PYq1uNsbvizXDo/8sN4SMrWkYDqWaPdTD3GTEm6wpx7j5flRLg7A5ZXbQ==} dependencies: '@vueuse/core': 10.9.0(vue@3.4.21) - radix-vue: 1.6.2(vue@3.4.21) + radix-vue: 1.7.0(vue@3.4.21) vue: 3.4.21(typescript@5.4.2) transitivePeerDependencies: - '@vue/composition-api'