@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.
Files changed (556) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +14 -0
  3. package/README.md +26 -0
  4. package/custom.d.ts +14 -0
  5. package/icons/icons/360.tsx +20 -0
  6. package/icons/icons/add-circle.tsx +26 -0
  7. package/icons/icons/airplane.tsx +20 -0
  8. package/icons/icons/anchor.tsx +20 -0
  9. package/icons/icons/angle-tool.tsx +26 -0
  10. package/icons/icons/arrow-down.tsx +20 -0
  11. package/icons/icons/arrow-left.tsx +20 -0
  12. package/icons/icons/arrow-right.tsx +20 -0
  13. package/icons/icons/at.tsx +20 -0
  14. package/icons/icons/baggage.tsx +20 -0
  15. package/icons/icons/balcony.tsx +20 -0
  16. package/icons/icons/bathroom.tsx +32 -0
  17. package/icons/icons/beach.tsx +20 -0
  18. package/icons/icons/bed.tsx +26 -0
  19. package/icons/icons/bell.tsx +20 -0
  20. package/icons/icons/bording.tsx +20 -0
  21. package/icons/icons/cabins.tsx +20 -0
  22. package/icons/icons/calendar.tsx +32 -0
  23. package/icons/icons/cancel.tsx +20 -0
  24. package/icons/icons/cash.tsx +44 -0
  25. package/icons/icons/check-circle.tsx +18 -0
  26. package/icons/icons/check.tsx +20 -0
  27. package/icons/icons/circle.tsx +20 -0
  28. package/icons/icons/clear.tsx +24 -0
  29. package/icons/icons/clock-rotate-right.tsx +20 -0
  30. package/icons/icons/clock.tsx +26 -0
  31. package/icons/icons/cloud-sunny.tsx +43 -0
  32. package/icons/icons/cloud.tsx +20 -0
  33. package/icons/icons/compass.tsx +26 -0
  34. package/icons/icons/delete-circle.tsx +26 -0
  35. package/icons/icons/departure.tsx +20 -0
  36. package/icons/icons/details.tsx +20 -0
  37. package/icons/icons/diamond.tsx +20 -0
  38. package/icons/icons/edit-pencil.tsx +20 -0
  39. package/icons/icons/excellence.tsx +20 -0
  40. package/icons/icons/expand.tsx +20 -0
  41. package/icons/icons/eye-closed.tsx +20 -0
  42. package/icons/icons/eye-empty.tsx +26 -0
  43. package/icons/icons/eye-off.tsx +32 -0
  44. package/icons/icons/eye.tsx +26 -0
  45. package/icons/icons/fallback.tsx +26 -0
  46. package/icons/icons/filter.tsx +20 -0
  47. package/icons/icons/flag.tsx +20 -0
  48. package/icons/icons/fog.tsx +22 -0
  49. package/icons/icons/glases.tsx +28 -0
  50. package/icons/icons/group.tsx +32 -0
  51. package/icons/icons/heart-filled.tsx +20 -0
  52. package/icons/icons/heart.tsx +20 -0
  53. package/icons/icons/help-circle.tsx +24 -0
  54. package/icons/icons/home.tsx +22 -0
  55. package/icons/icons/humidity.tsx +30 -0
  56. package/icons/icons/impressions.tsx +20 -0
  57. package/icons/icons/inclusive-services.tsx +20 -0
  58. package/icons/icons/index.ts +141 -0
  59. package/icons/icons/info-empty.tsx +26 -0
  60. package/icons/icons/language.tsx +20 -0
  61. package/icons/icons/lifebuoy.tsx +30 -0
  62. package/icons/icons/loading.tsx +18 -0
  63. package/icons/icons/location.tsx +24 -0
  64. package/icons/icons/log-in.tsx +26 -0
  65. package/icons/icons/log-out.tsx +26 -0
  66. package/icons/icons/mail-open.tsx +20 -0
  67. package/icons/icons/map.tsx +20 -0
  68. package/icons/icons/maps-arrow-diagonal.tsx +20 -0
  69. package/icons/icons/media-image-list.tsx +32 -0
  70. package/icons/icons/menu.tsx +21 -0
  71. package/icons/icons/metropolis.tsx +20 -0
  72. package/icons/icons/minus.tsx +20 -0
  73. package/icons/icons/more-horiz.tsx +35 -0
  74. package/icons/icons/more-vert.tsx +35 -0
  75. package/icons/icons/mostly-cloudy-night.tsx +24 -0
  76. package/icons/icons/ms-ship.tsx +20 -0
  77. package/icons/icons/music.tsx +20 -0
  78. package/icons/icons/nav-arrow-down.tsx +20 -0
  79. package/icons/icons/nav-arrow-left.tsx +20 -0
  80. package/icons/icons/nav-arrow-right.tsx +20 -0
  81. package/icons/icons/nav-arrow-up.tsx +20 -0
  82. package/icons/icons/no-wifi.tsx +18 -0
  83. package/icons/icons/old-trips.tsx +20 -0
  84. package/icons/icons/percentage.tsx +20 -0
  85. package/icons/icons/phone.tsx +20 -0
  86. package/icons/icons/pin.tsx +20 -0
  87. package/icons/icons/play.tsx +20 -0
  88. package/icons/icons/plus-circle.tsx +20 -0
  89. package/icons/icons/plus.tsx +20 -0
  90. package/icons/icons/point.tsx +15 -0
  91. package/icons/icons/rain.tsx +22 -0
  92. package/icons/icons/receipt.tsx +20 -0
  93. package/icons/icons/refresh-double.tsx +32 -0
  94. package/icons/icons/search.tsx +26 -0
  95. package/icons/icons/security-pass.tsx +26 -0
  96. package/icons/icons/settings.tsx +20 -0
  97. package/icons/icons/share-ios.tsx +26 -0
  98. package/icons/icons/ship-account.tsx +20 -0
  99. package/icons/icons/ship-info.tsx +20 -0
  100. package/icons/icons/ship-position.tsx +27 -0
  101. package/icons/icons/shooting-stars.tsx +28 -0
  102. package/icons/icons/sleet.tsx +22 -0
  103. package/icons/icons/snow-flake.tsx +20 -0
  104. package/icons/icons/snow.tsx +22 -0
  105. package/icons/icons/sofa.tsx +32 -0
  106. package/icons/icons/star-dashed.tsx +20 -0
  107. package/icons/icons/star-filled.tsx +25 -0
  108. package/icons/icons/star-half-dashed.tsx +26 -0
  109. package/icons/icons/star.tsx +20 -0
  110. package/icons/icons/substract.tsx +26 -0
  111. package/icons/icons/sun-light.tsx +42 -0
  112. package/icons/icons/temperature-high.tsx +26 -0
  113. package/icons/icons/thunderstorm.tsx +26 -0
  114. package/icons/icons/tornado.tsx +18 -0
  115. package/icons/icons/trash.tsx +20 -0
  116. package/icons/icons/travel-assistant.tsx +24 -0
  117. package/icons/icons/tropical-storm.tsx +71 -0
  118. package/icons/icons/upcoming-trips.tsx +27 -0
  119. package/icons/icons/user.tsx +26 -0
  120. package/icons/icons/warning-circle.tsx +26 -0
  121. package/icons/icons/warning-hexagon.tsx +26 -0
  122. package/icons/icons/weather.tsx +20 -0
  123. package/icons/icons/wifi.tsx +20 -0
  124. package/icons/icons/wind.tsx +22 -0
  125. package/icons/icons/windrose.tsx +42 -0
  126. package/icons/icons/windsock.tsx +20 -0
  127. package/icons/pictograms/24h-meals.tsx +25 -0
  128. package/icons/pictograms/ad-template.tsx +23 -0
  129. package/icons/pictograms/add.tsx +25 -0
  130. package/icons/pictograms/adventure-club-only.tsx +25 -0
  131. package/icons/pictograms/allergy.tsx +30 -0
  132. package/icons/pictograms/anchor.tsx +23 -0
  133. package/icons/pictograms/arrival.tsx +23 -0
  134. package/icons/pictograms/baby-awake.tsx +20 -0
  135. package/icons/pictograms/baby-monitor.tsx +20 -0
  136. package/icons/pictograms/baby-sleep.tsx +20 -0
  137. package/icons/pictograms/baggage-information.tsx +23 -0
  138. package/icons/pictograms/baggage.tsx +23 -0
  139. package/icons/pictograms/bedroom-check.tsx +23 -0
  140. package/icons/pictograms/bedroom.tsx +23 -0
  141. package/icons/pictograms/beverages.tsx +28 -0
  142. package/icons/pictograms/billboard.tsx +23 -0
  143. package/icons/pictograms/blog.tsx +23 -0
  144. package/icons/pictograms/brochure.tsx +23 -0
  145. package/icons/pictograms/calendar-check.tsx +18 -0
  146. package/icons/pictograms/calendar-default.tsx +18 -0
  147. package/icons/pictograms/calendar-disabled.tsx +18 -0
  148. package/icons/pictograms/calendar-focus.tsx +25 -0
  149. package/icons/pictograms/champagne-glasses.tsx +25 -0
  150. package/icons/pictograms/check.tsx +25 -0
  151. package/icons/pictograms/checklist-check.tsx +18 -0
  152. package/icons/pictograms/checklist.tsx +21 -0
  153. package/icons/pictograms/checkmark.tsx +23 -0
  154. package/icons/pictograms/chef-hat.tsx +30 -0
  155. package/icons/pictograms/chevron-down.tsx +25 -0
  156. package/icons/pictograms/chevron-up.tsx +25 -0
  157. package/icons/pictograms/circles.tsx +25 -0
  158. package/icons/pictograms/cleaning-trolley.tsx +30 -0
  159. package/icons/pictograms/clock-0-30.tsx +23 -0
  160. package/icons/pictograms/clock-0.tsx +23 -0
  161. package/icons/pictograms/clock-1-30.tsx +23 -0
  162. package/icons/pictograms/clock-1.tsx +23 -0
  163. package/icons/pictograms/clock-10-30.tsx +23 -0
  164. package/icons/pictograms/clock-10.tsx +23 -0
  165. package/icons/pictograms/clock-11-30.tsx +23 -0
  166. package/icons/pictograms/clock-11.tsx +23 -0
  167. package/icons/pictograms/clock-2-30.tsx +23 -0
  168. package/icons/pictograms/clock-2.tsx +23 -0
  169. package/icons/pictograms/clock-3-30.tsx +23 -0
  170. package/icons/pictograms/clock-3.tsx +23 -0
  171. package/icons/pictograms/clock-4-30.tsx +23 -0
  172. package/icons/pictograms/clock-4.tsx +23 -0
  173. package/icons/pictograms/clock-5-30.tsx +23 -0
  174. package/icons/pictograms/clock-5.tsx +23 -0
  175. package/icons/pictograms/clock-6-30.tsx +23 -0
  176. package/icons/pictograms/clock-6.tsx +23 -0
  177. package/icons/pictograms/clock-7-30.tsx +23 -0
  178. package/icons/pictograms/clock-7.tsx +23 -0
  179. package/icons/pictograms/clock-8-30.tsx +23 -0
  180. package/icons/pictograms/clock-8.tsx +23 -0
  181. package/icons/pictograms/clock-9-30.tsx +23 -0
  182. package/icons/pictograms/clock-9.tsx +23 -0
  183. package/icons/pictograms/clock-default.tsx +23 -0
  184. package/icons/pictograms/close.tsx +25 -0
  185. package/icons/pictograms/clothing.tsx +23 -0
  186. package/icons/pictograms/cloud.tsx +23 -0
  187. package/icons/pictograms/cocktails.tsx +23 -0
  188. package/icons/pictograms/coffee-machine.tsx +23 -0
  189. package/icons/pictograms/compass.tsx +23 -0
  190. package/icons/pictograms/couple.tsx +25 -0
  191. package/icons/pictograms/crew-love.tsx +28 -0
  192. package/icons/pictograms/crown.tsx +23 -0
  193. package/icons/pictograms/dart.tsx +23 -0
  194. package/icons/pictograms/decoration.tsx +23 -0
  195. package/icons/pictograms/departure-check.tsx +25 -0
  196. package/icons/pictograms/departure-germany.tsx +20 -0
  197. package/icons/pictograms/departure-time.tsx +35 -0
  198. package/icons/pictograms/departure.tsx +23 -0
  199. package/icons/pictograms/diamond.tsx +23 -0
  200. package/icons/pictograms/discount-card.tsx +35 -0
  201. package/icons/pictograms/discount.tsx +30 -0
  202. package/icons/pictograms/documents.tsx +23 -0
  203. package/icons/pictograms/download-document.tsx +23 -0
  204. package/icons/pictograms/download.tsx +23 -0
  205. package/icons/pictograms/dripping-dew.tsx +23 -0
  206. package/icons/pictograms/dumbbell.tsx +25 -0
  207. package/icons/pictograms/early-bird.tsx +23 -0
  208. package/icons/pictograms/edit.tsx +23 -0
  209. package/icons/pictograms/energy-saving.tsx +23 -0
  210. package/icons/pictograms/enjoyer-club-only.tsx +18 -0
  211. package/icons/pictograms/environment.tsx +30 -0
  212. package/icons/pictograms/environmental-officer.tsx +30 -0
  213. package/icons/pictograms/explorer-club-only.tsx +18 -0
  214. package/icons/pictograms/family.tsx +25 -0
  215. package/icons/pictograms/fb-community.tsx +25 -0
  216. package/icons/pictograms/finance.tsx +25 -0
  217. package/icons/pictograms/fog.tsx +25 -0
  218. package/icons/pictograms/food-certificate.tsx +30 -0
  219. package/icons/pictograms/gastronomy.tsx +25 -0
  220. package/icons/pictograms/gift.tsx +23 -0
  221. package/icons/pictograms/globetrotter-club-only.tsx +18 -0
  222. package/icons/pictograms/hairdresser.tsx +20 -0
  223. package/icons/pictograms/handbag.tsx +30 -0
  224. package/icons/pictograms/hands-holding-heart.tsx +30 -0
  225. package/icons/pictograms/heart-beat.tsx +29 -0
  226. package/icons/pictograms/heart.tsx +23 -0
  227. package/icons/pictograms/home.tsx +23 -0
  228. package/icons/pictograms/hospital-cross.tsx +23 -0
  229. package/icons/pictograms/hot-dish.tsx +23 -0
  230. package/icons/pictograms/hot-drink.tsx +25 -0
  231. package/icons/pictograms/human-heart.tsx +30 -0
  232. package/icons/pictograms/human-holding-heart.tsx +30 -0
  233. package/icons/pictograms/human-open-arms.tsx +23 -0
  234. package/icons/pictograms/human-profile.tsx +23 -0
  235. package/icons/pictograms/human-swimming.tsx +25 -0
  236. package/icons/pictograms/ice-cream.tsx +23 -0
  237. package/icons/pictograms/important.tsx +23 -0
  238. package/icons/pictograms/index.ts +285 -0
  239. package/icons/pictograms/information.tsx +30 -0
  240. package/icons/pictograms/internet.tsx +23 -0
  241. package/icons/pictograms/jogging.tsx +21 -0
  242. package/icons/pictograms/kid-playing.tsx +23 -0
  243. package/icons/pictograms/life-jacket.tsx +21 -0
  244. package/icons/pictograms/lifebuoy.tsx +20 -0
  245. package/icons/pictograms/lightbulb.tsx +23 -0
  246. package/icons/pictograms/lightning.tsx +23 -0
  247. package/icons/pictograms/location-mark.tsx +30 -0
  248. package/icons/pictograms/log-in.tsx +23 -0
  249. package/icons/pictograms/long-term-trips.tsx +20 -0
  250. package/icons/pictograms/lotte-chatbot.tsx +28 -0
  251. package/icons/pictograms/lotte-mail.tsx +28 -0
  252. package/icons/pictograms/mail-at.tsx +23 -0
  253. package/icons/pictograms/mail-information.tsx +23 -0
  254. package/icons/pictograms/mailbox.tsx +23 -0
  255. package/icons/pictograms/many-sea-days.tsx +20 -0
  256. package/icons/pictograms/medal.tsx +23 -0
  257. package/icons/pictograms/microphone.tsx +23 -0
  258. package/icons/pictograms/ms-1.tsx +23 -0
  259. package/icons/pictograms/ms-2.tsx +30 -0
  260. package/icons/pictograms/ms-3.tsx +30 -0
  261. package/icons/pictograms/ms-4.tsx +30 -0
  262. package/icons/pictograms/ms-5.tsx +30 -0
  263. package/icons/pictograms/ms-6.tsx +30 -0
  264. package/icons/pictograms/ms-7-new-eng.tsx +37 -0
  265. package/icons/pictograms/ms-7-new.tsx +30 -0
  266. package/icons/pictograms/ms-7.tsx +30 -0
  267. package/icons/pictograms/ms-default.tsx +30 -0
  268. package/icons/pictograms/ms-flow-new-eng.tsx +37 -0
  269. package/icons/pictograms/ms-flow-new.tsx +49 -0
  270. package/icons/pictograms/ms-flow.tsx +41 -0
  271. package/icons/pictograms/ms-relax-new-eng.tsx +37 -0
  272. package/icons/pictograms/ms-relax-new.tsx +36 -0
  273. package/icons/pictograms/ms-ship.tsx +23 -0
  274. package/icons/pictograms/music-book.tsx +23 -0
  275. package/icons/pictograms/my-account.tsx +22 -0
  276. package/icons/pictograms/my-trips.tsx +29 -0
  277. package/icons/pictograms/navigation-arrow.tsx +23 -0
  278. package/icons/pictograms/no-wifi.tsx +21 -0
  279. package/icons/pictograms/not-available.tsx +23 -0
  280. package/icons/pictograms/offer.tsx +23 -0
  281. package/icons/pictograms/offline.tsx +25 -0
  282. package/icons/pictograms/onboard-announcement.tsx +20 -0
  283. package/icons/pictograms/package-newspaper.tsx +27 -0
  284. package/icons/pictograms/paper-news.tsx +23 -0
  285. package/icons/pictograms/paper-plane.tsx +28 -0
  286. package/icons/pictograms/payment-check.tsx +32 -0
  287. package/icons/pictograms/payment.tsx +28 -0
  288. package/icons/pictograms/people-check.tsx +25 -0
  289. package/icons/pictograms/people.tsx +25 -0
  290. package/icons/pictograms/permanent-make-up.tsx +20 -0
  291. package/icons/pictograms/person-single.tsx +23 -0
  292. package/icons/pictograms/phone.tsx +20 -0
  293. package/icons/pictograms/play-button.tsx +20 -0
  294. package/icons/pictograms/presentation.tsx +23 -0
  295. package/icons/pictograms/price-tag.tsx +21 -0
  296. package/icons/pictograms/printer.tsx +23 -0
  297. package/icons/pictograms/rain.tsx +23 -0
  298. package/icons/pictograms/receipt.tsx +25 -0
  299. package/icons/pictograms/remove.tsx +25 -0
  300. package/icons/pictograms/safety.tsx +23 -0
  301. package/icons/pictograms/screen.tsx +23 -0
  302. package/icons/pictograms/search.tsx +23 -0
  303. package/icons/pictograms/service.tsx +23 -0
  304. package/icons/pictograms/sewage.tsx +30 -0
  305. package/icons/pictograms/ship-outstanding.tsx +23 -0
  306. package/icons/pictograms/ship-transfer.tsx +23 -0
  307. package/icons/pictograms/shooting-stars.tsx +23 -0
  308. package/icons/pictograms/shore-excursions-old.tsx +23 -0
  309. package/icons/pictograms/shore-excursions.tsx +32 -0
  310. package/icons/pictograms/short-notice-departures.tsx +20 -0
  311. package/icons/pictograms/short-trips.tsx +21 -0
  312. package/icons/pictograms/size.tsx +23 -0
  313. package/icons/pictograms/smartphone.tsx +23 -0
  314. package/icons/pictograms/smiley.tsx +23 -0
  315. package/icons/pictograms/social-media.tsx +37 -0
  316. package/icons/pictograms/spa-balcony-cabin.tsx +43 -0
  317. package/icons/pictograms/speech-bubble-faq.tsx +23 -0
  318. package/icons/pictograms/speech-bubble-hello.tsx +23 -0
  319. package/icons/pictograms/speech-bubble-ok.tsx +30 -0
  320. package/icons/pictograms/speedboat.tsx +23 -0
  321. package/icons/pictograms/star-cancel.tsx +23 -0
  322. package/icons/pictograms/star-check.tsx +23 -0
  323. package/icons/pictograms/star-plus.tsx +23 -0
  324. package/icons/pictograms/star.tsx +23 -0
  325. package/icons/pictograms/sun-cloud.tsx +23 -0
  326. package/icons/pictograms/sun-lounger.tsx +23 -0
  327. package/icons/pictograms/sun.tsx +23 -0
  328. package/icons/pictograms/theater-mask.tsx +35 -0
  329. package/icons/pictograms/thermometer.tsx +23 -0
  330. package/icons/pictograms/tickets.tsx +21 -0
  331. package/icons/pictograms/towels.tsx +23 -0
  332. package/icons/pictograms/transportation.tsx +30 -0
  333. package/icons/pictograms/travel-protection-check.tsx +23 -0
  334. package/icons/pictograms/travel-protection.tsx +23 -0
  335. package/icons/pictograms/video.tsx +23 -0
  336. package/icons/pictograms/waste-management.tsx +30 -0
  337. package/icons/pictograms/webinar.tsx +23 -0
  338. package/icons/pictograms/wheel-of-fortune.tsx +23 -0
  339. package/icons/pictograms/wifi.tsx +20 -0
  340. package/icons/pictograms/wind.tsx +25 -0
  341. package/index.tsx +73 -0
  342. package/package.json +119 -0
  343. package/public/favicon-16x16.png +0 -0
  344. package/public/favicon-32x32.png +0 -0
  345. package/public/videos/placeholder.mp4 +0 -0
  346. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_It.ttf +0 -0
  347. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_It.woff +0 -0
  348. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_It.woff2 +0 -0
  349. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_Rg.ttf +0 -0
  350. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_Rg.woff +0 -0
  351. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_Rg.woff2 +0 -0
  352. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBd.ttf +0 -0
  353. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBd.woff +0 -0
  354. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBd.woff2 +0 -0
  355. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBdIt.ttf +0 -0
  356. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBdIt.woff +0 -0
  357. package/src/assets/fonts/mein-schiff-sans-pro/MeinSchiffSansPro_SBdIt.woff2 +0 -0
  358. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.eot +0 -0
  359. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.svg +338 -0
  360. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.ttf +0 -0
  361. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.woff +0 -0
  362. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200.woff2 +0 -0
  363. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.eot +0 -0
  364. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.svg +345 -0
  365. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.ttf +0 -0
  366. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.woff +0 -0
  367. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-200italic.woff2 +0 -0
  368. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.eot +0 -0
  369. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.svg +338 -0
  370. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.ttf +0 -0
  371. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.woff +0 -0
  372. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300.woff2 +0 -0
  373. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.eot +0 -0
  374. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.svg +346 -0
  375. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.ttf +0 -0
  376. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.woff +0 -0
  377. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-300italic.woff2 +0 -0
  378. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.eot +0 -0
  379. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.svg +337 -0
  380. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.ttf +0 -0
  381. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.woff +0 -0
  382. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600.woff2 +0 -0
  383. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.eot +0 -0
  384. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.svg +342 -0
  385. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.ttf +0 -0
  386. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.woff +0 -0
  387. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-600italic.woff2 +0 -0
  388. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.eot +0 -0
  389. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.svg +337 -0
  390. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.ttf +0 -0
  391. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.woff +0 -0
  392. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700.woff2 +0 -0
  393. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.eot +0 -0
  394. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.svg +339 -0
  395. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.ttf +0 -0
  396. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.woff +0 -0
  397. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-700italic.woff2 +0 -0
  398. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.eot +0 -0
  399. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.svg +337 -0
  400. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.ttf +0 -0
  401. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.woff +0 -0
  402. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900.woff2 +0 -0
  403. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.eot +0 -0
  404. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.svg +340 -0
  405. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.ttf +0 -0
  406. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.woff +0 -0
  407. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-900italic.woff2 +0 -0
  408. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.eot +0 -0
  409. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.svg +343 -0
  410. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.ttf +0 -0
  411. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.woff +0 -0
  412. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-italic.woff2 +0 -0
  413. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.eot +0 -0
  414. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.svg +337 -0
  415. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.ttf +0 -0
  416. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.woff +0 -0
  417. package/src/assets/fonts/source-sans-pro/source-sans-pro-v21-latin-regular.woff2 +0 -0
  418. package/src/assets/images/placeholder-blueish.jpg +0 -0
  419. package/src/assets/images/placeholder-sepia.jpg +0 -0
  420. package/src/assets/images/placeholder.jpg +0 -0
  421. package/src/components/core/Accordion/Accordion.tsx +228 -0
  422. package/src/components/core/Accordion/AccordionItem.tsx +72 -0
  423. package/src/components/core/Accordion/AccordionTab.tsx +39 -0
  424. package/src/components/core/Accordion/index.ts +3 -0
  425. package/src/components/core/Accordion/utils.tsx +13 -0
  426. package/src/components/core/Alert/Alert.tsx +131 -0
  427. package/src/components/core/Alert/index.ts +1 -0
  428. package/src/components/core/AlertDialog/AlertDialog.tsx +288 -0
  429. package/src/components/core/AlertDialog/index.ts +1 -0
  430. package/src/components/core/Badge/Badge.tsx +70 -0
  431. package/src/components/core/Badge/index.ts +1 -0
  432. package/src/components/core/BirthdateField/BirthdateField.tsx +269 -0
  433. package/src/components/core/BirthdateField/index.ts +1 -0
  434. package/src/components/core/Button/Button.tsx +178 -0
  435. package/src/components/core/Button/index.ts +1 -0
  436. package/src/components/core/ButtonGroup/ButtonGroup.tsx +71 -0
  437. package/src/components/core/ButtonGroup/index.ts +1 -0
  438. package/src/components/core/Calendar/Calendar.tsx +303 -0
  439. package/src/components/core/Calendar/index.ts +1 -0
  440. package/src/components/core/Checkbox/Checkbox.tsx +107 -0
  441. package/src/components/core/Checkbox/index.ts +1 -0
  442. package/src/components/core/CheckboxField/CheckboxField.tsx +156 -0
  443. package/src/components/core/CheckboxField/CheckboxFieldError.tsx +14 -0
  444. package/src/components/core/CheckboxField/CheckboxFieldLabel.tsx +25 -0
  445. package/src/components/core/CheckboxField/CheckboxFieldNote.tsx +16 -0
  446. package/src/components/core/CheckboxField/index.ts +1 -0
  447. package/src/components/core/Countdown/Countdown.tsx +67 -0
  448. package/src/components/core/Countdown/index.ts +1 -0
  449. package/src/components/core/DataTable/DataTable.tsx +98 -0
  450. package/src/components/core/DataTable/index.ts +1 -0
  451. package/src/components/core/Dialog/Dialog.tsx +443 -0
  452. package/src/components/core/Dialog/index.ts +1 -0
  453. package/src/components/core/Divider/Divider.tsx +37 -0
  454. package/src/components/core/Divider/index.ts +1 -0
  455. package/src/components/core/FavoriteButton/FavoriteButton.tsx +294 -0
  456. package/src/components/core/FavoriteButton/index.ts +1 -0
  457. package/src/components/core/Fieldset/Fieldset.tsx +42 -0
  458. package/src/components/core/Fieldset/index.ts +1 -0
  459. package/src/components/core/FormLabel/FormLabel.tsx +88 -0
  460. package/src/components/core/FormLabel/index.ts +1 -0
  461. package/src/components/core/Icon/Icon.tsx +106 -0
  462. package/src/components/core/Icon/index.ts +1 -0
  463. package/src/components/core/IconButton/IconButton.tsx +169 -0
  464. package/src/components/core/IconButton/index.ts +1 -0
  465. package/src/components/core/InputField/InputField.tsx +128 -0
  466. package/src/components/core/InputField/InputFieldError.tsx +17 -0
  467. package/src/components/core/InputField/InputFieldInput.tsx +67 -0
  468. package/src/components/core/InputField/InputFieldLabel.tsx +29 -0
  469. package/src/components/core/InputField/InputFieldNote.tsx +16 -0
  470. package/src/components/core/InputField/index.ts +1 -0
  471. package/src/components/core/LoadingSpinner/LoadingSpinner.tsx +50 -0
  472. package/src/components/core/LoadingSpinner/index.ts +1 -0
  473. package/src/components/core/Pagination/Pagination.tsx +191 -0
  474. package/src/components/core/Pagination/index.ts +1 -0
  475. package/src/components/core/PasswordField/PasswordField.tsx +187 -0
  476. package/src/components/core/PasswordField/PasswordFieldRequirementsList.tsx +78 -0
  477. package/src/components/core/PasswordField/index.ts +1 -0
  478. package/src/components/core/PhoneNumberInput/PhoneNumberInput.tsx +201 -0
  479. package/src/components/core/PhoneNumberInput/countries.json +242 -0
  480. package/src/components/core/PhoneNumberInput/index.ts +1 -0
  481. package/src/components/core/Pictogram/Pictogram.tsx +67 -0
  482. package/src/components/core/Pictogram/index.ts +1 -0
  483. package/src/components/core/Popover/Popover.tsx +61 -0
  484. package/src/components/core/Popover/index.ts +1 -0
  485. package/src/components/core/Portlist/Portlist.tsx +28 -0
  486. package/src/components/core/Portlist/index.ts +1 -0
  487. package/src/components/core/PriceInput/PriceInput.tsx +100 -0
  488. package/src/components/core/PriceInput/index.ts +1 -0
  489. package/src/components/core/QuantityItem/QuantityItem.tsx +37 -0
  490. package/src/components/core/QuantityItem/index.ts +1 -0
  491. package/src/components/core/Radio/Radio.tsx +64 -0
  492. package/src/components/core/Radio/index.ts +1 -0
  493. package/src/components/core/RadioField/RadioField.tsx +66 -0
  494. package/src/components/core/RadioField/index.ts +1 -0
  495. package/src/components/core/RadixRadio/RadixRadio.tsx +56 -0
  496. package/src/components/core/RadixRadio/index.ts +1 -0
  497. package/src/components/core/RadixSelect/RadixSelect.tsx +172 -0
  498. package/src/components/core/RadixSelect/index.ts +1 -0
  499. package/src/components/core/RangeSlider/RangeSlider.tsx +59 -0
  500. package/src/components/core/RangeSlider/index.ts +1 -0
  501. package/src/components/core/Section/Section.tsx +62 -0
  502. package/src/components/core/Section/index.ts +1 -0
  503. package/src/components/core/SegmentedControl/SegmentedControl.tsx +65 -0
  504. package/src/components/core/SegmentedControl/index.ts +1 -0
  505. package/src/components/core/Select/Select.tsx +171 -0
  506. package/src/components/core/Select/index.ts +1 -0
  507. package/src/components/core/SelectField/SelectField.tsx +67 -0
  508. package/src/components/core/SelectField/index.ts +1 -0
  509. package/src/components/core/Skeleton/Skeleton.tsx +23 -0
  510. package/src/components/core/Skeleton/SkeletonTextLines.tsx +37 -0
  511. package/src/components/core/Skeleton/index.ts +2 -0
  512. package/src/components/core/Stepper/Stepper.tsx +116 -0
  513. package/src/components/core/Stepper/index.ts +1 -0
  514. package/src/components/core/SwitchToggle/SwitchToggle.tsx +46 -0
  515. package/src/components/core/SwitchToggle/index.ts +1 -0
  516. package/src/components/core/Tabs/Tabs.tsx +130 -0
  517. package/src/components/core/Tabs/index.ts +1 -0
  518. package/src/components/core/Tag/Tag.tsx +61 -0
  519. package/src/components/core/Tag/index.ts +1 -0
  520. package/src/components/core/TextButton/TextButton.tsx +108 -0
  521. package/src/components/core/TextButton/index.ts +1 -0
  522. package/src/components/core/Toast/Toast.tsx +65 -0
  523. package/src/components/core/Toast/index.ts +1 -0
  524. package/src/components/core/Tooltip/Tooltip.tsx +110 -0
  525. package/src/components/core/Tooltip/index.ts +1 -0
  526. package/src/components/shared/NextFontMeinSchiffSansPro/NextFontMeinSchiffSansPro.tsx +160 -0
  527. package/src/components/shared/NextFontMeinSchiffSansPro/index.ts +1 -0
  528. package/src/components/shared/UniversalCarousel/CarouselContext.ts +61 -0
  529. package/src/components/shared/UniversalCarousel/CarouselDefaultPagination.tsx +92 -0
  530. package/src/components/shared/UniversalCarousel/CarouselInterface.tsx +152 -0
  531. package/src/components/shared/UniversalCarousel/CarouselStage.tsx +235 -0
  532. package/src/components/shared/UniversalCarousel/UniversalCarousel.tsx +125 -0
  533. package/src/components/shared/UniversalCarousel/helpers.ts +206 -0
  534. package/src/components/shared/UniversalCarousel/index.ts +4 -0
  535. package/src/helpers/children.ts +27 -0
  536. package/src/helpers/cookies.ts +22 -0
  537. package/src/helpers/dateFormat.ts +245 -0
  538. package/src/helpers/dateToYearMonthDay.ts +17 -0
  539. package/src/helpers/elementVisibility.ts +53 -0
  540. package/src/helpers/i18n.ts +197 -0
  541. package/src/helpers/price.ts +26 -0
  542. package/src/helpers/responsive-property.ts +118 -0
  543. package/src/helpers/screen.ts +14 -0
  544. package/src/helpers/sleep.ts +5 -0
  545. package/src/helpers/slot.tsx +68 -0
  546. package/src/helpers/ssr.ts +5 -0
  547. package/src/helpers/store.ts +75 -0
  548. package/src/helpers/types.ts +18 -0
  549. package/src/helpers/utils.ts +3 -0
  550. package/src/hooks/use-active-screen-names.ts +100 -0
  551. package/src/hooks/use-intersection-observer.ts +190 -0
  552. package/src/hooks/use-screen-name-at-least.ts +32 -0
  553. package/src/hooks/use-screen-name.ts +34 -0
  554. package/src/hooks/use-store.ts +45 -0
  555. package/src/hooks/use-toasts.ts +111 -0
  556. package/src/stores/toasts-store.ts +11 -0
@@ -0,0 +1,294 @@
1
+ 'use client';
2
+
3
+ import {
4
+ AnchorHTMLAttributes,
5
+ ButtonHTMLAttributes,
6
+ Dispatch,
7
+ forwardRef,
8
+ ForwardRefRenderFunction,
9
+ ReactNode,
10
+ SetStateAction,
11
+ useState,
12
+ } from 'react';
13
+ import { twMerge } from 'tailwind-merge';
14
+ import { Icon } from '../../core/Icon';
15
+
16
+ /**
17
+ * Handler for click events, expected to manage active state toggling and possibly return a promise for async handling.
18
+ */
19
+ type OnClickHandler = (
20
+ active: boolean,
21
+ ) => void | boolean | Promise<void | boolean>;
22
+
23
+ type CommonProps = {
24
+ className?: string;
25
+ /**
26
+ * The initial 'active' state of the component when it mounts.
27
+ *
28
+ * ```tsx
29
+ * <FavoriteButton defaultActive={true} />
30
+ * ```
31
+ */
32
+ defaultActive?: boolean;
33
+
34
+ /**
35
+ * A React node or a function that returns a React node.
36
+ *
37
+ * ```tsx
38
+ * <FavoriteButton>
39
+ * <Icon name="eye-off" size="md" />
40
+ * </FavoriteButton>
41
+ * ```
42
+ *
43
+ * The function receives the current `active` state as a parameter,
44
+ * enabling the rendering of different content based on the state.
45
+ *
46
+ * ```tsx
47
+ * <FavoriteButton>
48
+ * {(active) => (
49
+ * <Icon name={active ? 'eye-off' : 'eye-empty'} size="md" />
50
+ * )}
51
+ * </FavoriteButton>
52
+ * ```
53
+ *
54
+ */
55
+ children?: ReactNode | ((active: boolean) => ReactNode);
56
+ };
57
+
58
+ type PropsAsButton = CommonProps &
59
+ Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'children'> & {
60
+ as: 'button';
61
+
62
+ /**
63
+ * Callback triggered when the component is clicked.
64
+ *
65
+ * The handler receives a boolean argument indicating the next 'active' state.
66
+ * - If the handler returns a boolean, the component's active state will be set to the returned value.
67
+ * - If a Promise is returned, the component will wait for the Promise to resolve and use the resolved boolean value to update the active state.
68
+ *
69
+ * ```tsx
70
+ * const handleClick = (nextActiveState: boolean) => {
71
+ * // Your handling logic here
72
+ * return !nextActiveState; // Or return a promise that resolves to a boolean
73
+ * };
74
+ *
75
+ * <FavoriteButton onClick={handleClick} />
76
+ * ```
77
+ */
78
+ onClick?: OnClickHandler;
79
+ };
80
+
81
+ type PropsAsAnchor = CommonProps &
82
+ AnchorHTMLAttributes<HTMLAnchorElement> & {
83
+ as: 'a';
84
+ };
85
+
86
+ type Props = PropsAsButton | PropsAsAnchor;
87
+
88
+ const createClickHandler = (
89
+ active: boolean,
90
+ setPending: Dispatch<SetStateAction<boolean | undefined>>,
91
+ setActive: Dispatch<SetStateAction<boolean>>,
92
+ onClick: OnClickHandler | undefined,
93
+ ) => {
94
+ return async () => {
95
+ if (!onClick) {
96
+ return;
97
+ }
98
+
99
+ setPending(true);
100
+
101
+ const nextActive = !active;
102
+
103
+ setActive(nextActive);
104
+
105
+ const returnValue = await onClick(nextActive);
106
+
107
+ setPending(false);
108
+
109
+ if (typeof returnValue !== 'boolean') {
110
+ return;
111
+ }
112
+
113
+ setActive(returnValue);
114
+ };
115
+ };
116
+
117
+ const renderDefaultIcon = (active: boolean) => {
118
+ if (active) {
119
+ return (
120
+ <Icon
121
+ name="heart-filled"
122
+ size="md"
123
+ className="fill-surface-primary-100 text-marine-high-emphasis"
124
+ />
125
+ );
126
+ }
127
+
128
+ return (
129
+ <>
130
+ <Icon name="heart" size="md" className="sm:group-hover:hidden" />
131
+ <Icon
132
+ name="heart-filled"
133
+ size="md"
134
+ className="hidden sm:group-hover:block sm:group-hover:fill-surface-secondary-100"
135
+ />
136
+ </>
137
+ );
138
+ };
139
+
140
+ const renderChildren = (
141
+ active: boolean,
142
+ children: Props['children'],
143
+ ): ReactNode => {
144
+ if (typeof children === 'undefined') {
145
+ return renderDefaultIcon(active);
146
+ }
147
+
148
+ if (typeof children === 'function') {
149
+ return children(active);
150
+ }
151
+
152
+ return children;
153
+ };
154
+
155
+ const FavoriteButtonRenderFunction: ForwardRefRenderFunction<
156
+ HTMLButtonElement | HTMLAnchorElement,
157
+ Props
158
+ > = (props, ref?) => {
159
+ const {
160
+ className,
161
+ as = 'button',
162
+ defaultActive = false,
163
+ onClick,
164
+ children,
165
+ ...rest
166
+ } = props;
167
+
168
+ const [active, setActive] = useState(defaultActive);
169
+ const [pending, setPending] = useState<boolean>();
170
+
171
+ const handleClick =
172
+ as === 'a'
173
+ ? onClick
174
+ : createClickHandler(
175
+ active,
176
+ setPending,
177
+ setActive,
178
+ onClick as OnClickHandler | undefined,
179
+ );
180
+
181
+ const shouldAnimate = typeof pending !== 'undefined' && as !== 'a';
182
+ const shouldTransition = as !== 'a';
183
+
184
+ const elementClassList = [
185
+ 'group inline-flex p-2.5 appearance-none rounded-full',
186
+ 'focus:outline-none focus-visible:shadow-focus-state active:bg-surface-primary-40 disabled:pointer-events-none',
187
+ active
188
+ ? 'bg-surface-primary-80 text-marine-high-emphasis'
189
+ : 'text-marine-high-emphasis sm:hover:bg-surface-secondary-7 sm:hover:text-marine-high-emphasis',
190
+ ];
191
+
192
+ const iconWrapperClassList = [
193
+ shouldTransition && 'group-active:transition-transform',
194
+ shouldAnimate ? 'animate-[favorite-pulse_600ms_ease-in-out]' : '',
195
+ shouldTransition && !active
196
+ ? 'group-active:scale-[0.66] group-active:animate-none'
197
+ : '',
198
+ ];
199
+
200
+ const Element = as;
201
+
202
+ return (
203
+ <Element
204
+ className={twMerge(elementClassList.join(' '), className)}
205
+ onClick={handleClick}
206
+ disabled={pending}
207
+ ref={ref}
208
+ {...(rest as any)}
209
+ >
210
+ <div className={iconWrapperClassList.join(' ')}>
211
+ {renderChildren(active, children)}
212
+ </div>
213
+ </Element>
214
+ );
215
+ };
216
+
217
+ /**
218
+ * `FavoriteButton` is a component, for creating interactive buttons, offering various customization options to fit into different use cases such as liking or favoriting items.
219
+ *
220
+ * ```tsx
221
+ * const handleClick = (active) => alert(active ? 'Liked' : 'Unliked');
222
+ * <FavoriteButton onClick={handleClick} />
223
+ * ```
224
+ *
225
+ * With the above code, a `FavoriteButton` is rendered using default icons, and it logs the new active state upon being clicked.
226
+ *
227
+ * ## Available Props
228
+ *
229
+ * | Name | Type | Description |
230
+ * |---|---|--------|
231
+ * | `defaultActive`| `boolean` | Sets the initial active state of the component. |
232
+ * | `onClick` | `OnClickHandler` | Handles click events and state transitions. |
233
+ * | `as` | `"button"` \| `"a"` | Determines the HTML element type. |
234
+ * | `children` | `ReactNode` \| (active: boolean) => ReactNode | Supply your custom icon using children. |
235
+ * | ...rest | | Extra props which are forwarded to the element. |
236
+ *
237
+ * ## Icon Management
238
+ *
239
+ * Iconography within the `FavoriteButton` component is managed dynamically by adopting a strategy that employs render props. This allows you to have absolute control over how icons should appear across distinct states.
240
+ *
241
+ * ### Simple Custom Icon Rendering
242
+ *
243
+ * For simple use cases just provide an icon as the child of the favorite button.
244
+ *
245
+ * ```tsx
246
+ * <FavoriteButton>
247
+ * <Icon name="eye-empty" size="md" />
248
+ * </FavoriteButton>
249
+ * ```
250
+ *
251
+ * ### Advanced Icon Handling and Styling with Render Props
252
+ *
253
+ * Utilize render props for straightforward and effective control over icon presentation and styling across different component states. By employing a function that takes the active state as an argument, you can precisely define icons and apply styles for both the active and inactive states dynamically. The active parameter allows for conditional rendering of icons and the application of styles as per requirements:
254
+ *
255
+ * ```tsx
256
+ * // Icon based on state
257
+ *
258
+ * <FavoriteButton>
259
+ * {active => <Icon name={active ? 'eye-off' : 'eye-empty'} size="md" />}
260
+ * </FavoriteButton>
261
+ *
262
+ * In the presented code snippet, the `FavoriteButton` renders a colored and filled airplane icon when in an active state. On the other hand, during an inactive state, it depicts the same airplane icon, modifying its color upon hover.
263
+ *
264
+ * Using render props in such a manner awards you a significant level of control over the management of icons and their respective styles, fostering subtle visual feedback in response to user interactions with the `FavoriteButton` component. This approach is particularly beneficial in situations that demand comprehensive customization and dynamic styling predicated upon component states, ensuring that your UI remains both dynamic and visually consistent.
265
+ *
266
+ * ## Handling Click Events with `onClick`
267
+ *
268
+ * Manage click events and synchronize the component’s active state with potential asynchronous actions like API calls via `onClick`:
269
+ *
270
+ * ```tsx
271
+ * const handleClick = async (active) => {
272
+ * const serverResponse = await someAsyncAction();
273
+ * return serverResponse.liked;
274
+ * };
275
+ *
276
+ * <FavoriteButton onClick={handleClick} />
277
+ * ```
278
+ *
279
+ * Here, upon a user click, the component instantaneously toggles its state. Then, `someAsyncAction` communicates with a server and once the response is returned from the handler, the component ensures to align and represent this new state in the UI.
280
+ *
281
+ * ## Rendering as Anchor
282
+ *
283
+ * Using `FavoriteButton` as an anchor (`a`) element is straightforward:
284
+ *
285
+ * ```tsx
286
+ * <FavoriteButton as="a" href="#" />
287
+ * ```
288
+ *
289
+ * However, it's pivotal to note that when `FavoriteButton` is rendered as an anchor element (`as="a"`), it operates purely as a navigational link, devoid of internal state management or animations associated with state changes. It exists simply as a stylized link, diverting users to specified URLs without toggling between states or triggering animations on click events.
290
+ */
291
+ export const FavoriteButton = forwardRef<
292
+ HTMLButtonElement | HTMLAnchorElement,
293
+ Props
294
+ >(FavoriteButtonRenderFunction) as typeof FavoriteButtonRenderFunction;
@@ -0,0 +1 @@
1
+ export * from './FavoriteButton';
@@ -0,0 +1,42 @@
1
+ import {
2
+ FC,
3
+ PropsWithChildren,
4
+ ReactNode,
5
+ FieldsetHTMLAttributes,
6
+ } from 'react';
7
+ import { twMerge } from '@tui-cruises/mein-schiff-web-tailwind-config';
8
+
9
+ type ElementAttributes = FieldsetHTMLAttributes<HTMLFieldSetElement>;
10
+
11
+ export type FieldsetProps = ElementAttributes &
12
+ PropsWithChildren<{
13
+ headline?: ReactNode;
14
+ copy?: ReactNode;
15
+ }>;
16
+
17
+ export const Fieldset: FC<FieldsetProps> = ({
18
+ children,
19
+ headline,
20
+ copy,
21
+ ...attrs
22
+ }) => {
23
+ return (
24
+ <fieldset
25
+ {...attrs}
26
+ className={twMerge(
27
+ attrs.className,
28
+ 'space-y-8 text-marine-high-emphasis',
29
+ )}
30
+ >
31
+ {(headline || copy) && (
32
+ <div className="space-y-4">
33
+ {headline && <div className="headline-md">{headline}</div>}
34
+
35
+ {copy && <div>{copy}</div>}
36
+ </div>
37
+ )}
38
+
39
+ {children && <div className="space-y-4">{children}</div>}
40
+ </fieldset>
41
+ );
42
+ };
@@ -0,0 +1 @@
1
+ export * from './Fieldset';
@@ -0,0 +1,88 @@
1
+ import {
2
+ forwardRef,
3
+ LabelHTMLAttributes,
4
+ ForwardRefRenderFunction,
5
+ } from 'react';
6
+ import { twJoin } from 'tailwind-merge';
7
+ import { Slot, Slottable } from '@radix-ui/react-slot';
8
+
9
+ export type FormLabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
10
+ asChild?: boolean;
11
+ /** Indicates if the associated field is required. */
12
+ required?: boolean;
13
+ };
14
+
15
+ const FormLabelImplementation: ForwardRefRenderFunction<
16
+ HTMLLabelElement,
17
+ FormLabelProps
18
+ > = (props, ref) => {
19
+ const { asChild, className, required, children, ...args } = props;
20
+
21
+ const Component = asChild ? Slot : 'label';
22
+
23
+ return (
24
+ <Component
25
+ {...args}
26
+ ref={ref}
27
+ className={twJoin(
28
+ 'block cursor-pointer text-base font-semibold text-marine-high-emphasis data-[invalid]:text-error-100',
29
+ className,
30
+ )}
31
+ >
32
+ <Slottable>{children}</Slottable>
33
+ {required && (
34
+ <abbr
35
+ className="ml-1 text-error-100 no-underline"
36
+ title="Required field"
37
+ >
38
+ *
39
+ </abbr>
40
+ )}
41
+ </Component>
42
+ );
43
+ };
44
+
45
+ /**
46
+ * `FormLabel` is a component for rendering a label in forms.
47
+ *
48
+ * ## Props
49
+ *
50
+ * The `FormLabel` component accepts the following properties:
51
+ *
52
+ * - `children`: The content of the label.
53
+ * - `required`: If set, adds an asterisk (*) to denote that the associated field is required.
54
+ * - `className`: Additional classes for custom styling.
55
+ * - `as`: Optionally specifies the element type to render. Can be 'label', 'span', or 'Form.Label' from Radix UI.
56
+ *
57
+ * ## Usage
58
+ *
59
+ * ```tsx
60
+ * // Simple label
61
+ * <FormLabel>
62
+ * Label
63
+ * </FormLabel>
64
+ *
65
+ * // Label for a required field
66
+ * <FormLabel required>
67
+ * Label
68
+ * </FormLabel>
69
+ *
70
+ * // Label with custom styling
71
+ * <FormLabel required className="custom-class">
72
+ * Label
73
+ * </FormLabel>
74
+ *
75
+ * // Using a different element type
76
+ * <FormLabel as="span">
77
+ * Label
78
+ * </FormLabel>
79
+ *
80
+ * // Using Radix UI Form.Label
81
+ * <FormLabel as={Form.Label}>
82
+ * Label
83
+ * </FormLabel>
84
+ * ```
85
+ */
86
+ export const FormLabel = forwardRef(
87
+ FormLabelImplementation,
88
+ ) as typeof FormLabelImplementation;
@@ -0,0 +1 @@
1
+ export * from './FormLabel';
@@ -0,0 +1,106 @@
1
+ 'use client';
2
+
3
+ import { dynamicComponents as dynamicComponentsIcons } from '../../../../icons/icons';
4
+ import type { ComponentType, SVGProps } from 'react';
5
+ import { twJoin } from 'tailwind-merge';
6
+
7
+ // Type for local icons
8
+ type DynamicComponentIconName = keyof typeof dynamicComponentsIcons;
9
+
10
+ // Union of both types to create a comprehensive IconName type
11
+ export type IconName = DynamicComponentIconName;
12
+
13
+ export type IconProps = {
14
+ /**
15
+ * Additional TailwindCSS utilities can be added with this prop.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * The name of the icon.
20
+ */
21
+ name: IconName;
22
+
23
+ /**
24
+ * The size of the icon. Can be a number for a custom size or
25
+ * one of the predefined sizes: 'xs' (16x16), 'sm' (20x20),
26
+ * 'md' (24x24), 'lg' (32x32).
27
+ *
28
+ * @default 'md'
29
+ */
30
+ size?: number | 'xs' | 'sm' | 'md' | 'lg';
31
+ };
32
+
33
+ /**
34
+ * Component to display an icon, based on the [local icon library](/docs/foundation-icons-pictograms--docs).
35
+ *
36
+ * @component
37
+ * @param {IconProps} props - The props for the Icon component.
38
+ * @returns {JSX.Element | null} The rendered icon component or null if the icon is not found.
39
+ */
40
+ const Icon = (props: IconProps) => {
41
+ const { className, name, size = 'md' } = props;
42
+
43
+ const IconComponent = getIconComponent(name);
44
+ if (!IconComponent) {
45
+ return null;
46
+ }
47
+
48
+ const iconSize = getIconSize(size);
49
+
50
+ return (
51
+ <IconComponent
52
+ className={twJoin('pointer-events-none', className)}
53
+ width={iconSize}
54
+ height={iconSize}
55
+ />
56
+ );
57
+ };
58
+
59
+ /**
60
+ * Helper function to get the icon size in pixels.
61
+ *
62
+ * @param {NonNullable<IconProps['size']>} size - The size prop, either a number or a predefined size string.
63
+ * @returns {number} The size in pixels.
64
+ */
65
+ const getIconSize = (size: NonNullable<IconProps['size']>) => {
66
+ if (typeof size === 'number') {
67
+ return size;
68
+ }
69
+
70
+ switch (size) {
71
+ case 'xs':
72
+ return 16;
73
+ case 'sm':
74
+ return 20;
75
+ case 'lg':
76
+ return 32;
77
+ default:
78
+ return 24;
79
+ }
80
+ };
81
+
82
+ /**
83
+ * Helper function to get the appropriate icon component.
84
+ *
85
+ * @param {IconName} name - The name of the icon to retrieve.
86
+ * @returns {ComponentType<SVGProps<SVGSVGElement>> | null} The icon component or null if not found.
87
+ */
88
+ const getIconComponent = (
89
+ name: IconName,
90
+ ): ComponentType<SVGProps<SVGSVGElement>> | null => {
91
+ // Check if the icon exists in dynamicComponentsIcons (case-sensitive)
92
+ if (dynamicComponentsIcons[name as DynamicComponentIconName]) {
93
+ return dynamicComponentsIcons[
94
+ name as DynamicComponentIconName
95
+ ] as ComponentType<SVGProps<SVGSVGElement>>;
96
+ }
97
+
98
+ // Icon not found
99
+ return dynamicComponentsIcons[
100
+ 'fallback' as DynamicComponentIconName
101
+ ] as ComponentType<SVGProps<SVGSVGElement>>;
102
+ };
103
+
104
+ Icon.displayName = 'Icon';
105
+
106
+ export { Icon };
@@ -0,0 +1 @@
1
+ export * from './Icon';