@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,54 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { IllustratedCard } from './IllustratedCard';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/IllustratedCard',
7
+ component: IllustratedCard,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ variant: { control: 'select', options: ['primary', 'secondary', 'tertiary'] },
14
+ title: { control: 'text' },
15
+ description: { control: 'text' },
16
+ illustration: { control: 'text', description: 'Illustration asset name without the .webp extension' },
17
+ className: { control: 'text', description: 'Additional class names' },
18
+ illustrationClassName: { control: 'text', description: 'Additional class names for the illustration' },
19
+ },
20
+ } satisfies Meta<typeof IllustratedCard>;
21
+
22
+ export default meta;
23
+
24
+ type Story = StoryObj<typeof meta>;
25
+ export const Primary: Story = {
26
+ args: {
27
+ variant: 'primary',
28
+ title: '70% de viande de porc',
29
+ description: 'pour les carnivores oportunistes !',
30
+ illustration: '/illustrations/plate.webp',
31
+ className: 'max-md:w-67.5',
32
+ illustrationClassName: 'translate-y-4',
33
+ },
34
+ };
35
+
36
+ export const Secondary: Story = {
37
+ args: {
38
+ variant: 'secondary',
39
+ title: 'Adapté à tous les chiens',
40
+ description: 'à partir de 4 mois',
41
+ illustration: '/illustrations/dog.webp',
42
+ illustrationClassName: 'md:!scale-120',
43
+ },
44
+ };
45
+
46
+ export const Tertiary: Story = {
47
+ args: {
48
+ variant: 'tertiary',
49
+ title: 'Adapté à tous les chats',
50
+ description: 'à parir de 4 mois',
51
+ illustration: '/illustrations/cat.webp',
52
+ illustrationClassName: '-rotate-12 -translate-x-6 md:!scale-138 -mt-4',
53
+ },
54
+ };
@@ -0,0 +1,44 @@
1
+ import { forwardRef } from 'react';
2
+
3
+ import clsx from 'clsx';
4
+
5
+ import { ParagraphTitle, Text } from '../../../components';
6
+
7
+ export interface IllustratedCardProps {
8
+ variant?: 'primary' | 'secondary' | 'tertiary';
9
+ title: string;
10
+ description: string;
11
+ illustration: string;
12
+ className?: string;
13
+ illustrationClassName?: string;
14
+ value?: string;
15
+ }
16
+
17
+ const variantStyles = {
18
+ primary: 'bg-lavender-blue-light',
19
+ secondary: 'bg-pink-oyster-light',
20
+ tertiary: 'bg-beige-light',
21
+ };
22
+
23
+ export const IllustratedCard = forwardRef<HTMLDivElement, IllustratedCardProps>(({ variant = 'primary', title, description, illustration, className, illustrationClassName, value = '' }: IllustratedCardProps, ref) => {
24
+ return (
25
+ <div ref={ref} className={clsx('border-claret-violet-dark text-claret-violet-dark rounded-card flex w-full flex-col justify-between gap-2 overflow-hidden border pt-6 max-md:aspect-17/15 max-md:max-w-68 md:h-75 md:max-h-75 md:w-51.25 md:pt-8', variantStyles[variant], className)}>
26
+ <div key={`card-text-${value}`} className="flex animate-[fade-in_600ms_ease-in] flex-col items-center gap-3">
27
+ <Text size="xl" className="px-6 text-center">
28
+ {title}
29
+ </Text>
30
+ <ParagraphTitle size="heading-md" className="px-6 text-center md:hidden">
31
+ {description}
32
+ </ParagraphTitle>
33
+ <Text size="md" className="hidden px-6 text-center md:block">
34
+ {description}
35
+ </Text>
36
+ </div>
37
+ <div key={`card-img-${value}`} className="h-full max-h-3/4 w-full animate-[fade-in_600ms_ease-in] overflow-visible md:max-h-55/100">
38
+ <img src={illustration} alt={title} className={clsx('origin-top md:scale-132', illustrationClassName)} />
39
+ </div>
40
+ </div>
41
+ );
42
+ });
43
+
44
+ IllustratedCard.displayName = 'IllustratedCard';
@@ -0,0 +1,35 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { PaymentCard } from './PaymentCard';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/PaymentCard',
7
+ component: PaymentCard,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ content: {
14
+ control: 'text',
15
+ },
16
+ className: {
17
+ control: 'text',
18
+ description: 'Additional classes to apply to the component',
19
+ },
20
+ },
21
+ args: {
22
+ content: "Bonne nouvelle : x% de nos clients qui ont un poilu bien portant constate une perte de gras depuis qu'ils se nourrissent avec Elmut !",
23
+ className: 'w-full md:w-165.5',
24
+ },
25
+ globals: {
26
+ backgrounds: {
27
+ value: 'light',
28
+ },
29
+ },
30
+ } satisfies Meta<typeof PaymentCard>;
31
+
32
+ export default meta;
33
+
34
+ type Story = StoryObj<typeof meta>;
35
+ export const Default: Story = {};
@@ -0,0 +1,31 @@
1
+ import clsx from 'clsx';
2
+
3
+ import PaymentMobileImage from '../../../assets/images/tips/payment-mobile.webp';
4
+ import PaymentMobile2xImage from '../../../assets/images/tips/payment-mobile@2x.webp';
5
+ import PaymentImage from '../../../assets/images/tips/payment.webp';
6
+ import Payment2xImage from '../../../assets/images/tips/payment@2x.webp';
7
+ import { QuoteIcon, ResponsiveImage, Text } from '../../../components';
8
+
9
+ interface PaymentCardProps {
10
+ content: string;
11
+ className?: string;
12
+ }
13
+
14
+ export const PaymentCard = ({ content, className }: PaymentCardProps) => {
15
+ return (
16
+ <div className={clsx('rounded-input md:rounded-card bg-pink-oyster-light border-claret-violet-dark flex gap-3 border p-4 max-md:flex-row-reverse md:h-69 md:gap-10 md:p-6', className)}>
17
+ <div className="flex flex-col justify-between gap-4">
18
+ <QuoteIcon className="hidden w-8 md:block" />
19
+ <Text size="xl" className="hidden md:block">
20
+ {content}
21
+ </Text>
22
+ <Text size="lg" className="block not-italic md:hidden">
23
+ “{content}“
24
+ </Text>
25
+ </div>
26
+ <div className={clsx('md:rounded-card rounded-input relative h-10 w-10 shrink-0 overflow-hidden md:aspect-89/115 md:h-full md:w-auto')}>
27
+ <ResponsiveImage desktop={PaymentImage} mobile={PaymentMobileImage} mobile2x={PaymentMobile2xImage} desktop2x={Payment2xImage} alt="Client" className="absolute inset-0 object-cover" />
28
+ </div>
29
+ </div>
30
+ );
31
+ };
@@ -0,0 +1,140 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { PlanCard } from './PlanCard';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/PlanCard',
7
+ component: PlanCard,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'padded',
11
+ },
12
+ argTypes: {
13
+ title: {
14
+ control: 'text',
15
+ description: 'Plan title',
16
+ },
17
+ description: {
18
+ control: 'text',
19
+ description: 'Plan description',
20
+ },
21
+ dailyAmount: {
22
+ control: 'text',
23
+ description: 'Daily amount of food',
24
+ },
25
+ price: {
26
+ control: 'text',
27
+ description: 'Current price',
28
+ },
29
+ originalPrice: {
30
+ control: 'text',
31
+ description: 'Original price (crossed out)',
32
+ },
33
+ discountPercentage: {
34
+ control: 'text',
35
+ description: 'Discount percentage badge',
36
+ },
37
+ planImage: {
38
+ control: 'text',
39
+ description: 'URL of the plan image',
40
+ },
41
+ planImageAlt: {
42
+ control: 'text',
43
+ description: 'Alt text for the plan image',
44
+ },
45
+ pricePrefix: {
46
+ control: 'text',
47
+ description: 'Text before the price',
48
+ },
49
+ priceSuffix: {
50
+ control: 'text',
51
+ description: 'Text after the price',
52
+ },
53
+ originalPriceSuffix: {
54
+ control: 'text',
55
+ description: 'Text after the original price',
56
+ },
57
+ className: {
58
+ control: 'text',
59
+ description: 'Additional classes to apply to the component',
60
+ },
61
+ },
62
+ args: {
63
+ title: 'Formule complète',
64
+ description: "Uniquement du Elmut pour couvrir l'intégralité des besoins caloriques de Jackie la Fripouille, Shalvah, Max.",
65
+ dailyAmount: '300g/jour',
66
+ price: '2,69€',
67
+ originalPrice: '3,85€',
68
+ discountPercentage: '-30%',
69
+ planImage: '/images/trash/full-cat.png',
70
+ planImageAlt: 'Bol de nourriture pour chien',
71
+ pricePrefix: 'A partir de',
72
+ priceSuffix: '/jour',
73
+ originalPriceSuffix: '/jour',
74
+ },
75
+ globals: {
76
+ backgrounds: {
77
+ value: 'light',
78
+ },
79
+ },
80
+ } satisfies Meta<typeof PlanCard>;
81
+
82
+ export default meta;
83
+ type Story = StoryObj<typeof meta>;
84
+
85
+ export const Default: Story = {};
86
+
87
+ export const CompleteFormula: Story = {
88
+ args: {
89
+ title: 'Formule complète',
90
+ description: "Uniquement du Elmut pour couvrir l'intégralité des besoins caloriques de $prénom.",
91
+ dailyAmount: '300g/jour',
92
+ price: '2,69€',
93
+ originalPrice: '3,85€',
94
+ discountPercentage: '-30%',
95
+ },
96
+ };
97
+
98
+ export const HalfPension: Story = {
99
+ args: {
100
+ title: 'Demi pension',
101
+ description: 'Du Elmut pour couvrir 50% des besoins caloriques de votre animal, complété par vos croquettes habituelles.',
102
+ dailyAmount: '150g/jour',
103
+ price: '1,35€',
104
+ originalPrice: '1,93€',
105
+ discountPercentage: '-30%',
106
+ },
107
+ };
108
+
109
+ export const WithoutDiscount: Story = {
110
+ args: {
111
+ title: 'Formule standard',
112
+ description: 'Une formule équilibrée pour votre compagnon.',
113
+ dailyAmount: '250g/jour',
114
+ price: '3,20€',
115
+ originalPrice: undefined,
116
+ discountPercentage: undefined,
117
+ },
118
+ };
119
+
120
+ export const WithoutPetInfo: Story = {
121
+ args: {
122
+ title: 'Formule découverte',
123
+ description: 'Découvrez notre gamme de produits premium pour animaux.',
124
+ dailyAmount: undefined,
125
+ price: '2,99€',
126
+ originalPrice: '4,50€',
127
+ discountPercentage: '-34%',
128
+ },
129
+ };
130
+
131
+ export const LongDescription: Story = {
132
+ args: {
133
+ title: 'Formule premium',
134
+ description: 'Une formule complète et équilibrée, spécialement conçue pour répondre aux besoins nutritionnels spécifiques de votre animal. Nos ingrédients sont soigneusement sélectionnés pour garantir une alimentation saine et savoureuse.',
135
+ dailyAmount: '400g/jour',
136
+ price: '4,15€',
137
+ originalPrice: '5,99€',
138
+ discountPercentage: '-31%',
139
+ },
140
+ };
@@ -0,0 +1,119 @@
1
+ 'use client';
2
+
3
+ import React from 'react';
4
+
5
+ import clsx from 'clsx';
6
+
7
+ import { Text, Title, ResponsiveImage } from '../../Base';
8
+ import { HatCookIcon, SubtractIcon } from '../../../components';
9
+
10
+
11
+ export interface PlanCardProps {
12
+ title: string;
13
+ description: string;
14
+ dailyAmount?: string;
15
+ price: string;
16
+ originalPrice?: string;
17
+ discountPercentage?: string;
18
+ planImage: string;
19
+ planImageAlt?: string;
20
+ className?: string;
21
+ pricePrefix?: string;
22
+ priceSuffix?: string;
23
+ originalPriceSuffix?: string;
24
+ }
25
+
26
+ export const PlanCard = ({
27
+ title,
28
+ description,
29
+ dailyAmount,
30
+ price,
31
+ originalPrice,
32
+ discountPercentage,
33
+ planImage,
34
+ planImageAlt,
35
+ className = '',
36
+ pricePrefix = 'A partir de',
37
+ priceSuffix = '/jour',
38
+ originalPriceSuffix = '/jour',
39
+ }: PlanCardProps) => {
40
+ return (
41
+ <div className={clsx(
42
+ 'bg-beige-dark rounded-tr-2xl rounded-br-2xl rounded-bl-2xl border-2 border-beige-dark p-6 flex flex-col md:flex-row gap-6 relative overflow-visible',
43
+ className
44
+ )}>
45
+ {/* Product Image */}
46
+ <div className="flex-shrink-0 relative">
47
+ <div className="w-15 h-15 md:w-66 md:h-66 rounded-full overflow-hidden bg-gray-50 border-4 border-white shadow-lg transform md:-translate-x-16">
48
+ <ResponsiveImage
49
+ mobile={planImage}
50
+ desktop={planImage}
51
+ mobile2x={planImage}
52
+ desktop2x={planImage}
53
+ alt={planImageAlt || title}
54
+ className="w-full h-full object-cover"
55
+ />
56
+ </div>
57
+ </div>
58
+
59
+ {/* Content */}
60
+ <div className="flex-1 flex flex-col justify-center">
61
+ {/* Title */}
62
+ <Title variant="h2" size="heading-lg" className="text-claret-violet-dark mb-4">
63
+ {title}
64
+ </Title>
65
+
66
+ {/* Description */}
67
+ <Text size="lg" className="text-claret-violet-dark mb-6 leading-relaxed">
68
+ {description}
69
+ </Text>
70
+
71
+ {/* Pet Info */}
72
+ {dailyAmount ? (
73
+ <>
74
+ <div className="flex items-center gap-2 mb-4">
75
+ <div className="w-6">
76
+ <HatCookIcon />
77
+ </div>
78
+ <Text size="md" className="font-semibold text-claret-violet-dark">
79
+ {dailyAmount}
80
+ </Text>
81
+ </div>
82
+ <hr className="border-claret-violet-dark mb-6" />
83
+ </>
84
+ ): null}
85
+
86
+ {/* Pricing */}
87
+ <div className="flex items-center justify-between">
88
+ <div className="flex flex-col">
89
+ <Text size="sm" className="text-claret-violet-dark mb-1">
90
+ {pricePrefix}
91
+ </Text>
92
+ <div className="flex items-baseline gap-3">
93
+ <Text size="xl" className="font-bold text-claret-violet-dark">
94
+ {price}
95
+ <span className="text-sm font-normal ml-1">{priceSuffix}</span>
96
+ </Text>
97
+ {originalPrice && (
98
+ <Text size="md" className="text-claret-violet-dark line-through opacity-50">
99
+ {originalPrice}
100
+ <span className="text-sm ml-1">{originalPriceSuffix}</span>
101
+ </Text>
102
+ )}
103
+ </div>
104
+ </div>
105
+
106
+ {/* Discount Badge */}
107
+ {discountPercentage ? (
108
+ <div className="bg-lavender-blue-light text-claret-violet-dark px-3 py-2 rounded-lg flex items-center gap-1">
109
+ <SubtractIcon className="w-4 h-4" />
110
+ <Text size="sm" className="font-semibold">
111
+ {discountPercentage}
112
+ </Text>
113
+ </div>
114
+ ): null}
115
+ </div>
116
+ </div>
117
+ </div>
118
+ );
119
+ };
@@ -0,0 +1,118 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { Polaroid } from './Polaroid';
4
+
5
+ const meta = {
6
+ title: 'Components/Cards/Polaroid',
7
+ component: Polaroid,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ size: {
14
+ control: 'select',
15
+ options: ['sm', 'md', 'lg'],
16
+ },
17
+ variant: {
18
+ control: 'select',
19
+ options: ['primary', 'secondary', 'tertiary'],
20
+ },
21
+ title: {
22
+ control: 'text',
23
+ description: 'The title of the polaroid',
24
+ },
25
+ mobileImage: {
26
+ control: 'text',
27
+ description: 'The mobile image of the polaroid',
28
+ },
29
+ desktopImage: {
30
+ control: 'text',
31
+ description: 'The desktop image of the polaroid',
32
+ },
33
+ mobileImage2x: {
34
+ control: 'text',
35
+ description: 'The mobile image 2x of the polaroid',
36
+ },
37
+ desktopImage2x: {
38
+ control: 'text',
39
+ description: 'The desktop image 2x of the polaroid',
40
+ },
41
+ overflow: {
42
+ control: 'select',
43
+ options: ['hidden', 'visible'],
44
+ description: 'The overflow of the polaroid image',
45
+ },
46
+ showThread: {
47
+ control: 'boolean',
48
+ description: 'Whether to show the thread svg of the polaroid',
49
+ },
50
+ className: {
51
+ control: 'text',
52
+ description: 'Additional classes to apply to the component',
53
+ },
54
+ imageClassName: {
55
+ control: 'text',
56
+ description: 'Additional classes to apply to the image',
57
+ },
58
+ },
59
+ args: {
60
+ title: 'Prénom du chien',
61
+ overflow: 'hidden',
62
+ },
63
+ globals: {
64
+ backgrounds: {
65
+ value: 'lavender',
66
+ },
67
+ },
68
+ } satisfies Meta<typeof Polaroid>;
69
+
70
+ export default meta;
71
+
72
+ type Story = StoryObj<typeof meta>;
73
+
74
+ export const PrimarySmall: Story = {
75
+ args: {
76
+ size: 'sm',
77
+ variant: 'primary',
78
+ mobileImage: 'images/trash/dog-product-mobile.webp',
79
+ desktopImage: 'images/trash/dog-product.webp',
80
+ },
81
+ };
82
+
83
+ export const PrimaryMedium: Story = {
84
+ args: {
85
+ size: 'md',
86
+ variant: 'primary',
87
+ mobileImage: 'images/cat.webp',
88
+ desktopImage: 'images/cat.webp',
89
+ },
90
+ };
91
+
92
+ export const PrimaryLarge: Story = {
93
+ args: {
94
+ size: 'lg',
95
+ variant: 'primary',
96
+ mobileImage: 'images/cat.webp',
97
+ desktopImage: 'images/cat.webp',
98
+ },
99
+ };
100
+
101
+ export const SecondaryMedium: Story = {
102
+ args: {
103
+ size: 'md',
104
+ variant: 'secondary',
105
+ mobileImage: 'images/cat.webp',
106
+ desktopImage: 'images/cat.webp',
107
+ },
108
+ };
109
+
110
+ export const TertiaryMedium: Story = {
111
+ args: {
112
+ size: 'md',
113
+ variant: 'tertiary',
114
+ mobileImage: 'images/cat.webp',
115
+ desktopImage: 'images/cat.webp',
116
+ overflow: 'visible',
117
+ },
118
+ };
@@ -0,0 +1,66 @@
1
+ import clsx from 'clsx';
2
+
3
+ import { Emblem, PolaroidThreadIcon, ResponsiveImage } from '../../../components';
4
+
5
+ export interface PolaroidProps {
6
+ size: 'sm' | 'md' | 'lg';
7
+ variant?: 'neutral' | 'primary' | 'secondary' | 'tertiary';
8
+ title: string;
9
+ mobileImage: string;
10
+ desktopImage: string;
11
+ mobileImage2x?: string;
12
+ desktopImage2x?: string;
13
+ overflow?: 'hidden' | 'visible';
14
+ className?: string;
15
+ showThread?: boolean;
16
+ imageClassName?: string;
17
+ }
18
+
19
+ const variantStyles = {
20
+ primary: 'bg-claret-violet-dark',
21
+ secondary: 'bg-pink-oyster-light',
22
+ tertiary: 'bg-lavender-blue-light',
23
+ neutral: 'bg-beige-dark',
24
+ };
25
+
26
+ const sizeStyles = {
27
+ sm: 'w-30 h-36.5 px-2 pt-2 md:w-62 md:pb-3.5 md:pt-4.5 md:px-3.75 md:h-76 gap-0 md:gap-3.5',
28
+ md: 'w-53.5 md:w-111 h-65 md:h-135.5 px-3 pt-4 md:pt-8 md:px-6.5 md:pb-6 gap-1 md:gap-5',
29
+ lg: 'w-53.5 h-65 px-3 pt-4 gap-1 md:w-152 md:h-185 md:px-9 md:pt-11 md:pb-9.5 md:gap-7',
30
+ };
31
+
32
+ const imageStyles = {
33
+ sm: 'h-27 md:h-56',
34
+ md: 'h-48 md:h-99.5',
35
+ lg: 'h-48 md:h-136',
36
+ };
37
+
38
+ const titleStyles = {
39
+ sm: 'text-heading-lg-mobile max-md:opacity-0 max-md:h-0',
40
+ md: 'md-mobile md:text-display-md-mobile md:mt-2.5',
41
+ lg: 'md-mobile md:text-heading-md md:mt-2.5',
42
+ };
43
+
44
+ const svgStyles = {
45
+ sm: 'w-2.5 top-[-7px] left-[-5px] md:w-8 md:top-[-23px] md:left-[-21px]',
46
+ md: 'w-5 top-[-15px] left-[-11px] md:w-10 md:top-[-29px] md:left-[-21px]',
47
+ lg: 'w-5 top-[-15px] left-[-11px] md:w-13.5 md:top-[-39px] md:left-[-31px]',
48
+ };
49
+ const emblemStyles = {
50
+ sm: 'w-3.5 max-md:opacity-0 max-md:h-0',
51
+ md: 'w-2.5 md:w-5.5',
52
+ lg: 'w-2.5 md:w-7.5',
53
+ };
54
+
55
+ export const Polaroid = ({ size = 'sm', overflow = 'hidden', variant = 'neutral', title, mobileImage, desktopImage, mobileImage2x, desktopImage2x, showThread = true, className, imageClassName }: PolaroidProps) => {
56
+ return (
57
+ <div className={clsx('bg-beige-dark ext-claret-violet-dark relative flex flex-col items-center justify-start', sizeStyles[size], className)}>
58
+ {showThread && <PolaroidThreadIcon className={clsx('absolute z-10', svgStyles[size])} />}
59
+ <div className={clsx('bg-claret-violet-dark relative w-full', imageStyles[size], variantStyles[variant], overflow === 'hidden' && 'overflow-hidden', imageClassName)}>
60
+ <ResponsiveImage alt={title} mobile={mobileImage} desktop={desktopImage} mobile2x={mobileImage2x} desktop2x={desktopImage2x} className={clsx('absolute', overflow === 'hidden' ? 'inset-0 object-cover' : 'right-0 bottom-0 left-0 object-contain')} />
61
+ </div>
62
+ <p className={clsx('font-pangaia font-semibold italic', titleStyles[size])}>{title}</p>
63
+ <Emblem className={emblemStyles[size]} />
64
+ </div>
65
+ );
66
+ };