@tui-cruises/mein-schiff-web-react-component-library 2.0.0-rc.1
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/CHANGELOG.md +7 -0
- package/LICENSE +14 -0
- package/README.md +26 -0
- package/custom.d.ts +14 -0
- package/icons/icons/360.tsx +20 -0
- package/icons/icons/add-circle.tsx +26 -0
- package/icons/icons/airplane.tsx +20 -0
- package/icons/icons/anchor.tsx +20 -0
- package/icons/icons/angle-tool.tsx +26 -0
- package/icons/icons/arrow-down.tsx +20 -0
- package/icons/icons/arrow-left.tsx +20 -0
- package/icons/icons/arrow-right.tsx +20 -0
- package/icons/icons/at.tsx +20 -0
- package/icons/icons/baggage.tsx +20 -0
- package/icons/icons/balcony.tsx +20 -0
- package/icons/icons/bathroom.tsx +32 -0
- package/icons/icons/beach.tsx +20 -0
- package/icons/icons/bed.tsx +26 -0
- package/icons/icons/bell.tsx +20 -0
- package/icons/icons/bording.tsx +20 -0
- package/icons/icons/cabins.tsx +20 -0
- package/icons/icons/calendar.tsx +32 -0
- package/icons/icons/cancel.tsx +20 -0
- package/icons/icons/cash.tsx +44 -0
- package/icons/icons/check-circle.tsx +18 -0
- package/icons/icons/check.tsx +20 -0
- package/icons/icons/circle.tsx +20 -0
- package/icons/icons/clear.tsx +24 -0
- package/icons/icons/clock-rotate-right.tsx +20 -0
- package/icons/icons/clock.tsx +26 -0
- package/icons/icons/cloud-sunny.tsx +43 -0
- package/icons/icons/cloud.tsx +20 -0
- package/icons/icons/compass.tsx +26 -0
- package/icons/icons/delete-circle.tsx +26 -0
- package/icons/icons/departure.tsx +20 -0
- package/icons/icons/details.tsx +20 -0
- package/icons/icons/diamond.tsx +20 -0
- package/icons/icons/edit-pencil.tsx +20 -0
- package/icons/icons/excellence.tsx +20 -0
- package/icons/icons/expand.tsx +20 -0
- package/icons/icons/eye-closed.tsx +20 -0
- package/icons/icons/eye-empty.tsx +26 -0
- package/icons/icons/eye-off.tsx +32 -0
- package/icons/icons/eye.tsx +26 -0
- package/icons/icons/fallback.tsx +26 -0
- package/icons/icons/filter.tsx +20 -0
- package/icons/icons/flag.tsx +20 -0
- package/icons/icons/fog.tsx +22 -0
- package/icons/icons/glases.tsx +28 -0
- package/icons/icons/group.tsx +32 -0
- package/icons/icons/heart-filled.tsx +20 -0
- package/icons/icons/heart.tsx +20 -0
- package/icons/icons/help-circle.tsx +24 -0
- package/icons/icons/home.tsx +22 -0
- package/icons/icons/humidity.tsx +30 -0
- package/icons/icons/impressions.tsx +20 -0
- package/icons/icons/inclusive-services.tsx +20 -0
- package/icons/icons/index.ts +141 -0
- package/icons/icons/info-empty.tsx +26 -0
- package/icons/icons/language.tsx +20 -0
- package/icons/icons/lifebuoy.tsx +30 -0
- package/icons/icons/loading.tsx +18 -0
- package/icons/icons/location.tsx +24 -0
- package/icons/icons/log-in.tsx +26 -0
- package/icons/icons/log-out.tsx +26 -0
- package/icons/icons/mail-open.tsx +20 -0
- package/icons/icons/map.tsx +20 -0
- package/icons/icons/maps-arrow-diagonal.tsx +20 -0
- package/icons/icons/media-image-list.tsx +32 -0
- package/icons/icons/menu.tsx +21 -0
- package/icons/icons/metropolis.tsx +20 -0
- package/icons/icons/minus.tsx +20 -0
- package/icons/icons/more-horiz.tsx +35 -0
- package/icons/icons/more-vert.tsx +35 -0
- package/icons/icons/mostly-cloudy-night.tsx +24 -0
- package/icons/icons/ms-ship.tsx +20 -0
- package/icons/icons/music.tsx +20 -0
- package/icons/icons/nav-arrow-down.tsx +20 -0
- package/icons/icons/nav-arrow-left.tsx +20 -0
- package/icons/icons/nav-arrow-right.tsx +20 -0
- package/icons/icons/nav-arrow-up.tsx +20 -0
- package/icons/icons/no-wifi.tsx +18 -0
- package/icons/icons/old-trips.tsx +20 -0
- package/icons/icons/percentage.tsx +20 -0
- package/icons/icons/phone.tsx +20 -0
- package/icons/icons/pin.tsx +20 -0
- package/icons/icons/play.tsx +20 -0
- package/icons/icons/plus-circle.tsx +20 -0
- package/icons/icons/plus.tsx +20 -0
- package/icons/icons/point.tsx +15 -0
- package/icons/icons/rain.tsx +22 -0
- package/icons/icons/receipt.tsx +20 -0
- package/icons/icons/refresh-double.tsx +32 -0
- package/icons/icons/search.tsx +26 -0
- package/icons/icons/security-pass.tsx +26 -0
- package/icons/icons/settings.tsx +20 -0
- package/icons/icons/share-ios.tsx +26 -0
- package/icons/icons/ship-account.tsx +20 -0
- package/icons/icons/ship-info.tsx +20 -0
- package/icons/icons/ship-position.tsx +27 -0
- package/icons/icons/shooting-stars.tsx +28 -0
- package/icons/icons/sleet.tsx +22 -0
- package/icons/icons/snow-flake.tsx +20 -0
- package/icons/icons/snow.tsx +22 -0
- package/icons/icons/sofa.tsx +32 -0
- package/icons/icons/star-dashed.tsx +20 -0
- package/icons/icons/star-filled.tsx +25 -0
- package/icons/icons/star-half-dashed.tsx +26 -0
- package/icons/icons/star.tsx +20 -0
- package/icons/icons/substract.tsx +26 -0
- package/icons/icons/sun-light.tsx +42 -0
- package/icons/icons/temperature-high.tsx +26 -0
- package/icons/icons/thunderstorm.tsx +26 -0
- package/icons/icons/tornado.tsx +18 -0
- package/icons/icons/trash.tsx +20 -0
- package/icons/icons/travel-assistant.tsx +24 -0
- package/icons/icons/tropical-storm.tsx +71 -0
- package/icons/icons/upcoming-trips.tsx +27 -0
- package/icons/icons/user.tsx +26 -0
- package/icons/icons/warning-circle.tsx +26 -0
- package/icons/icons/warning-hexagon.tsx +26 -0
- package/icons/icons/weather.tsx +20 -0
- package/icons/icons/wifi.tsx +20 -0
- package/icons/icons/wind.tsx +22 -0
- package/icons/icons/windrose.tsx +42 -0
- package/icons/icons/windsock.tsx +20 -0
- package/icons/pictograms/24h-meals.tsx +25 -0
- package/icons/pictograms/ad-template.tsx +23 -0
- package/icons/pictograms/add.tsx +25 -0
- package/icons/pictograms/adventure-club-only.tsx +25 -0
- package/icons/pictograms/allergy.tsx +30 -0
- package/icons/pictograms/anchor.tsx +23 -0
- package/icons/pictograms/arrival.tsx +23 -0
- package/icons/pictograms/baby-awake.tsx +20 -0
- package/icons/pictograms/baby-monitor.tsx +20 -0
- package/icons/pictograms/baby-sleep.tsx +20 -0
- package/icons/pictograms/baggage-information.tsx +23 -0
- package/icons/pictograms/baggage.tsx +23 -0
- package/icons/pictograms/bedroom-check.tsx +23 -0
- package/icons/pictograms/bedroom.tsx +23 -0
- package/icons/pictograms/beverages.tsx +28 -0
- package/icons/pictograms/billboard.tsx +23 -0
- package/icons/pictograms/blog.tsx +23 -0
- package/icons/pictograms/brochure.tsx +23 -0
- package/icons/pictograms/calendar-check.tsx +18 -0
- package/icons/pictograms/calendar-default.tsx +18 -0
- package/icons/pictograms/calendar-disabled.tsx +18 -0
- package/icons/pictograms/calendar-focus.tsx +25 -0
- package/icons/pictograms/champagne-glasses.tsx +25 -0
- package/icons/pictograms/check.tsx +25 -0
- package/icons/pictograms/checklist-check.tsx +18 -0
- package/icons/pictograms/checklist.tsx +21 -0
- package/icons/pictograms/checkmark.tsx +23 -0
- package/icons/pictograms/chef-hat.tsx +30 -0
- package/icons/pictograms/chevron-down.tsx +25 -0
- package/icons/pictograms/chevron-up.tsx +25 -0
- package/icons/pictograms/circles.tsx +25 -0
- package/icons/pictograms/cleaning-trolley.tsx +30 -0
- package/icons/pictograms/clock-0-30.tsx +23 -0
- package/icons/pictograms/clock-0.tsx +23 -0
- package/icons/pictograms/clock-1-30.tsx +23 -0
- package/icons/pictograms/clock-1.tsx +23 -0
- package/icons/pictograms/clock-10-30.tsx +23 -0
- package/icons/pictograms/clock-10.tsx +23 -0
- package/icons/pictograms/clock-11-30.tsx +23 -0
- package/icons/pictograms/clock-11.tsx +23 -0
- package/icons/pictograms/clock-2-30.tsx +23 -0
- package/icons/pictograms/clock-2.tsx +23 -0
- package/icons/pictograms/clock-3-30.tsx +23 -0
- package/icons/pictograms/clock-3.tsx +23 -0
- package/icons/pictograms/clock-4-30.tsx +23 -0
- package/icons/pictograms/clock-4.tsx +23 -0
- package/icons/pictograms/clock-5-30.tsx +23 -0
- package/icons/pictograms/clock-5.tsx +23 -0
- package/icons/pictograms/clock-6-30.tsx +23 -0
- package/icons/pictograms/clock-6.tsx +23 -0
- package/icons/pictograms/clock-7-30.tsx +23 -0
- package/icons/pictograms/clock-7.tsx +23 -0
- package/icons/pictograms/clock-8-30.tsx +23 -0
- package/icons/pictograms/clock-8.tsx +23 -0
- package/icons/pictograms/clock-9-30.tsx +23 -0
- package/icons/pictograms/clock-9.tsx +23 -0
- package/icons/pictograms/clock-default.tsx +23 -0
- package/icons/pictograms/close.tsx +25 -0
- package/icons/pictograms/clothing.tsx +23 -0
- package/icons/pictograms/cloud.tsx +23 -0
- package/icons/pictograms/cocktails.tsx +23 -0
- package/icons/pictograms/coffee-machine.tsx +23 -0
- package/icons/pictograms/compass.tsx +23 -0
- package/icons/pictograms/couple.tsx +25 -0
- package/icons/pictograms/crew-love.tsx +28 -0
- package/icons/pictograms/crown.tsx +23 -0
- package/icons/pictograms/dart.tsx +23 -0
- package/icons/pictograms/decoration.tsx +23 -0
- package/icons/pictograms/departure-check.tsx +25 -0
- package/icons/pictograms/departure-germany.tsx +20 -0
- package/icons/pictograms/departure-time.tsx +35 -0
- package/icons/pictograms/departure.tsx +23 -0
- package/icons/pictograms/diamond.tsx +23 -0
- package/icons/pictograms/discount-card.tsx +35 -0
- package/icons/pictograms/discount.tsx +30 -0
- package/icons/pictograms/documents.tsx +23 -0
- package/icons/pictograms/download-document.tsx +23 -0
- package/icons/pictograms/download.tsx +23 -0
- package/icons/pictograms/dripping-dew.tsx +23 -0
- package/icons/pictograms/dumbbell.tsx +25 -0
- package/icons/pictograms/early-bird.tsx +23 -0
- package/icons/pictograms/edit.tsx +23 -0
- package/icons/pictograms/energy-saving.tsx +23 -0
- package/icons/pictograms/enjoyer-club-only.tsx +18 -0
- package/icons/pictograms/environment.tsx +30 -0
- package/icons/pictograms/environmental-officer.tsx +30 -0
- package/icons/pictograms/explorer-club-only.tsx +18 -0
- package/icons/pictograms/family.tsx +25 -0
- package/icons/pictograms/fb-community.tsx +25 -0
- package/icons/pictograms/finance.tsx +25 -0
- package/icons/pictograms/fog.tsx +25 -0
- package/icons/pictograms/food-certificate.tsx +30 -0
- package/icons/pictograms/gastronomy.tsx +25 -0
- package/icons/pictograms/gift.tsx +23 -0
- package/icons/pictograms/globetrotter-club-only.tsx +18 -0
- package/icons/pictograms/hairdresser.tsx +20 -0
- package/icons/pictograms/handbag.tsx +30 -0
- package/icons/pictograms/hands-holding-heart.tsx +30 -0
- package/icons/pictograms/heart-beat.tsx +29 -0
- package/icons/pictograms/heart.tsx +23 -0
- package/icons/pictograms/home.tsx +23 -0
- package/icons/pictograms/hospital-cross.tsx +23 -0
- package/icons/pictograms/hot-dish.tsx +23 -0
- package/icons/pictograms/hot-drink.tsx +25 -0
- package/icons/pictograms/human-heart.tsx +30 -0
- package/icons/pictograms/human-holding-heart.tsx +30 -0
- package/icons/pictograms/human-open-arms.tsx +23 -0
- package/icons/pictograms/human-profile.tsx +23 -0
- package/icons/pictograms/human-swimming.tsx +25 -0
- package/icons/pictograms/ice-cream.tsx +23 -0
- package/icons/pictograms/important.tsx +23 -0
- package/icons/pictograms/index.ts +285 -0
- package/icons/pictograms/information.tsx +30 -0
- package/icons/pictograms/internet.tsx +23 -0
- package/icons/pictograms/jogging.tsx +21 -0
- package/icons/pictograms/kid-playing.tsx +23 -0
- package/icons/pictograms/life-jacket.tsx +21 -0
- package/icons/pictograms/lifebuoy.tsx +20 -0
- package/icons/pictograms/lightbulb.tsx +23 -0
- package/icons/pictograms/lightning.tsx +23 -0
- package/icons/pictograms/location-mark.tsx +30 -0
- package/icons/pictograms/log-in.tsx +23 -0
- package/icons/pictograms/long-term-trips.tsx +20 -0
- package/icons/pictograms/lotte-chatbot.tsx +28 -0
- package/icons/pictograms/lotte-mail.tsx +28 -0
- package/icons/pictograms/mail-at.tsx +23 -0
- package/icons/pictograms/mail-information.tsx +23 -0
- package/icons/pictograms/mailbox.tsx +23 -0
- package/icons/pictograms/many-sea-days.tsx +20 -0
- package/icons/pictograms/medal.tsx +23 -0
- package/icons/pictograms/microphone.tsx +23 -0
- package/icons/pictograms/ms-1.tsx +23 -0
- package/icons/pictograms/ms-2.tsx +30 -0
- package/icons/pictograms/ms-3.tsx +30 -0
- package/icons/pictograms/ms-4.tsx +30 -0
- package/icons/pictograms/ms-5.tsx +30 -0
- package/icons/pictograms/ms-6.tsx +30 -0
- package/icons/pictograms/ms-7-new-eng.tsx +37 -0
- package/icons/pictograms/ms-7-new.tsx +30 -0
- package/icons/pictograms/ms-7.tsx +30 -0
- package/icons/pictograms/ms-default.tsx +30 -0
- package/icons/pictograms/ms-flow-new-eng.tsx +37 -0
- package/icons/pictograms/ms-flow-new.tsx +49 -0
- package/icons/pictograms/ms-flow.tsx +41 -0
- package/icons/pictograms/ms-relax-new-eng.tsx +37 -0
- package/icons/pictograms/ms-relax-new.tsx +36 -0
- package/icons/pictograms/ms-ship.tsx +23 -0
- package/icons/pictograms/music-book.tsx +23 -0
- package/icons/pictograms/my-account.tsx +22 -0
- package/icons/pictograms/my-trips.tsx +29 -0
- package/icons/pictograms/navigation-arrow.tsx +23 -0
- package/icons/pictograms/no-wifi.tsx +21 -0
- package/icons/pictograms/not-available.tsx +23 -0
- package/icons/pictograms/offer.tsx +23 -0
- package/icons/pictograms/offline.tsx +25 -0
- package/icons/pictograms/onboard-announcement.tsx +20 -0
- package/icons/pictograms/package-newspaper.tsx +27 -0
- package/icons/pictograms/paper-news.tsx +23 -0
- package/icons/pictograms/paper-plane.tsx +28 -0
- package/icons/pictograms/payment-check.tsx +32 -0
- package/icons/pictograms/payment.tsx +28 -0
- package/icons/pictograms/people-check.tsx +25 -0
- package/icons/pictograms/people.tsx +25 -0
- package/icons/pictograms/permanent-make-up.tsx +20 -0
- package/icons/pictograms/person-single.tsx +23 -0
- package/icons/pictograms/phone.tsx +20 -0
- package/icons/pictograms/play-button.tsx +20 -0
- package/icons/pictograms/presentation.tsx +23 -0
- package/icons/pictograms/price-tag.tsx +21 -0
- package/icons/pictograms/printer.tsx +23 -0
- package/icons/pictograms/rain.tsx +23 -0
- package/icons/pictograms/receipt.tsx +25 -0
- package/icons/pictograms/remove.tsx +25 -0
- package/icons/pictograms/safety.tsx +23 -0
- package/icons/pictograms/screen.tsx +23 -0
- package/icons/pictograms/search.tsx +23 -0
- package/icons/pictograms/service.tsx +23 -0
- package/icons/pictograms/sewage.tsx +30 -0
- package/icons/pictograms/ship-outstanding.tsx +23 -0
- package/icons/pictograms/ship-transfer.tsx +23 -0
- package/icons/pictograms/shooting-stars.tsx +23 -0
- package/icons/pictograms/shore-excursions-old.tsx +23 -0
- package/icons/pictograms/shore-excursions.tsx +32 -0
- package/icons/pictograms/short-notice-departures.tsx +20 -0
- package/icons/pictograms/short-trips.tsx +21 -0
- package/icons/pictograms/size.tsx +23 -0
- package/icons/pictograms/smartphone.tsx +23 -0
- package/icons/pictograms/smiley.tsx +23 -0
- package/icons/pictograms/social-media.tsx +37 -0
- package/icons/pictograms/spa-balcony-cabin.tsx +43 -0
- package/icons/pictograms/speech-bubble-faq.tsx +23 -0
- package/icons/pictograms/speech-bubble-hello.tsx +23 -0
- package/icons/pictograms/speech-bubble-ok.tsx +30 -0
- package/icons/pictograms/speedboat.tsx +23 -0
- package/icons/pictograms/star-cancel.tsx +23 -0
- package/icons/pictograms/star-check.tsx +23 -0
- package/icons/pictograms/star-plus.tsx +23 -0
- package/icons/pictograms/star.tsx +23 -0
- package/icons/pictograms/sun-cloud.tsx +23 -0
- package/icons/pictograms/sun-lounger.tsx +23 -0
- package/icons/pictograms/sun.tsx +23 -0
- package/icons/pictograms/theater-mask.tsx +35 -0
- package/icons/pictograms/thermometer.tsx +23 -0
- package/icons/pictograms/tickets.tsx +21 -0
- package/icons/pictograms/towels.tsx +23 -0
- package/icons/pictograms/transportation.tsx +30 -0
- package/icons/pictograms/travel-protection-check.tsx +23 -0
- package/icons/pictograms/travel-protection.tsx +23 -0
- package/icons/pictograms/video.tsx +23 -0
- package/icons/pictograms/waste-management.tsx +30 -0
- package/icons/pictograms/webinar.tsx +23 -0
- package/icons/pictograms/wheel-of-fortune.tsx +23 -0
- package/icons/pictograms/wifi.tsx +20 -0
- package/icons/pictograms/wind.tsx +25 -0
- package/index.tsx +73 -0
- package/package.json +119 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/videos/placeholder.mp4 +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_It.ttf +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_It.woff +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_It.woff2 +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_Rg.ttf +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_Rg.woff +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_Rg.woff2 +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBd.ttf +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBd.woff +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBd.woff2 +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBdIt.ttf +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBdIt.woff +0 -0
- package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBdIt.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.svg +338 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.svg +345 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.svg +338 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.svg +346 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.svg +337 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.svg +342 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.svg +337 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.svg +339 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.svg +337 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.svg +340 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.svg +343 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.woff2 +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.eot +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.svg +337 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.ttf +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.woff +0 -0
- package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.woff2 +0 -0
- package/src/assets/images/placeholder-blueish.jpg +0 -0
- package/src/assets/images/placeholder-sepia.jpg +0 -0
- package/src/assets/images/placeholder.jpg +0 -0
- package/src/components/core/Accordion/Accordion.tsx +228 -0
- package/src/components/core/Accordion/AccordionItem.tsx +72 -0
- package/src/components/core/Accordion/AccordionTab.tsx +39 -0
- package/src/components/core/Accordion/index.ts +3 -0
- package/src/components/core/Accordion/utils.tsx +13 -0
- package/src/components/core/Alert/Alert.tsx +131 -0
- package/src/components/core/Alert/index.ts +1 -0
- package/src/components/core/AlertDialog/AlertDialog.tsx +288 -0
- package/src/components/core/AlertDialog/index.ts +1 -0
- package/src/components/core/Badge/Badge.tsx +70 -0
- package/src/components/core/Badge/index.ts +1 -0
- package/src/components/core/BirthdateField/BirthdateField.tsx +269 -0
- package/src/components/core/BirthdateField/index.ts +1 -0
- package/src/components/core/Button/Button.tsx +178 -0
- package/src/components/core/Button/index.ts +1 -0
- package/src/components/core/ButtonGroup/ButtonGroup.tsx +71 -0
- package/src/components/core/ButtonGroup/index.ts +1 -0
- package/src/components/core/Calendar/Calendar.tsx +303 -0
- package/src/components/core/Calendar/index.ts +1 -0
- package/src/components/core/Checkbox/Checkbox.tsx +107 -0
- package/src/components/core/Checkbox/index.ts +1 -0
- package/src/components/core/CheckboxField/CheckboxField.tsx +156 -0
- package/src/components/core/CheckboxField/CheckboxFieldError.tsx +14 -0
- package/src/components/core/CheckboxField/CheckboxFieldLabel.tsx +25 -0
- package/src/components/core/CheckboxField/CheckboxFieldNote.tsx +16 -0
- package/src/components/core/CheckboxField/index.ts +1 -0
- package/src/components/core/Countdown/Countdown.tsx +67 -0
- package/src/components/core/Countdown/index.ts +1 -0
- package/src/components/core/DataTable/DataTable.tsx +98 -0
- package/src/components/core/DataTable/index.ts +1 -0
- package/src/components/core/Dialog/Dialog.tsx +443 -0
- package/src/components/core/Dialog/index.ts +1 -0
- package/src/components/core/Divider/Divider.tsx +37 -0
- package/src/components/core/Divider/index.ts +1 -0
- package/src/components/core/FavoriteButton/FavoriteButton.tsx +294 -0
- package/src/components/core/FavoriteButton/index.ts +1 -0
- package/src/components/core/Fieldset/Fieldset.tsx +42 -0
- package/src/components/core/Fieldset/index.ts +1 -0
- package/src/components/core/FormLabel/FormLabel.tsx +88 -0
- package/src/components/core/FormLabel/index.ts +1 -0
- package/src/components/core/Icon/Icon.tsx +106 -0
- package/src/components/core/Icon/index.ts +1 -0
- package/src/components/core/IconButton/IconButton.tsx +169 -0
- package/src/components/core/IconButton/index.ts +1 -0
- package/src/components/core/InputField/InputField.tsx +128 -0
- package/src/components/core/InputField/InputFieldError.tsx +17 -0
- package/src/components/core/InputField/InputFieldInput.tsx +67 -0
- package/src/components/core/InputField/InputFieldLabel.tsx +29 -0
- package/src/components/core/InputField/InputFieldNote.tsx +16 -0
- package/src/components/core/InputField/index.ts +1 -0
- package/src/components/core/LoadingSpinner/LoadingSpinner.tsx +50 -0
- package/src/components/core/LoadingSpinner/index.ts +1 -0
- package/src/components/core/Pagination/Pagination.tsx +191 -0
- package/src/components/core/Pagination/index.ts +1 -0
- package/src/components/core/PasswordField/PasswordField.tsx +187 -0
- package/src/components/core/PasswordField/PasswordFieldRequirementsList.tsx +78 -0
- package/src/components/core/PasswordField/index.ts +1 -0
- package/src/components/core/PhoneNumberInput/PhoneNumberInput.tsx +201 -0
- package/src/components/core/PhoneNumberInput/countries.json +242 -0
- package/src/components/core/PhoneNumberInput/index.ts +1 -0
- package/src/components/core/Pictogram/Pictogram.tsx +67 -0
- package/src/components/core/Pictogram/index.ts +1 -0
- package/src/components/core/Popover/Popover.tsx +61 -0
- package/src/components/core/Popover/index.ts +1 -0
- package/src/components/core/Portlist/Portlist.tsx +28 -0
- package/src/components/core/Portlist/index.ts +1 -0
- package/src/components/core/PriceInput/PriceInput.tsx +100 -0
- package/src/components/core/PriceInput/index.ts +1 -0
- package/src/components/core/QuantityItem/QuantityItem.tsx +37 -0
- package/src/components/core/QuantityItem/index.ts +1 -0
- package/src/components/core/Radio/Radio.tsx +64 -0
- package/src/components/core/Radio/index.ts +1 -0
- package/src/components/core/RadioField/RadioField.tsx +66 -0
- package/src/components/core/RadioField/index.ts +1 -0
- package/src/components/core/RadixRadio/RadixRadio.tsx +56 -0
- package/src/components/core/RadixRadio/index.ts +1 -0
- package/src/components/core/RadixSelect/RadixSelect.tsx +172 -0
- package/src/components/core/RadixSelect/index.ts +1 -0
- package/src/components/core/RangeSlider/RangeSlider.tsx +59 -0
- package/src/components/core/RangeSlider/index.ts +1 -0
- package/src/components/core/Section/Section.tsx +62 -0
- package/src/components/core/Section/index.ts +1 -0
- package/src/components/core/SegmentedControl/SegmentedControl.tsx +65 -0
- package/src/components/core/SegmentedControl/index.ts +1 -0
- package/src/components/core/Select/Select.tsx +171 -0
- package/src/components/core/Select/index.ts +1 -0
- package/src/components/core/SelectField/SelectField.tsx +67 -0
- package/src/components/core/SelectField/index.ts +1 -0
- package/src/components/core/Skeleton/Skeleton.tsx +23 -0
- package/src/components/core/Skeleton/SkeletonTextLines.tsx +37 -0
- package/src/components/core/Skeleton/index.ts +2 -0
- package/src/components/core/Stepper/Stepper.tsx +116 -0
- package/src/components/core/Stepper/index.ts +1 -0
- package/src/components/core/SwitchToggle/SwitchToggle.tsx +46 -0
- package/src/components/core/SwitchToggle/index.ts +1 -0
- package/src/components/core/Tabs/Tabs.tsx +130 -0
- package/src/components/core/Tabs/index.ts +1 -0
- package/src/components/core/Tag/Tag.tsx +61 -0
- package/src/components/core/Tag/index.ts +1 -0
- package/src/components/core/TextButton/TextButton.tsx +108 -0
- package/src/components/core/TextButton/index.ts +1 -0
- package/src/components/core/Toast/Toast.tsx +65 -0
- package/src/components/core/Toast/index.ts +1 -0
- package/src/components/core/Tooltip/Tooltip.tsx +110 -0
- package/src/components/core/Tooltip/index.ts +1 -0
- package/src/components/shared/NextFontMeinSchiffSansPro/NextFontMeinSchiffSansPro.tsx +160 -0
- package/src/components/shared/NextFontMeinSchiffSansPro/index.ts +1 -0
- package/src/components/shared/UniversalCarousel/CarouselContext.ts +61 -0
- package/src/components/shared/UniversalCarousel/CarouselDefaultPagination.tsx +92 -0
- package/src/components/shared/UniversalCarousel/CarouselInterface.tsx +152 -0
- package/src/components/shared/UniversalCarousel/CarouselStage.tsx +235 -0
- package/src/components/shared/UniversalCarousel/UniversalCarousel.tsx +125 -0
- package/src/components/shared/UniversalCarousel/helpers.ts +206 -0
- package/src/components/shared/UniversalCarousel/index.ts +4 -0
- package/src/helpers/children.ts +27 -0
- package/src/helpers/cookies.ts +22 -0
- package/src/helpers/dateFormat.ts +245 -0
- package/src/helpers/dateToYearMonthDay.ts +17 -0
- package/src/helpers/elementVisibility.ts +53 -0
- package/src/helpers/i18n.ts +197 -0
- package/src/helpers/price.ts +26 -0
- package/src/helpers/responsive-property.ts +118 -0
- package/src/helpers/screen.ts +14 -0
- package/src/helpers/sleep.ts +5 -0
- package/src/helpers/slot.tsx +68 -0
- package/src/helpers/ssr.ts +5 -0
- package/src/helpers/store.ts +75 -0
- package/src/helpers/types.ts +18 -0
- package/src/helpers/utils.ts +3 -0
- package/src/hooks/use-active-screen-names.ts +100 -0
- package/src/hooks/use-intersection-observer.ts +190 -0
- package/src/hooks/use-screen-name-at-least.ts +32 -0
- package/src/hooks/use-screen-name.ts +34 -0
- package/src/hooks/use-store.ts +45 -0
- package/src/hooks/use-toasts.ts +111 -0
- package/src/stores/toasts-store.ts +11 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import ReactSlider from 'react-slider';
|
|
4
|
+
import { twJoin } from 'tailwind-merge';
|
|
5
|
+
|
|
6
|
+
export type RangeSliderProps = {
|
|
7
|
+
value: number[];
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
10
|
+
minStepsBetweenThumbs?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
onValueCommit?: (value: number[]) => void;
|
|
13
|
+
onValueChange?: (value: number[]) => void;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const RangeSlider: React.FC<RangeSliderProps> = ({
|
|
17
|
+
value,
|
|
18
|
+
min,
|
|
19
|
+
max,
|
|
20
|
+
minStepsBetweenThumbs = 1,
|
|
21
|
+
step = 1,
|
|
22
|
+
onValueCommit,
|
|
23
|
+
onValueChange,
|
|
24
|
+
}) => {
|
|
25
|
+
return (
|
|
26
|
+
<ReactSlider
|
|
27
|
+
className="md:h6 h-8"
|
|
28
|
+
thumbClassName="block size-8 md:size-6 rounded-full bg-surface-white border-4 border-stroke-primary-100 hover:border-6 active:border-6 focus:outline-none focus-visible:shadow-focus-state disabled:pointer-events-none disabled:opacity-50 cursor-pointer"
|
|
29
|
+
trackClassName="bg-surface-secondary-20"
|
|
30
|
+
renderTrack={(props, state) => {
|
|
31
|
+
const key = props.key;
|
|
32
|
+
delete props.key;
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
key={key}
|
|
36
|
+
{...props}
|
|
37
|
+
className={twJoin(
|
|
38
|
+
'top-[calc(1rem_-2px)] h-1 rounded-full md:top-[10px]',
|
|
39
|
+
state.index === 1
|
|
40
|
+
? 'bg-surface-primary-100'
|
|
41
|
+
: 'bg-surface-secondary-20',
|
|
42
|
+
)}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}}
|
|
46
|
+
value={value}
|
|
47
|
+
min={min}
|
|
48
|
+
max={max}
|
|
49
|
+
onChange={value => onValueChange && onValueChange(value)}
|
|
50
|
+
onAfterChange={value => onValueCommit && onValueCommit(value)}
|
|
51
|
+
step={step}
|
|
52
|
+
ariaLabel={['Lower thumb', 'Upper thumb']}
|
|
53
|
+
ariaValuetext={state => `Thumb value ${state.valueNow}`}
|
|
54
|
+
minDistance={minStepsBetweenThumbs}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export { RangeSlider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RangeSlider';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ElementType, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { twJoin } from 'tailwind-merge';
|
|
3
|
+
import { PictogramName } from '../../core/Pictogram';
|
|
4
|
+
|
|
5
|
+
export type SectionProps = PropsWithChildren<{
|
|
6
|
+
fallback?: boolean;
|
|
7
|
+
headline?: string;
|
|
8
|
+
headlineAs?: ElementType;
|
|
9
|
+
subline?: ReactNode;
|
|
10
|
+
variant?: 'primary' | 'secondary' | 'transparent';
|
|
11
|
+
pictogramName?: PictogramName;
|
|
12
|
+
disableSpacing?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Section component
|
|
19
|
+
*
|
|
20
|
+
* @param {SectionProps} props - The props for configuring the section component.
|
|
21
|
+
* @returns {JSX.Element} The rendered Section component.
|
|
22
|
+
*/
|
|
23
|
+
export const Section = ({
|
|
24
|
+
fallback,
|
|
25
|
+
children,
|
|
26
|
+
headline,
|
|
27
|
+
headlineAs,
|
|
28
|
+
subline,
|
|
29
|
+
pictogramName,
|
|
30
|
+
id,
|
|
31
|
+
className,
|
|
32
|
+
variant = 'secondary',
|
|
33
|
+
disableSpacing = false,
|
|
34
|
+
...rest
|
|
35
|
+
}: SectionProps) => {
|
|
36
|
+
const sectionClass = twJoin(
|
|
37
|
+
'w-full max-w-none',
|
|
38
|
+
!disableSpacing && 'p-5 md:p-10',
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const contentClass = twJoin(
|
|
42
|
+
'flex w-full flex-col gap-8',
|
|
43
|
+
variant === 'primary' && 'bg-section-gray',
|
|
44
|
+
variant === 'secondary' && 'bg-section-white',
|
|
45
|
+
variant === 'transparent' && 'bg-transparent',
|
|
46
|
+
className,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<section {...(id ? { id } : {})} className={sectionClass} {...rest}>
|
|
51
|
+
<div className={contentClass}>
|
|
52
|
+
{children && (
|
|
53
|
+
<div className="flex flex-col flex-nowrap space-y-4 lg:space-y-6">
|
|
54
|
+
{children}
|
|
55
|
+
</div>
|
|
56
|
+
)}
|
|
57
|
+
</div>
|
|
58
|
+
</section>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
Section.displayName = 'Section';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Section';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
4
|
+
import { ComponentPropsWithoutRef, PropsWithChildren } from 'react';
|
|
5
|
+
import { twJoin } from 'tailwind-merge';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Props for the SegmentedControl component.
|
|
9
|
+
*/
|
|
10
|
+
export type SegmentedControlProps = PropsWithChildren<{
|
|
11
|
+
value: string;
|
|
12
|
+
onValueChange: (value: string) => void;
|
|
13
|
+
size?: 'sm' | 'md';
|
|
14
|
+
}> &
|
|
15
|
+
ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the SegmentedControlItem component.
|
|
19
|
+
*/
|
|
20
|
+
export type SegmentedControlItemProps = PropsWithChildren<{
|
|
21
|
+
label?: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}> &
|
|
24
|
+
ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A segmented control component that allows users to select a value from a set of options.
|
|
28
|
+
*/
|
|
29
|
+
const SegmentedControl = (props: SegmentedControlProps) => {
|
|
30
|
+
const { size = 'md', ...rest } = props;
|
|
31
|
+
return (
|
|
32
|
+
<RadioGroupPrimitive.Root
|
|
33
|
+
className={twJoin(
|
|
34
|
+
'flex font-semibold text-marine-high-emphasis',
|
|
35
|
+
size === 'sm' ? 'text-sm' : 'text-base',
|
|
36
|
+
)}
|
|
37
|
+
{...rest}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A single item in the SegmentedControl.
|
|
44
|
+
*/
|
|
45
|
+
const SegmentedControlItem = (props: SegmentedControlItemProps) => {
|
|
46
|
+
const { label, ...rest } = props;
|
|
47
|
+
return (
|
|
48
|
+
<RadioGroupPrimitive.Item
|
|
49
|
+
className={twJoin(
|
|
50
|
+
'flex-1 border-y border-stroke-secondary-20 bg-transparent px-3 py-2',
|
|
51
|
+
'first:rounded-l-md first:border-l last-of-type:rounded-r-md last-of-type:border-r',
|
|
52
|
+
'hover:bg-surface-primary-120 focus-visible:bg-surface-primary-120 active:bg-surface-primary-120',
|
|
53
|
+
'data-[state=checked]:border-surface-primary-60 data-[state=checked]:bg-surface-primary-60',
|
|
54
|
+
'focus:z-10 focus:outline-none focus-visible:shadow-focus-state',
|
|
55
|
+
)}
|
|
56
|
+
{...rest}
|
|
57
|
+
>
|
|
58
|
+
{label}
|
|
59
|
+
</RadioGroupPrimitive.Item>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
SegmentedControl.displayName = 'SegmentedControl';
|
|
64
|
+
|
|
65
|
+
export { SegmentedControl, SegmentedControlItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SegmentedControl';
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
forwardRef,
|
|
5
|
+
ForwardRefRenderFunction,
|
|
6
|
+
OptionHTMLAttributes,
|
|
7
|
+
SelectHTMLAttributes,
|
|
8
|
+
useEffect,
|
|
9
|
+
useId,
|
|
10
|
+
useImperativeHandle,
|
|
11
|
+
useMemo,
|
|
12
|
+
useRef,
|
|
13
|
+
} from 'react';
|
|
14
|
+
import { getChildrenAsArrayOfElements } from '../../../helpers/children';
|
|
15
|
+
import { RadixSelect, RadixSelectItem } from '../RadixSelect';
|
|
16
|
+
|
|
17
|
+
type Option = OptionHTMLAttributes<HTMLOptionElement>;
|
|
18
|
+
|
|
19
|
+
type Value = Option['value'];
|
|
20
|
+
|
|
21
|
+
type BaseProps = {
|
|
22
|
+
invalid?: string;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
options?: Option[];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type CompatibleProps = Pick<
|
|
28
|
+
SelectHTMLAttributes<HTMLSelectElement>,
|
|
29
|
+
| 'children'
|
|
30
|
+
| 'value'
|
|
31
|
+
| 'defaultValue'
|
|
32
|
+
| 'dir'
|
|
33
|
+
| 'name'
|
|
34
|
+
| 'autoComplete'
|
|
35
|
+
| 'disabled'
|
|
36
|
+
| 'required'
|
|
37
|
+
| 'onChange'
|
|
38
|
+
| 'className'
|
|
39
|
+
>;
|
|
40
|
+
|
|
41
|
+
export type SelectProps = BaseProps &
|
|
42
|
+
Omit<CompatibleProps, keyof BaseProps | 'type'>;
|
|
43
|
+
|
|
44
|
+
const SelectRenderFunction: ForwardRefRenderFunction<
|
|
45
|
+
HTMLSelectElement | null,
|
|
46
|
+
SelectProps
|
|
47
|
+
> = (
|
|
48
|
+
{ invalid, children, options = [], value, defaultValue, onChange, ...rest },
|
|
49
|
+
forwardedRef,
|
|
50
|
+
) => {
|
|
51
|
+
let uniqueId = useId();
|
|
52
|
+
let ref = useRef<HTMLSelectElement | null>(null);
|
|
53
|
+
let radixRef = useRef<HTMLButtonElement | null>(null);
|
|
54
|
+
|
|
55
|
+
useImperativeHandle<HTMLSelectElement | null, HTMLSelectElement | null>(
|
|
56
|
+
forwardedRef,
|
|
57
|
+
() => ref.current,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
let combinedOptions = useMemo(() => {
|
|
61
|
+
let optionsFromChildren = getChildrenAsArrayOfElements(children).map(
|
|
62
|
+
(node): Option => node.props,
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return [...options, ...optionsFromChildren];
|
|
66
|
+
}, [children, options]);
|
|
67
|
+
|
|
68
|
+
let handleRadixChange = (radixValue: string) => {
|
|
69
|
+
let selectEl = ref.current;
|
|
70
|
+
|
|
71
|
+
if (!selectEl) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let value = getValueFromIndex(combinedOptions, radixValue);
|
|
76
|
+
selectEl.selectedIndex = parseInt(radixValue ?? '0', 10);
|
|
77
|
+
|
|
78
|
+
if (value) {
|
|
79
|
+
selectEl.value = value.toString();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
selectEl.dispatchEvent(
|
|
83
|
+
new Event('change', {
|
|
84
|
+
bubbles: true,
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
let providedValue = useMemo(() => {
|
|
90
|
+
let idx = getIndexFromValue(combinedOptions, value);
|
|
91
|
+
return typeof idx === 'undefined' ? undefined : idx.toString();
|
|
92
|
+
}, [combinedOptions, value]);
|
|
93
|
+
|
|
94
|
+
let providedDefaultValue = useMemo(() => {
|
|
95
|
+
let idx = getIndexFromValue(combinedOptions, defaultValue);
|
|
96
|
+
return typeof idx === 'undefined' ? undefined : idx.toString();
|
|
97
|
+
}, [combinedOptions, defaultValue]);
|
|
98
|
+
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
if (!radixRef.current) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (invalid) {
|
|
105
|
+
radixRef.current.dataset.invalid = 'true';
|
|
106
|
+
} else {
|
|
107
|
+
delete radixRef.current.dataset.invalid;
|
|
108
|
+
}
|
|
109
|
+
}, [radixRef, invalid]);
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<div className="relative">
|
|
113
|
+
<select
|
|
114
|
+
name={rest.name}
|
|
115
|
+
onChange={onChange}
|
|
116
|
+
ref={ref}
|
|
117
|
+
className="absolute hidden"
|
|
118
|
+
defaultValue={defaultValue}
|
|
119
|
+
value={value}
|
|
120
|
+
>
|
|
121
|
+
{combinedOptions.map((option, idx) => (
|
|
122
|
+
<option key={`${option.value}${idx}`} {...option} />
|
|
123
|
+
))}
|
|
124
|
+
</select>
|
|
125
|
+
<RadixSelect
|
|
126
|
+
{...rest}
|
|
127
|
+
name={`${uniqueId}.${rest.name}`}
|
|
128
|
+
defaultValue={providedDefaultValue}
|
|
129
|
+
value={providedValue}
|
|
130
|
+
dir={rest.dir === 'rtl' ? 'rtl' : 'ltr'}
|
|
131
|
+
onValueChange={handleRadixChange}
|
|
132
|
+
ref={radixRef}
|
|
133
|
+
>
|
|
134
|
+
{combinedOptions.map((option, idx) => (
|
|
135
|
+
<RadixSelectItem
|
|
136
|
+
key={`${option.value}${idx}`}
|
|
137
|
+
value={(
|
|
138
|
+
getIndexFromValue(combinedOptions, option.value) ?? ''
|
|
139
|
+
).toString()}
|
|
140
|
+
>
|
|
141
|
+
{option.children}
|
|
142
|
+
</RadixSelectItem>
|
|
143
|
+
))}
|
|
144
|
+
</RadixSelect>
|
|
145
|
+
</div>
|
|
146
|
+
);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const getIndexFromValue = (
|
|
150
|
+
options: Option[],
|
|
151
|
+
value: Value,
|
|
152
|
+
): number | undefined => {
|
|
153
|
+
if (typeof value === 'undefined') {
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return options.findIndex(option => option.value === value);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const getValueFromIndex = (options: Option[], idx: string | number): Value => {
|
|
161
|
+
idx = typeof idx === 'string' ? parseInt(idx, 10) : idx;
|
|
162
|
+
|
|
163
|
+
return options[idx]?.value;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* A native `<select>` proxy which provides access to the RadixSelect component.
|
|
168
|
+
*/
|
|
169
|
+
export const Select = forwardRef<HTMLSelectElement | null, SelectProps>(
|
|
170
|
+
SelectRenderFunction,
|
|
171
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Select';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ForwardRefRenderFunction,
|
|
5
|
+
ReactNode,
|
|
6
|
+
useImperativeHandle,
|
|
7
|
+
useRef,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import { forwardRef } from 'react';
|
|
10
|
+
import { Select, SelectProps } from '../Select';
|
|
11
|
+
import { twMerge } from '@tui-cruises/mein-schiff-web-tailwind-config';
|
|
12
|
+
import { InputFieldLabel } from '../InputField/InputFieldLabel';
|
|
13
|
+
import { InputFieldNote } from '../InputField/InputFieldNote';
|
|
14
|
+
import { InputFieldError } from '../InputField/InputFieldError';
|
|
15
|
+
|
|
16
|
+
type Props = Omit<SelectProps, 'required'> & {
|
|
17
|
+
label?: ReactNode;
|
|
18
|
+
note?: ReactNode;
|
|
19
|
+
error?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Use `label` if you don't want to add the `required` attribute to the select element itself.
|
|
23
|
+
* This will avoid highlighting the select as invalid, when there is no value.
|
|
24
|
+
* This is usually a user friendlier way than highlighting the field invalid on initial page load.
|
|
25
|
+
*/
|
|
26
|
+
required?: boolean | 'label';
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const SelectFieldRenderFunction: ForwardRefRenderFunction<
|
|
30
|
+
HTMLSelectElement | null,
|
|
31
|
+
Props
|
|
32
|
+
> = ({ label, note, error, required, className, ...attrs }, forwardedRef) => {
|
|
33
|
+
let selectRef = useRef<HTMLSelectElement>(null);
|
|
34
|
+
|
|
35
|
+
useImperativeHandle<HTMLSelectElement | null, HTMLSelectElement | null>(
|
|
36
|
+
forwardedRef,
|
|
37
|
+
() => selectRef.current,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div className={twMerge('block space-y-1', className)}>
|
|
42
|
+
<label className="block space-y-1">
|
|
43
|
+
{label && (
|
|
44
|
+
<InputFieldLabel asChild>
|
|
45
|
+
<div>
|
|
46
|
+
{label}
|
|
47
|
+
{required ? '*' : ''}
|
|
48
|
+
</div>
|
|
49
|
+
</InputFieldLabel>
|
|
50
|
+
)}
|
|
51
|
+
<Select
|
|
52
|
+
{...attrs}
|
|
53
|
+
required={typeof required === 'boolean' ? required : undefined}
|
|
54
|
+
invalid={error}
|
|
55
|
+
ref={selectRef}
|
|
56
|
+
/>
|
|
57
|
+
{!error && note && <InputFieldNote>{note}</InputFieldNote>}
|
|
58
|
+
</label>
|
|
59
|
+
|
|
60
|
+
{error && <InputFieldError>{error}</InputFieldError>}
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const SelectField = forwardRef<HTMLSelectElement | null, Props>(
|
|
66
|
+
SelectFieldRenderFunction,
|
|
67
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SelectField';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { twJoin, twMerge } from 'tailwind-merge';
|
|
3
|
+
|
|
4
|
+
export type SkeletonProps = HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is a skeleton component used for rendering the loading of content. It can be adjusted to fit any size & shape.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const Skeleton = ({ className, ...rest }: SkeletonProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
className={twMerge(
|
|
14
|
+
twJoin('animate-pulse rounded-md bg-surface-secondary-20', className),
|
|
15
|
+
)}
|
|
16
|
+
{...rest}
|
|
17
|
+
></div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
Skeleton.displayName = 'Skeleton';
|
|
22
|
+
|
|
23
|
+
export { Skeleton };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes } from 'react';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import { Skeleton } from './Skeleton';
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
number: number;
|
|
7
|
+
wrapperClassName?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const SkeletonTextLines: FC<Props> = ({
|
|
11
|
+
number,
|
|
12
|
+
wrapperClassName,
|
|
13
|
+
...rest
|
|
14
|
+
}) => {
|
|
15
|
+
const widths = ['w-full', 'w-[2/3]', 'w-[3/4]', 'w-4/5'];
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className={twMerge('space-y-3 py-1.5', wrapperClassName)}>
|
|
19
|
+
{Array(number)
|
|
20
|
+
.fill(null)
|
|
21
|
+
.map((_, idx) => {
|
|
22
|
+
const lineWidth =
|
|
23
|
+
idx === 0
|
|
24
|
+
? 'w-full'
|
|
25
|
+
: widths[Math.floor(Math.random() * widths.length)];
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Skeleton
|
|
29
|
+
key={idx}
|
|
30
|
+
{...rest}
|
|
31
|
+
className={twMerge('h-3', lineWidth, rest.className)}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
})}
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { EventClickElement } from '@tuic/lib/tracking/tealium';
|
|
4
|
+
import { IconButton } from '../IconButton';
|
|
5
|
+
import { I18NInterface } from '../../../helpers/i18n';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
type I18N = I18NInterface<
|
|
9
|
+
'stepperIncrease' | 'stepperDecrease' | 'stepperInput'
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Props for the Stepper component.
|
|
14
|
+
*/
|
|
15
|
+
export type StepperProps = {
|
|
16
|
+
/** Current value of the stepper */
|
|
17
|
+
value?: number;
|
|
18
|
+
/** Minimum allowed value */
|
|
19
|
+
minValue?: number;
|
|
20
|
+
/** Maximum allowed value */
|
|
21
|
+
maxValue?: number;
|
|
22
|
+
/** Step increment/decrement value */
|
|
23
|
+
step?: number;
|
|
24
|
+
/** Callback fired when the value changes */
|
|
25
|
+
onChangeValue?: (value: number) => void;
|
|
26
|
+
/** Whether the stepper is disabled */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Color theme for the button styling */
|
|
29
|
+
on?: 'white' | 'gray' | 'ocean';
|
|
30
|
+
/** Tracking name for analytics */
|
|
31
|
+
trackingName?: string;
|
|
32
|
+
|
|
33
|
+
i18n?: I18N;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* A numeric stepper component with increment and decrement buttons.
|
|
38
|
+
*/
|
|
39
|
+
const Stepper = (props: StepperProps) => {
|
|
40
|
+
const {
|
|
41
|
+
value = 0,
|
|
42
|
+
minValue = 0,
|
|
43
|
+
maxValue = 99,
|
|
44
|
+
step = 1,
|
|
45
|
+
onChangeValue,
|
|
46
|
+
disabled,
|
|
47
|
+
on = 'white',
|
|
48
|
+
trackingName = '',
|
|
49
|
+
i18n,
|
|
50
|
+
} = props;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Increase the value by the step, if within maxValue.
|
|
54
|
+
*/
|
|
55
|
+
const incrementValue = () => {
|
|
56
|
+
if (value + step <= maxValue) {
|
|
57
|
+
onChangeValue && onChangeValue(value + step);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Decrease the value by the step, if within minValue.
|
|
63
|
+
*/
|
|
64
|
+
const decrementValue = () => {
|
|
65
|
+
if (value - step >= minValue) {
|
|
66
|
+
onChangeValue && onChangeValue(value - step);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const ariaLabel = useMemo(() => {
|
|
71
|
+
return (i18n?.stepperInput ?? `Anzahl von {value}`).replace(
|
|
72
|
+
'{value}',
|
|
73
|
+
`${value}`,
|
|
74
|
+
);
|
|
75
|
+
}, [i18n?.stepperInput, value]);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<div
|
|
79
|
+
className="inline-flex items-center justify-center gap-4 md:gap-2"
|
|
80
|
+
aria-label={ariaLabel}
|
|
81
|
+
>
|
|
82
|
+
<IconButton
|
|
83
|
+
onClick={decrementValue}
|
|
84
|
+
disabled={disabled || value <= minValue}
|
|
85
|
+
iconName="minus"
|
|
86
|
+
size="sm"
|
|
87
|
+
variant="secondary"
|
|
88
|
+
on={on}
|
|
89
|
+
data-track-click-element={EventClickElement.Button}
|
|
90
|
+
data-track-click-label={`${trackingName}stepper-decrease`}
|
|
91
|
+
aria-label={i18n?.stepperDecrease ?? 'Anzahl verringern'}
|
|
92
|
+
/>
|
|
93
|
+
<div
|
|
94
|
+
className="w-6 text-center text-base text-marine-high-emphasis"
|
|
95
|
+
aria-hidden={true}
|
|
96
|
+
>
|
|
97
|
+
{value}
|
|
98
|
+
</div>
|
|
99
|
+
<IconButton
|
|
100
|
+
onClick={incrementValue}
|
|
101
|
+
disabled={disabled || value >= maxValue}
|
|
102
|
+
iconName="plus"
|
|
103
|
+
size="sm"
|
|
104
|
+
variant="secondary"
|
|
105
|
+
on={on}
|
|
106
|
+
data-track-click-element={EventClickElement.Button}
|
|
107
|
+
data-track-click-label={`${trackingName}-stepper-increase`}
|
|
108
|
+
aria-label={i18n?.stepperIncrease ?? 'Anzahl erhöhen'}
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
Stepper.displayName = 'Stepper';
|
|
115
|
+
|
|
116
|
+
export { Stepper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Stepper';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
4
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
5
|
+
import { twJoin } from 'tailwind-merge';
|
|
6
|
+
import { DataAttributes } from '../../../helpers/types';
|
|
7
|
+
|
|
8
|
+
export type SwitchToggleProps = DataAttributes &
|
|
9
|
+
ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* `SwitchToggle` is a UI toggle component built on top of Radix UI's `Switch`.
|
|
13
|
+
* It supports all native props from `@radix-ui/react-switch` and adds styling
|
|
14
|
+
* consistent with the design system.
|
|
15
|
+
*
|
|
16
|
+
* @see [Radix UI Switch Documentation](https://www.radix-ui.com/primitives/docs/components/switch)
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <SwitchToggle defaultChecked onChange={(e) => console.log(e.target.checked)} />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param {SwitchToggleProps} props - Props extending Radix Switch root props and custom data attributes.
|
|
25
|
+
* @param {string} [props.className] - Additional Tailwind classes to customize the root element.
|
|
26
|
+
* @returns {JSX.Element} A styled switch toggle component.
|
|
27
|
+
*/
|
|
28
|
+
const SwitchToggle = ({ className, ...props }: SwitchToggleProps) => (
|
|
29
|
+
<SwitchPrimitive.Root
|
|
30
|
+
className={twJoin(
|
|
31
|
+
'peer inline-flex h-[30px] w-[56px] shrink-0 cursor-pointer items-center rounded-full border-2 transition-colors md:h-6 md:w-[40px]',
|
|
32
|
+
'focus:outline-none focus-visible:shadow-focus-state',
|
|
33
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
34
|
+
'data-[state=unchecked]:border-stroke-secondary-20 data-[state=unchecked]:bg-surface-white',
|
|
35
|
+
'data-[state=checked]:border-surface-primary-100 data-[state=checked]:bg-surface-primary-100',
|
|
36
|
+
className,
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
<SwitchPrimitive.Thumb className="pointer-events-none block h-[22px] w-[22px] rounded-full bg-surface-secondary-100 ring-0 transition-transform data-[state=checked]:translate-x-[26px] data-[state=unchecked]:translate-x-[2px] md:h-[18px] md:w-[18px] md:data-[state=checked]:translate-x-4" />
|
|
41
|
+
</SwitchPrimitive.Root>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
SwitchToggle.displayName = 'SwitchToggle';
|
|
45
|
+
|
|
46
|
+
export { SwitchToggle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SwitchToggle';
|