@duffel/components 2.7.20 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +67 -0
- package/.eslintrc.js +47 -0
- package/.github/renovate.json +16 -0
- package/.github/workflows/autoapprove.yml +18 -0
- package/.github/workflows/release.yml +89 -0
- package/.husky/post-commit +4 -0
- package/.husky/pre-commit +4 -0
- package/.nvmrc +1 -0
- package/.prettierignore +2 -0
- package/.storybook/Storyshots.test.js +3 -0
- package/.storybook/__snapshots__/Storyshots.test.js.snap +48318 -0
- package/.storybook/main.ts +33 -0
- package/.storybook/preview.tsx +28 -0
- package/.tool-versions +1 -0
- package/CONTRIBUTING.md +83 -0
- package/README.md +53 -15
- package/__mocks__/styleMock.js +6 -0
- package/babel.config.js +20 -0
- package/commitlint.config.js +4 -0
- package/config/esbuild.base.config.js +18 -0
- package/config/esbuild.cdn.config.js +51 -0
- package/config/esbuild.dev.config.js +46 -0
- package/config/esbuild.react.config.js +42 -0
- package/jest.config.ts +14 -0
- package/package.json +135 -193
- package/react-dist/components/DuffelAncillaries/Card.d.ts +14 -0
- package/react-dist/components/DuffelAncillaries/Counter.d.ts +10 -0
- package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
- package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
- package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
- package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
- package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
- package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +15 -0
- package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
- package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
- package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
- package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
- package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +11 -0
- package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +14 -0
- package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
- package/react-dist/components/shared/Button.d.ts +23 -0
- package/react-dist/components/shared/ErrorBoundary.d.ts +13 -0
- package/react-dist/components/shared/FetchOfferErrorState.d.ts +5 -0
- package/react-dist/components/shared/Icon.d.ts +44 -0
- package/react-dist/components/shared/IconButton.d.ts +16 -0
- package/react-dist/components/shared/Modal.d.ts +11 -0
- package/react-dist/components/shared/NonIdealState.d.ts +4 -0
- package/react-dist/components/shared/Stamp.d.ts +7 -0
- package/react-dist/components/shared/Tabs.d.ts +16 -0
- package/react-dist/custom-elements.d.ts +6 -0
- package/react-dist/custom-elements.js +37 -0
- package/react-dist/custom-elements.js.map +7 -0
- package/react-dist/index.d.ts +7 -0
- package/react-dist/index.js +37 -0
- package/react-dist/index.js.map +7 -0
- package/react-dist/lib/captureErrorInSentry.d.ts +1 -0
- package/react-dist/lib/compileCreateOrderPayload.d.ts +14 -0
- package/react-dist/lib/createPriceFormatters.d.ts +12 -0
- package/react-dist/lib/fetchFromDuffelAPI.d.ts +8 -0
- package/react-dist/lib/fetchFromFixtures.d.ts +4 -0
- package/react-dist/lib/formatAvailableServices.d.ts +12 -0
- package/react-dist/lib/formatDate.d.ts +2 -0
- package/react-dist/lib/formatSeatMaps.d.ts +4 -0
- package/react-dist/lib/getBaggageServiceDescription.d.ts +2 -0
- package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
- package/react-dist/lib/getCurrencyForSeatMaps.d.ts +10 -0
- package/react-dist/lib/getCurrencyForServices.d.ts +11 -0
- package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
- package/react-dist/lib/getPassengerBySegmentList.d.ts +6 -0
- package/react-dist/lib/getPassengerInitials.d.ts +1 -0
- package/react-dist/lib/getPassengerMapById.d.ts +3 -0
- package/react-dist/lib/getPassengerName.d.ts +3 -0
- package/react-dist/lib/getRowNumber.d.ts +2 -0
- package/react-dist/lib/getSegmentList.d.ts +2 -0
- package/react-dist/lib/getServicePriceMapById.d.ts +3 -0
- package/react-dist/lib/getSymbols.d.ts +2 -0
- package/react-dist/lib/getTotalAmountForServices.d.ts +6 -0
- package/react-dist/lib/getTotalQuantity.d.ts +2 -0
- package/react-dist/lib/hasService.d.ts +2 -0
- package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
- package/react-dist/lib/hasWings.d.ts +2 -0
- package/react-dist/lib/isBaggageService.d.ts +2 -0
- package/react-dist/lib/isCancelForAnyReasonService.d.ts +2 -0
- package/react-dist/lib/isFixtureOfferId.d.ts +2 -0
- package/react-dist/lib/isPayloadComplete.d.ts +2 -0
- package/react-dist/lib/isSeatElement.d.ts +2 -0
- package/react-dist/lib/logging.d.ts +46 -0
- package/react-dist/lib/moneyStringFormatter.d.ts +8 -0
- package/react-dist/lib/offerIsExpired.d.ts +2 -0
- package/react-dist/lib/retrieveOffer.d.ts +2 -0
- package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
- package/react-dist/lib/retrieveSeatMaps.d.ts +2 -0
- package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
- package/react-dist/lib/setBodyScrollability.d.ts +1 -0
- package/react-dist/lib/validateProps.d.ts +7 -0
- package/react-dist/lib/withPlural.d.ts +1 -0
- package/react-dist/types/Aircraft.d.ts +14 -0
- package/react-dist/types/Airline.d.ts +14 -0
- package/react-dist/types/Airport.d.ts +44 -0
- package/react-dist/types/City.d.ts +18 -0
- package/react-dist/types/CreateOrderPayload.d.ts +72 -0
- package/react-dist/types/CurrencyConversion.d.ts +10 -0
- package/react-dist/types/DuffelAncillariesProps.d.ts +70 -0
- package/react-dist/types/Offer.d.ts +711 -0
- package/react-dist/types/Order.d.ts +8 -0
- package/react-dist/types/Place.d.ts +8 -0
- package/react-dist/types/SeatMap.d.ts +190 -0
- package/react-dist/types/index.d.ts +11 -0
- package/scripts/generate-fixture.ts +200 -0
- package/scripts/upload-to-cdn.sh +34 -0
- package/scripts.tsconfig.json +11 -0
- package/src/components/DuffelAncillaries/Card.tsx +126 -0
- package/src/components/DuffelAncillaries/Counter.tsx +40 -0
- package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +344 -0
- package/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.tsx +124 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx +96 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx +88 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx +81 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx +60 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +122 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx +81 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +76 -0
- package/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx +51 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx +90 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx +63 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx +56 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx +11 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +74 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx +9 -0
- package/src/components/DuffelAncillaries/seats/Amenity.tsx +21 -0
- package/src/components/DuffelAncillaries/seats/DeckSelect.tsx +27 -0
- package/src/components/DuffelAncillaries/seats/Element.tsx +52 -0
- package/src/components/DuffelAncillaries/seats/EmptyElement.tsx +5 -0
- package/src/components/DuffelAncillaries/seats/ExitElement.tsx +17 -0
- package/src/components/DuffelAncillaries/seats/Legend.tsx +60 -0
- package/src/components/DuffelAncillaries/seats/Row.tsx +47 -0
- package/src/components/DuffelAncillaries/seats/RowSection.tsx +78 -0
- package/src/components/DuffelAncillaries/seats/SeatElement.tsx +120 -0
- package/src/components/DuffelAncillaries/seats/SeatInfo.tsx +32 -0
- package/src/components/DuffelAncillaries/seats/SeatMap.tsx +81 -0
- package/src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx +21 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx +103 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx +142 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx +13 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx +82 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +87 -0
- package/src/components/DuffelAncillaries/seats/SeatUnavailable.tsx +14 -0
- package/src/components/DuffelPayments/DuffelPayments.tsx +218 -0
- package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +130 -0
- package/src/components/shared/AnimatedLoaderEllipsis.tsx +5 -0
- package/src/components/shared/Button.tsx +63 -0
- package/src/components/shared/ErrorBoundary.tsx +54 -0
- package/src/components/shared/FetchOfferErrorState.tsx +35 -0
- package/src/components/shared/Icon.tsx +152 -0
- package/src/components/shared/IconButton.tsx +42 -0
- package/src/components/shared/Modal.tsx +40 -0
- package/src/components/shared/NonIdealState.tsx +28 -0
- package/src/components/shared/Stamp.tsx +29 -0
- package/src/components/shared/Tabs.tsx +36 -0
- package/src/custom-elements.ts +13 -0
- package/src/examples/client-side/README.md +30 -0
- package/src/examples/client-side/index.html +57 -0
- package/src/examples/full-stack/README.md +34 -0
- package/src/examples/full-stack/index.html +48 -0
- package/src/examples/full-stack/server.mjs +158 -0
- package/src/examples/just-typescript/README.md +37 -0
- package/src/examples/just-typescript/package.json +16 -0
- package/src/examples/just-typescript/src/index.html +23 -0
- package/src/examples/just-typescript/src/index.ts +36 -0
- package/src/examples/just-typescript/yarn.lock +154 -0
- package/src/examples/payments-custom-element/README.md +17 -0
- package/src/examples/payments-custom-element/index.html +43 -0
- package/src/examples/payments-just-typescript/README.md +37 -0
- package/src/examples/payments-just-typescript/package.json +16 -0
- package/src/examples/payments-just-typescript/src/index.html +23 -0
- package/src/examples/payments-just-typescript/src/index.ts +18 -0
- package/src/examples/payments-just-typescript/yarn.lock +154 -0
- package/src/examples/react-app/README.md +37 -0
- package/src/examples/react-app/package.json +20 -0
- package/src/examples/react-app/src/index.html +19 -0
- package/src/examples/react-app/src/index.tsx +48 -0
- package/src/examples/react-app/yarn.lock +219 -0
- package/src/fixtures/offers/off_0000AUde3KwTztSRK1cznH.json +497 -0
- package/src/fixtures/offers/off_0000AVx4lUFFKW8PsPeQeQ.json +307 -0
- package/src/fixtures/offers/off_1.json +497 -0
- package/src/fixtures/passengers/mock_passengers.ts +26 -0
- package/src/fixtures/seat-maps/off_0000AUde3KwTztSRK1cznH.json +6852 -0
- package/src/fixtures/seat-maps/off_0000AVx4lUFFKW8PsPeQeQ.json +1 -0
- package/src/fixtures/seat-maps/off_1.json +6852 -0
- package/src/index.ts +7 -0
- package/src/lib/captureErrorInSentry.ts +42 -0
- package/src/lib/compileCreateOrderPayload.ts +63 -0
- package/src/lib/createPriceFormatters.ts +73 -0
- package/src/lib/fetchFromDuffelAPI.ts +54 -0
- package/src/lib/fetchFromFixtures.ts +18 -0
- package/src/lib/formatAvailableServices.ts +91 -0
- package/src/lib/formatDate.ts +20 -0
- package/src/lib/formatSeatMaps.ts +81 -0
- package/src/lib/getBaggageServiceDescription.ts +42 -0
- package/src/lib/getCabinsForSegmentAndDeck.ts +4 -0
- package/src/lib/getCurrencyForSeatMaps.ts +22 -0
- package/src/lib/getCurrencyForServices.ts +24 -0
- package/src/lib/getFirstSeatElementMatchingCriteria.ts +22 -0
- package/src/lib/getPassengerBySegmentList.ts +10 -0
- package/src/lib/getPassengerInitials.ts +6 -0
- package/src/lib/getPassengerMapById.ts +17 -0
- package/src/lib/getPassengerName.ts +37 -0
- package/src/lib/getRowNumber.ts +16 -0
- package/src/lib/getSegmentList.ts +7 -0
- package/src/lib/getServicePriceMapById.ts +20 -0
- package/src/lib/getSymbols.ts +22 -0
- package/src/lib/getTotalAmountForServices.ts +72 -0
- package/src/lib/getTotalQuantity.ts +5 -0
- package/src/lib/hasService.ts +24 -0
- package/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.ts +35 -0
- package/src/lib/hasWings.ts +8 -0
- package/src/lib/isBaggageService.ts +8 -0
- package/src/lib/isCancelForAnyReasonService.ts +9 -0
- package/src/lib/isFixtureOfferId.ts +4 -0
- package/src/lib/isPayloadComplete.ts +11 -0
- package/src/lib/isSeatElement.ts +10 -0
- package/src/lib/logging.ts +120 -0
- package/src/lib/moneyStringFormatter.ts +34 -0
- package/src/lib/offerIsExpired.ts +5 -0
- package/src/lib/retrieveOffer.ts +54 -0
- package/src/lib/retrieveOfferFromDuffelAPI.ts +13 -0
- package/src/lib/retrieveSeatMaps.ts +55 -0
- package/src/lib/retrieveSeatMapsFromDuffelAPI.ts +13 -0
- package/src/lib/setBodyScrollability.ts +7 -0
- package/src/lib/validateProps.ts +37 -0
- package/src/lib/withPlural.ts +8 -0
- package/src/stories/BaggageSelectionModalHeader.stories.tsx +21 -0
- package/src/stories/Button.stories.tsx +69 -0
- package/src/stories/DuffelAncillaries.stories.tsx +126 -0
- package/src/stories/DuffelPayments.stories.tsx +34 -0
- package/src/stories/Icon.stories.tsx +35 -0
- package/src/stories/IconButton.stories.tsx +25 -0
- package/src/styles/colors.css +22 -0
- package/src/styles/components/Amenity.css +23 -0
- package/src/styles/components/BaggageDisplay.css +25 -0
- package/src/styles/components/Button.css +161 -0
- package/src/styles/components/Card.css +52 -0
- package/src/styles/components/CfarSelectionModal.css +34 -0
- package/src/styles/components/Counter.css +18 -0
- package/src/styles/components/DuffelPayments.css +42 -0
- package/src/styles/components/IconButton.css +63 -0
- package/src/styles/components/Legend.css +58 -0
- package/src/styles/components/Loader.css +37 -0
- package/src/styles/components/LoadingState.css +81 -0
- package/src/styles/components/Modal.css +84 -0
- package/src/styles/components/PassengerSelect.css +93 -0
- package/src/styles/components/PassengersLayout.css +90 -0
- package/src/styles/components/Row.css +70 -0
- package/src/styles/components/Seat.css +57 -0
- package/src/styles/components/SeatInfo.css +61 -0
- package/src/styles/components/SeatMap.css +24 -0
- package/src/styles/components/SeatSelect.css +92 -0
- package/src/styles/components/Segment.css +17 -0
- package/src/styles/components/SelectionSegment.css +10 -0
- package/src/styles/components/Summary.css +70 -0
- package/src/styles/components/Tabs.css +49 -0
- package/src/styles/flex.css +5 -0
- package/src/styles/font-families.css +47 -0
- package/src/styles/global.css +51 -0
- package/src/styles/margin.css +3 -0
- package/src/styles/spacing.css +18 -0
- package/src/styles/transitions.css +3 -0
- package/src/styles/typography.css +13 -0
- package/src/tests/components/DuffelAncillaries.test.tsx +342 -0
- package/src/tests/lib/createPriceFormatters.test.tsx +152 -0
- package/src/tests/lib/formatAvailableServices.test.tsx +79 -0
- package/src/tests/lib/formatSeatMaps.test.tsx +49 -0
- package/src/tests/lib/getCurrencyForServices.test.tsx +44 -0
- package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +86 -0
- package/src/tests/lib/logging.test.tsx +32 -0
- package/src/tests/lib/moneyStringFormatter.test.tsx +12 -0
- package/src/tests/lib/validateProps.test.tsx +57 -0
- package/src/types/Aircraft.ts +16 -0
- package/src/types/Airline.ts +16 -0
- package/src/types/Airport.ts +54 -0
- package/src/types/City.ts +21 -0
- package/src/types/CreateOrderPayload.ts +99 -0
- package/src/types/CurrencyConversion.ts +10 -0
- package/src/types/DuffelAncillariesProps.ts +108 -0
- package/src/types/Offer.ts +851 -0
- package/src/types/Order.ts +6 -0
- package/src/types/Place.ts +6 -0
- package/src/types/SeatMap.ts +231 -0
- package/src/types/index.ts +11 -0
- package/tsconfig.json +52 -0
- package/LICENSE +0 -21
- package/dist/AdditionalBaggage.esm.js +0 -1
- package/dist/AdditionalBaggage.js +0 -1
- package/dist/AdditionalBaggage.min.css +0 -408
- package/dist/AdditionalBaggage.umd.min.js +0 -2
- package/dist/AdditionalBaggage.umd.min.js.LICENSE.txt +0 -60
- package/dist/AdditionalBaggageSelection.esm.js +0 -1
- package/dist/AdditionalBaggageSelection.js +0 -1
- package/dist/AdditionalBaggageSelection.min.css +0 -744
- package/dist/AdditionalBaggageSelection.umd.min.js +0 -2
- package/dist/AdditionalBaggageSelection.umd.min.js.LICENSE.txt +0 -93
- package/dist/CardPayment.esm.js +0 -2
- package/dist/CardPayment.esm.js.LICENSE.txt +0 -6
- package/dist/CardPayment.js +0 -2
- package/dist/CardPayment.js.LICENSE.txt +0 -6
- package/dist/CardPayment.min.css +0 -233
- package/dist/CardPayment.umd.min.js +0 -2
- package/dist/CardPayment.umd.min.js.LICENSE.txt +0 -61
- package/dist/SeatSelection.esm.js +0 -1
- package/dist/SeatSelection.js +0 -1
- package/dist/SeatSelection.min.css +0 -1127
- package/dist/SeatSelection.umd.min.js +0 -2
- package/dist/SeatSelection.umd.min.js.LICENSE.txt +0 -60
- package/dist/duffel-components.d.ts +0 -1614
- package/dist/duffel-components.esm.js +0 -2
- package/dist/duffel-components.esm.js.LICENSE.txt +0 -6
- package/dist/duffel-components.js +0 -2
- package/dist/duffel-components.js.LICENSE.txt +0 -6
- package/dist/duffel-components.min.css +0 -1280
- package/dist/duffel-components.umd.min.js +0 -2
- package/dist/duffel-components.umd.min.js.LICENSE.txt +0 -102
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Button, ButtonProps } from "../components/shared/Button";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Button",
|
|
7
|
+
component: Button,
|
|
8
|
+
} as Meta;
|
|
9
|
+
|
|
10
|
+
type ButtonStory = StoryObj<typeof Button>;
|
|
11
|
+
|
|
12
|
+
const defaultProps: ButtonProps = {
|
|
13
|
+
children: "Click me",
|
|
14
|
+
onClick: () => 0,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const Default: ButtonStory = { args: defaultProps };
|
|
18
|
+
|
|
19
|
+
export const Disabled: ButtonStory = {
|
|
20
|
+
args: { ...defaultProps, disabled: true },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithIconBefore: ButtonStory = {
|
|
24
|
+
args: { ...defaultProps, iconBefore: "autorenew" },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const WithOutlinedVariant: ButtonStory = {
|
|
28
|
+
args: { ...defaultProps, variant: "outlined" },
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const DisabledWithOutlinedVariant: ButtonStory = {
|
|
32
|
+
args: { ...defaultProps, variant: "outlined", disabled: true },
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const WithDestructiveVariant: ButtonStory = {
|
|
36
|
+
args: {
|
|
37
|
+
...defaultProps,
|
|
38
|
+
children: "Click to delete something important",
|
|
39
|
+
variant: "destructive",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const WithSize32: ButtonStory = {
|
|
44
|
+
args: { ...defaultProps, size: 32, iconBefore: "autorenew" },
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const WithSize48: ButtonStory = {
|
|
48
|
+
args: { ...defaultProps, size: 48, iconBefore: "autorenew" },
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const AccentColorWrapper: React.FC<{ children: React.ReactNode }> = ({
|
|
52
|
+
children,
|
|
53
|
+
}) => (
|
|
54
|
+
<div
|
|
55
|
+
style={
|
|
56
|
+
{
|
|
57
|
+
"--ACCENT": "29, 78, 216",
|
|
58
|
+
} as any
|
|
59
|
+
}
|
|
60
|
+
>
|
|
61
|
+
{children}
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
export const WithAccentColorSet: StoryFn<ButtonProps> = () => (
|
|
66
|
+
<AccentColorWrapper>
|
|
67
|
+
<Button {...defaultProps} />
|
|
68
|
+
</AccentColorWrapper>
|
|
69
|
+
);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { DuffelAncillaries } from "../components/DuffelAncillaries/DuffelAncillaries";
|
|
3
|
+
import mockPassengers from "../fixtures/passengers/mock_passengers";
|
|
4
|
+
import { DuffelAncillariesPropsWithOffersAndSeatMaps } from "../types/DuffelAncillariesProps";
|
|
5
|
+
import { Offer } from "../types/Offer";
|
|
6
|
+
import { SeatMap } from "../types/SeatMap";
|
|
7
|
+
|
|
8
|
+
// Use a require because the fixture is not a module.
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
10
|
+
const offer: Offer = require("../fixtures/offers/off_1.json");
|
|
11
|
+
const seat_maps: SeatMap[] = require("../fixtures/seat-maps/off_1.json");
|
|
12
|
+
/* eslint-enable @typescript-eslint/no-var-requires */
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
title: "DuffelAncillaries",
|
|
16
|
+
component: DuffelAncillaries,
|
|
17
|
+
} as Meta;
|
|
18
|
+
|
|
19
|
+
type DuffelAncillariesStory = StoryObj<typeof DuffelAncillaries>;
|
|
20
|
+
|
|
21
|
+
const defaultProps: Pick<
|
|
22
|
+
DuffelAncillariesPropsWithOffersAndSeatMaps,
|
|
23
|
+
"onPayloadReady" | "passengers" | "offer" | "seat_maps" | "services" | "debug"
|
|
24
|
+
> = {
|
|
25
|
+
onPayloadReady: () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
|
26
|
+
offer,
|
|
27
|
+
seat_maps,
|
|
28
|
+
passengers: mockPassengers,
|
|
29
|
+
services: ["bags", "seats", "cancel_for_any_reason"],
|
|
30
|
+
debug: true,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const AllServices: DuffelAncillariesStory = {
|
|
34
|
+
args: defaultProps,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const JustBags: DuffelAncillariesStory = {
|
|
38
|
+
args: {
|
|
39
|
+
...defaultProps,
|
|
40
|
+
services: ["bags"],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const JustSeats: DuffelAncillariesStory = {
|
|
45
|
+
args: {
|
|
46
|
+
...defaultProps,
|
|
47
|
+
services: ["seats"],
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const JustCFAR: DuffelAncillariesStory = {
|
|
52
|
+
args: {
|
|
53
|
+
...defaultProps,
|
|
54
|
+
services: ["cancel_for_any_reason"],
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const ExpiredOffer: DuffelAncillariesStory = {
|
|
59
|
+
args: {
|
|
60
|
+
...defaultProps,
|
|
61
|
+
offer: { ...offer, expires_at: "2023-04-19T00:00:00Z" },
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const WithCustomStyles: DuffelAncillariesStory = {
|
|
66
|
+
args: {
|
|
67
|
+
...defaultProps,
|
|
68
|
+
styles: {
|
|
69
|
+
accentColor: "29, 78, 216",
|
|
70
|
+
fontFamily: "monospace",
|
|
71
|
+
buttonCornerRadius: "15px",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const Markup: DuffelAncillariesStory = {
|
|
77
|
+
args: {
|
|
78
|
+
markup: {
|
|
79
|
+
bags: {
|
|
80
|
+
rate: 0.1,
|
|
81
|
+
amount: 1,
|
|
82
|
+
},
|
|
83
|
+
seats: {
|
|
84
|
+
rate: 0.2,
|
|
85
|
+
amount: 2,
|
|
86
|
+
},
|
|
87
|
+
cancel_for_any_reason: {
|
|
88
|
+
rate: 0.3,
|
|
89
|
+
amount: 3,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
...defaultProps,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const fiftyPercentMarkup = (amount: number) => ({
|
|
97
|
+
amount: amount * 1.5,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export const MarkupUsingPriceFormatters: DuffelAncillariesStory = {
|
|
101
|
+
args: {
|
|
102
|
+
...defaultProps,
|
|
103
|
+
priceFormatters: {
|
|
104
|
+
bags: fiftyPercentMarkup,
|
|
105
|
+
seats: fiftyPercentMarkup,
|
|
106
|
+
cancel_for_any_reason: fiftyPercentMarkup,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const customCurrencyMarkup = () => ({
|
|
112
|
+
amount: 100,
|
|
113
|
+
currency: "Duffel points",
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export const MarkupUsingPriceFormattersWithCustomCurrency: DuffelAncillariesStory =
|
|
117
|
+
{
|
|
118
|
+
args: {
|
|
119
|
+
...defaultProps,
|
|
120
|
+
priceFormatters: {
|
|
121
|
+
bags: customCurrencyMarkup,
|
|
122
|
+
seats: customCurrencyMarkup,
|
|
123
|
+
cancel_for_any_reason: customCurrencyMarkup,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
DuffelPayments,
|
|
4
|
+
DuffelPaymentsProps,
|
|
5
|
+
} from "../components/DuffelPayments/DuffelPayments";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "DuffelPayments",
|
|
9
|
+
component: DuffelPayments,
|
|
10
|
+
} as Meta;
|
|
11
|
+
|
|
12
|
+
type DuffelPaymentsStory = StoryObj<typeof DuffelPayments>;
|
|
13
|
+
|
|
14
|
+
const defaultProps: DuffelPaymentsProps = {
|
|
15
|
+
paymentIntentClientToken:
|
|
16
|
+
"eyJjbGllbnRfc2VjcmV0IjoicGlfM0psczlVQWcySmhFeTh2WTBSTm1MU0JkX3NlY3JldF9QUW9yZXNuU3laeWJadGRiejZwNzBCbUdPIiwicHVibGlzaGFibGVfa2V5IjoicGtfdGVzdF9EQUJLY0E2Vzh6OTc0cTdPSWY0YmJ2MVQwMEpwRmMyOUpWIn0=",
|
|
17
|
+
onSuccessfulPayment: () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
|
18
|
+
onFailedPayment: () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Default: DuffelPaymentsStory = {
|
|
22
|
+
args: defaultProps,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const WithCustomStyles: DuffelPaymentsStory = {
|
|
26
|
+
args: {
|
|
27
|
+
...defaultProps,
|
|
28
|
+
styles: {
|
|
29
|
+
accentColor: "29, 78, 216",
|
|
30
|
+
fontFamily: "monospace",
|
|
31
|
+
buttonCornerRadius: "15px",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Icon, ICON_MAP, IconName } from "../components/shared/Icon";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Icon",
|
|
7
|
+
component: Icon,
|
|
8
|
+
} as Meta;
|
|
9
|
+
|
|
10
|
+
export const FullList: React.FC = () => (
|
|
11
|
+
<div
|
|
12
|
+
style={{
|
|
13
|
+
display: "grid",
|
|
14
|
+
gridTemplateColumns: "repeat(4, 1fr)",
|
|
15
|
+
gridGap: "32px",
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
{Object.keys(ICON_MAP).map((icon) => (
|
|
19
|
+
<div
|
|
20
|
+
key={icon}
|
|
21
|
+
style={{
|
|
22
|
+
padding: "16px",
|
|
23
|
+
border: "dashed 1px lightgrey",
|
|
24
|
+
borderRadius: "2px",
|
|
25
|
+
display: "flex",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
columnGap: "8px",
|
|
28
|
+
}}
|
|
29
|
+
>
|
|
30
|
+
<Icon name={icon as IconName} />
|
|
31
|
+
<div>{icon}</div>
|
|
32
|
+
</div>
|
|
33
|
+
))}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { IconButton, IconButtonProps } from "../components/shared/IconButton";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "IconButton",
|
|
6
|
+
component: IconButton,
|
|
7
|
+
} as Meta;
|
|
8
|
+
|
|
9
|
+
type IconButtonStory = StoryObj<typeof IconButton>;
|
|
10
|
+
|
|
11
|
+
const defaultProps: IconButtonProps = {
|
|
12
|
+
title: "Click me",
|
|
13
|
+
icon: "autorenew",
|
|
14
|
+
onClick: () => 0,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const Default: IconButtonStory = { args: defaultProps };
|
|
18
|
+
|
|
19
|
+
export const WithOutlinedVariant: IconButtonStory = {
|
|
20
|
+
args: { ...defaultProps, variant: "outlined" },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const DisabledWithOutlinedVariant: IconButtonStory = {
|
|
24
|
+
args: { ...defaultProps, variant: "outlined", disabled: true },
|
|
25
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.duffel-components {
|
|
2
|
+
--GREY-100: #f7f5f9;
|
|
3
|
+
--GREY-200: #e2e2e8;
|
|
4
|
+
--GREY-300: #e2e8f0;
|
|
5
|
+
--GREY-400: #ababb4;
|
|
6
|
+
--GREY-500: #86868e;
|
|
7
|
+
--GREY-600: #696972;
|
|
8
|
+
--GREY-700: #4b4b55;
|
|
9
|
+
--GREY-900: #29292e;
|
|
10
|
+
--RED: #ef4444;
|
|
11
|
+
--BLACK: 0, 0, 0;
|
|
12
|
+
--WHITE: 255, 255, 255;
|
|
13
|
+
--ACCENT: 22, 22, 24;
|
|
14
|
+
--ACCENT-LIGHT-100: 0.08;
|
|
15
|
+
--ACCENT-LIGHT-200: 0.24;
|
|
16
|
+
--ACCENT-LIGHT-300: 0.48;
|
|
17
|
+
--ACCENT-LIGHT-800: 0.8;
|
|
18
|
+
--ACCENT-LIGHT-1000: 1;
|
|
19
|
+
--GREEN-100: #ecfdf5;
|
|
20
|
+
--GREEN-200: #10b981;
|
|
21
|
+
--GREEN-300: #064e3b;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.map-element--amenity {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: var(--SPACING-LG-1);
|
|
4
|
+
color: var(--GREY-600);
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
margin-bottom: var(--SPACING-SM-1);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media only screen and (min-width: 768px) {
|
|
12
|
+
.map-element--amenity {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: var(--SPACING-LG-3);
|
|
15
|
+
font-size: var(--FONT-SIZES-C2);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.map-element--wrapped {
|
|
20
|
+
background-color: var(--GREY-100);
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
border: 2px solid var(--GREY-200);
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.baggage-display {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.baggage-display__content {
|
|
7
|
+
margin-left: var(--SPACING-SM-1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.baggage-display__label {
|
|
11
|
+
color: var(--grey-900);
|
|
12
|
+
font-size: var(--FONT-SIZES-C2);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.baggage-display__price {
|
|
16
|
+
font-size: var(--FONT-SIZES-C2);
|
|
17
|
+
color: var(--GREY-600);
|
|
18
|
+
margin-left: var(--SPACING-XS-2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.baggage-display__specs {
|
|
22
|
+
margin-top: var(--SPACING-XS-2);
|
|
23
|
+
font-size: var(--FONT-SIZES-C3);
|
|
24
|
+
color: var(--GREY-600);
|
|
25
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 1. Change the font styles in all browsers.
|
|
3
|
+
* 2. Remove the margin in Firefox and Safari.
|
|
4
|
+
*/
|
|
5
|
+
button {
|
|
6
|
+
font-family: inherit; /* 1 */
|
|
7
|
+
font-size: 100%; /* 1 */
|
|
8
|
+
line-height: 1.15; /* 1 */
|
|
9
|
+
margin: 0; /* 2 */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Show the overflow in IE.
|
|
14
|
+
* 1. Show the overflow in Edge.
|
|
15
|
+
*/
|
|
16
|
+
button {
|
|
17
|
+
/* 1 */
|
|
18
|
+
overflow: visible;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
|
23
|
+
* 1. Remove the inheritance of text transform in Firefox.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
button {
|
|
27
|
+
/* 1 */
|
|
28
|
+
text-transform: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Correct the inability to style clickable types in iOS and Safari.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
button,
|
|
36
|
+
[type="button"],
|
|
37
|
+
[type="reset"],
|
|
38
|
+
[type="submit"] {
|
|
39
|
+
appearance: button;
|
|
40
|
+
-webkit-appearance: button;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Remove the inner border and padding in Firefox.
|
|
45
|
+
*/
|
|
46
|
+
button::-moz-focus-inner,
|
|
47
|
+
[type="button"]::-moz-focus-inner,
|
|
48
|
+
[type="reset"]::-moz-focus-inner,
|
|
49
|
+
[type="submit"]::-moz-focus-inner {
|
|
50
|
+
border-style: none;
|
|
51
|
+
padding: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Restore the focus styles unset by the previous rule.
|
|
56
|
+
*/
|
|
57
|
+
button:-moz-focusring,
|
|
58
|
+
[type="button"]:-moz-focusring,
|
|
59
|
+
[type="reset"]:-moz-focusring,
|
|
60
|
+
[type="submit"]:-moz-focusring {
|
|
61
|
+
outline: 1px dotted ButtonText;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.button {
|
|
65
|
+
--button-color: white;
|
|
66
|
+
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
border-radius: var(--BUTTON-RADIUS, 6px);
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
border: none;
|
|
71
|
+
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
|
|
76
|
+
letter-spacing: 0em;
|
|
77
|
+
|
|
78
|
+
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
79
|
+
color: var(--button-color);
|
|
80
|
+
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.25), 0px 0px 0px #e9e9eb;
|
|
81
|
+
|
|
82
|
+
border: 1px solid rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
83
|
+
transition: background-color 0.3s var(--TRANSITION-CUBIC-BEZIER),
|
|
84
|
+
box-shadow 0.3s var(--TRANSITION-CUBIC-BEZIER),
|
|
85
|
+
color 0.3s var(--TRANSITION-CUBIC-BEZIER);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.button--32 {
|
|
89
|
+
height: 32px;
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
line-height: 20px;
|
|
93
|
+
padding-inline: 16px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.button--40 {
|
|
97
|
+
height: 40px;
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
font-weight: 600;
|
|
100
|
+
line-height: 20px;
|
|
101
|
+
padding-inline: 24px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.button--48 {
|
|
105
|
+
height: 48px;
|
|
106
|
+
font-size: 16px;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
line-height: 24px;
|
|
109
|
+
padding-inline: 32px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.button svg {
|
|
113
|
+
/* Using important to take precedence over inline styles on icon */
|
|
114
|
+
display: inline !important;
|
|
115
|
+
height: 20px;
|
|
116
|
+
margin-right: 4px;
|
|
117
|
+
margin-left: -4px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.button:not(:disabled):hover {
|
|
121
|
+
box-shadow: 0px 0px 0px 2px #e9e9eb, 0px 2px 4px 1px #00000026;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.button:disabled {
|
|
125
|
+
cursor: not-allowed;
|
|
126
|
+
opacity: 0.4;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.button--primary:not(:disabled):hover {
|
|
130
|
+
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-800));
|
|
131
|
+
border-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-800));
|
|
132
|
+
box-shadow: 0px 2px 4px 1px rgba(0, 0, 0, 0.15), 0px 0px 0px 2px #e9e9eb;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.button--primary:not(:disabled):active {
|
|
136
|
+
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
137
|
+
border-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
138
|
+
box-shadow: 0px 1px 2px 1px rgba(0, 0, 0, 0.25), 0px 0px 0px 1px #dcdcde;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.button--destructive,
|
|
142
|
+
.button--outlined {
|
|
143
|
+
border: 1px solid #ccccd4;
|
|
144
|
+
color: var(--GREY-900);
|
|
145
|
+
background-color: rgb(var(--WHITE));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.button--outlined:not(:disabled):hover,
|
|
149
|
+
.button--destructive:not(:disabled):hover {
|
|
150
|
+
border: 1px solid #ababb4;
|
|
151
|
+
background-color: #fbfbfd;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.button--outlined:not(:disabled):active,
|
|
155
|
+
.button--destructive:not(:disabled):active {
|
|
156
|
+
background-color: var(--GREY-100);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.button--destructive {
|
|
160
|
+
color: var(--RED);
|
|
161
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.ancillary-card:disabled {
|
|
2
|
+
color: inherit;
|
|
3
|
+
cursor: not-allowed;
|
|
4
|
+
background-color: var(--GREY-100);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ancillary-card--loading:disabled {
|
|
8
|
+
cursor: progress;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ancillary-card__expand-icon {
|
|
12
|
+
color: var(--GREY-400);
|
|
13
|
+
transition: color 0.3s var(--TRANSITION-CUBIC-BEZIER),
|
|
14
|
+
transform 0.5s var(--TRANSITION-CUBIC-BEZIER);
|
|
15
|
+
transform: scale(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ancillary-card__children {
|
|
19
|
+
text-align: start;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
line-height: 24px;
|
|
23
|
+
color: var(--GREY-600);
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
align-items: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ancillary-card:not(:disabled):not(.ancillary-card--loading):focus {
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ancillary-card:not(:disabled):not(.ancillary-card--loading):hover,
|
|
34
|
+
.ancillary-card:not(:disabled):not(.ancillary-card--loading):focus-visible {
|
|
35
|
+
/* important is needed here to override the inline border style from Card.tsx */
|
|
36
|
+
border-color: rgb(var(--ACCENT)) !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ancillary-card:not(:disabled):not(.ancillary-card--loading):hover
|
|
40
|
+
.ancillary-card__expand-icon,
|
|
41
|
+
.ancillary-card:not(:disabled):not(.ancillary-card--loading):focus-visible
|
|
42
|
+
.ancillary-card__expand-icon {
|
|
43
|
+
color: rgb(var(--ACCENT));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ancillary-card__selected-icon {
|
|
47
|
+
background-color: rgb(var(--ACCENT));
|
|
48
|
+
border-radius: 20px;
|
|
49
|
+
color: rgb(var(--WHITE));
|
|
50
|
+
height: 24px;
|
|
51
|
+
width: 24px;
|
|
52
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.cfar-modal-footer {
|
|
2
|
+
margin-top: 16px;
|
|
3
|
+
padding: 16px 24px 24px;
|
|
4
|
+
display: grid;
|
|
5
|
+
column-gap: 12px;
|
|
6
|
+
row-gap: 12px;
|
|
7
|
+
grid-template-columns: 1fr;
|
|
8
|
+
grid-template-rows: repeat(2, 1fr);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cfar-modal-list-item {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
column-gap: 8px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cfar-modal-list-item > svg {
|
|
20
|
+
color: rgb(var(--ACCENT));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cfar-modal-list-item > p {
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* tablet or greater */
|
|
29
|
+
@media (min-width: 768px) {
|
|
30
|
+
.cfar-modal-footer {
|
|
31
|
+
grid-template-columns: repeat(2, 1fr);
|
|
32
|
+
grid-template-rows: 1fr;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.counter {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.counter__count-label {
|
|
7
|
+
font-size: var(--FONT-SIZES-C2);
|
|
8
|
+
text-align: center;
|
|
9
|
+
align-self: center;
|
|
10
|
+
color: var(--GREY-900);
|
|
11
|
+
width: var(--SPACING-LG-2);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media screen and (min-width: 768px) {
|
|
15
|
+
.counter__count-label {
|
|
16
|
+
width: var(--SPACING-LG-1);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.card-payment__container {
|
|
2
|
+
width: 480px;
|
|
3
|
+
height: auto;
|
|
4
|
+
max-width: 480px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
margin: var(--SPACING-XS-3);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.card-payment__container--invalid {
|
|
10
|
+
margin-top: var(--SPACING-SM-1);
|
|
11
|
+
font-size: var(--FONT-SIZES-C2);
|
|
12
|
+
color: var(--RED);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.card-payment__container--invalid {
|
|
16
|
+
height: 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.card-details {
|
|
20
|
+
background-color: rgb(var(--WHITE));
|
|
21
|
+
border: 1px solid var(--GREY-200);
|
|
22
|
+
border-radius: 5px;
|
|
23
|
+
padding: var(--SPACING-SM-2);
|
|
24
|
+
width: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.card-details.StripeElement--invalid {
|
|
28
|
+
border: 1px solid var(--RED);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.card-payment__pay-button {
|
|
32
|
+
width: 100%;
|
|
33
|
+
margin-top: var(--SPACING-SM-3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card-payment--in-progress {
|
|
37
|
+
display: block;
|
|
38
|
+
z-index: 3;
|
|
39
|
+
width: 100vw;
|
|
40
|
+
height: 100vh;
|
|
41
|
+
position: absolute;
|
|
42
|
+
}
|