diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx index ff9f2a39d..dcf338539 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/PaymentOption/index.tsx @@ -4,7 +4,7 @@ import { useIntl } from "react-intl" import { Divider } from "@scandic-hotels/design-system/Divider" import { Radio } from "@scandic-hotels/design-system/Radio" -import Stepper from "@scandic-hotels/design-system/Stepper" +import { Stepper } from "@scandic-hotels/design-system/Stepper" import { Typography } from "@scandic-hotels/design-system/Typography" import styles from "./paymentOption.module.css" @@ -116,26 +116,39 @@ function InnerPaymentOption({ )} {selected && ( - = MAX_NR_ITEMS} - disabledMessage={ - hasReachedMax - ? intl.formatMessage({ - id: "myPages.myStay.ancillaries.reachedMaxPointsStepperMessage", - defaultMessage: - "You’ve reached your points limit and can’t add more items with points.", - }) - : intl.formatMessage({ - id: "myPages.myStay.ancillaries.reachedMaxItemsStepperMessage", - defaultMessage: - "Maximum quantity reached for this item.", - }) - } - /> + <> + + {intl.formatMessage({ + id: "ancillaries.label.quantity", + defaultMessage: "Quantity", + })} + + = MAX_NR_ITEMS} + disabledMessage={ + hasReachedMax + ? intl.formatMessage({ + id: "myPages.myStay.ancillaries.reachedMaxPointsStepperMessage", + defaultMessage: + "You’ve reached your points limit and can’t add more items with points.", + }) + : intl.formatMessage({ + id: "myPages.myStay.ancillaries.reachedMaxItemsStepperMessage", + defaultMessage: + "Maximum quantity reached for this item.", + }) + } + /> + )} diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/index.tsx index 78a929ada..5ebd7acb1 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/Steps/SelectQuantityStep/index.tsx @@ -1,4 +1,3 @@ -import { type ReactNode } from "react" import { RadioGroup } from "react-aria-components" import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" @@ -19,6 +18,8 @@ import { NotEnoughPointsBanner, PaymentOption } from "./PaymentOption" import styles from "./selectQuantityStep.module.css" +import type { ReactNode } from "react" + import type { InnerSelectQuantityStepProps, SelectQuantityStepProps, diff --git a/packages/booking-flow/lib/components/BookingWidget/GuestsRoomsPicker/AdultSelector/index.tsx b/packages/booking-flow/lib/components/BookingWidget/GuestsRoomsPicker/AdultSelector/index.tsx index 21f14313f..70ebf00ed 100644 --- a/packages/booking-flow/lib/components/BookingWidget/GuestsRoomsPicker/AdultSelector/index.tsx +++ b/packages/booking-flow/lib/components/BookingWidget/GuestsRoomsPicker/AdultSelector/index.tsx @@ -3,7 +3,7 @@ import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" -import Stepper from "@scandic-hotels/design-system/Stepper" +import { Stepper } from "@scandic-hotels/design-system/Stepper" import { Typography } from "@scandic-hotels/design-system/Typography" import styles from "./adult-selector.module.css" @@ -42,10 +42,12 @@ export default function AdultSelector({ variant="Body/Supporting text (caption)/smBold" className={styles.label} > -

{adultsLabel}

+

{adultsLabel}

-

{childrenLabel}

+

{childrenLabel}

{ decreaseChildrenCount(roomIndex) diff --git a/packages/design-system/lib/components/Stepper/index.tsx b/packages/design-system/lib/components/Stepper/index.tsx index ce7a88b3a..1ac60091d 100644 --- a/packages/design-system/lib/components/Stepper/index.tsx +++ b/packages/design-system/lib/components/Stepper/index.tsx @@ -1,3 +1,4 @@ +import { useIntl } from "react-intl" import { IconButton } from "../IconButton" import { Tooltip } from "../Tooltip" import { Typography } from "../Typography" @@ -6,6 +7,8 @@ import styles from "./stepper.module.css" type StepperProps = { count: number + label: string + ariaLabelledBy: string handleOnIncrease: () => void handleOnDecrease: () => void disableIncrease: boolean @@ -13,28 +16,56 @@ type StepperProps = { disabledMessage?: string } -export default function Stepper({ +export function Stepper({ count, + label, + ariaLabelledBy, handleOnIncrease, handleOnDecrease, disableIncrease, disableDecrease, disabledMessage, }: StepperProps) { + const intl = useIntl() + return ( -
+
-
- -

{count}

-
-
+ + + {count} + + +
diff --git a/packages/design-system/lib/components/Stepper/stepper.module.css b/packages/design-system/lib/components/Stepper/stepper.module.css index a7cfce34d..2d89c1e40 100644 --- a/packages/design-system/lib/components/Stepper/stepper.module.css +++ b/packages/design-system/lib/components/Stepper/stepper.module.css @@ -5,6 +5,7 @@ gap: var(--Space-x1); color: var(--Text-Interactive-Default); } + .counterBtn { width: 40px; height: 40px;