From 4980cc830d6ba596c188c32f76789b7d57b46335 Mon Sep 17 00:00:00 2001 From: Rasmus Langvad Date: Wed, 7 Jan 2026 17:04:30 +0000 Subject: [PATCH] Merged in feat/3685-new-textarea-component (pull request #3392) feat(SW-3685): Add new TextArea and FormTextArea components * Add new TextArea and FormTextArea components * Update example form with description * Merge branch 'master' into feat/3685-new-textarea-component * Formatting new files with new prettier config * Added custom controls for the text area story Approved-by: Linus Flood --- .../Steps/DeliveryDetailsStep/index.tsx | 2 +- .../Details/SpecialRequests/index.tsx | 4 +- .../Form/Compositions/ExampleForm.stories.tsx | 294 ++++++++++-------- .../components/Form/FormTextArea/index.tsx | 102 ++++++ .../Form/FormTextArea/textarea.module.css | 16 + .../components/Form/FormTextArea/textarea.ts | 20 ++ .../lib/components/Form/TextArea/index.tsx | 84 ----- .../lib/components/Form/TextArea/input.ts | 9 - .../Form/TextArea/textarea.module.css | 72 ----- .../components/TextArea/TextArea.stories.tsx | 196 ++++++++++++ .../lib/components/TextArea/TextArea.test.tsx | 120 +++++++ .../lib/components/TextArea/TextArea.tsx | 43 +++ .../lib/components/TextArea/index.tsx | 2 + .../components/TextArea/textarea.module.css | 70 +++++ .../lib/components/TextArea/types.ts | 7 + packages/design-system/lint-staged.config.js | 12 +- packages/design-system/package.json | 3 +- 17 files changed, 752 insertions(+), 304 deletions(-) create mode 100644 packages/design-system/lib/components/Form/FormTextArea/index.tsx create mode 100644 packages/design-system/lib/components/Form/FormTextArea/textarea.module.css create mode 100644 packages/design-system/lib/components/Form/FormTextArea/textarea.ts delete mode 100644 packages/design-system/lib/components/Form/TextArea/index.tsx delete mode 100644 packages/design-system/lib/components/Form/TextArea/input.ts delete mode 100644 packages/design-system/lib/components/Form/TextArea/textarea.module.css create mode 100644 packages/design-system/lib/components/TextArea/TextArea.stories.tsx create mode 100644 packages/design-system/lib/components/TextArea/TextArea.test.tsx create mode 100644 packages/design-system/lib/components/TextArea/TextArea.tsx create mode 100644 packages/design-system/lib/components/TextArea/index.tsx create mode 100644 packages/design-system/lib/components/TextArea/textarea.module.css create mode 100644 packages/design-system/lib/components/TextArea/types.ts diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/DeliveryDetailsStep/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/DeliveryDetailsStep/index.tsx index f5b23ee3d..a493eef3a 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/DeliveryDetailsStep/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/DeliveryDetailsStep/index.tsx @@ -3,7 +3,7 @@ import { useIntl } from "react-intl" import { Button } from "@scandic-hotels/design-system/Button" import { Divider } from "@scandic-hotels/design-system/Divider" -import TextArea from "@scandic-hotels/design-system/Form/TextArea" +import { TextArea } from "@scandic-hotels/design-system/TextArea" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" diff --git a/packages/booking-flow/lib/components/EnterDetails/Details/SpecialRequests/index.tsx b/packages/booking-flow/lib/components/EnterDetails/Details/SpecialRequests/index.tsx index 356e2cd4b..f0f3ea38a 100644 --- a/packages/booking-flow/lib/components/EnterDetails/Details/SpecialRequests/index.tsx +++ b/packages/booking-flow/lib/components/EnterDetails/Details/SpecialRequests/index.tsx @@ -1,8 +1,8 @@ import { useIntl } from "react-intl" -import TextArea from "@scandic-hotels/design-system/Form/TextArea" import { Typography } from "@scandic-hotels/design-system/Typography" +import { FormTextArea } from "@scandic-hotels/design-system/Form/FormTextArea" import styles from "./specialRequests.module.css" import type { RegisterOptions } from "react-hook-form" @@ -63,7 +63,7 @@ export function SpecialRequests({ }, ]} /> */} -