From 8bdfc587cc672e8736884314b085119ad85963d5 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 16:56:26 +0800 Subject: [PATCH 01/56] refactor: migrate `@internationalized/date` to `@heroui/shared-utils` --- .../components/code-demo/react-live-demo.tsx | 2 +- .../calendar/controlled-focused-value.raw.jsx | 2 +- .../calendar/controlled-focused-value.raw.tsx | 2 +- .../components/calendar/controlled.raw.jsx | 2 +- .../components/calendar/controlled.raw.tsx | 2 +- .../components/calendar/invalid-date.raw.jsx | 2 +- .../components/calendar/invalid-date.raw.tsx | 2 +- .../calendar/max-date-value.raw.jsx | 2 +- .../calendar/min-date-value.raw.jsx | 2 +- .../components/calendar/presets.raw.jsx | 2 +- .../components/calendar/presets.raw.tsx | 2 +- .../components/calendar/read-only.raw.jsx | 2 +- .../calendar/unavailable-dates.raw.jsx | 2 +- .../content/components/calendar/usage.raw.jsx | 2 +- .../components/date-input/controlled.raw.jsx | 2 +- .../components/date-input/controlled.raw.tsx | 2 +- .../components/date-input/description.raw.jsx | 2 +- .../components/date-input/disabled.raw.jsx | 2 +- .../date-input/error-message-function.raw.jsx | 2 +- .../date-input/error-message.raw.jsx | 2 +- .../components/date-input/granularity.raw.jsx | 2 +- .../components/date-input/granularity.raw.tsx | 2 +- .../date-input/hide-timezone.raw.jsx | 2 +- .../date-input/hourly-cycle.raw.jsx | 2 +- .../date-input/international-calendar.raw.jsx | 2 +- .../date-input/international-calendar.raw.tsx | 2 +- .../date-input/label-placements.raw.jsx | 2 +- .../date-input/min-and-max-date.raw.jsx | 2 +- .../components/date-input/readonly.raw.jsx | 2 +- .../components/date-input/required.raw.jsx | 2 +- .../date-input/start-end-content.raw.jsx | 2 +- .../components/date-input/time-zones.raw.jsx | 2 +- .../components/date-input/usage.raw.jsx | 2 +- .../components/date-input/variants.raw.jsx | 2 +- .../components/date-picker/controlled.raw.jsx | 2 +- .../components/date-picker/controlled.raw.tsx | 2 +- .../date-picker/granularity.raw.jsx | 2 +- .../date-picker/granularity.raw.tsx | 2 +- .../components/date-picker/granularity.ts | 4 +- .../international-calendar.raw.jsx | 2 +- .../international-calendar.raw.tsx | 2 +- .../date-picker/min-and-max-date.raw.jsx | 2 +- .../components/date-picker/preset.raw.jsx | 2 +- .../components/date-picker/preset.raw.tsx | 8 +- .../components/date-picker/time-zones.raw.jsx | 2 +- .../date-picker/unavailable-dates.raw.jsx | 2 +- .../date-picker/with-time-field.raw.jsx | 2 +- .../date-range-picker/controlled.raw.jsx | 2 +- .../date-range-picker/controlled.raw.tsx | 2 +- .../date-range-picker/disabled.raw.jsx | 2 +- .../error-message-function.raw.jsx | 2 +- .../date-range-picker/error-message.raw.jsx | 2 +- .../date-range-picker/granularity.raw.jsx | 2 +- .../date-range-picker/granularity.raw.tsx | 2 +- .../international-calendar.raw.jsx | 2 +- .../international-calendar.raw.tsx | 2 +- .../min-and-max-date.raw.jsx | 2 +- .../date-range-picker/non-contiguous.raw.jsx | 2 +- .../date-range-picker/presets.raw.jsx | 2 +- .../date-range-picker/readonly.raw.jsx | 2 +- .../date-range-picker/required.raw.jsx | 2 +- .../date-range-picker/time-zones.raw.jsx | 2 +- .../unavailable-dates.raw.jsx | 2 +- .../date-range-picker/with-time-field.raw.jsx | 2 +- .../controlled-focused-value.raw.jsx | 2 +- .../range-calendar/controlled.raw.jsx | 2 +- .../range-calendar/controlled.raw.tsx | 2 +- .../range-calendar/invalid-date.raw.jsx | 2 +- .../range-calendar/invalid-date.raw.tsx | 2 +- .../range-calendar/max-date-value.raw.jsx | 2 +- .../range-calendar/min-date-value.raw.jsx | 2 +- .../non-contiguous-ranges.raw.jsx | 2 +- .../components/range-calendar/presets.raw.jsx | 2 +- .../components/range-calendar/presets.raw.tsx | 2 +- .../range-calendar/read-only.raw.jsx | 2 +- .../range-calendar/unavailable-dates.raw.jsx | 2 +- .../components/range-calendar/usage.raw.jsx | 2 +- .../components/time-input/controlled.raw.jsx | 2 +- .../components/time-input/controlled.raw.tsx | 2 +- .../components/time-input/disabled.raw.jsx | 2 +- .../components/time-input/end-content.raw.jsx | 2 +- .../components/time-input/granularity.raw.jsx | 2 +- .../components/time-input/granularity.raw.tsx | 2 +- .../time-input/hide-timezone.raw.jsx | 2 +- .../components/time-input/hour-cycle.raw.jsx | 2 +- .../time-input/label-placement.raw.jsx | 2 +- .../time-input/max-time-value.raw.jsx | 2 +- .../time-input/min-time-value.raw.jsx | 2 +- .../time-input/placeholder-value.raw.jsx | 2 +- .../components/time-input/read-only.raw.jsx | 2 +- .../time-input/start-content.raw.jsx | 2 +- .../components/time-input/timezones.raw.jsx | 2 +- .../components/time-input/usage.raw.jsx | 2 +- .../time-input/without-label.raw.jsx | 2 +- .../content/docs/components/date-input.mdx | 12 +- .../content/docs/components/date-picker.mdx | 12 +- .../docs/components/date-range-picker.mdx | 14 +- .../calendar/__tests__/calendar.test.tsx | 2 +- .../__tests__/range-calendar.test.tsx | 2 +- packages/components/calendar/package.json | 1 - .../components/calendar/src/calendar-cell.tsx | 2 +- .../calendar/src/calendar-header.tsx | 2 +- .../calendar/src/calendar-month.tsx | 2 +- packages/components/calendar/src/calendar.tsx | 2 +- packages/components/calendar/src/index.ts | 2 +- .../calendar/src/range-calendar.tsx | 2 +- .../calendar/src/use-calendar-base.ts | 2 +- .../calendar/src/use-calendar-picker.ts | 2 +- .../components/calendar/src/use-calendar.ts | 2 +- .../calendar/src/use-range-calendar.ts | 2 +- packages/components/calendar/src/utils.ts | 2 +- .../calendar/stories/calendar.stories.tsx | 2 +- .../stories/range-calendar.stories.tsx | 2 +- .../date-input/__tests__/date-input.test.tsx | 2 +- .../date-input/__tests__/time-input.test.tsx | 2 +- packages/components/date-input/package.json | 1 - .../components/date-input/src/date-input.tsx | 2 +- .../date-input/src/use-date-input.ts | 13 +- .../date-input/stories/date-input.stories.tsx | 2 +- .../date-input/stories/time-input.stories.tsx | 7 +- .../__tests__/date-picker.test.tsx | 2 +- packages/components/date-picker/package.json | 1 - .../date-picker/src/date-picker.tsx | 2 +- .../src/date-range-picker-field.tsx | 2 +- .../date-picker/src/date-range-picker.tsx | 2 +- .../date-picker/src/use-date-picker-base.ts | 2 +- .../date-picker/src/use-date-picker.ts | 2 +- .../date-picker/src/use-date-range-picker.ts | 2 +- .../stories/date-picker.stories.tsx | 2 +- .../stories/date-range-picker.stories.tsx | 2 +- packages/core/system/package.json | 2 +- packages/core/system/src/provider-context.ts | 2 +- packages/utilities/shared-utils/package.json | 4 + packages/utilities/shared-utils/src/index.ts | 1 + .../utilities/shared-utils/src/packages.ts | 32 +++ pnpm-lock.yaml | 262 ++++++++++-------- 136 files changed, 332 insertions(+), 284 deletions(-) create mode 100644 packages/utilities/shared-utils/src/packages.ts diff --git a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx index b6447e9908..a6e3675d24 100644 --- a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx +++ b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx @@ -2,7 +2,7 @@ import React from "react"; import {LivePreview, LiveProvider, LiveError} from "react-live"; import {clsx} from "@heroui/shared-utils"; import * as HeroUI from "@heroui/react"; -import * as intlDateUtils from "@internationalized/date"; +import * as intlDateUtils from "@heroui/shared-utils"; import * as reactAriaI18n from "@react-aria/i18n"; import * as reactHookFormBase from "react-hook-form"; import {SandpackFiles} from "@codesandbox/sandpack-react/types"; diff --git a/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx b/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx index a6a9f12210..95510ea990 100644 --- a/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx +++ b/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx b/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx index 6e4479e378..56109eb15d 100644 --- a/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx +++ b/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/calendar/controlled.raw.jsx b/apps/docs/content/components/calendar/controlled.raw.jsx index 6e0bfa16ec..56ef09e235 100644 --- a/apps/docs/content/components/calendar/controlled.raw.jsx +++ b/apps/docs/content/components/calendar/controlled.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { let [value, setValue] = React.useState(parseDate("2024-03-07")); diff --git a/apps/docs/content/components/calendar/controlled.raw.tsx b/apps/docs/content/components/calendar/controlled.raw.tsx index fc859bb282..c5d7d139f0 100644 --- a/apps/docs/content/components/calendar/controlled.raw.tsx +++ b/apps/docs/content/components/calendar/controlled.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { let [value, setValue] = React.useState(parseDate("2024-03-07")); diff --git a/apps/docs/content/components/calendar/invalid-date.raw.jsx b/apps/docs/content/components/calendar/invalid-date.raw.jsx index 57e80a7b25..8203153a88 100644 --- a/apps/docs/content/components/calendar/invalid-date.raw.jsx +++ b/apps/docs/content/components/calendar/invalid-date.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@internationalized/date"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/invalid-date.raw.tsx b/apps/docs/content/components/calendar/invalid-date.raw.tsx index 5f45ed5163..d3917e7408 100644 --- a/apps/docs/content/components/calendar/invalid-date.raw.tsx +++ b/apps/docs/content/components/calendar/invalid-date.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@internationalized/date"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/max-date-value.raw.jsx b/apps/docs/content/components/calendar/max-date-value.raw.jsx index 0cd3746dee..e511b9924e 100644 --- a/apps/docs/content/components/calendar/max-date-value.raw.jsx +++ b/apps/docs/content/components/calendar/max-date-value.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/calendar/min-date-value.raw.jsx b/apps/docs/content/components/calendar/min-date-value.raw.jsx index 5204ec4047..b9ae876f42 100644 --- a/apps/docs/content/components/calendar/min-date-value.raw.jsx +++ b/apps/docs/content/components/calendar/min-date-value.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/calendar/presets.raw.jsx b/apps/docs/content/components/calendar/presets.raw.jsx index c408819a58..2bc427f16b 100644 --- a/apps/docs/content/components/calendar/presets.raw.jsx +++ b/apps/docs/content/components/calendar/presets.raw.jsx @@ -1,5 +1,5 @@ import {Calendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; -import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@internationalized/date"; +import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/presets.raw.tsx b/apps/docs/content/components/calendar/presets.raw.tsx index 0718ed78e8..dc50fa54d6 100644 --- a/apps/docs/content/components/calendar/presets.raw.tsx +++ b/apps/docs/content/components/calendar/presets.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; -import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@internationalized/date"; +import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/read-only.raw.jsx b/apps/docs/content/components/calendar/read-only.raw.jsx index 897f7a44bf..21c1f157e2 100644 --- a/apps/docs/content/components/calendar/read-only.raw.jsx +++ b/apps/docs/content/components/calendar/read-only.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/calendar/unavailable-dates.raw.jsx b/apps/docs/content/components/calendar/unavailable-dates.raw.jsx index 8f9f654607..ce26842fd2 100644 --- a/apps/docs/content/components/calendar/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/calendar/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@internationalized/date"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/usage.raw.jsx b/apps/docs/content/components/calendar/usage.raw.jsx index 8ffbdd0da0..3bce4e3440 100644 --- a/apps/docs/content/components/calendar/usage.raw.jsx +++ b/apps/docs/content/components/calendar/usage.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/controlled.raw.jsx b/apps/docs/content/components/date-input/controlled.raw.jsx index 248d4acf30..4a4a58de62 100644 --- a/apps/docs/content/components/date-input/controlled.raw.jsx +++ b/apps/docs/content/components/date-input/controlled.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@internationalized/date"; +import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/controlled.raw.tsx b/apps/docs/content/components/date-input/controlled.raw.tsx index f9cd963ca6..e3cfc37c29 100644 --- a/apps/docs/content/components/date-input/controlled.raw.tsx +++ b/apps/docs/content/components/date-input/controlled.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DateInput} from "@heroui/react"; -import {DateValue, parseDate, getLocalTimeZone} from "@internationalized/date"; +import {DateValue, parseDate, getLocalTimeZone} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/description.raw.jsx b/apps/docs/content/components/date-input/description.raw.jsx index ecfa80cfc1..e64ab12cca 100644 --- a/apps/docs/content/components/date-input/description.raw.jsx +++ b/apps/docs/content/components/date-input/description.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@internationalized/date"; +import {CalendarDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/disabled.raw.jsx b/apps/docs/content/components/date-input/disabled.raw.jsx index 2f863edf2d..bbe012991a 100644 --- a/apps/docs/content/components/date-input/disabled.raw.jsx +++ b/apps/docs/content/components/date-input/disabled.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@internationalized/date"; +import {CalendarDate, parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/error-message-function.raw.jsx b/apps/docs/content/components/date-input/error-message-function.raw.jsx index 7cdf6a7a90..e8a4e70ee3 100644 --- a/apps/docs/content/components/date-input/error-message-function.raw.jsx +++ b/apps/docs/content/components/date-input/error-message-function.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@internationalized/date"; +import {CalendarDate, parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/error-message.raw.jsx b/apps/docs/content/components/date-input/error-message.raw.jsx index 2b331cc239..0b0bd18172 100644 --- a/apps/docs/content/components/date-input/error-message.raw.jsx +++ b/apps/docs/content/components/date-input/error-message.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@internationalized/date"; +import {CalendarDate, parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/granularity.raw.jsx b/apps/docs/content/components/date-input/granularity.raw.jsx index 424336b893..d497a931a1 100644 --- a/apps/docs/content/components/date-input/granularity.raw.jsx +++ b/apps/docs/content/components/date-input/granularity.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {now, parseAbsoluteToLocal} from "@internationalized/date"; +import {now, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-input/granularity.raw.tsx b/apps/docs/content/components/date-input/granularity.raw.tsx index b87a252430..1bda37f5a5 100644 --- a/apps/docs/content/components/date-input/granularity.raw.tsx +++ b/apps/docs/content/components/date-input/granularity.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DateInput} from "@heroui/react"; -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState( diff --git a/apps/docs/content/components/date-input/hide-timezone.raw.jsx b/apps/docs/content/components/date-input/hide-timezone.raw.jsx index c013c870a6..20cbec352f 100644 --- a/apps/docs/content/components/date-input/hide-timezone.raw.jsx +++ b/apps/docs/content/components/date-input/hide-timezone.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/hourly-cycle.raw.jsx b/apps/docs/content/components/date-input/hourly-cycle.raw.jsx index bf84d448d1..00e83ae9e3 100644 --- a/apps/docs/content/components/date-input/hourly-cycle.raw.jsx +++ b/apps/docs/content/components/date-input/hourly-cycle.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/international-calendar.raw.jsx b/apps/docs/content/components/date-input/international-calendar.raw.jsx index 25016c485d..daca3c80bb 100644 --- a/apps/docs/content/components/date-input/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-input/international-calendar.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/international-calendar.raw.tsx b/apps/docs/content/components/date-input/international-calendar.raw.tsx index a0b11151dc..42085dc154 100644 --- a/apps/docs/content/components/date-input/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-input/international-calendar.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DateInput} from "@heroui/react"; -import {DateValue, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/label-placements.raw.jsx b/apps/docs/content/components/date-input/label-placements.raw.jsx index 68a76e04c1..9ac0c79b73 100644 --- a/apps/docs/content/components/date-input/label-placements.raw.jsx +++ b/apps/docs/content/components/date-input/label-placements.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@internationalized/date"; +import {CalendarDate} from "@heroui/shared-utils"; export default function App() { const placements = ["inside", "outside", "outside-left"]; diff --git a/apps/docs/content/components/date-input/min-and-max-date.raw.jsx b/apps/docs/content/components/date-input/min-and-max-date.raw.jsx index f6c70ff3c7..041a4b533e 100644 --- a/apps/docs/content/components/date-input/min-and-max-date.raw.jsx +++ b/apps/docs/content/components/date-input/min-and-max-date.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {getLocalTimeZone, today} from "@internationalized/date"; +import {getLocalTimeZone, today} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/readonly.raw.jsx b/apps/docs/content/components/date-input/readonly.raw.jsx index 54d18333ca..4f67680275 100644 --- a/apps/docs/content/components/date-input/readonly.raw.jsx +++ b/apps/docs/content/components/date-input/readonly.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@internationalized/date"; +import {CalendarDate, parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/required.raw.jsx b/apps/docs/content/components/date-input/required.raw.jsx index dfcbdb4555..76a37075c8 100644 --- a/apps/docs/content/components/date-input/required.raw.jsx +++ b/apps/docs/content/components/date-input/required.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@internationalized/date"; +import {CalendarDate, parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/start-end-content.raw.jsx b/apps/docs/content/components/date-input/start-end-content.raw.jsx index 1e53d76239..11f7b5fdb8 100644 --- a/apps/docs/content/components/date-input/start-end-content.raw.jsx +++ b/apps/docs/content/components/date-input/start-end-content.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@internationalized/date"; +import {CalendarDate, parseDate} from "@heroui/shared-utils"; export const CalendarIcon = (props) => { return ( diff --git a/apps/docs/content/components/date-input/time-zones.raw.jsx b/apps/docs/content/components/date-input/time-zones.raw.jsx index 6a3297c017..bc35734489 100644 --- a/apps/docs/content/components/date-input/time-zones.raw.jsx +++ b/apps/docs/content/components/date-input/time-zones.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@internationalized/date"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/usage.raw.jsx b/apps/docs/content/components/date-input/usage.raw.jsx index 3b4d43c6a5..df2f5039d2 100644 --- a/apps/docs/content/components/date-input/usage.raw.jsx +++ b/apps/docs/content/components/date-input/usage.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@internationalized/date"; +import {CalendarDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/variants.raw.jsx b/apps/docs/content/components/date-input/variants.raw.jsx index 27dcc4cf68..4499da9be8 100644 --- a/apps/docs/content/components/date-input/variants.raw.jsx +++ b/apps/docs/content/components/date-input/variants.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@internationalized/date"; +import {CalendarDate} from "@heroui/shared-utils"; export default function App() { const variants = ["flat", "bordered", "underlined", "faded"]; diff --git a/apps/docs/content/components/date-picker/controlled.raw.jsx b/apps/docs/content/components/date-picker/controlled.raw.jsx index 5a8d55c00d..5054013d08 100644 --- a/apps/docs/content/components/date-picker/controlled.raw.jsx +++ b/apps/docs/content/components/date-picker/controlled.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@internationalized/date"; +import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/controlled.raw.tsx b/apps/docs/content/components/date-picker/controlled.raw.tsx index 7d03a7a99f..05b2f100f8 100644 --- a/apps/docs/content/components/date-picker/controlled.raw.tsx +++ b/apps/docs/content/components/date-picker/controlled.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DatePicker} from "@heroui/react"; -import {DateValue, parseDate, getLocalTimeZone} from "@internationalized/date"; +import {DateValue, parseDate, getLocalTimeZone} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/granularity.raw.jsx b/apps/docs/content/components/date-picker/granularity.raw.jsx index d21bfc220f..195d53cbb6 100644 --- a/apps/docs/content/components/date-picker/granularity.raw.jsx +++ b/apps/docs/content/components/date-picker/granularity.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {now, parseAbsoluteToLocal} from "@internationalized/date"; +import {now, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-picker/granularity.raw.tsx b/apps/docs/content/components/date-picker/granularity.raw.tsx index 0bb6968ff1..1114c94a96 100644 --- a/apps/docs/content/components/date-picker/granularity.raw.tsx +++ b/apps/docs/content/components/date-picker/granularity.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DatePicker} from "@heroui/react"; -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState( diff --git a/apps/docs/content/components/date-picker/granularity.ts b/apps/docs/content/components/date-picker/granularity.ts index a9b1b52dcb..c86525d1bb 100644 --- a/apps/docs/content/components/date-picker/granularity.ts +++ b/apps/docs/content/components/date-picker/granularity.ts @@ -1,5 +1,5 @@ const App = `import {DatePicker} from "@heroui/react"; -import {now, parseAbsoluteToLocal} from "@internationalized/date"; +import {now, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); @@ -32,7 +32,7 @@ export default function App() { }`; const AppTs = `import {DatePicker} from "@heroui/react"; -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-picker/international-calendar.raw.jsx b/apps/docs/content/components/date-picker/international-calendar.raw.jsx index 9fdde945bd..66362696c9 100644 --- a/apps/docs/content/components/date-picker/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-picker/international-calendar.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/international-calendar.raw.tsx b/apps/docs/content/components/date-picker/international-calendar.raw.tsx index dea55abd30..47d6ebdb0a 100644 --- a/apps/docs/content/components/date-picker/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-picker/international-calendar.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DatePicker} from "@heroui/react"; -import {DateValue, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx b/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx index 27b9de3908..40dc02c20b 100644 --- a/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx +++ b/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {getLocalTimeZone, today} from "@internationalized/date"; +import {getLocalTimeZone, today} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-picker/preset.raw.jsx b/apps/docs/content/components/date-picker/preset.raw.jsx index 2c96661df7..7d05120bf8 100644 --- a/apps/docs/content/components/date-picker/preset.raw.jsx +++ b/apps/docs/content/components/date-picker/preset.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker, RadioGroup, Radio, ButtonGroup, Button, cn} from "@heroui/react"; -import {startOfWeek, startOfMonth, getLocalTimeZone, today} from "@internationalized/date"; +import {startOfWeek, startOfMonth, getLocalTimeZone, today} from "@heroui/shared-utils"; import {useLocale, useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/preset.raw.tsx b/apps/docs/content/components/date-picker/preset.raw.tsx index 69cfbcbb21..dca189bedc 100644 --- a/apps/docs/content/components/date-picker/preset.raw.tsx +++ b/apps/docs/content/components/date-picker/preset.raw.tsx @@ -1,12 +1,6 @@ import React from "react"; import {DatePicker, RadioGroup, Radio, ButtonGroup, Button, cn} from "@heroui/react"; -import { - DateValue, - startOfWeek, - startOfMonth, - getLocalTimeZone, - today, -} from "@internationalized/date"; +import {DateValue, startOfWeek, startOfMonth, getLocalTimeZone, today} from "@heroui/shared-utils"; import {useLocale, useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/time-zones.raw.jsx b/apps/docs/content/components/date-picker/time-zones.raw.jsx index 2addc16ea8..9eb40bf524 100644 --- a/apps/docs/content/components/date-picker/time-zones.raw.jsx +++ b/apps/docs/content/components/date-picker/time-zones.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@internationalized/date"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx b/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx index 1e7bbf7d0e..10d41c4959 100644 --- a/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {today, isWeekend, getLocalTimeZone} from "@internationalized/date"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/with-time-field.raw.jsx b/apps/docs/content/components/date-picker/with-time-field.raw.jsx index d6fc16c3df..77d88fe490 100644 --- a/apps/docs/content/components/date-picker/with-time-field.raw.jsx +++ b/apps/docs/content/components/date-picker/with-time-field.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {now, getLocalTimeZone} from "@internationalized/date"; +import {now, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/controlled.raw.jsx b/apps/docs/content/components/date-range-picker/controlled.raw.jsx index 0e951e132b..3bdee1fa53 100644 --- a/apps/docs/content/components/date-range-picker/controlled.raw.jsx +++ b/apps/docs/content/components/date-range-picker/controlled.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@internationalized/date"; +import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/controlled.raw.tsx b/apps/docs/content/components/date-range-picker/controlled.raw.tsx index 2e550d6dac..eff5fcf9d4 100644 --- a/apps/docs/content/components/date-range-picker/controlled.raw.tsx +++ b/apps/docs/content/components/date-range-picker/controlled.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@internationalized/date"; +import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/disabled.raw.jsx b/apps/docs/content/components/date-range-picker/disabled.raw.jsx index 66ddb4d7ec..0cc9e43feb 100644 --- a/apps/docs/content/components/date-range-picker/disabled.raw.jsx +++ b/apps/docs/content/components/date-range-picker/disabled.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx b/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx index 9aabe19913..8503b0f7bb 100644 --- a/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx +++ b/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/error-message.raw.jsx b/apps/docs/content/components/date-range-picker/error-message.raw.jsx index 6e00f268e1..375b11b18d 100644 --- a/apps/docs/content/components/date-range-picker/error-message.raw.jsx +++ b/apps/docs/content/components/date-range-picker/error-message.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/granularity.raw.jsx b/apps/docs/content/components/date-range-picker/granularity.raw.jsx index dd264eac59..2bcac27007 100644 --- a/apps/docs/content/components/date-range-picker/granularity.raw.jsx +++ b/apps/docs/content/components/date-range-picker/granularity.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState({ diff --git a/apps/docs/content/components/date-range-picker/granularity.raw.tsx b/apps/docs/content/components/date-range-picker/granularity.raw.tsx index 2a154919e6..d967cc3753 100644 --- a/apps/docs/content/components/date-range-picker/granularity.raw.tsx +++ b/apps/docs/content/components/date-range-picker/granularity.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState | null>({ diff --git a/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx b/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx index 67c4f98f53..d15a21e20f 100644 --- a/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx b/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx index 243f5ede1c..b25b52d7fd 100644 --- a/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx b/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx index 816e19c5dc..68612ded63 100644 --- a/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx +++ b/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {getLocalTimeZone, parseDate, today} from "@internationalized/date"; +import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx b/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx index 0aa9fb8583..0fefb4f6bc 100644 --- a/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx +++ b/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {isWeekend, today, getLocalTimeZone} from "@internationalized/date"; +import {isWeekend, today, getLocalTimeZone} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/presets.raw.jsx b/apps/docs/content/components/date-range-picker/presets.raw.jsx index ab4cde102b..f73f59315f 100644 --- a/apps/docs/content/components/date-range-picker/presets.raw.jsx +++ b/apps/docs/content/components/date-range-picker/presets.raw.jsx @@ -6,7 +6,7 @@ import { endOfWeek, endOfMonth, getLocalTimeZone, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {useLocale, useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/readonly.raw.jsx b/apps/docs/content/components/date-range-picker/readonly.raw.jsx index 46224736dd..f335ddfd73 100644 --- a/apps/docs/content/components/date-range-picker/readonly.raw.jsx +++ b/apps/docs/content/components/date-range-picker/readonly.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/required.raw.jsx b/apps/docs/content/components/date-range-picker/required.raw.jsx index c77bdcd3bc..db74816abb 100644 --- a/apps/docs/content/components/date-range-picker/required.raw.jsx +++ b/apps/docs/content/components/date-range-picker/required.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@internationalized/date"; +import {parseDate} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/time-zones.raw.jsx b/apps/docs/content/components/date-range-picker/time-zones.raw.jsx index 643b64180c..d561f667d0 100644 --- a/apps/docs/content/components/date-range-picker/time-zones.raw.jsx +++ b/apps/docs/content/components/date-range-picker/time-zones.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@internationalized/date"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx b/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx index 0e3d0636e6..283da20927 100644 --- a/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { let now = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx b/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx index fa96dff831..766a1f9374 100644 --- a/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx +++ b/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx b/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx index ef3d1b2829..e61d84ed36 100644 --- a/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx +++ b/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/range-calendar/controlled.raw.jsx b/apps/docs/content/components/range-calendar/controlled.raw.jsx index b55576a7ac..5a721ff9f6 100644 --- a/apps/docs/content/components/range-calendar/controlled.raw.jsx +++ b/apps/docs/content/components/range-calendar/controlled.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { let [value, setValue] = React.useState({ diff --git a/apps/docs/content/components/range-calendar/controlled.raw.tsx b/apps/docs/content/components/range-calendar/controlled.raw.tsx index b75c8433ed..a4a5b1f12c 100644 --- a/apps/docs/content/components/range-calendar/controlled.raw.tsx +++ b/apps/docs/content/components/range-calendar/controlled.raw.tsx @@ -3,7 +3,7 @@ import type {RangeValue} from "@react-types/shared"; import React from "react"; import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { let [value, setValue] = React.useState | null>({ diff --git a/apps/docs/content/components/range-calendar/invalid-date.raw.jsx b/apps/docs/content/components/range-calendar/invalid-date.raw.jsx index 85e9be445c..7c900b8eb1 100644 --- a/apps/docs/content/components/range-calendar/invalid-date.raw.jsx +++ b/apps/docs/content/components/range-calendar/invalid-date.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@internationalized/date"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/invalid-date.raw.tsx b/apps/docs/content/components/range-calendar/invalid-date.raw.tsx index f6c1504ad1..1e4c6a17fb 100644 --- a/apps/docs/content/components/range-calendar/invalid-date.raw.tsx +++ b/apps/docs/content/components/range-calendar/invalid-date.raw.tsx @@ -3,7 +3,7 @@ import type {RangeValue} from "@react-types/shared"; import React from "react"; import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@internationalized/date"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/max-date-value.raw.jsx b/apps/docs/content/components/range-calendar/max-date-value.raw.jsx index 4db19a1adb..dfee424331 100644 --- a/apps/docs/content/components/range-calendar/max-date-value.raw.jsx +++ b/apps/docs/content/components/range-calendar/max-date-value.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/range-calendar/min-date-value.raw.jsx b/apps/docs/content/components/range-calendar/min-date-value.raw.jsx index 391c111063..cbbbd9d62f 100644 --- a/apps/docs/content/components/range-calendar/min-date-value.raw.jsx +++ b/apps/docs/content/components/range-calendar/min-date-value.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx b/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx index 532c3b94f6..9ffe36ac27 100644 --- a/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx +++ b/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {isWeekend} from "@internationalized/date"; +import {isWeekend} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/presets.raw.jsx b/apps/docs/content/components/range-calendar/presets.raw.jsx index ddbb2e61a6..91b15e8685 100644 --- a/apps/docs/content/components/range-calendar/presets.raw.jsx +++ b/apps/docs/content/components/range-calendar/presets.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; -import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@internationalized/date"; +import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/presets.raw.tsx b/apps/docs/content/components/range-calendar/presets.raw.tsx index 540c22f90e..cf98233fb2 100644 --- a/apps/docs/content/components/range-calendar/presets.raw.tsx +++ b/apps/docs/content/components/range-calendar/presets.raw.tsx @@ -10,7 +10,7 @@ import { endOfWeek, startOfMonth, endOfMonth, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/read-only.raw.jsx b/apps/docs/content/components/range-calendar/read-only.raw.jsx index 11f6594185..eb8cce61bf 100644 --- a/apps/docs/content/components/range-calendar/read-only.raw.jsx +++ b/apps/docs/content/components/range-calendar/read-only.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx b/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx index a19bdb2d3d..f2cc26b9db 100644 --- a/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@internationalized/date"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/usage.raw.jsx b/apps/docs/content/components/range-calendar/usage.raw.jsx index f3895ccc9c..a874ce5df8 100644 --- a/apps/docs/content/components/range-calendar/usage.raw.jsx +++ b/apps/docs/content/components/range-calendar/usage.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@internationalized/date"; +import {today, getLocalTimeZone} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/controlled.raw.jsx b/apps/docs/content/components/time-input/controlled.raw.jsx index 516b96e6b0..72f13a94ef 100644 --- a/apps/docs/content/components/time-input/controlled.raw.jsx +++ b/apps/docs/content/components/time-input/controlled.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@internationalized/date"; +import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/time-input/controlled.raw.tsx b/apps/docs/content/components/time-input/controlled.raw.tsx index 20229c9f7d..31f628f42f 100644 --- a/apps/docs/content/components/time-input/controlled.raw.tsx +++ b/apps/docs/content/components/time-input/controlled.raw.tsx @@ -2,7 +2,7 @@ import type {TimeInputValue} from "@heroui/react"; import React from "react"; import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@internationalized/date"; +import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; export default function App() { diff --git a/apps/docs/content/components/time-input/disabled.raw.jsx b/apps/docs/content/components/time-input/disabled.raw.jsx index a77ebe90b4..16bda2f150 100644 --- a/apps/docs/content/components/time-input/disabled.raw.jsx +++ b/apps/docs/content/components/time-input/disabled.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/end-content.raw.jsx b/apps/docs/content/components/time-input/end-content.raw.jsx index ffa611d5f7..7c0d2cc878 100644 --- a/apps/docs/content/components/time-input/end-content.raw.jsx +++ b/apps/docs/content/components/time-input/end-content.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export const ClockCircleLinearIcon = (props) => { return ( diff --git a/apps/docs/content/components/time-input/granularity.raw.jsx b/apps/docs/content/components/time-input/granularity.raw.jsx index f3f27eb431..f68a0fb9e4 100644 --- a/apps/docs/content/components/time-input/granularity.raw.jsx +++ b/apps/docs/content/components/time-input/granularity.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/time-input/granularity.raw.tsx b/apps/docs/content/components/time-input/granularity.raw.tsx index e5dbb18258..3a19752a11 100644 --- a/apps/docs/content/components/time-input/granularity.raw.tsx +++ b/apps/docs/content/components/time-input/granularity.raw.tsx @@ -2,7 +2,7 @@ import type {TimeInputValue} from "@heroui/react"; import React from "react"; import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@internationalized/date"; +import {parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { let [date, setDate] = React.useState( diff --git a/apps/docs/content/components/time-input/hide-timezone.raw.jsx b/apps/docs/content/components/time-input/hide-timezone.raw.jsx index 037f3ce0a4..39ef7bf03e 100644 --- a/apps/docs/content/components/time-input/hide-timezone.raw.jsx +++ b/apps/docs/content/components/time-input/hide-timezone.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/hour-cycle.raw.jsx b/apps/docs/content/components/time-input/hour-cycle.raw.jsx index f21f82eab9..18b00296ce 100644 --- a/apps/docs/content/components/time-input/hour-cycle.raw.jsx +++ b/apps/docs/content/components/time-input/hour-cycle.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/label-placement.raw.jsx b/apps/docs/content/components/time-input/label-placement.raw.jsx index 43eff81708..11a62866be 100644 --- a/apps/docs/content/components/time-input/label-placement.raw.jsx +++ b/apps/docs/content/components/time-input/label-placement.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/max-time-value.raw.jsx b/apps/docs/content/components/time-input/max-time-value.raw.jsx index aa54222fd5..867d5a30a3 100644 --- a/apps/docs/content/components/time-input/max-time-value.raw.jsx +++ b/apps/docs/content/components/time-input/max-time-value.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/min-time-value.raw.jsx b/apps/docs/content/components/time-input/min-time-value.raw.jsx index e9fecc162e..6e2812985f 100644 --- a/apps/docs/content/components/time-input/min-time-value.raw.jsx +++ b/apps/docs/content/components/time-input/min-time-value.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/placeholder-value.raw.jsx b/apps/docs/content/components/time-input/placeholder-value.raw.jsx index 17f1714d07..7de6718754 100644 --- a/apps/docs/content/components/time-input/placeholder-value.raw.jsx +++ b/apps/docs/content/components/time-input/placeholder-value.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/read-only.raw.jsx b/apps/docs/content/components/time-input/read-only.raw.jsx index 74afe2f31c..409148386d 100644 --- a/apps/docs/content/components/time-input/read-only.raw.jsx +++ b/apps/docs/content/components/time-input/read-only.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/start-content.raw.jsx b/apps/docs/content/components/time-input/start-content.raw.jsx index df559daba9..efcc840817 100644 --- a/apps/docs/content/components/time-input/start-content.raw.jsx +++ b/apps/docs/content/components/time-input/start-content.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export const ClockCircleLinearIcon = (props) => { return ( diff --git a/apps/docs/content/components/time-input/timezones.raw.jsx b/apps/docs/content/components/time-input/timezones.raw.jsx index 9db213a6d0..61c58aacf3 100644 --- a/apps/docs/content/components/time-input/timezones.raw.jsx +++ b/apps/docs/content/components/time-input/timezones.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@internationalized/date"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/usage.raw.jsx b/apps/docs/content/components/time-input/usage.raw.jsx index c8ee05c072..f1a08edc20 100644 --- a/apps/docs/content/components/time-input/usage.raw.jsx +++ b/apps/docs/content/components/time-input/usage.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/without-label.raw.jsx b/apps/docs/content/components/time-input/without-label.raw.jsx index 158f912cb5..0399b100f4 100644 --- a/apps/docs/content/components/time-input/without-label.raw.jsx +++ b/apps/docs/content/components/time-input/without-label.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@internationalized/date"; +import {Time} from "@heroui/shared-utils"; export default function App() { return ; diff --git a/apps/docs/content/docs/components/date-input.mdx b/apps/docs/content/docs/components/date-input.mdx index 65e42c0004..e58b606216 100644 --- a/apps/docs/content/docs/components/date-input.mdx +++ b/apps/docs/content/docs/components/date-input.mdx @@ -111,7 +111,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; ``` @@ -136,7 +136,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; ``` @@ -160,7 +160,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {getLocalTimeZone, parseDate, today} from "@internationalized/date"; +import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; ``` @@ -184,7 +184,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; ``` @@ -207,7 +207,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; ``` @@ -230,7 +230,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; ``` diff --git a/apps/docs/content/docs/components/date-picker.mdx b/apps/docs/content/docs/components/date-picker.mdx index b0a1a3161e..f1e8f5adbe 100644 --- a/apps/docs/content/docs/components/date-picker.mdx +++ b/apps/docs/content/docs/components/date-picker.mdx @@ -126,7 +126,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; ``` @@ -151,7 +151,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; ``` @@ -175,7 +175,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {getLocalTimeZone, parseDate, today} from "@internationalized/date"; +import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; ``` @@ -199,7 +199,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; ``` @@ -221,7 +221,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {today, isWeekend, getLocalTimeZone} from "@internationalized/date"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; ``` @@ -261,7 +261,7 @@ import { startOfMonth, useDateFormatter, getLocalTimeZone, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; ``` diff --git a/apps/docs/content/docs/components/date-range-picker.mdx b/apps/docs/content/docs/components/date-range-picker.mdx index e181a97474..c398223fd0 100644 --- a/apps/docs/content/docs/components/date-range-picker.mdx +++ b/apps/docs/content/docs/components/date-range-picker.mdx @@ -143,7 +143,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@internationalized/date"; +import {parseZonedDateTime} from "@heroui/shared-utils"; ``` @@ -168,7 +168,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; ``` @@ -192,7 +192,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {getLocalTimeZone, parseDate, today} from "@internationalized/date"; +import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; ``` @@ -216,7 +216,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; import {I18nProvider} from "@react-aria/i18n"; ``` @@ -238,7 +238,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {today, isWeekend, getLocalTimeZone} from "@internationalized/date"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; ``` @@ -263,7 +263,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {today, isWeekend, getLocalTimeZone} from "@internationalized/date"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; import {useLocale} from "@react-aria/i18n"; ``` @@ -289,7 +289,7 @@ import { startOfWeek, startOfMonth, getLocalTimeZone, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {useLocale, useDateFormatter} from "@react-aria/i18n"; ``` diff --git a/packages/components/calendar/__tests__/calendar.test.tsx b/packages/components/calendar/__tests__/calendar.test.tsx index 6e57e140f0..de9014ba96 100644 --- a/packages/components/calendar/__tests__/calendar.test.tsx +++ b/packages/components/calendar/__tests__/calendar.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {render, act, fireEvent} from "@testing-library/react"; -import {CalendarDate, isWeekend} from "@internationalized/date"; +import {CalendarDate, isWeekend} from "@heroui/shared-utils"; import {triggerPress, keyCodes} from "@heroui/test-utils"; import {useLocale} from "@react-aria/i18n"; import {HeroUIProvider} from "@heroui/system"; diff --git a/packages/components/calendar/__tests__/range-calendar.test.tsx b/packages/components/calendar/__tests__/range-calendar.test.tsx index aa92f4af76..2266a21ccc 100644 --- a/packages/components/calendar/__tests__/range-calendar.test.tsx +++ b/packages/components/calendar/__tests__/range-calendar.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {render, act, fireEvent} from "@testing-library/react"; -import {CalendarDate} from "@internationalized/date"; +import {CalendarDate} from "@heroui/shared-utils"; import {keyCodes, triggerPress, type} from "@heroui/test-utils"; import {RangeCalendar as RangeCalendarCalendarBase, RangeCalendarProps} from "../src"; diff --git a/packages/components/calendar/package.json b/packages/components/calendar/package.json index 0695a4e3aa..19686cef3a 100644 --- a/packages/components/calendar/package.json +++ b/packages/components/calendar/package.json @@ -48,7 +48,6 @@ "@heroui/use-aria-button": "workspace:*", "@heroui/button": "workspace:*", "@heroui/dom-animation": "workspace:*", - "@internationalized/date": "3.6.0", "@react-aria/calendar": "3.6.0", "@react-aria/focus": "3.19.0", "@react-aria/i18n": "3.12.4", diff --git a/packages/components/calendar/src/calendar-cell.tsx b/packages/components/calendar/src/calendar-cell.tsx index efab5a00f7..bcfa218d57 100644 --- a/packages/components/calendar/src/calendar-cell.tsx +++ b/packages/components/calendar/src/calendar-cell.tsx @@ -1,7 +1,7 @@ import type {CalendarState, RangeCalendarState} from "@react-stately/calendar"; import type {CalendarSlots, SlotsToClasses, CalendarReturnType} from "@heroui/theme"; -import {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from "@internationalized/date"; +import {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from "@heroui/shared-utils"; import {AriaCalendarCellProps, useCalendarCell} from "@react-aria/calendar"; import {HTMLHeroUIProps} from "@heroui/system"; import {mergeProps} from "@react-aria/utils"; diff --git a/packages/components/calendar/src/calendar-header.tsx b/packages/components/calendar/src/calendar-header.tsx index fb1e3c881f..6ef187ef5f 100644 --- a/packages/components/calendar/src/calendar-header.tsx +++ b/packages/components/calendar/src/calendar-header.tsx @@ -1,5 +1,5 @@ import type {ButtonProps} from "@heroui/button"; -import type {CalendarDate} from "@internationalized/date"; +import type {CalendarDate} from "@heroui/shared-utils"; import {HTMLHeroUIProps} from "@heroui/system"; import {useDateFormatter} from "@react-aria/i18n"; diff --git a/packages/components/calendar/src/calendar-month.tsx b/packages/components/calendar/src/calendar-month.tsx index f5767d6ee4..a83a621839 100644 --- a/packages/components/calendar/src/calendar-month.tsx +++ b/packages/components/calendar/src/calendar-month.tsx @@ -1,4 +1,4 @@ -import {CalendarDate, endOfMonth, getWeeksInMonth} from "@internationalized/date"; +import {CalendarDate, endOfMonth, getWeeksInMonth} from "@heroui/shared-utils"; import {CalendarPropsBase} from "@react-types/calendar"; import {HTMLHeroUIProps} from "@heroui/system"; import {useLocale} from "@react-aria/i18n"; diff --git a/packages/components/calendar/src/calendar.tsx b/packages/components/calendar/src/calendar.tsx index 334f5d4bd0..40e3b36a67 100644 --- a/packages/components/calendar/src/calendar.tsx +++ b/packages/components/calendar/src/calendar.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import type {ForwardedRef, ReactElement} from "react"; import {forwardRef} from "@heroui/system"; diff --git a/packages/components/calendar/src/index.ts b/packages/components/calendar/src/index.ts index f34634627c..71143ba0de 100644 --- a/packages/components/calendar/src/index.ts +++ b/packages/components/calendar/src/index.ts @@ -4,7 +4,7 @@ import RangeCalendar from "./range-calendar"; // export types export type {CalendarProps} from "./calendar"; export type {RangeCalendarProps} from "./range-calendar"; -export type {CalendarDate} from "@internationalized/date"; +export type {CalendarDate} from "@heroui/shared-utils"; export type {DateValue} from "@react-types/calendar"; export type {RangeValue} from "@react-types/shared"; diff --git a/packages/components/calendar/src/range-calendar.tsx b/packages/components/calendar/src/range-calendar.tsx index 0de61a4b9e..43e3d665fc 100644 --- a/packages/components/calendar/src/range-calendar.tsx +++ b/packages/components/calendar/src/range-calendar.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import type {ForwardedRef, ReactElement} from "react"; import {forwardRef} from "@heroui/system"; diff --git a/packages/components/calendar/src/use-calendar-base.ts b/packages/components/calendar/src/use-calendar-base.ts index a34300ad0a..21705dcd66 100644 --- a/packages/components/calendar/src/use-calendar-base.ts +++ b/packages/components/calendar/src/use-calendar-base.ts @@ -9,7 +9,7 @@ import type {SupportedCalendars} from "@heroui/system"; import type {CalendarState, RangeCalendarState} from "@react-stately/calendar"; import type {RefObject, ReactNode} from "react"; -import {createCalendar, Calendar, CalendarDate, DateFormatter} from "@internationalized/date"; +import {createCalendar, Calendar, CalendarDate, DateFormatter} from "@heroui/shared-utils"; import {mapPropsVariants, useProviderContext} from "@heroui/system"; import {useCallback, useMemo} from "react"; import {calendar} from "@heroui/theme"; diff --git a/packages/components/calendar/src/use-calendar-picker.ts b/packages/components/calendar/src/use-calendar-picker.ts index a92d9bfc28..9a33d5f93c 100644 --- a/packages/components/calendar/src/use-calendar-picker.ts +++ b/packages/components/calendar/src/use-calendar-picker.ts @@ -1,4 +1,4 @@ -import type {CalendarDate} from "@internationalized/date"; +import type {CalendarDate} from "@heroui/shared-utils"; import type {PressEvent} from "@react-types/shared"; import {useDateFormatter} from "@react-aria/i18n"; diff --git a/packages/components/calendar/src/use-calendar.ts b/packages/components/calendar/src/use-calendar.ts index 58fcded848..3784113ce5 100644 --- a/packages/components/calendar/src/use-calendar.ts +++ b/packages/components/calendar/src/use-calendar.ts @@ -6,7 +6,7 @@ import {useMemo, useRef} from "react"; import {filterDOMProps} from "@heroui/react-utils"; import {useCalendar as useAriaCalendar} from "@react-aria/calendar"; import {useCalendarState} from "@react-stately/calendar"; -import {createCalendar} from "@internationalized/date"; +import {createCalendar} from "@heroui/shared-utils"; import {clsx} from "@heroui/shared-utils"; import {chain, mergeProps} from "@react-aria/utils"; diff --git a/packages/components/calendar/src/use-range-calendar.ts b/packages/components/calendar/src/use-range-calendar.ts index 4f270b41ce..4326cc35f0 100644 --- a/packages/components/calendar/src/use-range-calendar.ts +++ b/packages/components/calendar/src/use-range-calendar.ts @@ -6,7 +6,7 @@ import {useMemo, useRef} from "react"; import {filterDOMProps} from "@heroui/react-utils"; import {useRangeCalendar as useAriaRangeCalendar} from "@react-aria/calendar"; import {useRangeCalendarState} from "@react-stately/calendar"; -import {createCalendar} from "@internationalized/date"; +import {createCalendar} from "@heroui/shared-utils"; import {clsx} from "@heroui/shared-utils"; import {ButtonProps} from "@heroui/button"; import {chain} from "@react-aria/utils"; diff --git a/packages/components/calendar/src/utils.ts b/packages/components/calendar/src/utils.ts index c3b9f7a39f..bdec467fab 100644 --- a/packages/components/calendar/src/utils.ts +++ b/packages/components/calendar/src/utils.ts @@ -1,4 +1,4 @@ -import {DateValue, startOfYear} from "@internationalized/date"; +import {DateValue, startOfYear} from "@heroui/shared-utils"; export function getYearRange(start?: DateValue | null, end?: DateValue | null): DateValue[] { const years: DateValue[] = []; diff --git a/packages/components/calendar/stories/calendar.stories.tsx b/packages/components/calendar/stories/calendar.stories.tsx index 098b3a4f85..0db5fd7d89 100644 --- a/packages/components/calendar/stories/calendar.stories.tsx +++ b/packages/components/calendar/stories/calendar.stories.tsx @@ -8,7 +8,7 @@ import { isWeekend, startOfWeek, startOfMonth, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {I18nProvider, useLocale} from "@react-aria/i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup} from "@heroui/radio"; diff --git a/packages/components/calendar/stories/range-calendar.stories.tsx b/packages/components/calendar/stories/range-calendar.stories.tsx index 1007d6be13..480477cc7a 100644 --- a/packages/components/calendar/stories/range-calendar.stories.tsx +++ b/packages/components/calendar/stories/range-calendar.stories.tsx @@ -12,7 +12,7 @@ import { startOfWeek, endOfMonth, endOfWeek, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {I18nProvider, useLocale} from "@react-aria/i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup} from "@heroui/radio"; diff --git a/packages/components/date-input/__tests__/date-input.test.tsx b/packages/components/date-input/__tests__/date-input.test.tsx index 1de8330fbf..a6822e8203 100644 --- a/packages/components/date-input/__tests__/date-input.test.tsx +++ b/packages/components/date-input/__tests__/date-input.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {fireEvent, render} from "@testing-library/react"; -import {CalendarDate, CalendarDateTime, DateValue, ZonedDateTime} from "@internationalized/date"; +import {CalendarDate, CalendarDateTime, DateValue, ZonedDateTime} from "@heroui/shared-utils"; import {pointerMap, triggerPress} from "@heroui/test-utils"; import userEvent from "@testing-library/user-event"; diff --git a/packages/components/date-input/__tests__/time-input.test.tsx b/packages/components/date-input/__tests__/time-input.test.tsx index 3d3885614d..d110dd55b5 100644 --- a/packages/components/date-input/__tests__/time-input.test.tsx +++ b/packages/components/date-input/__tests__/time-input.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {fireEvent, render} from "@testing-library/react"; -import {Time, ZonedDateTime} from "@internationalized/date"; +import {Time, ZonedDateTime} from "@heroui/shared-utils"; import {TimeValue} from "@react-types/datepicker"; import {pointerMap, triggerPress} from "@heroui/test-utils"; import userEvent from "@testing-library/user-event"; diff --git a/packages/components/date-input/package.json b/packages/components/date-input/package.json index 59adec5d9e..4711119de2 100644 --- a/packages/components/date-input/package.json +++ b/packages/components/date-input/package.json @@ -43,7 +43,6 @@ "@heroui/form": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/shared-utils": "workspace:*", - "@internationalized/date": "3.6.0", "@react-aria/datepicker": "3.12.0", "@react-aria/i18n": "3.12.4", "@react-stately/datepicker": "3.11.0", diff --git a/packages/components/date-input/src/date-input.tsx b/packages/components/date-input/src/date-input.tsx index 7843ee7d35..49431a9fcb 100644 --- a/packages/components/date-input/src/date-input.tsx +++ b/packages/components/date-input/src/date-input.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import type {ForwardedRef, ReactElement} from "react"; import {forwardRef} from "@heroui/system"; diff --git a/packages/components/date-input/src/use-date-input.ts b/packages/components/date-input/src/use-date-input.ts index 03a182bb04..eaac6be0c2 100644 --- a/packages/components/date-input/src/use-date-input.ts +++ b/packages/components/date-input/src/use-date-input.ts @@ -2,20 +2,27 @@ import type {DateInputVariantProps, DateInputSlots, SlotsToClasses} from "@herou import type {AriaDateFieldProps} from "@react-types/datepicker"; import type {SupportedCalendars} from "@heroui/system"; import type {DateValue} from "@react-types/datepicker"; -import type {Calendar} from "@internationalized/date"; +import type {Calendar} from "@heroui/shared-utils"; import type {ReactRef} from "@heroui/react-utils"; import type {DOMAttributes, GroupDOMAttributes} from "@react-types/shared"; import type {DateInputGroupProps} from "./date-input-group"; import {useLocale} from "@react-aria/i18n"; -import {createCalendar, CalendarDate, DateFormatter} from "@internationalized/date"; import {mergeProps} from "@react-aria/utils"; import {PropGetter, useProviderContext} from "@heroui/system"; import {HTMLHeroUIProps, mapPropsVariants} from "@heroui/system"; import {useDOMRef} from "@heroui/react-utils"; import {useDateField as useAriaDateField} from "@react-aria/datepicker"; import {useDateFieldState} from "@react-stately/datepicker"; -import {objectToDeps, clsx, dataAttr, getGregorianYearOffset} from "@heroui/shared-utils"; +import { + createCalendar, + CalendarDate, + DateFormatter, + objectToDeps, + clsx, + dataAttr, + getGregorianYearOffset, +} from "@heroui/shared-utils"; import {dateInput, cn} from "@heroui/theme"; import {useMemo} from "react"; import {FormContext, useSlottedContext} from "@heroui/form"; diff --git a/packages/components/date-input/stories/date-input.stories.tsx b/packages/components/date-input/stories/date-input.stories.tsx index f4a15412a5..27c93b3be0 100644 --- a/packages/components/date-input/stories/date-input.stories.tsx +++ b/packages/components/date-input/stories/date-input.stories.tsx @@ -10,7 +10,7 @@ import { parseDate, parseZonedDateTime, today, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {CalendarBoldIcon} from "@heroui/shared-icons"; import {useDateFormatter, I18nProvider} from "@react-aria/i18n"; import {ValidationResult} from "@react-types/shared"; diff --git a/packages/components/date-input/stories/time-input.stories.tsx b/packages/components/date-input/stories/time-input.stories.tsx index 77c6e57104..d3939abe7e 100644 --- a/packages/components/date-input/stories/time-input.stories.tsx +++ b/packages/components/date-input/stories/time-input.stories.tsx @@ -2,12 +2,7 @@ import React from "react"; import {Meta} from "@storybook/react"; import {dateInput, button} from "@heroui/theme"; import {ClockCircleLinearIcon} from "@heroui/shared-icons"; -import { - parseAbsoluteToLocal, - parseZonedDateTime, - Time, - ZonedDateTime, -} from "@internationalized/date"; +import {parseAbsoluteToLocal, parseZonedDateTime, Time, ZonedDateTime} from "@heroui/shared-utils"; import {useDateFormatter} from "@react-aria/i18n"; import {ValidationResult} from "@react-types/shared"; diff --git a/packages/components/date-picker/__tests__/date-picker.test.tsx b/packages/components/date-picker/__tests__/date-picker.test.tsx index 48d930ceda..f5a107eb9e 100644 --- a/packages/components/date-picker/__tests__/date-picker.test.tsx +++ b/packages/components/date-picker/__tests__/date-picker.test.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import {render, act, fireEvent, waitFor, within} from "@testing-library/react"; import {pointerMap, triggerPress} from "@heroui/test-utils"; import userEvent from "@testing-library/user-event"; -import {CalendarDate, CalendarDateTime} from "@internationalized/date"; +import {CalendarDate, CalendarDateTime} from "@heroui/shared-utils"; import {HeroUIProvider} from "@heroui/system"; import {Form} from "@heroui/form"; diff --git a/packages/components/date-picker/package.json b/packages/components/date-picker/package.json index 3ed9bfcf10..ec403b32fd 100644 --- a/packages/components/date-picker/package.json +++ b/packages/components/date-picker/package.json @@ -41,7 +41,6 @@ "react-dom": ">=18 || >=19.0.0-rc.0" }, "dependencies": { - "@internationalized/date": "3.6.0", "@heroui/aria-utils": "workspace:*", "@heroui/button": "workspace:*", "@heroui/calendar": "workspace:*", diff --git a/packages/components/date-picker/src/date-picker.tsx b/packages/components/date-picker/src/date-picker.tsx index ee58280f62..9107365a61 100644 --- a/packages/components/date-picker/src/date-picker.tsx +++ b/packages/components/date-picker/src/date-picker.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import {ForwardedRef, ReactElement, useMemo} from "react"; import {cloneElement, isValidElement} from "react"; diff --git a/packages/components/date-picker/src/date-range-picker-field.tsx b/packages/components/date-picker/src/date-range-picker-field.tsx index 277bbd18c9..b0867fdab8 100644 --- a/packages/components/date-picker/src/date-range-picker-field.tsx +++ b/packages/components/date-picker/src/date-range-picker-field.tsx @@ -3,7 +3,7 @@ import type {AriaDatePickerProps} from "@react-types/datepicker"; import type {HTMLHeroUIProps} from "@heroui/system"; import type {DateInputProps} from "@heroui/date-input"; -import {createCalendar} from "@internationalized/date"; +import {createCalendar} from "@heroui/shared-utils"; import {forwardRef, useRef} from "react"; import {DateValue} from "@react-types/datepicker"; import {useDateField as useAriaDateField} from "@react-aria/datepicker"; diff --git a/packages/components/date-picker/src/date-range-picker.tsx b/packages/components/date-picker/src/date-range-picker.tsx index dbae897053..df68f9bf43 100644 --- a/packages/components/date-picker/src/date-range-picker.tsx +++ b/packages/components/date-picker/src/date-range-picker.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import {ForwardedRef, ReactElement, useMemo} from "react"; import {cloneElement, isValidElement} from "react"; diff --git a/packages/components/date-picker/src/use-date-picker-base.ts b/packages/components/date-picker/src/use-date-picker-base.ts index 3b7c27274e..f7d103639f 100644 --- a/packages/components/date-picker/src/use-date-picker-base.ts +++ b/packages/components/date-picker/src/use-date-picker-base.ts @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import type {AriaDatePickerBaseProps} from "@react-types/datepicker"; import type {DateInputProps, TimeInputProps} from "@heroui/date-input"; import type {ButtonProps} from "@heroui/button"; diff --git a/packages/components/date-picker/src/use-date-picker.ts b/packages/components/date-picker/src/use-date-picker.ts index 61483cb70b..90cfd714ae 100644 --- a/packages/components/date-picker/src/use-date-picker.ts +++ b/packages/components/date-picker/src/use-date-picker.ts @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import type {DateInputProps} from "@heroui/date-input"; import type {DatePickerState} from "@react-stately/datepicker"; import type {ButtonProps} from "@heroui/button"; diff --git a/packages/components/date-picker/src/use-date-range-picker.ts b/packages/components/date-picker/src/use-date-range-picker.ts index 9fc462a39f..7daf2e0910 100644 --- a/packages/components/date-picker/src/use-date-range-picker.ts +++ b/packages/components/date-picker/src/use-date-range-picker.ts @@ -1,4 +1,4 @@ -import type {DateValue} from "@internationalized/date"; +import type {DateValue} from "@heroui/shared-utils"; import type {DateInputVariantProps} from "@heroui/theme"; import type {TimeInputProps} from "@heroui/date-input"; import type {ButtonProps} from "@heroui/button"; diff --git a/packages/components/date-picker/stories/date-picker.stories.tsx b/packages/components/date-picker/stories/date-picker.stories.tsx index af9e7537df..8f32d1d34c 100644 --- a/packages/components/date-picker/stories/date-picker.stories.tsx +++ b/packages/components/date-picker/stories/date-picker.stories.tsx @@ -14,7 +14,7 @@ import { startOfMonth, startOfWeek, today, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {I18nProvider, useDateFormatter, useLocale} from "@react-aria/i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup, RadioProps} from "@heroui/radio"; diff --git a/packages/components/date-picker/stories/date-range-picker.stories.tsx b/packages/components/date-picker/stories/date-range-picker.stories.tsx index 02117b77bf..289f612a57 100644 --- a/packages/components/date-picker/stories/date-range-picker.stories.tsx +++ b/packages/components/date-picker/stories/date-range-picker.stories.tsx @@ -14,7 +14,7 @@ import { startOfMonth, startOfWeek, today, -} from "@internationalized/date"; +} from "@heroui/shared-utils"; import {RangeValue, ValidationResult} from "@react-types/shared"; import {DateValue} from "@react-types/datepicker"; import {I18nProvider, useDateFormatter, useLocale} from "@react-aria/i18n"; diff --git a/packages/core/system/package.json b/packages/core/system/package.json index 1227820ba4..7cb0dfa39e 100644 --- a/packages/core/system/package.json +++ b/packages/core/system/package.json @@ -54,8 +54,8 @@ ] }, "dependencies": { - "@internationalized/date": "3.6.0", "@heroui/react-utils": "workspace:*", + "@heroui/shared-utils": "workspace:*", "@react-aria/i18n": "3.12.4", "@heroui/system-rsc": "workspace:*", "@react-aria/overlays": "3.24.0", diff --git a/packages/core/system/src/provider-context.ts b/packages/core/system/src/provider-context.ts index e48da34436..4815071f22 100644 --- a/packages/core/system/src/provider-context.ts +++ b/packages/core/system/src/provider-context.ts @@ -1,5 +1,5 @@ import type {SupportedCalendars} from "./types"; -import type {Calendar} from "@internationalized/date"; +import type {Calendar} from "@heroui/shared-utils"; import type {DateValue} from "@react-types/datepicker"; import {createContext} from "@heroui/react-utils"; diff --git a/packages/utilities/shared-utils/package.json b/packages/utilities/shared-utils/package.json index 173832eee8..6fa1f77761 100644 --- a/packages/utilities/shared-utils/package.json +++ b/packages/utilities/shared-utils/package.json @@ -33,6 +33,10 @@ "prepack": "clean-package", "postpack": "clean-package restore" }, + "dependencies": { + "@internationalized/date": "3.6.0", + "@react-aria/i18n": "3.12.5" + }, "devDependencies": { "clean-package": "2.2.0" }, diff --git a/packages/utilities/shared-utils/src/index.ts b/packages/utilities/shared-utils/src/index.ts index eec14e1c31..7f412eaba4 100644 --- a/packages/utilities/shared-utils/src/index.ts +++ b/packages/utilities/shared-utils/src/index.ts @@ -9,3 +9,4 @@ export * from "./console"; export * from "./types"; export * from "./dates"; export * from "./regex"; +export * from "./packages"; diff --git a/packages/utilities/shared-utils/src/packages.ts b/packages/utilities/shared-utils/src/packages.ts new file mode 100644 index 0000000000..15788c8709 --- /dev/null +++ b/packages/utilities/shared-utils/src/packages.ts @@ -0,0 +1,32 @@ +// re-exporting from external packages to ensure that +// users to use the exact same version as the HeroUI components do +// to avoid incompatibility issues + +// @internationalized/date" +export * from "@internationalized/date"; + +// @react-aria/i18n +export { + I18nProvider, + useLocale, + useMessageFormatter, + useLocalizedStringFormatter, + useLocalizedStringDictionary, + useListFormatter, + useDateFormatter, + useNumberFormatter, + useCollator, + useFilter, +} from "@react-aria/i18n"; + +export type { + FormatMessage, + LocalizedStringFormatter, + I18nProviderProps, + Locale, + LocalizedStrings, + DateFormatterOptions, + // exported from `@internationalized/date` above + // DateFormatter, + Filter, +} from "@react-aria/i18n"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8f7af6282..2a70cbaed5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,16 +123,16 @@ importers: version: 7.32.0 eslint-config-airbnb: specifier: ^18.2.1 - version: 18.2.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0) + version: 18.2.1(eslint-plugin-import@2.31.0)(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0) eslint-config-airbnb-typescript: specifier: ^12.3.1 - version: 12.3.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5) + version: 12.3.1(eslint-plugin-import@2.31.0)(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5) eslint-config-prettier: specifier: ^8.2.0 version: 8.10.0(eslint@7.32.0) eslint-config-react-app: specifier: ^6.0.0 - version: 6.0.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(babel-eslint@10.1.0(eslint@7.32.0))(eslint-plugin-flowtype@5.10.0(eslint@7.32.0))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint-plugin-jest@24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5) + version: 6.0.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(babel-eslint@10.1.0(eslint@7.32.0))(eslint-plugin-flowtype@5.10.0(eslint@7.32.0))(eslint-plugin-import@2.31.0)(eslint-plugin-jest@24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5) eslint-config-ts-lambdas: specifier: ^1.2.3 version: 1.2.3(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5) @@ -141,7 +141,7 @@ importers: version: 2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0) eslint-loader: specifier: ^4.0.2 - version: 4.0.2(eslint@7.32.0)(webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack-cli@3.3.12)) + version: 4.0.2(eslint@7.32.0)(webpack@5.97.1) eslint-plugin-import: specifier: ^2.26.0 version: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) @@ -195,13 +195,13 @@ importers: version: 10.7.11 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + version: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) jest-environment-jsdom: specifier: ^29.7.0 version: 29.7.0 jest-watch-typeahead: specifier: 2.2.2 - version: 2.2.2(jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5))) + version: 2.2.2(jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5))) lint-staged: specifier: ^13.0.3 version: 13.3.0(enquirer@2.4.1) @@ -529,7 +529,7 @@ importers: devDependencies: '@docusaurus/utils': specifier: 2.0.0-beta.3 - version: 2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1)) + version: 2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12) '@next/bundle-analyzer': specifier: 14.3.0-canary.43 version: 14.3.0-canary.43 @@ -658,7 +658,7 @@ importers: version: link:../../hooks/use-aria-accordion '@react-aria/button': specifier: 3.11.0 - version: 3.11.0(react@18.2.0) + version: 3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) @@ -1000,7 +1000,7 @@ importers: version: link:../../hooks/use-aria-button '@react-aria/button': specifier: 3.11.0 - version: 3.11.0(react@18.2.0) + version: 3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) @@ -1062,9 +1062,6 @@ importers: '@heroui/use-aria-button': specifier: workspace:* version: link:../../hooks/use-aria-button - '@internationalized/date': - specifier: 3.6.0 - version: 3.6.0 '@react-aria/calendar': specifier: 3.6.0 version: 3.6.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -1146,7 +1143,7 @@ importers: version: link:../../hooks/use-aria-button '@react-aria/button': specifier: 3.11.0 - version: 3.11.0(react@18.2.0) + version: 3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) @@ -1349,9 +1346,6 @@ importers: '@heroui/shared-utils': specifier: workspace:* version: link:../../utilities/shared-utils - '@internationalized/date': - specifier: 3.6.0 - version: 3.6.0 '@react-aria/datepicker': specifier: 3.12.0 version: 3.12.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -1422,9 +1416,6 @@ importers: '@heroui/shared-utils': specifier: workspace:* version: link:../../utilities/shared-utils - '@internationalized/date': - specifier: 3.6.0 - version: 3.6.0 '@react-aria/datepicker': specifier: 3.12.0 version: 3.12.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -2136,7 +2127,7 @@ importers: version: link:../../hooks/use-scroll-position '@react-aria/button': specifier: 3.11.0 - version: 3.11.0(react@18.2.0) + version: 3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) @@ -3263,12 +3254,12 @@ importers: '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils + '@heroui/shared-utils': + specifier: workspace:* + version: link:../../utilities/shared-utils '@heroui/system-rsc': specifier: workspace:* version: link:../system-rsc - '@internationalized/date': - specifier: 3.6.0 - version: 3.6.0 '@react-aria/i18n': specifier: 3.12.4 version: 3.12.4(react@18.2.0) @@ -3324,7 +3315,7 @@ importers: version: 18.2.0 tailwind-variants: specifier: ^0.1.20 - version: 0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5))) + version: 0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2))) packages/core/theme: dependencies: @@ -3351,7 +3342,7 @@ importers: version: 2.6.0 tailwind-variants: specifier: ^0.1.20 - version: 0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5))) + version: 0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2))) devDependencies: '@types/color': specifier: ^3.0.3 @@ -3364,13 +3355,13 @@ importers: version: 2.2.0 tailwindcss: specifier: ^3.4.0 - version: 3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) + version: 3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2)) packages/hooks/use-aria-accordion: dependencies: '@react-aria/button': specifier: 3.11.0 - version: 3.11.0(react@18.2.0) + version: 3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) @@ -3401,7 +3392,7 @@ importers: dependencies: '@react-aria/button': specifier: 3.11.0 - version: 3.11.0(react@18.2.0) + version: 3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) @@ -3978,6 +3969,13 @@ importers: version: 18.2.0 packages/utilities/shared-utils: + dependencies: + '@internationalized/date': + specifier: 3.6.0 + version: 3.6.0 + '@react-aria/i18n': + specifier: 3.12.5 + version: 3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: clean-package: specifier: 2.2.0 @@ -5635,6 +5633,9 @@ packages: '@internationalized/date@3.6.0': resolution: {integrity: sha512-+z6ti+CcJnRlLHok/emGEsWQhe7kfSmEW+/6qCzvKY67YPh7YOBfvc7+/+NXq+zJlbArg30tYpqLjNgcAYv2YQ==} + '@internationalized/date@3.7.0': + resolution: {integrity: sha512-VJ5WS3fcVx0bejE/YHfbDKR/yawZgKqn/if+oEeLqNwBtPzVB06olkfcnojTmEMX+gTpH+FlQ69SHNitJ8/erQ==} + '@internationalized/message@3.1.6': resolution: {integrity: sha512-JxbK3iAcTIeNr1p0WIFg/wQJjIzJt9l/2KNY/48vXV7GRGZSv3zMxJsce008fZclk2cDC8y0Ig3odceHO7EfNQ==} @@ -6731,6 +6732,12 @@ packages: peerDependencies: react: 18.2.0 + '@react-aria/i18n@3.12.5': + resolution: {integrity: sha512-ooeop2pTG94PuaHoN2OTk2hpkqVuoqgEYxRvnc1t7DVAtsskfhS/gVOTqyWGsxvwAvRi7m/CnDu6FYdeQ/bK5w==} + peerDependencies: + react: 18.2.0 + react-dom: 18.2.0 + '@react-aria/interactions@3.22.5': resolution: {integrity: sha512-kMwiAD9E0TQp+XNnOs13yVJghiy8ET8L0cbkeuTgNI96sOAp/63EJ1FSrDf17iD8sdjt41LafwX/dKXW9nCcLQ==} peerDependencies: @@ -6842,6 +6849,12 @@ packages: peerDependencies: react: 18.2.0 + '@react-aria/utils@3.27.0': + resolution: {integrity: sha512-p681OtApnKOdbeN8ITfnnYqfdHS0z7GE+4l8EXlfLnr70Rp/9xicBO6d2rU+V/B3JujDw2gPWxYKEnEeh0CGCw==} + peerDependencies: + react: 18.2.0 + react-dom: 18.2.0 + '@react-aria/virtualizer@4.1.0': resolution: {integrity: sha512-ziSq3Y7iuaAMJWGZU1RRs/TykuPapQfx8dyH2eyKPLgEjBUoXRGWE7n6jklBwal14b0lPK0wkCzRoQbkUvX3cg==} peerDependencies: @@ -7074,6 +7087,11 @@ packages: peerDependencies: react: 18.2.0 + '@react-types/shared@3.27.0': + resolution: {integrity: sha512-gvznmLhi6JPEf0bsq7SwRYTHAKKq/wcmKqFez9sRdbED+SPMUmK5omfZ6w3EwUFQHbYUa4zPBYedQ7Knv70RMw==} + peerDependencies: + react: 18.2.0 + '@react-types/slider@3.7.7': resolution: {integrity: sha512-lYTR9zXQV2fSEm/G3gwDENWiki1IXd/oorsgf0zu1DBi2SQDbOsLsGUXiwvD24Xy6OkUuhAqjLPPexezo7+u9g==} peerDependencies: @@ -16698,7 +16716,7 @@ snapshots: lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5) + ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - '@swc/core' @@ -16852,12 +16870,12 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} - '@docusaurus/types@2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1))': + '@docusaurus/types@2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12)': dependencies: commander: 5.1.0 joi: 17.13.3 querystring: 0.2.0 - webpack: 5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1)) + webpack: 5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12) webpack-merge: 5.10.0 transitivePeerDependencies: - '@swc/core' @@ -16865,9 +16883,9 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils@2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1))': + '@docusaurus/utils@2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12)': dependencies: - '@docusaurus/types': 2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1)) + '@docusaurus/types': 2.0.0-beta.3(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12) '@types/github-slugger': 1.3.0 chalk: 4.1.2 escape-string-regexp: 4.0.0 @@ -17310,6 +17328,10 @@ snapshots: dependencies: '@swc/helpers': 0.5.15 + '@internationalized/date@3.7.0': + dependencies: + '@swc/helpers': 0.5.15 + '@internationalized/message@3.1.6': dependencies: '@swc/helpers': 0.5.15 @@ -17351,7 +17373,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -17365,7 +17387,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -18769,17 +18791,19 @@ snapshots: '@swc/helpers': 0.5.15 react: 18.2.0 - '@react-aria/button@3.11.0(react@18.2.0)': + '@react-aria/button@3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.19.0(react@18.2.0) '@react-aria/interactions': 3.22.5(react@18.2.0) - '@react-aria/toolbar': 3.0.0-beta.11(react@18.2.0) + '@react-aria/toolbar': 3.0.0-beta.11(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/utils': 3.26.0(react@18.2.0) '@react-stately/toggle': 3.8.0(react@18.2.0) '@react-types/button': 3.10.1(react@18.2.0) '@react-types/shared': 3.26.0(react@18.2.0) '@swc/helpers': 0.5.15 react: 18.2.0 + transitivePeerDependencies: + - react-dom '@react-aria/calendar@3.6.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -18886,7 +18910,7 @@ snapshots: '@react-aria/grid@3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.19.0(react@18.2.0) - '@react-aria/i18n': 3.12.4(react@18.2.0) + '@react-aria/i18n': 3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/interactions': 3.22.5(react@18.2.0) '@react-aria/live-announcer': 3.4.1 '@react-aria/selection': 3.21.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -18913,6 +18937,19 @@ snapshots: '@swc/helpers': 0.5.15 react: 18.2.0 + '@react-aria/i18n@3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@internationalized/date': 3.7.0 + '@internationalized/message': 3.1.6 + '@internationalized/number': 3.6.0 + '@internationalized/string': 3.2.5 + '@react-aria/ssr': 3.9.7(react@18.2.0) + '@react-aria/utils': 3.27.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@react-types/shared': 3.27.0(react@18.2.0) + '@swc/helpers': 0.5.15 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + '@react-aria/interactions@3.22.5(react@18.2.0)': dependencies: '@react-aria/ssr': 3.9.7(react@18.2.0) @@ -19042,7 +19079,7 @@ snapshots: '@react-aria/spinbutton@3.6.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: - '@react-aria/i18n': 3.12.4(react@18.2.0) + '@react-aria/i18n': 3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/live-announcer': 3.4.1 '@react-aria/utils': 3.26.0(react@18.2.0) '@react-types/button': 3.10.1(react@18.2.0) @@ -19122,14 +19159,16 @@ snapshots: '@swc/helpers': 0.5.15 react: 18.2.0 - '@react-aria/toolbar@3.0.0-beta.11(react@18.2.0)': + '@react-aria/toolbar@3.0.0-beta.11(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.19.0(react@18.2.0) - '@react-aria/i18n': 3.12.4(react@18.2.0) + '@react-aria/i18n': 3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/utils': 3.26.0(react@18.2.0) '@react-types/shared': 3.26.0(react@18.2.0) '@swc/helpers': 0.5.15 react: 18.2.0 + transitivePeerDependencies: + - react-dom '@react-aria/tooltip@3.7.10(react@18.2.0)': dependencies: @@ -19151,6 +19190,16 @@ snapshots: clsx: 2.1.1 react: 18.2.0 + '@react-aria/utils@3.27.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@react-aria/ssr': 3.9.7(react@18.2.0) + '@react-stately/utils': 3.10.5(react@18.2.0) + '@react-types/shared': 3.27.0(react@18.2.0) + '@swc/helpers': 0.5.15 + clsx: 2.1.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + '@react-aria/virtualizer@4.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/i18n': 3.12.4(react@18.2.0) @@ -19495,6 +19544,10 @@ snapshots: dependencies: react: 18.2.0 + '@react-types/shared@3.27.0(react@18.2.0)': + dependencies: + react: 18.2.0 + '@react-types/slider@3.7.7(react@18.2.0)': dependencies: '@react-types/shared': 3.26.0(react@18.2.0) @@ -21911,7 +21964,7 @@ snapshots: dependencies: '@types/node': 20.5.1 cosmiconfig: 8.3.6(typescript@4.9.5) - ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5) + ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5) typescript: 4.9.5 cosmiconfig@8.3.6(typescript@4.9.5): @@ -21932,13 +21985,13 @@ snapshots: optionalDependencies: typescript: 4.9.5 - create-jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)): + create-jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -22659,7 +22712,7 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-airbnb-base@14.2.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint@7.32.0): + eslint-config-airbnb-base@14.2.1(eslint-plugin-import@2.31.0)(eslint@7.32.0): dependencies: confusing-browser-globals: 1.0.11 eslint: 7.32.0 @@ -22667,11 +22720,11 @@ snapshots: object.assign: 4.1.7 object.entries: 1.1.8 - eslint-config-airbnb-typescript@12.3.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5): + eslint-config-airbnb-typescript@12.3.1(eslint-plugin-import@2.31.0)(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5): dependencies: '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.5) - eslint-config-airbnb: 18.2.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0) - eslint-config-airbnb-base: 14.2.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint@7.32.0) + eslint-config-airbnb: 18.2.1(eslint-plugin-import@2.31.0)(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0) + eslint-config-airbnb-base: 14.2.1(eslint-plugin-import@2.31.0)(eslint@7.32.0) transitivePeerDependencies: - eslint - eslint-plugin-import @@ -22681,10 +22734,10 @@ snapshots: - supports-color - typescript - eslint-config-airbnb@18.2.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0): + eslint-config-airbnb@18.2.1(eslint-plugin-import@2.31.0)(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0): dependencies: eslint: 7.32.0 - eslint-config-airbnb-base: 14.2.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint@7.32.0) + eslint-config-airbnb-base: 14.2.1(eslint-plugin-import@2.31.0)(eslint@7.32.0) eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) eslint-plugin-jsx-a11y: 6.10.2(eslint@7.32.0) eslint-plugin-react: 7.37.3(eslint@7.32.0) @@ -22701,7 +22754,7 @@ snapshots: eslint: 7.32.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@7.32.0) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) eslint-plugin-jsx-a11y: 6.10.2(eslint@7.32.0) eslint-plugin-react: 7.37.3(eslint@7.32.0) eslint-plugin-react-hooks: 5.1.0(eslint@7.32.0) @@ -22716,7 +22769,7 @@ snapshots: dependencies: eslint: 7.32.0 - eslint-config-react-app@6.0.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(babel-eslint@10.1.0(eslint@7.32.0))(eslint-plugin-flowtype@5.10.0(eslint@7.32.0))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0))(eslint-plugin-jest@24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5): + eslint-config-react-app@6.0.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(babel-eslint@10.1.0(eslint@7.32.0))(eslint-plugin-flowtype@5.10.0(eslint@7.32.0))(eslint-plugin-import@2.31.0)(eslint-plugin-jest@24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5))(eslint-plugin-jsx-a11y@6.10.2(eslint@7.32.0))(eslint-plugin-react-hooks@4.6.2(eslint@7.32.0))(eslint-plugin-react@7.37.3(eslint@7.32.0))(eslint@7.32.0)(typescript@4.9.5): dependencies: '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5) '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@4.9.5) @@ -22771,11 +22824,11 @@ snapshots: is-glob: 4.0.3 stable-hash: 0.0.4 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) transitivePeerDependencies: - supports-color - eslint-loader@4.0.2(eslint@7.32.0)(webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack-cli@3.3.12)): + eslint-loader@4.0.2(eslint@7.32.0)(webpack@5.97.1): dependencies: eslint: 7.32.0 find-cache-dir: 3.3.2 @@ -22785,7 +22838,7 @@ snapshots: schema-utils: 2.7.1 webpack: 5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack-cli@3.3.12) - eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -22796,7 +22849,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -22830,7 +22883,7 @@ snapshots: doctrine: 2.1.0 eslint: 7.32.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22848,7 +22901,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -22859,7 +22912,7 @@ snapshots: doctrine: 2.1.0 eslint: 7.32.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1)(eslint@7.32.0) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -24581,16 +24634,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)): + jest-cli@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + create-jest: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -24600,7 +24653,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)): + jest-config@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -24626,7 +24679,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 15.14.9 - ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5) + ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -24843,11 +24896,11 @@ snapshots: leven: 3.1.0 pretty-format: 29.7.0 - jest-watch-typeahead@2.2.2(jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5))): + jest-watch-typeahead@2.2.2(jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5))): dependencies: ansi-escapes: 6.2.1 chalk: 5.4.1 - jest: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + jest: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) jest-regex-util: 29.6.3 jest-watcher: 29.7.0 slash: 5.1.0 @@ -24878,12 +24931,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)): + jest@29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5)) + jest-cli: 29.7.0(@types/node@15.14.9)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -26918,15 +26971,7 @@ snapshots: yaml: 1.10.2 optionalDependencies: postcss: 8.4.49 - ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5) - - postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)): - dependencies: - lilconfig: 3.1.3 - yaml: 2.7.0 - optionalDependencies: - postcss: 8.4.49 - ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5) + ts-node: 10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5) postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.2.5)(typescript@5.7.2)): dependencies: @@ -28523,42 +28568,15 @@ snapshots: tailwind-merge@2.6.0: {} - tailwind-variants@0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5))): - dependencies: - tailwind-merge: 1.14.0 - tailwindcss: 3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) - tailwind-variants@0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.2.5)(typescript@5.7.2))): dependencies: tailwind-merge: 1.14.0 tailwindcss: 3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.2.5)(typescript@5.7.2)) - tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)): + tailwind-variants@0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2))): dependencies: - '@alloc/quick-lru': 5.2.0 - arg: 5.0.2 - chokidar: 3.6.0 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.3.3 - glob-parent: 6.0.2 - is-glob: 4.0.3 - jiti: 1.21.7 - lilconfig: 2.1.0 - micromatch: 4.0.8 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.1.1 - postcss: 8.4.49 - postcss-import: 15.1.0(postcss@8.4.49) - postcss-js: 4.0.1(postcss@8.4.49) - postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5)) - postcss-nested: 6.2.0(postcss@8.4.49) - postcss-selector-parser: 6.1.2 - resolve: 1.22.10 - sucrase: 3.35.0 - transitivePeerDependencies: - - ts-node + tailwind-merge: 1.14.0 + tailwindcss: 3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2)) tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.2.5)(typescript@5.7.2)): dependencies: @@ -28662,7 +28680,7 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack-cli@3.3.12)): + terser-webpack-plugin@5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack@5.97.1): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 @@ -28674,14 +28692,14 @@ snapshots: '@swc/core': 1.10.6(@swc/helpers@0.5.15) esbuild: 0.15.18 - terser-webpack-plugin@5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1))): + terser-webpack-plugin@5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack@5.97.1): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 4.3.0 serialize-javascript: 6.0.2 terser: 5.37.0 - webpack: 5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1)) + webpack: 5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack-cli@3.3.12) optionalDependencies: '@swc/core': 1.10.6(@swc/helpers@0.5.15) esbuild: 0.24.2 @@ -28818,46 +28836,46 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@15.14.9)(typescript@4.9.5): + ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.2.5)(typescript@5.7.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 15.14.9 + '@types/node': 20.2.5 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.7.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: '@swc/core': 1.10.6(@swc/helpers@0.5.15) + optional: true - ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.2.5)(typescript@5.7.2): + ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@4.9.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.2.5 + '@types/node': 20.5.1 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.2 + typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: '@swc/core': 1.10.6(@swc/helpers@0.5.15) - optional: true ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2): dependencies: @@ -29541,7 +29559,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack-cli@3.3.12)) + terser-webpack-plugin: 5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.15.18)(webpack@5.97.1) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: @@ -29551,7 +29569,7 @@ snapshots: - esbuild - uglify-js - webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1)): + webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -29573,7 +29591,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack@5.97.1(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack-cli@3.3.12(webpack@5.97.1))) + terser-webpack-plugin: 5.3.11(@swc/core@1.10.6(@swc/helpers@0.5.15))(esbuild@0.24.2)(webpack@5.97.1) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: From b09b9c3be06e0084a175e2c95609b79bfae3f92a Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 19:50:04 +0800 Subject: [PATCH 02/56] refactor: remove framer-motion dependencies --- apps/docs/package.json | 1 - packages/components/accordion/package.json | 2 - packages/components/autocomplete/package.json | 2 - packages/components/button/package.json | 2 - packages/components/calendar/package.json | 2 - packages/components/card/package.json | 2 - packages/components/date-picker/package.json | 2 - packages/components/dropdown/package.json | 2 - packages/components/modal/package.json | 2 - packages/components/navbar/package.json | 2 - packages/components/popover/package.json | 2 - packages/components/ripple/package.json | 2 - packages/components/select/package.json | 2 - packages/components/snippet/package.json | 2 - packages/components/tabs/package.json | 2 - packages/components/tooltip/package.json | 4 +- packages/core/react/package.json | 3 +- packages/core/system/package.json | 2 - packages/utilities/dom-animation/package.json | 7 +- packages/utilities/framer-utils/package.json | 6 +- packages/utilities/shared-utils/package.json | 7 +- pnpm-lock.yaml | 89 ++----------------- 22 files changed, 20 insertions(+), 127 deletions(-) diff --git a/apps/docs/package.json b/apps/docs/package.json index 5b5bee021e..e74c3d860e 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -61,7 +61,6 @@ "color2k": "2.0.3", "contentlayer2": "0.5.3", "date-fns": "4.1.0", - "framer-motion": "11.11.13", "geist": "1.3.1", "github-slugger": "^2.0.0", "gray-matter": "^4.0.3", diff --git a/packages/components/accordion/package.json b/packages/components/accordion/package.json index 631ae49962..e628c4627b 100644 --- a/packages/components/accordion/package.json +++ b/packages/components/accordion/package.json @@ -42,7 +42,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -70,7 +69,6 @@ "@heroui/avatar": "workspace:*", "@heroui/input": "workspace:*", "@heroui/test-utils": "workspace:*", - "framer-motion": "11.9.0", "clean-package": "2.2.0", "react": "^18.0.0", "react-dom": "^18.0.0" diff --git a/packages/components/autocomplete/package.json b/packages/components/autocomplete/package.json index 26566d6974..cbd60a65b2 100644 --- a/packages/components/autocomplete/package.json +++ b/packages/components/autocomplete/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "@heroui/system": ">=2.4.0", "@heroui/theme": ">=2.4.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0" }, @@ -73,7 +72,6 @@ "@heroui/use-infinite-scroll": "workspace:*", "@react-stately/data": "3.12.0", "clean-package": "2.2.0", - "framer-motion": "11.9.0", "react": "^18.0.0", "react-dom": "^18.0.0", "react-hook-form": "^7.51.3" diff --git a/packages/components/button/package.json b/packages/components/button/package.json index 3e64f85271..e98b6483e5 100644 --- a/packages/components/button/package.json +++ b/packages/components/button/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -57,7 +56,6 @@ "@heroui/theme": "workspace:*", "@heroui/system": "workspace:*", "@heroui/shared-icons": "workspace:*", - "framer-motion": "11.9.0", "clean-package": "2.2.0", "react": "^18.0.0", "react-dom": "^18.0.0" diff --git a/packages/components/calendar/package.json b/packages/components/calendar/package.json index 19686cef3a..51a0ed12ce 100644 --- a/packages/components/calendar/package.json +++ b/packages/components/calendar/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "@heroui/system": ">=2.4.0", "@heroui/theme": ">=2.4.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0" }, @@ -67,7 +66,6 @@ "@heroui/theme": "workspace:*", "@heroui/radio": "workspace:*", "@heroui/test-utils": "workspace:*", - "framer-motion": "11.9.0", "clean-package": "2.2.0", "react": "^18.0.0", "react-dom": "^18.0.0" diff --git a/packages/components/card/package.json b/packages/components/card/package.json index 87de3d427f..c34f723111 100644 --- a/packages/components/card/package.json +++ b/packages/components/card/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -59,7 +58,6 @@ "@heroui/button": "workspace:*", "@heroui/avatar": "workspace:*", "@heroui/image": "workspace:*", - "framer-motion": "11.9.0", "clean-package": "2.2.0", "react": "^18.0.0", "react-dom": "^18.0.0" diff --git a/packages/components/date-picker/package.json b/packages/components/date-picker/package.json index ec403b32fd..490c061fd8 100644 --- a/packages/components/date-picker/package.json +++ b/packages/components/date-picker/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "@heroui/system": ">=2.4.0", "@heroui/theme": ">=2.4.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0" }, @@ -64,7 +63,6 @@ "@heroui/system": "workspace:*", "@heroui/test-utils": "workspace:*", "@heroui/theme": "workspace:*", - "framer-motion": "11.9.0", "clean-package": "2.2.0", "react": "^18.0.0", "react-dom": "^18.0.0" diff --git a/packages/components/dropdown/package.json b/packages/components/dropdown/package.json index b49b8911ac..76bf7b1b51 100644 --- a/packages/components/dropdown/package.json +++ b/packages/components/dropdown/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "@heroui/system": ">=2.4.0", "@heroui/theme": ">=2.4.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0" }, @@ -62,7 +61,6 @@ "@heroui/theme": "workspace:*", "@heroui/user": "workspace:*", "clean-package": "2.2.0", - "framer-motion": "11.9.0", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/packages/components/modal/package.json b/packages/components/modal/package.json index 137ef16383..37b8004129 100644 --- a/packages/components/modal/package.json +++ b/packages/components/modal/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -67,7 +66,6 @@ "@heroui/link": "workspace:*", "@heroui/switch": "workspace:*", "react-lorem-component": "0.13.0", - "framer-motion": "11.9.0", "clean-package": "2.2.0", "react": "^18.0.0", "react-dom": "^18.0.0" diff --git a/packages/components/navbar/package.json b/packages/components/navbar/package.json index 2c858210c3..f89e7143b0 100644 --- a/packages/components/navbar/package.json +++ b/packages/components/navbar/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -63,7 +62,6 @@ "@heroui/input": "workspace:*", "@heroui/link": "workspace:*", "@heroui/shared-icons": "workspace:*", - "framer-motion": "11.9.0", "react-lorem-component": "0.13.0", "clean-package": "2.2.0", "react": "^18.0.0", diff --git a/packages/components/popover/package.json b/packages/components/popover/package.json index 4fa1c06a06..ee1aa889a9 100644 --- a/packages/components/popover/package.json +++ b/packages/components/popover/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "@heroui/system": ">=2.4.0", "@heroui/theme": ">=2.4.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0" }, @@ -64,7 +63,6 @@ "@heroui/system": "workspace:*", "@heroui/theme": "workspace:*", "clean-package": "2.2.0", - "framer-motion": "11.9.0", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/packages/components/ripple/package.json b/packages/components/ripple/package.json index 8343e2eb36..d45d83d5f6 100644 --- a/packages/components/ripple/package.json +++ b/packages/components/ripple/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -49,7 +48,6 @@ "@heroui/theme": "workspace:*", "@heroui/system": "workspace:*", "clean-package": "2.2.0", - "framer-motion": "11.9.0", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/packages/components/select/package.json b/packages/components/select/package.json index ef9c8f87fd..d1aac8838c 100644 --- a/packages/components/select/package.json +++ b/packages/components/select/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "@heroui/system": ">=2.4.0", "@heroui/theme": ">=2.4.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0" }, @@ -73,7 +72,6 @@ "@react-aria/i18n": "3.12.4", "@react-stately/data": "3.12.0", "clean-package": "2.2.0", - "framer-motion": "11.9.0", "react": "^18.0.0", "react-dom": "^18.0.0", "react-hook-form": "^7.51.3" diff --git a/packages/components/snippet/package.json b/packages/components/snippet/package.json index d82027fdc6..4fb7782975 100644 --- a/packages/components/snippet/package.json +++ b/packages/components/snippet/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -53,7 +52,6 @@ "devDependencies": { "@heroui/theme": "workspace:*", "@heroui/system": "workspace:*", - "framer-motion": "11.9.0", "clean-package": "2.2.0", "react": "^18.0.0", "react-dom": "^18.0.0" diff --git a/packages/components/tabs/package.json b/packages/components/tabs/package.json index cb19860386..8dae248f95 100644 --- a/packages/components/tabs/package.json +++ b/packages/components/tabs/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -59,7 +58,6 @@ "devDependencies": { "@heroui/theme": "workspace:*", "@heroui/system": "workspace:*", - "framer-motion": "11.9.0", "react-lorem-component": "0.13.0", "@heroui/card": "workspace:*", "@heroui/input": "workspace:*", diff --git a/packages/components/tooltip/package.json b/packages/components/tooltip/package.json index 843dc2dc8c..87fd4d10b6 100644 --- a/packages/components/tooltip/package.json +++ b/packages/components/tooltip/package.json @@ -36,7 +36,6 @@ "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "@heroui/theme": ">=2.4.0", "@heroui/system": ">=2.4.0" }, @@ -59,8 +58,7 @@ "@heroui/button": "workspace:*", "@heroui/system": "workspace:*", "@heroui/theme": "workspace:*", - "clean-package": "2.2.0", - "framer-motion": "11.9.0" + "clean-package": "2.2.0" }, "clean-package": "../../../clean-package.config.json" } \ No newline at end of file diff --git a/packages/core/react/package.json b/packages/core/react/package.json index 8c2dd99e31..40931f37ad 100644 --- a/packages/core/react/package.json +++ b/packages/core/react/package.json @@ -93,8 +93,7 @@ }, "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", - "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1" + "react-dom": ">=18 || >=19.0.0-rc.0" }, "devDependencies": { "react": "^18.0.0", diff --git a/packages/core/system/package.json b/packages/core/system/package.json index 7cb0dfa39e..066645dfd4 100644 --- a/packages/core/system/package.json +++ b/packages/core/system/package.json @@ -34,13 +34,11 @@ "postpack": "clean-package restore" }, "peerDependencies": { - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1", "react": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0" }, "devDependencies": { "clean-package": "2.2.0", - "framer-motion": "11.9.0", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/packages/utilities/dom-animation/package.json b/packages/utilities/dom-animation/package.json index ba539e78eb..b2b25a2454 100644 --- a/packages/utilities/dom-animation/package.json +++ b/packages/utilities/dom-animation/package.json @@ -33,12 +33,11 @@ "prepack": "clean-package", "postpack": "clean-package restore" }, - "peerDependencies": { - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1" + "dependencies": { + "@heroui/shared-utils": "workspace:*" }, "devDependencies": { - "clean-package": "2.2.0", - "framer-motion": "11.9.0" + "clean-package": "2.2.0" }, "clean-package": "../../../clean-package.config.json" } diff --git a/packages/utilities/framer-utils/package.json b/packages/utilities/framer-utils/package.json index e64130ce22..87683e0b6d 100644 --- a/packages/utilities/framer-utils/package.json +++ b/packages/utilities/framer-utils/package.json @@ -35,8 +35,7 @@ }, "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0", - "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1" + "react-dom": ">=18 || >=19.0.0-rc.0" }, "dependencies": { "@heroui/system": "workspace:*", @@ -46,8 +45,7 @@ "devDependencies": { "react": "^18.0.0", "react-dom": "^18.0.0", - "clean-package": "2.2.0", - "framer-motion": "11.9.0" + "clean-package": "2.2.0" }, "clean-package": "../../../clean-package.config.json" } \ No newline at end of file diff --git a/packages/utilities/shared-utils/package.json b/packages/utilities/shared-utils/package.json index 6fa1f77761..b6c3621d96 100644 --- a/packages/utilities/shared-utils/package.json +++ b/packages/utilities/shared-utils/package.json @@ -13,6 +13,10 @@ "files": [ "dist" ], + "exports": { + ".": "./dist/index.js", + "./framer-motion": "./dist/framer-motion/index.js" + }, "publishConfig": { "access": "public" }, @@ -35,7 +39,8 @@ }, "dependencies": { "@internationalized/date": "3.6.0", - "@react-aria/i18n": "3.12.5" + "@react-aria/i18n": "3.12.5", + "framer-motion": "11.9.0" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a70cbaed5..4970a4fa73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -403,9 +403,6 @@ importers: date-fns: specifier: 4.1.0 version: 4.1.0 - framer-motion: - specifier: 11.11.13 - version: 11.11.13(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) geist: specifier: 1.3.1 version: 1.3.1(next@14.3.0-canary.43(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) @@ -699,9 +696,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -839,9 +833,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -1029,9 +1020,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -1117,9 +1105,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -1181,9 +1166,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -1456,9 +1438,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -1618,9 +1597,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -2095,9 +2071,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -2174,9 +2147,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -2302,9 +2272,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -2434,9 +2401,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -2568,9 +2532,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -2703,9 +2664,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -2975,9 +2933,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -3048,9 +3003,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) packages/components/user: dependencies: @@ -3235,9 +3187,6 @@ importers: '@react-aria/visually-hidden': specifier: 3.8.18 version: 3.8.18(react@18.2.0) - framer-motion: - specifier: '>=11.5.6 || >=12.0.0-alpha.1' - version: 11.11.13(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: clean-package: specifier: 2.2.0 @@ -3279,9 +3228,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -3901,13 +3847,14 @@ importers: version: 18.2.0(react@18.2.0) packages/utilities/dom-animation: + dependencies: + '@heroui/shared-utils': + specifier: workspace:* + version: link:../shared-utils devDependencies: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) packages/utilities/framer-utils: dependencies: @@ -3924,9 +3871,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -3976,6 +3920,9 @@ importers: '@react-aria/i18n': specifier: 3.12.5 version: 3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + framer-motion: + specifier: 11.9.0 + version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: clean-package: specifier: 2.2.0 @@ -10430,20 +10377,6 @@ packages: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} - framer-motion@11.11.13: - resolution: {integrity: sha512-aoEA83gsqRRsnh4TN7S9YNcKVLrg+GtPNnxNMd9bGn23+pLmuKGQeccPnqffEKzlkgmy2MkMo0jRkK41S2LzWw==} - peerDependencies: - '@emotion/is-prop-valid': '*' - react: 18.2.0 - react-dom: 18.2.0 - peerDependenciesMeta: - '@emotion/is-prop-valid': - optional: true - react: - optional: true - react-dom: - optional: true - framer-motion@11.9.0: resolution: {integrity: sha512-nCfGxvsQecVLjjYDu35G2F5ls+ArE3FBfhxV0RSiisMaUKqteq5DMBFNRKwMyVj+VqKTNhawt+BV480YCHKFlQ==} peerDependencies: @@ -23544,14 +23477,6 @@ snapshots: dependencies: map-cache: 0.2.2 - framer-motion@11.11.13(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): - dependencies: - tslib: 2.8.1 - optionalDependencies: - '@emotion/is-prop-valid': 1.3.1 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - framer-motion@11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: tslib: 2.8.1 From 4596938fe2badd8eafd6b155c5c391b82e340e39 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 20:18:14 +0800 Subject: [PATCH 03/56] feat(motion): introduce `@heroui/motion` --- packages/external/motion/README.md | 22 +++++++++++ packages/external/motion/package.json | 52 ++++++++++++++++++++++++++ packages/external/motion/src/index.ts | 1 + packages/external/motion/tsconfig.json | 10 +++++ 4 files changed, 85 insertions(+) create mode 100644 packages/external/motion/README.md create mode 100644 packages/external/motion/package.json create mode 100644 packages/external/motion/src/index.ts create mode 100644 packages/external/motion/tsconfig.json diff --git a/packages/external/motion/README.md b/packages/external/motion/README.md new file mode 100644 index 0000000000..c4a1f160d6 --- /dev/null +++ b/packages/external/motion/README.md @@ -0,0 +1,22 @@ +# @heroui/motion + +Mirror package of framer-motion + +## Installation + +```sh +yarn add @heroui/motion +# or +npm i @heroui/motion +``` + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md) +for details. + +## License + +This project is licensed under the terms of the +[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE). diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json new file mode 100644 index 0000000000..ed56fa6422 --- /dev/null +++ b/packages/external/motion/package.json @@ -0,0 +1,52 @@ +{ + "name": "@heroui/motion", + "version": "2.0.0", + "description": "Mirror package of framer-motion", + "keywords": [ + "hero ui", + "motion" + ], + "author": "WK Wong ", + "homepage": "https://heroui.com", + "license": "MIT", + "main": "src/index.ts", + "sideEffects": false, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/heroui-inc/heroui.git", + "directory": "packages/core/system" + }, + "bugs": { + "url": "https://github.com/heroui-inc/heroui/issues" + }, + "scripts": { + "build": "tsup src --dts", + "dev": "pnpm build:fast --watch", + "clean": "rimraf dist .turbo", + "typecheck": "tsc --noEmit", + "build:fast": "tsup src", + "prepack": "clean-package", + "postpack": "clean-package restore" + }, + "dependencies": { + "framer-motion": "11.9.0" + }, + "devDependencies": { + "clean-package": "2.2.0" + }, + "clean-package": "../../../clean-package.config.json", + "tsup": { + "clean": true, + "target": "es2019", + "format": [ + "cjs", + "esm" + ] + } +} \ No newline at end of file diff --git a/packages/external/motion/src/index.ts b/packages/external/motion/src/index.ts new file mode 100644 index 0000000000..a5e7a09883 --- /dev/null +++ b/packages/external/motion/src/index.ts @@ -0,0 +1 @@ +export * from "framer-motion"; diff --git a/packages/external/motion/tsconfig.json b/packages/external/motion/tsconfig.json new file mode 100644 index 0000000000..bfa97def60 --- /dev/null +++ b/packages/external/motion/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.json", + "include": [ + "src", + "index.ts", + "../react-utils/src/context.ts", + "../react-utils/src/children.ts", + "../react-utils/src/refs.ts" + ] +} From add1eb73c4d71babc5ee7bd8aabe178926fa0125 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 20:19:14 +0800 Subject: [PATCH 04/56] refactor: import from @heroui/motion --- apps/docs/components/blog-post.tsx | 2 +- apps/docs/components/blog/video-in-view.tsx | 2 +- .../docs/components/code-demo/code-demo.tsx | 2 +- .../components/code-demo/window-resizer.tsx | 2 +- apps/docs/components/marketing/a11y-otb.tsx | 2 +- apps/docs/components/navbar.tsx | 2 +- apps/docs/components/sandpack/use-sandpack.ts | 4 +- apps/docs/package.json | 1 + packages/components/accordion/package.json | 1 + .../accordion/src/accordion-item.tsx | 4 +- .../components/accordion/src/accordion.tsx | 2 +- .../src/base/accordion-item-base.tsx | 2 +- packages/components/autocomplete/package.json | 1 + .../autocomplete/src/autocomplete.tsx | 2 +- .../components/calendar/src/calendar-base.tsx | 2 +- .../calendar/src/calendar-header.tsx | 2 +- .../calendar/src/calendar-month.tsx | 2 +- .../calendar/src/calendar-transitions.ts | 2 +- packages/components/date-picker/package.json | 1 + .../date-picker/src/date-picker.tsx | 2 +- .../date-picker/src/date-range-picker.tsx | 2 +- packages/components/modal/package.json | 1 + .../components/modal/src/modal-content.tsx | 4 +- packages/components/modal/src/modal.tsx | 2 +- packages/components/modal/src/use-modal.ts | 2 +- packages/components/navbar/package.json | 1 + .../navbar/src/navbar-menu-transitions.ts | 2 +- .../components/navbar/src/navbar-menu.tsx | 2 +- .../navbar/src/navbar-transitions.ts | 2 +- packages/components/navbar/src/navbar.tsx | 2 +- packages/components/navbar/src/use-navbar.ts | 2 +- packages/components/popover/package.json | 1 + .../popover/src/free-solo-popover.tsx | 2 +- .../popover/src/popover-content.tsx | 4 +- packages/components/popover/src/popover.tsx | 2 +- .../components/popover/src/use-popover.ts | 2 +- packages/components/ripple/package.json | 3 +- packages/components/ripple/src/ripple.tsx | 4 +- packages/components/select/src/select.tsx | 2 +- packages/components/tabs/package.json | 1 + packages/components/tabs/src/tab.tsx | 2 +- packages/components/tabs/src/tabs.tsx | 2 +- packages/components/tabs/src/use-tabs.ts | 2 +- packages/components/tooltip/package.json | 1 + packages/components/tooltip/src/tooltip.tsx | 2 +- .../components/tooltip/src/use-tooltip.ts | 2 +- packages/core/system/src/provider.tsx | 2 +- packages/utilities/dom-animation/package.json | 2 +- packages/utilities/dom-animation/src/index.ts | 2 +- packages/utilities/framer-utils/package.json | 3 +- .../framer-utils/src/resizable-panel.tsx | 2 +- .../framer-utils/src/transition-utils.ts | 2 +- pnpm-lock.yaml | 47 ++++++++++++++++++- 53 files changed, 104 insertions(+), 50 deletions(-) diff --git a/apps/docs/components/blog-post.tsx b/apps/docs/components/blog-post.tsx index 1111071e2c..81a8499be6 100644 --- a/apps/docs/components/blog-post.tsx +++ b/apps/docs/components/blog-post.tsx @@ -5,7 +5,7 @@ import {Card, CardFooter, CardBody, CardHeader, Link, Avatar, Image} from "@hero import Balancer from "react-wrap-balancer"; import {format, parseISO} from "date-fns"; import NextLink from "next/link"; -import {AnimatePresence, motion} from "framer-motion"; +import {AnimatePresence, motion} from "@heroui/motion"; import {usePostHog} from "posthog-js/react"; import {useIsMounted} from "@/hooks/use-is-mounted"; diff --git a/apps/docs/components/blog/video-in-view.tsx b/apps/docs/components/blog/video-in-view.tsx index ef9ed9c16f..6e4c37d749 100644 --- a/apps/docs/components/blog/video-in-view.tsx +++ b/apps/docs/components/blog/video-in-view.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/media-has-caption */ "use client"; -import {useInView} from "framer-motion"; +import {useInView} from "@heroui/motion"; import {useRef, FC, useEffect, useState, useCallback} from "react"; import {Button, cn, Spinner, Tooltip} from "@heroui/react"; diff --git a/apps/docs/components/docs/components/code-demo/code-demo.tsx b/apps/docs/components/docs/components/code-demo/code-demo.tsx index 65b5f9e3e8..77561de359 100644 --- a/apps/docs/components/docs/components/code-demo/code-demo.tsx +++ b/apps/docs/components/docs/components/code-demo/code-demo.tsx @@ -3,7 +3,7 @@ import React, {useCallback, useMemo, useRef} from "react"; import dynamic from "next/dynamic"; import {Skeleton, Tab, Tabs} from "@heroui/react"; -import {useInView} from "framer-motion"; +import {useInView} from "@heroui/motion"; import {useCodeDemo, UseCodeDemoProps} from "./use-code-demo"; import WindowResizer, {WindowResizerProps} from "./window-resizer"; diff --git a/apps/docs/components/docs/components/code-demo/window-resizer.tsx b/apps/docs/components/docs/components/code-demo/window-resizer.tsx index b0622e4eb7..5f6a4564cf 100644 --- a/apps/docs/components/docs/components/code-demo/window-resizer.tsx +++ b/apps/docs/components/docs/components/code-demo/window-resizer.tsx @@ -1,5 +1,5 @@ import React from "react"; -import {motion, useMotionValue, useTransform} from "framer-motion"; +import {motion, useMotionValue, useTransform} from "@heroui/motion"; import {tv} from "tailwind-variants"; import {useIsMobile} from "@/hooks/use-media-query"; diff --git a/apps/docs/components/marketing/a11y-otb.tsx b/apps/docs/components/marketing/a11y-otb.tsx index a6e1c4547d..ba94eb3306 100644 --- a/apps/docs/components/marketing/a11y-otb.tsx +++ b/apps/docs/components/marketing/a11y-otb.tsx @@ -11,7 +11,7 @@ import { DropdownItem, Tooltip, } from "@heroui/react"; -import {useInView} from "framer-motion"; +import {useInView} from "@heroui/motion"; import {clsx} from "@heroui/shared-utils"; import { AddNoteBulkIcon, diff --git a/apps/docs/components/navbar.tsx b/apps/docs/components/navbar.tsx index 9be396c459..364042103e 100644 --- a/apps/docs/components/navbar.tsx +++ b/apps/docs/components/navbar.tsx @@ -25,7 +25,7 @@ import {isAppleDevice} from "@react-aria/utils"; import {clsx} from "@heroui/shared-utils"; import NextLink from "next/link"; import {usePathname} from "next/navigation"; -import {motion, AnimatePresence} from "framer-motion"; +import {motion, AnimatePresence} from "@heroui/motion"; import {useEffect} from "react"; import {usePress} from "@react-aria/interactions"; import {useFocusRing} from "@react-aria/focus"; diff --git a/apps/docs/components/sandpack/use-sandpack.ts b/apps/docs/components/sandpack/use-sandpack.ts index 3aef20633c..423c9ec6f0 100644 --- a/apps/docs/components/sandpack/use-sandpack.ts +++ b/apps/docs/components/sandpack/use-sandpack.ts @@ -70,7 +70,7 @@ export const useSandpack = ({ }, {}); let dependencies = { - "framer-motion": "11.9.0", + "@heroui/motion": "11.9.0", "@heroui/react": "latest", }; @@ -143,7 +143,7 @@ export const useSandpack = ({ // const dependencies = useMemo(() => { // let deps = { - // "framer-motion": "11.9.0", + // "@heroui/motion": "11.9.0", // }; // if (hasComponents) { diff --git a/apps/docs/package.json b/apps/docs/package.json index e74c3d860e..e278cd12d0 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -35,6 +35,7 @@ "@heroui/use-clipboard": "workspace:*", "@heroui/use-infinite-scroll": "workspace:*", "@heroui/use-is-mobile": "workspace:*", + "@heroui/motion": "workspace:*", "@iconify/icons-solar": "1.2.3", "@iconify/react": "5.0.2", "@internationalized/date": "3.6.0", diff --git a/packages/components/accordion/package.json b/packages/components/accordion/package.json index e628c4627b..809915e7c1 100644 --- a/packages/components/accordion/package.json +++ b/packages/components/accordion/package.json @@ -54,6 +54,7 @@ "@heroui/divider": "workspace:*", "@heroui/use-aria-accordion": "workspace:*", "@heroui/dom-animation": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/interactions": "3.22.5", "@react-aria/focus": "3.19.0", "@react-aria/utils": "3.26.0", diff --git a/packages/components/accordion/src/accordion-item.tsx b/packages/components/accordion/src/accordion-item.tsx index ee7d5e0aca..2252cce04f 100644 --- a/packages/components/accordion/src/accordion-item.tsx +++ b/packages/components/accordion/src/accordion-item.tsx @@ -1,9 +1,9 @@ -import type {Variants} from "framer-motion"; +import type {Variants} from "@heroui/motion"; import {forwardRef} from "@heroui/system"; import {useMemo, ReactNode} from "react"; import {ChevronIcon} from "@heroui/shared-icons"; -import {AnimatePresence, LazyMotion, m, useWillChange} from "framer-motion"; +import {AnimatePresence, LazyMotion, m, useWillChange} from "@heroui/motion"; import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; import {UseAccordionItemProps, useAccordionItem} from "./use-accordion-item"; diff --git a/packages/components/accordion/src/accordion.tsx b/packages/components/accordion/src/accordion.tsx index 84f6dab666..751a4cdb8c 100644 --- a/packages/components/accordion/src/accordion.tsx +++ b/packages/components/accordion/src/accordion.tsx @@ -1,5 +1,5 @@ import {forwardRef} from "@heroui/system"; -import {LayoutGroup} from "framer-motion"; +import {LayoutGroup} from "@heroui/motion"; import {Divider} from "@heroui/divider"; import {Fragment, Key, useCallback, useMemo} from "react"; diff --git a/packages/components/accordion/src/base/accordion-item-base.tsx b/packages/components/accordion/src/base/accordion-item-base.tsx index d462e3398f..3b5745c01c 100644 --- a/packages/components/accordion/src/base/accordion-item-base.tsx +++ b/packages/components/accordion/src/base/accordion-item-base.tsx @@ -4,7 +4,7 @@ import {As} from "@heroui/system"; import {ItemProps, BaseItem} from "@heroui/aria-utils"; import {FocusableProps, PressEvents} from "@react-types/shared"; import {ReactNode, MouseEventHandler} from "react"; -import {HTMLMotionProps} from "framer-motion"; +import {HTMLMotionProps} from "@heroui/motion"; export type AccordionItemIndicatorProps = { /** diff --git a/packages/components/autocomplete/package.json b/packages/components/autocomplete/package.json index cbd60a65b2..3b6d8440b6 100644 --- a/packages/components/autocomplete/package.json +++ b/packages/components/autocomplete/package.json @@ -53,6 +53,7 @@ "@heroui/spinner": "workspace:*", "@heroui/use-aria-button": "workspace:*", "@heroui/use-safe-layout-effect": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/combobox": "3.11.0", "@react-aria/focus": "3.19.0", "@react-aria/i18n": "3.12.4", diff --git a/packages/components/autocomplete/src/autocomplete.tsx b/packages/components/autocomplete/src/autocomplete.tsx index 7c7de7b0f2..4c408c71ec 100644 --- a/packages/components/autocomplete/src/autocomplete.tsx +++ b/packages/components/autocomplete/src/autocomplete.tsx @@ -6,7 +6,7 @@ import {Listbox} from "@heroui/listbox"; import {Button} from "@heroui/button"; import {Input} from "@heroui/input"; import {ForwardedRef, ReactElement} from "react"; -import {AnimatePresence} from "framer-motion"; +import {AnimatePresence} from "@heroui/motion"; import {UseAutocompleteProps, useAutocomplete} from "./use-autocomplete"; diff --git a/packages/components/calendar/src/calendar-base.tsx b/packages/components/calendar/src/calendar-base.tsx index 439828f717..05cee8ecb8 100644 --- a/packages/components/calendar/src/calendar-base.tsx +++ b/packages/components/calendar/src/calendar-base.tsx @@ -7,7 +7,7 @@ import {forwardRef, Fragment, useState} from "react"; import {VisuallyHidden} from "@react-aria/visually-hidden"; import {Button} from "@heroui/button"; import {chain, mergeProps} from "@react-aria/utils"; -import {AnimatePresence, LazyMotion, MotionConfig} from "framer-motion"; +import {AnimatePresence, LazyMotion, MotionConfig} from "@heroui/motion"; import {ResizablePanel} from "@heroui/framer-utils"; import {ChevronLeftIcon} from "./chevron-left"; diff --git a/packages/components/calendar/src/calendar-header.tsx b/packages/components/calendar/src/calendar-header.tsx index 6ef187ef5f..bfbce1bccf 100644 --- a/packages/components/calendar/src/calendar-header.tsx +++ b/packages/components/calendar/src/calendar-header.tsx @@ -3,7 +3,7 @@ import type {CalendarDate} from "@heroui/shared-utils"; import {HTMLHeroUIProps} from "@heroui/system"; import {useDateFormatter} from "@react-aria/i18n"; -import {m} from "framer-motion"; +import {m} from "@heroui/motion"; import {Button} from "@heroui/button"; import {useCallback} from "react"; diff --git a/packages/components/calendar/src/calendar-month.tsx b/packages/components/calendar/src/calendar-month.tsx index a83a621839..aa163226c2 100644 --- a/packages/components/calendar/src/calendar-month.tsx +++ b/packages/components/calendar/src/calendar-month.tsx @@ -3,7 +3,7 @@ import {CalendarPropsBase} from "@react-types/calendar"; import {HTMLHeroUIProps} from "@heroui/system"; import {useLocale} from "@react-aria/i18n"; import {useCalendarGrid} from "@react-aria/calendar"; -import {m} from "framer-motion"; +import {m} from "@heroui/motion"; import {dataAttr, getInertValue} from "@heroui/shared-utils"; import {CalendarCell} from "./calendar-cell"; diff --git a/packages/components/calendar/src/calendar-transitions.ts b/packages/components/calendar/src/calendar-transitions.ts index a827cf2c33..4af3718b14 100644 --- a/packages/components/calendar/src/calendar-transitions.ts +++ b/packages/components/calendar/src/calendar-transitions.ts @@ -1,4 +1,4 @@ -import {Variants} from "framer-motion"; +import {Variants} from "@heroui/motion"; export const transition = { type: "spring", diff --git a/packages/components/date-picker/package.json b/packages/components/date-picker/package.json index 490c061fd8..7aa0a1a79f 100644 --- a/packages/components/date-picker/package.json +++ b/packages/components/date-picker/package.json @@ -49,6 +49,7 @@ "@heroui/react-utils": "workspace:*", "@heroui/shared-icons": "workspace:*", "@heroui/shared-utils": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/datepicker": "3.12.0", "@react-aria/i18n": "3.12.4", "@react-aria/utils": "3.26.0", diff --git a/packages/components/date-picker/src/date-picker.tsx b/packages/components/date-picker/src/date-picker.tsx index 9107365a61..0217db7b95 100644 --- a/packages/components/date-picker/src/date-picker.tsx +++ b/packages/components/date-picker/src/date-picker.tsx @@ -7,7 +7,7 @@ import {Button} from "@heroui/button"; import {DateInput, TimeInput} from "@heroui/date-input"; import {FreeSoloPopover} from "@heroui/popover"; import {Calendar} from "@heroui/calendar"; -import {AnimatePresence} from "framer-motion"; +import {AnimatePresence} from "@heroui/motion"; import {CalendarBoldIcon} from "@heroui/shared-icons"; import {UseDatePickerProps, useDatePicker} from "./use-date-picker"; diff --git a/packages/components/date-picker/src/date-range-picker.tsx b/packages/components/date-picker/src/date-range-picker.tsx index df68f9bf43..05832bdec7 100644 --- a/packages/components/date-picker/src/date-range-picker.tsx +++ b/packages/components/date-picker/src/date-range-picker.tsx @@ -7,7 +7,7 @@ import {Button} from "@heroui/button"; import {TimeInput, DateInputGroup} from "@heroui/date-input"; import {FreeSoloPopover} from "@heroui/popover"; import {RangeCalendar} from "@heroui/calendar"; -import {AnimatePresence} from "framer-motion"; +import {AnimatePresence} from "@heroui/motion"; import {CalendarBoldIcon} from "@heroui/shared-icons"; import DateRangePickerField from "./date-range-picker-field"; diff --git a/packages/components/modal/package.json b/packages/components/modal/package.json index 37b8004129..e4d3c0ebca 100644 --- a/packages/components/modal/package.json +++ b/packages/components/modal/package.json @@ -49,6 +49,7 @@ "@heroui/shared-icons": "workspace:*", "@heroui/use-aria-modal-overlay": "workspace:*", "@heroui/dom-animation": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/dialog": "3.5.20", "@react-aria/focus": "3.19.0", "@react-aria/interactions": "3.22.5", diff --git a/packages/components/modal/src/modal-content.tsx b/packages/components/modal/src/modal-content.tsx index 1323bc602c..64dc8f173a 100644 --- a/packages/components/modal/src/modal-content.tsx +++ b/packages/components/modal/src/modal-content.tsx @@ -1,11 +1,11 @@ import type {AriaDialogProps} from "@react-aria/dialog"; -import type {HTMLMotionProps} from "framer-motion"; +import type {HTMLMotionProps} from "@heroui/motion"; import {cloneElement, isValidElement, ReactNode, useMemo, useCallback} from "react"; import {DismissButton} from "@react-aria/overlays"; import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; import {CloseIcon} from "@heroui/shared-icons"; -import {LazyMotion, m} from "framer-motion"; +import {LazyMotion, m} from "@heroui/motion"; import {useDialog} from "@react-aria/dialog"; import {chain, mergeProps, useViewportSize} from "@react-aria/utils"; import {HTMLHeroUIProps} from "@heroui/system"; diff --git a/packages/components/modal/src/modal.tsx b/packages/components/modal/src/modal.tsx index c9e38b00de..7c12677cf9 100644 --- a/packages/components/modal/src/modal.tsx +++ b/packages/components/modal/src/modal.tsx @@ -1,5 +1,5 @@ import {ReactNode} from "react"; -import {AnimatePresence} from "framer-motion"; +import {AnimatePresence} from "@heroui/motion"; import {Overlay} from "@react-aria/overlays"; import {forwardRef} from "@heroui/system"; diff --git a/packages/components/modal/src/use-modal.ts b/packages/components/modal/src/use-modal.ts index edd9c7a7c9..79476766da 100644 --- a/packages/components/modal/src/use-modal.ts +++ b/packages/components/modal/src/use-modal.ts @@ -1,5 +1,5 @@ import type {ModalVariantProps, SlotsToClasses, ModalSlots} from "@heroui/theme"; -import type {HTMLMotionProps} from "framer-motion"; +import type {HTMLMotionProps} from "@heroui/motion"; import {AriaModalOverlayProps} from "@react-aria/overlays"; import {useAriaModalOverlay} from "@heroui/use-aria-modal-overlay"; diff --git a/packages/components/navbar/package.json b/packages/components/navbar/package.json index f89e7143b0..dd1b35b2b4 100644 --- a/packages/components/navbar/package.json +++ b/packages/components/navbar/package.json @@ -45,6 +45,7 @@ "@heroui/framer-utils": "workspace:*", "@heroui/use-scroll-position": "workspace:*", "@heroui/dom-animation": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/focus": "3.19.0", "@react-aria/interactions": "3.22.5", "@react-aria/button": "3.11.0", diff --git a/packages/components/navbar/src/navbar-menu-transitions.ts b/packages/components/navbar/src/navbar-menu-transitions.ts index 9c03c89203..9dd0bfee0c 100644 --- a/packages/components/navbar/src/navbar-menu-transitions.ts +++ b/packages/components/navbar/src/navbar-menu-transitions.ts @@ -1,4 +1,4 @@ -import {Variants} from "framer-motion"; +import {Variants} from "@heroui/motion"; export const menuVariants: Variants = { enter: { diff --git a/packages/components/navbar/src/navbar-menu.tsx b/packages/components/navbar/src/navbar-menu.tsx index 37f1ba190a..e5d3447480 100644 --- a/packages/components/navbar/src/navbar-menu.tsx +++ b/packages/components/navbar/src/navbar-menu.tsx @@ -1,7 +1,7 @@ import {forwardRef, HTMLHeroUIProps} from "@heroui/system"; import {useDOMRef} from "@heroui/react-utils"; import {clsx, dataAttr} from "@heroui/shared-utils"; -import {AnimatePresence, HTMLMotionProps, LazyMotion, m} from "framer-motion"; +import {AnimatePresence, HTMLMotionProps, LazyMotion, m} from "@heroui/motion"; import {mergeProps} from "@react-aria/utils"; import {Overlay} from "@react-aria/overlays"; import React from "react"; diff --git a/packages/components/navbar/src/navbar-transitions.ts b/packages/components/navbar/src/navbar-transitions.ts index 5139f63601..7f9627db0e 100644 --- a/packages/components/navbar/src/navbar-transitions.ts +++ b/packages/components/navbar/src/navbar-transitions.ts @@ -1,4 +1,4 @@ -import {Variants} from "framer-motion"; +import {Variants} from "@heroui/motion"; import {TRANSITION_EASINGS} from "@heroui/framer-utils"; export const hideOnScrollVariants: Variants = { diff --git a/packages/components/navbar/src/navbar.tsx b/packages/components/navbar/src/navbar.tsx index 363ccc2bbb..c4b111677f 100644 --- a/packages/components/navbar/src/navbar.tsx +++ b/packages/components/navbar/src/navbar.tsx @@ -1,6 +1,6 @@ import {forwardRef} from "@heroui/system"; import {pickChildren} from "@heroui/react-utils"; -import {LazyMotion, m} from "framer-motion"; +import {LazyMotion, m} from "@heroui/motion"; import {mergeProps} from "@react-aria/utils"; import {hideOnScrollVariants} from "./navbar-transitions"; diff --git a/packages/components/navbar/src/use-navbar.ts b/packages/components/navbar/src/use-navbar.ts index e560e7ada8..5d8f973928 100644 --- a/packages/components/navbar/src/use-navbar.ts +++ b/packages/components/navbar/src/use-navbar.ts @@ -9,7 +9,7 @@ import {useCallback, useEffect, useMemo, useRef, useState} from "react"; import {mergeProps, useResizeObserver} from "@react-aria/utils"; import {useScrollPosition} from "@heroui/use-scroll-position"; import {useControlledState} from "@react-stately/utils"; -import {HTMLMotionProps} from "framer-motion"; +import {HTMLMotionProps} from "@heroui/motion"; import {usePreventScroll} from "@react-aria/overlays"; interface Props extends HTMLHeroUIProps<"nav"> { diff --git a/packages/components/popover/package.json b/packages/components/popover/package.json index ee1aa889a9..e9f4f82d60 100644 --- a/packages/components/popover/package.json +++ b/packages/components/popover/package.json @@ -48,6 +48,7 @@ "@heroui/use-aria-button": "workspace:*", "@heroui/use-safe-layout-effect": "workspace:*", "@heroui/dom-animation": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/dialog": "3.5.20", "@react-aria/focus": "3.19.0", "@react-aria/interactions": "3.22.5", diff --git a/packages/components/popover/src/free-solo-popover.tsx b/packages/components/popover/src/free-solo-popover.tsx index 5470d154ad..792d3acf5a 100644 --- a/packages/components/popover/src/free-solo-popover.tsx +++ b/packages/components/popover/src/free-solo-popover.tsx @@ -10,7 +10,7 @@ import * as React from "react"; import {DismissButton, Overlay} from "@react-aria/overlays"; import {forwardRef} from "@heroui/system"; -import {HTMLMotionProps, LazyMotion, m} from "framer-motion"; +import {HTMLMotionProps, LazyMotion, m} from "@heroui/motion"; import {mergeProps} from "@react-aria/utils"; import {getTransformOrigins} from "@heroui/aria-utils"; import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; diff --git a/packages/components/popover/src/popover-content.tsx b/packages/components/popover/src/popover-content.tsx index 09b169fe00..39e3cc565d 100644 --- a/packages/components/popover/src/popover-content.tsx +++ b/packages/components/popover/src/popover-content.tsx @@ -1,10 +1,10 @@ import type {AriaDialogProps} from "@react-aria/dialog"; -import type {HTMLMotionProps} from "framer-motion"; +import type {HTMLMotionProps} from "@heroui/motion"; import {DOMAttributes, ReactNode, useMemo, useRef} from "react"; import {DismissButton} from "@react-aria/overlays"; import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; -import {m, LazyMotion} from "framer-motion"; +import {m, LazyMotion} from "@heroui/motion"; import {HTMLHeroUIProps} from "@heroui/system"; import {getTransformOrigins} from "@heroui/aria-utils"; import {useDialog} from "@react-aria/dialog"; diff --git a/packages/components/popover/src/popover.tsx b/packages/components/popover/src/popover.tsx index f2c7f472b9..c057f0a384 100644 --- a/packages/components/popover/src/popover.tsx +++ b/packages/components/popover/src/popover.tsx @@ -1,7 +1,7 @@ import {Children, ReactNode} from "react"; import {forwardRef} from "@heroui/system"; import {Overlay} from "@react-aria/overlays"; -import {AnimatePresence} from "framer-motion"; +import {AnimatePresence} from "@heroui/motion"; import {UsePopoverProps, usePopover} from "./use-popover"; import {PopoverProvider} from "./popover-context"; diff --git a/packages/components/popover/src/use-popover.ts b/packages/components/popover/src/use-popover.ts index dd0d7034ca..2dfb21ffa8 100644 --- a/packages/components/popover/src/use-popover.ts +++ b/packages/components/popover/src/use-popover.ts @@ -1,5 +1,5 @@ import type {PopoverVariantProps, SlotsToClasses, PopoverSlots} from "@heroui/theme"; -import type {HTMLMotionProps} from "framer-motion"; +import type {HTMLMotionProps} from "@heroui/motion"; import type {PressEvent} from "@react-types/shared"; import {RefObject, Ref, useEffect} from "react"; diff --git a/packages/components/ripple/package.json b/packages/components/ripple/package.json index d45d83d5f6..9eaa973256 100644 --- a/packages/components/ripple/package.json +++ b/packages/components/ripple/package.json @@ -42,7 +42,8 @@ "dependencies": { "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", - "@heroui/dom-animation": "workspace:*" + "@heroui/dom-animation": "workspace:*", + "@heroui/motion": "workspace:*" }, "devDependencies": { "@heroui/theme": "workspace:*", diff --git a/packages/components/ripple/src/ripple.tsx b/packages/components/ripple/src/ripple.tsx index f860ace6a8..d2557aed61 100644 --- a/packages/components/ripple/src/ripple.tsx +++ b/packages/components/ripple/src/ripple.tsx @@ -1,9 +1,9 @@ import type {RippleType} from "./use-ripple"; import type {FC} from "react"; -import type {HTMLMotionProps} from "framer-motion"; +import type {HTMLMotionProps} from "@heroui/motion"; import type {HTMLHeroUIProps} from "@heroui/system"; -import {AnimatePresence, m, LazyMotion} from "framer-motion"; +import {AnimatePresence, m, LazyMotion} from "@heroui/motion"; import {clamp} from "@heroui/shared-utils"; export interface RippleProps extends HTMLHeroUIProps<"span"> { diff --git a/packages/components/select/src/select.tsx b/packages/components/select/src/select.tsx index 18c56d98ee..2d9f82be18 100644 --- a/packages/components/select/src/select.tsx +++ b/packages/components/select/src/select.tsx @@ -9,7 +9,7 @@ import {forwardRef} from "@heroui/system"; import {ScrollShadow} from "@heroui/scroll-shadow"; import {cloneElement} from "react"; import {VisuallyHidden} from "@react-aria/visually-hidden"; -import {AnimatePresence} from "framer-motion"; +import {AnimatePresence} from "@heroui/motion"; import {HiddenSelect} from "./hidden-select"; import {UseSelectProps, useSelect} from "./use-select"; diff --git a/packages/components/tabs/package.json b/packages/components/tabs/package.json index 8dae248f95..34c0ac6040 100644 --- a/packages/components/tabs/package.json +++ b/packages/components/tabs/package.json @@ -46,6 +46,7 @@ "@heroui/framer-utils": "workspace:*", "@heroui/use-is-mounted": "workspace:*", "@heroui/use-update-effect": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/focus": "3.19.0", "@react-aria/interactions": "3.22.5", "@react-aria/tabs": "3.9.8", diff --git a/packages/components/tabs/src/tab.tsx b/packages/components/tabs/src/tab.tsx index be1da020e4..5c52b94587 100644 --- a/packages/components/tabs/src/tab.tsx +++ b/packages/components/tabs/src/tab.tsx @@ -9,7 +9,7 @@ import {useFocusRing} from "@react-aria/focus"; import {Node} from "@react-types/shared"; import {useTab} from "@react-aria/tabs"; import {useHover} from "@react-aria/interactions"; -import {m, domMax, LazyMotion} from "framer-motion"; +import {m, domMax, LazyMotion} from "@heroui/motion"; import {useIsMounted} from "@heroui/use-is-mounted"; import {ValuesType} from "./use-tabs"; diff --git a/packages/components/tabs/src/tabs.tsx b/packages/components/tabs/src/tabs.tsx index d6c1771a45..15fd7d6058 100644 --- a/packages/components/tabs/src/tabs.tsx +++ b/packages/components/tabs/src/tabs.tsx @@ -1,5 +1,5 @@ import {ForwardedRef, ReactElement, useId} from "react"; -import {LayoutGroup} from "framer-motion"; +import {LayoutGroup} from "@heroui/motion"; import {forwardRef} from "@heroui/system"; import {UseTabsProps, useTabs} from "./use-tabs"; diff --git a/packages/components/tabs/src/use-tabs.ts b/packages/components/tabs/src/use-tabs.ts index 4935d335d8..70e0e3b92e 100644 --- a/packages/components/tabs/src/use-tabs.ts +++ b/packages/components/tabs/src/use-tabs.ts @@ -11,7 +11,7 @@ import {AriaTabListProps, useTabList} from "@react-aria/tabs"; import {mergeProps} from "@react-aria/utils"; import {CollectionProps} from "@heroui/aria-utils"; import {CollectionChildren} from "@react-types/shared"; -import {HTMLMotionProps} from "framer-motion"; +import {HTMLMotionProps} from "@heroui/motion"; export interface Props extends Omit { /** diff --git a/packages/components/tooltip/package.json b/packages/components/tooltip/package.json index 87fd4d10b6..4d4b9ab3e4 100644 --- a/packages/components/tooltip/package.json +++ b/packages/components/tooltip/package.json @@ -46,6 +46,7 @@ "@heroui/framer-utils": "workspace:*", "@heroui/use-safe-layout-effect": "workspace:*", "@heroui/dom-animation": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/interactions": "3.22.5", "@react-aria/overlays": "3.24.0", "@react-aria/tooltip": "3.7.10", diff --git a/packages/components/tooltip/src/tooltip.tsx b/packages/components/tooltip/src/tooltip.tsx index 6d0dff0539..b462c8786c 100644 --- a/packages/components/tooltip/src/tooltip.tsx +++ b/packages/components/tooltip/src/tooltip.tsx @@ -1,6 +1,6 @@ import {forwardRef} from "@heroui/system"; import {OverlayContainer} from "@react-aria/overlays"; -import {AnimatePresence, m, LazyMotion} from "framer-motion"; +import {AnimatePresence, m, LazyMotion} from "@heroui/motion"; import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; import {warn} from "@heroui/shared-utils"; import {Children, cloneElement, isValidElement} from "react"; diff --git a/packages/components/tooltip/src/use-tooltip.ts b/packages/components/tooltip/src/use-tooltip.ts index 18860bdcb7..f12dfa6cf4 100644 --- a/packages/components/tooltip/src/use-tooltip.ts +++ b/packages/components/tooltip/src/use-tooltip.ts @@ -1,7 +1,7 @@ import type {PopoverVariantProps, SlotsToClasses} from "@heroui/theme"; import type {AriaTooltipProps} from "@react-types/tooltip"; import type {OverlayTriggerProps} from "@react-types/overlays"; -import type {HTMLMotionProps} from "framer-motion"; +import type {HTMLMotionProps} from "@heroui/motion"; import type {OverlayOptions} from "@heroui/aria-utils"; import {ReactNode, Ref, useId, useImperativeHandle} from "react"; diff --git a/packages/core/system/src/provider.tsx b/packages/core/system/src/provider.tsx index 6fb385c6da..a94cf6beee 100644 --- a/packages/core/system/src/provider.tsx +++ b/packages/core/system/src/provider.tsx @@ -6,7 +6,7 @@ import {I18nProvider, I18nProviderProps} from "@react-aria/i18n"; import {RouterProvider} from "@react-aria/utils"; import {OverlayProvider} from "@react-aria/overlays"; import {useMemo} from "react"; -import {MotionConfig, MotionGlobalConfig} from "framer-motion"; +import {MotionConfig, MotionGlobalConfig} from "@heroui/motion"; import {ProviderContext} from "./provider-context"; diff --git a/packages/utilities/dom-animation/package.json b/packages/utilities/dom-animation/package.json index b2b25a2454..0733267801 100644 --- a/packages/utilities/dom-animation/package.json +++ b/packages/utilities/dom-animation/package.json @@ -34,7 +34,7 @@ "postpack": "clean-package restore" }, "dependencies": { - "@heroui/shared-utils": "workspace:*" + "@heroui/motion": "workspace:*" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/packages/utilities/dom-animation/src/index.ts b/packages/utilities/dom-animation/src/index.ts index b150f14a9d..f574265ffa 100644 --- a/packages/utilities/dom-animation/src/index.ts +++ b/packages/utilities/dom-animation/src/index.ts @@ -1,3 +1,3 @@ -import {domAnimation} from "framer-motion"; +import {domAnimation} from "@heroui/motion"; export default domAnimation; diff --git a/packages/utilities/framer-utils/package.json b/packages/utilities/framer-utils/package.json index 87683e0b6d..63492929c0 100644 --- a/packages/utilities/framer-utils/package.json +++ b/packages/utilities/framer-utils/package.json @@ -40,7 +40,8 @@ "dependencies": { "@heroui/system": "workspace:*", "@heroui/use-measure": "workspace:*", - "@heroui/shared-utils": "workspace:*" + "@heroui/shared-utils": "workspace:*", + "@heroui/motion": "workspace:*" }, "devDependencies": { "react": "^18.0.0", diff --git a/packages/utilities/framer-utils/src/resizable-panel.tsx b/packages/utilities/framer-utils/src/resizable-panel.tsx index e0004ea1c3..34bb7a312d 100644 --- a/packages/utilities/framer-utils/src/resizable-panel.tsx +++ b/packages/utilities/framer-utils/src/resizable-panel.tsx @@ -1,7 +1,7 @@ import type {Ref} from "react"; import {forwardRef} from "react"; -import {domAnimation, LazyMotion, m} from "framer-motion"; +import {domAnimation, LazyMotion, m} from "@heroui/motion"; import {useMeasure} from "@heroui/use-measure"; import {HTMLHeroUIProps} from "@heroui/system"; diff --git a/packages/utilities/framer-utils/src/transition-utils.ts b/packages/utilities/framer-utils/src/transition-utils.ts index 78a07da9aa..51675aeb5f 100644 --- a/packages/utilities/framer-utils/src/transition-utils.ts +++ b/packages/utilities/framer-utils/src/transition-utils.ts @@ -1,4 +1,4 @@ -import type {Target, TargetAndTransition, Transition} from "framer-motion"; +import type {Target, TargetAndTransition, Transition} from "@heroui/motion"; type WithMotionState

= Partial>; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4970a4fa73..adf7b771d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -295,6 +295,9 @@ importers: '@heroui/listbox': specifier: workspace:* version: link:../../packages/components/listbox + '@heroui/motion': + specifier: workspace:* + version: link:../../packages/external/motion '@heroui/react': specifier: workspace:* version: link:../../packages/core/react @@ -641,6 +644,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -757,6 +763,9 @@ importers: '@heroui/listbox': specifier: workspace:* version: link:../listbox + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/popover': specifier: workspace:* version: link:../popover @@ -1386,6 +1395,9 @@ importers: '@heroui/form': specifier: workspace:* version: link:../form + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/popover': specifier: workspace:* version: link:../popover @@ -2004,6 +2016,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2089,6 +2104,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2220,6 +2238,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2385,6 +2406,9 @@ importers: '@heroui/dom-animation': specifier: workspace:* version: link:../../utilities/dom-animation + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2872,6 +2896,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2954,6 +2981,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -3303,6 +3333,16 @@ importers: specifier: ^3.4.0 version: 3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2)) + packages/external/motion: + dependencies: + framer-motion: + specifier: 11.9.0 + version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + devDependencies: + clean-package: + specifier: 2.2.0 + version: 2.2.0 + packages/hooks/use-aria-accordion: dependencies: '@react-aria/button': @@ -3848,9 +3888,9 @@ importers: packages/utilities/dom-animation: dependencies: - '@heroui/shared-utils': + '@heroui/motion': specifier: workspace:* - version: link:../shared-utils + version: link:../../external/motion devDependencies: clean-package: specifier: 2.2.0 @@ -3858,6 +3898,9 @@ importers: packages/utilities/framer-utils: dependencies: + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/shared-utils': specifier: workspace:* version: link:../shared-utils From f82afbb86baca48a95a9c29769966ede3090a03f Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 20:19:53 +0800 Subject: [PATCH 05/56] chore(shared-utils): undo exports --- packages/utilities/shared-utils/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/utilities/shared-utils/package.json b/packages/utilities/shared-utils/package.json index b6c3621d96..2bea518897 100644 --- a/packages/utilities/shared-utils/package.json +++ b/packages/utilities/shared-utils/package.json @@ -13,10 +13,6 @@ "files": [ "dist" ], - "exports": { - ".": "./dist/index.js", - "./framer-motion": "./dist/framer-motion/index.js" - }, "publishConfig": { "access": "public" }, From b213f13427e80ec3c2bc3d6baa18f96b74c055f5 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 20:30:24 +0800 Subject: [PATCH 06/56] feat(react-aria-i18n): init package --- packages/external/react-aria-i18n/README.md | 22 ++++++++ .../external/react-aria-i18n/package.json | 53 +++++++++++++++++++ .../external/react-aria-i18n/src/index.ts | 1 + .../external/react-aria-i18n/tsconfig.json | 10 ++++ 4 files changed, 86 insertions(+) create mode 100644 packages/external/react-aria-i18n/README.md create mode 100644 packages/external/react-aria-i18n/package.json create mode 100644 packages/external/react-aria-i18n/src/index.ts create mode 100644 packages/external/react-aria-i18n/tsconfig.json diff --git a/packages/external/react-aria-i18n/README.md b/packages/external/react-aria-i18n/README.md new file mode 100644 index 0000000000..2af591ca2a --- /dev/null +++ b/packages/external/react-aria-i18n/README.md @@ -0,0 +1,22 @@ +# @heroui/react-aria-i18n + +Mirror package of `@react-aria/i18n` + +## Installation + +```sh +yarn add @heroui/react-aria-i18n +# or +npm i @heroui/react-aria-i18n +``` + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md) +for details. + +## License + +This project is licensed under the terms of the +[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE). diff --git a/packages/external/react-aria-i18n/package.json b/packages/external/react-aria-i18n/package.json new file mode 100644 index 0000000000..35f3cff8bc --- /dev/null +++ b/packages/external/react-aria-i18n/package.json @@ -0,0 +1,53 @@ +{ + "name": "@heroui/react-aria-i18n", + "version": "2.0.0", + "description": "Mirror package of framer-motion", + "keywords": [ + "hero ui", + "react-aria", + "i18n" + ], + "author": "WK Wong ", + "homepage": "https://heroui.com", + "license": "MIT", + "main": "src/index.ts", + "sideEffects": false, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/heroui-inc/heroui.git", + "directory": "packages/core/system" + }, + "bugs": { + "url": "https://github.com/heroui-inc/heroui/issues" + }, + "scripts": { + "build": "tsup src --dts", + "dev": "pnpm build:fast --watch", + "clean": "rimraf dist .turbo", + "typecheck": "tsc --noEmit", + "build:fast": "tsup src", + "prepack": "clean-package", + "postpack": "clean-package restore" + }, + "dependencies": { + "@react-aria/i18n": "3.12.5" + }, + "devDependencies": { + "clean-package": "2.2.0" + }, + "clean-package": "../../../clean-package.config.json", + "tsup": { + "clean": true, + "target": "es2019", + "format": [ + "cjs", + "esm" + ] + } +} \ No newline at end of file diff --git a/packages/external/react-aria-i18n/src/index.ts b/packages/external/react-aria-i18n/src/index.ts new file mode 100644 index 0000000000..601a619582 --- /dev/null +++ b/packages/external/react-aria-i18n/src/index.ts @@ -0,0 +1 @@ +export * from "@react-aria/i18n"; diff --git a/packages/external/react-aria-i18n/tsconfig.json b/packages/external/react-aria-i18n/tsconfig.json new file mode 100644 index 0000000000..bfa97def60 --- /dev/null +++ b/packages/external/react-aria-i18n/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.json", + "include": [ + "src", + "index.ts", + "../react-utils/src/context.ts", + "../react-utils/src/children.ts", + "../react-utils/src/refs.ts" + ] +} From 1a71e7f6f612f6adf79d5f11317bef6455f9ae36 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 20:34:27 +0800 Subject: [PATCH 07/56] refactor: migrate `@react-aria/i18n` to `@heroui/react-aria-i18n` --- .../autocomplete/fully-controlled/page.tsx | 2 +- apps/docs/app/examples/perf/client-page.tsx | 2 +- .../components/code-demo/react-live-demo.tsx | 2 +- .../autocomplete/fully-controlled.raw.jsx | 2 +- .../autocomplete/fully-controlled.raw.tsx | 2 +- .../calendar/international-calendars.raw.jsx | 2 +- .../components/calendar/invalid-date.raw.jsx | 2 +- .../components/calendar/invalid-date.raw.tsx | 2 +- .../components/calendar/presets.raw.jsx | 2 +- .../components/calendar/presets.raw.tsx | 2 +- .../calendar/unavailable-dates.raw.jsx | 2 +- .../components/date-input/controlled.raw.jsx | 2 +- .../components/date-input/controlled.raw.tsx | 2 +- .../date-input/international-calendar.raw.jsx | 2 +- .../date-input/international-calendar.raw.tsx | 2 +- .../components/date-picker/controlled.raw.jsx | 2 +- .../components/date-picker/controlled.raw.tsx | 2 +- .../international-calendar.raw.jsx | 2 +- .../international-calendar.raw.tsx | 2 +- .../components/date-picker/preset.raw.jsx | 2 +- .../components/date-picker/preset.raw.tsx | 2 +- .../date-picker/unavailable-dates.raw.jsx | 2 +- .../date-range-picker/controlled.raw.jsx | 2 +- .../date-range-picker/controlled.raw.tsx | 2 +- .../international-calendar.raw.jsx | 2 +- .../international-calendar.raw.tsx | 2 +- .../date-range-picker/non-contiguous.raw.jsx | 2 +- .../date-range-picker/presets.raw.jsx | 2 +- .../international-calendars.raw.jsx | 2 +- .../range-calendar/invalid-date.raw.jsx | 2 +- .../range-calendar/invalid-date.raw.tsx | 2 +- .../non-contiguous-ranges.raw.jsx | 2 +- .../components/range-calendar/presets.raw.jsx | 2 +- .../components/range-calendar/presets.raw.tsx | 2 +- .../range-calendar/unavailable-dates.raw.jsx | 2 +- .../components/time-input/controlled.raw.jsx | 2 +- .../components/time-input/controlled.raw.tsx | 2 +- .../content/docs/components/autocomplete.mdx | 2 +- .../content/docs/components/date-input.mdx | 4 +- .../content/docs/components/date-picker.mdx | 8 +- .../docs/components/date-range-picker.mdx | 10 +- apps/docs/package.json | 2 +- packages/components/autocomplete/package.json | 2 +- .../autocomplete/src/use-autocomplete.ts | 2 +- .../stories/autocomplete.stories.tsx | 2 +- .../calendar/__tests__/calendar.test.tsx | 2 +- packages/components/calendar/package.json | 3 +- .../components/calendar/src/calendar-cell.tsx | 2 +- .../calendar/src/calendar-header.tsx | 2 +- .../calendar/src/calendar-month.tsx | 2 +- .../calendar/src/use-calendar-base.ts | 2 +- .../calendar/src/use-calendar-picker.ts | 2 +- .../calendar/stories/calendar.stories.tsx | 2 +- .../stories/range-calendar.stories.tsx | 2 +- packages/components/date-input/package.json | 2 +- .../date-input/src/use-date-input.ts | 2 +- .../date-input/src/use-time-input.ts | 2 +- .../date-input/stories/date-input.stories.tsx | 2 +- .../date-input/stories/time-input.stories.tsx | 2 +- packages/components/date-picker/package.json | 2 +- .../src/date-range-picker-field.tsx | 2 +- .../date-picker/src/use-date-picker-base.ts | 2 +- .../stories/date-picker.stories.tsx | 2 +- .../stories/date-range-picker.stories.tsx | 2 +- packages/components/pagination/package.json | 2 +- .../components/pagination/src/pagination.tsx | 2 +- .../pagination/src/use-pagination.ts | 2 +- packages/components/progress/package.json | 2 +- packages/components/select/package.json | 2 +- packages/components/slider/package.json | 2 +- .../components/slider/src/use-slider-thumb.ts | 2 +- packages/components/slider/src/use-slider.ts | 2 +- packages/core/system/package.json | 3 +- packages/core/system/src/provider.tsx | 6 +- .../hooks/use-aria-multiselect/package.json | 2 +- .../src/use-multiselect.ts | 2 +- packages/hooks/use-pagination/package.json | 2 +- packages/hooks/use-pagination/src/index.ts | 2 +- packages/utilities/shared-utils/package.json | 4 +- .../utilities/shared-utils/src/packages.ts | 26 ------ pnpm-lock.yaml | 91 ++++++++++--------- 81 files changed, 140 insertions(+), 159 deletions(-) diff --git a/apps/docs/app/examples/autocomplete/fully-controlled/page.tsx b/apps/docs/app/examples/autocomplete/fully-controlled/page.tsx index 1864576860..02afca7aae 100644 --- a/apps/docs/app/examples/autocomplete/fully-controlled/page.tsx +++ b/apps/docs/app/examples/autocomplete/fully-controlled/page.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import {Autocomplete, AutocompleteItem, MenuTriggerAction} from "@heroui/react"; -import {useFilter} from "@react-aria/i18n"; +import {useFilter} from "@heroui/react-aria-i18n"; const animals = [ {label: "Cat", value: "cat", description: "The second most popular pet in the world"}, diff --git a/apps/docs/app/examples/perf/client-page.tsx b/apps/docs/app/examples/perf/client-page.tsx index 4e3e27c629..35d563e30e 100644 --- a/apps/docs/app/examples/perf/client-page.tsx +++ b/apps/docs/app/examples/perf/client-page.tsx @@ -17,7 +17,7 @@ import { extendVariants, PaginationItem, } from "@heroui/react"; -import {useFilter} from "@react-aria/i18n"; +import {useFilter} from "@heroui/react-aria-i18n"; import {useEffect, useMemo, useRef, useState} from "react"; import {useSearchParams} from "next/navigation"; diff --git a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx index a6e3675d24..fa84206105 100644 --- a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx +++ b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx @@ -3,7 +3,7 @@ import {LivePreview, LiveProvider, LiveError} from "react-live"; import {clsx} from "@heroui/shared-utils"; import * as HeroUI from "@heroui/react"; import * as intlDateUtils from "@heroui/shared-utils"; -import * as reactAriaI18n from "@react-aria/i18n"; +import * as reactAriaI18n from "@heroui/react-aria-i18n"; import * as reactHookFormBase from "react-hook-form"; import {SandpackFiles} from "@codesandbox/sandpack-react/types"; diff --git a/apps/docs/content/components/autocomplete/fully-controlled.raw.jsx b/apps/docs/content/components/autocomplete/fully-controlled.raw.jsx index 7a0736fa97..b3b4e4b07a 100644 --- a/apps/docs/content/components/autocomplete/fully-controlled.raw.jsx +++ b/apps/docs/content/components/autocomplete/fully-controlled.raw.jsx @@ -1,5 +1,5 @@ import {Autocomplete, AutocompleteItem} from "@heroui/react"; -import {useFilter} from "@react-aria/i18n"; +import {useFilter} from "@heroui/react-aria-i18n"; export const animals = [ {label: "Cat", key: "cat", description: "The second most popular pet in the world"}, diff --git a/apps/docs/content/components/autocomplete/fully-controlled.raw.tsx b/apps/docs/content/components/autocomplete/fully-controlled.raw.tsx index 6c1f9cb1e3..a9153e42aa 100644 --- a/apps/docs/content/components/autocomplete/fully-controlled.raw.tsx +++ b/apps/docs/content/components/autocomplete/fully-controlled.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {Autocomplete, AutocompleteItem, MenuTriggerAction} from "@heroui/react"; -import {useFilter} from "@react-aria/i18n"; +import {useFilter} from "@heroui/react-aria-i18n"; export type FieldState = { selectedKey: React.Key | null; diff --git a/apps/docs/content/components/calendar/international-calendars.raw.jsx b/apps/docs/content/components/calendar/international-calendars.raw.jsx index bf9c1c1690..58d61eb915 100644 --- a/apps/docs/content/components/calendar/international-calendars.raw.jsx +++ b/apps/docs/content/components/calendar/international-calendars.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { return ( diff --git a/apps/docs/content/components/calendar/invalid-date.raw.jsx b/apps/docs/content/components/calendar/invalid-date.raw.jsx index 8203153a88..f5f53949b6 100644 --- a/apps/docs/content/components/calendar/invalid-date.raw.jsx +++ b/apps/docs/content/components/calendar/invalid-date.raw.jsx @@ -1,6 +1,6 @@ import {Calendar} from "@heroui/react"; import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState(today(getLocalTimeZone())); diff --git a/apps/docs/content/components/calendar/invalid-date.raw.tsx b/apps/docs/content/components/calendar/invalid-date.raw.tsx index d3917e7408..de47508182 100644 --- a/apps/docs/content/components/calendar/invalid-date.raw.tsx +++ b/apps/docs/content/components/calendar/invalid-date.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar} from "@heroui/react"; import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState(today(getLocalTimeZone())); diff --git a/apps/docs/content/components/calendar/presets.raw.jsx b/apps/docs/content/components/calendar/presets.raw.jsx index 2bc427f16b..02d4997460 100644 --- a/apps/docs/content/components/calendar/presets.raw.jsx +++ b/apps/docs/content/components/calendar/presets.raw.jsx @@ -1,6 +1,6 @@ import {Calendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/calendar/presets.raw.tsx b/apps/docs/content/components/calendar/presets.raw.tsx index dc50fa54d6..2df1904c16 100644 --- a/apps/docs/content/components/calendar/presets.raw.tsx +++ b/apps/docs/content/components/calendar/presets.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/calendar/unavailable-dates.raw.jsx b/apps/docs/content/components/calendar/unavailable-dates.raw.jsx index ce26842fd2..ee36b9f187 100644 --- a/apps/docs/content/components/calendar/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/calendar/unavailable-dates.raw.jsx @@ -1,6 +1,6 @@ import {Calendar} from "@heroui/react"; import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let now = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/date-input/controlled.raw.jsx b/apps/docs/content/components/date-input/controlled.raw.jsx index 4a4a58de62..51753f78b3 100644 --- a/apps/docs/content/components/date-input/controlled.raw.jsx +++ b/apps/docs/content/components/date-input/controlled.raw.jsx @@ -1,6 +1,6 @@ import {DateInput} from "@heroui/react"; import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { const [value, setValue] = React.useState(parseDate("2024-04-04")); diff --git a/apps/docs/content/components/date-input/controlled.raw.tsx b/apps/docs/content/components/date-input/controlled.raw.tsx index e3cfc37c29..d72a6ebc46 100644 --- a/apps/docs/content/components/date-input/controlled.raw.tsx +++ b/apps/docs/content/components/date-input/controlled.raw.tsx @@ -1,7 +1,7 @@ import React from "react"; import {DateInput} from "@heroui/react"; import {DateValue, parseDate, getLocalTimeZone} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { const [value, setValue] = React.useState(parseDate("2024-04-04")); diff --git a/apps/docs/content/components/date-input/international-calendar.raw.jsx b/apps/docs/content/components/date-input/international-calendar.raw.jsx index daca3c80bb..1faddd7c03 100644 --- a/apps/docs/content/components/date-input/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-input/international-calendar.raw.jsx @@ -1,6 +1,6 @@ import {DateInput} from "@heroui/react"; import {parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { const [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-input/international-calendar.raw.tsx b/apps/docs/content/components/date-input/international-calendar.raw.tsx index 42085dc154..837491685e 100644 --- a/apps/docs/content/components/date-input/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-input/international-calendar.raw.tsx @@ -1,7 +1,7 @@ import React from "react"; import {DateInput} from "@heroui/react"; import {DateValue, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { const [date, setDate] = React.useState( diff --git a/apps/docs/content/components/date-picker/controlled.raw.jsx b/apps/docs/content/components/date-picker/controlled.raw.jsx index 5054013d08..bfa7382d47 100644 --- a/apps/docs/content/components/date-picker/controlled.raw.jsx +++ b/apps/docs/content/components/date-picker/controlled.raw.jsx @@ -1,6 +1,6 @@ import {DatePicker} from "@heroui/react"; import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { const [value, setValue] = React.useState(parseDate("2024-04-04")); diff --git a/apps/docs/content/components/date-picker/controlled.raw.tsx b/apps/docs/content/components/date-picker/controlled.raw.tsx index 05b2f100f8..3294dbf627 100644 --- a/apps/docs/content/components/date-picker/controlled.raw.tsx +++ b/apps/docs/content/components/date-picker/controlled.raw.tsx @@ -1,7 +1,7 @@ import React from "react"; import {DatePicker} from "@heroui/react"; import {DateValue, parseDate, getLocalTimeZone} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { const [value, setValue] = React.useState(parseDate("2024-04-04")); diff --git a/apps/docs/content/components/date-picker/international-calendar.raw.jsx b/apps/docs/content/components/date-picker/international-calendar.raw.jsx index 66362696c9..e99e8d2a54 100644 --- a/apps/docs/content/components/date-picker/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-picker/international-calendar.raw.jsx @@ -1,6 +1,6 @@ import {DatePicker} from "@heroui/react"; import {parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-picker/international-calendar.raw.tsx b/apps/docs/content/components/date-picker/international-calendar.raw.tsx index 47d6ebdb0a..c9588accaa 100644 --- a/apps/docs/content/components/date-picker/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-picker/international-calendar.raw.tsx @@ -1,7 +1,7 @@ import React from "react"; import {DatePicker} from "@heroui/react"; import {DateValue, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState( diff --git a/apps/docs/content/components/date-picker/preset.raw.jsx b/apps/docs/content/components/date-picker/preset.raw.jsx index 7d05120bf8..82e9eb13ac 100644 --- a/apps/docs/content/components/date-picker/preset.raw.jsx +++ b/apps/docs/content/components/date-picker/preset.raw.jsx @@ -1,6 +1,6 @@ import {DatePicker, RadioGroup, Radio, ButtonGroup, Button, cn} from "@heroui/react"; import {startOfWeek, startOfMonth, getLocalTimeZone, today} from "@heroui/shared-utils"; -import {useLocale, useDateFormatter} from "@react-aria/i18n"; +import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/date-picker/preset.raw.tsx b/apps/docs/content/components/date-picker/preset.raw.tsx index dca189bedc..830274f0e5 100644 --- a/apps/docs/content/components/date-picker/preset.raw.tsx +++ b/apps/docs/content/components/date-picker/preset.raw.tsx @@ -1,7 +1,7 @@ import React from "react"; import {DatePicker, RadioGroup, Radio, ButtonGroup, Button, cn} from "@heroui/react"; import {DateValue, startOfWeek, startOfMonth, getLocalTimeZone, today} from "@heroui/shared-utils"; -import {useLocale, useDateFormatter} from "@react-aria/i18n"; +import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx b/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx index 10d41c4959..6c090ed401 100644 --- a/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx @@ -1,6 +1,6 @@ import {DatePicker} from "@heroui/react"; import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let now = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/date-range-picker/controlled.raw.jsx b/apps/docs/content/components/date-range-picker/controlled.raw.jsx index 3bdee1fa53..a1bd7450ea 100644 --- a/apps/docs/content/components/date-range-picker/controlled.raw.jsx +++ b/apps/docs/content/components/date-range-picker/controlled.raw.jsx @@ -1,6 +1,6 @@ import {DateRangePicker} from "@heroui/react"; import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { const [value, setValue] = React.useState({ diff --git a/apps/docs/content/components/date-range-picker/controlled.raw.tsx b/apps/docs/content/components/date-range-picker/controlled.raw.tsx index eff5fcf9d4..b721fb03cb 100644 --- a/apps/docs/content/components/date-range-picker/controlled.raw.tsx +++ b/apps/docs/content/components/date-range-picker/controlled.raw.tsx @@ -4,7 +4,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { const [value, setValue] = React.useState | null>({ diff --git a/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx b/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx index d15a21e20f..9501209d07 100644 --- a/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx @@ -1,6 +1,6 @@ import {DateRangePicker} from "@heroui/react"; import {parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState({ diff --git a/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx b/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx index b25b52d7fd..50e199c58e 100644 --- a/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx @@ -4,7 +4,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; import {parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState | null>({ diff --git a/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx b/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx index 0fefb4f6bc..0d4888d052 100644 --- a/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx +++ b/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx @@ -1,6 +1,6 @@ import {DateRangePicker} from "@heroui/react"; import {isWeekend, today, getLocalTimeZone} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let {locale} = useLocale(); diff --git a/apps/docs/content/components/date-range-picker/presets.raw.jsx b/apps/docs/content/components/date-range-picker/presets.raw.jsx index f73f59315f..76b1b2c56f 100644 --- a/apps/docs/content/components/date-range-picker/presets.raw.jsx +++ b/apps/docs/content/components/date-range-picker/presets.raw.jsx @@ -7,7 +7,7 @@ import { endOfMonth, getLocalTimeZone, } from "@heroui/shared-utils"; -import {useLocale, useDateFormatter} from "@react-aria/i18n"; +import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { let defaultDate = { diff --git a/apps/docs/content/components/range-calendar/international-calendars.raw.jsx b/apps/docs/content/components/range-calendar/international-calendars.raw.jsx index 770495917b..81c0169038 100644 --- a/apps/docs/content/components/range-calendar/international-calendars.raw.jsx +++ b/apps/docs/content/components/range-calendar/international-calendars.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { return ( diff --git a/apps/docs/content/components/range-calendar/invalid-date.raw.jsx b/apps/docs/content/components/range-calendar/invalid-date.raw.jsx index 7c900b8eb1..31f0c15ea5 100644 --- a/apps/docs/content/components/range-calendar/invalid-date.raw.jsx +++ b/apps/docs/content/components/range-calendar/invalid-date.raw.jsx @@ -1,6 +1,6 @@ import {RangeCalendar} from "@heroui/react"; import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState({ diff --git a/apps/docs/content/components/range-calendar/invalid-date.raw.tsx b/apps/docs/content/components/range-calendar/invalid-date.raw.tsx index 1e4c6a17fb..de16da631f 100644 --- a/apps/docs/content/components/range-calendar/invalid-date.raw.tsx +++ b/apps/docs/content/components/range-calendar/invalid-date.raw.tsx @@ -4,7 +4,7 @@ import type {RangeValue} from "@react-types/shared"; import React from "react"; import {RangeCalendar} from "@heroui/react"; import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let [date, setDate] = React.useState | null>({ diff --git a/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx b/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx index 9ffe36ac27..fde565efc4 100644 --- a/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx +++ b/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx @@ -1,6 +1,6 @@ import {RangeCalendar} from "@heroui/react"; import {isWeekend} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let {locale} = useLocale(); diff --git a/apps/docs/content/components/range-calendar/presets.raw.jsx b/apps/docs/content/components/range-calendar/presets.raw.jsx index 91b15e8685..8b7398e4bc 100644 --- a/apps/docs/content/components/range-calendar/presets.raw.jsx +++ b/apps/docs/content/components/range-calendar/presets.raw.jsx @@ -1,6 +1,6 @@ import {RangeCalendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let [value, setValue] = React.useState({ diff --git a/apps/docs/content/components/range-calendar/presets.raw.tsx b/apps/docs/content/components/range-calendar/presets.raw.tsx index cf98233fb2..122029efb5 100644 --- a/apps/docs/content/components/range-calendar/presets.raw.tsx +++ b/apps/docs/content/components/range-calendar/presets.raw.tsx @@ -11,7 +11,7 @@ import { startOfMonth, endOfMonth, } from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let [value, setValue] = React.useState | null>({ diff --git a/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx b/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx index f2cc26b9db..9f083eb2ac 100644 --- a/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx @@ -1,6 +1,6 @@ import {RangeCalendar} from "@heroui/react"; import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { let now = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/time-input/controlled.raw.jsx b/apps/docs/content/components/time-input/controlled.raw.jsx index 72f13a94ef..8490c12446 100644 --- a/apps/docs/content/components/time-input/controlled.raw.jsx +++ b/apps/docs/content/components/time-input/controlled.raw.jsx @@ -1,6 +1,6 @@ import {TimeInput} from "@heroui/react"; import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { let [value, setValue] = React.useState(parseAbsoluteToLocal("2024-04-08T18:45:22Z")); diff --git a/apps/docs/content/components/time-input/controlled.raw.tsx b/apps/docs/content/components/time-input/controlled.raw.tsx index 31f628f42f..fd95248274 100644 --- a/apps/docs/content/components/time-input/controlled.raw.tsx +++ b/apps/docs/content/components/time-input/controlled.raw.tsx @@ -3,7 +3,7 @@ import type {TimeInputValue} from "@heroui/react"; import React from "react"; import {TimeInput} from "@heroui/react"; import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { let [value, setValue] = React.useState( diff --git a/apps/docs/content/docs/components/autocomplete.mdx b/apps/docs/content/docs/components/autocomplete.mdx index d98fd71bcd..3834ad2394 100644 --- a/apps/docs/content/docs/components/autocomplete.mdx +++ b/apps/docs/content/docs/components/autocomplete.mdx @@ -212,7 +212,7 @@ We recommend using the `useFilter` hook from [@react-aria/i18n](https://react-sp /> ```jsx -import {useFilter} from "@react-aria/i18n"; +import {useFilter} from "@heroui/react-aria-i18n"; ``` diff --git a/apps/docs/content/docs/components/date-input.mdx b/apps/docs/content/docs/components/date-input.mdx index e58b606216..d1a29e5268 100644 --- a/apps/docs/content/docs/components/date-input.mdx +++ b/apps/docs/content/docs/components/date-input.mdx @@ -137,7 +137,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; ``` @@ -185,7 +185,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; ``` diff --git a/apps/docs/content/docs/components/date-picker.mdx b/apps/docs/content/docs/components/date-picker.mdx index f1e8f5adbe..b4d276d457 100644 --- a/apps/docs/content/docs/components/date-picker.mdx +++ b/apps/docs/content/docs/components/date-picker.mdx @@ -152,7 +152,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; ``` @@ -200,7 +200,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; ``` @@ -222,7 +222,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; ``` @@ -262,7 +262,7 @@ import { useDateFormatter, getLocalTimeZone, } from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; ``` diff --git a/apps/docs/content/docs/components/date-range-picker.mdx b/apps/docs/content/docs/components/date-range-picker.mdx index c398223fd0..235b616c5e 100644 --- a/apps/docs/content/docs/components/date-range-picker.mdx +++ b/apps/docs/content/docs/components/date-range-picker.mdx @@ -169,7 +169,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; ``` @@ -217,7 +217,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; -import {I18nProvider} from "@react-aria/i18n"; +import {I18nProvider} from "@heroui/react-aria-i18n"; ``` @@ -239,7 +239,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; ``` @@ -264,7 +264,7 @@ in multiple formats into `ZonedDateTime` objects. ```jsx import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; ``` @@ -290,7 +290,7 @@ import { startOfMonth, getLocalTimeZone, } from "@heroui/shared-utils"; -import {useLocale, useDateFormatter} from "@react-aria/i18n"; +import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; ``` diff --git a/apps/docs/package.json b/apps/docs/package.json index e278cd12d0..68402032d0 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -36,13 +36,13 @@ "@heroui/use-infinite-scroll": "workspace:*", "@heroui/use-is-mobile": "workspace:*", "@heroui/motion": "workspace:*", + "@heroui/react-aria-i18n": "workspace:*", "@iconify/icons-solar": "1.2.3", "@iconify/react": "5.0.2", "@internationalized/date": "3.6.0", "@mapbox/rehype-prism": "^0.6.0", "@radix-ui/react-scroll-area": "^1.0.5", "@react-aria/focus": "3.19.0", - "@react-aria/i18n": "3.12.4", "@react-aria/interactions": "3.22.5", "@react-aria/selection": "3.21.0", "@react-aria/ssr": "3.9.7", diff --git a/packages/components/autocomplete/package.json b/packages/components/autocomplete/package.json index 3b6d8440b6..28e097ad83 100644 --- a/packages/components/autocomplete/package.json +++ b/packages/components/autocomplete/package.json @@ -56,7 +56,7 @@ "@heroui/motion": "workspace:*", "@react-aria/combobox": "3.11.0", "@react-aria/focus": "3.19.0", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/interactions": "3.22.5", "@react-aria/utils": "3.26.0", "@react-aria/visually-hidden": "3.8.18", diff --git a/packages/components/autocomplete/src/use-autocomplete.ts b/packages/components/autocomplete/src/use-autocomplete.ts index d014f18d51..528c41792a 100644 --- a/packages/components/autocomplete/src/use-autocomplete.ts +++ b/packages/components/autocomplete/src/use-autocomplete.ts @@ -4,7 +4,7 @@ import type {DOMAttributes, HTMLHeroUIProps, PropGetter} from "@heroui/system"; import {mapPropsVariants, useProviderContext} from "@heroui/system"; import {useSafeLayoutEffect} from "@heroui/use-safe-layout-effect"; import {autocomplete} from "@heroui/theme"; -import {useFilter} from "@react-aria/i18n"; +import {useFilter} from "@heroui/react-aria-i18n"; import {FilterFn, useComboBoxState} from "@react-stately/combobox"; import {ReactRef, useDOMRef} from "@heroui/react-utils"; import {ReactNode, useEffect, useMemo, useRef} from "react"; diff --git a/packages/components/autocomplete/stories/autocomplete.stories.tsx b/packages/components/autocomplete/stories/autocomplete.stories.tsx index ae11e2bfe4..2b1277930b 100644 --- a/packages/components/autocomplete/stories/autocomplete.stories.tsx +++ b/packages/components/autocomplete/stories/autocomplete.stories.tsx @@ -3,7 +3,7 @@ import type {ValidationResult} from "@react-types/shared"; import React, {Key} from "react"; import {Meta} from "@storybook/react"; import {useForm} from "react-hook-form"; -import {useFilter} from "@react-aria/i18n"; +import {useFilter} from "@heroui/react-aria-i18n"; import {autocomplete, input, button} from "@heroui/theme"; import {Pokemon, usePokemonList, animalsData, usersData, Animal, User} from "@heroui/stories-utils"; import {useAsyncList} from "@react-stately/data"; diff --git a/packages/components/calendar/__tests__/calendar.test.tsx b/packages/components/calendar/__tests__/calendar.test.tsx index de9014ba96..72c36fbf75 100644 --- a/packages/components/calendar/__tests__/calendar.test.tsx +++ b/packages/components/calendar/__tests__/calendar.test.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import {render, act, fireEvent} from "@testing-library/react"; import {CalendarDate, isWeekend} from "@heroui/shared-utils"; import {triggerPress, keyCodes} from "@heroui/test-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {HeroUIProvider} from "@heroui/system"; import {Calendar as CalendarBase, CalendarProps} from "../src"; diff --git a/packages/components/calendar/package.json b/packages/components/calendar/package.json index 51a0ed12ce..9211a38309 100644 --- a/packages/components/calendar/package.json +++ b/packages/components/calendar/package.json @@ -47,9 +47,10 @@ "@heroui/use-aria-button": "workspace:*", "@heroui/button": "workspace:*", "@heroui/dom-animation": "workspace:*", + "@heroui/react-aria-i18n": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/calendar": "3.6.0", "@react-aria/focus": "3.19.0", - "@react-aria/i18n": "3.12.4", "@react-stately/calendar": "3.6.0", "@react-types/button": "3.10.1", "@react-aria/visually-hidden": "3.8.18", diff --git a/packages/components/calendar/src/calendar-cell.tsx b/packages/components/calendar/src/calendar-cell.tsx index bcfa218d57..ec9e728039 100644 --- a/packages/components/calendar/src/calendar-cell.tsx +++ b/packages/components/calendar/src/calendar-cell.tsx @@ -5,7 +5,7 @@ import {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from "@hero import {AriaCalendarCellProps, useCalendarCell} from "@react-aria/calendar"; import {HTMLHeroUIProps} from "@heroui/system"; import {mergeProps} from "@react-aria/utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {useFocusRing} from "@react-aria/focus"; import {useHover} from "@react-aria/interactions"; import {useRef} from "react"; diff --git a/packages/components/calendar/src/calendar-header.tsx b/packages/components/calendar/src/calendar-header.tsx index bfbce1bccf..fc3d8a63ef 100644 --- a/packages/components/calendar/src/calendar-header.tsx +++ b/packages/components/calendar/src/calendar-header.tsx @@ -2,7 +2,7 @@ import type {ButtonProps} from "@heroui/button"; import type {CalendarDate} from "@heroui/shared-utils"; import {HTMLHeroUIProps} from "@heroui/system"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; import {m} from "@heroui/motion"; import {Button} from "@heroui/button"; import {useCallback} from "react"; diff --git a/packages/components/calendar/src/calendar-month.tsx b/packages/components/calendar/src/calendar-month.tsx index aa163226c2..13f7b9f806 100644 --- a/packages/components/calendar/src/calendar-month.tsx +++ b/packages/components/calendar/src/calendar-month.tsx @@ -1,7 +1,7 @@ import {CalendarDate, endOfMonth, getWeeksInMonth} from "@heroui/shared-utils"; import {CalendarPropsBase} from "@react-types/calendar"; import {HTMLHeroUIProps} from "@heroui/system"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {useCalendarGrid} from "@react-aria/calendar"; import {m} from "@heroui/motion"; import {dataAttr, getInertValue} from "@heroui/shared-utils"; diff --git a/packages/components/calendar/src/use-calendar-base.ts b/packages/components/calendar/src/use-calendar-base.ts index 21705dcd66..3ee931cf61 100644 --- a/packages/components/calendar/src/use-calendar-base.ts +++ b/packages/components/calendar/src/use-calendar-base.ts @@ -15,7 +15,7 @@ import {useCallback, useMemo} from "react"; import {calendar} from "@heroui/theme"; import {useControlledState} from "@react-stately/utils"; import {ReactRef, useDOMRef} from "@heroui/react-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {clamp, dataAttr, objectToDeps, getGregorianYearOffset} from "@heroui/shared-utils"; import {mergeProps} from "@react-aria/utils"; diff --git a/packages/components/calendar/src/use-calendar-picker.ts b/packages/components/calendar/src/use-calendar-picker.ts index 9a33d5f93c..5103d342d2 100644 --- a/packages/components/calendar/src/use-calendar-picker.ts +++ b/packages/components/calendar/src/use-calendar-picker.ts @@ -1,7 +1,7 @@ import type {CalendarDate} from "@heroui/shared-utils"; import type {PressEvent} from "@react-types/shared"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; import {HTMLHeroUIProps} from "@heroui/system"; import {useCallback, useRef, useEffect} from "react"; import {debounce} from "@heroui/shared-utils"; diff --git a/packages/components/calendar/stories/calendar.stories.tsx b/packages/components/calendar/stories/calendar.stories.tsx index 0db5fd7d89..2f7a6200bc 100644 --- a/packages/components/calendar/stories/calendar.stories.tsx +++ b/packages/components/calendar/stories/calendar.stories.tsx @@ -9,7 +9,7 @@ import { startOfWeek, startOfMonth, } from "@heroui/shared-utils"; -import {I18nProvider, useLocale} from "@react-aria/i18n"; +import {I18nProvider, useLocale} from "@heroui/react-aria-i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup} from "@heroui/radio"; import {cn} from "@heroui/theme"; diff --git a/packages/components/calendar/stories/range-calendar.stories.tsx b/packages/components/calendar/stories/range-calendar.stories.tsx index 480477cc7a..50e888240d 100644 --- a/packages/components/calendar/stories/range-calendar.stories.tsx +++ b/packages/components/calendar/stories/range-calendar.stories.tsx @@ -13,7 +13,7 @@ import { endOfMonth, endOfWeek, } from "@heroui/shared-utils"; -import {I18nProvider, useLocale} from "@react-aria/i18n"; +import {I18nProvider, useLocale} from "@heroui/react-aria-i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup} from "@heroui/radio"; import {cn} from "@heroui/theme"; diff --git a/packages/components/date-input/package.json b/packages/components/date-input/package.json index 4711119de2..dac93e810c 100644 --- a/packages/components/date-input/package.json +++ b/packages/components/date-input/package.json @@ -44,7 +44,7 @@ "@heroui/react-utils": "workspace:*", "@heroui/shared-utils": "workspace:*", "@react-aria/datepicker": "3.12.0", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-stately/datepicker": "3.11.0", "@react-types/datepicker": "3.9.0", "@react-types/shared": "3.26.0", diff --git a/packages/components/date-input/src/use-date-input.ts b/packages/components/date-input/src/use-date-input.ts index eaac6be0c2..27a1b10d5f 100644 --- a/packages/components/date-input/src/use-date-input.ts +++ b/packages/components/date-input/src/use-date-input.ts @@ -7,7 +7,7 @@ import type {ReactRef} from "@heroui/react-utils"; import type {DOMAttributes, GroupDOMAttributes} from "@react-types/shared"; import type {DateInputGroupProps} from "./date-input-group"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {mergeProps} from "@react-aria/utils"; import {PropGetter, useProviderContext} from "@heroui/system"; import {HTMLHeroUIProps, mapPropsVariants} from "@heroui/system"; diff --git a/packages/components/date-input/src/use-time-input.ts b/packages/components/date-input/src/use-time-input.ts index d3ac3c59f8..2df5d43cc2 100644 --- a/packages/components/date-input/src/use-time-input.ts +++ b/packages/components/date-input/src/use-time-input.ts @@ -4,7 +4,7 @@ import type {ReactRef} from "@heroui/react-utils"; import type {DOMAttributes, GroupDOMAttributes} from "@react-types/shared"; import type {DateInputGroupProps} from "./date-input-group"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {mergeProps} from "@react-aria/utils"; import {PropGetter, useProviderContext} from "@heroui/system"; import {HTMLHeroUIProps, mapPropsVariants} from "@heroui/system"; diff --git a/packages/components/date-input/stories/date-input.stories.tsx b/packages/components/date-input/stories/date-input.stories.tsx index 27c93b3be0..9899d69bc5 100644 --- a/packages/components/date-input/stories/date-input.stories.tsx +++ b/packages/components/date-input/stories/date-input.stories.tsx @@ -12,7 +12,7 @@ import { today, } from "@heroui/shared-utils"; import {CalendarBoldIcon} from "@heroui/shared-icons"; -import {useDateFormatter, I18nProvider} from "@react-aria/i18n"; +import {useDateFormatter, I18nProvider} from "@heroui/react-aria-i18n"; import {ValidationResult} from "@react-types/shared"; import {DateInput, DateInputProps} from "../src"; diff --git a/packages/components/date-input/stories/time-input.stories.tsx b/packages/components/date-input/stories/time-input.stories.tsx index d3939abe7e..c7af67854b 100644 --- a/packages/components/date-input/stories/time-input.stories.tsx +++ b/packages/components/date-input/stories/time-input.stories.tsx @@ -3,7 +3,7 @@ import {Meta} from "@storybook/react"; import {dateInput, button} from "@heroui/theme"; import {ClockCircleLinearIcon} from "@heroui/shared-icons"; import {parseAbsoluteToLocal, parseZonedDateTime, Time, ZonedDateTime} from "@heroui/shared-utils"; -import {useDateFormatter} from "@react-aria/i18n"; +import {useDateFormatter} from "@heroui/react-aria-i18n"; import {ValidationResult} from "@react-types/shared"; import {TimeInput, TimeInputProps, TimeInputValue as TimeValue} from "../src"; diff --git a/packages/components/date-picker/package.json b/packages/components/date-picker/package.json index 7aa0a1a79f..32c19cd7db 100644 --- a/packages/components/date-picker/package.json +++ b/packages/components/date-picker/package.json @@ -51,7 +51,7 @@ "@heroui/shared-utils": "workspace:*", "@heroui/motion": "workspace:*", "@react-aria/datepicker": "3.12.0", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/utils": "3.26.0", "@react-stately/datepicker": "3.11.0", "@react-stately/overlays": "3.6.12", diff --git a/packages/components/date-picker/src/date-range-picker-field.tsx b/packages/components/date-picker/src/date-range-picker-field.tsx index b0867fdab8..43ab4f5878 100644 --- a/packages/components/date-picker/src/date-range-picker-field.tsx +++ b/packages/components/date-picker/src/date-range-picker-field.tsx @@ -11,7 +11,7 @@ import {ForwardedRef, ReactElement} from "react"; import {useDateFieldState} from "@react-stately/datepicker"; import {DateInputSegment} from "@heroui/date-input"; import {filterDOMProps, useDOMRef} from "@heroui/react-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {mergeProps} from "@react-aria/utils"; type HeroUIBaseProps = Omit< diff --git a/packages/components/date-picker/src/use-date-picker-base.ts b/packages/components/date-picker/src/use-date-picker-base.ts index f7d103639f..7fd8f2b84a 100644 --- a/packages/components/date-picker/src/use-date-picker-base.ts +++ b/packages/components/date-picker/src/use-date-picker-base.ts @@ -13,7 +13,7 @@ import {useCallback} from "react"; import {HTMLHeroUIProps, mapPropsVariants, useProviderContext} from "@heroui/system"; import {mergeProps} from "@react-aria/utils"; import {useDOMRef} from "@heroui/react-utils"; -import {useLocalizedStringFormatter} from "@react-aria/i18n"; +import {useLocalizedStringFormatter} from "@heroui/react-aria-i18n"; import {useControlledState} from "@react-stately/utils"; import intlMessages from "../intl/messages"; diff --git a/packages/components/date-picker/stories/date-picker.stories.tsx b/packages/components/date-picker/stories/date-picker.stories.tsx index 8f32d1d34c..3589b4da4d 100644 --- a/packages/components/date-picker/stories/date-picker.stories.tsx +++ b/packages/components/date-picker/stories/date-picker.stories.tsx @@ -15,7 +15,7 @@ import { startOfWeek, today, } from "@heroui/shared-utils"; -import {I18nProvider, useDateFormatter, useLocale} from "@react-aria/i18n"; +import {I18nProvider, useDateFormatter, useLocale} from "@heroui/react-aria-i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup, RadioProps} from "@heroui/radio"; import {cn} from "@heroui/theme"; diff --git a/packages/components/date-picker/stories/date-range-picker.stories.tsx b/packages/components/date-picker/stories/date-range-picker.stories.tsx index 289f612a57..add6452723 100644 --- a/packages/components/date-picker/stories/date-range-picker.stories.tsx +++ b/packages/components/date-picker/stories/date-range-picker.stories.tsx @@ -17,7 +17,7 @@ import { } from "@heroui/shared-utils"; import {RangeValue, ValidationResult} from "@react-types/shared"; import {DateValue} from "@react-types/datepicker"; -import {I18nProvider, useDateFormatter, useLocale} from "@react-aria/i18n"; +import {I18nProvider, useDateFormatter, useLocale} from "@heroui/react-aria-i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup, RadioProps} from "@heroui/radio"; import {cn} from "@heroui/theme"; diff --git a/packages/components/pagination/package.json b/packages/components/pagination/package.json index a1ee692f98..2ffe564ccd 100644 --- a/packages/components/pagination/package.json +++ b/packages/components/pagination/package.json @@ -46,7 +46,7 @@ "@heroui/use-intersection-observer": "workspace:*", "@heroui/use-pagination": "workspace:*", "@react-aria/focus": "3.19.0", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/interactions": "3.22.5", "@react-aria/utils": "3.26.0", "scroll-into-view-if-needed": "3.0.10" diff --git a/packages/components/pagination/src/pagination.tsx b/packages/components/pagination/src/pagination.tsx index 07055cfa89..429e5ce2c8 100644 --- a/packages/components/pagination/src/pagination.tsx +++ b/packages/components/pagination/src/pagination.tsx @@ -1,6 +1,6 @@ import {PaginationItemValue} from "@heroui/use-pagination"; import {useCallback} from "react"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {forwardRef} from "@heroui/system"; import {PaginationItemType} from "@heroui/use-pagination"; import {ChevronIcon, EllipsisIcon, ForwardIcon} from "@heroui/shared-icons"; diff --git a/packages/components/pagination/src/use-pagination.ts b/packages/components/pagination/src/use-pagination.ts index 05f6f9014b..7979d67999 100644 --- a/packages/components/pagination/src/use-pagination.ts +++ b/packages/components/pagination/src/use-pagination.ts @@ -3,7 +3,7 @@ import type {Key, ReactNode, Ref} from "react"; import type {HTMLHeroUIProps, PropGetter} from "@heroui/system"; import {objectToDeps, Timer} from "@heroui/shared-utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import { UsePaginationProps as UseBasePaginationProps, PaginationItemValue, diff --git a/packages/components/progress/package.json b/packages/components/progress/package.json index 57603e30ad..5a2246cb43 100644 --- a/packages/components/progress/package.json +++ b/packages/components/progress/package.json @@ -43,7 +43,7 @@ "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/use-is-mounted": "workspace:*", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/progress": "3.4.18", "@react-aria/utils": "3.26.0", "@react-types/progress": "3.5.8" diff --git a/packages/components/select/package.json b/packages/components/select/package.json index d1aac8838c..491a5311be 100644 --- a/packages/components/select/package.json +++ b/packages/components/select/package.json @@ -69,7 +69,7 @@ "@heroui/system": "workspace:*", "@heroui/theme": "workspace:*", "@heroui/use-infinite-scroll": "workspace:*", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-stately/data": "3.12.0", "clean-package": "2.2.0", "react": "^18.0.0", diff --git a/packages/components/slider/package.json b/packages/components/slider/package.json index 2087f8aca4..c3178224ae 100644 --- a/packages/components/slider/package.json +++ b/packages/components/slider/package.json @@ -44,7 +44,7 @@ "@heroui/react-utils": "workspace:*", "@heroui/tooltip": "workspace:*", "@react-aria/focus": "3.19.0", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/interactions": "3.22.5", "@react-aria/slider": "3.7.14", "@react-aria/utils": "3.26.0", diff --git a/packages/components/slider/src/use-slider-thumb.ts b/packages/components/slider/src/use-slider-thumb.ts index a79c4e8e0e..26eee7e57a 100644 --- a/packages/components/slider/src/use-slider-thumb.ts +++ b/packages/components/slider/src/use-slider-thumb.ts @@ -11,7 +11,7 @@ import {useFocusRing} from "@react-aria/focus"; import {mergeProps} from "@react-aria/utils"; import {dataAttr} from "@heroui/shared-utils"; import {TooltipProps} from "@heroui/tooltip"; -import {useNumberFormatter} from "@react-aria/i18n"; +import {useNumberFormatter} from "@heroui/react-aria-i18n"; import {UseSliderProps} from "./use-slider"; diff --git a/packages/components/slider/src/use-slider.ts b/packages/components/slider/src/use-slider.ts index dad5757ef8..8304e9596d 100644 --- a/packages/components/slider/src/use-slider.ts +++ b/packages/components/slider/src/use-slider.ts @@ -11,7 +11,7 @@ import {slider} from "@heroui/theme"; import {ReactRef, useDOMRef, filterDOMProps} from "@heroui/react-utils"; import {useSliderState} from "@react-stately/slider"; import {ReactNode, useCallback, useMemo, useRef} from "react"; -import {useNumberFormatter, useLocale} from "@react-aria/i18n"; +import {useNumberFormatter, useLocale} from "@heroui/react-aria-i18n"; import {mergeProps} from "@react-aria/utils"; import {AriaSliderProps, useSlider as useAriaSlider} from "@react-aria/slider"; import {clsx, objectToDeps} from "@heroui/shared-utils"; diff --git a/packages/core/system/package.json b/packages/core/system/package.json index 066645dfd4..d65e411fa5 100644 --- a/packages/core/system/package.json +++ b/packages/core/system/package.json @@ -54,7 +54,8 @@ "dependencies": { "@heroui/react-utils": "workspace:*", "@heroui/shared-utils": "workspace:*", - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", + "@heroui/motion": "workspace:*", "@heroui/system-rsc": "workspace:*", "@react-aria/overlays": "3.24.0", "@react-aria/utils": "3.26.0", diff --git a/packages/core/system/src/provider.tsx b/packages/core/system/src/provider.tsx index a94cf6beee..ab240c1433 100644 --- a/packages/core/system/src/provider.tsx +++ b/packages/core/system/src/provider.tsx @@ -2,11 +2,11 @@ import type {ModalProviderProps} from "@react-aria/overlays"; import type {ProviderContextProps} from "./provider-context"; import type {Href, RouterOptions} from "@react-types/shared"; -import {I18nProvider, I18nProviderProps} from "@react-aria/i18n"; -import {RouterProvider} from "@react-aria/utils"; -import {OverlayProvider} from "@react-aria/overlays"; import {useMemo} from "react"; +import {I18nProvider, I18nProviderProps} from "@heroui/react-aria-i18n"; import {MotionConfig, MotionGlobalConfig} from "@heroui/motion"; +import {RouterProvider} from "@react-aria/utils"; +import {OverlayProvider} from "@react-aria/overlays"; import {ProviderContext} from "./provider-context"; diff --git a/packages/hooks/use-aria-multiselect/package.json b/packages/hooks/use-aria-multiselect/package.json index 4075551342..803ed2ea12 100644 --- a/packages/hooks/use-aria-multiselect/package.json +++ b/packages/hooks/use-aria-multiselect/package.json @@ -34,7 +34,7 @@ "postpack": "clean-package restore" }, "dependencies": { - "@react-aria/i18n": "3.12.4", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/interactions": "3.22.5", "@react-aria/label": "3.7.13", "@react-aria/listbox": "3.13.6", diff --git a/packages/hooks/use-aria-multiselect/src/use-multiselect.ts b/packages/hooks/use-aria-multiselect/src/use-multiselect.ts index 5fdb36391b..d654783525 100644 --- a/packages/hooks/use-aria-multiselect/src/use-multiselect.ts +++ b/packages/hooks/use-aria-multiselect/src/use-multiselect.ts @@ -4,7 +4,7 @@ import type { } from "./use-multiselect-state"; import type {AriaButtonProps} from "@react-types/button"; -import {useCollator} from "@react-aria/i18n"; +import {useCollator} from "@heroui/react-aria-i18n"; import {setInteractionModality} from "@react-aria/interactions"; import {useField} from "@react-aria/label"; import {AriaListBoxOptions} from "@react-aria/listbox"; diff --git a/packages/hooks/use-pagination/package.json b/packages/hooks/use-pagination/package.json index 5ba4c78035..5b37fc5d7d 100644 --- a/packages/hooks/use-pagination/package.json +++ b/packages/hooks/use-pagination/package.json @@ -35,7 +35,7 @@ }, "dependencies": { "@heroui/shared-utils": "workspace:*", - "@react-aria/i18n": "3.12.4" + "@heroui/react-aria-i18n": "workspace:*" }, "peerDependencies": { "react": ">=18 || >=19.0.0-rc.0" diff --git a/packages/hooks/use-pagination/src/index.ts b/packages/hooks/use-pagination/src/index.ts index c45104e483..9a56f02032 100644 --- a/packages/hooks/use-pagination/src/index.ts +++ b/packages/hooks/use-pagination/src/index.ts @@ -1,5 +1,5 @@ import {useMemo, useCallback, useState, useEffect} from "react"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {range} from "@heroui/shared-utils"; export enum PaginationItemType { diff --git a/packages/utilities/shared-utils/package.json b/packages/utilities/shared-utils/package.json index 2bea518897..faea49039b 100644 --- a/packages/utilities/shared-utils/package.json +++ b/packages/utilities/shared-utils/package.json @@ -34,9 +34,7 @@ "postpack": "clean-package restore" }, "dependencies": { - "@internationalized/date": "3.6.0", - "@react-aria/i18n": "3.12.5", - "framer-motion": "11.9.0" + "@internationalized/date": "3.6.0" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/packages/utilities/shared-utils/src/packages.ts b/packages/utilities/shared-utils/src/packages.ts index 15788c8709..a2d5b67e12 100644 --- a/packages/utilities/shared-utils/src/packages.ts +++ b/packages/utilities/shared-utils/src/packages.ts @@ -4,29 +4,3 @@ // @internationalized/date" export * from "@internationalized/date"; - -// @react-aria/i18n -export { - I18nProvider, - useLocale, - useMessageFormatter, - useLocalizedStringFormatter, - useLocalizedStringDictionary, - useListFormatter, - useDateFormatter, - useNumberFormatter, - useCollator, - useFilter, -} from "@react-aria/i18n"; - -export type { - FormatMessage, - LocalizedStringFormatter, - I18nProviderProps, - Locale, - LocalizedStrings, - DateFormatterOptions, - // exported from `@internationalized/date` above - // DateFormatter, - Filter, -} from "@react-aria/i18n"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index adf7b771d5..7f53dd82c0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -301,6 +301,9 @@ importers: '@heroui/react': specifier: workspace:* version: link:../../packages/core/react + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../packages/external/react-aria-i18n '@heroui/shared-icons': specifier: workspace:* version: link:../../packages/utilities/shared-icons @@ -346,9 +349,6 @@ importers: '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/interactions': specifier: 3.22.5 version: 3.22.5(react@18.2.0) @@ -769,6 +769,9 @@ importers: '@heroui/popover': specifier: workspace:* version: link:../popover + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -796,9 +799,6 @@ importers: '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/interactions': specifier: 3.22.5 version: 3.22.5(react@18.2.0) @@ -1047,6 +1047,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -1065,9 +1068,6 @@ importers: '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/interactions': specifier: 3.22.5 version: 3.22.5(react@18.2.0) @@ -1331,6 +1331,9 @@ importers: '@heroui/form': specifier: workspace:* version: link:../form + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -1340,9 +1343,6 @@ importers: '@react-aria/datepicker': specifier: 3.12.0 version: 3.12.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/utils': specifier: 3.26.0 version: 3.26.0(react@18.2.0) @@ -1401,6 +1401,9 @@ importers: '@heroui/popover': specifier: workspace:* version: link:../popover + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -1413,9 +1416,6 @@ importers: '@react-aria/datepicker': specifier: 3.12.0 version: 3.12.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/utils': specifier: 3.26.0 version: 3.26.0(react@18.2.0) @@ -2177,6 +2177,9 @@ importers: packages/components/pagination: dependencies: + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2195,9 +2198,6 @@ importers: '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/interactions': specifier: 3.22.5 version: 3.22.5(react@18.2.0) @@ -2302,6 +2302,9 @@ importers: packages/components/progress: dependencies: + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2311,9 +2314,6 @@ importers: '@heroui/use-is-mounted': specifier: workspace:* version: link:../../hooks/use-is-mounted - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/progress': specifier: 3.4.18 version: 3.4.18(react@18.2.0) @@ -2535,6 +2535,9 @@ importers: '@heroui/input': specifier: workspace:* version: link:../input + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/stories-utils': specifier: workspace:* version: link:../../utilities/stories-utils @@ -2547,9 +2550,6 @@ importers: '@heroui/use-infinite-scroll': specifier: workspace:* version: link:../../hooks/use-infinite-scroll - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-stately/data': specifier: 3.12.0 version: 3.12.0(react@18.2.0) @@ -2599,6 +2599,9 @@ importers: packages/components/slider: dependencies: + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2611,9 +2614,6 @@ importers: '@react-aria/focus': specifier: 3.19.0 version: 3.19.0(react@18.2.0) - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/interactions': specifier: 3.22.5 version: 3.22.5(react@18.2.0) @@ -3230,6 +3230,12 @@ importers: packages/core/system: dependencies: + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -3239,9 +3245,6 @@ importers: '@heroui/system-rsc': specifier: workspace:* version: link:../system-rsc - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) '@react-aria/overlays': specifier: 3.24.0 version: 3.24.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -3343,6 +3346,16 @@ importers: specifier: 2.2.0 version: 2.2.0 + packages/external/react-aria-i18n: + dependencies: + '@react-aria/i18n': + specifier: 3.12.5 + version: 3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + devDependencies: + clean-package: + specifier: 2.2.0 + version: 2.2.0 + packages/hooks/use-aria-accordion: dependencies: '@react-aria/button': @@ -3479,9 +3492,9 @@ importers: packages/hooks/use-aria-multiselect: dependencies: - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@react-aria/interactions': specifier: 3.22.5 version: 3.22.5(react@18.2.0) @@ -3686,12 +3699,12 @@ importers: packages/hooks/use-pagination: dependencies: + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/shared-utils': specifier: workspace:* version: link:../../utilities/shared-utils - '@react-aria/i18n': - specifier: 3.12.4 - version: 3.12.4(react@18.2.0) devDependencies: clean-package: specifier: 2.2.0 @@ -3960,12 +3973,6 @@ importers: '@internationalized/date': specifier: 3.6.0 version: 3.6.0 - '@react-aria/i18n': - specifier: 3.12.5 - version: 3.12.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: clean-package: specifier: 2.2.0 From 4bb81b3d855f01351546065113e666d66aebdf88 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 20:36:19 +0800 Subject: [PATCH 08/56] chore(deps): pnpm-lock.yaml --- pnpm-lock.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7f53dd82c0..93e4f31ff6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1047,6 +1047,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-aria-i18n': specifier: workspace:* version: link:../../external/react-aria-i18n From 30ca5d45e4483843f374093283a62dee2e764b34 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 21:04:07 +0800 Subject: [PATCH 09/56] feat(internationalized-date): init package --- .../external/internationalized-date/README.md | 22 ++++++++ .../internationalized-date/package.json | 52 +++++++++++++++++++ .../internationalized-date/src/index.ts | 1 + .../internationalized-date/tsconfig.json | 10 ++++ 4 files changed, 85 insertions(+) create mode 100644 packages/external/internationalized-date/README.md create mode 100644 packages/external/internationalized-date/package.json create mode 100644 packages/external/internationalized-date/src/index.ts create mode 100644 packages/external/internationalized-date/tsconfig.json diff --git a/packages/external/internationalized-date/README.md b/packages/external/internationalized-date/README.md new file mode 100644 index 0000000000..0428543822 --- /dev/null +++ b/packages/external/internationalized-date/README.md @@ -0,0 +1,22 @@ +# @heroui/internationalized-date + +Mirror package of `@internationalized/date` + +## Installation + +```sh +yarn add @heroui/internationalized-date +# or +npm i @heroui/internationalized-date +``` + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md) +for details. + +## License + +This project is licensed under the terms of the +[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE). diff --git a/packages/external/internationalized-date/package.json b/packages/external/internationalized-date/package.json new file mode 100644 index 0000000000..eef4e54d20 --- /dev/null +++ b/packages/external/internationalized-date/package.json @@ -0,0 +1,52 @@ +{ + "name": "@heroui/internationalized-date", + "version": "2.0.0", + "description": "Mirror package of framer-motion", + "keywords": [ + "hero ui", + "@internationalize/date" + ], + "author": "WK Wong ", + "homepage": "https://heroui.com", + "license": "MIT", + "main": "src/index.ts", + "sideEffects": false, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/heroui-inc/heroui.git", + "directory": "packages/core/system" + }, + "bugs": { + "url": "https://github.com/heroui-inc/heroui/issues" + }, + "scripts": { + "build": "tsup src --dts", + "dev": "pnpm build:fast --watch", + "clean": "rimraf dist .turbo", + "typecheck": "tsc --noEmit", + "build:fast": "tsup src", + "prepack": "clean-package", + "postpack": "clean-package restore" + }, + "dependencies": { + "@internationalized/date": "3.6.0" + }, + "devDependencies": { + "clean-package": "2.2.0" + }, + "clean-package": "../../../clean-package.config.json", + "tsup": { + "clean": true, + "target": "es2019", + "format": [ + "cjs", + "esm" + ] + } +} \ No newline at end of file diff --git a/packages/external/internationalized-date/src/index.ts b/packages/external/internationalized-date/src/index.ts new file mode 100644 index 0000000000..ad02262761 --- /dev/null +++ b/packages/external/internationalized-date/src/index.ts @@ -0,0 +1 @@ +export * from "@internationalized/date"; diff --git a/packages/external/internationalized-date/tsconfig.json b/packages/external/internationalized-date/tsconfig.json new file mode 100644 index 0000000000..bfa97def60 --- /dev/null +++ b/packages/external/internationalized-date/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.json", + "include": [ + "src", + "index.ts", + "../react-utils/src/context.ts", + "../react-utils/src/children.ts", + "../react-utils/src/refs.ts" + ] +} From 7774dcab751c789403e2ed2d887beecf268c0f2f Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 21:04:24 +0800 Subject: [PATCH 10/56] refactor: remove from shared-utils --- packages/utilities/shared-utils/package.json | 3 --- packages/utilities/shared-utils/src/index.ts | 1 - packages/utilities/shared-utils/src/packages.ts | 6 ------ 3 files changed, 10 deletions(-) delete mode 100644 packages/utilities/shared-utils/src/packages.ts diff --git a/packages/utilities/shared-utils/package.json b/packages/utilities/shared-utils/package.json index faea49039b..173832eee8 100644 --- a/packages/utilities/shared-utils/package.json +++ b/packages/utilities/shared-utils/package.json @@ -33,9 +33,6 @@ "prepack": "clean-package", "postpack": "clean-package restore" }, - "dependencies": { - "@internationalized/date": "3.6.0" - }, "devDependencies": { "clean-package": "2.2.0" }, diff --git a/packages/utilities/shared-utils/src/index.ts b/packages/utilities/shared-utils/src/index.ts index 7f412eaba4..eec14e1c31 100644 --- a/packages/utilities/shared-utils/src/index.ts +++ b/packages/utilities/shared-utils/src/index.ts @@ -9,4 +9,3 @@ export * from "./console"; export * from "./types"; export * from "./dates"; export * from "./regex"; -export * from "./packages"; diff --git a/packages/utilities/shared-utils/src/packages.ts b/packages/utilities/shared-utils/src/packages.ts deleted file mode 100644 index a2d5b67e12..0000000000 --- a/packages/utilities/shared-utils/src/packages.ts +++ /dev/null @@ -1,6 +0,0 @@ -// re-exporting from external packages to ensure that -// users to use the exact same version as the HeroUI components do -// to avoid incompatibility issues - -// @internationalized/date" -export * from "@internationalized/date"; From a98bde9dc023d88da863cd0eb4b16e94071c66ab Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 21:05:34 +0800 Subject: [PATCH 11/56] refactor: port to `@heroui/internationalized-date` --- .../components/code-demo/react-live-demo.tsx | 2 +- .../calendar/controlled-focused-value.raw.jsx | 2 +- .../calendar/controlled-focused-value.raw.tsx | 2 +- .../components/calendar/controlled.raw.jsx | 2 +- .../components/calendar/controlled.raw.tsx | 2 +- .../components/calendar/invalid-date.raw.jsx | 2 +- .../components/calendar/invalid-date.raw.tsx | 2 +- .../calendar/max-date-value.raw.jsx | 2 +- .../calendar/min-date-value.raw.jsx | 2 +- .../components/calendar/presets.raw.jsx | 2 +- .../components/calendar/presets.raw.tsx | 2 +- .../components/calendar/read-only.raw.jsx | 2 +- .../calendar/unavailable-dates.raw.jsx | 2 +- .../content/components/calendar/usage.raw.jsx | 2 +- .../components/date-input/controlled.raw.jsx | 2 +- .../components/date-input/controlled.raw.tsx | 2 +- .../components/date-input/description.raw.jsx | 2 +- .../components/date-input/disabled.raw.jsx | 2 +- .../date-input/error-message-function.raw.jsx | 2 +- .../date-input/error-message.raw.jsx | 2 +- .../components/date-input/granularity.raw.jsx | 2 +- .../components/date-input/granularity.raw.tsx | 2 +- .../date-input/hide-timezone.raw.jsx | 2 +- .../date-input/hourly-cycle.raw.jsx | 2 +- .../date-input/international-calendar.raw.jsx | 2 +- .../date-input/international-calendar.raw.tsx | 2 +- .../date-input/label-placements.raw.jsx | 2 +- .../date-input/min-and-max-date.raw.jsx | 2 +- .../components/date-input/readonly.raw.jsx | 2 +- .../components/date-input/required.raw.jsx | 2 +- .../date-input/start-end-content.raw.jsx | 2 +- .../components/date-input/time-zones.raw.jsx | 2 +- .../components/date-input/usage.raw.jsx | 2 +- .../components/date-input/variants.raw.jsx | 2 +- .../components/date-picker/controlled.raw.jsx | 2 +- .../components/date-picker/controlled.raw.tsx | 2 +- .../date-picker/granularity.raw.jsx | 2 +- .../date-picker/granularity.raw.tsx | 2 +- .../components/date-picker/granularity.ts | 4 +-- .../international-calendar.raw.jsx | 2 +- .../international-calendar.raw.tsx | 2 +- .../date-picker/min-and-max-date.raw.jsx | 2 +- .../components/date-picker/preset.raw.jsx | 2 +- .../components/date-picker/preset.raw.tsx | 8 ++++- .../components/date-picker/time-zones.raw.jsx | 2 +- .../date-picker/unavailable-dates.raw.jsx | 2 +- .../date-picker/with-time-field.raw.jsx | 2 +- .../date-range-picker/controlled.raw.jsx | 2 +- .../date-range-picker/controlled.raw.tsx | 2 +- .../date-range-picker/disabled.raw.jsx | 2 +- .../error-message-function.raw.jsx | 2 +- .../date-range-picker/error-message.raw.jsx | 2 +- .../date-range-picker/granularity.raw.jsx | 2 +- .../date-range-picker/granularity.raw.tsx | 2 +- .../international-calendar.raw.jsx | 2 +- .../international-calendar.raw.tsx | 2 +- .../min-and-max-date.raw.jsx | 2 +- .../date-range-picker/non-contiguous.raw.jsx | 2 +- .../date-range-picker/presets.raw.jsx | 2 +- .../date-range-picker/readonly.raw.jsx | 2 +- .../date-range-picker/required.raw.jsx | 2 +- .../date-range-picker/time-zones.raw.jsx | 2 +- .../unavailable-dates.raw.jsx | 2 +- .../date-range-picker/with-time-field.raw.jsx | 2 +- .../controlled-focused-value.raw.jsx | 2 +- .../range-calendar/controlled.raw.jsx | 2 +- .../range-calendar/controlled.raw.tsx | 2 +- .../range-calendar/invalid-date.raw.jsx | 2 +- .../range-calendar/invalid-date.raw.tsx | 2 +- .../range-calendar/max-date-value.raw.jsx | 2 +- .../range-calendar/min-date-value.raw.jsx | 2 +- .../non-contiguous-ranges.raw.jsx | 2 +- .../components/range-calendar/presets.raw.jsx | 2 +- .../components/range-calendar/presets.raw.tsx | 2 +- .../range-calendar/read-only.raw.jsx | 2 +- .../range-calendar/unavailable-dates.raw.jsx | 2 +- .../components/range-calendar/usage.raw.jsx | 2 +- .../components/time-input/controlled.raw.jsx | 2 +- .../components/time-input/controlled.raw.tsx | 2 +- .../components/time-input/disabled.raw.jsx | 2 +- .../components/time-input/end-content.raw.jsx | 2 +- .../components/time-input/granularity.raw.jsx | 2 +- .../components/time-input/granularity.raw.tsx | 2 +- .../time-input/hide-timezone.raw.jsx | 2 +- .../components/time-input/hour-cycle.raw.jsx | 2 +- .../time-input/label-placement.raw.jsx | 2 +- .../time-input/max-time-value.raw.jsx | 2 +- .../time-input/min-time-value.raw.jsx | 2 +- .../time-input/placeholder-value.raw.jsx | 2 +- .../components/time-input/read-only.raw.jsx | 2 +- .../time-input/start-content.raw.jsx | 2 +- .../components/time-input/timezones.raw.jsx | 2 +- .../components/time-input/usage.raw.jsx | 2 +- .../time-input/without-label.raw.jsx | 2 +- .../content/docs/components/date-input.mdx | 12 ++++---- .../content/docs/components/date-picker.mdx | 12 ++++---- .../docs/components/date-range-picker.mdx | 14 ++++----- apps/docs/package.json | 2 +- .../calendar/__tests__/calendar.test.tsx | 2 +- .../__tests__/range-calendar.test.tsx | 2 +- packages/components/calendar/package.json | 2 +- .../components/calendar/src/calendar-cell.tsx | 8 ++++- .../calendar/src/calendar-header.tsx | 2 +- .../calendar/src/calendar-month.tsx | 4 +-- .../calendar/src/calendar-picker.tsx | 2 +- packages/components/calendar/src/calendar.tsx | 2 +- packages/components/calendar/src/index.ts | 2 +- .../calendar/src/range-calendar.tsx | 2 +- .../calendar/src/use-calendar-base.ts | 14 +++++++-- .../calendar/src/use-calendar-picker.ts | 4 +-- .../components/calendar/src/use-calendar.ts | 2 +- .../calendar/src/use-range-calendar.ts | 2 +- packages/components/calendar/src/utils.ts | 2 +- .../calendar/stories/calendar.stories.tsx | 2 +- .../stories/range-calendar.stories.tsx | 2 +- .../date-input/__tests__/date-input.test.tsx | 7 ++++- .../date-input/__tests__/time-input.test.tsx | 2 +- .../components/date-input/src/date-input.tsx | 2 +- .../date-input/src/use-date-input.ts | 4 +-- .../date-input/src/use-time-input.ts | 2 +- .../date-input/stories/date-input.stories.tsx | 2 +- .../date-input/stories/time-input.stories.tsx | 7 ++++- .../__tests__/date-picker.test.tsx | 2 +- packages/components/date-picker/package.json | 1 + .../date-picker/src/date-picker.tsx | 2 +- .../src/date-range-picker-field.tsx | 2 +- .../date-picker/src/date-range-picker.tsx | 2 +- .../date-picker/src/use-date-picker-base.ts | 2 +- .../date-picker/src/use-date-picker.ts | 4 +-- .../date-picker/src/use-date-range-picker.ts | 4 +-- .../stories/date-picker.stories.tsx | 2 +- .../stories/date-range-picker.stories.tsx | 2 +- pnpm-lock.yaml | 29 ++++++++++++------- 133 files changed, 206 insertions(+), 164 deletions(-) diff --git a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx index fa84206105..bab7092940 100644 --- a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx +++ b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx @@ -2,7 +2,7 @@ import React from "react"; import {LivePreview, LiveProvider, LiveError} from "react-live"; import {clsx} from "@heroui/shared-utils"; import * as HeroUI from "@heroui/react"; -import * as intlDateUtils from "@heroui/shared-utils"; +import * as intlDateUtils from "@heroui/internationalized-date"; import * as reactAriaI18n from "@heroui/react-aria-i18n"; import * as reactHookFormBase from "react-hook-form"; import {SandpackFiles} from "@codesandbox/sandpack-react/types"; diff --git a/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx b/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx index 95510ea990..e0120a991b 100644 --- a/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx +++ b/apps/docs/content/components/calendar/controlled-focused-value.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx b/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx index 56109eb15d..10bba6fbc0 100644 --- a/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx +++ b/apps/docs/content/components/calendar/controlled-focused-value.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/calendar/controlled.raw.jsx b/apps/docs/content/components/calendar/controlled.raw.jsx index 56ef09e235..b7cbac38d2 100644 --- a/apps/docs/content/components/calendar/controlled.raw.jsx +++ b/apps/docs/content/components/calendar/controlled.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { let [value, setValue] = React.useState(parseDate("2024-03-07")); diff --git a/apps/docs/content/components/calendar/controlled.raw.tsx b/apps/docs/content/components/calendar/controlled.raw.tsx index c5d7d139f0..52e90e26d7 100644 --- a/apps/docs/content/components/calendar/controlled.raw.tsx +++ b/apps/docs/content/components/calendar/controlled.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { let [value, setValue] = React.useState(parseDate("2024-03-07")); diff --git a/apps/docs/content/components/calendar/invalid-date.raw.jsx b/apps/docs/content/components/calendar/invalid-date.raw.jsx index f5f53949b6..d24b886c7b 100644 --- a/apps/docs/content/components/calendar/invalid-date.raw.jsx +++ b/apps/docs/content/components/calendar/invalid-date.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/invalid-date.raw.tsx b/apps/docs/content/components/calendar/invalid-date.raw.tsx index de47508182..7518a385ba 100644 --- a/apps/docs/content/components/calendar/invalid-date.raw.tsx +++ b/apps/docs/content/components/calendar/invalid-date.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/max-date-value.raw.jsx b/apps/docs/content/components/calendar/max-date-value.raw.jsx index e511b9924e..a120ab5475 100644 --- a/apps/docs/content/components/calendar/max-date-value.raw.jsx +++ b/apps/docs/content/components/calendar/max-date-value.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/calendar/min-date-value.raw.jsx b/apps/docs/content/components/calendar/min-date-value.raw.jsx index b9ae876f42..6f63c2c415 100644 --- a/apps/docs/content/components/calendar/min-date-value.raw.jsx +++ b/apps/docs/content/components/calendar/min-date-value.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/calendar/presets.raw.jsx b/apps/docs/content/components/calendar/presets.raw.jsx index 02d4997460..48447f2c11 100644 --- a/apps/docs/content/components/calendar/presets.raw.jsx +++ b/apps/docs/content/components/calendar/presets.raw.jsx @@ -1,5 +1,5 @@ import {Calendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; -import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/presets.raw.tsx b/apps/docs/content/components/calendar/presets.raw.tsx index 2df1904c16..258c41d533 100644 --- a/apps/docs/content/components/calendar/presets.raw.tsx +++ b/apps/docs/content/components/calendar/presets.raw.tsx @@ -2,7 +2,7 @@ import type {DateValue} from "@react-types/calendar"; import React from "react"; import {Calendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; -import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/read-only.raw.jsx b/apps/docs/content/components/calendar/read-only.raw.jsx index 21c1f157e2..3d2b0bccce 100644 --- a/apps/docs/content/components/calendar/read-only.raw.jsx +++ b/apps/docs/content/components/calendar/read-only.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/calendar/unavailable-dates.raw.jsx b/apps/docs/content/components/calendar/unavailable-dates.raw.jsx index ee36b9f187..dfff47eaf6 100644 --- a/apps/docs/content/components/calendar/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/calendar/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/calendar/usage.raw.jsx b/apps/docs/content/components/calendar/usage.raw.jsx index 3bce4e3440..e55ec12373 100644 --- a/apps/docs/content/components/calendar/usage.raw.jsx +++ b/apps/docs/content/components/calendar/usage.raw.jsx @@ -1,5 +1,5 @@ import {Calendar} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/controlled.raw.jsx b/apps/docs/content/components/date-input/controlled.raw.jsx index 51753f78b3..83590db77f 100644 --- a/apps/docs/content/components/date-input/controlled.raw.jsx +++ b/apps/docs/content/components/date-input/controlled.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; +import {parseDate, getLocalTimeZone} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/controlled.raw.tsx b/apps/docs/content/components/date-input/controlled.raw.tsx index d72a6ebc46..3da9ed08f8 100644 --- a/apps/docs/content/components/date-input/controlled.raw.tsx +++ b/apps/docs/content/components/date-input/controlled.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DateInput} from "@heroui/react"; -import {DateValue, parseDate, getLocalTimeZone} from "@heroui/shared-utils"; +import {DateValue, parseDate, getLocalTimeZone} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/description.raw.jsx b/apps/docs/content/components/date-input/description.raw.jsx index e64ab12cca..c29ff2540f 100644 --- a/apps/docs/content/components/date-input/description.raw.jsx +++ b/apps/docs/content/components/date-input/description.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@heroui/shared-utils"; +import {CalendarDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/disabled.raw.jsx b/apps/docs/content/components/date-input/disabled.raw.jsx index bbe012991a..ac36df8895 100644 --- a/apps/docs/content/components/date-input/disabled.raw.jsx +++ b/apps/docs/content/components/date-input/disabled.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@heroui/shared-utils"; +import {CalendarDate, parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/error-message-function.raw.jsx b/apps/docs/content/components/date-input/error-message-function.raw.jsx index e8a4e70ee3..0872f319b9 100644 --- a/apps/docs/content/components/date-input/error-message-function.raw.jsx +++ b/apps/docs/content/components/date-input/error-message-function.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@heroui/shared-utils"; +import {CalendarDate, parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/error-message.raw.jsx b/apps/docs/content/components/date-input/error-message.raw.jsx index 0b0bd18172..fe6fba99bf 100644 --- a/apps/docs/content/components/date-input/error-message.raw.jsx +++ b/apps/docs/content/components/date-input/error-message.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@heroui/shared-utils"; +import {CalendarDate, parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/granularity.raw.jsx b/apps/docs/content/components/date-input/granularity.raw.jsx index d497a931a1..1f30afce07 100644 --- a/apps/docs/content/components/date-input/granularity.raw.jsx +++ b/apps/docs/content/components/date-input/granularity.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-input/granularity.raw.tsx b/apps/docs/content/components/date-input/granularity.raw.tsx index 1bda37f5a5..c08a5aa114 100644 --- a/apps/docs/content/components/date-input/granularity.raw.tsx +++ b/apps/docs/content/components/date-input/granularity.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DateInput} from "@heroui/react"; -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState( diff --git a/apps/docs/content/components/date-input/hide-timezone.raw.jsx b/apps/docs/content/components/date-input/hide-timezone.raw.jsx index 20cbec352f..d2a9eb1efa 100644 --- a/apps/docs/content/components/date-input/hide-timezone.raw.jsx +++ b/apps/docs/content/components/date-input/hide-timezone.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/hourly-cycle.raw.jsx b/apps/docs/content/components/date-input/hourly-cycle.raw.jsx index 00e83ae9e3..6a14c8a5a5 100644 --- a/apps/docs/content/components/date-input/hourly-cycle.raw.jsx +++ b/apps/docs/content/components/date-input/hourly-cycle.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/international-calendar.raw.jsx b/apps/docs/content/components/date-input/international-calendar.raw.jsx index 1faddd7c03..7b9898e212 100644 --- a/apps/docs/content/components/date-input/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-input/international-calendar.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/international-calendar.raw.tsx b/apps/docs/content/components/date-input/international-calendar.raw.tsx index 837491685e..f56b63f9ae 100644 --- a/apps/docs/content/components/date-input/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-input/international-calendar.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DateInput} from "@heroui/react"; -import {DateValue, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-input/label-placements.raw.jsx b/apps/docs/content/components/date-input/label-placements.raw.jsx index 9ac0c79b73..2b6678e4c8 100644 --- a/apps/docs/content/components/date-input/label-placements.raw.jsx +++ b/apps/docs/content/components/date-input/label-placements.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@heroui/shared-utils"; +import {CalendarDate} from "@heroui/internationalized-date"; export default function App() { const placements = ["inside", "outside", "outside-left"]; diff --git a/apps/docs/content/components/date-input/min-and-max-date.raw.jsx b/apps/docs/content/components/date-input/min-and-max-date.raw.jsx index 041a4b533e..c25a6b0b01 100644 --- a/apps/docs/content/components/date-input/min-and-max-date.raw.jsx +++ b/apps/docs/content/components/date-input/min-and-max-date.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {getLocalTimeZone, today} from "@heroui/shared-utils"; +import {getLocalTimeZone, today} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/readonly.raw.jsx b/apps/docs/content/components/date-input/readonly.raw.jsx index 4f67680275..13ec72e214 100644 --- a/apps/docs/content/components/date-input/readonly.raw.jsx +++ b/apps/docs/content/components/date-input/readonly.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@heroui/shared-utils"; +import {CalendarDate, parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/required.raw.jsx b/apps/docs/content/components/date-input/required.raw.jsx index 76a37075c8..1097b7d135 100644 --- a/apps/docs/content/components/date-input/required.raw.jsx +++ b/apps/docs/content/components/date-input/required.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@heroui/shared-utils"; +import {CalendarDate, parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/start-end-content.raw.jsx b/apps/docs/content/components/date-input/start-end-content.raw.jsx index 11f7b5fdb8..6d039c6c54 100644 --- a/apps/docs/content/components/date-input/start-end-content.raw.jsx +++ b/apps/docs/content/components/date-input/start-end-content.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate, parseDate} from "@heroui/shared-utils"; +import {CalendarDate, parseDate} from "@heroui/internationalized-date"; export const CalendarIcon = (props) => { return ( diff --git a/apps/docs/content/components/date-input/time-zones.raw.jsx b/apps/docs/content/components/date-input/time-zones.raw.jsx index bc35734489..6ee667770e 100644 --- a/apps/docs/content/components/date-input/time-zones.raw.jsx +++ b/apps/docs/content/components/date-input/time-zones.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/usage.raw.jsx b/apps/docs/content/components/date-input/usage.raw.jsx index df2f5039d2..11bdbb42e7 100644 --- a/apps/docs/content/components/date-input/usage.raw.jsx +++ b/apps/docs/content/components/date-input/usage.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@heroui/shared-utils"; +import {CalendarDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-input/variants.raw.jsx b/apps/docs/content/components/date-input/variants.raw.jsx index 4499da9be8..c19afd0b58 100644 --- a/apps/docs/content/components/date-input/variants.raw.jsx +++ b/apps/docs/content/components/date-input/variants.raw.jsx @@ -1,5 +1,5 @@ import {DateInput} from "@heroui/react"; -import {CalendarDate} from "@heroui/shared-utils"; +import {CalendarDate} from "@heroui/internationalized-date"; export default function App() { const variants = ["flat", "bordered", "underlined", "faded"]; diff --git a/apps/docs/content/components/date-picker/controlled.raw.jsx b/apps/docs/content/components/date-picker/controlled.raw.jsx index bfa7382d47..a6cea5c9d7 100644 --- a/apps/docs/content/components/date-picker/controlled.raw.jsx +++ b/apps/docs/content/components/date-picker/controlled.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; +import {parseDate, getLocalTimeZone} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/controlled.raw.tsx b/apps/docs/content/components/date-picker/controlled.raw.tsx index 3294dbf627..797e9f096b 100644 --- a/apps/docs/content/components/date-picker/controlled.raw.tsx +++ b/apps/docs/content/components/date-picker/controlled.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DatePicker} from "@heroui/react"; -import {DateValue, parseDate, getLocalTimeZone} from "@heroui/shared-utils"; +import {DateValue, parseDate, getLocalTimeZone} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/granularity.raw.jsx b/apps/docs/content/components/date-picker/granularity.raw.jsx index 195d53cbb6..9b48e89ded 100644 --- a/apps/docs/content/components/date-picker/granularity.raw.jsx +++ b/apps/docs/content/components/date-picker/granularity.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-picker/granularity.raw.tsx b/apps/docs/content/components/date-picker/granularity.raw.tsx index 1114c94a96..f84905ac98 100644 --- a/apps/docs/content/components/date-picker/granularity.raw.tsx +++ b/apps/docs/content/components/date-picker/granularity.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DatePicker} from "@heroui/react"; -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState( diff --git a/apps/docs/content/components/date-picker/granularity.ts b/apps/docs/content/components/date-picker/granularity.ts index c86525d1bb..8d015347ea 100644 --- a/apps/docs/content/components/date-picker/granularity.ts +++ b/apps/docs/content/components/date-picker/granularity.ts @@ -1,5 +1,5 @@ const App = `import {DatePicker} from "@heroui/react"; -import {now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); @@ -32,7 +32,7 @@ export default function App() { }`; const AppTs = `import {DatePicker} from "@heroui/react"; -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/date-picker/international-calendar.raw.jsx b/apps/docs/content/components/date-picker/international-calendar.raw.jsx index e99e8d2a54..6bae4e6cea 100644 --- a/apps/docs/content/components/date-picker/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-picker/international-calendar.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/international-calendar.raw.tsx b/apps/docs/content/components/date-picker/international-calendar.raw.tsx index c9588accaa..54498fe7e5 100644 --- a/apps/docs/content/components/date-picker/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-picker/international-calendar.raw.tsx @@ -1,6 +1,6 @@ import React from "react"; import {DatePicker} from "@heroui/react"; -import {DateValue, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx b/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx index 40dc02c20b..7d59944b22 100644 --- a/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx +++ b/apps/docs/content/components/date-picker/min-and-max-date.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {getLocalTimeZone, today} from "@heroui/shared-utils"; +import {getLocalTimeZone, today} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-picker/preset.raw.jsx b/apps/docs/content/components/date-picker/preset.raw.jsx index 82e9eb13ac..d1e8ab09c9 100644 --- a/apps/docs/content/components/date-picker/preset.raw.jsx +++ b/apps/docs/content/components/date-picker/preset.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker, RadioGroup, Radio, ButtonGroup, Button, cn} from "@heroui/react"; -import {startOfWeek, startOfMonth, getLocalTimeZone, today} from "@heroui/shared-utils"; +import {startOfWeek, startOfMonth, getLocalTimeZone, today} from "@heroui/internationalized-date"; import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/preset.raw.tsx b/apps/docs/content/components/date-picker/preset.raw.tsx index 830274f0e5..68e63cd91a 100644 --- a/apps/docs/content/components/date-picker/preset.raw.tsx +++ b/apps/docs/content/components/date-picker/preset.raw.tsx @@ -1,6 +1,12 @@ import React from "react"; import {DatePicker, RadioGroup, Radio, ButtonGroup, Button, cn} from "@heroui/react"; -import {DateValue, startOfWeek, startOfMonth, getLocalTimeZone, today} from "@heroui/shared-utils"; +import { + DateValue, + startOfWeek, + startOfMonth, + getLocalTimeZone, + today, +} from "@heroui/internationalized-date"; import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/time-zones.raw.jsx b/apps/docs/content/components/date-picker/time-zones.raw.jsx index 9eb40bf524..8950ebebb5 100644 --- a/apps/docs/content/components/date-picker/time-zones.raw.jsx +++ b/apps/docs/content/components/date-picker/time-zones.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx b/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx index 6c090ed401..a65bccd66f 100644 --- a/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/date-picker/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-picker/with-time-field.raw.jsx b/apps/docs/content/components/date-picker/with-time-field.raw.jsx index 77d88fe490..6286356645 100644 --- a/apps/docs/content/components/date-picker/with-time-field.raw.jsx +++ b/apps/docs/content/components/date-picker/with-time-field.raw.jsx @@ -1,5 +1,5 @@ import {DatePicker} from "@heroui/react"; -import {now, getLocalTimeZone} from "@heroui/shared-utils"; +import {now, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/controlled.raw.jsx b/apps/docs/content/components/date-range-picker/controlled.raw.jsx index a1bd7450ea..52ca3e3ae1 100644 --- a/apps/docs/content/components/date-range-picker/controlled.raw.jsx +++ b/apps/docs/content/components/date-range-picker/controlled.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; +import {parseDate, getLocalTimeZone} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/controlled.raw.tsx b/apps/docs/content/components/date-range-picker/controlled.raw.tsx index b721fb03cb..a39a23e508 100644 --- a/apps/docs/content/components/date-range-picker/controlled.raw.tsx +++ b/apps/docs/content/components/date-range-picker/controlled.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; -import {parseDate, getLocalTimeZone} from "@heroui/shared-utils"; +import {parseDate, getLocalTimeZone} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/disabled.raw.jsx b/apps/docs/content/components/date-range-picker/disabled.raw.jsx index 0cc9e43feb..6da3246691 100644 --- a/apps/docs/content/components/date-range-picker/disabled.raw.jsx +++ b/apps/docs/content/components/date-range-picker/disabled.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx b/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx index 8503b0f7bb..49ed818fa9 100644 --- a/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx +++ b/apps/docs/content/components/date-range-picker/error-message-function.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/error-message.raw.jsx b/apps/docs/content/components/date-range-picker/error-message.raw.jsx index 375b11b18d..8f78a2fe37 100644 --- a/apps/docs/content/components/date-range-picker/error-message.raw.jsx +++ b/apps/docs/content/components/date-range-picker/error-message.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/granularity.raw.jsx b/apps/docs/content/components/date-range-picker/granularity.raw.jsx index 2bcac27007..713959e4a8 100644 --- a/apps/docs/content/components/date-range-picker/granularity.raw.jsx +++ b/apps/docs/content/components/date-range-picker/granularity.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState({ diff --git a/apps/docs/content/components/date-range-picker/granularity.raw.tsx b/apps/docs/content/components/date-range-picker/granularity.raw.tsx index d967cc3753..a456cea5bf 100644 --- a/apps/docs/content/components/date-range-picker/granularity.raw.tsx +++ b/apps/docs/content/components/date-range-picker/granularity.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState | null>({ diff --git a/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx b/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx index 9501209d07..4e71e64b76 100644 --- a/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx +++ b/apps/docs/content/components/date-range-picker/international-calendar.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx b/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx index 50e199c58e..442522d3ed 100644 --- a/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx +++ b/apps/docs/content/components/date-range-picker/international-calendar.raw.tsx @@ -3,7 +3,7 @@ import type {DateValue} from "@react-types/datepicker"; import React from "react"; import {DateRangePicker} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx b/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx index 68612ded63..05cfe4db04 100644 --- a/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx +++ b/apps/docs/content/components/date-range-picker/min-and-max-date.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; +import {getLocalTimeZone, parseDate, today} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx b/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx index 0d4888d052..e8724822c4 100644 --- a/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx +++ b/apps/docs/content/components/date-range-picker/non-contiguous.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {isWeekend, today, getLocalTimeZone} from "@heroui/shared-utils"; +import {isWeekend, today, getLocalTimeZone} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/presets.raw.jsx b/apps/docs/content/components/date-range-picker/presets.raw.jsx index 76b1b2c56f..41d29b40cd 100644 --- a/apps/docs/content/components/date-range-picker/presets.raw.jsx +++ b/apps/docs/content/components/date-range-picker/presets.raw.jsx @@ -6,7 +6,7 @@ import { endOfWeek, endOfMonth, getLocalTimeZone, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/date-range-picker/readonly.raw.jsx b/apps/docs/content/components/date-range-picker/readonly.raw.jsx index f335ddfd73..08fa113a0a 100644 --- a/apps/docs/content/components/date-range-picker/readonly.raw.jsx +++ b/apps/docs/content/components/date-range-picker/readonly.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/required.raw.jsx b/apps/docs/content/components/date-range-picker/required.raw.jsx index db74816abb..d0fe12488f 100644 --- a/apps/docs/content/components/date-range-picker/required.raw.jsx +++ b/apps/docs/content/components/date-range-picker/required.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseDate} from "@heroui/shared-utils"; +import {parseDate} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/time-zones.raw.jsx b/apps/docs/content/components/date-range-picker/time-zones.raw.jsx index d561f667d0..6c3f454178 100644 --- a/apps/docs/content/components/date-range-picker/time-zones.raw.jsx +++ b/apps/docs/content/components/date-range-picker/time-zones.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx b/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx index 283da20927..c14c867ff6 100644 --- a/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/date-range-picker/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { let now = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx b/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx index 766a1f9374..62e6ecc11c 100644 --- a/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx +++ b/apps/docs/content/components/date-range-picker/with-time-field.raw.jsx @@ -1,5 +1,5 @@ import {DateRangePicker} from "@heroui/react"; -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx b/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx index e61d84ed36..28a44a591a 100644 --- a/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx +++ b/apps/docs/content/components/range-calendar/controlled-focused-value.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { let defaultDate = today(getLocalTimeZone()); diff --git a/apps/docs/content/components/range-calendar/controlled.raw.jsx b/apps/docs/content/components/range-calendar/controlled.raw.jsx index 5a721ff9f6..9813a2333b 100644 --- a/apps/docs/content/components/range-calendar/controlled.raw.jsx +++ b/apps/docs/content/components/range-calendar/controlled.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { let [value, setValue] = React.useState({ diff --git a/apps/docs/content/components/range-calendar/controlled.raw.tsx b/apps/docs/content/components/range-calendar/controlled.raw.tsx index a4a5b1f12c..2dc7d9e8d5 100644 --- a/apps/docs/content/components/range-calendar/controlled.raw.tsx +++ b/apps/docs/content/components/range-calendar/controlled.raw.tsx @@ -3,7 +3,7 @@ import type {RangeValue} from "@react-types/shared"; import React from "react"; import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { let [value, setValue] = React.useState | null>({ diff --git a/apps/docs/content/components/range-calendar/invalid-date.raw.jsx b/apps/docs/content/components/range-calendar/invalid-date.raw.jsx index 31f0c15ea5..f18ab7fcff 100644 --- a/apps/docs/content/components/range-calendar/invalid-date.raw.jsx +++ b/apps/docs/content/components/range-calendar/invalid-date.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/invalid-date.raw.tsx b/apps/docs/content/components/range-calendar/invalid-date.raw.tsx index de16da631f..b53fec4a0c 100644 --- a/apps/docs/content/components/range-calendar/invalid-date.raw.tsx +++ b/apps/docs/content/components/range-calendar/invalid-date.raw.tsx @@ -3,7 +3,7 @@ import type {RangeValue} from "@react-types/shared"; import React from "react"; import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/max-date-value.raw.jsx b/apps/docs/content/components/range-calendar/max-date-value.raw.jsx index dfee424331..897f71ccbf 100644 --- a/apps/docs/content/components/range-calendar/max-date-value.raw.jsx +++ b/apps/docs/content/components/range-calendar/max-date-value.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/range-calendar/min-date-value.raw.jsx b/apps/docs/content/components/range-calendar/min-date-value.raw.jsx index cbbbd9d62f..461218c2be 100644 --- a/apps/docs/content/components/range-calendar/min-date-value.raw.jsx +++ b/apps/docs/content/components/range-calendar/min-date-value.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx b/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx index fde565efc4..d5268b52a9 100644 --- a/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx +++ b/apps/docs/content/components/range-calendar/non-contiguous-ranges.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {isWeekend} from "@heroui/shared-utils"; +import {isWeekend} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/presets.raw.jsx b/apps/docs/content/components/range-calendar/presets.raw.jsx index 8b7398e4bc..ba34ae2f94 100644 --- a/apps/docs/content/components/range-calendar/presets.raw.jsx +++ b/apps/docs/content/components/range-calendar/presets.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar, Radio, RadioGroup, Button, ButtonGroup, cn} from "@heroui/react"; -import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, startOfWeek, startOfMonth} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/presets.raw.tsx b/apps/docs/content/components/range-calendar/presets.raw.tsx index 122029efb5..1870abc02e 100644 --- a/apps/docs/content/components/range-calendar/presets.raw.tsx +++ b/apps/docs/content/components/range-calendar/presets.raw.tsx @@ -10,7 +10,7 @@ import { endOfWeek, startOfMonth, endOfMonth, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/read-only.raw.jsx b/apps/docs/content/components/range-calendar/read-only.raw.jsx index eb8cce61bf..ce6fbc557f 100644 --- a/apps/docs/content/components/range-calendar/read-only.raw.jsx +++ b/apps/docs/content/components/range-calendar/read-only.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx b/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx index 9f083eb2ac..e0b110939b 100644 --- a/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx +++ b/apps/docs/content/components/range-calendar/unavailable-dates.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone, isWeekend} from "@heroui/shared-utils"; +import {today, getLocalTimeZone, isWeekend} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/range-calendar/usage.raw.jsx b/apps/docs/content/components/range-calendar/usage.raw.jsx index a874ce5df8..e364916439 100644 --- a/apps/docs/content/components/range-calendar/usage.raw.jsx +++ b/apps/docs/content/components/range-calendar/usage.raw.jsx @@ -1,5 +1,5 @@ import {RangeCalendar} from "@heroui/react"; -import {today, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, getLocalTimeZone} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/controlled.raw.jsx b/apps/docs/content/components/time-input/controlled.raw.jsx index 8490c12446..d41c205503 100644 --- a/apps/docs/content/components/time-input/controlled.raw.jsx +++ b/apps/docs/content/components/time-input/controlled.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/time-input/controlled.raw.tsx b/apps/docs/content/components/time-input/controlled.raw.tsx index fd95248274..c899be05e6 100644 --- a/apps/docs/content/components/time-input/controlled.raw.tsx +++ b/apps/docs/content/components/time-input/controlled.raw.tsx @@ -2,7 +2,7 @@ import type {TimeInputValue} from "@heroui/react"; import React from "react"; import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; export default function App() { diff --git a/apps/docs/content/components/time-input/disabled.raw.jsx b/apps/docs/content/components/time-input/disabled.raw.jsx index 16bda2f150..1c4e89d990 100644 --- a/apps/docs/content/components/time-input/disabled.raw.jsx +++ b/apps/docs/content/components/time-input/disabled.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/end-content.raw.jsx b/apps/docs/content/components/time-input/end-content.raw.jsx index 7c0d2cc878..ba4264bf44 100644 --- a/apps/docs/content/components/time-input/end-content.raw.jsx +++ b/apps/docs/content/components/time-input/end-content.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export const ClockCircleLinearIcon = (props) => { return ( diff --git a/apps/docs/content/components/time-input/granularity.raw.jsx b/apps/docs/content/components/time-input/granularity.raw.jsx index f68a0fb9e4..790d0bbaa6 100644 --- a/apps/docs/content/components/time-input/granularity.raw.jsx +++ b/apps/docs/content/components/time-input/granularity.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState(parseAbsoluteToLocal("2021-04-07T18:45:22Z")); diff --git a/apps/docs/content/components/time-input/granularity.raw.tsx b/apps/docs/content/components/time-input/granularity.raw.tsx index 3a19752a11..e4c4ff133e 100644 --- a/apps/docs/content/components/time-input/granularity.raw.tsx +++ b/apps/docs/content/components/time-input/granularity.raw.tsx @@ -2,7 +2,7 @@ import type {TimeInputValue} from "@heroui/react"; import React from "react"; import {TimeInput} from "@heroui/react"; -import {parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { let [date, setDate] = React.useState( diff --git a/apps/docs/content/components/time-input/hide-timezone.raw.jsx b/apps/docs/content/components/time-input/hide-timezone.raw.jsx index 39ef7bf03e..bbe32b3aee 100644 --- a/apps/docs/content/components/time-input/hide-timezone.raw.jsx +++ b/apps/docs/content/components/time-input/hide-timezone.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/hour-cycle.raw.jsx b/apps/docs/content/components/time-input/hour-cycle.raw.jsx index 18b00296ce..a450692a9f 100644 --- a/apps/docs/content/components/time-input/hour-cycle.raw.jsx +++ b/apps/docs/content/components/time-input/hour-cycle.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/label-placement.raw.jsx b/apps/docs/content/components/time-input/label-placement.raw.jsx index 11a62866be..eec6bec079 100644 --- a/apps/docs/content/components/time-input/label-placement.raw.jsx +++ b/apps/docs/content/components/time-input/label-placement.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/max-time-value.raw.jsx b/apps/docs/content/components/time-input/max-time-value.raw.jsx index 867d5a30a3..c8dc94d804 100644 --- a/apps/docs/content/components/time-input/max-time-value.raw.jsx +++ b/apps/docs/content/components/time-input/max-time-value.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/min-time-value.raw.jsx b/apps/docs/content/components/time-input/min-time-value.raw.jsx index 6e2812985f..40a1e297b5 100644 --- a/apps/docs/content/components/time-input/min-time-value.raw.jsx +++ b/apps/docs/content/components/time-input/min-time-value.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/placeholder-value.raw.jsx b/apps/docs/content/components/time-input/placeholder-value.raw.jsx index 7de6718754..81f1edc524 100644 --- a/apps/docs/content/components/time-input/placeholder-value.raw.jsx +++ b/apps/docs/content/components/time-input/placeholder-value.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/read-only.raw.jsx b/apps/docs/content/components/time-input/read-only.raw.jsx index 409148386d..fa13af99c6 100644 --- a/apps/docs/content/components/time-input/read-only.raw.jsx +++ b/apps/docs/content/components/time-input/read-only.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/components/time-input/start-content.raw.jsx b/apps/docs/content/components/time-input/start-content.raw.jsx index efcc840817..cc363ed9e1 100644 --- a/apps/docs/content/components/time-input/start-content.raw.jsx +++ b/apps/docs/content/components/time-input/start-content.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export const ClockCircleLinearIcon = (props) => { return ( diff --git a/apps/docs/content/components/time-input/timezones.raw.jsx b/apps/docs/content/components/time-input/timezones.raw.jsx index 61c58aacf3..ce19f768c2 100644 --- a/apps/docs/content/components/time-input/timezones.raw.jsx +++ b/apps/docs/content/components/time-input/timezones.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {parseZonedDateTime, parseAbsoluteToLocal} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/usage.raw.jsx b/apps/docs/content/components/time-input/usage.raw.jsx index f1a08edc20..ef878562e4 100644 --- a/apps/docs/content/components/time-input/usage.raw.jsx +++ b/apps/docs/content/components/time-input/usage.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ( diff --git a/apps/docs/content/components/time-input/without-label.raw.jsx b/apps/docs/content/components/time-input/without-label.raw.jsx index 0399b100f4..0617aedb2c 100644 --- a/apps/docs/content/components/time-input/without-label.raw.jsx +++ b/apps/docs/content/components/time-input/without-label.raw.jsx @@ -1,5 +1,5 @@ import {TimeInput} from "@heroui/react"; -import {Time} from "@heroui/shared-utils"; +import {Time} from "@heroui/internationalized-date"; export default function App() { return ; diff --git a/apps/docs/content/docs/components/date-input.mdx b/apps/docs/content/docs/components/date-input.mdx index d1a29e5268..c1f050ba7c 100644 --- a/apps/docs/content/docs/components/date-input.mdx +++ b/apps/docs/content/docs/components/date-input.mdx @@ -111,7 +111,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; ``` @@ -136,7 +136,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; ``` @@ -160,7 +160,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; +import {getLocalTimeZone, parseDate, today} from "@heroui/internationalized-date"; ``` @@ -184,7 +184,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; ``` @@ -207,7 +207,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; ``` @@ -230,7 +230,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; ``` diff --git a/apps/docs/content/docs/components/date-picker.mdx b/apps/docs/content/docs/components/date-picker.mdx index b4d276d457..cc197f6e42 100644 --- a/apps/docs/content/docs/components/date-picker.mdx +++ b/apps/docs/content/docs/components/date-picker.mdx @@ -126,7 +126,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; ``` @@ -151,7 +151,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; ``` @@ -175,7 +175,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; +import {getLocalTimeZone, parseDate, today} from "@heroui/internationalized-date"; ``` @@ -199,7 +199,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; ``` @@ -221,7 +221,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; ``` @@ -261,7 +261,7 @@ import { startOfMonth, useDateFormatter, getLocalTimeZone, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; ``` diff --git a/apps/docs/content/docs/components/date-range-picker.mdx b/apps/docs/content/docs/components/date-range-picker.mdx index 235b616c5e..060de2cc75 100644 --- a/apps/docs/content/docs/components/date-range-picker.mdx +++ b/apps/docs/content/docs/components/date-range-picker.mdx @@ -143,7 +143,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {parseZonedDateTime} from "@heroui/shared-utils"; +import {parseZonedDateTime} from "@heroui/internationalized-date"; ``` @@ -168,7 +168,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; ``` @@ -192,7 +192,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {getLocalTimeZone, parseDate, today} from "@heroui/shared-utils"; +import {getLocalTimeZone, parseDate, today} from "@heroui/internationalized-date"; ``` @@ -216,7 +216,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/shared-utils"; +import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; import {I18nProvider} from "@heroui/react-aria-i18n"; ``` @@ -238,7 +238,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; ``` @@ -263,7 +263,7 @@ in multiple formats into `ZonedDateTime` objects. /> ```jsx -import {today, isWeekend, getLocalTimeZone} from "@heroui/shared-utils"; +import {today, isWeekend, getLocalTimeZone} from "@heroui/internationalized-date"; import {useLocale} from "@heroui/react-aria-i18n"; ``` @@ -289,7 +289,7 @@ import { startOfWeek, startOfMonth, getLocalTimeZone, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; ``` diff --git a/apps/docs/package.json b/apps/docs/package.json index 68402032d0..de692c4880 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -37,9 +37,9 @@ "@heroui/use-is-mobile": "workspace:*", "@heroui/motion": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", + "@heroui/internationalized-date": "workspace:*", "@iconify/icons-solar": "1.2.3", "@iconify/react": "5.0.2", - "@internationalized/date": "3.6.0", "@mapbox/rehype-prism": "^0.6.0", "@radix-ui/react-scroll-area": "^1.0.5", "@react-aria/focus": "3.19.0", diff --git a/packages/components/calendar/__tests__/calendar.test.tsx b/packages/components/calendar/__tests__/calendar.test.tsx index 72c36fbf75..f6f3ca825c 100644 --- a/packages/components/calendar/__tests__/calendar.test.tsx +++ b/packages/components/calendar/__tests__/calendar.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {render, act, fireEvent} from "@testing-library/react"; -import {CalendarDate, isWeekend} from "@heroui/shared-utils"; +import {CalendarDate, isWeekend} from "@heroui/internationalized-date"; import {triggerPress, keyCodes} from "@heroui/test-utils"; import {useLocale} from "@heroui/react-aria-i18n"; import {HeroUIProvider} from "@heroui/system"; diff --git a/packages/components/calendar/__tests__/range-calendar.test.tsx b/packages/components/calendar/__tests__/range-calendar.test.tsx index 2266a21ccc..3b6c4cf810 100644 --- a/packages/components/calendar/__tests__/range-calendar.test.tsx +++ b/packages/components/calendar/__tests__/range-calendar.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {render, act, fireEvent} from "@testing-library/react"; -import {CalendarDate} from "@heroui/shared-utils"; +import {CalendarDate} from "@heroui/internationalized-date"; import {keyCodes, triggerPress, type} from "@heroui/test-utils"; import {RangeCalendar as RangeCalendarCalendarBase, RangeCalendarProps} from "../src"; diff --git a/packages/components/calendar/package.json b/packages/components/calendar/package.json index 9211a38309..ab287679d0 100644 --- a/packages/components/calendar/package.json +++ b/packages/components/calendar/package.json @@ -41,7 +41,7 @@ }, "dependencies": { "@heroui/react-utils": "workspace:*", - "@heroui/shared-utils": "workspace:*", + "@heroui/internationalized-date": "workspace:*", "@heroui/shared-icons": "workspace:*", "@heroui/framer-utils": "workspace:*", "@heroui/use-aria-button": "workspace:*", diff --git a/packages/components/calendar/src/calendar-cell.tsx b/packages/components/calendar/src/calendar-cell.tsx index ec9e728039..9b9538832c 100644 --- a/packages/components/calendar/src/calendar-cell.tsx +++ b/packages/components/calendar/src/calendar-cell.tsx @@ -1,7 +1,13 @@ import type {CalendarState, RangeCalendarState} from "@react-stately/calendar"; import type {CalendarSlots, SlotsToClasses, CalendarReturnType} from "@heroui/theme"; -import {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from "@heroui/shared-utils"; +import { + CalendarDate, + getDayOfWeek, + isSameDay, + isSameMonth, + isToday, +} from "@heroui/internationalized-date"; import {AriaCalendarCellProps, useCalendarCell} from "@react-aria/calendar"; import {HTMLHeroUIProps} from "@heroui/system"; import {mergeProps} from "@react-aria/utils"; diff --git a/packages/components/calendar/src/calendar-header.tsx b/packages/components/calendar/src/calendar-header.tsx index fc3d8a63ef..32639bfb16 100644 --- a/packages/components/calendar/src/calendar-header.tsx +++ b/packages/components/calendar/src/calendar-header.tsx @@ -1,5 +1,5 @@ import type {ButtonProps} from "@heroui/button"; -import type {CalendarDate} from "@heroui/shared-utils"; +import type {CalendarDate} from "@heroui/internationalized-date"; import {HTMLHeroUIProps} from "@heroui/system"; import {useDateFormatter} from "@heroui/react-aria-i18n"; diff --git a/packages/components/calendar/src/calendar-month.tsx b/packages/components/calendar/src/calendar-month.tsx index 13f7b9f806..894162180a 100644 --- a/packages/components/calendar/src/calendar-month.tsx +++ b/packages/components/calendar/src/calendar-month.tsx @@ -1,10 +1,10 @@ -import {CalendarDate, endOfMonth, getWeeksInMonth} from "@heroui/shared-utils"; +import {CalendarDate, endOfMonth, getWeeksInMonth} from "@heroui/internationalized-date"; import {CalendarPropsBase} from "@react-types/calendar"; import {HTMLHeroUIProps} from "@heroui/system"; import {useLocale} from "@heroui/react-aria-i18n"; import {useCalendarGrid} from "@react-aria/calendar"; import {m} from "@heroui/motion"; -import {dataAttr, getInertValue} from "@heroui/shared-utils"; +import {dataAttr, getInertValue} from "@heroui/internationalized-date"; import {CalendarCell} from "./calendar-cell"; import {slideVariants} from "./calendar-transitions"; diff --git a/packages/components/calendar/src/calendar-picker.tsx b/packages/components/calendar/src/calendar-picker.tsx index 34c107568f..ab63d49d8a 100644 --- a/packages/components/calendar/src/calendar-picker.tsx +++ b/packages/components/calendar/src/calendar-picker.tsx @@ -2,7 +2,7 @@ import type {CalendarPickerProps} from "./use-calendar-picker"; import {HTMLHeroUIProps} from "@heroui/system"; import {useCallback} from "react"; -import {getInertValue} from "@heroui/shared-utils"; +import {getInertValue} from "@heroui/internationalized-date"; import {CalendarPickerItem} from "./calendar-picker-item"; import {useCalendarPicker} from "./use-calendar-picker"; diff --git a/packages/components/calendar/src/calendar.tsx b/packages/components/calendar/src/calendar.tsx index 40e3b36a67..da5b271d40 100644 --- a/packages/components/calendar/src/calendar.tsx +++ b/packages/components/calendar/src/calendar.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import type {ForwardedRef, ReactElement} from "react"; import {forwardRef} from "@heroui/system"; diff --git a/packages/components/calendar/src/index.ts b/packages/components/calendar/src/index.ts index 71143ba0de..f8bcd85653 100644 --- a/packages/components/calendar/src/index.ts +++ b/packages/components/calendar/src/index.ts @@ -4,7 +4,7 @@ import RangeCalendar from "./range-calendar"; // export types export type {CalendarProps} from "./calendar"; export type {RangeCalendarProps} from "./range-calendar"; -export type {CalendarDate} from "@heroui/shared-utils"; +export type {CalendarDate} from "@heroui/internationalized-date"; export type {DateValue} from "@react-types/calendar"; export type {RangeValue} from "@react-types/shared"; diff --git a/packages/components/calendar/src/range-calendar.tsx b/packages/components/calendar/src/range-calendar.tsx index 43e3d665fc..514589ff08 100644 --- a/packages/components/calendar/src/range-calendar.tsx +++ b/packages/components/calendar/src/range-calendar.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import type {ForwardedRef, ReactElement} from "react"; import {forwardRef} from "@heroui/system"; diff --git a/packages/components/calendar/src/use-calendar-base.ts b/packages/components/calendar/src/use-calendar-base.ts index 3ee931cf61..221694f401 100644 --- a/packages/components/calendar/src/use-calendar-base.ts +++ b/packages/components/calendar/src/use-calendar-base.ts @@ -9,14 +9,24 @@ import type {SupportedCalendars} from "@heroui/system"; import type {CalendarState, RangeCalendarState} from "@react-stately/calendar"; import type {RefObject, ReactNode} from "react"; -import {createCalendar, Calendar, CalendarDate, DateFormatter} from "@heroui/shared-utils"; +import { + createCalendar, + Calendar, + CalendarDate, + DateFormatter, +} from "@heroui/internationalized-date"; import {mapPropsVariants, useProviderContext} from "@heroui/system"; import {useCallback, useMemo} from "react"; import {calendar} from "@heroui/theme"; import {useControlledState} from "@react-stately/utils"; import {ReactRef, useDOMRef} from "@heroui/react-utils"; import {useLocale} from "@heroui/react-aria-i18n"; -import {clamp, dataAttr, objectToDeps, getGregorianYearOffset} from "@heroui/shared-utils"; +import { + clamp, + dataAttr, + objectToDeps, + getGregorianYearOffset, +} from "@heroui/internationalized-date"; import {mergeProps} from "@react-aria/utils"; type HeroUIBaseProps = Omit, keyof AriaCalendarPropsBase | "onChange">; diff --git a/packages/components/calendar/src/use-calendar-picker.ts b/packages/components/calendar/src/use-calendar-picker.ts index 5103d342d2..6ee50a3ef1 100644 --- a/packages/components/calendar/src/use-calendar-picker.ts +++ b/packages/components/calendar/src/use-calendar-picker.ts @@ -1,10 +1,10 @@ -import type {CalendarDate} from "@heroui/shared-utils"; +import type {CalendarDate} from "@heroui/internationalized-date"; import type {PressEvent} from "@react-types/shared"; import {useDateFormatter} from "@heroui/react-aria-i18n"; import {HTMLHeroUIProps} from "@heroui/system"; import {useCallback, useRef, useEffect} from "react"; -import {debounce} from "@heroui/shared-utils"; +import {debounce} from "@heroui/internationalized-date"; import {areRectsIntersecting} from "@heroui/react-utils"; import scrollIntoView from "scroll-into-view-if-needed"; diff --git a/packages/components/calendar/src/use-calendar.ts b/packages/components/calendar/src/use-calendar.ts index 3784113ce5..d6d58170ee 100644 --- a/packages/components/calendar/src/use-calendar.ts +++ b/packages/components/calendar/src/use-calendar.ts @@ -6,7 +6,7 @@ import {useMemo, useRef} from "react"; import {filterDOMProps} from "@heroui/react-utils"; import {useCalendar as useAriaCalendar} from "@react-aria/calendar"; import {useCalendarState} from "@react-stately/calendar"; -import {createCalendar} from "@heroui/shared-utils"; +import {createCalendar} from "@heroui/internationalized-date"; import {clsx} from "@heroui/shared-utils"; import {chain, mergeProps} from "@react-aria/utils"; diff --git a/packages/components/calendar/src/use-range-calendar.ts b/packages/components/calendar/src/use-range-calendar.ts index 4326cc35f0..2b8b7185d2 100644 --- a/packages/components/calendar/src/use-range-calendar.ts +++ b/packages/components/calendar/src/use-range-calendar.ts @@ -6,7 +6,7 @@ import {useMemo, useRef} from "react"; import {filterDOMProps} from "@heroui/react-utils"; import {useRangeCalendar as useAriaRangeCalendar} from "@react-aria/calendar"; import {useRangeCalendarState} from "@react-stately/calendar"; -import {createCalendar} from "@heroui/shared-utils"; +import {createCalendar} from "@heroui/internationalized-date"; import {clsx} from "@heroui/shared-utils"; import {ButtonProps} from "@heroui/button"; import {chain} from "@react-aria/utils"; diff --git a/packages/components/calendar/src/utils.ts b/packages/components/calendar/src/utils.ts index bdec467fab..4ea5af14c0 100644 --- a/packages/components/calendar/src/utils.ts +++ b/packages/components/calendar/src/utils.ts @@ -1,4 +1,4 @@ -import {DateValue, startOfYear} from "@heroui/shared-utils"; +import {DateValue, startOfYear} from "@heroui/internationalized-date"; export function getYearRange(start?: DateValue | null, end?: DateValue | null): DateValue[] { const years: DateValue[] = []; diff --git a/packages/components/calendar/stories/calendar.stories.tsx b/packages/components/calendar/stories/calendar.stories.tsx index 2f7a6200bc..cdc98ba0bc 100644 --- a/packages/components/calendar/stories/calendar.stories.tsx +++ b/packages/components/calendar/stories/calendar.stories.tsx @@ -8,7 +8,7 @@ import { isWeekend, startOfWeek, startOfMonth, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {I18nProvider, useLocale} from "@heroui/react-aria-i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup} from "@heroui/radio"; diff --git a/packages/components/calendar/stories/range-calendar.stories.tsx b/packages/components/calendar/stories/range-calendar.stories.tsx index 50e888240d..b3992d3fb6 100644 --- a/packages/components/calendar/stories/range-calendar.stories.tsx +++ b/packages/components/calendar/stories/range-calendar.stories.tsx @@ -12,7 +12,7 @@ import { startOfWeek, endOfMonth, endOfWeek, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {I18nProvider, useLocale} from "@heroui/react-aria-i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup} from "@heroui/radio"; diff --git a/packages/components/date-input/__tests__/date-input.test.tsx b/packages/components/date-input/__tests__/date-input.test.tsx index a6822e8203..ae6e6ef98d 100644 --- a/packages/components/date-input/__tests__/date-input.test.tsx +++ b/packages/components/date-input/__tests__/date-input.test.tsx @@ -1,7 +1,12 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {fireEvent, render} from "@testing-library/react"; -import {CalendarDate, CalendarDateTime, DateValue, ZonedDateTime} from "@heroui/shared-utils"; +import { + CalendarDate, + CalendarDateTime, + DateValue, + ZonedDateTime, +} from "@heroui/internationalized-date"; import {pointerMap, triggerPress} from "@heroui/test-utils"; import userEvent from "@testing-library/user-event"; diff --git a/packages/components/date-input/__tests__/time-input.test.tsx b/packages/components/date-input/__tests__/time-input.test.tsx index d110dd55b5..16522ae509 100644 --- a/packages/components/date-input/__tests__/time-input.test.tsx +++ b/packages/components/date-input/__tests__/time-input.test.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ import * as React from "react"; import {fireEvent, render} from "@testing-library/react"; -import {Time, ZonedDateTime} from "@heroui/shared-utils"; +import {Time, ZonedDateTime} from "@heroui/internationalized-date"; import {TimeValue} from "@react-types/datepicker"; import {pointerMap, triggerPress} from "@heroui/test-utils"; import userEvent from "@testing-library/user-event"; diff --git a/packages/components/date-input/src/date-input.tsx b/packages/components/date-input/src/date-input.tsx index 49431a9fcb..9d7738e132 100644 --- a/packages/components/date-input/src/date-input.tsx +++ b/packages/components/date-input/src/date-input.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import type {ForwardedRef, ReactElement} from "react"; import {forwardRef} from "@heroui/system"; diff --git a/packages/components/date-input/src/use-date-input.ts b/packages/components/date-input/src/use-date-input.ts index 27a1b10d5f..60cb2e4dec 100644 --- a/packages/components/date-input/src/use-date-input.ts +++ b/packages/components/date-input/src/use-date-input.ts @@ -2,7 +2,7 @@ import type {DateInputVariantProps, DateInputSlots, SlotsToClasses} from "@herou import type {AriaDateFieldProps} from "@react-types/datepicker"; import type {SupportedCalendars} from "@heroui/system"; import type {DateValue} from "@react-types/datepicker"; -import type {Calendar} from "@heroui/shared-utils"; +import type {Calendar} from "@heroui/internationalized-date"; import type {ReactRef} from "@heroui/react-utils"; import type {DOMAttributes, GroupDOMAttributes} from "@react-types/shared"; import type {DateInputGroupProps} from "./date-input-group"; @@ -22,7 +22,7 @@ import { clsx, dataAttr, getGregorianYearOffset, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {dateInput, cn} from "@heroui/theme"; import {useMemo} from "react"; import {FormContext, useSlottedContext} from "@heroui/form"; diff --git a/packages/components/date-input/src/use-time-input.ts b/packages/components/date-input/src/use-time-input.ts index 2df5d43cc2..a46d8c7192 100644 --- a/packages/components/date-input/src/use-time-input.ts +++ b/packages/components/date-input/src/use-time-input.ts @@ -11,7 +11,7 @@ import {HTMLHeroUIProps, mapPropsVariants} from "@heroui/system"; import {useDOMRef} from "@heroui/react-utils"; import {useTimeField as useAriaTimeField} from "@react-aria/datepicker"; import {useTimeFieldState} from "@react-stately/datepicker"; -import {objectToDeps, clsx, dataAttr} from "@heroui/shared-utils"; +import {objectToDeps, clsx, dataAttr} from "@heroui/internationalized-date"; import {dateInput} from "@heroui/theme"; import {useMemo} from "react"; import {FormContext, useSlottedContext} from "@heroui/form"; diff --git a/packages/components/date-input/stories/date-input.stories.tsx b/packages/components/date-input/stories/date-input.stories.tsx index 9899d69bc5..52d368f5bf 100644 --- a/packages/components/date-input/stories/date-input.stories.tsx +++ b/packages/components/date-input/stories/date-input.stories.tsx @@ -10,7 +10,7 @@ import { parseDate, parseZonedDateTime, today, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {CalendarBoldIcon} from "@heroui/shared-icons"; import {useDateFormatter, I18nProvider} from "@heroui/react-aria-i18n"; import {ValidationResult} from "@react-types/shared"; diff --git a/packages/components/date-input/stories/time-input.stories.tsx b/packages/components/date-input/stories/time-input.stories.tsx index c7af67854b..9af2c122c5 100644 --- a/packages/components/date-input/stories/time-input.stories.tsx +++ b/packages/components/date-input/stories/time-input.stories.tsx @@ -2,7 +2,12 @@ import React from "react"; import {Meta} from "@storybook/react"; import {dateInput, button} from "@heroui/theme"; import {ClockCircleLinearIcon} from "@heroui/shared-icons"; -import {parseAbsoluteToLocal, parseZonedDateTime, Time, ZonedDateTime} from "@heroui/shared-utils"; +import { + parseAbsoluteToLocal, + parseZonedDateTime, + Time, + ZonedDateTime, +} from "@heroui/internationalized-date"; import {useDateFormatter} from "@heroui/react-aria-i18n"; import {ValidationResult} from "@react-types/shared"; diff --git a/packages/components/date-picker/__tests__/date-picker.test.tsx b/packages/components/date-picker/__tests__/date-picker.test.tsx index f5a107eb9e..52a5b1974c 100644 --- a/packages/components/date-picker/__tests__/date-picker.test.tsx +++ b/packages/components/date-picker/__tests__/date-picker.test.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import {render, act, fireEvent, waitFor, within} from "@testing-library/react"; import {pointerMap, triggerPress} from "@heroui/test-utils"; import userEvent from "@testing-library/user-event"; -import {CalendarDate, CalendarDateTime} from "@heroui/shared-utils"; +import {CalendarDate, CalendarDateTime} from "@heroui/internationalized-date"; import {HeroUIProvider} from "@heroui/system"; import {Form} from "@heroui/form"; diff --git a/packages/components/date-picker/package.json b/packages/components/date-picker/package.json index 32c19cd7db..bf7901a030 100644 --- a/packages/components/date-picker/package.json +++ b/packages/components/date-picker/package.json @@ -50,6 +50,7 @@ "@heroui/shared-icons": "workspace:*", "@heroui/shared-utils": "workspace:*", "@heroui/motion": "workspace:*", + "@heroui/internationalized-date": "workspace:*", "@react-aria/datepicker": "3.12.0", "@heroui/react-aria-i18n": "workspace:*", "@react-aria/utils": "3.26.0", diff --git a/packages/components/date-picker/src/date-picker.tsx b/packages/components/date-picker/src/date-picker.tsx index 0217db7b95..6f7a7a24bd 100644 --- a/packages/components/date-picker/src/date-picker.tsx +++ b/packages/components/date-picker/src/date-picker.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import {ForwardedRef, ReactElement, useMemo} from "react"; import {cloneElement, isValidElement} from "react"; diff --git a/packages/components/date-picker/src/date-range-picker-field.tsx b/packages/components/date-picker/src/date-range-picker-field.tsx index 43ab4f5878..28d6ca2c2e 100644 --- a/packages/components/date-picker/src/date-range-picker-field.tsx +++ b/packages/components/date-picker/src/date-range-picker-field.tsx @@ -3,7 +3,7 @@ import type {AriaDatePickerProps} from "@react-types/datepicker"; import type {HTMLHeroUIProps} from "@heroui/system"; import type {DateInputProps} from "@heroui/date-input"; -import {createCalendar} from "@heroui/shared-utils"; +import {createCalendar} from "@heroui/internationalized-date"; import {forwardRef, useRef} from "react"; import {DateValue} from "@react-types/datepicker"; import {useDateField as useAriaDateField} from "@react-aria/datepicker"; diff --git a/packages/components/date-picker/src/date-range-picker.tsx b/packages/components/date-picker/src/date-range-picker.tsx index 05832bdec7..a762c69a5a 100644 --- a/packages/components/date-picker/src/date-range-picker.tsx +++ b/packages/components/date-picker/src/date-range-picker.tsx @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import {ForwardedRef, ReactElement, useMemo} from "react"; import {cloneElement, isValidElement} from "react"; diff --git a/packages/components/date-picker/src/use-date-picker-base.ts b/packages/components/date-picker/src/use-date-picker-base.ts index 7fd8f2b84a..2222754668 100644 --- a/packages/components/date-picker/src/use-date-picker-base.ts +++ b/packages/components/date-picker/src/use-date-picker-base.ts @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import type {AriaDatePickerBaseProps} from "@react-types/datepicker"; import type {DateInputProps, TimeInputProps} from "@heroui/date-input"; import type {ButtonProps} from "@heroui/button"; diff --git a/packages/components/date-picker/src/use-date-picker.ts b/packages/components/date-picker/src/use-date-picker.ts index 90cfd714ae..ece6a14d8b 100644 --- a/packages/components/date-picker/src/use-date-picker.ts +++ b/packages/components/date-picker/src/use-date-picker.ts @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import type {DateInputProps} from "@heroui/date-input"; import type {DatePickerState} from "@react-stately/datepicker"; import type {ButtonProps} from "@heroui/button"; @@ -13,7 +13,7 @@ import {useMemo, useRef} from "react"; import {datePicker} from "@heroui/theme"; import {useDatePickerState} from "@react-stately/datepicker"; import {AriaDatePickerProps, useDatePicker as useAriaDatePicker} from "@react-aria/datepicker"; -import {clsx, dataAttr, objectToDeps} from "@heroui/shared-utils"; +import {clsx, dataAttr, objectToDeps} from "@heroui/internationalized-date"; import {mergeProps} from "@react-aria/utils"; import {FormContext, useSlottedContext} from "@heroui/form"; import {ariaShouldCloseOnInteractOutside} from "@heroui/aria-utils"; diff --git a/packages/components/date-picker/src/use-date-range-picker.ts b/packages/components/date-picker/src/use-date-range-picker.ts index 7daf2e0910..d03fa58cdb 100644 --- a/packages/components/date-picker/src/use-date-range-picker.ts +++ b/packages/components/date-picker/src/use-date-range-picker.ts @@ -1,4 +1,4 @@ -import type {DateValue} from "@heroui/shared-utils"; +import type {DateValue} from "@heroui/internationalized-date"; import type {DateInputVariantProps} from "@heroui/theme"; import type {TimeInputProps} from "@heroui/date-input"; import type {ButtonProps} from "@heroui/button"; @@ -18,7 +18,7 @@ import {useProviderContext} from "@heroui/system"; import {useMemo, useRef} from "react"; import {useDateRangePickerState} from "@react-stately/datepicker"; import {useDateRangePicker as useAriaDateRangePicker} from "@react-aria/datepicker"; -import {clsx, dataAttr, objectToDeps} from "@heroui/shared-utils"; +import {clsx, dataAttr, objectToDeps} from "@heroui/internationalized-date"; import {mergeProps} from "@react-aria/utils"; import {dateRangePicker, dateInput, cn} from "@heroui/theme"; import {FormContext, useSlottedContext} from "@heroui/form"; diff --git a/packages/components/date-picker/stories/date-picker.stories.tsx b/packages/components/date-picker/stories/date-picker.stories.tsx index 3589b4da4d..180420536b 100644 --- a/packages/components/date-picker/stories/date-picker.stories.tsx +++ b/packages/components/date-picker/stories/date-picker.stories.tsx @@ -14,7 +14,7 @@ import { startOfMonth, startOfWeek, today, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {I18nProvider, useDateFormatter, useLocale} from "@heroui/react-aria-i18n"; import {Button, ButtonGroup} from "@heroui/button"; import {Radio, RadioGroup, RadioProps} from "@heroui/radio"; diff --git a/packages/components/date-picker/stories/date-range-picker.stories.tsx b/packages/components/date-picker/stories/date-range-picker.stories.tsx index add6452723..550790dec9 100644 --- a/packages/components/date-picker/stories/date-range-picker.stories.tsx +++ b/packages/components/date-picker/stories/date-range-picker.stories.tsx @@ -14,7 +14,7 @@ import { startOfMonth, startOfWeek, today, -} from "@heroui/shared-utils"; +} from "@heroui/internationalized-date"; import {RangeValue, ValidationResult} from "@react-types/shared"; import {DateValue} from "@react-types/datepicker"; import {I18nProvider, useDateFormatter, useLocale} from "@heroui/react-aria-i18n"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93e4f31ff6..3b8abea9e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -289,6 +289,9 @@ importers: '@heroui/input-otp': specifier: workspace:* version: link:../../packages/components/input-otp + '@heroui/internationalized-date': + specifier: workspace:* + version: link:../../packages/external/internationalized-date '@heroui/kbd': specifier: workspace:* version: link:../../packages/components/kbd @@ -337,9 +340,6 @@ importers: '@iconify/react': specifier: 5.0.2 version: 5.0.2(react@18.2.0) - '@internationalized/date': - specifier: 3.6.0 - version: 3.6.0 '@mapbox/rehype-prism': specifier: ^0.6.0 version: 0.6.0 @@ -1047,6 +1047,9 @@ importers: '@heroui/framer-utils': specifier: workspace:* version: link:../../utilities/framer-utils + '@heroui/internationalized-date': + specifier: workspace:* + version: link:../../external/internationalized-date '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -1059,9 +1062,6 @@ importers: '@heroui/shared-icons': specifier: workspace:* version: link:../../utilities/shared-icons - '@heroui/shared-utils': - specifier: workspace:* - version: link:../../utilities/shared-utils '@heroui/use-aria-button': specifier: workspace:* version: link:../../hooks/use-aria-button @@ -1398,6 +1398,9 @@ importers: '@heroui/form': specifier: workspace:* version: link:../form + '@heroui/internationalized-date': + specifier: workspace:* + version: link:../../external/internationalized-date '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -3339,6 +3342,16 @@ importers: specifier: ^3.4.0 version: 3.4.14(ts-node@10.9.2(@swc/core@1.10.6(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.7.2)) + packages/external/internationalized-date: + dependencies: + '@internationalized/date': + specifier: 3.6.0 + version: 3.6.0 + devDependencies: + clean-package: + specifier: 2.2.0 + version: 2.2.0 + packages/external/motion: dependencies: framer-motion: @@ -3972,10 +3985,6 @@ importers: version: 18.2.0 packages/utilities/shared-utils: - dependencies: - '@internationalized/date': - specifier: 3.6.0 - version: 3.6.0 devDependencies: clean-package: specifier: 2.2.0 From 272d438e02036ae3439b9c67f9f479ef22290809 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 21:10:53 +0800 Subject: [PATCH 12/56] fix: incorrect import --- packages/components/calendar/package.json | 1 + packages/components/calendar/src/calendar-month.tsx | 2 +- packages/components/calendar/src/calendar-picker.tsx | 2 +- packages/components/calendar/src/use-calendar-base.ts | 7 +------ .../components/calendar/src/use-calendar-picker.ts | 2 +- packages/components/date-input/src/use-date-input.ts | 10 +--------- packages/components/date-input/src/use-time-input.ts | 2 +- packages/core/system/package.json | 1 + packages/core/system/src/provider-context.ts | 2 +- pnpm-lock.yaml | 6 ++++++ 10 files changed, 15 insertions(+), 20 deletions(-) diff --git a/packages/components/calendar/package.json b/packages/components/calendar/package.json index ab287679d0..daf135ca27 100644 --- a/packages/components/calendar/package.json +++ b/packages/components/calendar/package.json @@ -49,6 +49,7 @@ "@heroui/dom-animation": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", "@heroui/motion": "workspace:*", + "@heroui/shared-utils": "workspace:*", "@react-aria/calendar": "3.6.0", "@react-aria/focus": "3.19.0", "@react-stately/calendar": "3.6.0", diff --git a/packages/components/calendar/src/calendar-month.tsx b/packages/components/calendar/src/calendar-month.tsx index 894162180a..ae5dd4b3e1 100644 --- a/packages/components/calendar/src/calendar-month.tsx +++ b/packages/components/calendar/src/calendar-month.tsx @@ -4,7 +4,7 @@ import {HTMLHeroUIProps} from "@heroui/system"; import {useLocale} from "@heroui/react-aria-i18n"; import {useCalendarGrid} from "@react-aria/calendar"; import {m} from "@heroui/motion"; -import {dataAttr, getInertValue} from "@heroui/internationalized-date"; +import {dataAttr, getInertValue} from "@heroui/shared-utils"; import {CalendarCell} from "./calendar-cell"; import {slideVariants} from "./calendar-transitions"; diff --git a/packages/components/calendar/src/calendar-picker.tsx b/packages/components/calendar/src/calendar-picker.tsx index ab63d49d8a..34c107568f 100644 --- a/packages/components/calendar/src/calendar-picker.tsx +++ b/packages/components/calendar/src/calendar-picker.tsx @@ -2,7 +2,7 @@ import type {CalendarPickerProps} from "./use-calendar-picker"; import {HTMLHeroUIProps} from "@heroui/system"; import {useCallback} from "react"; -import {getInertValue} from "@heroui/internationalized-date"; +import {getInertValue} from "@heroui/shared-utils"; import {CalendarPickerItem} from "./calendar-picker-item"; import {useCalendarPicker} from "./use-calendar-picker"; diff --git a/packages/components/calendar/src/use-calendar-base.ts b/packages/components/calendar/src/use-calendar-base.ts index 221694f401..ec975db667 100644 --- a/packages/components/calendar/src/use-calendar-base.ts +++ b/packages/components/calendar/src/use-calendar-base.ts @@ -21,12 +21,7 @@ import {calendar} from "@heroui/theme"; import {useControlledState} from "@react-stately/utils"; import {ReactRef, useDOMRef} from "@heroui/react-utils"; import {useLocale} from "@heroui/react-aria-i18n"; -import { - clamp, - dataAttr, - objectToDeps, - getGregorianYearOffset, -} from "@heroui/internationalized-date"; +import {clamp, dataAttr, objectToDeps, getGregorianYearOffset} from "@heroui/shared-utils"; import {mergeProps} from "@react-aria/utils"; type HeroUIBaseProps = Omit, keyof AriaCalendarPropsBase | "onChange">; diff --git a/packages/components/calendar/src/use-calendar-picker.ts b/packages/components/calendar/src/use-calendar-picker.ts index 6ee50a3ef1..b90de01bf4 100644 --- a/packages/components/calendar/src/use-calendar-picker.ts +++ b/packages/components/calendar/src/use-calendar-picker.ts @@ -4,7 +4,7 @@ import type {PressEvent} from "@react-types/shared"; import {useDateFormatter} from "@heroui/react-aria-i18n"; import {HTMLHeroUIProps} from "@heroui/system"; import {useCallback, useRef, useEffect} from "react"; -import {debounce} from "@heroui/internationalized-date"; +import {debounce} from "@heroui/shared-utils"; import {areRectsIntersecting} from "@heroui/react-utils"; import scrollIntoView from "scroll-into-view-if-needed"; diff --git a/packages/components/date-input/src/use-date-input.ts b/packages/components/date-input/src/use-date-input.ts index 60cb2e4dec..0579fc1f2b 100644 --- a/packages/components/date-input/src/use-date-input.ts +++ b/packages/components/date-input/src/use-date-input.ts @@ -14,15 +14,7 @@ import {HTMLHeroUIProps, mapPropsVariants} from "@heroui/system"; import {useDOMRef} from "@heroui/react-utils"; import {useDateField as useAriaDateField} from "@react-aria/datepicker"; import {useDateFieldState} from "@react-stately/datepicker"; -import { - createCalendar, - CalendarDate, - DateFormatter, - objectToDeps, - clsx, - dataAttr, - getGregorianYearOffset, -} from "@heroui/internationalized-date"; +import {objectToDeps, clsx, dataAttr, getGregorianYearOffset} from "@heroui/shared-utils"; import {dateInput, cn} from "@heroui/theme"; import {useMemo} from "react"; import {FormContext, useSlottedContext} from "@heroui/form"; diff --git a/packages/components/date-input/src/use-time-input.ts b/packages/components/date-input/src/use-time-input.ts index a46d8c7192..2df5d43cc2 100644 --- a/packages/components/date-input/src/use-time-input.ts +++ b/packages/components/date-input/src/use-time-input.ts @@ -11,7 +11,7 @@ import {HTMLHeroUIProps, mapPropsVariants} from "@heroui/system"; import {useDOMRef} from "@heroui/react-utils"; import {useTimeField as useAriaTimeField} from "@react-aria/datepicker"; import {useTimeFieldState} from "@react-stately/datepicker"; -import {objectToDeps, clsx, dataAttr} from "@heroui/internationalized-date"; +import {objectToDeps, clsx, dataAttr} from "@heroui/shared-utils"; import {dateInput} from "@heroui/theme"; import {useMemo} from "react"; import {FormContext, useSlottedContext} from "@heroui/form"; diff --git a/packages/core/system/package.json b/packages/core/system/package.json index d65e411fa5..d3f66d98a1 100644 --- a/packages/core/system/package.json +++ b/packages/core/system/package.json @@ -57,6 +57,7 @@ "@heroui/react-aria-i18n": "workspace:*", "@heroui/motion": "workspace:*", "@heroui/system-rsc": "workspace:*", + "@heroui/internationalized-date": "workspace:*", "@react-aria/overlays": "3.24.0", "@react-aria/utils": "3.26.0", "@react-stately/utils": "3.10.5", diff --git a/packages/core/system/src/provider-context.ts b/packages/core/system/src/provider-context.ts index 4815071f22..eb8e4d45ca 100644 --- a/packages/core/system/src/provider-context.ts +++ b/packages/core/system/src/provider-context.ts @@ -1,5 +1,5 @@ import type {SupportedCalendars} from "./types"; -import type {Calendar} from "@heroui/shared-utils"; +import type {Calendar} from "@heroui/internationalized-date"; import type {DateValue} from "@react-types/datepicker"; import {createContext} from "@heroui/react-utils"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b8abea9e4..abc7fb1154 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1062,6 +1062,9 @@ importers: '@heroui/shared-icons': specifier: workspace:* version: link:../../utilities/shared-icons + '@heroui/shared-utils': + specifier: workspace:* + version: link:../../utilities/shared-utils '@heroui/use-aria-button': specifier: workspace:* version: link:../../hooks/use-aria-button @@ -3236,6 +3239,9 @@ importers: packages/core/system: dependencies: + '@heroui/internationalized-date': + specifier: workspace:* + version: link:../../external/internationalized-date '@heroui/motion': specifier: workspace:* version: link:../../external/motion From ae78d9d30f3b6264edc23bc8be13848b358bfd00 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 21:20:26 +0800 Subject: [PATCH 13/56] chore(deps): add `@heroui/internationalized-date` --- packages/components/date-input/package.json | 3 ++- pnpm-lock.yaml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/components/date-input/package.json b/packages/components/date-input/package.json index dac93e810c..0016327588 100644 --- a/packages/components/date-input/package.json +++ b/packages/components/date-input/package.json @@ -43,8 +43,9 @@ "@heroui/form": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/shared-utils": "workspace:*", - "@react-aria/datepicker": "3.12.0", + "@heroui/internationalized-date": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", + "@react-aria/datepicker": "3.12.0", "@react-stately/datepicker": "3.11.0", "@react-types/datepicker": "3.9.0", "@react-types/shared": "3.26.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index abc7fb1154..960f43d74e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1337,6 +1337,9 @@ importers: '@heroui/form': specifier: workspace:* version: link:../form + '@heroui/internationalized-date': + specifier: workspace:* + version: link:../../external/internationalized-date '@heroui/react-aria-i18n': specifier: workspace:* version: link:../../external/react-aria-i18n From c76bb0f0aeea0bed81a35bf93ce6a419201980d0 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Sun, 26 Jan 2025 21:22:02 +0800 Subject: [PATCH 14/56] chore(date-input): add missing import --- packages/components/date-input/src/use-date-input.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/date-input/src/use-date-input.ts b/packages/components/date-input/src/use-date-input.ts index 0579fc1f2b..6eb503413b 100644 --- a/packages/components/date-input/src/use-date-input.ts +++ b/packages/components/date-input/src/use-date-input.ts @@ -8,6 +8,7 @@ import type {DOMAttributes, GroupDOMAttributes} from "@react-types/shared"; import type {DateInputGroupProps} from "./date-input-group"; import {useLocale} from "@heroui/react-aria-i18n"; +import {createCalendar, CalendarDate, DateFormatter} from "@heroui/internationalized-date"; import {mergeProps} from "@react-aria/utils"; import {PropGetter, useProviderContext} from "@heroui/system"; import {HTMLHeroUIProps, mapPropsVariants} from "@heroui/system"; From 8fdbe6c674e6ebe09514096bdd494b5495773ee9 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Mon, 27 Jan 2025 00:09:47 +0800 Subject: [PATCH 15/56] chore(deps): add missing import --- packages/components/select/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/components/select/package.json b/packages/components/select/package.json index 491a5311be..2f11cef66c 100644 --- a/packages/components/select/package.json +++ b/packages/components/select/package.json @@ -51,6 +51,7 @@ "@heroui/use-aria-button": "workspace:*", "@heroui/use-aria-multiselect": "workspace:*", "@heroui/use-safe-layout-effect": "workspace:*", + "@heroui/motion": "workspace:*", "@heroui/form": "workspace:*", "@react-aria/focus": "3.19.0", "@react-aria/form": "3.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 960f43d74e..589d99dc9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2486,6 +2486,9 @@ importers: '@heroui/listbox': specifier: workspace:* version: link:../listbox + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/popover': specifier: workspace:* version: link:../popover From 69fde3b7bd26bbd7799c44fdb271e394a43eebbf Mon Sep 17 00:00:00 2001 From: WK Wong Date: Mon, 27 Jan 2025 00:10:33 +0800 Subject: [PATCH 16/56] fix(date-picker): incorrect import --- packages/components/date-picker/src/use-date-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/date-picker/src/use-date-picker.ts b/packages/components/date-picker/src/use-date-picker.ts index ece6a14d8b..563276e36a 100644 --- a/packages/components/date-picker/src/use-date-picker.ts +++ b/packages/components/date-picker/src/use-date-picker.ts @@ -13,7 +13,7 @@ import {useMemo, useRef} from "react"; import {datePicker} from "@heroui/theme"; import {useDatePickerState} from "@react-stately/datepicker"; import {AriaDatePickerProps, useDatePicker as useAriaDatePicker} from "@react-aria/datepicker"; -import {clsx, dataAttr, objectToDeps} from "@heroui/internationalized-date"; +import {clsx, dataAttr, objectToDeps} from "@heroui/shared-utils"; import {mergeProps} from "@react-aria/utils"; import {FormContext, useSlottedContext} from "@heroui/form"; import {ariaShouldCloseOnInteractOutside} from "@heroui/aria-utils"; From 3ff05130251dd5cd2b46fb6d546f5f967eb5ab72 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Mon, 27 Jan 2025 00:11:48 +0800 Subject: [PATCH 17/56] fix(date-picker): incorrect import --- packages/components/date-picker/src/use-date-range-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/date-picker/src/use-date-range-picker.ts b/packages/components/date-picker/src/use-date-range-picker.ts index d03fa58cdb..6fb7e67fba 100644 --- a/packages/components/date-picker/src/use-date-range-picker.ts +++ b/packages/components/date-picker/src/use-date-range-picker.ts @@ -18,7 +18,7 @@ import {useProviderContext} from "@heroui/system"; import {useMemo, useRef} from "react"; import {useDateRangePickerState} from "@react-stately/datepicker"; import {useDateRangePicker as useAriaDateRangePicker} from "@react-aria/datepicker"; -import {clsx, dataAttr, objectToDeps} from "@heroui/internationalized-date"; +import {clsx, dataAttr, objectToDeps} from "@heroui/shared-utils"; import {mergeProps} from "@react-aria/utils"; import {dateRangePicker, dateInput, cn} from "@heroui/theme"; import {FormContext, useSlottedContext} from "@heroui/form"; From c28bdf55138af0762be16857d9d830999de1ca67 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Mon, 27 Jan 2025 00:12:21 +0800 Subject: [PATCH 18/56] fix: add framer-motion to compilerOptions.paths --- packages/components/accordion/tsconfig.json | 3 ++- packages/components/alert/tsconfig.json | 3 ++- packages/components/autocomplete/tsconfig.json | 3 ++- packages/components/avatar/tsconfig.json | 3 ++- packages/components/badge/tsconfig.json | 3 ++- packages/components/breadcrumbs/tsconfig.json | 3 ++- packages/components/button/tsconfig.json | 3 ++- packages/components/calendar/tsconfig.json | 3 ++- packages/components/card/tsconfig.json | 3 ++- packages/components/checkbox/tsconfig.json | 3 ++- packages/components/chip/tsconfig.json | 3 ++- packages/components/code/tsconfig.json | 3 ++- packages/components/date-input/tsconfig.json | 3 ++- packages/components/date-picker/tsconfig.json | 3 ++- packages/components/divider/tsconfig.json | 3 ++- packages/components/drawer/tsconfig.json | 3 ++- packages/components/dropdown/tsconfig.json | 1 + packages/components/form/tsconfig.json | 3 ++- packages/components/image/tsconfig.json | 3 ++- packages/components/input-otp/tsconfig.json | 3 ++- packages/components/input/tsconfig.json | 3 ++- packages/components/kbd/tsconfig.json | 3 ++- packages/components/link/tsconfig.json | 3 ++- packages/components/listbox/tsconfig.json | 3 ++- packages/components/menu/tsconfig.json | 3 ++- packages/components/modal/tsconfig.json | 3 ++- packages/components/navbar/tsconfig.json | 3 ++- packages/components/pagination/tsconfig.json | 3 ++- packages/components/popover/tsconfig.json | 3 ++- packages/components/progress/tsconfig.json | 3 ++- packages/components/radio/tsconfig.json | 3 ++- packages/components/ripple/tsconfig.json | 3 ++- packages/components/scroll-shadow/tsconfig.json | 3 ++- packages/components/select/tsconfig.json | 3 ++- packages/components/skeleton/tsconfig.json | 3 ++- packages/components/slider/tsconfig.json | 3 ++- packages/components/snippet/tsconfig.json | 1 + packages/components/spacer/tsconfig.json | 3 ++- packages/components/spinner/tsconfig.json | 3 ++- packages/components/switch/tsconfig.json | 3 ++- packages/components/table/tsconfig.json | 3 ++- packages/components/tabs/tsconfig.json | 3 ++- packages/components/tooltip/tsconfig.json | 1 + packages/components/user/tsconfig.json | 3 ++- packages/core/react/tsconfig.json | 1 + packages/core/system-rsc/tsconfig.json | 3 ++- packages/core/system/tsconfig.json | 3 ++- packages/external/motion/tsconfig.json | 5 +---- plop/component/tsconfig.json.hbs | 3 ++- 49 files changed, 93 insertions(+), 48 deletions(-) diff --git a/packages/components/accordion/tsconfig.json b/packages/components/accordion/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/accordion/tsconfig.json +++ b/packages/components/accordion/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/alert/tsconfig.json b/packages/components/alert/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/alert/tsconfig.json +++ b/packages/components/alert/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/autocomplete/tsconfig.json b/packages/components/autocomplete/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/autocomplete/tsconfig.json +++ b/packages/components/autocomplete/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/avatar/tsconfig.json b/packages/components/avatar/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/avatar/tsconfig.json +++ b/packages/components/avatar/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/badge/tsconfig.json b/packages/components/badge/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/badge/tsconfig.json +++ b/packages/components/badge/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/breadcrumbs/tsconfig.json b/packages/components/breadcrumbs/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/breadcrumbs/tsconfig.json +++ b/packages/components/breadcrumbs/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/button/tsconfig.json b/packages/components/button/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/button/tsconfig.json +++ b/packages/components/button/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/calendar/tsconfig.json b/packages/components/calendar/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/calendar/tsconfig.json +++ b/packages/components/calendar/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/card/tsconfig.json b/packages/components/card/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/card/tsconfig.json +++ b/packages/components/card/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/checkbox/tsconfig.json b/packages/components/checkbox/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/checkbox/tsconfig.json +++ b/packages/components/checkbox/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/chip/tsconfig.json b/packages/components/chip/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/chip/tsconfig.json +++ b/packages/components/chip/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/code/tsconfig.json b/packages/components/code/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/code/tsconfig.json +++ b/packages/components/code/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/date-input/tsconfig.json b/packages/components/date-input/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/date-input/tsconfig.json +++ b/packages/components/date-input/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/date-picker/tsconfig.json b/packages/components/date-picker/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/date-picker/tsconfig.json +++ b/packages/components/date-picker/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/divider/tsconfig.json b/packages/components/divider/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/divider/tsconfig.json +++ b/packages/components/divider/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/drawer/tsconfig.json b/packages/components/drawer/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/drawer/tsconfig.json +++ b/packages/components/drawer/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/dropdown/tsconfig.json b/packages/components/dropdown/tsconfig.json index 5b4094a6ed..1ec8134837 100644 --- a/packages/components/dropdown/tsconfig.json +++ b/packages/components/dropdown/tsconfig.json @@ -4,6 +4,7 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"], } }, "include": ["src", "index.ts"] diff --git a/packages/components/form/tsconfig.json b/packages/components/form/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/form/tsconfig.json +++ b/packages/components/form/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/image/tsconfig.json b/packages/components/image/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/image/tsconfig.json +++ b/packages/components/image/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/input-otp/tsconfig.json b/packages/components/input-otp/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/input-otp/tsconfig.json +++ b/packages/components/input-otp/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/input/tsconfig.json b/packages/components/input/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/input/tsconfig.json +++ b/packages/components/input/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/kbd/tsconfig.json b/packages/components/kbd/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/kbd/tsconfig.json +++ b/packages/components/kbd/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/link/tsconfig.json b/packages/components/link/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/link/tsconfig.json +++ b/packages/components/link/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/listbox/tsconfig.json b/packages/components/listbox/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/listbox/tsconfig.json +++ b/packages/components/listbox/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/menu/tsconfig.json b/packages/components/menu/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/menu/tsconfig.json +++ b/packages/components/menu/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/modal/tsconfig.json b/packages/components/modal/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/modal/tsconfig.json +++ b/packages/components/modal/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/navbar/tsconfig.json b/packages/components/navbar/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/navbar/tsconfig.json +++ b/packages/components/navbar/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/pagination/tsconfig.json b/packages/components/pagination/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/pagination/tsconfig.json +++ b/packages/components/pagination/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/popover/tsconfig.json b/packages/components/popover/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/popover/tsconfig.json +++ b/packages/components/popover/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/progress/tsconfig.json b/packages/components/progress/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/progress/tsconfig.json +++ b/packages/components/progress/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/radio/tsconfig.json b/packages/components/radio/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/radio/tsconfig.json +++ b/packages/components/radio/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/ripple/tsconfig.json b/packages/components/ripple/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/ripple/tsconfig.json +++ b/packages/components/ripple/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/scroll-shadow/tsconfig.json b/packages/components/scroll-shadow/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/scroll-shadow/tsconfig.json +++ b/packages/components/scroll-shadow/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/select/tsconfig.json b/packages/components/select/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/select/tsconfig.json +++ b/packages/components/select/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/skeleton/tsconfig.json b/packages/components/skeleton/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/skeleton/tsconfig.json +++ b/packages/components/skeleton/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/slider/tsconfig.json b/packages/components/slider/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/slider/tsconfig.json +++ b/packages/components/slider/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/snippet/tsconfig.json b/packages/components/snippet/tsconfig.json index b43d613b78..f0c944f8f7 100644 --- a/packages/components/snippet/tsconfig.json +++ b/packages/components/snippet/tsconfig.json @@ -4,6 +4,7 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"], "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/components/spacer/tsconfig.json b/packages/components/spacer/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/spacer/tsconfig.json +++ b/packages/components/spacer/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/spinner/tsconfig.json b/packages/components/spinner/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/spinner/tsconfig.json +++ b/packages/components/spinner/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/switch/tsconfig.json b/packages/components/switch/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/switch/tsconfig.json +++ b/packages/components/switch/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/table/tsconfig.json b/packages/components/table/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/table/tsconfig.json +++ b/packages/components/table/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/tabs/tsconfig.json b/packages/components/tabs/tsconfig.json index 1f783ade25..3f8946780b 100644 --- a/packages/components/tabs/tsconfig.json +++ b/packages/components/tabs/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/tooltip/tsconfig.json b/packages/components/tooltip/tsconfig.json index b43d613b78..f0c944f8f7 100644 --- a/packages/components/tooltip/tsconfig.json +++ b/packages/components/tooltip/tsconfig.json @@ -4,6 +4,7 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"], "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/components/user/tsconfig.json b/packages/components/user/tsconfig.json index 5d012f6e61..3af3b8ad6a 100644 --- a/packages/components/user/tsconfig.json +++ b/packages/components/user/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/core/react/tsconfig.json b/packages/core/react/tsconfig.json index 2b86cb172a..2f66bcdc74 100644 --- a/packages/core/react/tsconfig.json +++ b/packages/core/react/tsconfig.json @@ -5,6 +5,7 @@ "allowJs": true, "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"], "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/core/system-rsc/tsconfig.json b/packages/core/system-rsc/tsconfig.json index 885f91c644..f35f3e2494 100644 --- a/packages/core/system-rsc/tsconfig.json +++ b/packages/core/system-rsc/tsconfig.json @@ -5,7 +5,8 @@ "allowJs": true, "baseUrl": "./", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"], diff --git a/packages/core/system/tsconfig.json b/packages/core/system/tsconfig.json index 885f91c644..f35f3e2494 100644 --- a/packages/core/system/tsconfig.json +++ b/packages/core/system/tsconfig.json @@ -5,7 +5,8 @@ "allowJs": true, "baseUrl": "./", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"], diff --git a/packages/external/motion/tsconfig.json b/packages/external/motion/tsconfig.json index bfa97def60..12f60855d5 100644 --- a/packages/external/motion/tsconfig.json +++ b/packages/external/motion/tsconfig.json @@ -2,9 +2,6 @@ "extends": "../../../tsconfig.json", "include": [ "src", - "index.ts", - "../react-utils/src/context.ts", - "../react-utils/src/children.ts", - "../react-utils/src/refs.ts" + "index.ts" ] } diff --git a/plop/component/tsconfig.json.hbs b/plop/component/tsconfig.json.hbs index 5d012f6e61..3af3b8ad6a 100644 --- a/plop/component/tsconfig.json.hbs +++ b/plop/component/tsconfig.json.hbs @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], + "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] From 33b608a9b4b72f24415235abc12642d0448d5123 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Mon, 27 Jan 2025 21:34:08 +0800 Subject: [PATCH 19/56] chore: update info in package.json --- packages/external/internationalized-date/package.json | 4 ++-- packages/external/motion/package.json | 2 +- packages/external/react-aria-i18n/package.json | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/external/internationalized-date/package.json b/packages/external/internationalized-date/package.json index eef4e54d20..1d3c9655cf 100644 --- a/packages/external/internationalized-date/package.json +++ b/packages/external/internationalized-date/package.json @@ -1,7 +1,7 @@ { "name": "@heroui/internationalized-date", "version": "2.0.0", - "description": "Mirror package of framer-motion", + "description": "Mirror package of @internationalized/date", "keywords": [ "hero ui", "@internationalize/date" @@ -20,7 +20,7 @@ "repository": { "type": "git", "url": "git+https://github.com/heroui-inc/heroui.git", - "directory": "packages/core/system" + "directory": "packages/external/internationalized-date" }, "bugs": { "url": "https://github.com/heroui-inc/heroui/issues" diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index ed56fa6422..a43cf6b69a 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -20,7 +20,7 @@ "repository": { "type": "git", "url": "git+https://github.com/heroui-inc/heroui.git", - "directory": "packages/core/system" + "directory": "packages/external/motion" }, "bugs": { "url": "https://github.com/heroui-inc/heroui/issues" diff --git a/packages/external/react-aria-i18n/package.json b/packages/external/react-aria-i18n/package.json index 35f3cff8bc..7c4eb377c9 100644 --- a/packages/external/react-aria-i18n/package.json +++ b/packages/external/react-aria-i18n/package.json @@ -1,11 +1,10 @@ { "name": "@heroui/react-aria-i18n", "version": "2.0.0", - "description": "Mirror package of framer-motion", + "description": "Mirror package of @react-aria/i18n", "keywords": [ "hero ui", - "react-aria", - "i18n" + "@react-aria/i18n" ], "author": "WK Wong ", "homepage": "https://heroui.com", @@ -21,7 +20,7 @@ "repository": { "type": "git", "url": "git+https://github.com/heroui-inc/heroui.git", - "directory": "packages/core/system" + "directory": "packages/external/react-aria-i18n" }, "bugs": { "url": "https://github.com/heroui-inc/heroui/issues" From 928d06e32a6d3f483ce1f5a7c8bfdce7cf0b5a25 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Mon, 27 Jan 2025 21:34:19 +0800 Subject: [PATCH 20/56] chore: remove unused include --- packages/external/internationalized-date/tsconfig.json | 5 +---- packages/external/react-aria-i18n/tsconfig.json | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/external/internationalized-date/tsconfig.json b/packages/external/internationalized-date/tsconfig.json index bfa97def60..12f60855d5 100644 --- a/packages/external/internationalized-date/tsconfig.json +++ b/packages/external/internationalized-date/tsconfig.json @@ -2,9 +2,6 @@ "extends": "../../../tsconfig.json", "include": [ "src", - "index.ts", - "../react-utils/src/context.ts", - "../react-utils/src/children.ts", - "../react-utils/src/refs.ts" + "index.ts" ] } diff --git a/packages/external/react-aria-i18n/tsconfig.json b/packages/external/react-aria-i18n/tsconfig.json index bfa97def60..12f60855d5 100644 --- a/packages/external/react-aria-i18n/tsconfig.json +++ b/packages/external/react-aria-i18n/tsconfig.json @@ -2,9 +2,6 @@ "extends": "../../../tsconfig.json", "include": [ "src", - "index.ts", - "../react-utils/src/context.ts", - "../react-utils/src/children.ts", - "../react-utils/src/refs.ts" + "index.ts" ] } From 09e7b9edd7a012783979d047439abc28dde68e5f Mon Sep 17 00:00:00 2001 From: WK Wong Date: Mon, 27 Jan 2025 21:35:06 +0800 Subject: [PATCH 21/56] chore(changeset): update changeset --- .changeset/hot-news-arrive.md | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .changeset/hot-news-arrive.md diff --git a/.changeset/hot-news-arrive.md b/.changeset/hot-news-arrive.md new file mode 100644 index 0000000000..573db352a1 --- /dev/null +++ b/.changeset/hot-news-arrive.md @@ -0,0 +1,58 @@ +--- +"@heroui/internationalized-date": patch +"@heroui/use-aria-multiselect": patch +"@heroui/scroll-shadow": patch +"@heroui/react-aria-i18n": patch +"@heroui/autocomplete": patch +"@heroui/dom-animation": patch +"@heroui/breadcrumbs": patch +"@heroui/date-picker": patch +"@heroui/framer-utils": patch +"@heroui/date-input": patch +"@heroui/pagination": patch +"@heroui/accordion": patch +"@heroui/input-otp": patch +"@heroui/use-pagination": patch +"@heroui/calendar": patch +"@heroui/checkbox": patch +"@heroui/dropdown": patch +"@heroui/progress": patch +"@heroui/skeleton": patch +"@heroui/divider": patch +"@heroui/listbox": patch +"@heroui/popover": patch +"@heroui/snippet": patch +"@heroui/spinner": patch +"@heroui/tooltip": patch +"@heroui/avatar": patch +"@heroui/button": patch +"@heroui/drawer": patch +"@heroui/navbar": patch +"@heroui/ripple": patch +"@heroui/select": patch +"@heroui/slider": patch +"@heroui/spacer": patch +"@heroui/switch": patch +"@heroui/alert": patch +"@heroui/badge": patch +"@heroui/image": patch +"@heroui/input": patch +"@heroui/modal": patch +"@heroui/radio": patch +"@heroui/table": patch +"@heroui/card": patch +"@heroui/chip": patch +"@heroui/code": patch +"@heroui/form": patch +"@heroui/link": patch +"@heroui/menu": patch +"@heroui/tabs": patch +"@heroui/user": patch +"@heroui/system-rsc": patch +"@heroui/motion": patch +"@heroui/kbd": patch +"@heroui/system": patch +"@heroui/react": patch +--- + +migrate external packages (#4567) From d406c2746232187d08f6be414e466547910d2299 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 15:33:53 +0800 Subject: [PATCH 22/56] refactor(docs): restructure date related components pages --- .../content/docs/components/date-input.mdx | 110 +++----------- .../content/docs/components/date-picker.mdx | 128 +++-------------- .../docs/components/date-range-picker.mdx | 136 +++--------------- 3 files changed, 60 insertions(+), 314 deletions(-) diff --git a/apps/docs/content/docs/components/date-input.mdx b/apps/docs/content/docs/components/date-input.mdx index c1f050ba7c..ae06695f15 100644 --- a/apps/docs/content/docs/components/date-input.mdx +++ b/apps/docs/content/docs/components/date-input.mdx @@ -1,5 +1,5 @@ --- -title: "DateInput" +title: "Date Input" description: "DateInput is a component that allows users to enter and edit date and time values using a keyboard. Each part of a date value is displayed in an individually editable segment." --- @@ -38,6 +38,24 @@ Each part of a date value is displayed in an individually editable segment. }} /> +For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. + + + +For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. + + + ## Usage @@ -99,21 +117,6 @@ You can use the `value` and `onChange` properties to control the input value. DateInput is time zone aware when a `ZonedDateTime` object is provided as the value. In this case, the time zone abbreviation is displayed, and time zone concerns such as daylight saving time are taken into account when the value is manipulated. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {parseZonedDateTime} from "@heroui/internationalized-date"; -``` - @@ -124,22 +127,6 @@ The granularity prop allows you to control the smallest unit that is displayed b the value is displayed with "day" granularity (year, month, and day), and `CalendarDateTime` and `ZonedDateTime` values are displayed with "minute" granularity. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; -import {useDateFormatter} from "@heroui/react-aria-i18n"; -``` - @@ -148,21 +135,6 @@ import {useDateFormatter} from "@heroui/react-aria-i18n"; The minValue and maxValue props can also be used to ensure the value is within a specific range. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {getLocalTimeZone, parseDate, today} from "@heroui/internationalized-date"; -``` - ### International Calendar @@ -172,21 +144,6 @@ Dates are automatically displayed in the appropriate calendar system for the use The calendar system can be overridden using the [Unicode calendar locale extension](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/calendar#adding_a_calendar_in_the_locale_string), passed to the [I18nProvider](https://react-spectrum.adobe.com/react-aria/I18nProvider.html) component. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; -import {I18nProvider} from "@heroui/react-aria-i18n"; -``` @@ -195,21 +152,6 @@ import {I18nProvider} from "@heroui/react-aria-i18n"; When a `ZonedDateTime` object is provided as the value to DateInput, the time zone abbreviation is displayed by default. However, if this is displayed elsewhere or implicit based on the usecase, it can be hidden using the hideTimeZone option. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {parseZonedDateTime} from "@heroui/internationalized-date"; -``` - ### Hourly Cycle @@ -218,20 +160,6 @@ By default, DateInput displays times in either 12 or 24 hour hour format dependi However, this can be overridden using the `hourCycle` prop if needed for a specific usecase. This example forces DateInput to use 24-hour time, regardless of the locale. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {parseZonedDateTime} from "@heroui/internationalized-date"; -``` diff --git a/apps/docs/content/docs/components/date-picker.mdx b/apps/docs/content/docs/components/date-picker.mdx index cc197f6e42..eac82ddf60 100644 --- a/apps/docs/content/docs/components/date-picker.mdx +++ b/apps/docs/content/docs/components/date-picker.mdx @@ -1,13 +1,13 @@ --- -title: "DatePicker" -description: "DatePickers combine a DateInput and a Calendar popover to allow users to enter or select a date and time value." +title: "Date Picker" +description: "DatePicker combines a DateInput and a Calendar popover to allow users to enter or select a date and time value." --- import {datePickerContent} from "@/content/components/date-picker"; -# DatePicker +# Date Picker -DatePickers combine a DateInput and a Calendar popover to allow users to enter or select a date and time value. +DatePicker combines a DateInput and a Calendar popover to allow users to enter or select a date and time value. @@ -37,6 +37,24 @@ DatePickers combine a DateInput and a Calendar popover to allow users to enter o }} /> +For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. + + + +For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. + + + ## Usage @@ -114,21 +132,6 @@ You can use the `value` and `onChange` properties to control the input value. DatePicker is time zone aware when a `ZonedDateTime` object is provided as the value. In this case, the time zone abbreviation is displayed, and time zone concerns such as daylight saving time are taken into account when the value is manipulated. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {parseZonedDateTime} from "@heroui/internationalized-date"; -``` - @@ -139,22 +142,6 @@ The granularity prop allows you to control the smallest unit that is displayed b the value is displayed with "day" granularity (year, month, and day), and `CalendarDateTime` and `ZonedDateTime` values are displayed with "minute" granularity. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; -import {useDateFormatter} from "@heroui/react-aria-i18n"; -``` - @@ -163,21 +150,6 @@ import {useDateFormatter} from "@heroui/react-aria-i18n"; The minValue and maxValue props can also be used to ensure the value is within a specific range. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {getLocalTimeZone, parseDate, today} from "@heroui/internationalized-date"; -``` - ### International Calendar @@ -187,44 +159,12 @@ Dates are automatically displayed in the appropriate calendar system for the use The calendar system can be overridden using the [Unicode calendar locale extension](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/calendar#adding_a_calendar_in_the_locale_string), passed to the [I18nProvider](https://react-spectrum.adobe.com/react-aria/I18nProvider.html) component. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; -import {I18nProvider} from "@heroui/react-aria-i18n"; -``` - ### Unavailable Dates DatePicker supports marking certain dates as unavailable. These dates cannot be selected by the user and are displayed with a crossed out appearance in the calendar. In the date field, an invalid state is displayed if a user enters an unavailable date. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {today, isWeekend, getLocalTimeZone} from "@heroui/internationalized-date"; -import {useLocale} from "@heroui/react-aria-i18n"; -``` - ### Visible Months @@ -241,30 +181,6 @@ By default, when pressing the next or previous buttons, pagination will advance ### Preset -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import { - DateValue, - now, - useLocale, - startOfWeek, - startOfMonth, - useDateFormatter, - getLocalTimeZone, -} from "@heroui/internationalized-date"; -import {I18nProvider} from "@heroui/react-aria-i18n"; -``` - ## Slots diff --git a/apps/docs/content/docs/components/date-range-picker.mdx b/apps/docs/content/docs/components/date-range-picker.mdx index 060de2cc75..a0f4833bd9 100644 --- a/apps/docs/content/docs/components/date-range-picker.mdx +++ b/apps/docs/content/docs/components/date-range-picker.mdx @@ -7,7 +7,7 @@ import {dateRangePickerContent} from "@/content/components/date-range-picker"; # Date Range Picker -Date Range Picker combines two DateInputs and a RangeCalendar popover to allow users to enter or select a date and time range. +DateRangePicker combines two DateInputs and a RangeCalendar popover to allow users to enter or select a date and time range. @@ -37,6 +37,24 @@ Date Range Picker combines two DateInputs and a RangeCalendar popover to allow u }} /> +For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. + + + +For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. + + + ## Usage @@ -131,21 +149,6 @@ You can use the `value` and `onChange` properties to control the input value. DateRangePicker is time zone aware when a `ZonedDateTime` object is provided as the value. In this case, the time zone abbreviation is displayed, and time zone concerns such as daylight saving time are taken into account when the value is manipulated. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {parseZonedDateTime} from "@heroui/internationalized-date"; -``` - @@ -156,22 +159,6 @@ The granularity prop allows you to control the smallest unit that is displayed b the value is displayed with "day" granularity (year, month, and day), and `CalendarDateTime` and `ZonedDateTime` values are displayed with "minute" granularity. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; -import {useDateFormatter} from "@heroui/react-aria-i18n"; -``` - @@ -180,21 +167,6 @@ import {useDateFormatter} from "@heroui/react-aria-i18n"; The minValue and maxValue props can also be used to ensure the value is within a specific range. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {getLocalTimeZone, parseDate, today} from "@heroui/internationalized-date"; -``` - ### International Calendar @@ -204,44 +176,12 @@ Dates are automatically displayed in the appropriate calendar system for the use The calendar system can be overridden using the [Unicode calendar locale extension](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/calendar#adding_a_calendar_in_the_locale_string), passed to the [I18nProvider](https://react-spectrum.adobe.com/react-aria/I18nProvider.html) component. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {DateValue, now, parseAbsoluteToLocal} from "@heroui/internationalized-date"; -import {I18nProvider} from "@heroui/react-aria-i18n"; -``` - ### Unavailable Dates DateRangePicker supports marking certain dates as unavailable. These dates cannot be selected by the user and are displayed with a crossed out appearance in the calendar. In the date field, an invalid state is displayed if a user enters an unavailable date. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {today, isWeekend, getLocalTimeZone} from "@heroui/internationalized-date"; -import {useLocale} from "@heroui/react-aria-i18n"; -``` - ### Non Contiguous @@ -251,48 +191,10 @@ The value emitted in the onChange event will still be a single range with a star but unavailable dates will not be displayed as selected. It is up to applications to split the full selected range into multiple as needed for business logic. -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import {today, isWeekend, getLocalTimeZone} from "@heroui/internationalized-date"; -import {useLocale} from "@heroui/react-aria-i18n"; -``` - ### Presets -[@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) includes functions for parsing strings -in multiple formats into `ZonedDateTime` objects. - - - -```jsx -import { - DateValue, - now, - startOfWeek, - startOfMonth, - getLocalTimeZone, -} from "@heroui/internationalized-date"; -import {useLocale, useDateFormatter} from "@heroui/react-aria-i18n"; -``` - ## Slots From ea1ce26e45cb5029752b660eba8b585f5500cc0b Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 17:59:15 +0800 Subject: [PATCH 23/56] chore(deps): remove `@heroui/motion` from docs --- apps/docs/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/docs/package.json b/apps/docs/package.json index de692c4880..12c9fdccd9 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -35,7 +35,6 @@ "@heroui/use-clipboard": "workspace:*", "@heroui/use-infinite-scroll": "workspace:*", "@heroui/use-is-mobile": "workspace:*", - "@heroui/motion": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", "@heroui/internationalized-date": "workspace:*", "@iconify/icons-solar": "1.2.3", From 1488e40881f44d5794917626772488f24e689dff Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 17:59:28 +0800 Subject: [PATCH 24/56] chore(deps): remove `@heroui/motion` from docs --- pnpm-lock.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 589d99dc9a..fd31d2371c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -298,9 +298,6 @@ importers: '@heroui/listbox': specifier: workspace:* version: link:../../packages/components/listbox - '@heroui/motion': - specifier: workspace:* - version: link:../../packages/external/motion '@heroui/react': specifier: workspace:* version: link:../../packages/core/react From e901d09e8d3f4884994e09d6cfa2149a05011792 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 18:16:49 +0800 Subject: [PATCH 25/56] refactor(docs): update `@heroui/internationalized-date` & `@heroui/react-aria-i18n` imports --- .../docs/content/docs/components/calendar.mdx | 30 +++++++++++++++++++ .../content/docs/components/date-input.mdx | 24 +++++++++++---- .../content/docs/components/date-picker.mdx | 24 +++++++++++---- .../docs/components/date-range-picker.mdx | 24 +++++++++++---- 4 files changed, 84 insertions(+), 18 deletions(-) diff --git a/apps/docs/content/docs/components/calendar.mdx b/apps/docs/content/docs/components/calendar.mdx index f1f0058c6e..dad72a40cd 100644 --- a/apps/docs/content/docs/components/calendar.mdx +++ b/apps/docs/content/docs/components/calendar.mdx @@ -37,6 +37,36 @@ A calendar consists of a grouping element containing one or more date grids (e.g }} /> +For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. + + + +

+**Note**: @heroui/internationalized-date is only available for individual installation. +
+ +For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. + + + +
+**Note**: @heroui/react-aria-i18n is only available for individual installation. +
+ ## Usage A Calendar has no selection by default. An initial, uncontrolled value can be provided to the Calendar using the `defaultValue` prop. Alternatively, a controlled value can be provided using the `value` prop. diff --git a/apps/docs/content/docs/components/date-input.mdx b/apps/docs/content/docs/components/date-input.mdx index ae06695f15..3f90043bc8 100644 --- a/apps/docs/content/docs/components/date-input.mdx +++ b/apps/docs/content/docs/components/date-input.mdx @@ -40,22 +40,34 @@ Each part of a date value is displayed in an individually editable segment. For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. - +
+**Note**: @heroui/internationalized-date is only available for individual installation. +
+ For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. - +
+**Note**: @heroui/react-aria-i18n is only available for individual installation. +
+ ## Usage diff --git a/apps/docs/content/docs/components/date-picker.mdx b/apps/docs/content/docs/components/date-picker.mdx index eac82ddf60..39f357ec80 100644 --- a/apps/docs/content/docs/components/date-picker.mdx +++ b/apps/docs/content/docs/components/date-picker.mdx @@ -39,22 +39,34 @@ DatePicker combines a DateInput and a Calendar popover to allow users to enter o For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. - +
+**Note**: @heroui/internationalized-date is only available for individual installation. +
+ For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. - +
+**Note**: @heroui/react-aria-i18n is only available for individual installation. +
+ ## Usage diff --git a/apps/docs/content/docs/components/date-range-picker.mdx b/apps/docs/content/docs/components/date-range-picker.mdx index a0f4833bd9..67d460db51 100644 --- a/apps/docs/content/docs/components/date-range-picker.mdx +++ b/apps/docs/content/docs/components/date-range-picker.mdx @@ -39,22 +39,34 @@ DateRangePicker combines two DateInputs and a RangeCalendar popover to allow use For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. - +
+**Note**: @heroui/internationalized-date is only available for individual installation. +
+ For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. - +
+**Note**: @heroui/react-aria-i18n is only available for individual installation. +
+ ## Usage From 258fb0c476a5897e44c5cf9c00087aea797801b3 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 18:28:46 +0800 Subject: [PATCH 26/56] refactor(docs): update framer-motion part --- apps/docs/content/docs/frameworks/astro.mdx | 9 ++++----- apps/docs/content/docs/frameworks/laravel.mdx | 9 ++++----- apps/docs/content/docs/frameworks/nextjs.mdx | 17 ++++++++--------- apps/docs/content/docs/frameworks/remix.mdx | 9 ++++----- apps/docs/content/docs/frameworks/vite.mdx | 9 ++++----- apps/docs/content/docs/guide/installation.mdx | 17 ++++++++--------- 6 files changed, 32 insertions(+), 38 deletions(-) diff --git a/apps/docs/content/docs/frameworks/astro.mdx b/apps/docs/content/docs/frameworks/astro.mdx index 949fd51acd..280f0392ca 100644 --- a/apps/docs/content/docs/frameworks/astro.mdx +++ b/apps/docs/content/docs/frameworks/astro.mdx @@ -9,7 +9,6 @@ Requirements: - [React 18](https://reactjs.org/) or later - [Tailwind CSS 3.4](https://tailwindcss.com/docs/guides/astro) or later -- [Framer Motion 11.9](https://www.framer.com/motion/) or later ------ @@ -31,10 +30,10 @@ In your Astro project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/laravel.mdx b/apps/docs/content/docs/frameworks/laravel.mdx index 3cf163c88c..457ddf0429 100644 --- a/apps/docs/content/docs/frameworks/laravel.mdx +++ b/apps/docs/content/docs/frameworks/laravel.mdx @@ -11,7 +11,6 @@ Requirements: - [PHP v8.2](https://www.php.net/) - [React 18](https://reactjs.org/) or later - [Tailwind CSS 3.4](https://tailwindcss.com/docs/guides/vite#react) or later -- [Framer Motion 11.9](https://www.framer.com/motion/) or later ------ @@ -140,10 +139,10 @@ In your Laravel project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/nextjs.mdx b/apps/docs/content/docs/frameworks/nextjs.mdx index 9b6fde3809..79641129c6 100644 --- a/apps/docs/content/docs/frameworks/nextjs.mdx +++ b/apps/docs/content/docs/frameworks/nextjs.mdx @@ -11,7 +11,6 @@ Requirements: - [Next.js 12](https://nextjs.org/) or later - [React 18](https://reactjs.org/) or later - [Tailwind CSS 3.4](https://tailwindcss.com/docs/guides/nextjs) or later -- [Framer Motion 11.9](https://www.framer.com/motion/) or later ------ @@ -152,10 +151,10 @@ In your Next.js project, run one of the following commands to install HeroUI: @@ -396,10 +395,10 @@ In your Next.js project, run one of the following commands to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/remix.mdx b/apps/docs/content/docs/frameworks/remix.mdx index 0fe04b6618..3280718b72 100644 --- a/apps/docs/content/docs/frameworks/remix.mdx +++ b/apps/docs/content/docs/frameworks/remix.mdx @@ -9,7 +9,6 @@ Requirements: - [React 18](https://reactjs.org/) or later - [Tailwind CSS 3.4](https://tailwindcss.com/docs/guides/remix) or later -- [Framer Motion 11.9](https://www.framer.com/motion/) or later ------ @@ -125,10 +124,10 @@ In your Remix project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/vite.mdx b/apps/docs/content/docs/frameworks/vite.mdx index 002aaf7966..2e8bfe036d 100644 --- a/apps/docs/content/docs/frameworks/vite.mdx +++ b/apps/docs/content/docs/frameworks/vite.mdx @@ -10,7 +10,6 @@ Requirements: - [Vite 2](https://vitejs.dev/) or later - [React 18](https://reactjs.org/) or later - [Tailwind CSS 3.4](https://tailwindcss.com/docs/guides/vite#react) or later -- [Framer Motion 11.9](https://www.framer.com/motion/) or later ------ @@ -139,10 +138,10 @@ In your Vite React project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/guide/installation.mdx b/apps/docs/content/docs/guide/installation.mdx index 738dfaa104..e9eefa926a 100644 --- a/apps/docs/content/docs/guide/installation.mdx +++ b/apps/docs/content/docs/guide/installation.mdx @@ -9,7 +9,6 @@ Requirements: - [React 18](https://reactjs.org/) or later - [Tailwind CSS 3.4](https://tailwindcss.com/) or later -- [Framer Motion 11.9](https://www.framer.com/motion/) or later --- @@ -133,10 +132,10 @@ To install HeroUI, run one of the following commands in your terminal: @@ -228,10 +227,10 @@ Run one of the following commands in your terminal to install the core packages: From 07a4af766f41f0f79e9b091b339890c771b4650f Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 18:32:31 +0800 Subject: [PATCH 27/56] chore(deps): bump to last version before v12 --- apps/docs/components/sandpack/use-sandpack.ts | 2 +- packages/external/motion/package.json | 2 +- pnpm-lock.yaml | 24 +++++++++++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/apps/docs/components/sandpack/use-sandpack.ts b/apps/docs/components/sandpack/use-sandpack.ts index 423c9ec6f0..bf8a5af798 100644 --- a/apps/docs/components/sandpack/use-sandpack.ts +++ b/apps/docs/components/sandpack/use-sandpack.ts @@ -70,7 +70,7 @@ export const useSandpack = ({ }, {}); let dependencies = { - "@heroui/motion": "11.9.0", + "@heroui/motion": "11.18.2", "@heroui/react": "latest", }; diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index a43cf6b69a..29d8d3ab14 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -35,7 +35,7 @@ "postpack": "clean-package restore" }, "dependencies": { - "framer-motion": "11.9.0" + "framer-motion": "11.18.2" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd31d2371c..b0d3f24f27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3364,8 +3364,8 @@ importers: packages/external/motion: dependencies: framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + specifier: 11.18.2 + version: 11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: clean-package: specifier: 2.2.0 @@ -10448,8 +10448,8 @@ packages: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} - framer-motion@11.9.0: - resolution: {integrity: sha512-nCfGxvsQecVLjjYDu35G2F5ls+ArE3FBfhxV0RSiisMaUKqteq5DMBFNRKwMyVj+VqKTNhawt+BV480YCHKFlQ==} + framer-motion@11.18.2: + resolution: {integrity: sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w==} peerDependencies: '@emotion/is-prop-valid': '*' react: 18.2.0 @@ -12414,6 +12414,12 @@ packages: mlly@1.7.3: resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} + motion-dom@11.18.1: + resolution: {integrity: sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw==} + + motion-utils@11.18.1: + resolution: {integrity: sha512-49Kt+HKjtbJKLtgO/LKj9Ld+6vw9BjH5d9sc40R/kVyH8GLAXgT42M2NnuPcJNuA3s9ZfZBUcwIgpmZWGEE+hA==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -23548,8 +23554,10 @@ snapshots: dependencies: map-cache: 0.2.2 - framer-motion@11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + framer-motion@11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: + motion-dom: 11.18.1 + motion-utils: 11.18.1 tslib: 2.8.1 optionalDependencies: '@emotion/is-prop-valid': 1.3.1 @@ -26162,6 +26170,12 @@ snapshots: pkg-types: 1.3.0 ufo: 1.5.4 + motion-dom@11.18.1: + dependencies: + motion-utils: 11.18.1 + + motion-utils@11.18.1: {} + mri@1.2.0: {} mrmime@2.0.0: {} From 0e11d0204571ebdd5c1da540d4ab7cd5fffe3752 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 18:41:09 +0800 Subject: [PATCH 28/56] refactor(docs): revise content for `@heroui/internationalized-date` --- .../docs/api-references/heroui-provider.mdx | 4 +-- .../content/docs/components/autocomplete.mdx | 12 -------- .../docs/components/range-calendar.mdx | 30 +++++++++++++++++++ .../content/docs/components/time-input.mdx | 15 ++++++++++ 4 files changed, 47 insertions(+), 14 deletions(-) diff --git a/apps/docs/content/docs/api-references/heroui-provider.mdx b/apps/docs/content/docs/api-references/heroui-provider.mdx index a175fa443f..eea552492e 100644 --- a/apps/docs/content/docs/api-references/heroui-provider.mdx +++ b/apps/docs/content/docs/api-references/heroui-provider.mdx @@ -124,7 +124,7 @@ interface AppProviderProps { function like this: ```tsx - import {GregorianCalendar} from '@internationalized/date'; + import {GregorianCalendar} from '@heroui/internationalized-date'; function createCalendar(identifier) { switch (identifier) { @@ -195,7 +195,7 @@ The available options are: `CalendarDate` - **Description**: A [CalendarDate](https://react-spectrum.adobe.com/internationalized/date/CalendarDate.html) represents a date without any time components in a specific calendar system from `@internationalized/date`. -- **Type**: `import {CalendarDate} from '@internationalized/date';` +- **Type**: `import {CalendarDate} from '@heroui/internationalized-date';` ### SupportedCalendars diff --git a/apps/docs/content/docs/components/autocomplete.mdx b/apps/docs/content/docs/components/autocomplete.mdx index 3834ad2394..59132196ec 100644 --- a/apps/docs/content/docs/components/autocomplete.mdx +++ b/apps/docs/content/docs/components/autocomplete.mdx @@ -203,18 +203,6 @@ The following example shows how you would create a controlled `Autocomplete`, co We recommend using the `useFilter` hook from [@react-aria/i18n](https://react-spectrum.adobe.com/react-aria/useFilter.html#usefilter) to manage the filtering of the items. - - -```jsx -import {useFilter} from "@heroui/react-aria-i18n"; -``` - +For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. + + + +
+**Note**: @heroui/internationalized-date is only available for individual installation. +
+ +For some usages, you may require `@react-aria/i18n`. To avoid incompatibility issues, please use our internal one. + + + +
+**Note**: @heroui/react-aria-i18n is only available for individual installation. +
+ ## Usage A RangeCalendar has no selection by default. An initial, uncontrolled value can be provided to the RangeCalendar using the `defaultValue` prop. Alternatively, a controlled value can be provided using the `value` prop. diff --git a/apps/docs/content/docs/components/time-input.mdx b/apps/docs/content/docs/components/time-input.mdx index 69546b96da..989eb514b4 100644 --- a/apps/docs/content/docs/components/time-input.mdx +++ b/apps/docs/content/docs/components/time-input.mdx @@ -38,6 +38,21 @@ The `TimeInput` component consists of a label, and a group of segments represent }} /> +For some usages, you may require [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/). The package provides objects and functions for representing and manipulating dates and times in a locale-aware manner. To avoid incompatibility issues, please use our internal one. + + + +
+**Note**: @heroui/internationalized-date is only available for individual installation. +
+ ## Usage A `TimeInput` displays a placeholder by default. An initial, uncontrolled value can be provided to the TimeField using the defaultValue prop. Alternatively, a controlled value can be provided using the value prop. From cd52e43d687c2b42709919fd1d0270f6d9974bfc Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 18:56:37 +0800 Subject: [PATCH 29/56] chore(deps): rollback to 11.9.0 --- apps/docs/components/sandpack/use-sandpack.ts | 2 +- packages/external/motion/package.json | 2 +- pnpm-lock.yaml | 24 ++++--------------- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/apps/docs/components/sandpack/use-sandpack.ts b/apps/docs/components/sandpack/use-sandpack.ts index bf8a5af798..423c9ec6f0 100644 --- a/apps/docs/components/sandpack/use-sandpack.ts +++ b/apps/docs/components/sandpack/use-sandpack.ts @@ -70,7 +70,7 @@ export const useSandpack = ({ }, {}); let dependencies = { - "@heroui/motion": "11.18.2", + "@heroui/motion": "11.9.0", "@heroui/react": "latest", }; diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index 29d8d3ab14..a43cf6b69a 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -35,7 +35,7 @@ "postpack": "clean-package restore" }, "dependencies": { - "framer-motion": "11.18.2" + "framer-motion": "11.9.0" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b0d3f24f27..fd31d2371c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3364,8 +3364,8 @@ importers: packages/external/motion: dependencies: framer-motion: - specifier: 11.18.2 - version: 11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + specifier: 11.9.0 + version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: clean-package: specifier: 2.2.0 @@ -10448,8 +10448,8 @@ packages: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} - framer-motion@11.18.2: - resolution: {integrity: sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w==} + framer-motion@11.9.0: + resolution: {integrity: sha512-nCfGxvsQecVLjjYDu35G2F5ls+ArE3FBfhxV0RSiisMaUKqteq5DMBFNRKwMyVj+VqKTNhawt+BV480YCHKFlQ==} peerDependencies: '@emotion/is-prop-valid': '*' react: 18.2.0 @@ -12414,12 +12414,6 @@ packages: mlly@1.7.3: resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} - motion-dom@11.18.1: - resolution: {integrity: sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw==} - - motion-utils@11.18.1: - resolution: {integrity: sha512-49Kt+HKjtbJKLtgO/LKj9Ld+6vw9BjH5d9sc40R/kVyH8GLAXgT42M2NnuPcJNuA3s9ZfZBUcwIgpmZWGEE+hA==} - mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -23554,10 +23548,8 @@ snapshots: dependencies: map-cache: 0.2.2 - framer-motion@11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + framer-motion@11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - motion-dom: 11.18.1 - motion-utils: 11.18.1 tslib: 2.8.1 optionalDependencies: '@emotion/is-prop-valid': 1.3.1 @@ -26170,12 +26162,6 @@ snapshots: pkg-types: 1.3.0 ufo: 1.5.4 - motion-dom@11.18.1: - dependencies: - motion-utils: 11.18.1 - - motion-utils@11.18.1: {} - mri@1.2.0: {} mrmime@2.0.0: {} From 027bf746de80e758a9277dee5eb070dd0a99315a Mon Sep 17 00:00:00 2001 From: WK Wong Date: Wed, 29 Jan 2025 19:04:45 +0800 Subject: [PATCH 30/56] chore(deps): add `@heroui/motion` --- apps/docs/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/apps/docs/package.json b/apps/docs/package.json index 12c9fdccd9..9ebed8d3c3 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -37,6 +37,7 @@ "@heroui/use-is-mobile": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", "@heroui/internationalized-date": "workspace:*", + "@heroui/motion": "workspace:*", "@iconify/icons-solar": "1.2.3", "@iconify/react": "5.0.2", "@mapbox/rehype-prism": "^0.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd31d2371c..589d99dc9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -298,6 +298,9 @@ importers: '@heroui/listbox': specifier: workspace:* version: link:../../packages/components/listbox + '@heroui/motion': + specifier: workspace:* + version: link:../../packages/external/motion '@heroui/react': specifier: workspace:* version: link:../../packages/core/react From af5824f616565fa3c0d4348e7fd857dc1f00ad40 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 22:11:39 +0800 Subject: [PATCH 31/56] chore(docs): remove `@heroui/motion` from installation --- apps/docs/components/sandpack/use-sandpack.ts | 5 +---- apps/docs/content/docs/frameworks/astro.mdx | 8 ++++---- apps/docs/content/docs/frameworks/laravel.mdx | 8 ++++---- apps/docs/content/docs/frameworks/nextjs.mdx | 16 ++++++++-------- apps/docs/content/docs/frameworks/remix.mdx | 8 ++++---- apps/docs/content/docs/frameworks/vite.mdx | 8 ++++---- apps/docs/content/docs/guide/installation.mdx | 8 ++++---- 7 files changed, 29 insertions(+), 32 deletions(-) diff --git a/apps/docs/components/sandpack/use-sandpack.ts b/apps/docs/components/sandpack/use-sandpack.ts index 423c9ec6f0..d2f911d456 100644 --- a/apps/docs/components/sandpack/use-sandpack.ts +++ b/apps/docs/components/sandpack/use-sandpack.ts @@ -70,7 +70,6 @@ export const useSandpack = ({ }, {}); let dependencies = { - "@heroui/motion": "11.9.0", "@heroui/react": "latest", }; @@ -142,9 +141,7 @@ export const useSandpack = ({ // const hasComponents = !isEmpty(heroUIComponents); // const dependencies = useMemo(() => { - // let deps = { - // "@heroui/motion": "11.9.0", - // }; + // let deps = {}; // if (hasComponents) { // let deps = { diff --git a/apps/docs/content/docs/frameworks/astro.mdx b/apps/docs/content/docs/frameworks/astro.mdx index 280f0392ca..b9266749d4 100644 --- a/apps/docs/content/docs/frameworks/astro.mdx +++ b/apps/docs/content/docs/frameworks/astro.mdx @@ -30,10 +30,10 @@ In your Astro project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/laravel.mdx b/apps/docs/content/docs/frameworks/laravel.mdx index 457ddf0429..9d9114a963 100644 --- a/apps/docs/content/docs/frameworks/laravel.mdx +++ b/apps/docs/content/docs/frameworks/laravel.mdx @@ -139,10 +139,10 @@ In your Laravel project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/nextjs.mdx b/apps/docs/content/docs/frameworks/nextjs.mdx index 79641129c6..dcbc7026e2 100644 --- a/apps/docs/content/docs/frameworks/nextjs.mdx +++ b/apps/docs/content/docs/frameworks/nextjs.mdx @@ -151,10 +151,10 @@ In your Next.js project, run one of the following commands to install HeroUI: @@ -395,10 +395,10 @@ In your Next.js project, run one of the following commands to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/remix.mdx b/apps/docs/content/docs/frameworks/remix.mdx index 3280718b72..42690ac410 100644 --- a/apps/docs/content/docs/frameworks/remix.mdx +++ b/apps/docs/content/docs/frameworks/remix.mdx @@ -124,10 +124,10 @@ In your Remix project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/frameworks/vite.mdx b/apps/docs/content/docs/frameworks/vite.mdx index 2e8bfe036d..4b88ff67c8 100644 --- a/apps/docs/content/docs/frameworks/vite.mdx +++ b/apps/docs/content/docs/frameworks/vite.mdx @@ -138,10 +138,10 @@ In your Vite React project, run one of the following command to install HeroUI: diff --git a/apps/docs/content/docs/guide/installation.mdx b/apps/docs/content/docs/guide/installation.mdx index e9eefa926a..d42d374a6e 100644 --- a/apps/docs/content/docs/guide/installation.mdx +++ b/apps/docs/content/docs/guide/installation.mdx @@ -132,10 +132,10 @@ To install HeroUI, run one of the following commands in your terminal: From 2575f86546c3a7c1a3df9faa40b2f4397451f1b5 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 22:34:32 +0800 Subject: [PATCH 32/56] refactor: migrate `@heroui/framer-utils` to `@heroui/motion` --- packages/components/accordion/package.json | 1 - .../accordion/src/accordion-item.tsx | 2 +- packages/components/calendar/package.json | 1 - .../components/calendar/src/calendar-base.tsx | 2 +- packages/components/drawer/package.json | 2 +- packages/components/drawer/src/use-drawer.ts | 2 +- packages/components/modal/package.json | 1 - .../components/modal/src/modal-content.tsx | 2 +- .../components/modal/src/modal-transition.ts | 2 +- packages/components/navbar/package.json | 1 - .../navbar/src/navbar-transitions.ts | 2 +- packages/components/popover/package.json | 1 - .../popover/src/free-solo-popover.tsx | 2 +- .../popover/src/popover-content.tsx | 2 +- packages/components/tabs/package.json | 1 - packages/components/tooltip/package.json | 1 - packages/components/tooltip/src/tooltip.tsx | 2 +- packages/core/react/package.json | 1 - packages/core/react/src/index.ts | 2 +- packages/core/system/package.json | 1 + packages/external/motion/package.json | 2 + packages/external/motion/src/index.ts | 13 ++ .../external/motion/src/resizable-panel.tsx | 52 +++++ .../external/motion/src/transition-utils.ts | 179 ++++++++++++++++++ pnpm-lock.yaml | 39 ++-- 25 files changed, 270 insertions(+), 46 deletions(-) create mode 100644 packages/external/motion/src/resizable-panel.tsx create mode 100644 packages/external/motion/src/transition-utils.ts diff --git a/packages/components/accordion/package.json b/packages/components/accordion/package.json index 6dbe42faca..19ce47166a 100644 --- a/packages/components/accordion/package.json +++ b/packages/components/accordion/package.json @@ -50,7 +50,6 @@ "@heroui/shared-icons": "workspace:*", "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/divider": "workspace:*", "@heroui/use-aria-accordion": "workspace:*", "@heroui/dom-animation": "workspace:*", diff --git a/packages/components/accordion/src/accordion-item.tsx b/packages/components/accordion/src/accordion-item.tsx index 2252cce04f..54035c4d10 100644 --- a/packages/components/accordion/src/accordion-item.tsx +++ b/packages/components/accordion/src/accordion-item.tsx @@ -4,7 +4,7 @@ import {forwardRef} from "@heroui/system"; import {useMemo, ReactNode} from "react"; import {ChevronIcon} from "@heroui/shared-icons"; import {AnimatePresence, LazyMotion, m, useWillChange} from "@heroui/motion"; -import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; +import {TRANSITION_VARIANTS} from "@heroui/motion"; import {UseAccordionItemProps, useAccordionItem} from "./use-accordion-item"; diff --git a/packages/components/calendar/package.json b/packages/components/calendar/package.json index bf623f4acc..4caacb5fb5 100644 --- a/packages/components/calendar/package.json +++ b/packages/components/calendar/package.json @@ -43,7 +43,6 @@ "@heroui/react-utils": "workspace:*", "@heroui/internationalized-date": "workspace:*", "@heroui/shared-icons": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/use-aria-button": "workspace:*", "@heroui/button": "workspace:*", "@heroui/dom-animation": "workspace:*", diff --git a/packages/components/calendar/src/calendar-base.tsx b/packages/components/calendar/src/calendar-base.tsx index 05cee8ecb8..dd6ffd6f49 100644 --- a/packages/components/calendar/src/calendar-base.tsx +++ b/packages/components/calendar/src/calendar-base.tsx @@ -8,7 +8,7 @@ import {VisuallyHidden} from "@react-aria/visually-hidden"; import {Button} from "@heroui/button"; import {chain, mergeProps} from "@react-aria/utils"; import {AnimatePresence, LazyMotion, MotionConfig} from "@heroui/motion"; -import {ResizablePanel} from "@heroui/framer-utils"; +import {ResizablePanel} from "@heroui/motion"; import {ChevronLeftIcon} from "./chevron-left"; import {ChevronRightIcon} from "./chevron-right"; diff --git a/packages/components/drawer/package.json b/packages/components/drawer/package.json index 70355409ab..ce66252c95 100644 --- a/packages/components/drawer/package.json +++ b/packages/components/drawer/package.json @@ -42,7 +42,7 @@ "dependencies": { "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", - "@heroui/framer-utils": "workspace:*", + "@heroui/motion": "workspace:*", "@heroui/modal": "workspace:*" }, "devDependencies": { diff --git a/packages/components/drawer/src/use-drawer.ts b/packages/components/drawer/src/use-drawer.ts index 4d6bf12d47..9e016b772f 100644 --- a/packages/components/drawer/src/use-drawer.ts +++ b/packages/components/drawer/src/use-drawer.ts @@ -3,7 +3,7 @@ import type {ModalProps} from "@heroui/modal"; import {drawer} from "@heroui/theme"; import {ReactRef, useDOMRef} from "@heroui/react-utils"; import {useCallback, useMemo} from "react"; -import {TRANSITION_EASINGS} from "@heroui/framer-utils"; +import {TRANSITION_EASINGS} from "@heroui/motion"; import {clsx, isEmpty} from "@heroui/shared-utils"; import {PropGetter} from "@heroui/system"; diff --git a/packages/components/modal/package.json b/packages/components/modal/package.json index 880190cdf9..09c24573e5 100644 --- a/packages/components/modal/package.json +++ b/packages/components/modal/package.json @@ -43,7 +43,6 @@ "@heroui/use-disclosure": "workspace:*", "@heroui/use-draggable": "workspace:*", "@heroui/use-aria-button": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/shared-icons": "workspace:*", diff --git a/packages/components/modal/src/modal-content.tsx b/packages/components/modal/src/modal-content.tsx index 64dc8f173a..ddcd7d92f8 100644 --- a/packages/components/modal/src/modal-content.tsx +++ b/packages/components/modal/src/modal-content.tsx @@ -3,7 +3,7 @@ import type {HTMLMotionProps} from "@heroui/motion"; import {cloneElement, isValidElement, ReactNode, useMemo, useCallback} from "react"; import {DismissButton} from "@react-aria/overlays"; -import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; +import {TRANSITION_VARIANTS} from "@heroui/motion"; import {CloseIcon} from "@heroui/shared-icons"; import {LazyMotion, m} from "@heroui/motion"; import {useDialog} from "@react-aria/dialog"; diff --git a/packages/components/modal/src/modal-transition.ts b/packages/components/modal/src/modal-transition.ts index a42fadd8b5..2e157c31b4 100644 --- a/packages/components/modal/src/modal-transition.ts +++ b/packages/components/modal/src/modal-transition.ts @@ -1,4 +1,4 @@ -import {TRANSITION_EASINGS} from "@heroui/framer-utils"; +import {TRANSITION_EASINGS} from "@heroui/motion"; export const scaleInOut = { enter: { diff --git a/packages/components/navbar/package.json b/packages/components/navbar/package.json index 45e205756a..09c1532975 100644 --- a/packages/components/navbar/package.json +++ b/packages/components/navbar/package.json @@ -42,7 +42,6 @@ "dependencies": { "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/use-scroll-position": "workspace:*", "@heroui/dom-animation": "workspace:*", "@heroui/motion": "workspace:*", diff --git a/packages/components/navbar/src/navbar-transitions.ts b/packages/components/navbar/src/navbar-transitions.ts index 7f9627db0e..8058c6413c 100644 --- a/packages/components/navbar/src/navbar-transitions.ts +++ b/packages/components/navbar/src/navbar-transitions.ts @@ -1,5 +1,5 @@ import {Variants} from "@heroui/motion"; -import {TRANSITION_EASINGS} from "@heroui/framer-utils"; +import {TRANSITION_EASINGS} from "@heroui/motion"; export const hideOnScrollVariants: Variants = { visible: { diff --git a/packages/components/popover/package.json b/packages/components/popover/package.json index 91cb13d644..6d341c574d 100644 --- a/packages/components/popover/package.json +++ b/packages/components/popover/package.json @@ -42,7 +42,6 @@ "dependencies": { "@heroui/aria-utils": "workspace:*", "@heroui/button": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/shared-utils": "workspace:*", "@heroui/use-aria-button": "workspace:*", diff --git a/packages/components/popover/src/free-solo-popover.tsx b/packages/components/popover/src/free-solo-popover.tsx index 792d3acf5a..b55abff76b 100644 --- a/packages/components/popover/src/free-solo-popover.tsx +++ b/packages/components/popover/src/free-solo-popover.tsx @@ -13,7 +13,7 @@ import {forwardRef} from "@heroui/system"; import {HTMLMotionProps, LazyMotion, m} from "@heroui/motion"; import {mergeProps} from "@react-aria/utils"; import {getTransformOrigins} from "@heroui/aria-utils"; -import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; +import {TRANSITION_VARIANTS} from "@heroui/motion"; import {useDialog} from "@react-aria/dialog"; import {usePopover, UsePopoverProps, UsePopoverReturn} from "./use-popover"; diff --git a/packages/components/popover/src/popover-content.tsx b/packages/components/popover/src/popover-content.tsx index 39e3cc565d..11acbac726 100644 --- a/packages/components/popover/src/popover-content.tsx +++ b/packages/components/popover/src/popover-content.tsx @@ -3,7 +3,7 @@ import type {HTMLMotionProps} from "@heroui/motion"; import {DOMAttributes, ReactNode, useMemo, useRef} from "react"; import {DismissButton} from "@react-aria/overlays"; -import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; +import {TRANSITION_VARIANTS} from "@heroui/motion"; import {m, LazyMotion} from "@heroui/motion"; import {HTMLHeroUIProps} from "@heroui/system"; import {getTransformOrigins} from "@heroui/aria-utils"; diff --git a/packages/components/tabs/package.json b/packages/components/tabs/package.json index c08fc26026..cdba583a41 100644 --- a/packages/components/tabs/package.json +++ b/packages/components/tabs/package.json @@ -43,7 +43,6 @@ "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/aria-utils": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/use-is-mounted": "workspace:*", "@heroui/use-update-effect": "workspace:*", "@heroui/motion": "workspace:*", diff --git a/packages/components/tooltip/package.json b/packages/components/tooltip/package.json index 3ec621fc21..8abb3913e1 100644 --- a/packages/components/tooltip/package.json +++ b/packages/components/tooltip/package.json @@ -43,7 +43,6 @@ "@heroui/shared-utils": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/aria-utils": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/use-safe-layout-effect": "workspace:*", "@heroui/dom-animation": "workspace:*", "@heroui/motion": "workspace:*", diff --git a/packages/components/tooltip/src/tooltip.tsx b/packages/components/tooltip/src/tooltip.tsx index b462c8786c..8928e0dcd7 100644 --- a/packages/components/tooltip/src/tooltip.tsx +++ b/packages/components/tooltip/src/tooltip.tsx @@ -1,7 +1,7 @@ import {forwardRef} from "@heroui/system"; import {OverlayContainer} from "@react-aria/overlays"; import {AnimatePresence, m, LazyMotion} from "@heroui/motion"; -import {TRANSITION_VARIANTS} from "@heroui/framer-utils"; +import {TRANSITION_VARIANTS} from "@heroui/motion"; import {warn} from "@heroui/shared-utils"; import {Children, cloneElement, isValidElement} from "react"; import {getTransformOrigins} from "@heroui/aria-utils"; diff --git a/packages/core/react/package.json b/packages/core/react/package.json index d01a94f207..dc5f9ea579 100644 --- a/packages/core/react/package.json +++ b/packages/core/react/package.json @@ -85,7 +85,6 @@ "@heroui/calendar": "workspace:*", "@heroui/date-input": "workspace:*", "@heroui/date-picker": "workspace:*", - "@heroui/framer-utils": "workspace:*", "@heroui/drawer": "workspace:*", "@heroui/form": "workspace:*", "@heroui/alert": "workspace:*", diff --git a/packages/core/react/src/index.ts b/packages/core/react/src/index.ts index 2b29b0ac5e..0e29812bb4 100644 --- a/packages/core/react/src/index.ts +++ b/packages/core/react/src/index.ts @@ -56,4 +56,4 @@ export {VisuallyHidden} from "@react-aria/visually-hidden"; /** * Individual exports */ -export {ResizablePanel} from "@heroui/framer-utils"; +export {ResizablePanel} from "@heroui/motion"; diff --git a/packages/core/system/package.json b/packages/core/system/package.json index 8f2df21dd1..6bee8bda64 100644 --- a/packages/core/system/package.json +++ b/packages/core/system/package.json @@ -52,6 +52,7 @@ ] }, "dependencies": { + "@heroui/motion": "workspace:*", "@heroui/internationalized-date": "workspace:*", "@heroui/react-utils": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index a43cf6b69a..ca439c0863 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -35,6 +35,8 @@ "postpack": "clean-package restore" }, "dependencies": { + "@heroui/use-measure": "workspace:*", + "@heroui/shared-utils": "workspace:*", "framer-motion": "11.9.0" }, "devDependencies": { diff --git a/packages/external/motion/src/index.ts b/packages/external/motion/src/index.ts index a5e7a09883..64f280e19e 100644 --- a/packages/external/motion/src/index.ts +++ b/packages/external/motion/src/index.ts @@ -1 +1,14 @@ export * from "framer-motion"; + +export type { + TransitionConfig, + TransitionEndConfig, + TransitionProperties, + Variants, +} from "./transition-utils"; + +export {TRANSITION_EASINGS, TRANSITION_DEFAULTS, TRANSITION_VARIANTS} from "./transition-utils"; + +export type {ResizablePanelProps} from "./resizable-panel"; + +export {ResizablePanel} from "./resizable-panel"; diff --git a/packages/external/motion/src/resizable-panel.tsx b/packages/external/motion/src/resizable-panel.tsx new file mode 100644 index 0000000000..e2a708d6ff --- /dev/null +++ b/packages/external/motion/src/resizable-panel.tsx @@ -0,0 +1,52 @@ +import type {Ref} from "react"; + +import {forwardRef} from "react"; +import {domAnimation, LazyMotion, m} from "framer-motion"; +import {useMeasure} from "@heroui/use-measure"; + +// extracted from `@heroui/system` to avoid circular dependencies +type As = React.ElementType; + +type PropsOf = React.ComponentPropsWithoutRef & { + as?: As; +}; + +type HTMLHeroUIProps = Omit< + PropsOf, + "ref" | "color" | "slot" | "size" | "defaultChecked" | "defaultValue" | OmitKeys +> & { + as?: As; +}; + +/** + * Props for the ResizablePanel component. + */ +export interface ResizablePanelProps extends HTMLHeroUIProps<"div"> {} + +const ResizablePanel = forwardRef( + (originalProps: ResizablePanelProps, ref: Ref) => { + const {children, ...props} = originalProps; + + let [measureRef, bounds] = useMeasure(); + + return ( + + 0 ? bounds.width : "auto", + height: bounds.height && bounds.height > 0 ? bounds.height : "auto", + }} + > +
+ {children} +
+
+
+ ); + }, +); + +ResizablePanel.displayName = "HeroUI - ResizablePanel"; + +export {ResizablePanel}; diff --git a/packages/external/motion/src/transition-utils.ts b/packages/external/motion/src/transition-utils.ts new file mode 100644 index 0000000000..78a07da9aa --- /dev/null +++ b/packages/external/motion/src/transition-utils.ts @@ -0,0 +1,179 @@ +import type {Target, TargetAndTransition, Transition} from "framer-motion"; + +type WithMotionState

= Partial>; + +export type TransitionConfig = WithMotionState; + +export type TransitionEndConfig = WithMotionState; + +export type TransitionProperties = { + /** + * Custom `transition` definition for `enter` and `exit` + */ + transition?: TransitionConfig; + /** + * Custom `transitionEnd` definition for `enter` and `exit` + */ + transitionEnd?: TransitionEndConfig; +}; + +type TargetResolver

= (props: P & TransitionProperties) => TargetAndTransition; + +type Variant

= TargetAndTransition | TargetResolver

; + +export type Variants

= Record< + string, + { + enter: Variant

; + exit: Variant

; + initial?: Variant

; + } +>; + +export const TRANSITION_EASINGS = { + ease: [0.36, 0.66, 0.4, 1], + easeIn: [0.4, 0, 1, 1], + easeOut: [0, 0, 0.2, 1], + easeInOut: [0.4, 0, 0.2, 1], + spring: [0.155, 1.105, 0.295, 1.12], + springOut: [0.57, -0.15, 0.62, 0.07], + softSpring: [0.16, 1.11, 0.3, 1.02], +} as const; + +export const TRANSITION_DEFAULTS = { + enter: { + duration: 0.2, + ease: TRANSITION_EASINGS.easeOut, + }, + exit: { + duration: 0.1, + ease: TRANSITION_EASINGS.easeIn, + }, +} as const; + +export const TRANSITION_VARIANTS: Variants = { + scaleSpring: { + enter: { + transform: "scale(1)", + opacity: 1, + transition: { + type: "spring", + bounce: 0, + duration: 0.2, + }, + }, + exit: { + transform: "scale(0.85)", + opacity: 0, + transition: { + type: "easeOut", + duration: 0.15, + }, + }, + }, + scaleSpringOpacity: { + initial: { + opacity: 0, + transform: "scale(0.8)", + }, + enter: { + opacity: 1, + transform: "scale(1)", + transition: { + type: "spring", + bounce: 0, + duration: 0.3, + }, + }, + exit: { + opacity: 0, + transform: "scale(0.96)", + transition: { + type: "easeOut", + bounce: 0, + duration: 0.15, + }, + }, + }, + scale: { + enter: {scale: 1}, + exit: {scale: 0.95}, + }, + scaleFadeIn: { + enter: { + transform: "scale(1)", + opacity: 1, + transition: { + duration: 0.25, + ease: TRANSITION_EASINGS.easeIn, + }, + }, + exit: { + transform: "scale(0.95)", + opacity: 0, + transition: { + duration: 0.2, + ease: TRANSITION_EASINGS.easeOut, + }, + }, + }, + scaleInOut: { + enter: { + transform: "scale(1)", + opacity: 1, + transition: { + duration: 0.4, + ease: TRANSITION_EASINGS.ease, + }, + }, + exit: { + transform: "scale(1.03)", + opacity: 0, + transition: { + duration: 0.3, + ease: TRANSITION_EASINGS.ease, + }, + }, + }, + fade: { + enter: { + opacity: 1, + transition: { + duration: 0.4, + ease: TRANSITION_EASINGS.ease, + }, + }, + exit: { + opacity: 0, + transition: { + duration: 0.3, + ease: TRANSITION_EASINGS.ease, + }, + }, + }, + collapse: { + enter: { + opacity: 1, + height: "auto", + transition: { + height: { + type: "spring", + bounce: 0, + duration: 0.3, + }, + opacity: { + easings: "ease", + duration: 0.4, + }, + }, + }, + exit: { + opacity: 0, + height: 0, + transition: { + easings: "ease", + duration: 0.3, + }, + }, + }, +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef3a6b8bf7..474bf8eb59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -641,9 +641,6 @@ importers: '@heroui/dom-animation': specifier: workspace:* version: link:../../utilities/dom-animation - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -1047,9 +1044,6 @@ importers: '@heroui/dom-animation': specifier: workspace:* version: link:../../utilities/dom-animation - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/internationalized-date': specifier: workspace:* version: link:../../external/internationalized-date @@ -1511,12 +1505,12 @@ importers: packages/components/drawer: dependencies: - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/modal': specifier: workspace:* version: link:../modal + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2043,9 +2037,6 @@ importers: '@heroui/dom-animation': specifier: workspace:* version: link:../../utilities/dom-animation - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -2134,9 +2125,6 @@ importers: '@heroui/dom-animation': specifier: workspace:* version: link:../../utilities/dom-animation - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -2274,9 +2262,6 @@ importers: '@heroui/dom-animation': specifier: workspace:* version: link:../../utilities/dom-animation - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -2950,9 +2935,6 @@ importers: '@heroui/aria-utils': specifier: workspace:* version: link:../../utilities/aria-utils - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -3035,9 +3017,6 @@ importers: '@heroui/dom-animation': specifier: workspace:* version: link:../../utilities/dom-animation - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/motion': specifier: workspace:* version: link:../../external/motion @@ -3187,9 +3166,6 @@ importers: '@heroui/form': specifier: workspace:* version: link:../../components/form - '@heroui/framer-utils': - specifier: workspace:* - version: link:../../utilities/framer-utils '@heroui/image': specifier: workspace:* version: link:../../components/image @@ -3293,6 +3269,9 @@ importers: '@heroui/internationalized-date': specifier: workspace:* version: link:../../external/internationalized-date + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-aria-i18n': specifier: workspace:* version: link:../../external/react-aria-i18n @@ -3405,6 +3384,12 @@ importers: packages/external/motion: dependencies: + '@heroui/shared-utils': + specifier: workspace:* + version: link:../../utilities/shared-utils + '@heroui/use-measure': + specifier: workspace:* + version: link:../../hooks/use-measure framer-motion: specifier: 11.9.0 version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) From cbe0592b2d500db0ff8fcf5700c623b0efbda15d Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 22:36:59 +0800 Subject: [PATCH 33/56] chore(internationalized-date): bump to latest version --- packages/external/internationalized-date/package.json | 2 +- pnpm-lock.yaml | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/external/internationalized-date/package.json b/packages/external/internationalized-date/package.json index 1d3c9655cf..c62f15ccd2 100644 --- a/packages/external/internationalized-date/package.json +++ b/packages/external/internationalized-date/package.json @@ -35,7 +35,7 @@ "postpack": "clean-package restore" }, "dependencies": { - "@internationalized/date": "3.6.0" + "@internationalized/date": "3.7.0" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 474bf8eb59..09d0157528 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3375,8 +3375,8 @@ importers: packages/external/internationalized-date: dependencies: '@internationalized/date': - specifier: 3.6.0 - version: 3.6.0 + specifier: 3.7.0 + version: 3.7.0 devDependencies: clean-package: specifier: 2.2.0 @@ -5807,9 +5807,6 @@ packages: cpu: [x64] os: [win32] - '@internationalized/date@3.6.0': - resolution: {integrity: sha512-+z6ti+CcJnRlLHok/emGEsWQhe7kfSmEW+/6qCzvKY67YPh7YOBfvc7+/+NXq+zJlbArg30tYpqLjNgcAYv2YQ==} - '@internationalized/date@3.7.0': resolution: {integrity: sha512-VJ5WS3fcVx0bejE/YHfbDKR/yawZgKqn/if+oEeLqNwBtPzVB06olkfcnojTmEMX+gTpH+FlQ69SHNitJ8/erQ==} @@ -17542,10 +17539,6 @@ snapshots: '@img/sharp-win32-x64@0.33.5': optional: true - '@internationalized/date@3.6.0': - dependencies: - '@swc/helpers': 0.5.15 - '@internationalized/date@3.7.0': dependencies: '@swc/helpers': 0.5.15 From 85a2f9c358de36f93d91a5fd779a2f9575671e06 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 22:58:16 +0800 Subject: [PATCH 34/56] chore(motion): remove conflicted Variants export --- packages/external/motion/src/index.ts | 7 +------ packages/external/motion/src/transition-utils.ts | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/external/motion/src/index.ts b/packages/external/motion/src/index.ts index 64f280e19e..b29156e436 100644 --- a/packages/external/motion/src/index.ts +++ b/packages/external/motion/src/index.ts @@ -1,11 +1,6 @@ export * from "framer-motion"; -export type { - TransitionConfig, - TransitionEndConfig, - TransitionProperties, - Variants, -} from "./transition-utils"; +export type {TransitionConfig, TransitionEndConfig, TransitionProperties} from "./transition-utils"; export {TRANSITION_EASINGS, TRANSITION_DEFAULTS, TRANSITION_VARIANTS} from "./transition-utils"; diff --git a/packages/external/motion/src/transition-utils.ts b/packages/external/motion/src/transition-utils.ts index 78a07da9aa..4797f16c3f 100644 --- a/packages/external/motion/src/transition-utils.ts +++ b/packages/external/motion/src/transition-utils.ts @@ -21,7 +21,7 @@ type TargetResolver

= (props: P & TransitionProperties) => TargetAndTran type Variant

= TargetAndTransition | TargetResolver

; -export type Variants

= Record< +type Variants

= Record< string, { enter: Variant

; From 816f9d21372ebaafd8486757f51d0cddcaa80735 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 23:00:13 +0800 Subject: [PATCH 35/56] fix(date-picker): add missing `@heroui/react-aria-i18n` import --- packages/components/date-picker/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/components/date-picker/package.json b/packages/components/date-picker/package.json index 5f434ba110..ae2236fc13 100644 --- a/packages/components/date-picker/package.json +++ b/packages/components/date-picker/package.json @@ -51,6 +51,7 @@ "@heroui/shared-utils": "workspace:*", "@heroui/motion": "workspace:*", "@heroui/internationalized-date": "workspace:*", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/datepicker": "3.13.0", "@react-aria/i18n": "3.12.5", "@react-aria/utils": "3.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 09d0157528..2c84e2382f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1419,6 +1419,9 @@ importers: '@heroui/popover': specifier: workspace:* version: link:../popover + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils From b895980afcdcf64fdbab06070f58f034d72308b0 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 23:06:38 +0800 Subject: [PATCH 36/56] chore(deps): use `@heroui/react-aria-i18n` --- apps/docs/package.json | 1 - packages/components/autocomplete/package.json | 2 +- packages/components/calendar/package.json | 1 - packages/components/date-input/package.json | 1 - packages/components/date-picker/package.json | 1 - pnpm-lock.yaml | 18 +++--------------- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/apps/docs/package.json b/apps/docs/package.json index 7a9bbcb7e1..b8af2142c3 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -43,7 +43,6 @@ "@mapbox/rehype-prism": "^0.6.0", "@radix-ui/react-scroll-area": "^1.0.5", "@react-aria/focus": "3.19.1", - "@react-aria/i18n": "3.12.5", "@react-aria/interactions": "3.23.0", "@react-aria/selection": "3.22.0", "@react-aria/ssr": "3.9.7", diff --git a/packages/components/autocomplete/package.json b/packages/components/autocomplete/package.json index 1b55c988e2..70de0f15e5 100644 --- a/packages/components/autocomplete/package.json +++ b/packages/components/autocomplete/package.json @@ -54,9 +54,9 @@ "@heroui/use-aria-button": "workspace:*", "@heroui/use-safe-layout-effect": "workspace:*", "@heroui/motion": "workspace:*", + "@heroui/react-aria-i18n": "workspace:*", "@react-aria/combobox": "3.11.1", "@react-aria/focus": "3.19.1", - "@react-aria/i18n": "3.12.5", "@react-aria/interactions": "3.23.0", "@react-aria/utils": "3.27.0", "@react-aria/visually-hidden": "3.8.19", diff --git a/packages/components/calendar/package.json b/packages/components/calendar/package.json index 4caacb5fb5..0535de9100 100644 --- a/packages/components/calendar/package.json +++ b/packages/components/calendar/package.json @@ -51,7 +51,6 @@ "@heroui/shared-utils": "workspace:*", "@react-aria/calendar": "3.7.0", "@react-aria/focus": "3.19.1", - "@react-aria/i18n": "3.12.5", "@react-stately/calendar": "3.7.0", "@react-types/button": "3.10.2", "@react-aria/visually-hidden": "3.8.19", diff --git a/packages/components/date-input/package.json b/packages/components/date-input/package.json index aabebfcce6..67a3f235c6 100644 --- a/packages/components/date-input/package.json +++ b/packages/components/date-input/package.json @@ -46,7 +46,6 @@ "@heroui/internationalized-date": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", "@react-aria/datepicker": "3.13.0", - "@react-aria/i18n": "3.12.5", "@react-stately/datepicker": "3.12.0", "@react-types/datepicker": "3.10.0", "@react-types/shared": "3.27.0", diff --git a/packages/components/date-picker/package.json b/packages/components/date-picker/package.json index ae2236fc13..9fb97c75f3 100644 --- a/packages/components/date-picker/package.json +++ b/packages/components/date-picker/package.json @@ -53,7 +53,6 @@ "@heroui/internationalized-date": "workspace:*", "@heroui/react-aria-i18n": "workspace:*", "@react-aria/datepicker": "3.13.0", - "@react-aria/i18n": "3.12.5", "@react-aria/utils": "3.27.0", "@react-stately/datepicker": "3.12.0", "@react-stately/overlays": "3.6.13", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2c84e2382f..177ab4bf53 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -346,9 +346,6 @@ importers: '@react-aria/focus': specifier: 3.19.1 version: 3.19.1(react-dom@18.3.0(react@18.3.0))(react@18.3.0) - '@react-aria/i18n': - specifier: 3.12.5 - version: 3.12.5(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@react-aria/interactions': specifier: 3.23.0 version: 3.23.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) @@ -766,6 +763,9 @@ importers: '@heroui/popover': specifier: workspace:* version: link:../popover + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -793,9 +793,6 @@ importers: '@react-aria/focus': specifier: 3.19.1 version: 3.19.1(react-dom@18.3.0(react@18.3.0))(react@18.3.0) - '@react-aria/i18n': - specifier: 3.12.5 - version: 3.12.5(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@react-aria/interactions': specifier: 3.23.0 version: 3.23.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) @@ -1071,9 +1068,6 @@ importers: '@react-aria/focus': specifier: 3.19.1 version: 3.19.1(react-dom@18.3.0(react@18.3.0))(react@18.3.0) - '@react-aria/i18n': - specifier: 3.12.5 - version: 3.12.5(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@react-aria/interactions': specifier: 3.23.0 version: 3.23.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) @@ -1355,9 +1349,6 @@ importers: '@react-aria/datepicker': specifier: 3.13.0 version: 3.13.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) - '@react-aria/i18n': - specifier: 3.12.5 - version: 3.12.5(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@react-aria/utils': specifier: 3.27.0 version: 3.27.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) @@ -1434,9 +1425,6 @@ importers: '@react-aria/datepicker': specifier: 3.13.0 version: 3.13.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) - '@react-aria/i18n': - specifier: 3.12.5 - version: 3.12.5(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@react-aria/utils': specifier: 3.27.0 version: 3.27.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) From 8dc52eb54aee6a08f1f4bced56b218bd774c0b8f Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 23:13:51 +0800 Subject: [PATCH 37/56] chore(deps): add `@heroui/motion` import --- packages/core/react/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/core/react/package.json b/packages/core/react/package.json index dc5f9ea579..c100e629be 100644 --- a/packages/core/react/package.json +++ b/packages/core/react/package.json @@ -88,6 +88,7 @@ "@heroui/drawer": "workspace:*", "@heroui/form": "workspace:*", "@heroui/alert": "workspace:*", + "@heroui/motion": "workspace:*", "@react-aria/visually-hidden": "3.8.19" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de2d80193a..c27b331d3e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3184,6 +3184,9 @@ importers: '@heroui/modal': specifier: workspace:* version: link:../../components/modal + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/navbar': specifier: workspace:* version: link:../../components/navbar From 5eec89d11d0ca0adc6320cb1750c843f57c568a8 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 30 Jan 2025 23:21:11 +0800 Subject: [PATCH 38/56] chore: remove framer-utils package --- .changeset/hot-news-arrive.md | 1 - .changeset/stupid-pants-perform.md | 1 - packages/utilities/framer-utils/CHANGELOG.md | 425 ------------------ packages/utilities/framer-utils/README.md | 24 - packages/utilities/framer-utils/package.json | 52 --- packages/utilities/framer-utils/src/index.ts | 11 - .../framer-utils/src/resizable-panel.tsx | 39 -- .../framer-utils/src/transition-utils.ts | 179 -------- packages/utilities/framer-utils/tsconfig.json | 4 - .../utilities/framer-utils/tsup.config.ts | 8 - 10 files changed, 744 deletions(-) delete mode 100644 packages/utilities/framer-utils/CHANGELOG.md delete mode 100644 packages/utilities/framer-utils/README.md delete mode 100644 packages/utilities/framer-utils/package.json delete mode 100644 packages/utilities/framer-utils/src/index.ts delete mode 100644 packages/utilities/framer-utils/src/resizable-panel.tsx delete mode 100644 packages/utilities/framer-utils/src/transition-utils.ts delete mode 100644 packages/utilities/framer-utils/tsconfig.json delete mode 100644 packages/utilities/framer-utils/tsup.config.ts diff --git a/.changeset/hot-news-arrive.md b/.changeset/hot-news-arrive.md index 573db352a1..7382d2b224 100644 --- a/.changeset/hot-news-arrive.md +++ b/.changeset/hot-news-arrive.md @@ -7,7 +7,6 @@ "@heroui/dom-animation": patch "@heroui/breadcrumbs": patch "@heroui/date-picker": patch -"@heroui/framer-utils": patch "@heroui/date-input": patch "@heroui/pagination": patch "@heroui/accordion": patch diff --git a/.changeset/stupid-pants-perform.md b/.changeset/stupid-pants-perform.md index 274eabf78d..a7c80aa243 100644 --- a/.changeset/stupid-pants-perform.md +++ b/.changeset/stupid-pants-perform.md @@ -15,7 +15,6 @@ "@heroui/breadcrumbs": patch "@heroui/date-picker": patch "@heroui/use-callback-ref": patch -"@heroui/framer-utils": patch "@heroui/shared-icons": patch "@heroui/date-input": patch "@heroui/pagination": patch diff --git a/packages/utilities/framer-utils/CHANGELOG.md b/packages/utilities/framer-utils/CHANGELOG.md deleted file mode 100644 index ae149830f8..0000000000 --- a/packages/utilities/framer-utils/CHANGELOG.md +++ /dev/null @@ -1,425 +0,0 @@ -# @heroui/framer-utils - -## 2.1.7 - -### Patch Changes - -- [#4594](https://github.com/heroui-inc/heroui/pull/4594) [`7ebe0e6`](https://github.com/heroui-inc/heroui/commit/7ebe0e664feb777fe0cad311312d0e02b899319e) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Org name changed - -- Updated dependencies [[`7ebe0e6`](https://github.com/heroui-inc/heroui/commit/7ebe0e664feb777fe0cad311312d0e02b899319e)]: - - @heroui/shared-utils@2.1.3 - - @heroui/use-measure@2.1.2 - - @heroui/system@2.4.7 - -## 2.1.6 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.4.6 - -## 2.1.5 - -### Patch Changes - -- Updated dependencies [[`77206bc`](https://github.com/heroui-inc/heroui/commit/77206bc62596894d038b9715e40b361fec286c10), [`5f388fc`](https://github.com/heroui-inc/heroui/commit/5f388fc68c7db7f852432e73386686d919d44d31)]: - - @heroui/shared-utils@2.1.2 - - @heroui/system@2.4.5 - -## 2.1.4 - -### Patch Changes - -- Updated dependencies [[`1031e98`](https://github.com/heroui-inc/heroui/commit/1031e985b71e69b8a7189ea049b9616257f820b3), [`455556e`](https://github.com/heroui-inc/heroui/commit/455556e14278dd933b4acd1a136ea29879b49545)]: - - @heroui/system@2.4.4 - -## 2.1.3 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.4.3 - -## 2.1.2 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.4.2 - -## 2.1.1 - -### Patch Changes - -- [`d6eee4a`](https://github.com/heroui-inc/heroui/commit/d6eee4a8767556152f47f06dcf04940951abc5af) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - v2.6.2 - -- Updated dependencies [[`d6eee4a`](https://github.com/heroui-inc/heroui/commit/d6eee4a8767556152f47f06dcf04940951abc5af)]: - - @heroui/system@2.4.1 - - @heroui/use-measure@2.1.1 - - @heroui/shared-utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- [`5786897`](https://github.com/heroui-inc/heroui/commit/5786897b9950d95c12351dacd2fb41bb1e298201) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - This release includes several improvements and bug fixes: - - - Updated react-aria version across all components - - Improved Drawer styles and transitions - - Fixed missing peer dependencies for framer-motion - - Fixed menu item classNames functionality - - Added isClearable prop to Textarea component - - Fixed label placement issues in Input and Select components - - Improved table keyboard navigation with new isKeyboardNavigationDisabled prop - - Fixed UI sliding issues with helper wrapper in Input and Select - - Updated use-image hook to avoid Next.js hydration issues - - Replaced RTL-specific styles with logical properties - - Fixed textarea label squish issue - - Bumped tailwind-merge version - - Applied tw nested group fixes - - Fixed fullWidth variant in input and select components - - Moved circular-progress tv to progress - - Changed ListboxItem key to optional - - Fixed autocomplete clear button behavior - - Updated Select label placement logic - - Added missing framer-motion peer dependencies - - Removed layoutNode prop from Table due to react-aria update - - Virtualization added to Autocomplete - -### Patch Changes - -- Updated dependencies [[`26e478d`](https://github.com/heroui-inc/heroui/commit/26e478dd937dedcaf41110171d971a8a3cf2ff52), [`6c0213d`](https://github.com/heroui-inc/heroui/commit/6c0213dfc805aa3c793763c0b25f53b2b80c24dc), [`5786897`](https://github.com/heroui-inc/heroui/commit/5786897b9950d95c12351dacd2fb41bb1e298201)]: - - @heroui/system@2.4.0 - - @heroui/use-measure@2.1.0 - - @heroui/shared-utils@2.1.0 - -## 2.0.26-beta.11 - -### Patch Changes - -- Updated dependencies [[`c8f2ec887`](https://github.com/heroui-inc/heroui/commit/c8f2ec88752289913968331032b9e7f772c12ec4)]: - - @heroui/system@2.3.0-beta.11 - -## 2.0.26-beta.10 - -### Patch Changes - -- [`9869f2b91`](https://github.com/heroui-inc/heroui/commit/9869f2b91d0829f9c7f0500ba05745707820bf27) Thanks [@wingkwong](https://github.com/wingkwong)! - bump version - -- Updated dependencies [[`9869f2b91`](https://github.com/heroui-inc/heroui/commit/9869f2b91d0829f9c7f0500ba05745707820bf27)]: - - @heroui/system@2.3.0-beta.10 - - @heroui/use-measure@2.0.3-beta.5 - - @heroui/shared-utils@2.0.9-beta.8 - -## 2.0.26-beta.9 - -### Patch Changes - -- Updated dependencies [[`eafdb7d47`](https://github.com/heroui-inc/heroui/commit/eafdb7d475a7fcaa7671af77e86fcdf62f14ae00)]: - - @heroui/system@2.3.0-beta.9 - -## 2.0.26-beta.8 - -### Patch Changes - -- Updated dependencies [[`4607fe2ff`](https://github.com/heroui-inc/heroui/commit/4607fe2ff448a536496c2b59ccdfcb217379b6ed)]: - - @heroui/system@2.3.0-beta.8 - -## 2.0.26-beta.7 - -### Patch Changes - -- [#4092](https://github.com/heroui-inc/heroui/pull/4092) [`528668db8`](https://github.com/heroui-inc/heroui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner - -- Updated dependencies [[`528668db8`](https://github.com/heroui-inc/heroui/commit/528668db85b98b46473cb1e214780b7468cdadba)]: - - @heroui/system@2.3.0-beta.7 - - @heroui/use-measure@2.0.3-beta.4 - - @heroui/shared-utils@2.0.9-beta.7 - -## 2.0.26-beta.6 - -### Patch Changes - -- [#4086](https://github.com/heroui-inc/heroui/pull/4086) [`f69fe47b5`](https://github.com/heroui-inc/heroui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean - -- Updated dependencies [[`f69fe47b5`](https://github.com/heroui-inc/heroui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]: - - @heroui/system@2.3.0-beta.6 - - @heroui/use-measure@2.0.3-beta.3 - - @heroui/shared-utils@2.0.9-beta.6 - -## 2.0.26-beta.5 - -### Patch Changes - -- [#4083](https://github.com/heroui-inc/heroui/pull/4083) [`35058262c`](https://github.com/heroui-inc/heroui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build - -- Updated dependencies [[`35058262c`](https://github.com/heroui-inc/heroui/commit/35058262c61628fb42907f529c4417886aa12bb2)]: - - @heroui/system@2.3.0-beta.5 - - @heroui/use-measure@2.0.3-beta.2 - - @heroui/shared-utils@2.0.9-beta.5 - -## 2.0.26-beta.4 - -### Patch Changes - -- Updated dependencies [[`5339b2571`](https://github.com/heroui-inc/heroui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]: - - @heroui/shared-utils@2.0.9-beta.4 - - @heroui/system@2.3.0-beta.4 - -## 2.0.26-beta.3 - -### Patch Changes - -- [#4010](https://github.com/heroui-inc/heroui/pull/4010) [`ef432eb53`](https://github.com/heroui-inc/heroui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added - -- Updated dependencies [[`ef432eb53`](https://github.com/heroui-inc/heroui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]: - - @heroui/system@2.3.0-beta.3 - - @heroui/use-measure@2.0.3-beta.1 - - @heroui/shared-utils@2.0.9-beta.3 - -## 2.0.26-beta.2 - -### Patch Changes - -- [#4008](https://github.com/heroui-inc/heroui/pull/4008) [`7c1c0dd8f`](https://github.com/heroui-inc/heroui/commit/7c1c0dd8fef3ea72996c1095b919574c4b7f9b89) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - React 19 added to peerDeps - -- Updated dependencies [[`7c1c0dd8f`](https://github.com/heroui-inc/heroui/commit/7c1c0dd8fef3ea72996c1095b919574c4b7f9b89)]: - - @heroui/system@2.3.0-beta.2 - - @heroui/use-measure@2.0.3-beta.0 - - @heroui/shared-utils@2.0.9-beta.2 - -## 2.0.26-beta.1 - -### Patch Changes - -- [#3990](https://github.com/heroui-inc/heroui/pull/3990) [`cb5bc4c74`](https://github.com/heroui-inc/heroui/commit/cb5bc4c74f00caaee80dca89c1f02038db315b85) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Beta 1 - -- Updated dependencies [[`cb5bc4c74`](https://github.com/heroui-inc/heroui/commit/cb5bc4c74f00caaee80dca89c1f02038db315b85)]: - - @heroui/system@2.3.0-beta.1 - - @heroui/shared-utils@2.0.9-beta.1 - -## 2.0.26-beta.0 - -### Patch Changes - -- [#3523](https://github.com/heroui-inc/heroui/pull/3523) [`3f0d81b56`](https://github.com/heroui-inc/heroui/commit/3f0d81b560e7ef3eb315bd98407249c0eb4ed5eb) Thanks [@wingkwong](https://github.com/wingkwong)! - update `framer-motion` versions - -- Updated dependencies [[`67ea2f65e`](https://github.com/heroui-inc/heroui/commit/67ea2f65e17f913bdffae4690586a6ae202c8f7d), [`3f0d81b56`](https://github.com/heroui-inc/heroui/commit/3f0d81b560e7ef3eb315bd98407249c0eb4ed5eb), [`3f0d81b56`](https://github.com/heroui-inc/heroui/commit/3f0d81b560e7ef3eb315bd98407249c0eb4ed5eb), [`3f0d81b56`](https://github.com/heroui-inc/heroui/commit/3f0d81b560e7ef3eb315bd98407249c0eb4ed5eb)]: - - @heroui/system@2.3.0-beta.0 - - @heroui/shared-utils@2.0.9-beta.0 - -## 2.0.25 - -### Patch Changes - -- Updated dependencies [[`4ac7674d1`](https://github.com/heroui-inc/heroui/commit/4ac7674d1ec8ed60925412fe1bd1f01ee9f1555a), [`f36df4362`](https://github.com/heroui-inc/heroui/commit/f36df4362f572e8e233d4357f43600265cd5b8d5)]: - - @heroui/system@2.2.6 - - @heroui/shared-utils@2.0.8 - -## 2.0.24 - -### Patch Changes - -- [#3512](https://github.com/heroui-inc/heroui/pull/3512) [`2d2d300a1`](https://github.com/heroui-inc/heroui/commit/2d2d300a12dbe20ca7ebd125daf3dce74efcbf34) Thanks [@wingkwong](https://github.com/wingkwong)! - fix conflicting versions in npm - -- Updated dependencies [[`2d2d300a1`](https://github.com/heroui-inc/heroui/commit/2d2d300a12dbe20ca7ebd125daf3dce74efcbf34)]: - - @heroui/system@2.2.5 - - @heroui/use-measure@2.0.2 - - @heroui/shared-utils@2.0.7 - -## 2.0.23 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.2.4 - -## 2.0.22 - -### Patch Changes - -- Updated dependencies [[`f5d94f96e`](https://github.com/heroui-inc/heroui/commit/f5d94f96e4cffed1d4aeef971c89f8d283effd49)]: - - @heroui/system@2.2.3 - - @heroui/shared-utils@2.0.6 - -## 2.0.21 - -### Patch Changes - -- Updated dependencies [[`47c2472fb`](https://github.com/heroui-inc/heroui/commit/47c2472fb22bfe1c0c357b5ba12e5606eba0d65b)]: - - @heroui/system@2.2.2 - -## 2.0.20 - -### Patch Changes - -- Updated dependencies [[`685995a12`](https://github.com/heroui-inc/heroui/commit/685995a125cc3db26c6adb67ed9f7245b87e792a), [`685995a12`](https://github.com/heroui-inc/heroui/commit/685995a125cc3db26c6adb67ed9f7245b87e792a)]: - - @heroui/system@2.2.1 - -## 2.0.19 - -### Patch Changes - -- [#2929](https://github.com/heroui-inc/heroui/pull/2929) [`422770cc6`](https://github.com/heroui-inc/heroui/commit/422770cc6bcdd1d4c51257654ab718f3c19d6cb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Add support for disabling the animations globally. - -- Updated dependencies [[`e3afa4789`](https://github.com/heroui-inc/heroui/commit/e3afa4789a1ac0fa929b2acaca5bd9c520567ab8), [`422770cc6`](https://github.com/heroui-inc/heroui/commit/422770cc6bcdd1d4c51257654ab718f3c19d6cb2), [`540aa2124`](https://github.com/heroui-inc/heroui/commit/540aa2124b45b65a40e73f5aea2b90405fe1fe9a)]: - - @heroui/system@2.2.0 - -## 2.0.18 - -### Patch Changes - -- [#2789](https://github.com/heroui-inc/heroui/pull/2789) [`eccc2f2f3`](https://github.com/heroui-inc/heroui/commit/eccc2f2f3d856eefb2cc7c07b94e1c4cefd4d7d0) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix #2749 Introduced named exports for several UI-related packages to enhance modularity and usability in Next.js projects. - -- Updated dependencies [[`eccc2f2f3`](https://github.com/heroui-inc/heroui/commit/eccc2f2f3d856eefb2cc7c07b94e1c4cefd4d7d0)]: - - @heroui/system@2.1.2 - -## 2.0.17 - -### Patch Changes - -- Updated dependencies [[`74eda3128`](https://github.com/heroui-inc/heroui/commit/74eda312883b2e17df26f71442aba9fb3cd240be)]: - - @heroui/system@2.1.1 - -## 2.0.16 - -### Patch Changes - -- [#2618](https://github.com/heroui-inc/heroui/pull/2618) [`dc0bcf13a`](https://github.com/heroui-inc/heroui/commit/dc0bcf13a5e9aa0450938bcca47cd4c696066f14) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - v2.3.0 - -- [#2618](https://github.com/heroui-inc/heroui/pull/2618) [`dc0bcf13a`](https://github.com/heroui-inc/heroui/commit/dc0bcf13a5e9aa0450938bcca47cd4c696066f14) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - - Calendar component added - - objectToDeps function applied all across components - - `useMeasure` hook added - - `useIntersectionObserver` hook added - - `framer-transitions` renamed to `framer-utils` - - `ResizablePanel` component added to `framer-utils` - - `test-utils` updated -- Updated dependencies [[`dc0bcf13a`](https://github.com/heroui-inc/heroui/commit/dc0bcf13a5e9aa0450938bcca47cd4c696066f14), [`dc0bcf13a`](https://github.com/heroui-inc/heroui/commit/dc0bcf13a5e9aa0450938bcca47cd4c696066f14)]: - - @heroui/system@2.1.0 - - @heroui/use-measure@2.0.1 - - @heroui/shared-utils@2.0.5 - -## 2.0.15 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.0.15 - -## 2.0.14 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.0.14 - -## 2.0.13 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.0.13 - -## 2.0.12 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.0.12 - -## 2.0.11 - -### Patch Changes - -- [`25e86fb41`](https://github.com/heroui-inc/heroui/commit/25e86fb41770d3cdae6dfdb79306b78fa02d8187) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - New version v2.2.0 - -- Updated dependencies [[`25e86fb41`](https://github.com/heroui-inc/heroui/commit/25e86fb41770d3cdae6dfdb79306b78fa02d8187)]: - - @heroui/system@2.0.11 - - @heroui/shared-utils@2.0.4 - -## 2.0.10 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.0.10 - -## 2.0.9 - -### Patch Changes - -- [#1600](https://github.com/heroui-inc/heroui/pull/1600) [`b1b30b797`](https://github.com/heroui-inc/heroui/commit/b1b30b7976f1d6652808fbf12ffde044f0861572) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix npm deploy - -- Updated dependencies [[`b1b30b797`](https://github.com/heroui-inc/heroui/commit/b1b30b7976f1d6652808fbf12ffde044f0861572)]: - - @heroui/system@2.0.9 - - @heroui/shared-utils@2.0.3 - -## 2.0.8 - -### Patch Changes - -- Updated dependencies [[`1612532ee`](https://github.com/heroui-inc/heroui/commit/1612532eeeabbc49165546b1a2e7aebf89e7a1c2)]: - - @heroui/system@2.0.8 - -## 2.0.7 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.0.7 - -## 2.0.6 - -### Patch Changes - -- Updated dependencies [[`641bf0885`](https://github.com/heroui-inc/heroui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]: - - @heroui/system@2.0.6 - -## 2.0.5 - -### Patch Changes - -- [#1359](https://github.com/heroui-inc/heroui/pull/1359) [`a30cec48`](https://github.com/heroui-inc/heroui/commit/a30cec4810988fb1962f3a61e0fc0362de08b171) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - \n - - - react-aria packages upgraded to the latest version - - image storybooks fixed - - other bug fixes.. - -- Updated dependencies [[`a30cec48`](https://github.com/heroui-inc/heroui/commit/a30cec4810988fb1962f3a61e0fc0362de08b171)]: - - @heroui/system@2.0.5 - -## 2.0.4 - -### Patch Changes - -- Updated dependencies [[`710395f3`](https://github.com/heroui-inc/heroui/commit/710395f3a2ca44238332237a49e948c933abe63d)]: - - @heroui/system@2.0.4 - -## 2.0.3 - -### Patch Changes - -- [`e3e13a09`](https://github.com/heroui-inc/heroui/commit/e3e13a095f2347ff279c85e6a5d3798f36c6533f) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - New package created to exports system RSC-compatible functions - Component exports changed to named exports -- Updated dependencies [[`eefda8d6`](https://github.com/heroui-inc/heroui/commit/eefda8d6e2088526e0dbb2026d807b53d2a97782), [`e3e13a09`](https://github.com/heroui-inc/heroui/commit/e3e13a095f2347ff279c85e6a5d3798f36c6533f)]: - - @heroui/system@2.0.3 - - @heroui/shared-utils@2.0.2 - -## 2.0.2 - -### Patch Changes - -- Updated dependencies []: - - @heroui/system@2.0.2 - -## 2.0.1 - -### Patch Changes - -- [`e940ec06`](https://github.com/heroui-inc/heroui/commit/e940ec06ac5e46340d5956fb7c455a6ab3de3140) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Introducing NextUI v2.0 - -- [`e940ec06`](https://github.com/heroui-inc/heroui/commit/e940ec06ac5e46340d5956fb7c455a6ab3de3140) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Introducing v2 - Readmes updated - -- Updated dependencies [[`e940ec06`](https://github.com/heroui-inc/heroui/commit/e940ec06ac5e46340d5956fb7c455a6ab3de3140), [`e940ec06`](https://github.com/heroui-inc/heroui/commit/e940ec06ac5e46340d5956fb7c455a6ab3de3140)]: - - @heroui/shared-utils@2.0.1 - - @heroui/system@2.0.1 diff --git a/packages/utilities/framer-utils/README.md b/packages/utilities/framer-utils/README.md deleted file mode 100644 index c31c8d356e..0000000000 --- a/packages/utilities/framer-utils/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# @heroui/framer-utils - -A Quick description of the component - -> This is an internal utility, not intended for public usage. - -## Installation - -```sh -yarn add @heroui/framer-utils -# or -npm i @heroui/framer-utils -``` - -## Contribution - -Yes please! See the -[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md) -for details. - -## License - -This project is licensed under the terms of the -[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE). diff --git a/packages/utilities/framer-utils/package.json b/packages/utilities/framer-utils/package.json deleted file mode 100644 index df2b237f76..0000000000 --- a/packages/utilities/framer-utils/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@heroui/framer-utils", - "version": "2.1.7", - "description": "A set of framer motion transitions for react", - "keywords": [ - "framer-utils" - ], - "author": "Junior Garcia ", - "homepage": "https://heroui.com", - "license": "MIT", - "main": "src/index.ts", - "sideEffects": false, - "files": [ - "dist" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/heroui-inc/heroui.git", - "directory": "packages/utilities/framer-utils" - }, - "bugs": { - "url": "https://github.com/heroui-inc/heroui/issues" - }, - "scripts": { - "build": "tsup src --dts", - "build:fast": "tsup src", - "dev": "pnpm build:fast --watch", - "clean": "rimraf dist .turbo", - "typecheck": "tsc --noEmit", - "prepack": "clean-package", - "postpack": "clean-package restore" - }, - "peerDependencies": { - "react": ">=18 || >=19.0.0-rc.0", - "react-dom": ">=18 || >=19.0.0-rc.0" - }, - "dependencies": { - "@heroui/system": "workspace:*", - "@heroui/use-measure": "workspace:*", - "@heroui/shared-utils": "workspace:*", - "@heroui/motion": "workspace:*" - }, - "devDependencies": { - "react": "18.3.0", - "react-dom": "18.3.0", - "clean-package": "2.2.0" - }, - "clean-package": "../../../clean-package.config.json" -} \ No newline at end of file diff --git a/packages/utilities/framer-utils/src/index.ts b/packages/utilities/framer-utils/src/index.ts deleted file mode 100644 index 9c43029e77..0000000000 --- a/packages/utilities/framer-utils/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export type { - TransitionConfig, - TransitionEndConfig, - TransitionProperties, - Variants, -} from "./transition-utils"; - -export {TRANSITION_EASINGS, TRANSITION_DEFAULTS, TRANSITION_VARIANTS} from "./transition-utils"; - -export type {ResizablePanelProps} from "./resizable-panel"; -export {ResizablePanel} from "./resizable-panel"; diff --git a/packages/utilities/framer-utils/src/resizable-panel.tsx b/packages/utilities/framer-utils/src/resizable-panel.tsx deleted file mode 100644 index 34bb7a312d..0000000000 --- a/packages/utilities/framer-utils/src/resizable-panel.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import type {Ref} from "react"; - -import {forwardRef} from "react"; -import {domAnimation, LazyMotion, m} from "@heroui/motion"; -import {useMeasure} from "@heroui/use-measure"; -import {HTMLHeroUIProps} from "@heroui/system"; - -/** - * Props for the ResizablePanel component. - */ -export interface ResizablePanelProps extends HTMLHeroUIProps<"div"> {} - -const ResizablePanel = forwardRef( - (originalProps: ResizablePanelProps, ref: Ref) => { - const {children, ...props} = originalProps; - - let [measureRef, bounds] = useMeasure(); - - return ( - - 0 ? bounds.width : "auto", - height: bounds.height && bounds.height > 0 ? bounds.height : "auto", - }} - > -

- {children} -
- - - ); - }, -); - -ResizablePanel.displayName = "HeroUI - ResizablePanel"; - -export {ResizablePanel}; diff --git a/packages/utilities/framer-utils/src/transition-utils.ts b/packages/utilities/framer-utils/src/transition-utils.ts deleted file mode 100644 index 51675aeb5f..0000000000 --- a/packages/utilities/framer-utils/src/transition-utils.ts +++ /dev/null @@ -1,179 +0,0 @@ -import type {Target, TargetAndTransition, Transition} from "@heroui/motion"; - -type WithMotionState

= Partial>; - -export type TransitionConfig = WithMotionState; - -export type TransitionEndConfig = WithMotionState; - -export type TransitionProperties = { - /** - * Custom `transition` definition for `enter` and `exit` - */ - transition?: TransitionConfig; - /** - * Custom `transitionEnd` definition for `enter` and `exit` - */ - transitionEnd?: TransitionEndConfig; -}; - -type TargetResolver

= (props: P & TransitionProperties) => TargetAndTransition; - -type Variant

= TargetAndTransition | TargetResolver

; - -export type Variants

= Record< - string, - { - enter: Variant

; - exit: Variant

; - initial?: Variant

; - } ->; - -export const TRANSITION_EASINGS = { - ease: [0.36, 0.66, 0.4, 1], - easeIn: [0.4, 0, 1, 1], - easeOut: [0, 0, 0.2, 1], - easeInOut: [0.4, 0, 0.2, 1], - spring: [0.155, 1.105, 0.295, 1.12], - springOut: [0.57, -0.15, 0.62, 0.07], - softSpring: [0.16, 1.11, 0.3, 1.02], -} as const; - -export const TRANSITION_DEFAULTS = { - enter: { - duration: 0.2, - ease: TRANSITION_EASINGS.easeOut, - }, - exit: { - duration: 0.1, - ease: TRANSITION_EASINGS.easeIn, - }, -} as const; - -export const TRANSITION_VARIANTS: Variants = { - scaleSpring: { - enter: { - transform: "scale(1)", - opacity: 1, - transition: { - type: "spring", - bounce: 0, - duration: 0.2, - }, - }, - exit: { - transform: "scale(0.85)", - opacity: 0, - transition: { - type: "easeOut", - duration: 0.15, - }, - }, - }, - scaleSpringOpacity: { - initial: { - opacity: 0, - transform: "scale(0.8)", - }, - enter: { - opacity: 1, - transform: "scale(1)", - transition: { - type: "spring", - bounce: 0, - duration: 0.3, - }, - }, - exit: { - opacity: 0, - transform: "scale(0.96)", - transition: { - type: "easeOut", - bounce: 0, - duration: 0.15, - }, - }, - }, - scale: { - enter: {scale: 1}, - exit: {scale: 0.95}, - }, - scaleFadeIn: { - enter: { - transform: "scale(1)", - opacity: 1, - transition: { - duration: 0.25, - ease: TRANSITION_EASINGS.easeIn, - }, - }, - exit: { - transform: "scale(0.95)", - opacity: 0, - transition: { - duration: 0.2, - ease: TRANSITION_EASINGS.easeOut, - }, - }, - }, - scaleInOut: { - enter: { - transform: "scale(1)", - opacity: 1, - transition: { - duration: 0.4, - ease: TRANSITION_EASINGS.ease, - }, - }, - exit: { - transform: "scale(1.03)", - opacity: 0, - transition: { - duration: 0.3, - ease: TRANSITION_EASINGS.ease, - }, - }, - }, - fade: { - enter: { - opacity: 1, - transition: { - duration: 0.4, - ease: TRANSITION_EASINGS.ease, - }, - }, - exit: { - opacity: 0, - transition: { - duration: 0.3, - ease: TRANSITION_EASINGS.ease, - }, - }, - }, - collapse: { - enter: { - opacity: 1, - height: "auto", - transition: { - height: { - type: "spring", - bounce: 0, - duration: 0.3, - }, - opacity: { - easings: "ease", - duration: 0.4, - }, - }, - }, - exit: { - opacity: 0, - height: 0, - transition: { - easings: "ease", - duration: 0.3, - }, - }, - }, -}; diff --git a/packages/utilities/framer-utils/tsconfig.json b/packages/utilities/framer-utils/tsconfig.json deleted file mode 100644 index 46e3b466c2..0000000000 --- a/packages/utilities/framer-utils/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "include": ["src", "index.ts"] -} diff --git a/packages/utilities/framer-utils/tsup.config.ts b/packages/utilities/framer-utils/tsup.config.ts deleted file mode 100644 index 3e2bcff6cc..0000000000 --- a/packages/utilities/framer-utils/tsup.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {defineConfig} from "tsup"; - -export default defineConfig({ - clean: true, - target: "es2019", - format: ["cjs", "esm"], - banner: {js: '"use client";'}, -}); From 50aee8411a33f7db88d683b82fd4bfaf3c028659 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 22:50:43 +0800 Subject: [PATCH 39/56] chore(deps): migrate `framer-motion` to `motion` --- packages/external/motion/package.json | 2 +- packages/external/motion/src/index.ts | 2 +- .../external/motion/src/resizable-panel.tsx | 2 +- .../external/motion/src/transition-utils.ts | 2 +- pnpm-lock.yaml | 90 +++++++++++++------ 5 files changed, 66 insertions(+), 32 deletions(-) diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index ca439c0863..d8c3425e7f 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -37,7 +37,7 @@ "dependencies": { "@heroui/use-measure": "workspace:*", "@heroui/shared-utils": "workspace:*", - "framer-motion": "11.9.0" + "motion": "12.0.6" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/packages/external/motion/src/index.ts b/packages/external/motion/src/index.ts index b29156e436..a9be4b0ba3 100644 --- a/packages/external/motion/src/index.ts +++ b/packages/external/motion/src/index.ts @@ -1,4 +1,4 @@ -export * from "framer-motion"; +export * from "motion/react"; export type {TransitionConfig, TransitionEndConfig, TransitionProperties} from "./transition-utils"; diff --git a/packages/external/motion/src/resizable-panel.tsx b/packages/external/motion/src/resizable-panel.tsx index e2a708d6ff..c067e9cda7 100644 --- a/packages/external/motion/src/resizable-panel.tsx +++ b/packages/external/motion/src/resizable-panel.tsx @@ -1,7 +1,7 @@ import type {Ref} from "react"; import {forwardRef} from "react"; -import {domAnimation, LazyMotion, m} from "framer-motion"; +import {domAnimation, LazyMotion, m} from "motion/react"; import {useMeasure} from "@heroui/use-measure"; // extracted from `@heroui/system` to avoid circular dependencies diff --git a/packages/external/motion/src/transition-utils.ts b/packages/external/motion/src/transition-utils.ts index 4797f16c3f..22b14c9000 100644 --- a/packages/external/motion/src/transition-utils.ts +++ b/packages/external/motion/src/transition-utils.ts @@ -1,4 +1,4 @@ -import type {Target, TargetAndTransition, Transition} from "framer-motion"; +import type {Target, TargetAndTransition, Transition} from "motion/react"; type WithMotionState

= Partial>; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c27b331d3e..b6d8905b2b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3387,9 +3387,9 @@ importers: '@heroui/use-measure': specifier: workspace:* version: link:../../hooks/use-measure - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + motion: + specifier: 12.0.6 + version: 12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) devDependencies: clean-package: specifier: 2.2.0 @@ -3958,31 +3958,6 @@ importers: specifier: 2.2.0 version: 2.2.0 - packages/utilities/framer-utils: - dependencies: - '@heroui/motion': - specifier: workspace:* - version: link:../../external/motion - '@heroui/shared-utils': - specifier: workspace:* - version: link:../shared-utils - '@heroui/system': - specifier: workspace:* - version: link:../../core/system - '@heroui/use-measure': - specifier: workspace:* - version: link:../../hooks/use-measure - devDependencies: - clean-package: - specifier: 2.2.0 - version: 2.2.0 - react: - specifier: 18.3.0 - version: 18.3.0 - react-dom: - specifier: 18.3.0 - version: 18.3.0(react@18.3.0) - packages/utilities/react-rsc-utils: devDependencies: clean-package: @@ -10509,6 +10484,20 @@ packages: react-dom: optional: true + framer-motion@12.0.6: + resolution: {integrity: sha512-LmrXbXF6Vv5WCNmb+O/zn891VPZrH7XbsZgRLBROw6kFiP+iTK49gxTv2Ur3F0Tbw6+sy9BVtSqnWfMUpH+6nA==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: 18.3.0 + react-dom: 18.3.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -12529,6 +12518,26 @@ packages: mlly@1.7.3: resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} + motion-dom@12.0.0: + resolution: {integrity: sha512-CvYd15OeIR6kHgMdonCc1ihsaUG4MYh/wrkz8gZ3hBX/uamyZCXN9S9qJoYF03GqfTt7thTV/dxnHYX4+55vDg==} + + motion-utils@12.0.0: + resolution: {integrity: sha512-MNFiBKbbqnmvOjkPyOKgHUp3Q6oiokLkI1bEwm5QA28cxMZrv0CbbBGDNmhF6DIXsi1pCQBSs0dX8xjeER1tmA==} + + motion@12.0.6: + resolution: {integrity: sha512-AzCEO0+//mPlcGiL9JaVwjddHY1cbbnvz5upHL0toqQwsPCs+hiKJ0XG5jfG0XwDtBbiSXdEqW/UTmGLwkVQ6A==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: 18.3.0 + react-dom: 18.3.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -23789,6 +23798,16 @@ snapshots: react: 18.3.0 react-dom: 18.3.0(react@18.3.0) + framer-motion@12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): + dependencies: + motion-dom: 12.0.0 + motion-utils: 12.0.0 + tslib: 2.8.1 + optionalDependencies: + '@emotion/is-prop-valid': 1.3.1 + react: 18.3.0 + react-dom: 18.3.0(react@18.3.0) + fs-constants@1.0.0: {} fs-extra@10.1.0: @@ -26444,6 +26463,21 @@ snapshots: pkg-types: 1.3.0 ufo: 1.5.4 + motion-dom@12.0.0: + dependencies: + motion-utils: 12.0.0 + + motion-utils@12.0.0: {} + + motion@12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): + dependencies: + framer-motion: 12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + tslib: 2.8.1 + optionalDependencies: + '@emotion/is-prop-valid': 1.3.1 + react: 18.3.0 + react-dom: 18.3.0(react@18.3.0) + mri@1.2.0: {} mrmime@2.0.0: {} From 87f2d9ea8c96232d1c9a5b106bfa8d5e8c499f05 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:02:14 +0800 Subject: [PATCH 40/56] refactor: remove framer-motion --- .npmrc | 1 - packages/components/accordion/tsconfig.json | 1 - packages/components/alert/tsconfig.json | 1 - packages/components/autocomplete/tsconfig.json | 1 - packages/components/avatar/tsconfig.json | 1 - packages/components/badge/tsconfig.json | 1 - packages/components/breadcrumbs/tsconfig.json | 1 - packages/components/button/tsconfig.json | 1 - packages/components/calendar/tsconfig.json | 1 - packages/components/card/tsconfig.json | 1 - packages/components/checkbox/tsconfig.json | 1 - packages/components/chip/tsconfig.json | 1 - packages/components/code/tsconfig.json | 1 - packages/components/date-input/tsconfig.json | 1 - packages/components/date-picker/tsconfig.json | 1 - packages/components/divider/tsconfig.json | 1 - packages/components/drawer/tsconfig.json | 1 - packages/components/dropdown/tsconfig.json | 3 +-- packages/components/form/tsconfig.json | 1 - packages/components/image/tsconfig.json | 1 - packages/components/input-otp/tsconfig.json | 1 - packages/components/input/tsconfig.json | 1 - packages/components/kbd/tsconfig.json | 1 - packages/components/link/tsconfig.json | 1 - packages/components/listbox/tsconfig.json | 1 - packages/components/menu/tsconfig.json | 1 - packages/components/modal/tsconfig.json | 1 - packages/components/navbar/tsconfig.json | 1 - packages/components/pagination/tsconfig.json | 1 - packages/components/popover/tsconfig.json | 1 - packages/components/progress/tsconfig.json | 1 - packages/components/radio/tsconfig.json | 1 - packages/components/ripple/tsconfig.json | 1 - packages/components/scroll-shadow/tsconfig.json | 1 - packages/components/select/package.json | 1 - packages/components/select/tsconfig.json | 1 - packages/components/skeleton/tsconfig.json | 1 - packages/components/slider/tsconfig.json | 1 - packages/components/snippet/tsconfig.json | 3 +-- packages/components/spacer/tsconfig.json | 1 - packages/components/spinner/tsconfig.json | 1 - packages/components/switch/tsconfig.json | 1 - packages/components/table/tsconfig.json | 1 - packages/components/tabs/tsconfig.json | 1 - packages/components/tooltip/tsconfig.json | 3 +-- packages/components/user/tsconfig.json | 1 - packages/core/react/tsconfig.json | 3 +-- packages/core/system-rsc/tsconfig.json | 1 - packages/core/system/tsconfig.json | 1 - plop/component/tsconfig.json.hbs | 1 - 50 files changed, 4 insertions(+), 54 deletions(-) diff --git a/.npmrc b/.npmrc index ebf0644e99..3e00956460 100644 --- a/.npmrc +++ b/.npmrc @@ -1,6 +1,5 @@ strict-peer-dependencies=false enable-pre-post-scripts=true public-hoist-pattern[]=*tailwind-variants* -public-hoist-pattern[]=*framer-motion* public-hoist-pattern[]=*@react-aria/interactions* public-hoist-pattern[]=*@heroui/theme* \ No newline at end of file diff --git a/packages/components/accordion/tsconfig.json b/packages/components/accordion/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/accordion/tsconfig.json +++ b/packages/components/accordion/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/alert/tsconfig.json b/packages/components/alert/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/alert/tsconfig.json +++ b/packages/components/alert/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/autocomplete/tsconfig.json b/packages/components/autocomplete/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/autocomplete/tsconfig.json +++ b/packages/components/autocomplete/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/avatar/tsconfig.json b/packages/components/avatar/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/avatar/tsconfig.json +++ b/packages/components/avatar/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/badge/tsconfig.json b/packages/components/badge/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/badge/tsconfig.json +++ b/packages/components/badge/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/breadcrumbs/tsconfig.json b/packages/components/breadcrumbs/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/breadcrumbs/tsconfig.json +++ b/packages/components/breadcrumbs/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/button/tsconfig.json b/packages/components/button/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/button/tsconfig.json +++ b/packages/components/button/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/calendar/tsconfig.json b/packages/components/calendar/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/calendar/tsconfig.json +++ b/packages/components/calendar/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/card/tsconfig.json b/packages/components/card/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/card/tsconfig.json +++ b/packages/components/card/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/checkbox/tsconfig.json b/packages/components/checkbox/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/checkbox/tsconfig.json +++ b/packages/components/checkbox/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/chip/tsconfig.json b/packages/components/chip/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/chip/tsconfig.json +++ b/packages/components/chip/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/code/tsconfig.json b/packages/components/code/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/code/tsconfig.json +++ b/packages/components/code/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/date-input/tsconfig.json b/packages/components/date-input/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/date-input/tsconfig.json +++ b/packages/components/date-input/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/date-picker/tsconfig.json b/packages/components/date-picker/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/date-picker/tsconfig.json +++ b/packages/components/date-picker/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/divider/tsconfig.json b/packages/components/divider/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/divider/tsconfig.json +++ b/packages/components/divider/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/drawer/tsconfig.json b/packages/components/drawer/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/drawer/tsconfig.json +++ b/packages/components/drawer/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/dropdown/tsconfig.json b/packages/components/dropdown/tsconfig.json index 1ec8134837..a4b2b7a951 100644 --- a/packages/components/dropdown/tsconfig.json +++ b/packages/components/dropdown/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"], + "tailwind-variants": ["../../../node_modules/tailwind-variants"],, } }, "include": ["src", "index.ts"] diff --git a/packages/components/form/tsconfig.json b/packages/components/form/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/form/tsconfig.json +++ b/packages/components/form/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/image/tsconfig.json b/packages/components/image/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/image/tsconfig.json +++ b/packages/components/image/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/input-otp/tsconfig.json b/packages/components/input-otp/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/input-otp/tsconfig.json +++ b/packages/components/input-otp/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/input/tsconfig.json b/packages/components/input/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/input/tsconfig.json +++ b/packages/components/input/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/kbd/tsconfig.json b/packages/components/kbd/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/kbd/tsconfig.json +++ b/packages/components/kbd/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/link/tsconfig.json b/packages/components/link/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/link/tsconfig.json +++ b/packages/components/link/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/listbox/tsconfig.json b/packages/components/listbox/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/listbox/tsconfig.json +++ b/packages/components/listbox/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/menu/tsconfig.json b/packages/components/menu/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/menu/tsconfig.json +++ b/packages/components/menu/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/modal/tsconfig.json b/packages/components/modal/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/modal/tsconfig.json +++ b/packages/components/modal/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/navbar/tsconfig.json b/packages/components/navbar/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/navbar/tsconfig.json +++ b/packages/components/navbar/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/pagination/tsconfig.json b/packages/components/pagination/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/pagination/tsconfig.json +++ b/packages/components/pagination/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/popover/tsconfig.json b/packages/components/popover/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/popover/tsconfig.json +++ b/packages/components/popover/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/progress/tsconfig.json b/packages/components/progress/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/progress/tsconfig.json +++ b/packages/components/progress/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/radio/tsconfig.json b/packages/components/radio/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/radio/tsconfig.json +++ b/packages/components/radio/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/ripple/tsconfig.json b/packages/components/ripple/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/ripple/tsconfig.json +++ b/packages/components/ripple/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/scroll-shadow/tsconfig.json b/packages/components/scroll-shadow/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/scroll-shadow/tsconfig.json +++ b/packages/components/scroll-shadow/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/select/package.json b/packages/components/select/package.json index 9bcbace535..54934ffda4 100644 --- a/packages/components/select/package.json +++ b/packages/components/select/package.json @@ -74,7 +74,6 @@ "@heroui/react-aria-i18n": "workspace:*", "@react-stately/data": "3.12.1", "clean-package": "2.2.0", - "framer-motion": "11.9.0", "react": "18.3.0", "react-dom": "18.3.0", "react-hook-form": "^7.51.3" diff --git a/packages/components/select/tsconfig.json b/packages/components/select/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/select/tsconfig.json +++ b/packages/components/select/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/skeleton/tsconfig.json b/packages/components/skeleton/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/skeleton/tsconfig.json +++ b/packages/components/skeleton/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/slider/tsconfig.json b/packages/components/slider/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/slider/tsconfig.json +++ b/packages/components/slider/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/snippet/tsconfig.json b/packages/components/snippet/tsconfig.json index f0c944f8f7..a8aa75493e 100644 --- a/packages/components/snippet/tsconfig.json +++ b/packages/components/snippet/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"], + "tailwind-variants": ["../../../node_modules/tailwind-variants"],, "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/components/spacer/tsconfig.json b/packages/components/spacer/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/spacer/tsconfig.json +++ b/packages/components/spacer/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/spinner/tsconfig.json b/packages/components/spinner/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/spinner/tsconfig.json +++ b/packages/components/spinner/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/components/switch/tsconfig.json b/packages/components/switch/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/switch/tsconfig.json +++ b/packages/components/switch/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/table/tsconfig.json b/packages/components/table/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/table/tsconfig.json +++ b/packages/components/table/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/tabs/tsconfig.json b/packages/components/tabs/tsconfig.json index 3f8946780b..5b4094a6ed 100644 --- a/packages/components/tabs/tsconfig.json +++ b/packages/components/tabs/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"] diff --git a/packages/components/tooltip/tsconfig.json b/packages/components/tooltip/tsconfig.json index f0c944f8f7..a8aa75493e 100644 --- a/packages/components/tooltip/tsconfig.json +++ b/packages/components/tooltip/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"], + "tailwind-variants": ["../../../node_modules/tailwind-variants"],, "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/components/user/tsconfig.json b/packages/components/user/tsconfig.json index 3af3b8ad6a..8ea21e5a73 100644 --- a/packages/components/user/tsconfig.json +++ b/packages/components/user/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] diff --git a/packages/core/react/tsconfig.json b/packages/core/react/tsconfig.json index 2f66bcdc74..0bfee0184c 100644 --- a/packages/core/react/tsconfig.json +++ b/packages/core/react/tsconfig.json @@ -4,8 +4,7 @@ "baseUrl": ".", "allowJs": true, "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"], + "tailwind-variants": ["../../../node_modules/tailwind-variants"],, "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/core/system-rsc/tsconfig.json b/packages/core/system-rsc/tsconfig.json index f35f3e2494..3afc9072e1 100644 --- a/packages/core/system-rsc/tsconfig.json +++ b/packages/core/system-rsc/tsconfig.json @@ -6,7 +6,6 @@ "baseUrl": "./", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"], diff --git a/packages/core/system/tsconfig.json b/packages/core/system/tsconfig.json index f35f3e2494..3afc9072e1 100644 --- a/packages/core/system/tsconfig.json +++ b/packages/core/system/tsconfig.json @@ -6,7 +6,6 @@ "baseUrl": "./", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] } }, "include": ["src", "index.ts"], diff --git a/plop/component/tsconfig.json.hbs b/plop/component/tsconfig.json.hbs index 3af3b8ad6a..8ea21e5a73 100644 --- a/plop/component/tsconfig.json.hbs +++ b/plop/component/tsconfig.json.hbs @@ -4,7 +4,6 @@ "baseUrl": ".", "paths": { "tailwind-variants": ["../../../node_modules/tailwind-variants"], - "framer-motion": ["../../../node_modules/framer-motion"] }, }, "include": ["src", "index.ts"] From 3e43e5a18155f68de29b2c267763485e2bb1538c Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:02:31 +0800 Subject: [PATCH 41/56] refactor(modal): one line import --- packages/components/modal/src/modal-content.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/components/modal/src/modal-content.tsx b/packages/components/modal/src/modal-content.tsx index ddcd7d92f8..3bcf5a0f9e 100644 --- a/packages/components/modal/src/modal-content.tsx +++ b/packages/components/modal/src/modal-content.tsx @@ -3,9 +3,8 @@ import type {HTMLMotionProps} from "@heroui/motion"; import {cloneElement, isValidElement, ReactNode, useMemo, useCallback} from "react"; import {DismissButton} from "@react-aria/overlays"; -import {TRANSITION_VARIANTS} from "@heroui/motion"; +import {TRANSITION_VARIANTS, LazyMotion, m} from "@heroui/motion"; import {CloseIcon} from "@heroui/shared-icons"; -import {LazyMotion, m} from "@heroui/motion"; import {useDialog} from "@react-aria/dialog"; import {chain, mergeProps, useViewportSize} from "@react-aria/utils"; import {HTMLHeroUIProps} from "@heroui/system"; From d7e8122ea084360bbadc011c4fb9c7f7884525c3 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:06:30 +0800 Subject: [PATCH 42/56] fix: remove extra commas --- packages/components/dropdown/tsconfig.json | 2 +- packages/components/snippet/tsconfig.json | 2 +- packages/components/tooltip/tsconfig.json | 2 +- packages/core/react/tsconfig.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/components/dropdown/tsconfig.json b/packages/components/dropdown/tsconfig.json index a4b2b7a951..5b4094a6ed 100644 --- a/packages/components/dropdown/tsconfig.json +++ b/packages/components/dropdown/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"],, + "tailwind-variants": ["../../../node_modules/tailwind-variants"], } }, "include": ["src", "index.ts"] diff --git a/packages/components/snippet/tsconfig.json b/packages/components/snippet/tsconfig.json index a8aa75493e..b43d613b78 100644 --- a/packages/components/snippet/tsconfig.json +++ b/packages/components/snippet/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"],, + "tailwind-variants": ["../../../node_modules/tailwind-variants"], "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/components/tooltip/tsconfig.json b/packages/components/tooltip/tsconfig.json index a8aa75493e..b43d613b78 100644 --- a/packages/components/tooltip/tsconfig.json +++ b/packages/components/tooltip/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"],, + "tailwind-variants": ["../../../node_modules/tailwind-variants"], "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, diff --git a/packages/core/react/tsconfig.json b/packages/core/react/tsconfig.json index 0bfee0184c..2b86cb172a 100644 --- a/packages/core/react/tsconfig.json +++ b/packages/core/react/tsconfig.json @@ -4,7 +4,7 @@ "baseUrl": ".", "allowJs": true, "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"],, + "tailwind-variants": ["../../../node_modules/tailwind-variants"], "@react-aria/interactions": ["../../../node_modules/@react-aria/interactions"] } }, From ca6b0ecd5a0c69c640a6825aed48512ca2a73845 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:22:22 +0800 Subject: [PATCH 43/56] chore: cast any for motionProps temporarily --- .../components/accordion/src/base/accordion-item-base.tsx | 3 +-- packages/components/modal/src/modal-content.tsx | 6 ++++-- packages/components/modal/src/use-modal.ts | 3 +-- packages/components/navbar/src/navbar-menu.tsx | 5 ++--- packages/components/navbar/src/use-navbar.ts | 3 +-- packages/components/popover/src/free-solo-popover.tsx | 4 ++-- packages/components/popover/src/popover-content.tsx | 3 +-- packages/components/popover/src/use-popover.ts | 3 +-- packages/components/ripple/src/ripple.tsx | 3 +-- packages/components/tabs/src/use-tabs.ts | 5 ++--- packages/components/tooltip/src/use-tooltip.ts | 3 +-- 11 files changed, 17 insertions(+), 24 deletions(-) diff --git a/packages/components/accordion/src/base/accordion-item-base.tsx b/packages/components/accordion/src/base/accordion-item-base.tsx index 3b5745c01c..dd6d28936d 100644 --- a/packages/components/accordion/src/base/accordion-item-base.tsx +++ b/packages/components/accordion/src/base/accordion-item-base.tsx @@ -4,7 +4,6 @@ import {As} from "@heroui/system"; import {ItemProps, BaseItem} from "@heroui/aria-utils"; import {FocusableProps, PressEvents} from "@react-types/shared"; import {ReactNode, MouseEventHandler} from "react"; -import {HTMLMotionProps} from "@heroui/motion"; export type AccordionItemIndicatorProps = { /** @@ -51,7 +50,7 @@ export interface Props /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: HTMLMotionProps<"section">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"section">; /** * Whether to keep the accordion content mounted when collapsed. * @default false diff --git a/packages/components/modal/src/modal-content.tsx b/packages/components/modal/src/modal-content.tsx index 3bcf5a0f9e..f4503b10e4 100644 --- a/packages/components/modal/src/modal-content.tsx +++ b/packages/components/modal/src/modal-content.tsx @@ -1,5 +1,4 @@ import type {AriaDialogProps} from "@react-aria/dialog"; -import type {HTMLMotionProps} from "@heroui/motion"; import {cloneElement, isValidElement, ReactNode, useMemo, useCallback} from "react"; import {DismissButton} from "@react-aria/overlays"; @@ -93,7 +92,10 @@ const ModalContent = (props: ModalContentProps) => { exit="exit" initial="exit" variants={TRANSITION_VARIANTS.fade} - {...(getBackdropProps() as HTMLMotionProps<"div">)} + { + // FIXME(motion): HTMLMotionProps<"div"> + ...(getBackdropProps() as any) + } /> ); diff --git a/packages/components/modal/src/use-modal.ts b/packages/components/modal/src/use-modal.ts index 79476766da..84734c8698 100644 --- a/packages/components/modal/src/use-modal.ts +++ b/packages/components/modal/src/use-modal.ts @@ -1,5 +1,4 @@ import type {ModalVariantProps, SlotsToClasses, ModalSlots} from "@heroui/theme"; -import type {HTMLMotionProps} from "@heroui/motion"; import {AriaModalOverlayProps} from "@react-aria/overlays"; import {useAriaModalOverlay} from "@heroui/use-aria-modal-overlay"; @@ -22,7 +21,7 @@ interface Props extends HTMLHeroUIProps<"section"> { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: HTMLMotionProps<"section">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"section"> /** * Determines whether to hide the modal close button. * @default false diff --git a/packages/components/navbar/src/navbar-menu.tsx b/packages/components/navbar/src/navbar-menu.tsx index e5d3447480..b8a017477d 100644 --- a/packages/components/navbar/src/navbar-menu.tsx +++ b/packages/components/navbar/src/navbar-menu.tsx @@ -1,7 +1,7 @@ import {forwardRef, HTMLHeroUIProps} from "@heroui/system"; import {useDOMRef} from "@heroui/react-utils"; import {clsx, dataAttr} from "@heroui/shared-utils"; -import {AnimatePresence, HTMLMotionProps, LazyMotion, m} from "@heroui/motion"; +import {AnimatePresence, LazyMotion, m} from "@heroui/motion"; import {mergeProps} from "@react-aria/utils"; import {Overlay} from "@react-aria/overlays"; import React from "react"; @@ -19,7 +19,7 @@ export interface NavbarMenuProps extends HTMLHeroUIProps<"ul"> { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: HTMLMotionProps<"ul">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"ul"> } const domAnimation = () => import("@heroui/dom-animation").then((res) => res.default); @@ -67,7 +67,6 @@ const NavbarMenu = forwardRef<"ul", NavbarMenuProps>((props, ref) => { exit="exit" initial="exit" style={{ - // @ts-expect-error "--navbar-height": typeof height === "number" ? `${height}px` : height, ...style, }} diff --git a/packages/components/navbar/src/use-navbar.ts b/packages/components/navbar/src/use-navbar.ts index 5d8f973928..b74aae56bc 100644 --- a/packages/components/navbar/src/use-navbar.ts +++ b/packages/components/navbar/src/use-navbar.ts @@ -9,7 +9,6 @@ import {useCallback, useEffect, useMemo, useRef, useState} from "react"; import {mergeProps, useResizeObserver} from "@react-aria/utils"; import {useScrollPosition} from "@heroui/use-scroll-position"; import {useControlledState} from "@react-stately/utils"; -import {HTMLMotionProps} from "@heroui/motion"; import {usePreventScroll} from "@react-aria/overlays"; interface Props extends HTMLHeroUIProps<"nav"> { @@ -57,7 +56,7 @@ interface Props extends HTMLHeroUIProps<"nav"> { * The props to modify the framer motion animation. Use the `variants` API to create your own animation. * This motion is only available if the `shouldHideOnScroll` prop is set to `true`. */ - motionProps?: HTMLMotionProps<"nav">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"nav"> /** * The event handler for the menu open state. * @param isOpen boolean diff --git a/packages/components/popover/src/free-solo-popover.tsx b/packages/components/popover/src/free-solo-popover.tsx index b55abff76b..01c47bc766 100644 --- a/packages/components/popover/src/free-solo-popover.tsx +++ b/packages/components/popover/src/free-solo-popover.tsx @@ -10,7 +10,7 @@ import * as React from "react"; import {DismissButton, Overlay} from "@react-aria/overlays"; import {forwardRef} from "@heroui/system"; -import {HTMLMotionProps, LazyMotion, m} from "@heroui/motion"; +import {LazyMotion, m} from "@heroui/motion"; import {mergeProps} from "@react-aria/utils"; import {getTransformOrigins} from "@heroui/aria-utils"; import {TRANSITION_VARIANTS} from "@heroui/motion"; @@ -135,7 +135,7 @@ const FreeSoloPopover = forwardRef<"div", FreeSoloPopoverProps>( exit="exit" initial="exit" variants={TRANSITION_VARIANTS.fade} - {...(getBackdropProps() as HTMLMotionProps<"div">)} + {...(getBackdropProps() as any)} // FIXME(motion): HTMLMotionProps<"div"> /> ); diff --git a/packages/components/popover/src/popover-content.tsx b/packages/components/popover/src/popover-content.tsx index 11acbac726..f5b7c90d42 100644 --- a/packages/components/popover/src/popover-content.tsx +++ b/packages/components/popover/src/popover-content.tsx @@ -1,5 +1,4 @@ import type {AriaDialogProps} from "@react-aria/dialog"; -import type {HTMLMotionProps} from "@heroui/motion"; import {DOMAttributes, ReactNode, useMemo, useRef} from "react"; import {DismissButton} from "@react-aria/overlays"; @@ -74,7 +73,7 @@ const PopoverContent = (props: PopoverContentProps) => { exit="exit" initial="exit" variants={TRANSITION_VARIANTS.fade} - {...(getBackdropProps() as HTMLMotionProps<"div">)} + {...(getBackdropProps() as any)} // FIXME(motion): HTMLMotionProps<"div"> /> ); diff --git a/packages/components/popover/src/use-popover.ts b/packages/components/popover/src/use-popover.ts index 2dfb21ffa8..2b7c099c96 100644 --- a/packages/components/popover/src/use-popover.ts +++ b/packages/components/popover/src/use-popover.ts @@ -1,5 +1,4 @@ import type {PopoverVariantProps, SlotsToClasses, PopoverSlots} from "@heroui/theme"; -import type {HTMLMotionProps} from "@heroui/motion"; import type {PressEvent} from "@react-types/shared"; import {RefObject, Ref, useEffect} from "react"; @@ -50,7 +49,7 @@ export interface Props extends HTMLHeroUIProps<"div"> { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: HTMLMotionProps<"div">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"div"> /** * The container element in which the overlay portal will be placed. * @default document.body diff --git a/packages/components/ripple/src/ripple.tsx b/packages/components/ripple/src/ripple.tsx index d2557aed61..4ec4f25a03 100644 --- a/packages/components/ripple/src/ripple.tsx +++ b/packages/components/ripple/src/ripple.tsx @@ -1,6 +1,5 @@ import type {RippleType} from "./use-ripple"; import type {FC} from "react"; -import type {HTMLMotionProps} from "@heroui/motion"; import type {HTMLHeroUIProps} from "@heroui/system"; import {AnimatePresence, m, LazyMotion} from "@heroui/motion"; @@ -9,7 +8,7 @@ import {clamp} from "@heroui/shared-utils"; export interface RippleProps extends HTMLHeroUIProps<"span"> { ripples: RippleType[]; color?: string; - motionProps?: HTMLMotionProps<"span">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"span"> style?: React.CSSProperties; onClear: (key: React.Key) => void; } diff --git a/packages/components/tabs/src/use-tabs.ts b/packages/components/tabs/src/use-tabs.ts index 1ba7062ac0..3b0da97c23 100644 --- a/packages/components/tabs/src/use-tabs.ts +++ b/packages/components/tabs/src/use-tabs.ts @@ -11,7 +11,6 @@ import {AriaTabListProps, useTabList} from "@react-aria/tabs"; import {mergeProps} from "@react-aria/utils"; import {CollectionProps} from "@heroui/aria-utils"; import {CollectionChildren} from "@react-types/shared"; -import {HTMLMotionProps} from "@heroui/motion"; export interface Props extends Omit { /** @@ -21,7 +20,7 @@ export interface Props extends Omit { /** * The props to modify the cursor motion animation. Use the `variants` API to create your own animation. */ - motionProps?: HTMLMotionProps<"span">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"span"> /** * Whether the tabs selection should occur on press up instead of press down. * @default true @@ -77,7 +76,7 @@ export type ValuesType = { listRef?: RefObject; shouldSelectOnPressUp?: boolean; classNames?: SlotsToClasses; - motionProps?: HTMLMotionProps<"span">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"span"> disableAnimation?: boolean; isDisabled?: boolean; }; diff --git a/packages/components/tooltip/src/use-tooltip.ts b/packages/components/tooltip/src/use-tooltip.ts index f12dfa6cf4..a23252eaaf 100644 --- a/packages/components/tooltip/src/use-tooltip.ts +++ b/packages/components/tooltip/src/use-tooltip.ts @@ -1,7 +1,6 @@ import type {PopoverVariantProps, SlotsToClasses} from "@heroui/theme"; import type {AriaTooltipProps} from "@react-types/tooltip"; import type {OverlayTriggerProps} from "@react-types/overlays"; -import type {HTMLMotionProps} from "@heroui/motion"; import type {OverlayOptions} from "@heroui/aria-utils"; import {ReactNode, Ref, useId, useImperativeHandle} from "react"; @@ -52,7 +51,7 @@ interface Props extends Omit { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: HTMLMotionProps<"div">; + motionProps?: any; // FIXME(motion): HTMLMotionProps<"div"> /** * The container element in which the overlay portal will be placed. * @default document.body From 7f269ce44269e76352520917116287561d4c6a6f Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:31:03 +0800 Subject: [PATCH 44/56] chore(deps): pnpm-lock.yaml --- pnpm-lock.yaml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6d8905b2b..3461a4065f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2583,9 +2583,6 @@ importers: clean-package: specifier: 2.2.0 version: 2.2.0 - framer-motion: - specifier: 11.9.0 - version: 11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) react: specifier: 18.3.0 version: 18.3.0 @@ -10470,20 +10467,6 @@ packages: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} - framer-motion@11.9.0: - resolution: {integrity: sha512-nCfGxvsQecVLjjYDu35G2F5ls+ArE3FBfhxV0RSiisMaUKqteq5DMBFNRKwMyVj+VqKTNhawt+BV480YCHKFlQ==} - peerDependencies: - '@emotion/is-prop-valid': '*' - react: 18.3.0 - react-dom: 18.3.0 - peerDependenciesMeta: - '@emotion/is-prop-valid': - optional: true - react: - optional: true - react-dom: - optional: true - framer-motion@12.0.6: resolution: {integrity: sha512-LmrXbXF6Vv5WCNmb+O/zn891VPZrH7XbsZgRLBROw6kFiP+iTK49gxTv2Ur3F0Tbw6+sy9BVtSqnWfMUpH+6nA==} peerDependencies: @@ -23790,14 +23773,6 @@ snapshots: dependencies: map-cache: 0.2.2 - framer-motion@11.9.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): - dependencies: - tslib: 2.8.1 - optionalDependencies: - '@emotion/is-prop-valid': 1.3.1 - react: 18.3.0 - react-dom: 18.3.0(react@18.3.0) - framer-motion@12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): dependencies: motion-dom: 12.0.0 From a5b8f86847e8704784d7db469ece215d60e7e0b5 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:38:02 +0800 Subject: [PATCH 45/56] refactor: one line import --- packages/components/accordion/src/accordion-item.tsx | 3 +-- packages/components/calendar/src/calendar-base.tsx | 3 +-- packages/components/navbar/src/navbar-transitions.ts | 3 +-- packages/components/tooltip/src/tooltip.tsx | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/components/accordion/src/accordion-item.tsx b/packages/components/accordion/src/accordion-item.tsx index 54035c4d10..06863e1af2 100644 --- a/packages/components/accordion/src/accordion-item.tsx +++ b/packages/components/accordion/src/accordion-item.tsx @@ -3,8 +3,7 @@ import type {Variants} from "@heroui/motion"; import {forwardRef} from "@heroui/system"; import {useMemo, ReactNode} from "react"; import {ChevronIcon} from "@heroui/shared-icons"; -import {AnimatePresence, LazyMotion, m, useWillChange} from "@heroui/motion"; -import {TRANSITION_VARIANTS} from "@heroui/motion"; +import {AnimatePresence, LazyMotion, m, useWillChange, TRANSITION_VARIANTS} from "@heroui/motion"; import {UseAccordionItemProps, useAccordionItem} from "./use-accordion-item"; diff --git a/packages/components/calendar/src/calendar-base.tsx b/packages/components/calendar/src/calendar-base.tsx index dd6ffd6f49..2f0a9f081f 100644 --- a/packages/components/calendar/src/calendar-base.tsx +++ b/packages/components/calendar/src/calendar-base.tsx @@ -7,8 +7,7 @@ import {forwardRef, Fragment, useState} from "react"; import {VisuallyHidden} from "@react-aria/visually-hidden"; import {Button} from "@heroui/button"; import {chain, mergeProps} from "@react-aria/utils"; -import {AnimatePresence, LazyMotion, MotionConfig} from "@heroui/motion"; -import {ResizablePanel} from "@heroui/motion"; +import {AnimatePresence, LazyMotion, MotionConfig, ResizablePanel} from "@heroui/motion"; import {ChevronLeftIcon} from "./chevron-left"; import {ChevronRightIcon} from "./chevron-right"; diff --git a/packages/components/navbar/src/navbar-transitions.ts b/packages/components/navbar/src/navbar-transitions.ts index 8058c6413c..f2b1f7dc95 100644 --- a/packages/components/navbar/src/navbar-transitions.ts +++ b/packages/components/navbar/src/navbar-transitions.ts @@ -1,5 +1,4 @@ -import {Variants} from "@heroui/motion"; -import {TRANSITION_EASINGS} from "@heroui/motion"; +import {Variants, TRANSITION_EASINGS} from "@heroui/motion"; export const hideOnScrollVariants: Variants = { visible: { diff --git a/packages/components/tooltip/src/tooltip.tsx b/packages/components/tooltip/src/tooltip.tsx index 8928e0dcd7..49c5b34e34 100644 --- a/packages/components/tooltip/src/tooltip.tsx +++ b/packages/components/tooltip/src/tooltip.tsx @@ -1,7 +1,6 @@ import {forwardRef} from "@heroui/system"; import {OverlayContainer} from "@react-aria/overlays"; -import {AnimatePresence, m, LazyMotion} from "@heroui/motion"; -import {TRANSITION_VARIANTS} from "@heroui/motion"; +import {AnimatePresence, m, LazyMotion, TRANSITION_VARIANTS} from "@heroui/motion"; import {warn} from "@heroui/shared-utils"; import {Children, cloneElement, isValidElement} from "react"; import {getTransformOrigins} from "@heroui/aria-utils"; From 98c216991b620847a85900f3e8b4a2907ffebb31 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:38:35 +0800 Subject: [PATCH 46/56] fix: motionProps type issue --- .../components/accordion/src/base/accordion-item-base.tsx | 3 ++- packages/components/modal/src/modal-content.tsx | 6 ++---- packages/components/modal/src/use-modal.ts | 3 ++- packages/components/navbar/src/navbar-menu.tsx | 4 +++- packages/components/navbar/src/use-navbar.ts | 3 ++- packages/components/popover/src/free-solo-popover.tsx | 7 ++++--- packages/components/popover/src/popover-content.tsx | 6 +++--- packages/components/popover/src/use-popover.ts | 3 ++- packages/components/ripple/src/ripple.tsx | 3 ++- packages/components/tabs/src/use-tabs.ts | 5 +++-- packages/components/tooltip/src/use-tooltip.ts | 3 ++- 11 files changed, 27 insertions(+), 19 deletions(-) diff --git a/packages/components/accordion/src/base/accordion-item-base.tsx b/packages/components/accordion/src/base/accordion-item-base.tsx index dd6d28936d..b0ceba1a3b 100644 --- a/packages/components/accordion/src/base/accordion-item-base.tsx +++ b/packages/components/accordion/src/base/accordion-item-base.tsx @@ -1,4 +1,5 @@ import type {AccordionItemVariantProps, AccordionItemSlots, SlotsToClasses} from "@heroui/theme"; +import type {HTMLMotionProps} from "@heroui/motion"; import {As} from "@heroui/system"; import {ItemProps, BaseItem} from "@heroui/aria-utils"; @@ -50,7 +51,7 @@ export interface Props /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: any; // FIXME(motion): HTMLMotionProps<"section">; + motionProps?: Omit, "ref">; /** * Whether to keep the accordion content mounted when collapsed. * @default false diff --git a/packages/components/modal/src/modal-content.tsx b/packages/components/modal/src/modal-content.tsx index f4503b10e4..4cc0db5007 100644 --- a/packages/components/modal/src/modal-content.tsx +++ b/packages/components/modal/src/modal-content.tsx @@ -1,4 +1,5 @@ import type {AriaDialogProps} from "@react-aria/dialog"; +import type {HTMLMotionProps} from "@heroui/motion"; import {cloneElement, isValidElement, ReactNode, useMemo, useCallback} from "react"; import {DismissButton} from "@react-aria/overlays"; @@ -92,10 +93,7 @@ const ModalContent = (props: ModalContentProps) => { exit="exit" initial="exit" variants={TRANSITION_VARIANTS.fade} - { - // FIXME(motion): HTMLMotionProps<"div"> - ...(getBackdropProps() as any) - } + {...(getBackdropProps() as Omit, "ref">)} /> ); diff --git a/packages/components/modal/src/use-modal.ts b/packages/components/modal/src/use-modal.ts index 84734c8698..1e999690a6 100644 --- a/packages/components/modal/src/use-modal.ts +++ b/packages/components/modal/src/use-modal.ts @@ -1,4 +1,5 @@ import type {ModalVariantProps, SlotsToClasses, ModalSlots} from "@heroui/theme"; +import type {HTMLMotionProps} from "@heroui/motion"; import {AriaModalOverlayProps} from "@react-aria/overlays"; import {useAriaModalOverlay} from "@heroui/use-aria-modal-overlay"; @@ -21,7 +22,7 @@ interface Props extends HTMLHeroUIProps<"section"> { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: any; // FIXME(motion): HTMLMotionProps<"section"> + motionProps?: Omit, "ref">; /** * Determines whether to hide the modal close button. * @default false diff --git a/packages/components/navbar/src/navbar-menu.tsx b/packages/components/navbar/src/navbar-menu.tsx index b8a017477d..116eb0b993 100644 --- a/packages/components/navbar/src/navbar-menu.tsx +++ b/packages/components/navbar/src/navbar-menu.tsx @@ -1,3 +1,5 @@ +import type {HTMLMotionProps} from "@heroui/motion"; + import {forwardRef, HTMLHeroUIProps} from "@heroui/system"; import {useDOMRef} from "@heroui/react-utils"; import {clsx, dataAttr} from "@heroui/shared-utils"; @@ -19,7 +21,7 @@ export interface NavbarMenuProps extends HTMLHeroUIProps<"ul"> { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: any; // FIXME(motion): HTMLMotionProps<"ul"> + motionProps?: Omit, "ref">; } const domAnimation = () => import("@heroui/dom-animation").then((res) => res.default); diff --git a/packages/components/navbar/src/use-navbar.ts b/packages/components/navbar/src/use-navbar.ts index b74aae56bc..8eacf941af 100644 --- a/packages/components/navbar/src/use-navbar.ts +++ b/packages/components/navbar/src/use-navbar.ts @@ -1,4 +1,5 @@ import type {NavbarVariantProps, SlotsToClasses, NavbarSlots} from "@heroui/theme"; +import type {HTMLMotionProps} from "@heroui/motion"; import {HTMLHeroUIProps, mapPropsVariants, PropGetter, useProviderContext} from "@heroui/system"; import {navbar} from "@heroui/theme"; @@ -56,7 +57,7 @@ interface Props extends HTMLHeroUIProps<"nav"> { * The props to modify the framer motion animation. Use the `variants` API to create your own animation. * This motion is only available if the `shouldHideOnScroll` prop is set to `true`. */ - motionProps?: any; // FIXME(motion): HTMLMotionProps<"nav"> + motionProps?: Omit, "ref">; /** * The event handler for the menu open state. * @param isOpen boolean diff --git a/packages/components/popover/src/free-solo-popover.tsx b/packages/components/popover/src/free-solo-popover.tsx index 01c47bc766..f1b2b14d8b 100644 --- a/packages/components/popover/src/free-solo-popover.tsx +++ b/packages/components/popover/src/free-solo-popover.tsx @@ -7,13 +7,14 @@ * @internal */ +import type {HTMLMotionProps} from "@heroui/motion"; + import * as React from "react"; import {DismissButton, Overlay} from "@react-aria/overlays"; import {forwardRef} from "@heroui/system"; -import {LazyMotion, m} from "@heroui/motion"; +import {LazyMotion, m, TRANSITION_VARIANTS} from "@heroui/motion"; import {mergeProps} from "@react-aria/utils"; import {getTransformOrigins} from "@heroui/aria-utils"; -import {TRANSITION_VARIANTS} from "@heroui/motion"; import {useDialog} from "@react-aria/dialog"; import {usePopover, UsePopoverProps, UsePopoverReturn} from "./use-popover"; @@ -135,7 +136,7 @@ const FreeSoloPopover = forwardRef<"div", FreeSoloPopoverProps>( exit="exit" initial="exit" variants={TRANSITION_VARIANTS.fade} - {...(getBackdropProps() as any)} // FIXME(motion): HTMLMotionProps<"div"> + {...(getBackdropProps() as Omit, "ref">)} /> ); diff --git a/packages/components/popover/src/popover-content.tsx b/packages/components/popover/src/popover-content.tsx index f5b7c90d42..9754bd9f10 100644 --- a/packages/components/popover/src/popover-content.tsx +++ b/packages/components/popover/src/popover-content.tsx @@ -1,9 +1,9 @@ import type {AriaDialogProps} from "@react-aria/dialog"; +import type {HTMLMotionProps} from "@heroui/motion"; import {DOMAttributes, ReactNode, useMemo, useRef} from "react"; import {DismissButton} from "@react-aria/overlays"; -import {TRANSITION_VARIANTS} from "@heroui/motion"; -import {m, LazyMotion} from "@heroui/motion"; +import {TRANSITION_VARIANTS, m, LazyMotion} from "@heroui/motion"; import {HTMLHeroUIProps} from "@heroui/system"; import {getTransformOrigins} from "@heroui/aria-utils"; import {useDialog} from "@react-aria/dialog"; @@ -73,7 +73,7 @@ const PopoverContent = (props: PopoverContentProps) => { exit="exit" initial="exit" variants={TRANSITION_VARIANTS.fade} - {...(getBackdropProps() as any)} // FIXME(motion): HTMLMotionProps<"div"> + {...(getBackdropProps() as Omit, "ref">)} /> ); diff --git a/packages/components/popover/src/use-popover.ts b/packages/components/popover/src/use-popover.ts index 2b7c099c96..dc53640045 100644 --- a/packages/components/popover/src/use-popover.ts +++ b/packages/components/popover/src/use-popover.ts @@ -1,5 +1,6 @@ import type {PopoverVariantProps, SlotsToClasses, PopoverSlots} from "@heroui/theme"; import type {PressEvent} from "@react-types/shared"; +import type {HTMLMotionProps} from "@heroui/motion"; import {RefObject, Ref, useEffect} from "react"; import {ReactRef, useDOMRef} from "@heroui/react-utils"; @@ -49,7 +50,7 @@ export interface Props extends HTMLHeroUIProps<"div"> { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: any; // FIXME(motion): HTMLMotionProps<"div"> + motionProps?: Omit, "ref">; /** * The container element in which the overlay portal will be placed. * @default document.body diff --git a/packages/components/ripple/src/ripple.tsx b/packages/components/ripple/src/ripple.tsx index 4ec4f25a03..f2b35be8ab 100644 --- a/packages/components/ripple/src/ripple.tsx +++ b/packages/components/ripple/src/ripple.tsx @@ -1,6 +1,7 @@ import type {RippleType} from "./use-ripple"; import type {FC} from "react"; import type {HTMLHeroUIProps} from "@heroui/system"; +import type {HTMLMotionProps} from "@heroui/motion"; import {AnimatePresence, m, LazyMotion} from "@heroui/motion"; import {clamp} from "@heroui/shared-utils"; @@ -8,7 +9,7 @@ import {clamp} from "@heroui/shared-utils"; export interface RippleProps extends HTMLHeroUIProps<"span"> { ripples: RippleType[]; color?: string; - motionProps?: any; // FIXME(motion): HTMLMotionProps<"span"> + motionProps?: Omit, "ref">; style?: React.CSSProperties; onClear: (key: React.Key) => void; } diff --git a/packages/components/tabs/src/use-tabs.ts b/packages/components/tabs/src/use-tabs.ts index 3b0da97c23..5e82b39f18 100644 --- a/packages/components/tabs/src/use-tabs.ts +++ b/packages/components/tabs/src/use-tabs.ts @@ -1,4 +1,5 @@ import type {TabsVariantProps, SlotsToClasses, TabsSlots, TabsReturnType} from "@heroui/theme"; +import type {HTMLMotionProps} from "@heroui/motion"; import {HTMLHeroUIProps, mapPropsVariants, PropGetter, useProviderContext} from "@heroui/system"; import {tabs} from "@heroui/theme"; @@ -20,7 +21,7 @@ export interface Props extends Omit { /** * The props to modify the cursor motion animation. Use the `variants` API to create your own animation. */ - motionProps?: any; // FIXME(motion): HTMLMotionProps<"span"> + motionProps?: Omit, "ref">; /** * Whether the tabs selection should occur on press up instead of press down. * @default true @@ -76,7 +77,7 @@ export type ValuesType = { listRef?: RefObject; shouldSelectOnPressUp?: boolean; classNames?: SlotsToClasses; - motionProps?: any; // FIXME(motion): HTMLMotionProps<"span"> + motionProps?: Omit, "ref">; disableAnimation?: boolean; isDisabled?: boolean; }; diff --git a/packages/components/tooltip/src/use-tooltip.ts b/packages/components/tooltip/src/use-tooltip.ts index a23252eaaf..68865091d7 100644 --- a/packages/components/tooltip/src/use-tooltip.ts +++ b/packages/components/tooltip/src/use-tooltip.ts @@ -2,6 +2,7 @@ import type {PopoverVariantProps, SlotsToClasses} from "@heroui/theme"; import type {AriaTooltipProps} from "@react-types/tooltip"; import type {OverlayTriggerProps} from "@react-types/overlays"; import type {OverlayOptions} from "@heroui/aria-utils"; +import type {HTMLMotionProps} from "@heroui/motion"; import {ReactNode, Ref, useId, useImperativeHandle} from "react"; import {useTooltipTriggerState} from "@react-stately/tooltip"; @@ -51,7 +52,7 @@ interface Props extends Omit { /** * The props to modify the framer motion animation. Use the `variants` API to create your own animation. */ - motionProps?: any; // FIXME(motion): HTMLMotionProps<"div"> + motionProps?: Omit, "ref">; /** * The container element in which the overlay portal will be placed. * @default document.body From 81a7fde3d965c1b3b101efa6f6718bdbb4a9157e Mon Sep 17 00:00:00 2001 From: WK Wong Date: Fri, 31 Jan 2025 23:51:34 +0800 Subject: [PATCH 47/56] chore(navbar): rollback --- packages/components/navbar/src/navbar-menu.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/navbar/src/navbar-menu.tsx b/packages/components/navbar/src/navbar-menu.tsx index 116eb0b993..269a5778fe 100644 --- a/packages/components/navbar/src/navbar-menu.tsx +++ b/packages/components/navbar/src/navbar-menu.tsx @@ -69,6 +69,7 @@ const NavbarMenu = forwardRef<"ul", NavbarMenuProps>((props, ref) => { exit="exit" initial="exit" style={{ + // @ts-expect-error "--navbar-height": typeof height === "number" ? `${height}px` : height, ...style, }} From 7356cdc6b10b85f3f051e1506a32ac3b02abae17 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 6 Feb 2025 12:25:05 +0800 Subject: [PATCH 48/56] refactor: update author in package.json --- packages/external/internationalized-date/package.json | 2 +- packages/external/motion/package.json | 2 +- packages/external/react-aria-i18n/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/external/internationalized-date/package.json b/packages/external/internationalized-date/package.json index c62f15ccd2..e5fae75238 100644 --- a/packages/external/internationalized-date/package.json +++ b/packages/external/internationalized-date/package.json @@ -6,7 +6,7 @@ "hero ui", "@internationalize/date" ], - "author": "WK Wong ", + "author": "HeroUI ", "homepage": "https://heroui.com", "license": "MIT", "main": "src/index.ts", diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index d8c3425e7f..7895a632ae 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -6,7 +6,7 @@ "hero ui", "motion" ], - "author": "WK Wong ", + "author": "HeroUI ", "homepage": "https://heroui.com", "license": "MIT", "main": "src/index.ts", diff --git a/packages/external/react-aria-i18n/package.json b/packages/external/react-aria-i18n/package.json index 7c4eb377c9..2673354664 100644 --- a/packages/external/react-aria-i18n/package.json +++ b/packages/external/react-aria-i18n/package.json @@ -6,7 +6,7 @@ "hero ui", "@react-aria/i18n" ], - "author": "WK Wong ", + "author": "HeroUI ", "homepage": "https://heroui.com", "license": "MIT", "main": "src/index.ts", From 10c5212534ee524f3992ffab11cc836dcb4eb044 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 6 Feb 2025 12:26:11 +0800 Subject: [PATCH 49/56] chore(deps): bump motion version --- packages/external/motion/package.json | 4 ++-- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index 7895a632ae..54fdcf7a17 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -1,7 +1,7 @@ { "name": "@heroui/motion", "version": "2.0.0", - "description": "Mirror package of framer-motion", + "description": "Mirror package of motion", "keywords": [ "hero ui", "motion" @@ -37,7 +37,7 @@ "dependencies": { "@heroui/use-measure": "workspace:*", "@heroui/shared-utils": "workspace:*", - "motion": "12.0.6" + "motion": "12.3.1" }, "devDependencies": { "clean-package": "2.2.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3461a4065f..557187ce0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3385,8 +3385,8 @@ importers: specifier: workspace:* version: link:../../hooks/use-measure motion: - specifier: 12.0.6 - version: 12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + specifier: 12.3.1 + version: 12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) devDependencies: clean-package: specifier: 2.2.0 @@ -10467,8 +10467,8 @@ packages: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} - framer-motion@12.0.6: - resolution: {integrity: sha512-LmrXbXF6Vv5WCNmb+O/zn891VPZrH7XbsZgRLBROw6kFiP+iTK49gxTv2Ur3F0Tbw6+sy9BVtSqnWfMUpH+6nA==} + framer-motion@12.3.1: + resolution: {integrity: sha512-Br4a2YhdeEvdzMDX8ToVO+/Jbqm2Loo/8rMjizX1nejjBvRJGMfz+NW1qBo4WCHF26uIdES5MBztUlB4pIyfqQ==} peerDependencies: '@emotion/is-prop-valid': '*' react: 18.3.0 @@ -12507,8 +12507,8 @@ packages: motion-utils@12.0.0: resolution: {integrity: sha512-MNFiBKbbqnmvOjkPyOKgHUp3Q6oiokLkI1bEwm5QA28cxMZrv0CbbBGDNmhF6DIXsi1pCQBSs0dX8xjeER1tmA==} - motion@12.0.6: - resolution: {integrity: sha512-AzCEO0+//mPlcGiL9JaVwjddHY1cbbnvz5upHL0toqQwsPCs+hiKJ0XG5jfG0XwDtBbiSXdEqW/UTmGLwkVQ6A==} + motion@12.3.1: + resolution: {integrity: sha512-o25hkUR/dvOt7gPHqYnv3/rrDtzz6b8Khqkmed6Tn2u4m0ZU/0UIukWQBN7wSqTACLZVptX013N3yH+LtoNa2A==} peerDependencies: '@emotion/is-prop-valid': '*' react: 18.3.0 @@ -23773,7 +23773,7 @@ snapshots: dependencies: map-cache: 0.2.2 - framer-motion@12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): + framer-motion@12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): dependencies: motion-dom: 12.0.0 motion-utils: 12.0.0 @@ -26444,9 +26444,9 @@ snapshots: motion-utils@12.0.0: {} - motion@12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): + motion@12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): dependencies: - framer-motion: 12.0.6(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + framer-motion: 12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) tslib: 2.8.1 optionalDependencies: '@emotion/is-prop-valid': 1.3.1 From 3f1ac4fad7692f0649d2565f888a8eac64b42b2c Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 27 Feb 2025 11:34:11 +0800 Subject: [PATCH 50/56] Merge branch 'canary' into refactor/eng-1894 From ac5ceec4f174a30940c0ab5a82267621761dced2 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 27 Feb 2025 11:43:34 +0800 Subject: [PATCH 51/56] chore(motion): bump version --- packages/external/motion/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/external/motion/package.json b/packages/external/motion/package.json index 54fdcf7a17..f8cc5dcace 100644 --- a/packages/external/motion/package.json +++ b/packages/external/motion/package.json @@ -37,7 +37,7 @@ "dependencies": { "@heroui/use-measure": "workspace:*", "@heroui/shared-utils": "workspace:*", - "motion": "12.3.1" + "motion": "12.4.7" }, "devDependencies": { "clean-package": "2.2.0" From 60302303d0215eda4db1ed14fa09f4553e6c0647 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 27 Feb 2025 11:43:51 +0800 Subject: [PATCH 52/56] refactor: use `@heroui/motion` --- packages/components/toast/package.json | 4 ++-- packages/components/toast/src/toast.tsx | 4 ++-- pnpm-lock.yaml | 32 ++++++++++++------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/components/toast/package.json b/packages/components/toast/package.json index e99affd9f6..f44c6339fc 100644 --- a/packages/components/toast/package.json +++ b/packages/components/toast/package.json @@ -37,14 +37,14 @@ "@heroui/system": ">=2.4.10", "@heroui/theme": ">=2.4.9", "react": ">=18 || >=19.0.0-rc.0", - "react-dom": ">=18 || >=19.0.0-rc.0", - "framer-motion": ">=11.5.6 || >=12.0.0-alpha.1" + "react-dom": ">=18 || >=19.0.0-rc.0" }, "dependencies": { "@heroui/react-utils": "workspace:*", "@heroui/shared-utils": "workspace:*", "@heroui/shared-icons": "workspace:*", "@heroui/use-is-mobile": "workspace:*", + "@heroui/motion": "workspace:*", "@heroui/spinner": "workspace:*", "@react-aria/toast": "3.0.0-beta.19", "@react-aria/utils": "3.27.0", diff --git a/packages/components/toast/src/toast.tsx b/packages/components/toast/src/toast.tsx index 372f24b6e2..fa27f5f2ec 100644 --- a/packages/components/toast/src/toast.tsx +++ b/packages/components/toast/src/toast.tsx @@ -7,13 +7,13 @@ import { SuccessIcon, WarningIcon, } from "@heroui/shared-icons"; -import {AnimatePresence, m, LazyMotion} from "framer-motion"; +import {AnimatePresence, m, LazyMotion} from "@heroui/motion"; import {cloneElement, isValidElement} from "react"; import {Spinner} from "@heroui/spinner"; import {UseToastProps, useToast} from "./use-toast"; -const loadFeatures = () => import("framer-motion").then((res) => res.domMax); +const loadFeatures = () => import("@heroui/motion").then((res) => res.domMax); export interface ToastProps extends UseToastProps {} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9e7215b510..f48d977134 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3090,6 +3090,9 @@ importers: packages/components/toast: dependencies: + '@heroui/motion': + specifier: workspace:* + version: link:../../external/motion '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -3120,9 +3123,6 @@ importers: '@react-stately/utils': specifier: 3.10.5 version: 3.10.5(react@18.3.0) - framer-motion: - specifier: '>=11.5.6 || >=12.0.0-alpha.1' - version: 12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) devDependencies: '@heroui/button': specifier: workspace:* @@ -3531,8 +3531,8 @@ importers: specifier: workspace:* version: link:../../hooks/use-measure motion: - specifier: 12.3.1 - version: 12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + specifier: 12.4.7 + version: 12.4.7(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) devDependencies: clean-package: specifier: 2.2.0 @@ -10641,8 +10641,8 @@ packages: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} - framer-motion@12.3.1: - resolution: {integrity: sha512-Br4a2YhdeEvdzMDX8ToVO+/Jbqm2Loo/8rMjizX1nejjBvRJGMfz+NW1qBo4WCHF26uIdES5MBztUlB4pIyfqQ==} + framer-motion@12.4.7: + resolution: {integrity: sha512-VhrcbtcAMXfxlrjeHPpWVu2+mkcoR31e02aNSR7OUS/hZAciKa8q6o3YN2mA1h+jjscRsSyKvX6E1CiY/7OLMw==} peerDependencies: '@emotion/is-prop-valid': '*' react: 18.3.0 @@ -12682,14 +12682,14 @@ packages: mlly@1.7.3: resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} - motion-dom@12.0.0: - resolution: {integrity: sha512-CvYd15OeIR6kHgMdonCc1ihsaUG4MYh/wrkz8gZ3hBX/uamyZCXN9S9qJoYF03GqfTt7thTV/dxnHYX4+55vDg==} + motion-dom@12.4.5: + resolution: {integrity: sha512-Q2xmhuyYug1CGTo0jdsL05EQ4RhIYXlggFS/yPhQQRNzbrhjKQ1tbjThx5Plv68aX31LsUQRq4uIkuDxdO5vRQ==} motion-utils@12.0.0: resolution: {integrity: sha512-MNFiBKbbqnmvOjkPyOKgHUp3Q6oiokLkI1bEwm5QA28cxMZrv0CbbBGDNmhF6DIXsi1pCQBSs0dX8xjeER1tmA==} - motion@12.3.1: - resolution: {integrity: sha512-o25hkUR/dvOt7gPHqYnv3/rrDtzz6b8Khqkmed6Tn2u4m0ZU/0UIukWQBN7wSqTACLZVptX013N3yH+LtoNa2A==} + motion@12.4.7: + resolution: {integrity: sha512-mhegHAbf1r80fr+ytC6OkjKvIUegRNXKLWNPrCN2+GnixlNSPwT03FtKqp9oDny1kNcLWZvwbmEr+JqVryFrcg==} peerDependencies: '@emotion/is-prop-valid': '*' react: 18.3.0 @@ -23833,9 +23833,9 @@ snapshots: dependencies: map-cache: 0.2.2 - framer-motion@12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): + framer-motion@12.4.7(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): dependencies: - motion-dom: 12.0.0 + motion-dom: 12.4.5 motion-utils: 12.0.0 tslib: 2.8.1 optionalDependencies: @@ -26505,15 +26505,15 @@ snapshots: pkg-types: 1.3.0 ufo: 1.5.4 - motion-dom@12.0.0: + motion-dom@12.4.5: dependencies: motion-utils: 12.0.0 motion-utils@12.0.0: {} - motion@12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): + motion@12.4.7(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0): dependencies: - framer-motion: 12.3.1(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + framer-motion: 12.4.7(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) tslib: 2.8.1 optionalDependencies: '@emotion/is-prop-valid': 1.3.1 From 1f88086495f018a501604d21744da93cc51f7a4f Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 27 Feb 2025 11:48:12 +0800 Subject: [PATCH 53/56] refactor(toast): use `@heroui/motion` --- packages/components/toast/src/use-toast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/toast/src/use-toast.ts b/packages/components/toast/src/use-toast.ts index 51e793bbea..a51bd5d4da 100644 --- a/packages/components/toast/src/use-toast.ts +++ b/packages/components/toast/src/use-toast.ts @@ -8,7 +8,7 @@ import {ReactNode, useCallback, useEffect, useLayoutEffect, useMemo, useRef, use import {useToast as useToastAria, AriaToastProps} from "@react-aria/toast"; import {chain, mergeProps} from "@react-aria/utils"; import {QueuedToast, ToastState} from "@react-stately/toast"; -import {MotionProps} from "framer-motion"; +import {MotionProps} from "@heroui/motion"; import {useHover} from "@react-aria/interactions"; import {useIsMobile} from "@heroui/use-is-mobile"; From 044a340e88d7290de9aa7016e2ae7db32fcb3571 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 27 Feb 2025 11:50:04 +0800 Subject: [PATCH 54/56] chore(changeset): include `@heroui/toast` --- .changeset/hot-news-arrive.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/hot-news-arrive.md b/.changeset/hot-news-arrive.md index 7382d2b224..367bb8f0b2 100644 --- a/.changeset/hot-news-arrive.md +++ b/.changeset/hot-news-arrive.md @@ -39,6 +39,7 @@ "@heroui/modal": patch "@heroui/radio": patch "@heroui/table": patch +"@heroui/toast": patch "@heroui/card": patch "@heroui/chip": patch "@heroui/code": patch From 91b1e2e69d678e1ff3b9fd794f3bb569f10b57c6 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 27 Feb 2025 12:06:46 +0800 Subject: [PATCH 55/56] fix: migrate to `@heroui/react-aria-i18n` --- packages/components/calendar/src/calendar-base.tsx | 2 +- packages/components/number-input/package.json | 2 +- packages/components/number-input/src/use-number-input.ts | 2 +- .../components/pagination/stories/pagination.stories.tsx | 2 +- pnpm-lock.yaml | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/components/calendar/src/calendar-base.tsx b/packages/components/calendar/src/calendar-base.tsx index b32f9bddf6..e8907904da 100644 --- a/packages/components/calendar/src/calendar-base.tsx +++ b/packages/components/calendar/src/calendar-base.tsx @@ -7,7 +7,7 @@ import {forwardRef, Fragment, useState} from "react"; import {VisuallyHidden} from "@react-aria/visually-hidden"; import {Button} from "@heroui/button"; import {chain, mergeProps} from "@react-aria/utils"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {AnimatePresence, LazyMotion, MotionConfig, ResizablePanel} from "@heroui/motion"; import {ChevronLeftIcon} from "./chevron-left"; diff --git a/packages/components/number-input/package.json b/packages/components/number-input/package.json index 42c2d4b9c1..b5fd95e55c 100644 --- a/packages/components/number-input/package.json +++ b/packages/components/number-input/package.json @@ -48,8 +48,8 @@ "@heroui/shared-icons": "workspace:*", "@heroui/shared-utils": "workspace:*", "@heroui/use-safe-layout-effect": "workspace:*", + "@heroui/react-aria-i18n":"workspace:*", "@react-aria/focus": "3.19.1", - "@react-aria/i18n": "3.12.5", "@react-aria/interactions": "3.23.0", "@react-aria/numberfield": "3.11.10", "@react-aria/utils": "3.27.0", diff --git a/packages/components/number-input/src/use-number-input.ts b/packages/components/number-input/src/use-number-input.ts index 8543a07370..20ade17638 100644 --- a/packages/components/number-input/src/use-number-input.ts +++ b/packages/components/number-input/src/use-number-input.ts @@ -9,7 +9,7 @@ import {useFocusRing} from "@react-aria/focus"; import {numberInput} from "@heroui/theme"; import {useDOMRef, filterDOMProps} from "@heroui/react-utils"; import {useFocusWithin, useHover, usePress} from "@react-aria/interactions"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {clsx, dataAttr, isEmpty, objectToDeps} from "@heroui/shared-utils"; import {useNumberFieldState} from "@react-stately/numberfield"; import {useNumberField as useAriaNumberInput} from "@react-aria/numberfield"; diff --git a/packages/components/pagination/stories/pagination.stories.tsx b/packages/components/pagination/stories/pagination.stories.tsx index 7522778896..4a1ae9abdb 100644 --- a/packages/components/pagination/stories/pagination.stories.tsx +++ b/packages/components/pagination/stories/pagination.stories.tsx @@ -3,7 +3,7 @@ import {Meta} from "@storybook/react"; import {button, pagination} from "@heroui/theme"; import {cn} from "@heroui/theme"; import {ChevronIcon} from "@heroui/shared-icons"; -import {useLocale} from "@react-aria/i18n"; +import {useLocale} from "@heroui/react-aria-i18n"; import {Pagination, PaginationItemRenderProps, PaginationItemType, usePagination} from "../src"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f48d977134..593cab4a50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2210,6 +2210,9 @@ importers: '@heroui/form': specifier: workspace:* version: link:../form + '@heroui/react-aria-i18n': + specifier: workspace:* + version: link:../../external/react-aria-i18n '@heroui/react-utils': specifier: workspace:* version: link:../../utilities/react-utils @@ -2225,9 +2228,6 @@ importers: '@react-aria/focus': specifier: 3.19.1 version: 3.19.1(react-dom@18.3.0(react@18.3.0))(react@18.3.0) - '@react-aria/i18n': - specifier: 3.12.5 - version: 3.12.5(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@react-aria/interactions': specifier: 3.23.0 version: 3.23.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) From 64fe268ae58dfd2ed3989f492b1273aca4f50455 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Thu, 27 Feb 2025 12:08:42 +0800 Subject: [PATCH 56/56] chore(changeset): include `@heroui/number-input` --- .changeset/hot-news-arrive.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/hot-news-arrive.md b/.changeset/hot-news-arrive.md index 367bb8f0b2..9ecaee903c 100644 --- a/.changeset/hot-news-arrive.md +++ b/.changeset/hot-news-arrive.md @@ -4,6 +4,7 @@ "@heroui/scroll-shadow": patch "@heroui/react-aria-i18n": patch "@heroui/autocomplete": patch +"@heroui/number-input": patch "@heroui/dom-animation": patch "@heroui/breadcrumbs": patch "@heroui/date-picker": patch