@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,50 @@
1
+ import React, { useState } from 'react';
2
+
3
+ import { Meta, StoryObj } from '@storybook/react-vite';
4
+
5
+ import { TagSelect } from './TagSelect';
6
+
7
+ const meta = {
8
+ title: 'Components/Inputs/TagSelect',
9
+ component: TagSelect,
10
+ tags: ['autodocs'],
11
+ parameters: {
12
+ layout: 'centered',
13
+ },
14
+ argTypes: {
15
+ onChange: { action: 'onChange' },
16
+ values: { control: 'object' },
17
+ required: { control: 'boolean' },
18
+ options: { control: 'object' },
19
+ label: { control: 'text' },
20
+ id: { control: 'text' },
21
+ placeholder: { control: 'text' },
22
+ className: { control: 'text', description: 'Additional class names' },
23
+ },
24
+ } satisfies Meta<typeof TagSelect>;
25
+
26
+ export default meta;
27
+
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ export const Default: Story = {
31
+ args: {
32
+ label: 'Sélectionnez une pathologie?',
33
+ id: 'tagSelect',
34
+ options: [
35
+ { label: 'Pathologie 1', value: 'pathologie1' },
36
+ { label: 'Pathologie 2', value: 'pathologie2' },
37
+ { label: 'Pathologie 3', value: 'pathologie3' },
38
+ ],
39
+ onChange: () => {},
40
+ values: [],
41
+ required: true,
42
+ placeholder: 'Pathologie',
43
+ className: 'w-80 md:w-100',
44
+ },
45
+ render: (arg) => {
46
+ const [values, setValues] = useState<string[]>([]);
47
+
48
+ return <TagSelect {...arg} values={values} onChange={(values) => setValues(values)} />;
49
+ },
50
+ };
@@ -0,0 +1,48 @@
1
+ 'use client';
2
+
3
+ import { useCallback, useMemo } from 'react';
4
+
5
+ import clsx from 'clsx';
6
+
7
+ import { Dropdown } from '../Dropdown/Dropdown';
8
+ import { Tag } from '../Tag/Tag';
9
+
10
+ export interface TagSelectProps {
11
+ label: string;
12
+ id: string;
13
+ options: { label: string; value: string }[];
14
+ onChange: (values: string[]) => void;
15
+ values: string[];
16
+ required: boolean;
17
+ placeholder: string;
18
+ className?: string;
19
+ }
20
+
21
+ export const TagSelect = ({ label, id, options, onChange, values, required, placeholder, className }: TagSelectProps) => {
22
+ const handleChange = useCallback(
23
+ (value: string) => {
24
+ onChange([...values, value]);
25
+ },
26
+ [onChange],
27
+ );
28
+
29
+ const handleClear = useCallback(
30
+ (value: string) => {
31
+ onChange(values.filter((v) => v != value));
32
+ },
33
+ [onChange],
34
+ );
35
+
36
+ const filteredOptions = useMemo(() => options.filter((option) => !values.includes(option.value)), [options, values]);
37
+
38
+ return (
39
+ <div className={clsx('w-full', className)}>
40
+ <Dropdown disabled={!filteredOptions.length} placeholder={placeholder} label={label} id={id} name={id} options={filteredOptions} onChange={handleChange} value={''} required={required} />
41
+ <div className="mt-1 flex flex-wrap gap-2">
42
+ {values.map((value) => (
43
+ <Tag key={value} label={options.find((option) => option.value === value)?.label ?? ''} value={value} onRemove={handleClear} />
44
+ ))}
45
+ </div>
46
+ </div>
47
+ );
48
+ };
@@ -0,0 +1,40 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { TextInput } from './TextInput';
4
+
5
+ const meta = {
6
+ title: 'Components/Inputs/TextInput',
7
+ component: TextInput,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ label: { control: 'text' },
14
+ placeholder: { control: 'text' },
15
+ id: { control: 'text' },
16
+ name: { control: 'text' },
17
+ disabled: { control: 'boolean' },
18
+ className: { control: 'text' },
19
+ },
20
+ globals: {
21
+ backgrounds: {
22
+ value: 'light',
23
+ },
24
+ },
25
+ } satisfies Meta<typeof TextInput>;
26
+
27
+ export default meta;
28
+
29
+ type Story = StoryObj<typeof meta>;
30
+
31
+ export const Default: Story = {
32
+ args: {
33
+ label: 'Name',
34
+ placeholder: 'Enter your name',
35
+ id: 'name',
36
+ name: 'name',
37
+ type: 'text',
38
+ className: 'w-80 md:w-100',
39
+ },
40
+ };
@@ -0,0 +1,38 @@
1
+ import clsx from 'clsx';
2
+
3
+ import { ErrorMessage } from '../ErrorMessage/ErrorMessage';
4
+ import { Label } from '../Label/Label';
5
+
6
+ export interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
7
+ label?: string;
8
+ placeholder: string;
9
+ id: string;
10
+ name: string;
11
+ type?: string;
12
+ disabled?: boolean;
13
+ hasError?: boolean;
14
+ error?: string;
15
+ required?: boolean;
16
+ className?: string;
17
+ }
18
+
19
+ export const TextInput = ({ label = '', placeholder, id, name, type = 'text', className, disabled, error = '', required = false, hasError = false, ...props }: TextInputProps) => {
20
+ // prettier-ignore
21
+ const containerClasses = clsx(
22
+ 'md:max-w-98',
23
+ className,
24
+ );
25
+
26
+ const inputClasses = clsx(
27
+ 'border-claret-violet-dark hover:border-claret-violet-dark/40 focus:border-claret-violet-dark/40 bg-beige-light rounded-input text-md placeholder:text-md block w-full border px-3 py-2.5 transition-all duration-300 placeholder:opacity-30 placeholder:transition-opacity placeholder:duration-300 focus:outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-40 disabled:placeholder:opacity-100',
28
+ hasError && 'border-red-error bg-red-error/10',
29
+ );
30
+
31
+ return (
32
+ <div className={containerClasses}>
33
+ {label.length > 0 && <Label label={label} id={id} required={required} />}
34
+ <input type={type} placeholder={placeholder} id={id} name={name} disabled={disabled} required={required} {...props} className={inputClasses} aria-invalid={hasError} aria-required={required} />
35
+ <ErrorMessage id={`${id}-error`} hasError={hasError} message={error} className={clsx('text-red-error mt-2 min-h-5 opacity-0 transition-opacity duration-300', hasError && 'opacity-100')} />
36
+ </div>
37
+ );
38
+ };
@@ -0,0 +1,59 @@
1
+ import React, { useState } from 'react';
2
+
3
+ import { Meta, StoryObj } from '@storybook/react-vite';
4
+
5
+ import { WizardDropdown } from './WizardDropdown';
6
+
7
+ const meta = {
8
+ title: 'Components/Inputs/WizardDropdown',
9
+ component: WizardDropdown,
10
+ tags: ['autodocs'],
11
+ parameters: {
12
+ layout: 'centered',
13
+ },
14
+ argTypes: {
15
+ placeholder: { control: 'text' },
16
+ className: { control: 'text', description: 'Additional CSS classes to add to the component' },
17
+ disabled: { control: 'boolean' },
18
+ options: { control: 'object' },
19
+ value: { control: 'text' },
20
+ name: { control: 'text' },
21
+ onChange: { action: 'onChange' },
22
+ searchable: { control: 'boolean' },
23
+ },
24
+ args: {
25
+ placeholder: '',
26
+ options: [],
27
+ value: '',
28
+ name: '',
29
+ onChange: () => {},
30
+ },
31
+ globals: {
32
+ backgrounds: {
33
+ value: 'light',
34
+ },
35
+ },
36
+ } satisfies Meta<typeof WizardDropdown>;
37
+
38
+ export default meta;
39
+
40
+ type Story = StoryObj<typeof meta>;
41
+
42
+ export const Default: Story = {
43
+ args: {
44
+ name: 'dropdown',
45
+ options: [
46
+ { label: 'une femelle', value: 'female' },
47
+ { label: 'un mâle', value: 'male' },
48
+ ],
49
+ onChange: () => {},
50
+ value: '',
51
+ placeholder: '',
52
+ className: 'max-md:w-80',
53
+ },
54
+ render: (arg) => {
55
+ const [value, setValue] = useState('');
56
+
57
+ return <WizardDropdown {...arg} onChange={(value) => setValue(value)} value={value} />;
58
+ },
59
+ };
@@ -0,0 +1,93 @@
1
+ 'use client';
2
+
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
+
5
+ import clsx from 'clsx';
6
+
7
+ import { ArrowPlainIcon, DropdownMenu, SpanTitle } from '../../../components';
8
+ import { useClickOutside } from '../../../helpers';
9
+
10
+ export interface WizardDropdownProps {
11
+ placeholder?: string;
12
+ options: { label: string; value: string }[];
13
+ value: string;
14
+ name: string;
15
+ onChange: (value: string) => void;
16
+ disabled?: boolean;
17
+ className?: string;
18
+ searchable?: boolean;
19
+ }
20
+
21
+ export const WizardDropdown = ({ placeholder = '', options, value, onChange, name, disabled = false, className, searchable = false }: WizardDropdownProps) => {
22
+ const [isOpen, setIsOpen] = useState(false);
23
+ const [searchValue, setSearchValue] = useState('');
24
+ const ref = useRef<HTMLDivElement>(null);
25
+
26
+ const selectedLabel = useMemo(() => options.find((option) => option.value === value)?.label, [options, value]);
27
+
28
+ const handleBlur = useCallback(() => {
29
+ setIsOpen(false);
30
+ if ((!value || searchValue !== selectedLabel) && searchable) {
31
+ setSearchValue('');
32
+ onChange('');
33
+ }
34
+ }, [value, onChange, selectedLabel, searchValue]);
35
+
36
+ useClickOutside(ref as React.RefObject<HTMLDivElement>, handleBlur);
37
+
38
+ const handleChange = useCallback(
39
+ (selection: string) => {
40
+ onChange(selection);
41
+ setIsOpen(false);
42
+ setSearchValue(options.find((option) => option.value === selection)?.label || '');
43
+ },
44
+ [onChange, options],
45
+ );
46
+
47
+ useEffect(() => {
48
+ if (!value && searchable) {
49
+ setSearchValue('');
50
+ }
51
+ }, [value, searchable]);
52
+
53
+ const inputClasses = clsx(
54
+ 'border-claret-violet-dark outline-claret-violet-dark flex min-h-19.25 w-full cursor-pointer items-center justify-between gap-4 border-b py-0.5 disabled:cursor-not-allowed disabled:opacity-40',
55
+ disabled && 'opacity-40',
56
+ (isOpen || value) && 'border-claret-violet-dark/50',
57
+ );
58
+
59
+ const filteredOptions = useMemo(() => (searchable ? options.filter((option) => option.label.toLowerCase().includes(searchValue.toLowerCase())) : options), [options, searchValue, searchable]);
60
+
61
+ return (
62
+ <div className={clsx('text-claret-violet-dark relative w-full md:w-max md:min-w-66', className)} ref={ref}>
63
+ <input type="hidden" name={name} value={value} />
64
+ {searchable ? (
65
+ <div className={clsx(inputClasses)}>
66
+ <input
67
+ type="text"
68
+ name="search"
69
+ disabled={disabled}
70
+ onFocus={() => setIsOpen(true)}
71
+ value={searchValue}
72
+ placeholder={placeholder}
73
+ onChange={(e) => setSearchValue(e.target.value)}
74
+ className="text-display-xl-mobile md:text-heading-lg font-pangaia w-full max-w-0 min-w-56 font-medium italic focus:outline-none"
75
+ />
76
+ <ArrowPlainIcon className={clsx('transition-duration-300 w-4.5 transition-transform will-change-transform md:w-6', isOpen && 'rotate-180')} />
77
+ </div>
78
+ ) : (
79
+ <button tabIndex={disabled ? -1 : 0} disabled={disabled} onClick={() => setIsOpen(!isOpen)} type="button" className={clsx(inputClasses)}>
80
+ <SpanTitle size="display-xl" className="block md:hidden">
81
+ {selectedLabel || placeholder}
82
+ </SpanTitle>
83
+ <SpanTitle size="heading-lg" className="hidden md:block">
84
+ {selectedLabel || placeholder}
85
+ </SpanTitle>
86
+ <ArrowPlainIcon className={clsx('transition-duration-300 w-4.5 transition-transform will-change-transform md:w-6', isOpen && 'rotate-180')} />
87
+ </button>
88
+ )}
89
+
90
+ <DropdownMenu name={name} options={filteredOptions} value={value} onChange={handleChange} disabled={disabled} className="absolute top-full left-0 mt-3" isOpen={isOpen} />
91
+ </div>
92
+ );
93
+ };
@@ -0,0 +1,40 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { WizardTextInput } from './WizardTextInput';
4
+
5
+ const meta = {
6
+ title: 'Components/Inputs/WizardTextInput',
7
+ component: WizardTextInput,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ argTypes: {
13
+ placeholder: { control: 'text' },
14
+ name: { control: 'text' },
15
+ disabled: { control: 'boolean' },
16
+ error: { control: 'text' },
17
+ hasError: { control: 'boolean' },
18
+ className: { control: 'text' },
19
+ },
20
+ globals: {
21
+ backgrounds: {
22
+ value: 'light',
23
+ },
24
+ },
25
+ } satisfies Meta<typeof WizardTextInput>;
26
+
27
+ export default meta;
28
+
29
+ type Story = StoryObj<typeof meta>;
30
+
31
+ export const Default: Story = {
32
+ args: {
33
+ placeholder: 'Nom',
34
+ name: 'name',
35
+ disabled: false,
36
+ error: '',
37
+ hasError: false,
38
+ className: 'w-80 md:w-100',
39
+ },
40
+ };
@@ -0,0 +1,31 @@
1
+ import clsx from 'clsx';
2
+
3
+ import { ErrorMessage } from '../ErrorMessage/ErrorMessage';
4
+
5
+ export interface WizardTextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
6
+ placeholder: string;
7
+ name: string;
8
+ disabled: boolean;
9
+ error: string;
10
+ hasError: boolean;
11
+ className?: string;
12
+ }
13
+
14
+ export const WizardTextInput = ({ placeholder, name, disabled, className, hasError, error, ...props }: WizardTextInputProps) => {
15
+ return (
16
+ <div className={className}>
17
+ <input
18
+ type="text"
19
+ placeholder={placeholder}
20
+ name={name}
21
+ disabled={disabled}
22
+ className={clsx(
23
+ 'font-pangaia text-display-md-mobile md:text-display-md outline-claret-violet-dark placeholder:text-claret-violet-dark/20 font-medium transition-opacity duration-300 focus:outline-none focus-visible:outline-2 disabled:opacity-40 disabled:placeholder:opacity-100 max-md:italic',
24
+ className,
25
+ )}
26
+ {...props}
27
+ />
28
+ <ErrorMessage id={`${name}-error`} hasError={hasError} message={error} />
29
+ </div>
30
+ );
31
+ };
@@ -0,0 +1,16 @@
1
+ import { ButtonSelect } from './ButtonSelect/ButtonSelect';
2
+ import { Checkbox } from './Checkbox/Checkbox';
3
+ import { Dropdown } from './Dropdown/Dropdown';
4
+ import { DropdownMenu } from './DropdownMenu/DropdownMenu';
5
+ import { ErrorMessage } from './ErrorMessage/ErrorMessage';
6
+ import { Filters } from './Filters/Filters';
7
+ import { Label } from './Label/Label';
8
+ import { Newsletter } from './Newsletter/Newsletter';
9
+ import { QuantityInput } from './QuantityInput/QuantityInput';
10
+ import { Tag } from './Tag/Tag';
11
+ import { TagSelect } from './TagSelect/TagSelect';
12
+ import { TextInput } from './TextInput/TextInput';
13
+ import { WizardDropdown } from './WizardDropdown/WizardDropdown';
14
+ import { WizardTextInput } from './WizardTextInput/WizardTextInput';
15
+
16
+ export { Label, ErrorMessage, DropdownMenu, TextInput, Dropdown, WizardDropdown, Newsletter, QuantityInput, Checkbox, ButtonSelect, Filters, TagSelect, Tag, WizardTextInput };
@@ -0,0 +1,28 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { Footer } from './Footer';
4
+
5
+ const meta = {
6
+ title: 'Components/Navigation/Footer',
7
+ component: Footer,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ },
12
+ argTypes: {
13
+ className: {
14
+ control: 'text',
15
+ description: 'Additional CSS classes.',
16
+ },
17
+ },
18
+ globals: {
19
+ backgrounds: {
20
+ value: 'light',
21
+ },
22
+ },
23
+ } satisfies Meta<typeof Footer>;
24
+
25
+ export default meta;
26
+ type Story = StoryObj<typeof meta>;
27
+
28
+ export const Default: Story = {};
@@ -0,0 +1,130 @@
1
+ 'use client';
2
+
3
+ import clsx from 'clsx';
4
+ import { useTranslation } from 'react-i18next';
5
+
6
+ import { Button, FooterTips, Logo, Newsletter, SocialButton, Text } from '../../../components';
7
+ import { SocialButtonProps } from '../../Buttons/SocialButton/SocialButton';
8
+
9
+ export type FooterProps = {
10
+ className?: string;
11
+ };
12
+
13
+ const socialLinks: SocialButtonProps['variant'][] = ['Facebook', 'Instagram', 'LinkedIn', 'Tiktok'];
14
+
15
+ export const Footer = ({ className }: FooterProps) => {
16
+ const { t } = useTranslation('design');
17
+
18
+ //todo update nav links and add newsletter logic
19
+ const linksColumns = [
20
+ {
21
+ links: [
22
+ { label: t('navigation.home'), href: '/' },
23
+ { label: t('navigation.ourStory'), href: '/notre-histoire' },
24
+ { label: t('navigation.whyElmut'), href: '/pourquoi-elmut' },
25
+ { label: t('navigation.faq'), href: 'https://elmuthelp.zendesk.com/hc/fr' },
26
+ ],
27
+ className: 'col-1',
28
+ name: 'elmut',
29
+ },
30
+ {
31
+ links: [
32
+ { label: t('navigation.dog'), href: '/chiens' },
33
+ { label: t('navigation.recipes'), href: '/recettes-chien' },
34
+ { label: t('navigation.blog'), href: '/blog/chiens' },
35
+ { label: t('navigation.homemadeRation'), href: '/ration-menagere-chien' },
36
+ ],
37
+ className: 'col-1 row-2 md:col-2 md:row-1',
38
+ name: 'doc',
39
+ },
40
+ {
41
+ links: [
42
+ { label: t('navigation.cat'), href: '/chats' },
43
+ { label: t('navigation.recipes'), href: '/recettes-chat' },
44
+ { label: t('navigation.blog'), href: '/blog/chats' },
45
+ { label: t('navigation.homemadeRation'), href: '/ration-menagere-chat' },
46
+ ],
47
+ className: 'col-2 row-2 md:col-3 md:row-1',
48
+ name: 'cat',
49
+ },
50
+ {
51
+ links: [
52
+ { label: t('navigation.contact'), href: 'https://elmuthelp.zendesk.com/hc/fr/requests/new' },
53
+ { label: t('navigation.signIn'), href: '/auth/sign-in' },
54
+ { label: t('navigation.sponsorship'), href: '/parrainage' },
55
+ { label: t('navigation.help'), href: '/aide' },
56
+ ],
57
+ className: 'col-2 md:col-4',
58
+ name: 'account',
59
+ },
60
+ ];
61
+
62
+ const legalLinks = [
63
+ {
64
+ label: t('navigation.legal'),
65
+ href: '/mentions-legales',
66
+ },
67
+ {
68
+ label: t('navigation.terms'),
69
+ href: '/cgv',
70
+ },
71
+ {
72
+ label: t('navigation.sitemap'),
73
+ href: '/plan-du-site',
74
+ },
75
+ ];
76
+
77
+ return (
78
+ <footer className={clsx('', className)}>
79
+ <div className={clsx('bg-lavender-blue-light py-10')}>
80
+ <div className="container mx-auto">
81
+ <Logo className="mb-9 w-25 md:w-51" />
82
+ <div className="flex items-stretch justify-between max-xl:gap-15 max-md:flex-col-reverse md:flex-col xl:flex-row">
83
+ <nav className="-ms-2.5 grid min-w-2/3 grid-cols-2 gap-y-15 md:grid-cols-5">
84
+ {linksColumns.map((column) => (
85
+ <ul key={column.name} className={clsx('grid grid-cols-subgrid gap-1 md:py-3', column.className)}>
86
+ {column.links.map((link) => (
87
+ <li key={link.href} className="w-max">
88
+ <Button variant="terciary" color="dark" href={link.href}>
89
+ {link.label}
90
+ </Button>
91
+ </li>
92
+ ))}
93
+ </ul>
94
+ ))}
95
+ <ul className="col-span-1 flex gap-3.5 md:flex-col md:gap-1 md:py-3">
96
+ {socialLinks.map((link) => (
97
+ <li key={link} className="flex h-11 items-center">
98
+ <SocialButton variant={link} labelVisible={true} />
99
+ </li>
100
+ ))}
101
+ </ul>
102
+ </nav>
103
+ <div className="flex flex-col justify-between gap-4 md:flex-row md:gap-6 xl:-mb-1.5 xl:w-1/3 xl:flex-col xl:gap-0">
104
+ <FooterTips className="md:w-1/2 xl:w-full" />
105
+ <Newsletter onSubscribe={() => {}} variant="footer" className="md:w-1/2 xl:w-full" />
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div className="bg-claret-violet-dark text-beige-light px-6 py-8 md:px-0 md:py-6.5">
111
+ <div className="container mx-auto flex justify-between max-md:flex-col max-md:gap-4 md:items-center">
112
+ <nav>
113
+ <ul className="-ms-2.5 flex gap-1 max-md:flex-col md:gap-10">
114
+ {legalLinks.map((link) => (
115
+ <li key={link.href}>
116
+ <Button variant="terciary" href={link.href}>
117
+ {link.label}
118
+ </Button>
119
+ </li>
120
+ ))}
121
+ </ul>
122
+ </nav>
123
+ <Text size="button">
124
+ {t('footer.copyright')} {new Date().getFullYear()}
125
+ </Text>
126
+ </div>
127
+ </div>
128
+ </footer>
129
+ );
130
+ };
@@ -0,0 +1,22 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { FooterTips } from './FooterTips';
4
+
5
+ const meta = {
6
+ title: 'Components/Navigation/FooterTips',
7
+ component: FooterTips,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ globals: {
13
+ background: {
14
+ value: 'lavender',
15
+ },
16
+ },
17
+ } satisfies Meta<typeof FooterTips>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Default: Story = {};
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+
3
+ import clsx from 'clsx';
4
+ import { useTranslation } from 'react-i18next';
5
+
6
+ import ClaudineImage from '../../../assets/images/tips/claudine-head.webp';
7
+ import { Text } from '../../../components';
8
+
9
+ export const FooterTips = ({ className }: { className?: string }) => {
10
+ const { t } = useTranslation('design');
11
+
12
+ return (
13
+ <div className={clsx('flex items-center gap-5', className)}>
14
+ <div className="bg-pink-oyster-light h-9 w-9 shrink-0 overflow-hidden rounded-full md:h-17 md:w-17">
15
+ <img src={ClaudineImage} alt={t('tips.claudineAlt')} loading="lazy" decoding="async" className="h-full w-full object-cover" />
16
+ </div>
17
+ <div className={clsx('text-claret-violet-dark')}>
18
+ <Text size="md" className="max-md:not-italic">
19
+ "&nbsp;{t('tips.footerMessage')}&nbsp;"
20
+ </Text>
21
+ </div>
22
+ </div>
23
+ );
24
+ };