@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,228 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { EventClickElement } from '@tuic/tracking';
|
|
4
|
+
import {
|
|
5
|
+
FC,
|
|
6
|
+
cloneElement,
|
|
7
|
+
HTMLAttributes,
|
|
8
|
+
ReactElement,
|
|
9
|
+
ReactNode,
|
|
10
|
+
MouseEvent,
|
|
11
|
+
useState,
|
|
12
|
+
Dispatch,
|
|
13
|
+
SetStateAction,
|
|
14
|
+
MouseEventHandler,
|
|
15
|
+
ElementType,
|
|
16
|
+
} from 'react';
|
|
17
|
+
import { AccordionItem, AccordionItemProps } from './AccordionItem';
|
|
18
|
+
import * as Radix from '@radix-ui/react-accordion';
|
|
19
|
+
import { getChildrenAsArrayOfElements } from '../../../helpers/children';
|
|
20
|
+
import { assignDefaultValues } from './utils';
|
|
21
|
+
import { AccordionTab, AccordionTabProps } from './AccordionTab';
|
|
22
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../Tabs';
|
|
23
|
+
import { TextButton, TextButtonProps } from '../../core/TextButton';
|
|
24
|
+
|
|
25
|
+
export type AccordionMixedItem =
|
|
26
|
+
| AccordionItemProps
|
|
27
|
+
| (AccordionTabProps & { type: 'tab' });
|
|
28
|
+
|
|
29
|
+
type CustomAccordionProps = {
|
|
30
|
+
fallback?: boolean;
|
|
31
|
+
items?: AccordionMixedItem[];
|
|
32
|
+
loadMoreButton?: TextButtonProps;
|
|
33
|
+
headlineAs?: AccordionItemProps['headlineAs'];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type AccordionSingleProps = HTMLAttributes<HTMLUListElement> &
|
|
37
|
+
Radix.AccordionSingleProps &
|
|
38
|
+
CustomAccordionProps;
|
|
39
|
+
export type AccordionMultipleProps = HTMLAttributes<HTMLUListElement> &
|
|
40
|
+
Radix.AccordionMultipleProps &
|
|
41
|
+
CustomAccordionProps;
|
|
42
|
+
|
|
43
|
+
export type AccordionProps = AccordionSingleProps | AccordionMultipleProps;
|
|
44
|
+
|
|
45
|
+
type Root = FC<AccordionProps> & {
|
|
46
|
+
Item: typeof AccordionItem;
|
|
47
|
+
Tab: typeof AccordionTab;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const Accordion: Root = propsArg => {
|
|
51
|
+
let { loadMoreButton, ...props } = propsArg;
|
|
52
|
+
|
|
53
|
+
let [pending, setPending] = useState(false);
|
|
54
|
+
|
|
55
|
+
if (typeof loadMoreButton === 'undefined') {
|
|
56
|
+
return renderAccordion(props);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let handleClick: MouseEventHandler<HTMLButtonElement> = async ev => {
|
|
60
|
+
if (typeof loadMoreButton?.onClick === 'undefined') {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
setPending(true);
|
|
65
|
+
|
|
66
|
+
await loadMoreButton.onClick(ev);
|
|
67
|
+
|
|
68
|
+
setPending(false);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<div className="space-y-4">
|
|
73
|
+
{renderAccordion(props)}
|
|
74
|
+
|
|
75
|
+
<div className="text-center">
|
|
76
|
+
<TextButton
|
|
77
|
+
{...loadMoreButton}
|
|
78
|
+
data-track-click-element={EventClickElement.Button}
|
|
79
|
+
data-track-click-label={loadMoreButton.children?.toString()}
|
|
80
|
+
onClick={handleClick}
|
|
81
|
+
disabled={pending}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const renderAccordion = (props: AccordionProps) => {
|
|
89
|
+
let { fallback, children: childrenArg, items, headlineAs, ...attrs } = props;
|
|
90
|
+
|
|
91
|
+
let { children, type } = getChildren(
|
|
92
|
+
items,
|
|
93
|
+
childrenArg,
|
|
94
|
+
fallback,
|
|
95
|
+
headlineAs,
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
if (attrs.type === 'single' && typeof attrs.collapsible === 'undefined') {
|
|
99
|
+
attrs.collapsible = true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (type !== 'tabs') {
|
|
103
|
+
return (
|
|
104
|
+
<Radix.Root {...attrs} asChild data-track-module="accordion">
|
|
105
|
+
<ul>
|
|
106
|
+
{children.map((item, idx) =>
|
|
107
|
+
cloneElement(item, {
|
|
108
|
+
...item.props,
|
|
109
|
+
headlineAs: headlineAs ?? item.props.headlineAs,
|
|
110
|
+
key: item.key ?? item.props.value ?? idx,
|
|
111
|
+
}),
|
|
112
|
+
)}
|
|
113
|
+
</ul>
|
|
114
|
+
</Radix.Root>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
let headlines = children.map(
|
|
119
|
+
child => child.props.headline ?? 'Not Specified',
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<Radix.Root {...attrs} asChild data-track-module="accordion">
|
|
124
|
+
<Tabs defaultValue="0" className="space-y-4">
|
|
125
|
+
<TabsList>
|
|
126
|
+
{headlines.map((headline, idx) => (
|
|
127
|
+
<TabsTrigger
|
|
128
|
+
key={idx}
|
|
129
|
+
value={idx.toString()}
|
|
130
|
+
data-track-click-element={EventClickElement.Button}
|
|
131
|
+
data-track-click-label={headline}
|
|
132
|
+
>
|
|
133
|
+
{headline}
|
|
134
|
+
</TabsTrigger>
|
|
135
|
+
))}
|
|
136
|
+
</TabsList>
|
|
137
|
+
|
|
138
|
+
{children.map((item, idx) => (
|
|
139
|
+
<TabsContent
|
|
140
|
+
key={idx}
|
|
141
|
+
value={idx.toString()}
|
|
142
|
+
data-track-module={`accordion.tab-${idx + 1}`}
|
|
143
|
+
>
|
|
144
|
+
{item}
|
|
145
|
+
</TabsContent>
|
|
146
|
+
))}
|
|
147
|
+
</Tabs>
|
|
148
|
+
</Radix.Root>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const getChildren = (
|
|
153
|
+
itemsArg: AccordionMixedItem[] | undefined,
|
|
154
|
+
children: AccordionProps['children'],
|
|
155
|
+
fallback: boolean | undefined,
|
|
156
|
+
headlineAs?: ElementType,
|
|
157
|
+
) => {
|
|
158
|
+
if (fallback) {
|
|
159
|
+
return {
|
|
160
|
+
type: 'fallback',
|
|
161
|
+
children: [...Array(4).keys()].map(idx => (
|
|
162
|
+
<AccordionItem key={idx} fallback={true} />
|
|
163
|
+
)),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
let childrenAsArray = getChildrenAsArrayOfElements(children);
|
|
168
|
+
|
|
169
|
+
let { tabs, items } = separateTabsFromItems(childrenAsArray);
|
|
170
|
+
|
|
171
|
+
(itemsArg ?? []).forEach(item => {
|
|
172
|
+
if ('type' in item && item.type === 'tab') {
|
|
173
|
+
tabs.push(<AccordionTab {...item} />);
|
|
174
|
+
} else {
|
|
175
|
+
items.push(<AccordionItem {...item} headlineAs={headlineAs} />);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
if (tabs.length === 0) {
|
|
180
|
+
return {
|
|
181
|
+
type: 'items',
|
|
182
|
+
children: assignDefaultValues(items),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (items.length > 0) {
|
|
187
|
+
tabs.unshift(<AccordionTab>{items}</AccordionTab>);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return {
|
|
191
|
+
type: 'tabs',
|
|
192
|
+
children: tabs,
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const separateTabsFromItems = (children: ReactElement[]) => {
|
|
197
|
+
let [tabs, items] = children.reduce<[ReactElement[], ReactElement[]]>(
|
|
198
|
+
([tabs, items], child) => {
|
|
199
|
+
let type = child.type;
|
|
200
|
+
let isUl = type === 'ul';
|
|
201
|
+
let hasTabDisplayName =
|
|
202
|
+
typeof type !== 'string' &&
|
|
203
|
+
'displayName' in type &&
|
|
204
|
+
type.displayName === 'AccordionTab';
|
|
205
|
+
|
|
206
|
+
let isTab = isUl || hasTabDisplayName;
|
|
207
|
+
|
|
208
|
+
if (isTab) {
|
|
209
|
+
tabs.push(child);
|
|
210
|
+
} else {
|
|
211
|
+
items.push(child);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return [tabs, items];
|
|
215
|
+
},
|
|
216
|
+
[[], []],
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
return {
|
|
220
|
+
tabs,
|
|
221
|
+
items,
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
Accordion.Item = AccordionItem;
|
|
226
|
+
Accordion.Tab = AccordionTab;
|
|
227
|
+
|
|
228
|
+
export { Accordion };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { EventClickElement } from '@tuic/tracking';
|
|
4
|
+
import { type ElementType, FC, LiHTMLAttributes, ReactNode } from 'react';
|
|
5
|
+
import { Divider } from '../../core/Divider';
|
|
6
|
+
import { IconButton } from '../../core/IconButton';
|
|
7
|
+
import * as Radix from '@radix-ui/react-accordion';
|
|
8
|
+
import { SkeletonTextLines } from '../../core/Skeleton';
|
|
9
|
+
import { twMerge } from 'tailwind-merge';
|
|
10
|
+
|
|
11
|
+
export type AccordionItemProps = LiHTMLAttributes<HTMLLIElement> & {
|
|
12
|
+
fallback?: boolean;
|
|
13
|
+
headline?: ReactNode;
|
|
14
|
+
headlineAs?: ElementType;
|
|
15
|
+
value?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const AccordionItem: FC<AccordionItemProps> = ({
|
|
19
|
+
children,
|
|
20
|
+
fallback,
|
|
21
|
+
headline,
|
|
22
|
+
headlineAs: HeadlineTag = 'div',
|
|
23
|
+
value,
|
|
24
|
+
...attrs
|
|
25
|
+
}) => {
|
|
26
|
+
return (
|
|
27
|
+
<Radix.AccordionItem asChild value={value ?? ''}>
|
|
28
|
+
<li {...attrs} className={twMerge(attrs.className, 'pt-4')}>
|
|
29
|
+
<Radix.AccordionTrigger asChild>
|
|
30
|
+
<button
|
|
31
|
+
data-track-click-element={EventClickElement.Accordion}
|
|
32
|
+
data-track-click-label={headline}
|
|
33
|
+
className="flex w-full appearance-none items-center gap-4 px-2 text-left text-marine-high-emphasis hover:text-secondary-marine-48 [&[data-state=open]_.accordion-trigger-icon_svg]:-rotate-180"
|
|
34
|
+
>
|
|
35
|
+
{fallback && (
|
|
36
|
+
<SkeletonTextLines number={2} wrapperClassName="w-full" />
|
|
37
|
+
)}
|
|
38
|
+
{!fallback && headline && (
|
|
39
|
+
<HeadlineTag className="headline-sm flex-1 break-words">
|
|
40
|
+
{headline}
|
|
41
|
+
</HeadlineTag>
|
|
42
|
+
)}
|
|
43
|
+
|
|
44
|
+
{!fallback && children && (
|
|
45
|
+
<IconButton
|
|
46
|
+
className="accordion-trigger-icon [&_svg]:transition-transform [&_svg]:duration-300"
|
|
47
|
+
iconName="nav-arrow-down"
|
|
48
|
+
size="sm"
|
|
49
|
+
variant="ghost"
|
|
50
|
+
asChild
|
|
51
|
+
>
|
|
52
|
+
<div />
|
|
53
|
+
</IconButton>
|
|
54
|
+
)}
|
|
55
|
+
</button>
|
|
56
|
+
</Radix.AccordionTrigger>
|
|
57
|
+
|
|
58
|
+
{children && (
|
|
59
|
+
<Radix.AccordionContent asChild>
|
|
60
|
+
<div className="overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down">
|
|
61
|
+
<div className="px-2 pt-4 text-marine-high-emphasis md:pt-3">
|
|
62
|
+
{children}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</Radix.AccordionContent>
|
|
66
|
+
)}
|
|
67
|
+
|
|
68
|
+
<Divider className="-top-px mt-6 md:mt-4" />
|
|
69
|
+
</li>
|
|
70
|
+
</Radix.AccordionItem>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cloneElement, FC, PropsWithChildren, ReactNode } from 'react';
|
|
4
|
+
import { AccordionItem, AccordionItemProps } from './AccordionItem';
|
|
5
|
+
import { assignDefaultValues } from './utils';
|
|
6
|
+
import { getChildrenAsArrayOfElements } from '../../../helpers/children';
|
|
7
|
+
|
|
8
|
+
export type AccordionTabProps = PropsWithChildren<{
|
|
9
|
+
headline?: ReactNode;
|
|
10
|
+
items?: AccordionItemProps[];
|
|
11
|
+
}>;
|
|
12
|
+
|
|
13
|
+
const AccordionTab: FC<AccordionTabProps> = ({
|
|
14
|
+
children: childrenArg,
|
|
15
|
+
headline,
|
|
16
|
+
items = [],
|
|
17
|
+
}) => {
|
|
18
|
+
let children = [
|
|
19
|
+
...getChildrenAsArrayOfElements(childrenArg),
|
|
20
|
+
...items.map((props, idx) => <AccordionItem key={idx} {...props} />),
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
children = assignDefaultValues(children);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<ul>
|
|
27
|
+
{children.map((item, idx) =>
|
|
28
|
+
cloneElement(item, {
|
|
29
|
+
...item.props,
|
|
30
|
+
key: item.key ?? item.props.value ?? idx,
|
|
31
|
+
}),
|
|
32
|
+
)}
|
|
33
|
+
</ul>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
AccordionTab.displayName = 'AccordionTab';
|
|
38
|
+
|
|
39
|
+
export { AccordionTab };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
export const assignDefaultValues = (
|
|
4
|
+
children: ReactElement[],
|
|
5
|
+
): ReactElement[] => {
|
|
6
|
+
return children.map((item, idx) => ({
|
|
7
|
+
...item,
|
|
8
|
+
props: {
|
|
9
|
+
...item.props,
|
|
10
|
+
value: item.props.value ?? `intermediateValue${idx}`,
|
|
11
|
+
},
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { FC, PropsWithChildren, ReactNode } from 'react';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { IconName, Icon } from '../../core/Icon';
|
|
6
|
+
import { IconButton } from '../IconButton';
|
|
7
|
+
import { twJoin } from 'tailwind-merge';
|
|
8
|
+
import { twMerge } from '@tui-cruises/mein-schiff-web-tailwind-config';
|
|
9
|
+
import { TextButton, TextButtonProps } from '../TextButton';
|
|
10
|
+
|
|
11
|
+
export type AlertMode =
|
|
12
|
+
| 'error'
|
|
13
|
+
| 'attention'
|
|
14
|
+
| 'success'
|
|
15
|
+
| 'information-gray'
|
|
16
|
+
| 'information-white';
|
|
17
|
+
|
|
18
|
+
export type AlertProps = PropsWithChildren<{
|
|
19
|
+
className?: string;
|
|
20
|
+
mode?: AlertMode;
|
|
21
|
+
icon?: IconName;
|
|
22
|
+
size?: 'sm' | 'lg';
|
|
23
|
+
headline?: string | ReactNode;
|
|
24
|
+
as?: keyof HTMLElementTagNameMap;
|
|
25
|
+
onClose?: () => void | Promise<void>;
|
|
26
|
+
cta?: TextButtonProps;
|
|
27
|
+
}>;
|
|
28
|
+
|
|
29
|
+
export const Alert: FC<AlertProps> = ({
|
|
30
|
+
children,
|
|
31
|
+
mode = 'attention',
|
|
32
|
+
size = 'lg',
|
|
33
|
+
icon,
|
|
34
|
+
headline,
|
|
35
|
+
cta,
|
|
36
|
+
as: Element = 'aside',
|
|
37
|
+
onClose,
|
|
38
|
+
className,
|
|
39
|
+
}) => {
|
|
40
|
+
const [isClosePending, setIsClosePending] = useState(false);
|
|
41
|
+
|
|
42
|
+
const classList = twMerge(
|
|
43
|
+
'space-y-2 rounded-md border px-5',
|
|
44
|
+
size === 'sm' ? 'py-4' : 'py-6',
|
|
45
|
+
mode === 'error' &&
|
|
46
|
+
'border-stroke-error-120 bg-surface-feedback-error text-on-surface-feedback-error',
|
|
47
|
+
mode === 'success' &&
|
|
48
|
+
'border-stroke-success-100 bg-surface-feedback-success text-on-surface-feedback-success',
|
|
49
|
+
mode === 'information-gray' &&
|
|
50
|
+
'border-stroke-secondary-20 bg-surface-secondary-7 text-marine-high-emphasis',
|
|
51
|
+
mode === 'information-white' &&
|
|
52
|
+
'border-stroke-secondary-20 bg-surface-white text-marine-high-emphasis',
|
|
53
|
+
mode === 'attention' &&
|
|
54
|
+
'border-stroke-attention-120 bg-surface-feedback-attention text-on-surface-feedback-attention',
|
|
55
|
+
className,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const handleClose = async () => {
|
|
59
|
+
if (onClose) {
|
|
60
|
+
setIsClosePending(true);
|
|
61
|
+
await onClose();
|
|
62
|
+
setIsClosePending(false);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const iconName = icon ?? 'warning-circle';
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<Element className={classList}>
|
|
70
|
+
{headline && (
|
|
71
|
+
<div className="flex items-center gap-2">
|
|
72
|
+
{iconName && (
|
|
73
|
+
<div className="flex-none">
|
|
74
|
+
<Icon name={iconName} size="md" />
|
|
75
|
+
</div>
|
|
76
|
+
)}
|
|
77
|
+
<div
|
|
78
|
+
className={twJoin(
|
|
79
|
+
'flex-1',
|
|
80
|
+
size === 'sm' ? 'headline-xs' : 'headline-sm',
|
|
81
|
+
)}
|
|
82
|
+
>
|
|
83
|
+
{headline}
|
|
84
|
+
</div>
|
|
85
|
+
{onClose && (
|
|
86
|
+
<div className="ml-auto flex-none">
|
|
87
|
+
<IconButton
|
|
88
|
+
onClick={handleClose}
|
|
89
|
+
iconName="cancel"
|
|
90
|
+
size="sm"
|
|
91
|
+
variant="ghost"
|
|
92
|
+
disabled={isClosePending}
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
)}
|
|
96
|
+
</div>
|
|
97
|
+
)}
|
|
98
|
+
|
|
99
|
+
{(children || cta || (!headline && onClose)) && (
|
|
100
|
+
<div className={twJoin('flex', iconName && headline ? 'md:pl-8' : '')}>
|
|
101
|
+
{(children || cta) && (
|
|
102
|
+
<div className="flex-1 space-y-4">
|
|
103
|
+
{children && (
|
|
104
|
+
<div
|
|
105
|
+
className={twJoin(
|
|
106
|
+
'cf-rich-text text-current',
|
|
107
|
+
size === 'sm' ? 'text-sm' : 'text-lg',
|
|
108
|
+
)}
|
|
109
|
+
>
|
|
110
|
+
{children}
|
|
111
|
+
</div>
|
|
112
|
+
)}
|
|
113
|
+
{cta && <TextButton iconSize="sm" {...cta} />}
|
|
114
|
+
</div>
|
|
115
|
+
)}
|
|
116
|
+
{!headline && onClose && (
|
|
117
|
+
<div className="-mt-1 flex-none">
|
|
118
|
+
<IconButton
|
|
119
|
+
onClick={handleClose}
|
|
120
|
+
iconName="cancel"
|
|
121
|
+
size="sm"
|
|
122
|
+
variant="ghost"
|
|
123
|
+
disabled={isClosePending}
|
|
124
|
+
/>
|
|
125
|
+
</div>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
)}
|
|
129
|
+
</Element>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Alert';
|