@myelmut/design-system 0.1.47 → 0.1.49

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 (313) hide show
  1. package/package.json +3 -2
  2. package/src/assets/fonts/PPMori-Regular.woff2 +0 -0
  3. package/src/assets/fonts/PPMori-RegularItalic.woff2 +0 -0
  4. package/src/assets/fonts/PPMori-SemiBold.woff2 +0 -0
  5. package/src/assets/fonts/PPPangaia-Medium.woff2 +0 -0
  6. package/src/assets/fonts/PPPangaia-MediumItalic.woff2 +0 -0
  7. package/src/assets/fonts/PPPangaia-Ultralight.woff2 +0 -0
  8. package/src/assets/illustrations/balls-light.webp +0 -0
  9. package/src/assets/illustrations/balls.webp +0 -0
  10. package/src/assets/illustrations/basket-light.webp +0 -0
  11. package/src/assets/illustrations/basket.webp +0 -0
  12. package/src/assets/illustrations/bowl-2-light.webp +0 -0
  13. package/src/assets/illustrations/bowl-2.webp +0 -0
  14. package/src/assets/illustrations/bowl-light.webp +0 -0
  15. package/src/assets/illustrations/bowl.webp +0 -0
  16. package/src/assets/illustrations/box-2-light.webp +0 -0
  17. package/src/assets/illustrations/box-2.webp +0 -0
  18. package/src/assets/illustrations/box-light.webp +0 -0
  19. package/src/assets/illustrations/box.webp +0 -0
  20. package/src/assets/illustrations/calendar-light.webp +0 -0
  21. package/src/assets/illustrations/calendar.webp +0 -0
  22. package/src/assets/illustrations/can-light.webp +0 -0
  23. package/src/assets/illustrations/can.webp +0 -0
  24. package/src/assets/illustrations/carrot-light.webp +0 -0
  25. package/src/assets/illustrations/carrot.webp +0 -0
  26. package/src/assets/illustrations/cat-light.webp +0 -0
  27. package/src/assets/illustrations/cat.webp +0 -0
  28. package/src/assets/illustrations/check-rounded.webp +0 -0
  29. package/src/assets/illustrations/chicken-light.webp +0 -0
  30. package/src/assets/illustrations/chicken.webp +0 -0
  31. package/src/assets/illustrations/cross-rounded.webp +0 -0
  32. package/src/assets/illustrations/crown-light.webp +0 -0
  33. package/src/assets/illustrations/crown.webp +0 -0
  34. package/src/assets/illustrations/dog-light.webp +0 -0
  35. package/src/assets/illustrations/dog.webp +0 -0
  36. package/src/assets/illustrations/face-light.webp +0 -0
  37. package/src/assets/illustrations/face.webp +0 -0
  38. package/src/assets/illustrations/food-bag-light.webp +0 -0
  39. package/src/assets/illustrations/food-bag.webp +0 -0
  40. package/src/assets/illustrations/france-light.webp +0 -0
  41. package/src/assets/illustrations/france.webp +0 -0
  42. package/src/assets/illustrations/fridge-light.webp +0 -0
  43. package/src/assets/illustrations/fridge.webp +0 -0
  44. package/src/assets/illustrations/glasses-light.webp +0 -0
  45. package/src/assets/illustrations/glasses.webp +0 -0
  46. package/src/assets/illustrations/half-label-light.webp +0 -0
  47. package/src/assets/illustrations/half-label.webp +0 -0
  48. package/src/assets/illustrations/kitten-light.webp +0 -0
  49. package/src/assets/illustrations/kitten.webp +0 -0
  50. package/src/assets/illustrations/label-light.webp +0 -0
  51. package/src/assets/illustrations/label.webp +0 -0
  52. package/src/assets/illustrations/leaf-light.webp +0 -0
  53. package/src/assets/illustrations/leaf.webp +0 -0
  54. package/src/assets/illustrations/liquid-light.webp +0 -0
  55. package/src/assets/illustrations/liquid.webp +0 -0
  56. package/src/assets/illustrations/magnifying-glass-light.webp +0 -0
  57. package/src/assets/illustrations/magnifying-glass.webp +0 -0
  58. package/src/assets/illustrations/meat-light.webp +0 -0
  59. package/src/assets/illustrations/meat.webp +0 -0
  60. package/src/assets/illustrations/molecule-light.webp +0 -0
  61. package/src/assets/illustrations/molecule.webp +0 -0
  62. package/src/assets/illustrations/paws-light.webp +0 -0
  63. package/src/assets/illustrations/paws.webp +0 -0
  64. package/src/assets/illustrations/plate-light.webp +0 -0
  65. package/src/assets/illustrations/plate.webp +0 -0
  66. package/src/assets/illustrations/pot-big-2-light.webp +0 -0
  67. package/src/assets/illustrations/pot-big-2.webp +0 -0
  68. package/src/assets/illustrations/pot-big-light.webp +0 -0
  69. package/src/assets/illustrations/pot-big.webp +0 -0
  70. package/src/assets/illustrations/pot-light.webp +0 -0
  71. package/src/assets/illustrations/pot.webp +0 -0
  72. package/src/assets/illustrations/puppy-light.webp +0 -0
  73. package/src/assets/illustrations/puppy.webp +0 -0
  74. package/src/assets/illustrations/quantity-light.webp +0 -0
  75. package/src/assets/illustrations/quantity.webp +0 -0
  76. package/src/assets/illustrations/sausage-light.webp +0 -0
  77. package/src/assets/illustrations/sausage.webp +0 -0
  78. package/src/assets/illustrations/sausages-light.webp +0 -0
  79. package/src/assets/illustrations/sausages.webp +0 -0
  80. package/src/assets/illustrations/skeleton-light.webp +0 -0
  81. package/src/assets/illustrations/skeleton.webp +0 -0
  82. package/src/assets/illustrations/sofa-light.webp +0 -0
  83. package/src/assets/illustrations/sofa.webp +0 -0
  84. package/src/assets/illustrations/sport-light.webp +0 -0
  85. package/src/assets/illustrations/sport.webp +0 -0
  86. package/src/assets/illustrations/steak-light.webp +0 -0
  87. package/src/assets/illustrations/steak.webp +0 -0
  88. package/src/assets/illustrations/truck-light.webp +0 -0
  89. package/src/assets/illustrations/truck.webp +0 -0
  90. package/src/assets/illustrations/warning-light.webp +0 -0
  91. package/src/assets/illustrations/warning.webp +0 -0
  92. package/src/assets/images/cat.webp +0 -0
  93. package/src/assets/images/dog.webp +0 -0
  94. package/src/assets/images/frequency/food-in-fridge.webp +0 -0
  95. package/src/assets/images/ingredients/beef.webp +0 -0
  96. package/src/assets/images/ingredients/beer-yeast.webp +0 -0
  97. package/src/assets/images/ingredients/calcium.webp +0 -0
  98. package/src/assets/images/ingredients/carrot.webp +0 -0
  99. package/src/assets/images/ingredients/chicken.webp +0 -0
  100. package/src/assets/images/ingredients/courgette.webp +0 -0
  101. package/src/assets/images/ingredients/dry-apple.webp +0 -0
  102. package/src/assets/images/ingredients/dry-carrot.webp +0 -0
  103. package/src/assets/images/ingredients/duck.webp +0 -0
  104. package/src/assets/images/ingredients/fish.webp +0 -0
  105. package/src/assets/images/ingredients/liquid.webp +0 -0
  106. package/src/assets/images/ingredients/oil.webp +0 -0
  107. package/src/assets/images/ingredients/pork.webp +0 -0
  108. package/src/assets/images/ingredients/potato.webp +0 -0
  109. package/src/assets/images/ingredients/quinoa.webp +0 -0
  110. package/src/assets/images/ingredients/rice.webp +0 -0
  111. package/src/assets/images/ingredients/seaweed.webp +0 -0
  112. package/src/assets/images/ingredients/turkey.webp +0 -0
  113. package/src/assets/images/ingredients/vitamins.webp +0 -0
  114. package/src/assets/images/tips/claudine-head.webp +0 -0
  115. package/src/assets/images/tips/claudine-tips-head-mobile.webp +0 -0
  116. package/src/assets/images/tips/claudine-tips-head-mobile@2x.webp +0 -0
  117. package/src/assets/images/tips/claudine-tips-head.webp +0 -0
  118. package/src/assets/images/tips/claudine-tips-head@2x.webp +0 -0
  119. package/src/assets/images/tips/claudine-tips-mobile.webp +0 -0
  120. package/src/assets/images/tips/claudine-tips-mobile@2x.webp +0 -0
  121. package/src/assets/images/tips/claudine-tips.webp +0 -0
  122. package/src/assets/images/tips/claudine-tips@2x.webp +0 -0
  123. package/src/assets/images/tips/payment-mobile.webp +0 -0
  124. package/src/assets/images/tips/payment-mobile@2x.webp +0 -0
  125. package/src/assets/images/tips/payment.webp +0 -0
  126. package/src/assets/images/tips/payment@2x.webp +0 -0
  127. package/src/assets/images/trash/dog-product-mobile.webp +0 -0
  128. package/src/assets/images/trash/dog-product.webp +0 -0
  129. package/src/assets/images/trash/full-cat.png +0 -0
  130. package/src/assets/images/trash/testimonial-1-mobile.webp +0 -0
  131. package/src/assets/images/trash/testimonial-1-mobile@2x.webp +0 -0
  132. package/src/assets/images/trash/testimonial-1.webp +0 -0
  133. package/src/assets/images/trash/testimonial-1@2x.webp +0 -0
  134. package/src/components/Accordions/FAQ/FaqItem.stories.tsx +61 -0
  135. package/src/components/Accordions/FAQ/FaqItem.tsx +55 -0
  136. package/src/components/Accordions/Ingredient/Ingredient.stories.tsx +38 -0
  137. package/src/components/Accordions/Ingredient/Ingredient.tsx +93 -0
  138. package/src/components/Accordions/index.tsx +4 -0
  139. package/src/components/Base/Banner/Banner.stories.tsx +33 -0
  140. package/src/components/Base/Banner/Banner.tsx +23 -0
  141. package/src/components/Base/Emblem/Emblem.stories.tsx +40 -0
  142. package/src/components/Base/Emblem/Emblem.tsx +22 -0
  143. package/src/components/Base/Logo/Logo.stories.tsx +46 -0
  144. package/src/components/Base/Logo/Logo.tsx +34 -0
  145. package/src/components/Base/ResponsiveImage/ResponsiveImage.stories.tsx +78 -0
  146. package/src/components/Base/ResponsiveImage/ResponsiveImage.tsx +56 -0
  147. package/src/components/Base/Text/Text.stories.tsx +115 -0
  148. package/src/components/Base/Text/Text.tsx +60 -0
  149. package/src/components/Base/Title/Title.stories.tsx +145 -0
  150. package/src/components/Base/Title/Title.tsx +77 -0
  151. package/src/components/Base/VideoPlayer/VideoPlayer.stories.tsx +60 -0
  152. package/src/components/Base/VideoPlayer/VideoPlayer.tsx +78 -0
  153. package/src/components/Base/index.tsx +9 -0
  154. package/src/components/Buttons/Button/Button.stories.tsx +158 -0
  155. package/src/components/Buttons/Button/Button.tsx +68 -0
  156. package/src/components/Buttons/CardButton/CardButton.stories.tsx +47 -0
  157. package/src/components/Buttons/CardButton/CardButton.tsx +25 -0
  158. package/src/components/Buttons/ClearButton/ClearButton.stories.tsx +26 -0
  159. package/src/components/Buttons/ClearButton/ClearButton.tsx +18 -0
  160. package/src/components/Buttons/FAQButton/FAQButton.stories.tsx +33 -0
  161. package/src/components/Buttons/FAQButton/FAQButton.tsx +27 -0
  162. package/src/components/Buttons/IllustratedCardButton/IllustratedCardButton.stories.tsx +71 -0
  163. package/src/components/Buttons/IllustratedCardButton/IllustratedCardButton.tsx +45 -0
  164. package/src/components/Buttons/SimpleIllustratedCardButton/SimpleIllustratedCardButton.stories.tsx +74 -0
  165. package/src/components/Buttons/SimpleIllustratedCardButton/SimpleIllustratedCardButton.tsx +43 -0
  166. package/src/components/Buttons/SocialButton/SocialButton.stories.tsx +56 -0
  167. package/src/components/Buttons/SocialButton/SocialButton.tsx +28 -0
  168. package/src/components/Buttons/Toggle/Toggle.tsx +64 -0
  169. package/src/components/Buttons/Toggle/Toogle.stories.tsx +66 -0
  170. package/src/components/Buttons/index.ts +10 -0
  171. package/src/components/Cards/CTACard/CTACard.stories.tsx +83 -0
  172. package/src/components/Cards/CTACard/CTACard.tsx +47 -0
  173. package/src/components/Cards/FeatureCard/FeatureCard.stories.tsx +96 -0
  174. package/src/components/Cards/FeatureCard/FeatureCard.tsx +50 -0
  175. package/src/components/Cards/FeatureIllustration/FeatureIllustration.stories.tsx +96 -0
  176. package/src/components/Cards/FeatureIllustration/FeatureIllustration.tsx +56 -0
  177. package/src/components/Cards/FeatureIllustration/index.ts +2 -0
  178. package/src/components/Cards/FoodCard/FoodCard.stories.tsx +43 -0
  179. package/src/components/Cards/FoodCard/FoodCard.tsx +37 -0
  180. package/src/components/Cards/FrequencySelectorCard/FrequencySelectorCard.stories.tsx +140 -0
  181. package/src/components/Cards/FrequencySelectorCard/FrequencySelectorCard.tsx +90 -0
  182. package/src/components/Cards/FrequencySelectorCard/index.ts +2 -0
  183. package/src/components/Cards/IllustratedCard/IllustratedCard.stories.tsx +54 -0
  184. package/src/components/Cards/IllustratedCard/IllustratedCard.tsx +44 -0
  185. package/src/components/Cards/PaymentCard/PaymentCard.stories.tsx +35 -0
  186. package/src/components/Cards/PaymentCard/PaymentCard.tsx +31 -0
  187. package/src/components/Cards/PlanCard/PlanCard.stories.tsx +140 -0
  188. package/src/components/Cards/PlanCard/PlanCard.tsx +119 -0
  189. package/src/components/Cards/Polaroid/Polaroid.stories.tsx +118 -0
  190. package/src/components/Cards/Polaroid/Polaroid.tsx +66 -0
  191. package/src/components/Cards/RecetteCard/RecetteCard.stories.tsx +86 -0
  192. package/src/components/Cards/RecetteCard/RecetteCard.tsx +47 -0
  193. package/src/components/Cards/StatCard/StatCard.stories.tsx +69 -0
  194. package/src/components/Cards/StatCard/StatCard.tsx +45 -0
  195. package/src/components/Cards/Testimonial/Testimonial.stories.tsx +65 -0
  196. package/src/components/Cards/Testimonial/Testimonial.tsx +62 -0
  197. package/src/components/Cards/TestimonialSlider/TestimonialSlider.stories.ts +53 -0
  198. package/src/components/Cards/TestimonialSlider/TestimonialSlider.tsx +50 -0
  199. package/src/components/Cards/Tips/Tips.stories.tsx +32 -0
  200. package/src/components/Cards/Tips/Tips.tsx +40 -0
  201. package/src/components/Cards/TransitionCard/TransitionCard.stories.tsx +50 -0
  202. package/src/components/Cards/TransitionCard/TransitionCard.tsx +66 -0
  203. package/src/components/Cards/UpCard/UpCard.stories.tsx +94 -0
  204. package/src/components/Cards/UpCard/UpCard.tsx +50 -0
  205. package/src/components/Cards/WizardTips/WizardTips.stories.tsx +48 -0
  206. package/src/components/Cards/WizardTips/WizardTips.tsx +33 -0
  207. package/src/components/Cards/index.ts +19 -0
  208. package/src/components/Inputs/ButtonSelect/ButtonSelect.stories.tsx +51 -0
  209. package/src/components/Inputs/ButtonSelect/ButtonSelect.tsx +34 -0
  210. package/src/components/Inputs/Checkbox/Checkbox.stories.tsx +47 -0
  211. package/src/components/Inputs/Checkbox/Checkbox.tsx +35 -0
  212. package/src/components/Inputs/Dropdown/Dropdown.stories.tsx +61 -0
  213. package/src/components/Inputs/Dropdown/Dropdown.tsx +108 -0
  214. package/src/components/Inputs/DropdownMenu/DropdownMenu.stories.tsx +75 -0
  215. package/src/components/Inputs/DropdownMenu/DropdownMenu.tsx +109 -0
  216. package/src/components/Inputs/ErrorMessage/ErrorMessage.stories.tsx +33 -0
  217. package/src/components/Inputs/ErrorMessage/ErrorMessage.tsx +18 -0
  218. package/src/components/Inputs/Filters/Filters.stories.tsx +54 -0
  219. package/src/components/Inputs/Filters/Filters.tsx +75 -0
  220. package/src/components/Inputs/Label/Label.stories.tsx +34 -0
  221. package/src/components/Inputs/Label/Label.tsx +16 -0
  222. package/src/components/Inputs/Newsletter/Newsletter.stories.tsx +67 -0
  223. package/src/components/Inputs/Newsletter/Newsletter.tsx +70 -0
  224. package/src/components/Inputs/QuantityInput/QuantityInput.stories.tsx +54 -0
  225. package/src/components/Inputs/QuantityInput/QuantityInput.tsx +46 -0
  226. package/src/components/Inputs/Tag/Tag.stories.tsx +33 -0
  227. package/src/components/Inputs/Tag/Tag.tsx +19 -0
  228. package/src/components/Inputs/TagSelect/TagSelect.stories.tsx +50 -0
  229. package/src/components/Inputs/TagSelect/TagSelect.tsx +48 -0
  230. package/src/components/Inputs/TextInput/TextInput.stories.tsx +40 -0
  231. package/src/components/Inputs/TextInput/TextInput.tsx +38 -0
  232. package/src/components/Inputs/WizardDropdown/WizardDropdown.stories.tsx +59 -0
  233. package/src/components/Inputs/WizardDropdown/WizardDropdown.tsx +93 -0
  234. package/src/components/Inputs/WizardTextInput/WizardTextInput.stories.tsx +40 -0
  235. package/src/components/Inputs/WizardTextInput/WizardTextInput.tsx +31 -0
  236. package/src/components/Inputs/index.ts +16 -0
  237. package/src/components/Navigation/Footer/Footer.stories.tsx +28 -0
  238. package/src/components/Navigation/Footer/Footer.tsx +130 -0
  239. package/src/components/Navigation/FooterTips/FooterTips.stories.tsx +22 -0
  240. package/src/components/Navigation/FooterTips/FooterTips.tsx +24 -0
  241. package/src/components/Navigation/MobileMenu/MobileMenu.stories.tsx +56 -0
  242. package/src/components/Navigation/MobileMenu/MobileMenu.tsx +45 -0
  243. package/src/components/Navigation/Navbar/Navbar.stories.tsx +128 -0
  244. package/src/components/Navigation/Navbar/Navbar.tsx +66 -0
  245. package/src/components/Navigation/NavbarDesktop/NavbarDesktop.stories.tsx +57 -0
  246. package/src/components/Navigation/NavbarDesktop/NavbarDesktop.tsx +48 -0
  247. package/src/components/Navigation/NavbarMobile/NavbarMobile.stories.tsx +59 -0
  248. package/src/components/Navigation/NavbarMobile/NavbarMobile.tsx +75 -0
  249. package/src/components/Navigation/Stepper/Stepper.stories.tsx +41 -0
  250. package/src/components/Navigation/Stepper/Stepper.tsx +19 -0
  251. package/src/components/Navigation/Tabs/Tabs.stories.tsx +120 -0
  252. package/src/components/Navigation/Tabs/Tabs.tsx +92 -0
  253. package/src/components/Navigation/WizardNavbar/WizardNavbar.stories.tsx +59 -0
  254. package/src/components/Navigation/WizardNavbar/WizardNavbar.tsx +83 -0
  255. package/src/components/Navigation/index.ts +11 -0
  256. package/src/components/SVG/Facebook.svg +3 -0
  257. package/src/components/SVG/Instagram.svg +5 -0
  258. package/src/components/SVG/Linkedin.svg +5 -0
  259. package/src/components/SVG/Tiktok.svg +7 -0
  260. package/src/components/SVG/arrow-plain.svg +3 -0
  261. package/src/components/SVG/arrow.svg +3 -0
  262. package/src/components/SVG/calendar.svg +4 -0
  263. package/src/components/SVG/check-circle.svg +5 -0
  264. package/src/components/SVG/check-rounded.svg +4 -0
  265. package/src/components/SVG/check.svg +3 -0
  266. package/src/components/SVG/cross-rounded.svg +3 -0
  267. package/src/components/SVG/cross.svg +4 -0
  268. package/src/components/SVG/dollar-rounded.svg +6 -0
  269. package/src/components/SVG/double-arrow.svg +3 -0
  270. package/src/components/SVG/filters.svg +8 -0
  271. package/src/components/SVG/hat-cook.svg +4 -0
  272. package/src/components/SVG/home-hero-shape-mobile.svg +3 -0
  273. package/src/components/SVG/home-hero-shape-small.svg +3 -0
  274. package/src/components/SVG/home-hero-shape.svg +3 -0
  275. package/src/components/SVG/index.ts +75 -0
  276. package/src/components/SVG/info.svg +3 -0
  277. package/src/components/SVG/magic-wand.svg +9 -0
  278. package/src/components/SVG/menu.svg +5 -0
  279. package/src/components/SVG/minus.svg +3 -0
  280. package/src/components/SVG/mute.svg +4 -0
  281. package/src/components/SVG/pause.svg +3 -0
  282. package/src/components/SVG/play.svg +3 -0
  283. package/src/components/SVG/plus.svg +4 -0
  284. package/src/components/SVG/polaroid-thread.svg +17 -0
  285. package/src/components/SVG/profil.svg +4 -0
  286. package/src/components/SVG/quote.svg +3 -0
  287. package/src/components/SVG/recipe-bg-shape.svg +3 -0
  288. package/src/components/SVG/star.svg +3 -0
  289. package/src/components/SVG/subtract.svg +3 -0
  290. package/src/components/SVG/trustpilot.svg +14 -0
  291. package/src/components/SVG/unmute.svg +5 -0
  292. package/src/components/index.ts +20 -0
  293. package/src/components/styles/Color/Color.stories.tsx +89 -0
  294. package/src/components/styles/Color/Color.tsx +47 -0
  295. package/src/components/styles/Icon/Icon.stories.tsx +103 -0
  296. package/src/components/styles/Icon/Icon.tsx +6 -0
  297. package/src/components/styles/Illustration/Illustration.stories.tsx +253 -0
  298. package/src/components/styles/Illustration/Illustration.tsx +45 -0
  299. package/src/components/styles/Typography/Typography.stories.tsx +37 -0
  300. package/src/components/styles/Typography/Typography.tsx +19 -0
  301. package/src/helpers/accordions.ts +39 -0
  302. package/src/helpers/clickoutside.ts +31 -0
  303. package/src/helpers/debounce.ts +10 -0
  304. package/src/helpers/index.ts +9 -0
  305. package/src/helpers/intersectionObserver.ts +101 -0
  306. package/src/helpers/keyboardControl.ts +58 -0
  307. package/src/helpers/responsive.ts +29 -0
  308. package/src/helpers/scroll.ts +16 -0
  309. package/src/index.ts +8 -0
  310. package/src/lib/i18n.ts +20 -0
  311. package/src/lib/locales/fr/design.json +42 -0
  312. package/src/styles/globals.css +205 -0
  313. package/src/types/svg.d.ts +8 -0
@@ -0,0 +1,47 @@
1
+ import clsx from 'clsx';
2
+
3
+ import { Button, ResponsiveImage, Text } from '../../../components';
4
+
5
+ export interface RecetteCardProps {
6
+ variant?: 'violet' | 'pink' | 'beige' | 'lavender';
7
+ title: string;
8
+ description: string;
9
+ imageMobile: string;
10
+ imageDesktop: string;
11
+ imageMobile2x?: string;
12
+ imageDesktop2x?: string;
13
+ className?: string;
14
+ href: string;
15
+ }
16
+
17
+ const variantStyles = {
18
+ violet: 'bg-claret-violet-dark text-beige-light ',
19
+ pink: 'bg-pink-oyster-light text-claret-violet-dark ',
20
+ beige: 'bg-beige-light text-claret-violet-dark',
21
+ lavender: 'bg-lavender-blue-light text-claret-violet-dark ',
22
+ };
23
+
24
+ export const RecetteCard = ({ className, variant = 'violet', title, description, imageMobile, imageDesktop, imageMobile2x, imageDesktop2x, href = '' }: RecetteCardProps) => {
25
+ return (
26
+ <div tabIndex={0} className={clsx('group rounded-card outline-claret-violet-dark relative flex aspect-20/23 w-50 cursor-default flex-col justify-end overflow-hidden transition-colors duration-300 md:aspect-125/174 md:w-62.5', className)}>
27
+ <div className={clsx('absolute inset-0 z-0 overflow-hidden')}>
28
+ <ResponsiveImage alt={title} mobile={imageMobile} desktop={imageDesktop} mobile2x={imageMobile2x} desktop2x={imageDesktop2x} className="h-full object-cover" />
29
+ </div>
30
+ <div
31
+ className={clsx(
32
+ 'z-1 flex flex-col gap-4 p-4 transition-all duration-300 ease-in-out lg:translate-y-[calc(100%-72px)] lg:items-center lg:gap-7 lg:px-3 lg:py-6 lg:group-focus-within:translate-y-[0] lg:group-focus-within:gap-4 lg:group-hover:translate-y-[0] lg:group-hover:gap-4 xl:px-6',
33
+ variantStyles[variant],
34
+ )}
35
+ >
36
+ <Text size="xl">{title}</Text>
37
+ <Text size="md" className="text-center max-lg:hidden">
38
+ {description}
39
+ </Text>
40
+
41
+ <Button as="a" href={href} size="sm" variant={variant === 'violet' ? 'primary' : 'secondary'} className="inline-block shrink-0">
42
+ Voir la recette
43
+ </Button>
44
+ </div>
45
+ </div>
46
+ );
47
+ };
@@ -0,0 +1,69 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { StatCard } from './StatCard';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/StatCard',
7
+ component: StatCard,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ variant: { control: 'select', options: ['primary', 'secondary', 'tertiary'] },
14
+ size: { control: 'select', options: ['small', 'large'] },
15
+ value: { control: 'text' },
16
+ metric: { control: 'text', description: 'Metric of the stat. % or fraction' },
17
+ description: { control: 'text' },
18
+ className: { control: 'text', description: 'Additional class names' },
19
+ },
20
+ globals: {
21
+ backgrounds: {
22
+ value: 'light',
23
+ },
24
+ },
25
+ } satisfies Meta<typeof StatCard>;
26
+
27
+ export default meta;
28
+
29
+ type Story = StoryObj<typeof meta>;
30
+ export const Primary: Story = {
31
+ args: {
32
+ variant: 'primary',
33
+ size: 'large',
34
+ value: '9',
35
+ metric: '/10',
36
+ description: 'Ça fait 8 ans que nous imaginons les meilleurs repas pour votre poilus !',
37
+ },
38
+ };
39
+
40
+ export const Secondary: Story = {
41
+ args: {
42
+ variant: 'secondary',
43
+ size: 'large',
44
+ value: '98',
45
+ metric: '%',
46
+ description: 'Ça fait 8 ans que nous imaginons les meilleurs repas pour votre poilus !',
47
+ },
48
+ };
49
+
50
+ export const Tertiary: Story = {
51
+ args: {
52
+ variant: 'tertiary',
53
+ size: 'large',
54
+ value: '65',
55
+ metric: '%',
56
+ description: 'Ça fait 8 ans que nous imaginons les meilleurs repas pour votre poilus !',
57
+ },
58
+ };
59
+
60
+ export const Small: Story = {
61
+ args: {
62
+ variant: 'tertiary',
63
+ size: 'small',
64
+ value: '98',
65
+ metric: '%',
66
+ description: 'sont plus excité de manger !',
67
+ className: 'max-md:w-32.5',
68
+ },
69
+ };
@@ -0,0 +1,45 @@
1
+ import clsx from 'clsx';
2
+
3
+ import { ParagraphTitle, SpanTitle, Text } from '../../../components';
4
+
5
+ export interface StatCardProps {
6
+ variant?: 'primary' | 'secondary' | 'tertiary';
7
+ size?: 'small' | 'large';
8
+ value: string;
9
+ metric: string;
10
+ description: string;
11
+ className?: string;
12
+ }
13
+
14
+ const variantStyles = {
15
+ primary: 'bg-lavender-blue-light',
16
+ secondary: 'bg-pink-oyster-light',
17
+ tertiary: 'bg-beige-light',
18
+ };
19
+
20
+ const sizeStyles = {
21
+ small: 'px-3 py-8.5 md:py-6 md:px-8 2xl:px-10 justify-center items-center text-center gap-1 md:gap-2 rounded-input w-full',
22
+ large: 'p-6 h-80 md:h-112.5 justify-between rounded-card w-60',
23
+ };
24
+
25
+ export const StatCard = ({ variant = 'primary', size = 'large', value, metric, description, className }: StatCardProps) => {
26
+ return (
27
+ <div className={clsx('border-claret-violet-dark flex flex-col border', variantStyles[variant], sizeStyles[size], className)}>
28
+ <p className="leading-none">
29
+ <SpanTitle size="display-xl" className="inline md:hidden">
30
+ {value}
31
+ </SpanTitle>
32
+ <SpanTitle size="display-lg" className="hidden md:inline">
33
+ {value}
34
+ </SpanTitle>
35
+ <SpanTitle size="display-md">{metric}</SpanTitle>
36
+ </p>
37
+ <Text size="md" className="hidden md:block">
38
+ {description}
39
+ </Text>
40
+ <ParagraphTitle size="heading-md" className="block md:hidden">
41
+ {description}
42
+ </ParagraphTitle>
43
+ </div>
44
+ );
45
+ };
@@ -0,0 +1,65 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { Testimonial } from './Testimonial';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/Testimonial',
7
+ component: Testimonial,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ variant: { control: 'select', options: ['primary', 'secondary'] },
14
+ quote: { control: 'text', description: 'Quote of the testimonial' },
15
+ author: { control: 'text', description: 'Author of the testimonial' },
16
+ role: { control: 'text', description: 'Role of the author' },
17
+ imageMobile: { control: 'text', description: 'Mobile image of the testimonial' },
18
+ imageDesktop: { control: 'text', description: 'Desktop image of the testimonial' },
19
+ imageMobile2x: { control: 'text', description: 'Mobile 2x image of the testimonial' },
20
+ imageDesktop2x: { control: 'text', description: 'Desktop 2x image of the testimonial' },
21
+ className: { control: 'text', description: 'Additional CSS classes' },
22
+ },
23
+ } satisfies Meta<typeof Testimonial>;
24
+
25
+ export default meta;
26
+
27
+ type Story = StoryObj<typeof meta>;
28
+
29
+ export const Primary: Story = {
30
+ args: {
31
+ variant: 'primary',
32
+ quote: 'Excellente nourriture. Valkiry valide les repas Elmut (et même le packaging). Les produits sont frais (se conservent au réfrigérateur)',
33
+ author: 'Lucie B.',
34
+ role: 'Papa de Valkiry',
35
+ imageMobile: '/images/trash/testimonial-1-mobile@2x.webp',
36
+ imageDesktop: '/images/trash/testimonial-1@2x.webp',
37
+ imageMobile2x: '/images/trash/testimonial-1-mobile@2x.webp',
38
+ imageDesktop2x: '/images/trash/testimonial-1@2x.webp',
39
+ className: 'md:w-[900px]',
40
+ },
41
+ globals: {
42
+ backgrounds: {
43
+ value: 'lavender',
44
+ },
45
+ },
46
+ };
47
+
48
+ export const Secondary: Story = {
49
+ args: {
50
+ variant: 'secondary',
51
+ quote: 'Excellente nourriture. Valkiry valide les repas Elmut (et même le packaging). Les produits sont frais (se conservent au réfrigérateur)',
52
+ author: 'Lucie B.',
53
+ role: 'Papa de Valkiry',
54
+ imageMobile: '/images/trash/testimonial-1-mobile@2x.webp',
55
+ imageDesktop: '/images/trash/testimonial-1@2x.webp',
56
+ imageMobile2x: '/images/trash/testimonial-1-mobile@2x.webp',
57
+ imageDesktop2x: '/images/trash/testimonial-1@2x.webp',
58
+ className: 'md:w-[744px]',
59
+ },
60
+ globals: {
61
+ backgrounds: {
62
+ value: 'light',
63
+ },
64
+ },
65
+ };
@@ -0,0 +1,62 @@
1
+ import { forwardRef } from 'react';
2
+
3
+ import clsx from 'clsx';
4
+
5
+ import { ParagraphTitle, QuoteIcon, ResponsiveImage, Text } from '../../../components';
6
+
7
+ export interface TestimonialProps {
8
+ variant: 'primary' | 'secondary';
9
+ quote: string;
10
+ author: string;
11
+ role: string;
12
+ imageMobile: string;
13
+ imageDesktop: string;
14
+ imageMobile2x?: string;
15
+ imageDesktop2x?: string;
16
+ className?: string;
17
+ }
18
+
19
+ const variantStyles = {
20
+ primary: 'bg-beige-light gap-6',
21
+ secondary: 'bg-pink-oyster-light gap-10',
22
+ };
23
+
24
+ const imagesStyles = {
25
+ primary: 'w-22/100',
26
+ secondary: 'w-36/100',
27
+ };
28
+
29
+ export const Testimonial = forwardRef<HTMLDivElement, TestimonialProps>(({ variant, quote, author, role, imageMobile, imageDesktop, imageMobile2x, imageDesktop2x, className }, ref) => {
30
+ return (
31
+ <div ref={ref} className={clsx('rounded-card border-claret-violet-dark text-claret-violet-dark flex w-full items-stretch border p-3 max-md:flex-col md:p-6', variantStyles[variant], className)}>
32
+ <blockquote className="flex flex-1 flex-col gap-3 md:gap-5">
33
+ <QuoteIcon className="w-3.5 md:mb-14.5 md:w-8" />
34
+ <ParagraphTitle size="heading-md" italic={true} className="hidden md:block">
35
+ {quote}
36
+ </ParagraphTitle>
37
+ <ParagraphTitle size="heading-lg" className="block md:hidden">
38
+ {quote}
39
+ </ParagraphTitle>
40
+ <footer className="flex max-md:items-center max-md:gap-3 md:flex-col">
41
+ <div className={clsx('block h-8 w-8 shrink-0 overflow-hidden rounded-sm md:hidden')}>
42
+ <ResponsiveImage desktop={imageDesktop} mobile={imageMobile} desktop2x={imageDesktop2x} mobile2x={imageMobile2x} alt={author} className="object-cover" />
43
+ </div>
44
+ <div>
45
+ <cite className="text-md-mobile md:text-md block leading-none lg:mb-2.5">{author}</cite>
46
+ <Text variant="span" size="md" className="!leading-none !not-italic md:hidden">
47
+ {role}
48
+ </Text>
49
+ <Text variant="span" size="legend" className="hidden !leading-none md:block">
50
+ {role}
51
+ </Text>
52
+ </div>
53
+ </footer>
54
+ </blockquote>
55
+ <div className={clsx('rounded-card relative hidden shrink-0 overflow-hidden md:block', imagesStyles[variant])}>
56
+ <ResponsiveImage desktop={imageDesktop} mobile={imageMobile} desktop2x={imageDesktop2x} mobile2x={imageMobile2x} alt={author} className="absolute inset-0 h-full object-cover" />
57
+ </div>
58
+ </div>
59
+ );
60
+ });
61
+
62
+ Testimonial.displayName = 'Testimonial';
@@ -0,0 +1,53 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { TestimonialSliderCard } from './TestimonialSlider';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/SliderTestimonial',
7
+ component: TestimonialSliderCard,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ variant: {
14
+ control: 'select',
15
+ options: ['dark', 'light'],
16
+ description: 'Variant of the component',
17
+ },
18
+ quote: {
19
+ control: 'text',
20
+ },
21
+ author: {
22
+ control: 'text',
23
+ },
24
+ role: {
25
+ control: 'text',
26
+ },
27
+ image: {
28
+ control: 'text',
29
+ },
30
+ score: {
31
+ control: 'number',
32
+ },
33
+ className: {
34
+ control: 'text',
35
+ description: 'Additional class names to be applied to the component',
36
+ },
37
+ },
38
+ args: {
39
+ variant: 'dark',
40
+ quote: 'Je recommande Elmut à mes clients qui recherchent une alternative fraîche et naturelle pour leurs chiens et chats',
41
+ author: 'John Doe',
42
+ role: 'Vétérinaire',
43
+ image: '/images/trash/testimonial-1-mobile.webp',
44
+ score: 5,
45
+ className: 'max-w-80',
46
+ },
47
+ } satisfies Meta<typeof TestimonialSliderCard>;
48
+
49
+ export default meta;
50
+
51
+ type Story = StoryObj<typeof meta>;
52
+
53
+ export const Default: Story = {};
@@ -0,0 +1,50 @@
1
+ import { forwardRef } from 'react';
2
+
3
+ import clsx from 'clsx';
4
+
5
+ import { ParagraphTitle, StarIcon, Text } from '../..';
6
+
7
+ interface TestimonialSliderCardProps {
8
+ variant?: 'dark' | 'light';
9
+ quote: string;
10
+ author: string;
11
+ role: string;
12
+ image: string;
13
+ score: number;
14
+ className?: string;
15
+ }
16
+
17
+ const variantStyles = {
18
+ dark: 'bg-claret-violet-light text-beige-light',
19
+ light: 'bg-beige-light text-claret-violet-light',
20
+ };
21
+
22
+ export const TestimonialSliderCard = forwardRef<HTMLQuoteElement, TestimonialSliderCardProps>(({ quote, author, role, image, score, className, variant = 'dark' }, ref) => {
23
+ return (
24
+ <blockquote ref={ref} className={clsx('border-beige-light rounded-card flex shrink-0 flex-col gap-5 border p-6 xl:w-full', className, variantStyles[variant])}>
25
+ <div className="flex items-center gap-0.5">
26
+ {Array.from({ length: score }).map((_, index) => (
27
+ <div key={index}>
28
+ <StarIcon className={clsx('w-5', variant === 'dark' ? 'text-lavender-blue-light' : 'text-claret-violet-light')} />
29
+ </div>
30
+ ))}
31
+ </div>
32
+ <ParagraphTitle size="heading-md" className="text-left md:hidden">
33
+ {quote}
34
+ </ParagraphTitle>
35
+ <Text size="md" className="hidden text-left md:block">
36
+ {quote}
37
+ </Text>
38
+ <footer className="flex items-center gap-2 md:gap-3">
39
+ <div className="h-8 w-8 overflow-hidden rounded-full md:h-11 md:w-11">
40
+ <img src={image} alt="Testimonial Card" width={44} height={44} className="h-full w-full object-cover" />
41
+ </div>
42
+ <div>
43
+ <cite className="text-lg-mobile md:text-md block text-left leading-none font-semibold not-italic md:mb-2.5">{author}</cite>
44
+ <p className="text-lg-mobile md:text-legend text-left leading-none md:italic">{role}</p>
45
+ </div>
46
+ </footer>
47
+ </blockquote>
48
+ );
49
+ });
50
+ TestimonialSliderCard.displayName = 'TestimonialCard';
@@ -0,0 +1,32 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { Tips } from './Tips';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/Tips',
7
+ component: Tips,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ content: { control: 'text', description: 'Tips content' },
14
+ className: { control: 'text' },
15
+ },
16
+ globals: {
17
+ backgrounds: {
18
+ value: 'light',
19
+ },
20
+ },
21
+ } satisfies Meta<typeof Tips>;
22
+
23
+ export default meta;
24
+
25
+ type Story = StoryObj<typeof meta>;
26
+
27
+ export const Default: Story = {
28
+ args: {
29
+ content: "Moi Claudine, j'aime quand mon père ajoute une petite goutte d'eau dans mon repas.",
30
+ className: '!w-[300px] md:!w-[1118px]',
31
+ },
32
+ };
@@ -0,0 +1,40 @@
1
+ import { forwardRef } from 'react';
2
+
3
+ import clsx from 'clsx';
4
+
5
+ import CrownImage from '../../../assets/illustrations/crown.webp';
6
+ import ClaudineTipsHeadMobileImage from '../../../assets/images/tips/claudine-tips-head-mobile.webp';
7
+ import ClaudineTipsHeadMobile2xImage from '../../../assets/images/tips/claudine-tips-head-mobile@2x.webp';
8
+ import ClaudineTipsHeadImage from '../../../assets/images/tips/claudine-tips-head.webp';
9
+ import ClaudineTipsHead2xImage from '../../../assets/images/tips/claudine-tips-head@2x.webp';
10
+ import { ParagraphTitle, ResponsiveImage, Text } from '../../../components';
11
+
12
+ export interface TipsProps {
13
+ content: string;
14
+ className?: string;
15
+ }
16
+
17
+ export const Tips = forwardRef<HTMLDivElement, TipsProps>(({ content, className }, ref) => {
18
+ return (
19
+ <div ref={ref} className={clsx('text-claret-violet-dark bg-lavender-blue-light rounded-card flex w-full items-stretch justify-center gap-4 max-md:ps-3.5 md:h-95 md:items-center md:gap-21.5', className)}>
20
+ <div className="relative flex w-26 shrink-0 items-end justify-center object-contain md:h-full md:w-88.5">
21
+ <img id="crown-illustration" src={CrownImage} alt="Crown illustration" className="absolute top-3 w-7 -translate-x-1/4 max-md:scale-x-[-1] md:top-6 md:w-23 md:translate-x-1/4" />
22
+ <ResponsiveImage mobile={ClaudineTipsHeadMobileImage} desktop={ClaudineTipsHeadImage} mobile2x={ClaudineTipsHeadMobile2xImage} desktop2x={ClaudineTipsHead2xImage} alt="Claudine" />
23
+ </div>
24
+ <div className="me-2.5 flex h-full flex-col justify-center gap-3 max-md:py-3.5 md:me-16 md:max-w-120">
25
+ <p className="font-md hidden font-semibold uppercase md:block">Les conseils de Claudine</p>
26
+ <Text size="sm" className="block md:hidden">
27
+ Les conseils de Claudine
28
+ </Text>
29
+ <ParagraphTitle size="heading-md" italic={true} className="hidden md:block">
30
+ "&nbsp;{content}&nbsp;"
31
+ </ParagraphTitle>
32
+ <ParagraphTitle size="heading-lg" className="block md:hidden">
33
+ "&nbsp;{content}&nbsp;"
34
+ </ParagraphTitle>
35
+ </div>
36
+ </div>
37
+ );
38
+ });
39
+
40
+ Tips.displayName = 'Tips';
@@ -0,0 +1,50 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { TransitionCard } from './TransitionCard';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/TransitionCard',
7
+ component: TransitionCard,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ id: { control: 'text' },
14
+ active: { control: 'boolean' },
15
+ className: { control: 'text' },
16
+ },
17
+ args: {
18
+ id: 'transition-card',
19
+ className: 'max-md:w-80',
20
+ },
21
+ globals: {
22
+ backgrounds: {
23
+ value: 'dark',
24
+ },
25
+ },
26
+ } satisfies Meta<typeof TransitionCard>;
27
+
28
+ export default meta;
29
+
30
+ type Story = StoryObj<typeof meta>;
31
+ export const Day1: Story = {
32
+ args: {
33
+ variant: '25%',
34
+ },
35
+ };
36
+ export const Day3: Story = {
37
+ args: {
38
+ variant: '50%',
39
+ },
40
+ };
41
+ export const Day5: Story = {
42
+ args: {
43
+ variant: '75%',
44
+ },
45
+ };
46
+ export const Day7: Story = {
47
+ args: {
48
+ variant: '100%',
49
+ },
50
+ };
@@ -0,0 +1,66 @@
1
+ import { Fragment } from 'react';
2
+
3
+ import clsx from 'clsx';
4
+
5
+ import { CheckIcon, ParagraphTitle, Text } from '../../../components';
6
+
7
+ export interface TransitionCardProps {
8
+ id: string;
9
+ variant: '25%' | '50%' | '75%' | '100%';
10
+ active?: boolean;
11
+ className?: string;
12
+ }
13
+
14
+ const variantsContent = {
15
+ '25%': {
16
+ title: 'Jour 1 & 2',
17
+ description: ['75% de l’ancienne alimentation', '25% de Elmut. '],
18
+ },
19
+ '50%': {
20
+ title: 'Jour 3 & 4',
21
+ description: ['50% de l’ancienne alimentation', '50% de Elmut. '],
22
+ },
23
+ '75%': {
24
+ title: 'Jour 5 & 6',
25
+ description: ['25% de l’ancienne alimentation', '75% de Elmut. '],
26
+ },
27
+ '100%': {
28
+ title: 'Jour 7 et +',
29
+ description: ['100% de Elmut. '],
30
+ },
31
+ };
32
+ export const TransitionCard = ({ id, variant = '25%', active, className }: TransitionCardProps) => {
33
+ const { title, description } = variantsContent[variant];
34
+
35
+ return (
36
+ <div
37
+ className={clsx(
38
+ 'bg-claret-violet-light text-beige-light rounded-card border-claret-violet-light flex h-86 w-full flex-col gap-3 border p-4 transition-all duration-300 max-md:items-center md:h-29 md:w-80 md:gap-4',
39
+ !active && 'text-beige-light/10 border-claret-violet-light border-dashed bg-transparent',
40
+ className,
41
+ )}
42
+ >
43
+ <div className="flex items-center gap-4 max-md:justify-center">
44
+ <div className={clsx('bg-beige-light/50 flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-opacity duration-300 max-md:hidden', !active && 'text-beige-light opacity-10')}>
45
+ <CheckIcon className="w-2" />
46
+ </div>
47
+ <ParagraphTitle size="heading-lg" italic={true} className="leading-none !not-italic md:hidden">
48
+ {title}
49
+ </ParagraphTitle>
50
+ <Text size="xl" className="hidden leading-none md:block">
51
+ {title}
52
+ </Text>
53
+ </div>
54
+ {description.map((item) => (
55
+ <Fragment key={`${id}-${item}`}>
56
+ <ParagraphTitle size="heading-md" className="leading-none md:hidden">
57
+ {item}
58
+ </ParagraphTitle>
59
+ <Text size="md" className="hidden leading-none md:block">
60
+ {item}
61
+ </Text>
62
+ </Fragment>
63
+ ))}
64
+ </div>
65
+ );
66
+ };