@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,169 @@
|
|
|
1
|
+
import { Icon, IconName } from '../../core/Icon';
|
|
2
|
+
import {
|
|
3
|
+
ButtonHTMLAttributes,
|
|
4
|
+
forwardRef,
|
|
5
|
+
ForwardRefRenderFunction,
|
|
6
|
+
} from 'react';
|
|
7
|
+
import { twJoin, twMerge } from 'tailwind-merge';
|
|
8
|
+
import { Slot, Slottable } from '@radix-ui/react-slot';
|
|
9
|
+
import { wrapSlottableChildren } from '../../../helpers/slot';
|
|
10
|
+
import { useScreenNameAtLeast } from '../../../hooks/use-screen-name-at-least';
|
|
11
|
+
|
|
12
|
+
type CommonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
iconName: IconName;
|
|
15
|
+
iconPosition?: 'left' | 'right';
|
|
16
|
+
on?: 'white' | 'gray' | 'ocean';
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type IconButtonPrimaryAndSecondaryProps = CommonProps & {
|
|
20
|
+
variant?: 'primary' | 'secondary';
|
|
21
|
+
size?: 'sm' | 'md' | 'lg';
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type IconButtonGhostProps = CommonProps & {
|
|
25
|
+
variant: 'ghost';
|
|
26
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type IconButtonProps =
|
|
30
|
+
| IconButtonPrimaryAndSecondaryProps
|
|
31
|
+
| IconButtonGhostProps;
|
|
32
|
+
|
|
33
|
+
const IconButtonRenderFunction: ForwardRefRenderFunction<
|
|
34
|
+
HTMLButtonElement,
|
|
35
|
+
IconButtonProps
|
|
36
|
+
> = (props, ref) => {
|
|
37
|
+
const {
|
|
38
|
+
size = 'md',
|
|
39
|
+
variant = 'primary',
|
|
40
|
+
on = 'white',
|
|
41
|
+
iconName,
|
|
42
|
+
asChild,
|
|
43
|
+
children,
|
|
44
|
+
iconPosition,
|
|
45
|
+
...rest
|
|
46
|
+
} = props;
|
|
47
|
+
|
|
48
|
+
// Assuming `useScreenNameAtLeast` is returning a screen size string
|
|
49
|
+
const isMdOrAbove = useScreenNameAtLeast('md', 'md');
|
|
50
|
+
|
|
51
|
+
let resolvedIconSize = size;
|
|
52
|
+
if (size === 'xs' && isMdOrAbove) {
|
|
53
|
+
resolvedIconSize = 'md';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const buttonClassNames = twMerge(
|
|
57
|
+
'inline-flex rounded-full transition-colors',
|
|
58
|
+
|
|
59
|
+
size === 'xs' && 'p-0.5', // 20px
|
|
60
|
+
size === 'sm' && 'p-3 md:p-2', // 36px
|
|
61
|
+
size === 'md' && 'p-3.5 md:p-3', // 52px md:48px
|
|
62
|
+
|
|
63
|
+
// Variants
|
|
64
|
+
variant === 'primary' && [
|
|
65
|
+
// On white (default)
|
|
66
|
+
'bg-surface-primary-100 text-marine-high-emphasis',
|
|
67
|
+
'group-hover/icon-button:bg-surface-primary-120',
|
|
68
|
+
'group-active/icon-button:bg-surface-primary-120',
|
|
69
|
+
'group-disabled/icon-button:bg-surface-secondary-7',
|
|
70
|
+
|
|
71
|
+
// On gray
|
|
72
|
+
on === 'gray' && 'group-disabled/icon-button:bg-surface-white',
|
|
73
|
+
|
|
74
|
+
// On ocean
|
|
75
|
+
on === 'ocean' && 'bg-surface-secondary-100 text-white',
|
|
76
|
+
on === 'ocean' && 'group-hover/icon-button:bg-surface-secondary-120',
|
|
77
|
+
on === 'ocean' && 'group-active/icon-button:bg-surface-secondary-120',
|
|
78
|
+
on === 'ocean' && 'group-disabled/icon-button:bg-surface-secondary-7',
|
|
79
|
+
],
|
|
80
|
+
|
|
81
|
+
variant === 'secondary' && [
|
|
82
|
+
'bg-transparent',
|
|
83
|
+
|
|
84
|
+
// On white (default)
|
|
85
|
+
'text-marine-high-emphasis shadow-[inset_0_0_0_2px_theme(colors.stroke.primary-100)]',
|
|
86
|
+
'group-hover/icon-button:shadow-[inset_0_0_0_4px_theme(colors.stroke.primary-100)]',
|
|
87
|
+
'group-active/icon-button:shadow-[inset_0_0_0_4px_theme(colors.stroke.primary-100)]',
|
|
88
|
+
'group-disabled/icon-button:shadow-[inset_0_0_0_2px_theme(colors.stroke.secondary-7)]',
|
|
89
|
+
|
|
90
|
+
// On gray
|
|
91
|
+
on === 'gray' &&
|
|
92
|
+
'group-disabled/icon-button:shadow-[inset_0_0_0_2px_theme(colors.stroke.white)]',
|
|
93
|
+
|
|
94
|
+
// On ocean
|
|
95
|
+
on === 'ocean' && 'shadow-[inset_0_0_0_2px_theme(colors.stroke.white)]',
|
|
96
|
+
on === 'ocean' &&
|
|
97
|
+
'group-hover/icon-button:shadow-[inset_0_0_0_4px_theme(colors.stroke.white)]',
|
|
98
|
+
on === 'ocean' &&
|
|
99
|
+
'group-active/icon-button:shadow-[inset_0_0_0_4px_theme(colors.stroke.white)]',
|
|
100
|
+
on === 'ocean' &&
|
|
101
|
+
'group-disabled/icon-button:shadow-[inset_0_0_0_2px_theme(colors.stroke.secondary-7)]',
|
|
102
|
+
],
|
|
103
|
+
|
|
104
|
+
variant === 'ghost' && [
|
|
105
|
+
'text-marine-high-emphasis',
|
|
106
|
+
'group-hover/icon-button:text-marine-medium-emphasis',
|
|
107
|
+
'group-active/icon-button:text-marine-medium-emphasis',
|
|
108
|
+
],
|
|
109
|
+
|
|
110
|
+
// States
|
|
111
|
+
'group-active/icon-button:transition-none',
|
|
112
|
+
'group-focus/icon-button:outline-none group-focus-visible/icon-button:shadow-focus-state',
|
|
113
|
+
'group-disabled/icon-button:!pointer-events-none group-disabled/icon-button:text-secondary-marine-48',
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const Element = asChild ? Slot : 'button';
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<Element
|
|
120
|
+
ref={ref}
|
|
121
|
+
{...rest}
|
|
122
|
+
className={twJoin(
|
|
123
|
+
'group/icon-button flex appearance-none items-center border-none',
|
|
124
|
+
'focus:outline-none',
|
|
125
|
+
'disabled:!pointer-events-none disabled:text-secondary-marine-48',
|
|
126
|
+
|
|
127
|
+
size === 'md' ? 'text-base' : 'text-sm',
|
|
128
|
+
variant !== 'ghost' && ['gap-2'],
|
|
129
|
+
variant === 'ghost' && [
|
|
130
|
+
size === 'xs' && 'gap-0.5',
|
|
131
|
+
size === 'sm' && 'gap-1',
|
|
132
|
+
size === 'md' && 'gap-1',
|
|
133
|
+
],
|
|
134
|
+
iconPosition === 'right' && 'flex-row-reverse',
|
|
135
|
+
|
|
136
|
+
rest.className,
|
|
137
|
+
)}
|
|
138
|
+
>
|
|
139
|
+
<div className={buttonClassNames}>
|
|
140
|
+
<Icon name={iconName} size={resolvedIconSize} />
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
<Slottable>
|
|
144
|
+
{wrapSlottableChildren(asChild, children, children => {
|
|
145
|
+
if (!children) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return <div>{children}</div>;
|
|
150
|
+
})}
|
|
151
|
+
</Slottable>
|
|
152
|
+
</Element>
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* IconButton is a simple round button component, displaying one icon with an optional label.
|
|
158
|
+
*
|
|
159
|
+
* ```tsx
|
|
160
|
+
* <IconButton variant="primary" size="md">Label</IconButton>
|
|
161
|
+
*
|
|
162
|
+
* <IconButton variant="primary" size="md" asChild>
|
|
163
|
+
* <a href="#">Label</a>
|
|
164
|
+
* </IconButton>
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
168
|
+
IconButtonRenderFunction,
|
|
169
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IconButton';
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
forwardRef,
|
|
5
|
+
ForwardRefRenderFunction,
|
|
6
|
+
InputHTMLAttributes,
|
|
7
|
+
ReactNode,
|
|
8
|
+
useEffect,
|
|
9
|
+
useImperativeHandle,
|
|
10
|
+
useRef,
|
|
11
|
+
} from 'react';
|
|
12
|
+
import { InputFieldInput, InputFieldInputProps } from './InputFieldInput';
|
|
13
|
+
import { InputFieldError } from './InputFieldError';
|
|
14
|
+
import { InputFieldNote } from './InputFieldNote';
|
|
15
|
+
import { InputFieldLabel } from './InputFieldLabel';
|
|
16
|
+
import * as RadixForm from '@radix-ui/react-form';
|
|
17
|
+
import { twMerge } from '@tui-cruises/mein-schiff-web-tailwind-config';
|
|
18
|
+
|
|
19
|
+
export type InputFieldProps = Omit<InputFieldInputProps, 'required'> & {
|
|
20
|
+
label?: ReactNode;
|
|
21
|
+
note?: ReactNode;
|
|
22
|
+
error?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Use `label` if you don't want to add the `required` attribute to the input element itself.
|
|
26
|
+
* This will avoid highlighting the input as invalid, when there is no value.
|
|
27
|
+
* This is usually a user friendlier way than highlighting the field invalid on initial page load.
|
|
28
|
+
*/
|
|
29
|
+
required?: boolean | 'label';
|
|
30
|
+
asRadix?: boolean;
|
|
31
|
+
radixFormMessages?: RadixForm.FormMessageProps[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const InputFieldRenderFunction: ForwardRefRenderFunction<
|
|
35
|
+
HTMLInputElement,
|
|
36
|
+
InputFieldProps
|
|
37
|
+
> = (props, forwardedRef) => {
|
|
38
|
+
const {
|
|
39
|
+
label,
|
|
40
|
+
note,
|
|
41
|
+
error,
|
|
42
|
+
className,
|
|
43
|
+
asRadix,
|
|
44
|
+
radixFormMessages,
|
|
45
|
+
required,
|
|
46
|
+
...attrs
|
|
47
|
+
} = props;
|
|
48
|
+
|
|
49
|
+
let inputRef = useRef<HTMLInputElement>(null);
|
|
50
|
+
|
|
51
|
+
useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(
|
|
52
|
+
forwardedRef,
|
|
53
|
+
() => inputRef.current,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (asRadix) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
inputRef.current?.setCustomValidity(error ?? '');
|
|
62
|
+
}, [asRadix, error]);
|
|
63
|
+
|
|
64
|
+
if (!asRadix) {
|
|
65
|
+
return (
|
|
66
|
+
<div className={twMerge('block space-y-1', className)}>
|
|
67
|
+
<label className="block space-y-1">
|
|
68
|
+
{label && (
|
|
69
|
+
<InputFieldLabel asChild>
|
|
70
|
+
<div>
|
|
71
|
+
{label}
|
|
72
|
+
{required ? '*' : ''}
|
|
73
|
+
</div>
|
|
74
|
+
</InputFieldLabel>
|
|
75
|
+
)}
|
|
76
|
+
<InputFieldInput
|
|
77
|
+
{...attrs}
|
|
78
|
+
required={typeof required === 'boolean' ? required : undefined}
|
|
79
|
+
ref={inputRef}
|
|
80
|
+
/>
|
|
81
|
+
{!error && note && <InputFieldNote>{note}</InputFieldNote>}
|
|
82
|
+
</label>
|
|
83
|
+
|
|
84
|
+
{error && <InputFieldError>{error}</InputFieldError>}
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<RadixForm.Field name={attrs.name ?? ''} className={className} asChild>
|
|
91
|
+
<div className="space-y-1">
|
|
92
|
+
<label className="block space-y-1">
|
|
93
|
+
<RadixForm.Label asChild>
|
|
94
|
+
<InputFieldLabel asChild>
|
|
95
|
+
<div>
|
|
96
|
+
{label}
|
|
97
|
+
{required ? '*' : ''}
|
|
98
|
+
</div>
|
|
99
|
+
</InputFieldLabel>
|
|
100
|
+
</RadixForm.Label>
|
|
101
|
+
<RadixForm.Control asChild>
|
|
102
|
+
<InputFieldInput
|
|
103
|
+
{...attrs}
|
|
104
|
+
required={typeof required === 'boolean' ? required : undefined}
|
|
105
|
+
/>
|
|
106
|
+
</RadixForm.Control>
|
|
107
|
+
<RadixForm.ValidityState>
|
|
108
|
+
{validity =>
|
|
109
|
+
(validity?.valid ?? true) && (
|
|
110
|
+
<InputFieldNote>{note}</InputFieldNote>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
</RadixForm.ValidityState>
|
|
114
|
+
</label>
|
|
115
|
+
|
|
116
|
+
{(radixFormMessages ?? []).map((props, idx) => (
|
|
117
|
+
<RadixForm.Message key={idx} {...props} asChild>
|
|
118
|
+
<InputFieldError>{props.children}</InputFieldError>
|
|
119
|
+
</RadixForm.Message>
|
|
120
|
+
))}
|
|
121
|
+
</div>
|
|
122
|
+
</RadixForm.Field>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const InputField = forwardRef<HTMLInputElement, InputFieldProps>(
|
|
127
|
+
InputFieldRenderFunction,
|
|
128
|
+
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { forwardRef, ForwardRefRenderFunction, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export type InputFieldErrorProps = Omit<
|
|
4
|
+
HTMLAttributes<HTMLDivElement>,
|
|
5
|
+
'className'
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
const InputFieldErrorRenderFunction: ForwardRefRenderFunction<
|
|
9
|
+
HTMLDivElement,
|
|
10
|
+
InputFieldErrorProps
|
|
11
|
+
> = (attrs, ref) => {
|
|
12
|
+
return <div {...attrs} ref={ref} className="text-sm text-error-100" />;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const InputFieldError = forwardRef<HTMLDivElement, InputFieldErrorProps>(
|
|
16
|
+
InputFieldErrorRenderFunction,
|
|
17
|
+
);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
forwardRef,
|
|
3
|
+
ForwardRefRenderFunction,
|
|
4
|
+
HTMLAttributes,
|
|
5
|
+
InputHTMLAttributes,
|
|
6
|
+
useEffect,
|
|
7
|
+
useImperativeHandle,
|
|
8
|
+
useRef,
|
|
9
|
+
} from 'react';
|
|
10
|
+
import { twJoin } from 'tailwind-merge';
|
|
11
|
+
import { FieldsetProps } from '../Fieldset';
|
|
12
|
+
|
|
13
|
+
type ElementAttributes = Omit<
|
|
14
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
15
|
+
'children'
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export type InputFieldInputProps = ElementAttributes & {
|
|
19
|
+
fieldsetVariant?: FieldsetProps['variant'];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const InputFieldInputRenderFunction: ForwardRefRenderFunction<
|
|
23
|
+
HTMLInputElement,
|
|
24
|
+
InputFieldInputProps
|
|
25
|
+
> = (props, forwardedRef) => {
|
|
26
|
+
let { fieldsetVariant, ...attrs } = props;
|
|
27
|
+
let ref = useRef<HTMLInputElement>(null);
|
|
28
|
+
|
|
29
|
+
useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(
|
|
30
|
+
forwardedRef,
|
|
31
|
+
() => ref.current,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
ref.current?.setCustomValidity('');
|
|
36
|
+
}, []);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<input
|
|
40
|
+
{...attrs}
|
|
41
|
+
ref={ref}
|
|
42
|
+
className={twJoin(
|
|
43
|
+
'box-border w-full appearance-none font-[inherit]',
|
|
44
|
+
'block rounded-md border border-stroke-secondary-40 bg-surface-white p-4',
|
|
45
|
+
'text-marine-high-emphasis',
|
|
46
|
+
'focus:outline-none focus-visible:shadow-focus-state',
|
|
47
|
+
'invalid:border-stroke-error-100 invalid:text-error-100 focus-visible:invalid:border-stroke-error-100',
|
|
48
|
+
'disabled:border-transparent disabled:text-marine-medium-emphasis',
|
|
49
|
+
'read-only:border-transparent read-only:text-marine-medium-emphasis',
|
|
50
|
+
|
|
51
|
+
fieldsetVariant !== 'gray' &&
|
|
52
|
+
'read-only:bg-surface-secondary-7 disabled:bg-surface-secondary-7',
|
|
53
|
+
|
|
54
|
+
// @revisit
|
|
55
|
+
fieldsetVariant === 'gray' &&
|
|
56
|
+
'read-only:bg-surface-white disabled:bg-surface-white',
|
|
57
|
+
|
|
58
|
+
attrs.className,
|
|
59
|
+
)}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const InputFieldInput = forwardRef<
|
|
65
|
+
HTMLInputElement,
|
|
66
|
+
InputFieldInputProps
|
|
67
|
+
>(InputFieldInputRenderFunction);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { forwardRef, ForwardRefRenderFunction, HTMLAttributes } from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
|
|
4
|
+
export type InputFieldLabelProps = Omit<
|
|
5
|
+
HTMLAttributes<HTMLLabelElement>,
|
|
6
|
+
'className'
|
|
7
|
+
> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const InputFieldLabelRenderFunction: ForwardRefRenderFunction<
|
|
12
|
+
HTMLLabelElement,
|
|
13
|
+
InputFieldLabelProps
|
|
14
|
+
> = ({ asChild, ...attrs }, ref) => {
|
|
15
|
+
let Element = asChild ? Slot : 'label';
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Element
|
|
19
|
+
{...attrs}
|
|
20
|
+
ref={ref}
|
|
21
|
+
className="label-md text-marine-high-emphasis"
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const InputFieldLabel = forwardRef<
|
|
27
|
+
HTMLLabelElement,
|
|
28
|
+
InputFieldLabelProps
|
|
29
|
+
>(InputFieldLabelRenderFunction);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { forwardRef, ForwardRefRenderFunction, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
type InputFieldNoteProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
4
|
+
|
|
5
|
+
const InputFieldNoteRenderFunction: ForwardRefRenderFunction<
|
|
6
|
+
HTMLDivElement,
|
|
7
|
+
InputFieldNoteProps
|
|
8
|
+
> = (attrs, ref) => {
|
|
9
|
+
return (
|
|
10
|
+
<div {...attrs} ref={ref} className="text-sm text-marine-medium-emphasis" />
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const InputFieldNote = forwardRef<HTMLDivElement, InputFieldNoteProps>(
|
|
15
|
+
InputFieldNoteRenderFunction,
|
|
16
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputField';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { twJoin } from 'tailwind-merge';
|
|
2
|
+
|
|
3
|
+
export type LoadingSpinnerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const LoadingSpinner = (props: LoadingSpinnerProps) => {
|
|
9
|
+
const { className, size } = props;
|
|
10
|
+
|
|
11
|
+
const variants = {
|
|
12
|
+
size: {
|
|
13
|
+
xs: 20,
|
|
14
|
+
sm: 24,
|
|
15
|
+
md: 32,
|
|
16
|
+
lg: 48,
|
|
17
|
+
xl: 64,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div role="status">
|
|
23
|
+
<svg
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
+
width={variants.size[size]}
|
|
27
|
+
height={variants.size[size]}
|
|
28
|
+
viewBox="0 0 24 24"
|
|
29
|
+
className={twJoin('animate-spin', className)}
|
|
30
|
+
>
|
|
31
|
+
<g>
|
|
32
|
+
<path
|
|
33
|
+
d="M12.05 19.5C9.94995 19.5 8.17495 18.775 6.72495 17.325C6.29994 16.9 7.37652 15.8266 7.79995 16.25C8.96661 17.4167 10.3833 18 12.05 18C13.3333 18 14.4916 17.6333 15.5249 16.9C16.5583 16.1667 17.2833 15.2 17.6999 14C17.9999 13.5 18.9999 13.5 19.2749 14C18.8249 15.6333 17.9293 16.9583 16.5879 17.975C15.2459 18.9917 13.7333 19.5 12.05 19.5Z"
|
|
34
|
+
fill="currentColor"
|
|
35
|
+
/>
|
|
36
|
+
</g>
|
|
37
|
+
<defs>
|
|
38
|
+
<clipPath>
|
|
39
|
+
<rect width="24" height="24" fill="currentFill" />
|
|
40
|
+
</clipPath>
|
|
41
|
+
</defs>
|
|
42
|
+
</svg>
|
|
43
|
+
<span className="sr-only">Loading...</span>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
LoadingSpinner.displayName = 'LoadingSpinner';
|
|
49
|
+
|
|
50
|
+
export { LoadingSpinner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LoadingSpinner';
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { EventClickElement } from '@tuic/tracking';
|
|
4
|
+
import {
|
|
5
|
+
cloneElement,
|
|
6
|
+
ComponentPropsWithoutRef,
|
|
7
|
+
Dispatch,
|
|
8
|
+
HTMLAttributes,
|
|
9
|
+
MouseEventHandler,
|
|
10
|
+
ReactElement,
|
|
11
|
+
SetStateAction,
|
|
12
|
+
useMemo,
|
|
13
|
+
useState,
|
|
14
|
+
} from 'react';
|
|
15
|
+
import { IconButton } from '../IconButton';
|
|
16
|
+
import { Divider } from '../../core/Divider';
|
|
17
|
+
import { twMerge } from 'tailwind-merge';
|
|
18
|
+
import { I18NInterface } from '../../../helpers/i18n';
|
|
19
|
+
|
|
20
|
+
type I18N = I18NInterface<
|
|
21
|
+
'page' | 'previousPage' | 'nextPage' | 'paginationNavigation'
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
type NavigationHandler = () => void | Promise<void>;
|
|
25
|
+
|
|
26
|
+
type RenderPropOptions = {
|
|
27
|
+
type: 'next' | 'previous';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type ChildrenType =
|
|
31
|
+
| ((options: RenderPropOptions) => ReactElement)
|
|
32
|
+
| ReactElement;
|
|
33
|
+
|
|
34
|
+
export type PaginationProps = HTMLAttributes<HTMLElement> & {
|
|
35
|
+
current?: number | number[];
|
|
36
|
+
total?: number;
|
|
37
|
+
forcePreviousClickable?: boolean;
|
|
38
|
+
forceNextClickable?: boolean;
|
|
39
|
+
onPrevious?: NavigationHandler;
|
|
40
|
+
onNext?: NavigationHandler;
|
|
41
|
+
className?: string;
|
|
42
|
+
children?: ChildrenType;
|
|
43
|
+
i18n?: I18N;
|
|
44
|
+
centered?: boolean;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Pagination = ({
|
|
48
|
+
current = 1,
|
|
49
|
+
total = 1,
|
|
50
|
+
forcePreviousClickable = false,
|
|
51
|
+
forceNextClickable = false,
|
|
52
|
+
onNext,
|
|
53
|
+
onPrevious,
|
|
54
|
+
i18n,
|
|
55
|
+
centered = false,
|
|
56
|
+
children,
|
|
57
|
+
...rest
|
|
58
|
+
}: PaginationProps) => {
|
|
59
|
+
const [pending, setPending] = useState(false);
|
|
60
|
+
const currentAsArray = Array.isArray(current) ? current : [current];
|
|
61
|
+
|
|
62
|
+
const minCurrent = Math.min(...currentAsArray);
|
|
63
|
+
const maxCurrent = Math.max(...currentAsArray);
|
|
64
|
+
|
|
65
|
+
const previousButton = renderButton('previous', children, {
|
|
66
|
+
variant: 'secondary',
|
|
67
|
+
iconName: 'nav-arrow-left',
|
|
68
|
+
disabled: !forcePreviousClickable && (pending || minCurrent <= 1),
|
|
69
|
+
size: 'sm',
|
|
70
|
+
onClick: createNavigationHandler(setPending, onPrevious),
|
|
71
|
+
'aria-label': i18n?.previousPage ?? 'Vorherige Seite',
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const nextButton = renderButton('next', children, {
|
|
75
|
+
variant: 'secondary',
|
|
76
|
+
iconName: 'nav-arrow-right',
|
|
77
|
+
disabled: !forceNextClickable && (pending || maxCurrent >= total),
|
|
78
|
+
size: 'sm',
|
|
79
|
+
onClick: createNavigationHandler(setPending, onNext),
|
|
80
|
+
'aria-label': i18n?.nextPage ?? 'Nächste Seite',
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const pageInfo = (
|
|
84
|
+
<ul
|
|
85
|
+
aria-hidden={true}
|
|
86
|
+
className="flex items-center gap-2 text-marine-high-emphasis"
|
|
87
|
+
>
|
|
88
|
+
<li className="max-sm:hidden">{i18n?.page ?? 'Seite'}</li>
|
|
89
|
+
<li>{minCurrent}</li>
|
|
90
|
+
<li>
|
|
91
|
+
<Divider align="vertical" className="h-4" />
|
|
92
|
+
</li>
|
|
93
|
+
<li>{total}</li>
|
|
94
|
+
</ul>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
const ariaLabel = useMemo(() => {
|
|
98
|
+
return i18n?.paginationNavigation
|
|
99
|
+
? i18n.paginationNavigation
|
|
100
|
+
.replace('{current}', `${minCurrent}`)
|
|
101
|
+
.replace('{total}', `${total}`)
|
|
102
|
+
: `Seitennavigation Seite ${current} von ${total}`;
|
|
103
|
+
}, [i18n?.paginationNavigation, minCurrent, total, current]);
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<nav
|
|
107
|
+
aria-label={ariaLabel}
|
|
108
|
+
role="navigation"
|
|
109
|
+
{...rest}
|
|
110
|
+
className={twMerge(
|
|
111
|
+
rest.className,
|
|
112
|
+
'flex items-center gap-4',
|
|
113
|
+
centered ? 'justify-center' : '',
|
|
114
|
+
)}
|
|
115
|
+
>
|
|
116
|
+
{centered ? (
|
|
117
|
+
<>
|
|
118
|
+
{previousButton}
|
|
119
|
+
{pageInfo}
|
|
120
|
+
{nextButton}
|
|
121
|
+
</>
|
|
122
|
+
) : (
|
|
123
|
+
<>
|
|
124
|
+
<div className="flex items-center gap-2">
|
|
125
|
+
{previousButton}
|
|
126
|
+
{nextButton}
|
|
127
|
+
</div>
|
|
128
|
+
{pageInfo}
|
|
129
|
+
</>
|
|
130
|
+
)}
|
|
131
|
+
</nav>
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Creates a navigation handler that sets the pending state before and after the handler is called.
|
|
137
|
+
*/
|
|
138
|
+
const createNavigationHandler = (
|
|
139
|
+
setPending: Dispatch<SetStateAction<boolean>>,
|
|
140
|
+
handler: NavigationHandler | undefined,
|
|
141
|
+
): MouseEventHandler | undefined => {
|
|
142
|
+
if (typeof handler === 'undefined') {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return async () => {
|
|
147
|
+
setPending(true);
|
|
148
|
+
await handler();
|
|
149
|
+
setPending(false);
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Renders the button based on the provided children.
|
|
155
|
+
*/
|
|
156
|
+
const renderButton = (
|
|
157
|
+
type: RenderPropOptions['type'],
|
|
158
|
+
children: ChildrenType | undefined,
|
|
159
|
+
{ onClick, ...buttonProps }: ComponentPropsWithoutRef<typeof IconButton>,
|
|
160
|
+
) => {
|
|
161
|
+
// If no children are provided, render the default IconButton.
|
|
162
|
+
if (typeof children === 'undefined') {
|
|
163
|
+
return (
|
|
164
|
+
<IconButton
|
|
165
|
+
data-track-click-element={EventClickElement.Icon}
|
|
166
|
+
data-track-click-label={type}
|
|
167
|
+
{...buttonProps}
|
|
168
|
+
onClick={onClick}
|
|
169
|
+
/>
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// If children is a function, call it with the type to get the rendered element.
|
|
174
|
+
if (typeof children === 'function') {
|
|
175
|
+
children = children({ type });
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Clone the children element and add the IconButton as a child.
|
|
179
|
+
return cloneElement(
|
|
180
|
+
children,
|
|
181
|
+
undefined,
|
|
182
|
+
<IconButton
|
|
183
|
+
data-track-click-element={EventClickElement.Icon}
|
|
184
|
+
data-track-click-label={type}
|
|
185
|
+
{...buttonProps}
|
|
186
|
+
asChild
|
|
187
|
+
>
|
|
188
|
+
<div />
|
|
189
|
+
</IconButton>,
|
|
190
|
+
);
|
|
191
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Pagination';
|