@myelmut/design-system 0.1.46 → 0.1.48

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 (318) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.es.js +720 -697
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/types/index.d.ts +6 -1
  6. package/package.json +3 -2
  7. package/src/assets/fonts/PPMori-Regular.woff2 +0 -0
  8. package/src/assets/fonts/PPMori-RegularItalic.woff2 +0 -0
  9. package/src/assets/fonts/PPMori-SemiBold.woff2 +0 -0
  10. package/src/assets/fonts/PPPangaia-Medium.woff2 +0 -0
  11. package/src/assets/fonts/PPPangaia-MediumItalic.woff2 +0 -0
  12. package/src/assets/fonts/PPPangaia-Ultralight.woff2 +0 -0
  13. package/src/assets/illustrations/balls-light.webp +0 -0
  14. package/src/assets/illustrations/balls.webp +0 -0
  15. package/src/assets/illustrations/basket-light.webp +0 -0
  16. package/src/assets/illustrations/basket.webp +0 -0
  17. package/src/assets/illustrations/bowl-2-light.webp +0 -0
  18. package/src/assets/illustrations/bowl-2.webp +0 -0
  19. package/src/assets/illustrations/bowl-light.webp +0 -0
  20. package/src/assets/illustrations/bowl.webp +0 -0
  21. package/src/assets/illustrations/box-2-light.webp +0 -0
  22. package/src/assets/illustrations/box-2.webp +0 -0
  23. package/src/assets/illustrations/box-light.webp +0 -0
  24. package/src/assets/illustrations/box.webp +0 -0
  25. package/src/assets/illustrations/calendar-light.webp +0 -0
  26. package/src/assets/illustrations/calendar.webp +0 -0
  27. package/src/assets/illustrations/can-light.webp +0 -0
  28. package/src/assets/illustrations/can.webp +0 -0
  29. package/src/assets/illustrations/carrot-light.webp +0 -0
  30. package/src/assets/illustrations/carrot.webp +0 -0
  31. package/src/assets/illustrations/cat-light.webp +0 -0
  32. package/src/assets/illustrations/cat.webp +0 -0
  33. package/src/assets/illustrations/check-rounded.webp +0 -0
  34. package/src/assets/illustrations/chicken-light.webp +0 -0
  35. package/src/assets/illustrations/chicken.webp +0 -0
  36. package/src/assets/illustrations/cross-rounded.webp +0 -0
  37. package/src/assets/illustrations/crown-light.webp +0 -0
  38. package/src/assets/illustrations/crown.webp +0 -0
  39. package/src/assets/illustrations/dog-light.webp +0 -0
  40. package/src/assets/illustrations/dog.webp +0 -0
  41. package/src/assets/illustrations/face-light.webp +0 -0
  42. package/src/assets/illustrations/face.webp +0 -0
  43. package/src/assets/illustrations/food-bag-light.webp +0 -0
  44. package/src/assets/illustrations/food-bag.webp +0 -0
  45. package/src/assets/illustrations/france-light.webp +0 -0
  46. package/src/assets/illustrations/france.webp +0 -0
  47. package/src/assets/illustrations/fridge-light.webp +0 -0
  48. package/src/assets/illustrations/fridge.webp +0 -0
  49. package/src/assets/illustrations/glasses-light.webp +0 -0
  50. package/src/assets/illustrations/glasses.webp +0 -0
  51. package/src/assets/illustrations/half-label-light.webp +0 -0
  52. package/src/assets/illustrations/half-label.webp +0 -0
  53. package/src/assets/illustrations/kitten-light.webp +0 -0
  54. package/src/assets/illustrations/kitten.webp +0 -0
  55. package/src/assets/illustrations/label-light.webp +0 -0
  56. package/src/assets/illustrations/label.webp +0 -0
  57. package/src/assets/illustrations/leaf-light.webp +0 -0
  58. package/src/assets/illustrations/leaf.webp +0 -0
  59. package/src/assets/illustrations/liquid-light.webp +0 -0
  60. package/src/assets/illustrations/liquid.webp +0 -0
  61. package/src/assets/illustrations/magnifying-glass-light.webp +0 -0
  62. package/src/assets/illustrations/magnifying-glass.webp +0 -0
  63. package/src/assets/illustrations/meat-light.webp +0 -0
  64. package/src/assets/illustrations/meat.webp +0 -0
  65. package/src/assets/illustrations/molecule-light.webp +0 -0
  66. package/src/assets/illustrations/molecule.webp +0 -0
  67. package/src/assets/illustrations/paws-light.webp +0 -0
  68. package/src/assets/illustrations/paws.webp +0 -0
  69. package/src/assets/illustrations/plate-light.webp +0 -0
  70. package/src/assets/illustrations/plate.webp +0 -0
  71. package/src/assets/illustrations/pot-big-2-light.webp +0 -0
  72. package/src/assets/illustrations/pot-big-2.webp +0 -0
  73. package/src/assets/illustrations/pot-big-light.webp +0 -0
  74. package/src/assets/illustrations/pot-big.webp +0 -0
  75. package/src/assets/illustrations/pot-light.webp +0 -0
  76. package/src/assets/illustrations/pot.webp +0 -0
  77. package/src/assets/illustrations/puppy-light.webp +0 -0
  78. package/src/assets/illustrations/puppy.webp +0 -0
  79. package/src/assets/illustrations/quantity-light.webp +0 -0
  80. package/src/assets/illustrations/quantity.webp +0 -0
  81. package/src/assets/illustrations/sausage-light.webp +0 -0
  82. package/src/assets/illustrations/sausage.webp +0 -0
  83. package/src/assets/illustrations/sausages-light.webp +0 -0
  84. package/src/assets/illustrations/sausages.webp +0 -0
  85. package/src/assets/illustrations/skeleton-light.webp +0 -0
  86. package/src/assets/illustrations/skeleton.webp +0 -0
  87. package/src/assets/illustrations/sofa-light.webp +0 -0
  88. package/src/assets/illustrations/sofa.webp +0 -0
  89. package/src/assets/illustrations/sport-light.webp +0 -0
  90. package/src/assets/illustrations/sport.webp +0 -0
  91. package/src/assets/illustrations/steak-light.webp +0 -0
  92. package/src/assets/illustrations/steak.webp +0 -0
  93. package/src/assets/illustrations/truck-light.webp +0 -0
  94. package/src/assets/illustrations/truck.webp +0 -0
  95. package/src/assets/illustrations/warning-light.webp +0 -0
  96. package/src/assets/illustrations/warning.webp +0 -0
  97. package/src/assets/images/cat.webp +0 -0
  98. package/src/assets/images/dog.webp +0 -0
  99. package/src/assets/images/frequency/food-in-fridge.webp +0 -0
  100. package/src/assets/images/ingredients/beef.webp +0 -0
  101. package/src/assets/images/ingredients/beer-yeast.webp +0 -0
  102. package/src/assets/images/ingredients/calcium.webp +0 -0
  103. package/src/assets/images/ingredients/carrot.webp +0 -0
  104. package/src/assets/images/ingredients/chicken.webp +0 -0
  105. package/src/assets/images/ingredients/courgette.webp +0 -0
  106. package/src/assets/images/ingredients/dry-apple.webp +0 -0
  107. package/src/assets/images/ingredients/dry-carrot.webp +0 -0
  108. package/src/assets/images/ingredients/duck.webp +0 -0
  109. package/src/assets/images/ingredients/fish.webp +0 -0
  110. package/src/assets/images/ingredients/liquid.webp +0 -0
  111. package/src/assets/images/ingredients/oil.webp +0 -0
  112. package/src/assets/images/ingredients/pork.webp +0 -0
  113. package/src/assets/images/ingredients/potato.webp +0 -0
  114. package/src/assets/images/ingredients/quinoa.webp +0 -0
  115. package/src/assets/images/ingredients/rice.webp +0 -0
  116. package/src/assets/images/ingredients/seaweed.webp +0 -0
  117. package/src/assets/images/ingredients/turkey.webp +0 -0
  118. package/src/assets/images/ingredients/vitamins.webp +0 -0
  119. package/src/assets/images/tips/claudine-head.webp +0 -0
  120. package/src/assets/images/tips/claudine-tips-head-mobile.webp +0 -0
  121. package/src/assets/images/tips/claudine-tips-head-mobile@2x.webp +0 -0
  122. package/src/assets/images/tips/claudine-tips-head.webp +0 -0
  123. package/src/assets/images/tips/claudine-tips-head@2x.webp +0 -0
  124. package/src/assets/images/tips/claudine-tips-mobile.webp +0 -0
  125. package/src/assets/images/tips/claudine-tips-mobile@2x.webp +0 -0
  126. package/src/assets/images/tips/claudine-tips.webp +0 -0
  127. package/src/assets/images/tips/claudine-tips@2x.webp +0 -0
  128. package/src/assets/images/tips/payment-mobile.webp +0 -0
  129. package/src/assets/images/tips/payment-mobile@2x.webp +0 -0
  130. package/src/assets/images/tips/payment.webp +0 -0
  131. package/src/assets/images/tips/payment@2x.webp +0 -0
  132. package/src/assets/images/trash/dog-product-mobile.webp +0 -0
  133. package/src/assets/images/trash/dog-product.webp +0 -0
  134. package/src/assets/images/trash/full-cat.png +0 -0
  135. package/src/assets/images/trash/testimonial-1-mobile.webp +0 -0
  136. package/src/assets/images/trash/testimonial-1-mobile@2x.webp +0 -0
  137. package/src/assets/images/trash/testimonial-1.webp +0 -0
  138. package/src/assets/images/trash/testimonial-1@2x.webp +0 -0
  139. package/src/components/Accordions/FAQ/FaqItem.stories.tsx +61 -0
  140. package/src/components/Accordions/FAQ/FaqItem.tsx +55 -0
  141. package/src/components/Accordions/Ingredient/Ingredient.stories.tsx +38 -0
  142. package/src/components/Accordions/Ingredient/Ingredient.tsx +93 -0
  143. package/src/components/Accordions/index.tsx +4 -0
  144. package/src/components/Base/Banner/Banner.stories.tsx +33 -0
  145. package/src/components/Base/Banner/Banner.tsx +23 -0
  146. package/src/components/Base/Emblem/Emblem.stories.tsx +40 -0
  147. package/src/components/Base/Emblem/Emblem.tsx +22 -0
  148. package/src/components/Base/Logo/Logo.stories.tsx +46 -0
  149. package/src/components/Base/Logo/Logo.tsx +34 -0
  150. package/src/components/Base/ResponsiveImage/ResponsiveImage.stories.tsx +78 -0
  151. package/src/components/Base/ResponsiveImage/ResponsiveImage.tsx +56 -0
  152. package/src/components/Base/Text/Text.stories.tsx +115 -0
  153. package/src/components/Base/Text/Text.tsx +60 -0
  154. package/src/components/Base/Title/Title.stories.tsx +145 -0
  155. package/src/components/Base/Title/Title.tsx +77 -0
  156. package/src/components/Base/VideoPlayer/VideoPlayer.stories.tsx +60 -0
  157. package/src/components/Base/VideoPlayer/VideoPlayer.tsx +78 -0
  158. package/src/components/Base/index.tsx +9 -0
  159. package/src/components/Buttons/Button/Button.stories.tsx +158 -0
  160. package/src/components/Buttons/Button/Button.tsx +68 -0
  161. package/src/components/Buttons/CardButton/CardButton.stories.tsx +47 -0
  162. package/src/components/Buttons/CardButton/CardButton.tsx +25 -0
  163. package/src/components/Buttons/ClearButton/ClearButton.stories.tsx +26 -0
  164. package/src/components/Buttons/ClearButton/ClearButton.tsx +18 -0
  165. package/src/components/Buttons/FAQButton/FAQButton.stories.tsx +33 -0
  166. package/src/components/Buttons/FAQButton/FAQButton.tsx +27 -0
  167. package/src/components/Buttons/IllustratedCardButton/IllustratedCardButton.stories.tsx +71 -0
  168. package/src/components/Buttons/IllustratedCardButton/IllustratedCardButton.tsx +45 -0
  169. package/src/components/Buttons/SimpleIllustratedCardButton/SimpleIllustratedCardButton.stories.tsx +74 -0
  170. package/src/components/Buttons/SimpleIllustratedCardButton/SimpleIllustratedCardButton.tsx +43 -0
  171. package/src/components/Buttons/SocialButton/SocialButton.stories.tsx +56 -0
  172. package/src/components/Buttons/SocialButton/SocialButton.tsx +28 -0
  173. package/src/components/Buttons/Toggle/Toggle.tsx +64 -0
  174. package/src/components/Buttons/Toggle/Toogle.stories.tsx +66 -0
  175. package/src/components/Buttons/index.ts +10 -0
  176. package/src/components/Cards/CTACard/CTACard.stories.tsx +83 -0
  177. package/src/components/Cards/CTACard/CTACard.tsx +47 -0
  178. package/src/components/Cards/FeatureCard/FeatureCard.stories.tsx +96 -0
  179. package/src/components/Cards/FeatureCard/FeatureCard.tsx +50 -0
  180. package/src/components/Cards/FeatureIllustration/FeatureIllustration.stories.tsx +96 -0
  181. package/src/components/Cards/FeatureIllustration/FeatureIllustration.tsx +56 -0
  182. package/src/components/Cards/FeatureIllustration/index.ts +2 -0
  183. package/src/components/Cards/FoodCard/FoodCard.stories.tsx +43 -0
  184. package/src/components/Cards/FoodCard/FoodCard.tsx +37 -0
  185. package/src/components/Cards/FrequencySelectorCard/FrequencySelectorCard.stories.tsx +140 -0
  186. package/src/components/Cards/FrequencySelectorCard/FrequencySelectorCard.tsx +90 -0
  187. package/src/components/Cards/FrequencySelectorCard/index.ts +2 -0
  188. package/src/components/Cards/IllustratedCard/IllustratedCard.stories.tsx +54 -0
  189. package/src/components/Cards/IllustratedCard/IllustratedCard.tsx +44 -0
  190. package/src/components/Cards/PaymentCard/PaymentCard.stories.tsx +35 -0
  191. package/src/components/Cards/PaymentCard/PaymentCard.tsx +31 -0
  192. package/src/components/Cards/PlanCard/PlanCard.stories.tsx +140 -0
  193. package/src/components/Cards/PlanCard/PlanCard.tsx +119 -0
  194. package/src/components/Cards/Polaroid/Polaroid.stories.tsx +118 -0
  195. package/src/components/Cards/Polaroid/Polaroid.tsx +66 -0
  196. package/src/components/Cards/RecetteCard/RecetteCard.stories.tsx +86 -0
  197. package/src/components/Cards/RecetteCard/RecetteCard.tsx +47 -0
  198. package/src/components/Cards/StatCard/StatCard.stories.tsx +69 -0
  199. package/src/components/Cards/StatCard/StatCard.tsx +45 -0
  200. package/src/components/Cards/Testimonial/Testimonial.stories.tsx +65 -0
  201. package/src/components/Cards/Testimonial/Testimonial.tsx +62 -0
  202. package/src/components/Cards/TestimonialSlider/TestimonialSlider.stories.ts +53 -0
  203. package/src/components/Cards/TestimonialSlider/TestimonialSlider.tsx +50 -0
  204. package/src/components/Cards/Tips/Tips.stories.tsx +32 -0
  205. package/src/components/Cards/Tips/Tips.tsx +40 -0
  206. package/src/components/Cards/TransitionCard/TransitionCard.stories.tsx +50 -0
  207. package/src/components/Cards/TransitionCard/TransitionCard.tsx +66 -0
  208. package/src/components/Cards/UpCard/UpCard.stories.tsx +94 -0
  209. package/src/components/Cards/UpCard/UpCard.tsx +50 -0
  210. package/src/components/Cards/WizardTips/WizardTips.stories.tsx +48 -0
  211. package/src/components/Cards/WizardTips/WizardTips.tsx +33 -0
  212. package/src/components/Cards/index.ts +19 -0
  213. package/src/components/Inputs/ButtonSelect/ButtonSelect.stories.tsx +51 -0
  214. package/src/components/Inputs/ButtonSelect/ButtonSelect.tsx +34 -0
  215. package/src/components/Inputs/Checkbox/Checkbox.stories.tsx +47 -0
  216. package/src/components/Inputs/Checkbox/Checkbox.tsx +35 -0
  217. package/src/components/Inputs/Dropdown/Dropdown.stories.tsx +61 -0
  218. package/src/components/Inputs/Dropdown/Dropdown.tsx +108 -0
  219. package/src/components/Inputs/DropdownMenu/DropdownMenu.stories.tsx +75 -0
  220. package/src/components/Inputs/DropdownMenu/DropdownMenu.tsx +109 -0
  221. package/src/components/Inputs/ErrorMessage/ErrorMessage.stories.tsx +33 -0
  222. package/src/components/Inputs/ErrorMessage/ErrorMessage.tsx +18 -0
  223. package/src/components/Inputs/Filters/Filters.stories.tsx +54 -0
  224. package/src/components/Inputs/Filters/Filters.tsx +75 -0
  225. package/src/components/Inputs/Label/Label.stories.tsx +34 -0
  226. package/src/components/Inputs/Label/Label.tsx +16 -0
  227. package/src/components/Inputs/Newsletter/Newsletter.stories.tsx +67 -0
  228. package/src/components/Inputs/Newsletter/Newsletter.tsx +70 -0
  229. package/src/components/Inputs/QuantityInput/QuantityInput.stories.tsx +54 -0
  230. package/src/components/Inputs/QuantityInput/QuantityInput.tsx +46 -0
  231. package/src/components/Inputs/Tag/Tag.stories.tsx +33 -0
  232. package/src/components/Inputs/Tag/Tag.tsx +19 -0
  233. package/src/components/Inputs/TagSelect/TagSelect.stories.tsx +50 -0
  234. package/src/components/Inputs/TagSelect/TagSelect.tsx +48 -0
  235. package/src/components/Inputs/TextInput/TextInput.stories.tsx +40 -0
  236. package/src/components/Inputs/TextInput/TextInput.tsx +38 -0
  237. package/src/components/Inputs/WizardDropdown/WizardDropdown.stories.tsx +59 -0
  238. package/src/components/Inputs/WizardDropdown/WizardDropdown.tsx +93 -0
  239. package/src/components/Inputs/WizardTextInput/WizardTextInput.stories.tsx +40 -0
  240. package/src/components/Inputs/WizardTextInput/WizardTextInput.tsx +31 -0
  241. package/src/components/Inputs/index.ts +16 -0
  242. package/src/components/Navigation/Footer/Footer.stories.tsx +28 -0
  243. package/src/components/Navigation/Footer/Footer.tsx +130 -0
  244. package/src/components/Navigation/FooterTips/FooterTips.stories.tsx +22 -0
  245. package/src/components/Navigation/FooterTips/FooterTips.tsx +24 -0
  246. package/src/components/Navigation/MobileMenu/MobileMenu.stories.tsx +56 -0
  247. package/src/components/Navigation/MobileMenu/MobileMenu.tsx +45 -0
  248. package/src/components/Navigation/Navbar/Navbar.stories.tsx +128 -0
  249. package/src/components/Navigation/Navbar/Navbar.tsx +66 -0
  250. package/src/components/Navigation/NavbarDesktop/NavbarDesktop.stories.tsx +57 -0
  251. package/src/components/Navigation/NavbarDesktop/NavbarDesktop.tsx +48 -0
  252. package/src/components/Navigation/NavbarMobile/NavbarMobile.stories.tsx +59 -0
  253. package/src/components/Navigation/NavbarMobile/NavbarMobile.tsx +75 -0
  254. package/src/components/Navigation/Stepper/Stepper.stories.tsx +41 -0
  255. package/src/components/Navigation/Stepper/Stepper.tsx +19 -0
  256. package/src/components/Navigation/Tabs/Tabs.stories.tsx +120 -0
  257. package/src/components/Navigation/Tabs/Tabs.tsx +92 -0
  258. package/src/components/Navigation/WizardNavbar/WizardNavbar.stories.tsx +59 -0
  259. package/src/components/Navigation/WizardNavbar/WizardNavbar.tsx +83 -0
  260. package/src/components/Navigation/index.ts +11 -0
  261. package/src/components/SVG/Facebook.svg +3 -0
  262. package/src/components/SVG/Instagram.svg +5 -0
  263. package/src/components/SVG/Linkedin.svg +5 -0
  264. package/src/components/SVG/Tiktok.svg +7 -0
  265. package/src/components/SVG/arrow-plain.svg +3 -0
  266. package/src/components/SVG/arrow.svg +3 -0
  267. package/src/components/SVG/calendar.svg +4 -0
  268. package/src/components/SVG/check-circle.svg +5 -0
  269. package/src/components/SVG/check-rounded.svg +4 -0
  270. package/src/components/SVG/check.svg +3 -0
  271. package/src/components/SVG/cross-rounded.svg +3 -0
  272. package/src/components/SVG/cross.svg +4 -0
  273. package/src/components/SVG/dollar-rounded.svg +6 -0
  274. package/src/components/SVG/double-arrow.svg +3 -0
  275. package/src/components/SVG/filters.svg +8 -0
  276. package/src/components/SVG/hat-cook.svg +4 -0
  277. package/src/components/SVG/home-hero-shape-mobile.svg +3 -0
  278. package/src/components/SVG/home-hero-shape-small.svg +3 -0
  279. package/src/components/SVG/home-hero-shape.svg +3 -0
  280. package/src/components/SVG/index.ts +75 -0
  281. package/src/components/SVG/info.svg +3 -0
  282. package/src/components/SVG/magic-wand.svg +9 -0
  283. package/src/components/SVG/menu.svg +5 -0
  284. package/src/components/SVG/minus.svg +3 -0
  285. package/src/components/SVG/mute.svg +4 -0
  286. package/src/components/SVG/pause.svg +3 -0
  287. package/src/components/SVG/play.svg +3 -0
  288. package/src/components/SVG/plus.svg +4 -0
  289. package/src/components/SVG/polaroid-thread.svg +17 -0
  290. package/src/components/SVG/profil.svg +4 -0
  291. package/src/components/SVG/quote.svg +3 -0
  292. package/src/components/SVG/recipe-bg-shape.svg +3 -0
  293. package/src/components/SVG/star.svg +3 -0
  294. package/src/components/SVG/subtract.svg +3 -0
  295. package/src/components/SVG/trustpilot.svg +14 -0
  296. package/src/components/SVG/unmute.svg +5 -0
  297. package/src/components/index.ts +20 -0
  298. package/src/components/styles/Color/Color.stories.tsx +89 -0
  299. package/src/components/styles/Color/Color.tsx +47 -0
  300. package/src/components/styles/Icon/Icon.stories.tsx +103 -0
  301. package/src/components/styles/Icon/Icon.tsx +6 -0
  302. package/src/components/styles/Illustration/Illustration.stories.tsx +253 -0
  303. package/src/components/styles/Illustration/Illustration.tsx +45 -0
  304. package/src/components/styles/Typography/Typography.stories.tsx +37 -0
  305. package/src/components/styles/Typography/Typography.tsx +19 -0
  306. package/src/helpers/accordions.ts +39 -0
  307. package/src/helpers/clickoutside.ts +31 -0
  308. package/src/helpers/debounce.ts +10 -0
  309. package/src/helpers/index.ts +9 -0
  310. package/src/helpers/intersectionObserver.ts +101 -0
  311. package/src/helpers/keyboardControl.ts +58 -0
  312. package/src/helpers/responsive.ts +29 -0
  313. package/src/helpers/scroll.ts +16 -0
  314. package/src/index.ts +8 -0
  315. package/src/lib/i18n.ts +20 -0
  316. package/src/lib/locales/fr/design.json +42 -0
  317. package/src/styles/globals.css +205 -0
  318. package/src/types/svg.d.ts +8 -0
@@ -0,0 +1,145 @@
1
+ import React from 'react';
2
+
3
+ import type { Meta, StoryObj } from '@storybook/react-vite';
4
+
5
+ import { H1, H2, H3, H4, H5, H6, Title } from './Title';
6
+
7
+ const meta = {
8
+ title: 'Components/Base/Title',
9
+ component: Title,
10
+ tags: ['autodocs'],
11
+ parameters: {
12
+ layout: 'centered',
13
+ },
14
+ args: {
15
+ children: 'Heading',
16
+ },
17
+ argTypes: {
18
+ variant: {
19
+ control: 'select',
20
+ options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
21
+ description: 'Title html tag variant',
22
+ table: { defaultValue: { summary: 'h2' } },
23
+ },
24
+ size: {
25
+ control: 'select',
26
+ options: ['display-md', 'display-lg', 'display-xl', 'heading-md', 'heading-lg', 'heading-xl'],
27
+ description: 'Title size style variant',
28
+ table: { defaultValue: { summary: 'lg' } },
29
+ },
30
+ className: {
31
+ control: 'text',
32
+ description: 'Additional CSS classes',
33
+ },
34
+ },
35
+ globals: {
36
+ backgrounds: { value: 'light' },
37
+ },
38
+ } satisfies Meta<typeof Title>;
39
+
40
+ export default meta;
41
+
42
+ type Story = StoryObj<typeof meta>;
43
+
44
+ export const DisplayXL: Story = {
45
+ name: 'Display XL (H1)',
46
+ args: {
47
+ variant: 'h1',
48
+ size: 'display-xl',
49
+ },
50
+ };
51
+
52
+ export const DisplayLG: Story = {
53
+ name: 'Display LG (H2)',
54
+ args: {
55
+ variant: 'h2',
56
+ size: 'display-lg',
57
+ },
58
+ };
59
+
60
+ export const DisplayMD: Story = {
61
+ name: 'Display MD (H3)',
62
+ args: {
63
+ variant: 'h3',
64
+ size: 'display-md',
65
+ },
66
+ };
67
+
68
+ export const HeadingXL: Story = {
69
+ name: 'Heading XL (H4)',
70
+ args: {
71
+ variant: 'h4',
72
+ size: 'heading-xl',
73
+ },
74
+ };
75
+
76
+ export const HeadingLG: Story = {
77
+ name: 'Heading LG (H5)',
78
+ args: {
79
+ variant: 'h5',
80
+ size: 'heading-lg',
81
+ },
82
+ };
83
+
84
+ export const HeadingMD: Story = {
85
+ name: 'Heading MD (H6)',
86
+ args: {
87
+ variant: 'h6',
88
+ size: 'heading-md',
89
+ },
90
+ };
91
+ // Styleguide: display all variants
92
+ export const Styleguide: Story = {
93
+ argTypes: {
94
+ variant: { control: false, table: { disable: true } },
95
+ },
96
+
97
+ render: () => (
98
+ <div className="space-y-4">
99
+ <H1 size="display-xl">{'Display 01-XL'}</H1>
100
+ <H2 size="display-lg">{'Display 02-LG'}</H2>
101
+ <H3 size="display-md">{'Display 03-MD'}</H3>
102
+ <H4 size="heading-xl">{'Heading 01-XL'}</H4>
103
+ <H4 size="heading-xl" italic>
104
+ {'Heading 01-XL'}
105
+ </H4>
106
+ <H5 size="heading-lg">{'Heading 02-LG'}</H5>
107
+ <H5 size="heading-lg" italic>
108
+ {'Heading 02-LG'}
109
+ </H5>
110
+ <H6 size="heading-md">{'Heading 03-MD'}</H6>
111
+ <H6 size="heading-md" italic>
112
+ {'Heading 03-MD'}
113
+ </H6>
114
+ </div>
115
+ ),
116
+ };
117
+
118
+ export const StyleguideMobile: Story = {
119
+ argTypes: {
120
+ variant: { control: false, table: { disable: true } },
121
+ },
122
+ globals: {
123
+ viewport: { value: 'mobile', isRotated: false },
124
+ },
125
+
126
+ render: () => (
127
+ <div className="space-y-4">
128
+ <H1 size="display-xl">{'Display 01-XL'}</H1>
129
+ <H2 size="display-lg">{'Display 02-LG'}</H2>
130
+ <H3 size="display-md">{'Display 03-MD'}</H3>
131
+ <H4 size="heading-xl">{'Heading 01-XL'}</H4>
132
+ <H4 size="heading-xl" italic>
133
+ {'Heading 01-XL'}
134
+ </H4>
135
+ <H5 size="heading-lg">{'Heading 02-LG'}</H5>
136
+ <H5 size="heading-lg" italic>
137
+ {'Heading 02-LG'}
138
+ </H5>
139
+ <H6 size="heading-md">{'Heading 03-MD'}</H6>
140
+ <H6 size="heading-md" italic>
141
+ {'Heading 03-MD'}
142
+ </H6>
143
+ </div>
144
+ ),
145
+ };
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+
3
+ import React, { forwardRef } from 'react';
4
+
5
+ import clsx from 'clsx';
6
+ import { Trans } from 'react-i18next';
7
+
8
+ type TitleProps = {
9
+ variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
10
+ size?: 'display-md' | 'display-lg' | 'display-xl' | 'heading-md' | 'heading-lg' | 'heading-xl';
11
+ italic?: boolean;
12
+ children: React.ReactNode;
13
+ className?: string;
14
+ };
15
+
16
+ const sizeStyles = {
17
+ 'display-xl': 'font-pangaia text-display-xl-mobile md:text-display-lg xl:text-display-xl font-medium md:font-light leading-none md:leading-[0.9]',
18
+ 'display-lg': 'font-pangaia text-display-lg-mobile md:text-display-md xl:text-display-lg font-medium leading-none',
19
+ 'display-md': 'font-pangaia text-display-md-mobile md:text-heading-lg xl:text-display-md font-medium max-md:italic leading-none',
20
+ 'heading-xl': 'font-pangaia text-heading-xl-mobile md:text-heading-lg xl:text-heading-xl font-medium leading-none',
21
+ 'heading-lg': 'max-md:leading-[1.2] max-md:italic font-pangaia text-heading-lg-mobile md:text-heading-md xl:text-heading-lg font-semibold leading-[1.2] md:font-medium md:leading-none',
22
+ 'heading-md': 'md:font-pangaia text-heading-md-mobile md:text-heading-md font-regular xl:font-medium leading-[1.5] md:leading-none',
23
+ };
24
+
25
+ export const Title = forwardRef<HTMLElement, TitleProps>(({ variant = 'h1', size = 'display-lg', italic = false, children, className = '' }: TitleProps, ref) => {
26
+ const isString = typeof children === 'string';
27
+ const classes = clsx(
28
+ sizeStyles[size],
29
+ {
30
+ italic: italic && size === 'heading-xl',
31
+ 'max-md:font-mori max-md:normal font-medium italic max-md:leading-[1.5]': italic && size === 'heading-lg',
32
+ 'max-md:font-semibold md:leading-[1.2] md:italic': italic && (size === 'display-md' || size === 'heading-md'),
33
+ },
34
+ className,
35
+ );
36
+
37
+ const content = isString ? (
38
+ <Trans
39
+ i18nKey={children}
40
+ components={{
41
+ br: <br />,
42
+ b: <b />,
43
+ i: <i />,
44
+ highlight: <span className="text-lavender-blue-light italic" />,
45
+ }}
46
+ />
47
+ ) : (
48
+ children
49
+ );
50
+
51
+ return React.createElement(variant, { ref, className: classes }, content);
52
+ });
53
+ Title.displayName = 'Title';
54
+
55
+ export const H1 = forwardRef<HTMLHeadingElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="h1" ref={ref} {...props} />);
56
+ H1.displayName = 'H1';
57
+
58
+ export const H2 = forwardRef<HTMLHeadingElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="h2" ref={ref} {...props} />);
59
+ H2.displayName = 'H2';
60
+
61
+ export const H3 = forwardRef<HTMLHeadingElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="h3" ref={ref} {...props} />);
62
+ H3.displayName = 'H3';
63
+
64
+ export const H4 = forwardRef<HTMLHeadingElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="h4" ref={ref} {...props} />);
65
+ H4.displayName = 'H4';
66
+
67
+ export const H5 = forwardRef<HTMLHeadingElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="h5" ref={ref} {...props} />);
68
+ H5.displayName = 'H5';
69
+
70
+ export const H6 = forwardRef<HTMLHeadingElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="h6" ref={ref} {...props} />);
71
+ H6.displayName = 'H6';
72
+
73
+ export const SpanTitle = forwardRef<HTMLSpanElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="span" ref={ref} {...props} />);
74
+ SpanTitle.displayName = 'SpanTitle';
75
+
76
+ export const ParagraphTitle = forwardRef<HTMLParagraphElement, Omit<TitleProps, 'variant'>>((props, ref) => <Title variant="p" ref={ref} {...props} />);
77
+ ParagraphTitle.displayName = 'ParagraphTitle';
@@ -0,0 +1,60 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { VideoPlayer } from './VideoPlayer';
4
+
5
+ const meta = {
6
+ title: 'Components/Base/VideoPlayer',
7
+ component: VideoPlayer,
8
+ parameters: {
9
+ layout: 'padded',
10
+ },
11
+ tags: ['autodocs'],
12
+ argTypes: {
13
+ videoId: {
14
+ control: 'text',
15
+ description: 'The Vimeo ID of the video',
16
+ },
17
+ alt: {
18
+ control: 'text',
19
+ },
20
+ className: {
21
+ control: 'text',
22
+ description: 'Additional CSS classes for the component',
23
+ },
24
+ placeholderImageMobile: {
25
+ control: 'text',
26
+ description: 'The mobile placeholder image',
27
+ },
28
+ placeholderImageDesktop: {
29
+ control: 'text',
30
+ description: 'The desktop placeholder image',
31
+ },
32
+ placeholderImageMobile2x: {
33
+ control: 'text',
34
+ description: 'The mobile placeholder image (2x)',
35
+ },
36
+ placeholderImageDesktop2x: {
37
+ control: 'text',
38
+ description: 'The desktop placeholder image (2x)',
39
+ },
40
+ hasSound: {
41
+ control: 'boolean',
42
+ description: 'Whether the video has sound',
43
+ },
44
+ },
45
+ args: {
46
+ videoId: '1128149382',
47
+ alt: 'How it works video',
48
+ placeholderImageMobile: '/images/home-video-placeholder-mobile.webp',
49
+ placeholderImageDesktop: '/images/home-video-placeholder.webp',
50
+ placeholderImageMobile2x: '/images/home-video-placeholder-mobile@2x.webp',
51
+ placeholderImageDesktop2x: '/images/home-video-placeholder@2x.webp',
52
+ className: 'w-full md:w-200 aspect-video',
53
+ },
54
+ } satisfies Meta<typeof VideoPlayer>;
55
+
56
+ export default meta;
57
+
58
+ type Story = StoryObj<typeof meta>;
59
+
60
+ export const Default: Story = {};
@@ -0,0 +1,78 @@
1
+ 'use client';
2
+
3
+ import { useCallback, useRef, useState } from 'react';
4
+
5
+ import clsx from 'clsx';
6
+
7
+ import { MuteIcon, PauseIcon, PlayIcon, ResponsiveImage, UnmuteIcon } from '../../../components';
8
+ import { useIntersectionObserver } from '../../../helpers';
9
+
10
+ interface VideoPlayerProps {
11
+ videoId: string;
12
+ className?: string;
13
+ hasSound?: boolean;
14
+ }
15
+
16
+ export const VideoPlayer = ({ videoId, className, hasSound = true }: VideoPlayerProps) => {
17
+ const iframeRef = useRef<HTMLIFrameElement | null>(null);
18
+ const [isMuted, setIsMuted] = useState(true);
19
+ const [isPlaying, setIsPlaying] = useState(false);
20
+
21
+ const post = useCallback(
22
+ (method: string, value?: number) => {
23
+ iframeRef.current?.contentWindow?.postMessage(JSON.stringify({ method, value }), '*');
24
+ },
25
+ [iframeRef],
26
+ );
27
+
28
+ const onAppear = useCallback(() => {
29
+ post('play');
30
+ setIsPlaying(true);
31
+ }, [post]);
32
+
33
+ const onDisappear = useCallback(() => {
34
+ post('pause');
35
+ setIsPlaying(false);
36
+ }, [post]);
37
+
38
+ useIntersectionObserver({ ref: iframeRef as React.RefObject<HTMLIFrameElement>, onAppear, onDisappear });
39
+ const toggleMute = useCallback(() => {
40
+ if (isMuted) {
41
+ post('setVolume', 1);
42
+ } else {
43
+ post('setVolume', 0);
44
+ }
45
+ setIsMuted(!isMuted);
46
+ }, [post, isMuted]);
47
+
48
+ const togglePlay = useCallback(() => {
49
+ post(isPlaying ? 'pause' : 'play');
50
+ setIsPlaying(!isPlaying);
51
+ }, [post, isPlaying]);
52
+
53
+ const iconClass = 'text-beige-light z-10 w-10 opacity-0 transition-opacity duration-300 ease-in-out group-hover:opacity-100';
54
+
55
+ return (
56
+ <div className={clsx('border-claret-violet-dark rounded-input md:rounded-card relative z-0 col-span-full mb-7.5 flex aspect-video cursor-pointer items-center justify-center overflow-hidden border md:mb-15 xl:col-span-10 xl:col-start-2', className)}>
57
+ <iframe
58
+ ref={iframeRef}
59
+ src={`https://player.vimeo.com/video/${videoId}?h=b729df6122&badge=0&autoplay=1&muted=1&loop=1&background=1&title=0&byline=0&player_id=0&app_id=58479`}
60
+ className="absolute top-0 left-0 h-full w-full"
61
+ frameBorder="0"
62
+ allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
63
+ allowFullScreen
64
+ title="Vimeo player"
65
+ referrerPolicy="strict-origin-when-cross-origin"
66
+ />
67
+ <div onClick={togglePlay} onKeyDown={(e) => e.key === 'Enter' && togglePlay()} tabIndex={0} className="group absolute inset-0 z-10 flex items-center justify-center">
68
+ {isPlaying ? <PauseIcon className={iconClass} /> : <PlayIcon className={iconClass} />}
69
+ </div>
70
+
71
+ {hasSound && (
72
+ <button className="bg-beige-light text-claret-violet-dark hover:bg-beige-light/80 absolute right-4 bottom-4 z-10 cursor-pointer rounded-full p-1 transition-colors duration-300 md:p-2" onClick={toggleMute}>
73
+ {isMuted ? <MuteIcon className="w-4 md:w-6" /> : <UnmuteIcon className="w-4 md:w-6" />}
74
+ </button>
75
+ )}
76
+ </div>
77
+ );
78
+ };
@@ -0,0 +1,9 @@
1
+ import { Banner } from './Banner/Banner';
2
+ import { Emblem } from './Emblem/Emblem';
3
+ import { Logo } from './Logo/Logo';
4
+ import { ResponsiveImage } from './ResponsiveImage/ResponsiveImage';
5
+ import { Text } from './Text/Text';
6
+ import { H1, H2, H3, H4, H5, H6, ParagraphTitle, SpanTitle, Title } from './Title/Title';
7
+ import { VideoPlayer } from './VideoPlayer/VideoPlayer';
8
+
9
+ export { Emblem, ResponsiveImage, Title, H1, H2, H3, H4, H5, H6, SpanTitle, ParagraphTitle, Logo, Text, Banner, VideoPlayer };
@@ -0,0 +1,158 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { Button } from './Button';
4
+
5
+ const meta = {
6
+ title: 'Components/Buttons/Button',
7
+ component: Button,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ tags: ['autodocs'],
12
+ argTypes: {
13
+ as: {
14
+ control: 'radio',
15
+ options: ['button', 'a'],
16
+ description: 'HTML element to render (button or a)',
17
+ },
18
+ variant: {
19
+ control: 'select',
20
+ options: ['primary', 'secondary', 'terciary'],
21
+ description: 'Button variant',
22
+ },
23
+ color: {
24
+ control: 'select',
25
+ options: ['light', 'dark'],
26
+ description: 'Button style',
27
+ },
28
+ size: {
29
+ control: 'select',
30
+ options: ['sm', 'md'],
31
+ description: 'Button size',
32
+ },
33
+ className: {
34
+ control: 'text',
35
+ description: 'Additional CSS classes',
36
+ },
37
+ href: {
38
+ control: 'text',
39
+ description: 'Target URL (only for `as="a"`)',
40
+ if: { arg: 'as', eq: 'a' },
41
+ table: { category: 'Link' },
42
+ },
43
+ target: {
44
+ control: 'select',
45
+ options: ['_blank', '_self'],
46
+ description: 'Target of the link (only for `as="a"`)',
47
+ if: { arg: 'as', eq: 'a' },
48
+ table: { category: 'Link' },
49
+ },
50
+ rel: {
51
+ control: 'select',
52
+ options: ['noopener', 'noreferrer'],
53
+ description: 'Rel of the link (only for `as="a"`)',
54
+ if: { arg: 'as', eq: 'a' },
55
+ table: { category: 'Link' },
56
+ },
57
+ onClick: {
58
+ action: 'clicked',
59
+ description: 'Callback function (only for `as="button"`)',
60
+ if: { arg: 'as', eq: 'button' },
61
+ table: { category: 'Button' },
62
+ },
63
+ type: {
64
+ control: 'select',
65
+ options: ['button', 'submit', 'reset'],
66
+ description: 'Type of the button (only for `as="button"`)',
67
+ if: { arg: 'as', eq: 'button' },
68
+ table: { category: 'Button' },
69
+ },
70
+ },
71
+ } satisfies Meta<typeof Button>;
72
+
73
+ export default meta;
74
+ type Story = StoryObj<typeof meta>;
75
+
76
+ export const Primary: Story = {
77
+ args: {
78
+ variant: 'primary',
79
+ color: 'dark',
80
+ children: 'Button',
81
+ as: 'button',
82
+ },
83
+ globals: {
84
+ backgrounds: {
85
+ value: 'light',
86
+ },
87
+ },
88
+ };
89
+
90
+ export const Secondary: Story = {
91
+ args: {
92
+ variant: 'secondary',
93
+ color: 'dark',
94
+ children: 'Button',
95
+ as: 'button',
96
+ },
97
+ globals: {
98
+ backgrounds: {
99
+ value: 'light',
100
+ },
101
+ },
102
+ };
103
+
104
+ export const Terciary: Story = {
105
+ args: {
106
+ variant: 'terciary',
107
+ color: 'dark',
108
+ children: 'Button',
109
+ as: 'button',
110
+ },
111
+ globals: {
112
+ backgrounds: {
113
+ value: 'light',
114
+ },
115
+ },
116
+ };
117
+
118
+ export const PrimaryLight: Story = {
119
+ args: {
120
+ variant: 'primary',
121
+ color: 'light',
122
+ children: 'Button',
123
+ as: 'button',
124
+ },
125
+ globals: {
126
+ backgrounds: {
127
+ value: 'dark',
128
+ },
129
+ },
130
+ };
131
+
132
+ export const SecondaryLight: Story = {
133
+ args: {
134
+ variant: 'secondary',
135
+ color: 'light',
136
+ children: 'Button',
137
+ as: 'button',
138
+ },
139
+ globals: {
140
+ backgrounds: {
141
+ value: 'dark',
142
+ },
143
+ },
144
+ };
145
+
146
+ export const TerciaryLight: Story = {
147
+ args: {
148
+ variant: 'terciary',
149
+ color: 'light',
150
+ children: 'Button',
151
+ as: 'button',
152
+ },
153
+ globals: {
154
+ backgrounds: {
155
+ value: 'dark',
156
+ },
157
+ },
158
+ };
@@ -0,0 +1,68 @@
1
+ import { memo } from 'react';
2
+
3
+ import clsx from 'clsx';
4
+
5
+ type CommonProps = {
6
+ variant?: 'primary' | 'secondary' | 'terciary';
7
+ color?: 'light' | 'dark';
8
+ size?: 'sm' | 'md';
9
+ children: React.ReactNode;
10
+ disabled?: boolean;
11
+ className?: string;
12
+ active?: boolean;
13
+ };
14
+
15
+ type ButtonAsButtonProps = CommonProps &
16
+ React.ButtonHTMLAttributes<HTMLButtonElement> & {
17
+ as?: 'button';
18
+ };
19
+
20
+ type ButtonAsLinkProps = CommonProps &
21
+ React.AnchorHTMLAttributes<HTMLAnchorElement> & {
22
+ as: 'a';
23
+ href: string;
24
+ };
25
+
26
+ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
27
+
28
+ const ButtonComponent = ({ as = 'button', variant = 'primary', color = 'light', active = false, children, disabled = false, className = '', size = 'md', ...props }: ButtonProps) => {
29
+ const containedVariants = variant === 'primary' || variant === 'secondary';
30
+
31
+ // prettier-ignore
32
+ const classes = clsx(
33
+ 'text-button-mobile md:text-button font-semibold cursor-pointer transition-all duration-300 disabled:cursor-not-allowed disabled:opacity-30 w-fit',
34
+ {
35
+ 'inline-flex min-w-18 md:min-w-26.5 px-6 md:px-8 flex items-center justify-center rounded-full border': containedVariants,
36
+ 'relative leading-none flex items-center p-2.5 pe-7.5 hover:pe-2.5 hover:ps-7.5': variant === 'terciary',
37
+ 'before:content-[""] before:inline-flex before:absolute before:left-2.5 before:w-2.75 before:h-2.75 before:rounded-full before:opacity-0 before:transition-opacity hover:before:opacity-100 before:duration-200': variant === 'terciary',
38
+ 'before:opacity-100 ps-7.5 pe-2.5': variant === 'terciary' && active,
39
+ 'bg-claret-violet-dark hover:bg-claret-violet-light text-beige-light border-claret-violet-dark hover:border-claret-violet-light': variant === 'primary' && color === 'dark',
40
+ 'bg-beige-light text-claret-violet-dark hover:bg-beige-dark border-beige-light hover:border-beige-dark': variant === 'primary' && color === 'light',
41
+ 'bg-beige-light text-claret-violet-dark hover:bg-beige-dark border-claret-violet-dark': variant === 'secondary' && color === 'dark',
42
+ 'bg-claret-violet-dark text-beige-light hover:bg-claret-violet-light border-beige-light': variant === 'secondary' && color === 'light',
43
+ "h-8.5 md:h-10": size === 'sm' && containedVariants,
44
+ "h-10.5 md:h-13": size === 'md' && containedVariants,
45
+ 'text-claret-violet-dark before:bg-claret-violet-dark': variant === 'terciary' && color === 'dark',
46
+ 'text-beige-light before:bg-beige-light': variant === 'terciary' && color === 'light',
47
+ 'pointer-events-none': disabled,
48
+
49
+ },
50
+ className,
51
+ );
52
+
53
+ if (as === 'a') {
54
+ const { href, ...rest } = props as ButtonAsLinkProps;
55
+ return (
56
+ <a href={disabled ? undefined : href} {...rest} className={classes} aria-current={active} aria-disabled={disabled || undefined} tabIndex={disabled ? -1 : 0}>
57
+ {children}
58
+ </a>
59
+ );
60
+ }
61
+ return (
62
+ <button tabIndex={0} className={classes} {...(props as ButtonAsButtonProps)} disabled={disabled}>
63
+ {children}
64
+ </button>
65
+ );
66
+ };
67
+
68
+ export const Button = memo(ButtonComponent);
@@ -0,0 +1,47 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { CardButton } from './CardButton';
4
+
5
+ const meta = {
6
+ title: 'Components/Buttons/CardButton',
7
+ component: CardButton,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ disabled: {
14
+ control: 'boolean',
15
+ },
16
+ onClick: {
17
+ action: 'clicked',
18
+ },
19
+ description: {
20
+ control: 'text',
21
+ description: 'Description',
22
+ },
23
+ label: {
24
+ control: 'text',
25
+ description: 'Label',
26
+ },
27
+ className: {
28
+ control: 'text',
29
+ description: 'Additional class name',
30
+ },
31
+ },
32
+ args: {
33
+ label: 'Maigre',
34
+ description: "Ses côtes sont visibles à l'oeil nu",
35
+ },
36
+ globals: {
37
+ backgrounds: {
38
+ value: 'light',
39
+ },
40
+ },
41
+ } satisfies Meta<typeof CardButton>;
42
+
43
+ export default meta;
44
+
45
+ type Story = StoryObj<typeof meta>;
46
+
47
+ export const Default: Story = {};
@@ -0,0 +1,25 @@
1
+ import clsx from 'clsx';
2
+
3
+ export type CardButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
4
+ label: string;
5
+ description: string;
6
+ className?: string;
7
+ };
8
+
9
+ export const CardButton = ({ label, description, disabled, className = '', ...props }: CardButtonProps) => {
10
+ // prettier-ignore
11
+ const buttonClasses = clsx(
12
+ "relative flex flex-col w-32 md:w-51.25 aspect-32/25 md:aspect-41/30 px-2.5 py-4 md:px-5 md:py-6 items-center overflow-hidden rounded-input md:rounded-card bg-beige-dark text-claret-violet-dark transition-all duration-300 focus:outline-none cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50",
13
+ "after:absolute after:content-[''] after:border after:rounded-input md:after:rounded-card after:border-beige-ultra-dark after:inset-0 after:z-0 hover:after:border-claret-violet-dark after:transition-colors after:duration-300 focus-visible:after:border-claret-violet-dark",
14
+ className,
15
+ );
16
+
17
+ return (
18
+ <button className={buttonClasses} disabled={disabled} {...props} tabIndex={disabled ? -1 : 0}>
19
+ <span className="flex flex-col gap-2.5">
20
+ <span className="text-sm-mobile w-full font-semibold md:text-xl">{label}</span>
21
+ <span className="text-sm-mobile md:text-md w-full">{description}</span>
22
+ </span>
23
+ </button>
24
+ );
25
+ };