From 5ff4234552d919520b8d5aaa68ee4efa649c09ba Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Mon, 28 Jul 2025 09:05:25 +0000 Subject: [PATCH] Merged in chore/SW-3145-move-date-to-design-system (pull request #2556) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: SW-3145 Moved date component to design system * chore: SW-3145 Moved date component to design system Approved-by: Anton Gunnarsson Approved-by: Matilda Landström --- .../Forms/Edit/Profile/FormContent/index.tsx | 17 ++++- .../components/Forms/Signup/index.tsx | 12 +++- .../Details/RoomOne/Signup/index.tsx | 23 ++++++- .../EnterDetails/Details/RoomOne/index.tsx | 1 + .../MyStay/Receipt/Footer/index.tsx | 2 +- .../TempDesignSystem/Form/Date/date.ts | 13 ---- .../Form/Date => tests}/date.test.tsx | 16 +++-- packages/common/package.json | 2 + .../common}/utils/dateFormatting.ts | 4 +- .../common}/utils/rangeArray.ts | 2 +- .../lib/components}/Form/Date/date.module.css | 0 .../lib/components/Form/Date/date.ts | 21 ++++++ .../lib/components}/Form/Date/index.tsx | 64 ++++++++----------- packages/design-system/package.json | 5 +- yarn.lock | 2 + 15 files changed, 120 insertions(+), 64 deletions(-) delete mode 100644 apps/scandic-web/components/TempDesignSystem/Form/Date/date.ts rename apps/scandic-web/{components/TempDesignSystem/Form/Date => tests}/date.test.tsx (89%) rename {apps/scandic-web => packages/common}/utils/dateFormatting.ts (82%) rename {apps/scandic-web => packages/common}/utils/rangeArray.ts (77%) rename {apps/scandic-web/components/TempDesignSystem => packages/design-system/lib/components}/Form/Date/date.module.css (100%) create mode 100644 packages/design-system/lib/components/Form/Date/date.ts rename {apps/scandic-web/components/TempDesignSystem => packages/design-system/lib/components}/Form/Date/index.tsx (74%) diff --git a/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx b/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx index 4cbd6f7b6..38b582dae 100644 --- a/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx +++ b/apps/scandic-web/components/Forms/Edit/Profile/FormContent/index.tsx @@ -4,6 +4,7 @@ import { useIntl } from "react-intl" import { Divider } from "@scandic-hotels/design-system/Divider" import CountrySelect from "@scandic-hotels/design-system/Form/Country" +import DateSelect from "@scandic-hotels/design-system/Form/Date" import Phone from "@scandic-hotels/design-system/Form/Phone" import { Select } from "@scandic-hotels/design-system/Select" import { Typography } from "@scandic-hotels/design-system/Typography" @@ -13,7 +14,6 @@ import { getLocalizedLanguageOptions, } from "@/constants/languages" -import DateSelect from "@/components/TempDesignSystem/Form/Date" import Input from "@/components/TempDesignSystem/Form/Input" import PasswordInput from "@/components/TempDesignSystem/Form/PasswordInput" import useLang from "@/hooks/useLang" @@ -41,7 +41,20 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {