@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.
- package/package.json +3 -2
- package/src/assets/fonts/PPMori-Regular.woff2 +0 -0
- package/src/assets/fonts/PPMori-RegularItalic.woff2 +0 -0
- package/src/assets/fonts/PPMori-SemiBold.woff2 +0 -0
- package/src/assets/fonts/PPPangaia-Medium.woff2 +0 -0
- package/src/assets/fonts/PPPangaia-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/PPPangaia-Ultralight.woff2 +0 -0
- package/src/assets/illustrations/balls-light.webp +0 -0
- package/src/assets/illustrations/balls.webp +0 -0
- package/src/assets/illustrations/basket-light.webp +0 -0
- package/src/assets/illustrations/basket.webp +0 -0
- package/src/assets/illustrations/bowl-2-light.webp +0 -0
- package/src/assets/illustrations/bowl-2.webp +0 -0
- package/src/assets/illustrations/bowl-light.webp +0 -0
- package/src/assets/illustrations/bowl.webp +0 -0
- package/src/assets/illustrations/box-2-light.webp +0 -0
- package/src/assets/illustrations/box-2.webp +0 -0
- package/src/assets/illustrations/box-light.webp +0 -0
- package/src/assets/illustrations/box.webp +0 -0
- package/src/assets/illustrations/calendar-light.webp +0 -0
- package/src/assets/illustrations/calendar.webp +0 -0
- package/src/assets/illustrations/can-light.webp +0 -0
- package/src/assets/illustrations/can.webp +0 -0
- package/src/assets/illustrations/carrot-light.webp +0 -0
- package/src/assets/illustrations/carrot.webp +0 -0
- package/src/assets/illustrations/cat-light.webp +0 -0
- package/src/assets/illustrations/cat.webp +0 -0
- package/src/assets/illustrations/check-rounded.webp +0 -0
- package/src/assets/illustrations/chicken-light.webp +0 -0
- package/src/assets/illustrations/chicken.webp +0 -0
- package/src/assets/illustrations/cross-rounded.webp +0 -0
- package/src/assets/illustrations/crown-light.webp +0 -0
- package/src/assets/illustrations/crown.webp +0 -0
- package/src/assets/illustrations/dog-light.webp +0 -0
- package/src/assets/illustrations/dog.webp +0 -0
- package/src/assets/illustrations/face-light.webp +0 -0
- package/src/assets/illustrations/face.webp +0 -0
- package/src/assets/illustrations/food-bag-light.webp +0 -0
- package/src/assets/illustrations/food-bag.webp +0 -0
- package/src/assets/illustrations/france-light.webp +0 -0
- package/src/assets/illustrations/france.webp +0 -0
- package/src/assets/illustrations/fridge-light.webp +0 -0
- package/src/assets/illustrations/fridge.webp +0 -0
- package/src/assets/illustrations/glasses-light.webp +0 -0
- package/src/assets/illustrations/glasses.webp +0 -0
- package/src/assets/illustrations/half-label-light.webp +0 -0
- package/src/assets/illustrations/half-label.webp +0 -0
- package/src/assets/illustrations/kitten-light.webp +0 -0
- package/src/assets/illustrations/kitten.webp +0 -0
- package/src/assets/illustrations/label-light.webp +0 -0
- package/src/assets/illustrations/label.webp +0 -0
- package/src/assets/illustrations/leaf-light.webp +0 -0
- package/src/assets/illustrations/leaf.webp +0 -0
- package/src/assets/illustrations/liquid-light.webp +0 -0
- package/src/assets/illustrations/liquid.webp +0 -0
- package/src/assets/illustrations/magnifying-glass-light.webp +0 -0
- package/src/assets/illustrations/magnifying-glass.webp +0 -0
- package/src/assets/illustrations/meat-light.webp +0 -0
- package/src/assets/illustrations/meat.webp +0 -0
- package/src/assets/illustrations/molecule-light.webp +0 -0
- package/src/assets/illustrations/molecule.webp +0 -0
- package/src/assets/illustrations/paws-light.webp +0 -0
- package/src/assets/illustrations/paws.webp +0 -0
- package/src/assets/illustrations/plate-light.webp +0 -0
- package/src/assets/illustrations/plate.webp +0 -0
- package/src/assets/illustrations/pot-big-2-light.webp +0 -0
- package/src/assets/illustrations/pot-big-2.webp +0 -0
- package/src/assets/illustrations/pot-big-light.webp +0 -0
- package/src/assets/illustrations/pot-big.webp +0 -0
- package/src/assets/illustrations/pot-light.webp +0 -0
- package/src/assets/illustrations/pot.webp +0 -0
- package/src/assets/illustrations/puppy-light.webp +0 -0
- package/src/assets/illustrations/puppy.webp +0 -0
- package/src/assets/illustrations/quantity-light.webp +0 -0
- package/src/assets/illustrations/quantity.webp +0 -0
- package/src/assets/illustrations/sausage-light.webp +0 -0
- package/src/assets/illustrations/sausage.webp +0 -0
- package/src/assets/illustrations/sausages-light.webp +0 -0
- package/src/assets/illustrations/sausages.webp +0 -0
- package/src/assets/illustrations/skeleton-light.webp +0 -0
- package/src/assets/illustrations/skeleton.webp +0 -0
- package/src/assets/illustrations/sofa-light.webp +0 -0
- package/src/assets/illustrations/sofa.webp +0 -0
- package/src/assets/illustrations/sport-light.webp +0 -0
- package/src/assets/illustrations/sport.webp +0 -0
- package/src/assets/illustrations/steak-light.webp +0 -0
- package/src/assets/illustrations/steak.webp +0 -0
- package/src/assets/illustrations/truck-light.webp +0 -0
- package/src/assets/illustrations/truck.webp +0 -0
- package/src/assets/illustrations/warning-light.webp +0 -0
- package/src/assets/illustrations/warning.webp +0 -0
- package/src/assets/images/cat.webp +0 -0
- package/src/assets/images/dog.webp +0 -0
- package/src/assets/images/frequency/food-in-fridge.webp +0 -0
- package/src/assets/images/ingredients/beef.webp +0 -0
- package/src/assets/images/ingredients/beer-yeast.webp +0 -0
- package/src/assets/images/ingredients/calcium.webp +0 -0
- package/src/assets/images/ingredients/carrot.webp +0 -0
- package/src/assets/images/ingredients/chicken.webp +0 -0
- package/src/assets/images/ingredients/courgette.webp +0 -0
- package/src/assets/images/ingredients/dry-apple.webp +0 -0
- package/src/assets/images/ingredients/dry-carrot.webp +0 -0
- package/src/assets/images/ingredients/duck.webp +0 -0
- package/src/assets/images/ingredients/fish.webp +0 -0
- package/src/assets/images/ingredients/liquid.webp +0 -0
- package/src/assets/images/ingredients/oil.webp +0 -0
- package/src/assets/images/ingredients/pork.webp +0 -0
- package/src/assets/images/ingredients/potato.webp +0 -0
- package/src/assets/images/ingredients/quinoa.webp +0 -0
- package/src/assets/images/ingredients/rice.webp +0 -0
- package/src/assets/images/ingredients/seaweed.webp +0 -0
- package/src/assets/images/ingredients/turkey.webp +0 -0
- package/src/assets/images/ingredients/vitamins.webp +0 -0
- package/src/assets/images/tips/claudine-head.webp +0 -0
- package/src/assets/images/tips/claudine-tips-head-mobile.webp +0 -0
- package/src/assets/images/tips/claudine-tips-head-mobile@2x.webp +0 -0
- package/src/assets/images/tips/claudine-tips-head.webp +0 -0
- package/src/assets/images/tips/claudine-tips-head@2x.webp +0 -0
- package/src/assets/images/tips/claudine-tips-mobile.webp +0 -0
- package/src/assets/images/tips/claudine-tips-mobile@2x.webp +0 -0
- package/src/assets/images/tips/claudine-tips.webp +0 -0
- package/src/assets/images/tips/claudine-tips@2x.webp +0 -0
- package/src/assets/images/tips/payment-mobile.webp +0 -0
- package/src/assets/images/tips/payment-mobile@2x.webp +0 -0
- package/src/assets/images/tips/payment.webp +0 -0
- package/src/assets/images/tips/payment@2x.webp +0 -0
- package/src/assets/images/trash/dog-product-mobile.webp +0 -0
- package/src/assets/images/trash/dog-product.webp +0 -0
- package/src/assets/images/trash/full-cat.png +0 -0
- package/src/assets/images/trash/testimonial-1-mobile.webp +0 -0
- package/src/assets/images/trash/testimonial-1-mobile@2x.webp +0 -0
- package/src/assets/images/trash/testimonial-1.webp +0 -0
- package/src/assets/images/trash/testimonial-1@2x.webp +0 -0
- package/src/components/Accordions/FAQ/FaqItem.stories.tsx +61 -0
- package/src/components/Accordions/FAQ/FaqItem.tsx +55 -0
- package/src/components/Accordions/Ingredient/Ingredient.stories.tsx +38 -0
- package/src/components/Accordions/Ingredient/Ingredient.tsx +93 -0
- package/src/components/Accordions/index.tsx +4 -0
- package/src/components/Base/Banner/Banner.stories.tsx +33 -0
- package/src/components/Base/Banner/Banner.tsx +23 -0
- package/src/components/Base/Emblem/Emblem.stories.tsx +40 -0
- package/src/components/Base/Emblem/Emblem.tsx +22 -0
- package/src/components/Base/Logo/Logo.stories.tsx +46 -0
- package/src/components/Base/Logo/Logo.tsx +34 -0
- package/src/components/Base/ResponsiveImage/ResponsiveImage.stories.tsx +78 -0
- package/src/components/Base/ResponsiveImage/ResponsiveImage.tsx +56 -0
- package/src/components/Base/Text/Text.stories.tsx +115 -0
- package/src/components/Base/Text/Text.tsx +60 -0
- package/src/components/Base/Title/Title.stories.tsx +145 -0
- package/src/components/Base/Title/Title.tsx +77 -0
- package/src/components/Base/VideoPlayer/VideoPlayer.stories.tsx +60 -0
- package/src/components/Base/VideoPlayer/VideoPlayer.tsx +78 -0
- package/src/components/Base/index.tsx +9 -0
- package/src/components/Buttons/Button/Button.stories.tsx +158 -0
- package/src/components/Buttons/Button/Button.tsx +68 -0
- package/src/components/Buttons/CardButton/CardButton.stories.tsx +47 -0
- package/src/components/Buttons/CardButton/CardButton.tsx +25 -0
- package/src/components/Buttons/ClearButton/ClearButton.stories.tsx +26 -0
- package/src/components/Buttons/ClearButton/ClearButton.tsx +18 -0
- package/src/components/Buttons/FAQButton/FAQButton.stories.tsx +33 -0
- package/src/components/Buttons/FAQButton/FAQButton.tsx +27 -0
- package/src/components/Buttons/IllustratedCardButton/IllustratedCardButton.stories.tsx +71 -0
- package/src/components/Buttons/IllustratedCardButton/IllustratedCardButton.tsx +45 -0
- package/src/components/Buttons/SimpleIllustratedCardButton/SimpleIllustratedCardButton.stories.tsx +74 -0
- package/src/components/Buttons/SimpleIllustratedCardButton/SimpleIllustratedCardButton.tsx +43 -0
- package/src/components/Buttons/SocialButton/SocialButton.stories.tsx +56 -0
- package/src/components/Buttons/SocialButton/SocialButton.tsx +28 -0
- package/src/components/Buttons/Toggle/Toggle.tsx +64 -0
- package/src/components/Buttons/Toggle/Toogle.stories.tsx +66 -0
- package/src/components/Buttons/index.ts +10 -0
- package/src/components/Cards/CTACard/CTACard.stories.tsx +83 -0
- package/src/components/Cards/CTACard/CTACard.tsx +47 -0
- package/src/components/Cards/FeatureCard/FeatureCard.stories.tsx +96 -0
- package/src/components/Cards/FeatureCard/FeatureCard.tsx +50 -0
- package/src/components/Cards/FeatureIllustration/FeatureIllustration.stories.tsx +96 -0
- package/src/components/Cards/FeatureIllustration/FeatureIllustration.tsx +56 -0
- package/src/components/Cards/FeatureIllustration/index.ts +2 -0
- package/src/components/Cards/FoodCard/FoodCard.stories.tsx +43 -0
- package/src/components/Cards/FoodCard/FoodCard.tsx +37 -0
- package/src/components/Cards/FrequencySelectorCard/FrequencySelectorCard.stories.tsx +140 -0
- package/src/components/Cards/FrequencySelectorCard/FrequencySelectorCard.tsx +90 -0
- package/src/components/Cards/FrequencySelectorCard/index.ts +2 -0
- package/src/components/Cards/IllustratedCard/IllustratedCard.stories.tsx +54 -0
- package/src/components/Cards/IllustratedCard/IllustratedCard.tsx +44 -0
- package/src/components/Cards/PaymentCard/PaymentCard.stories.tsx +35 -0
- package/src/components/Cards/PaymentCard/PaymentCard.tsx +31 -0
- package/src/components/Cards/PlanCard/PlanCard.stories.tsx +140 -0
- package/src/components/Cards/PlanCard/PlanCard.tsx +119 -0
- package/src/components/Cards/Polaroid/Polaroid.stories.tsx +118 -0
- package/src/components/Cards/Polaroid/Polaroid.tsx +66 -0
- package/src/components/Cards/RecetteCard/RecetteCard.stories.tsx +86 -0
- package/src/components/Cards/RecetteCard/RecetteCard.tsx +47 -0
- package/src/components/Cards/StatCard/StatCard.stories.tsx +69 -0
- package/src/components/Cards/StatCard/StatCard.tsx +45 -0
- package/src/components/Cards/Testimonial/Testimonial.stories.tsx +65 -0
- package/src/components/Cards/Testimonial/Testimonial.tsx +62 -0
- package/src/components/Cards/TestimonialSlider/TestimonialSlider.stories.ts +53 -0
- package/src/components/Cards/TestimonialSlider/TestimonialSlider.tsx +50 -0
- package/src/components/Cards/Tips/Tips.stories.tsx +32 -0
- package/src/components/Cards/Tips/Tips.tsx +40 -0
- package/src/components/Cards/TransitionCard/TransitionCard.stories.tsx +50 -0
- package/src/components/Cards/TransitionCard/TransitionCard.tsx +66 -0
- package/src/components/Cards/UpCard/UpCard.stories.tsx +94 -0
- package/src/components/Cards/UpCard/UpCard.tsx +50 -0
- package/src/components/Cards/WizardTips/WizardTips.stories.tsx +48 -0
- package/src/components/Cards/WizardTips/WizardTips.tsx +33 -0
- package/src/components/Cards/index.ts +19 -0
- package/src/components/Inputs/ButtonSelect/ButtonSelect.stories.tsx +51 -0
- package/src/components/Inputs/ButtonSelect/ButtonSelect.tsx +34 -0
- package/src/components/Inputs/Checkbox/Checkbox.stories.tsx +47 -0
- package/src/components/Inputs/Checkbox/Checkbox.tsx +35 -0
- package/src/components/Inputs/Dropdown/Dropdown.stories.tsx +61 -0
- package/src/components/Inputs/Dropdown/Dropdown.tsx +108 -0
- package/src/components/Inputs/DropdownMenu/DropdownMenu.stories.tsx +75 -0
- package/src/components/Inputs/DropdownMenu/DropdownMenu.tsx +109 -0
- package/src/components/Inputs/ErrorMessage/ErrorMessage.stories.tsx +33 -0
- package/src/components/Inputs/ErrorMessage/ErrorMessage.tsx +18 -0
- package/src/components/Inputs/Filters/Filters.stories.tsx +54 -0
- package/src/components/Inputs/Filters/Filters.tsx +75 -0
- package/src/components/Inputs/Label/Label.stories.tsx +34 -0
- package/src/components/Inputs/Label/Label.tsx +16 -0
- package/src/components/Inputs/Newsletter/Newsletter.stories.tsx +67 -0
- package/src/components/Inputs/Newsletter/Newsletter.tsx +70 -0
- package/src/components/Inputs/QuantityInput/QuantityInput.stories.tsx +54 -0
- package/src/components/Inputs/QuantityInput/QuantityInput.tsx +46 -0
- package/src/components/Inputs/Tag/Tag.stories.tsx +33 -0
- package/src/components/Inputs/Tag/Tag.tsx +19 -0
- package/src/components/Inputs/TagSelect/TagSelect.stories.tsx +50 -0
- package/src/components/Inputs/TagSelect/TagSelect.tsx +48 -0
- package/src/components/Inputs/TextInput/TextInput.stories.tsx +40 -0
- package/src/components/Inputs/TextInput/TextInput.tsx +38 -0
- package/src/components/Inputs/WizardDropdown/WizardDropdown.stories.tsx +59 -0
- package/src/components/Inputs/WizardDropdown/WizardDropdown.tsx +93 -0
- package/src/components/Inputs/WizardTextInput/WizardTextInput.stories.tsx +40 -0
- package/src/components/Inputs/WizardTextInput/WizardTextInput.tsx +31 -0
- package/src/components/Inputs/index.ts +16 -0
- package/src/components/Navigation/Footer/Footer.stories.tsx +28 -0
- package/src/components/Navigation/Footer/Footer.tsx +130 -0
- package/src/components/Navigation/FooterTips/FooterTips.stories.tsx +22 -0
- package/src/components/Navigation/FooterTips/FooterTips.tsx +24 -0
- package/src/components/Navigation/MobileMenu/MobileMenu.stories.tsx +56 -0
- package/src/components/Navigation/MobileMenu/MobileMenu.tsx +45 -0
- package/src/components/Navigation/Navbar/Navbar.stories.tsx +128 -0
- package/src/components/Navigation/Navbar/Navbar.tsx +66 -0
- package/src/components/Navigation/NavbarDesktop/NavbarDesktop.stories.tsx +57 -0
- package/src/components/Navigation/NavbarDesktop/NavbarDesktop.tsx +48 -0
- package/src/components/Navigation/NavbarMobile/NavbarMobile.stories.tsx +59 -0
- package/src/components/Navigation/NavbarMobile/NavbarMobile.tsx +75 -0
- package/src/components/Navigation/Stepper/Stepper.stories.tsx +41 -0
- package/src/components/Navigation/Stepper/Stepper.tsx +19 -0
- package/src/components/Navigation/Tabs/Tabs.stories.tsx +120 -0
- package/src/components/Navigation/Tabs/Tabs.tsx +92 -0
- package/src/components/Navigation/WizardNavbar/WizardNavbar.stories.tsx +59 -0
- package/src/components/Navigation/WizardNavbar/WizardNavbar.tsx +83 -0
- package/src/components/Navigation/index.ts +11 -0
- package/src/components/SVG/Facebook.svg +3 -0
- package/src/components/SVG/Instagram.svg +5 -0
- package/src/components/SVG/Linkedin.svg +5 -0
- package/src/components/SVG/Tiktok.svg +7 -0
- package/src/components/SVG/arrow-plain.svg +3 -0
- package/src/components/SVG/arrow.svg +3 -0
- package/src/components/SVG/calendar.svg +4 -0
- package/src/components/SVG/check-circle.svg +5 -0
- package/src/components/SVG/check-rounded.svg +4 -0
- package/src/components/SVG/check.svg +3 -0
- package/src/components/SVG/cross-rounded.svg +3 -0
- package/src/components/SVG/cross.svg +4 -0
- package/src/components/SVG/dollar-rounded.svg +6 -0
- package/src/components/SVG/double-arrow.svg +3 -0
- package/src/components/SVG/filters.svg +8 -0
- package/src/components/SVG/hat-cook.svg +4 -0
- package/src/components/SVG/home-hero-shape-mobile.svg +3 -0
- package/src/components/SVG/home-hero-shape-small.svg +3 -0
- package/src/components/SVG/home-hero-shape.svg +3 -0
- package/src/components/SVG/index.ts +75 -0
- package/src/components/SVG/info.svg +3 -0
- package/src/components/SVG/magic-wand.svg +9 -0
- package/src/components/SVG/menu.svg +5 -0
- package/src/components/SVG/minus.svg +3 -0
- package/src/components/SVG/mute.svg +4 -0
- package/src/components/SVG/pause.svg +3 -0
- package/src/components/SVG/play.svg +3 -0
- package/src/components/SVG/plus.svg +4 -0
- package/src/components/SVG/polaroid-thread.svg +17 -0
- package/src/components/SVG/profil.svg +4 -0
- package/src/components/SVG/quote.svg +3 -0
- package/src/components/SVG/recipe-bg-shape.svg +3 -0
- package/src/components/SVG/star.svg +3 -0
- package/src/components/SVG/subtract.svg +3 -0
- package/src/components/SVG/trustpilot.svg +14 -0
- package/src/components/SVG/unmute.svg +5 -0
- package/src/components/index.ts +20 -0
- package/src/components/styles/Color/Color.stories.tsx +89 -0
- package/src/components/styles/Color/Color.tsx +47 -0
- package/src/components/styles/Icon/Icon.stories.tsx +103 -0
- package/src/components/styles/Icon/Icon.tsx +6 -0
- package/src/components/styles/Illustration/Illustration.stories.tsx +253 -0
- package/src/components/styles/Illustration/Illustration.tsx +45 -0
- package/src/components/styles/Typography/Typography.stories.tsx +37 -0
- package/src/components/styles/Typography/Typography.tsx +19 -0
- package/src/helpers/accordions.ts +39 -0
- package/src/helpers/clickoutside.ts +31 -0
- package/src/helpers/debounce.ts +10 -0
- package/src/helpers/index.ts +9 -0
- package/src/helpers/intersectionObserver.ts +101 -0
- package/src/helpers/keyboardControl.ts +58 -0
- package/src/helpers/responsive.ts +29 -0
- package/src/helpers/scroll.ts +16 -0
- package/src/index.ts +8 -0
- package/src/lib/i18n.ts +20 -0
- package/src/lib/locales/fr/design.json +42 -0
- package/src/styles/globals.css +205 -0
- package/src/types/svg.d.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myelmut/design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49",
|
|
4
4
|
"description": "Design system for Elmut project",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
19
|
"styles",
|
|
20
|
-
"assets"
|
|
20
|
+
"assets",
|
|
21
|
+
"src"
|
|
21
22
|
],
|
|
22
23
|
"peerDependencies": {
|
|
23
24
|
"i18next": "^25.0.0",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
4
|
+
|
|
5
|
+
import { FaqItem } from './FaqItem';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Components/Accordions/FaqItem',
|
|
9
|
+
component: FaqItem,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
decorators: [
|
|
16
|
+
(Story) => (
|
|
17
|
+
<div className="bg-beige-light flex h-[80vh] flex-col items-center justify-center gap-4 overflow-hidden p-6">
|
|
18
|
+
<Story />
|
|
19
|
+
</div>
|
|
20
|
+
),
|
|
21
|
+
],
|
|
22
|
+
argTypes: {
|
|
23
|
+
question: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
},
|
|
26
|
+
answer: {
|
|
27
|
+
control: 'text',
|
|
28
|
+
},
|
|
29
|
+
className: {
|
|
30
|
+
control: 'text',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
} satisfies Meta<typeof FaqItem>;
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
export const Default: Story = {
|
|
39
|
+
args: {
|
|
40
|
+
question: 'Combien coûte la solution Elmut ?',
|
|
41
|
+
answer: 'La solution Elmut est un service qui permet de gérer les demandes de service de manière efficace et transparente.',
|
|
42
|
+
className: '!w-80 md:!w-200',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const FAQ: Story = {
|
|
47
|
+
args: {
|
|
48
|
+
question: 'Combien coûte la solution Elmut ?',
|
|
49
|
+
answer: 'La solution Elmut est un service qui permet de gérer les demandes de service de manière efficace et transparente.',
|
|
50
|
+
className: '!w-80 md:!w-200',
|
|
51
|
+
},
|
|
52
|
+
render: (args) => {
|
|
53
|
+
return (
|
|
54
|
+
<>
|
|
55
|
+
<FaqItem {...args} />
|
|
56
|
+
<FaqItem {...args} />
|
|
57
|
+
<FaqItem {...args} />
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
import { FAQButton, ParagraphTitle, Text } from '../../../components';
|
|
8
|
+
import { accordionAnimation } from '../../../helpers';
|
|
9
|
+
|
|
10
|
+
type FaqItemProps = {
|
|
11
|
+
question: string;
|
|
12
|
+
answer: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const FaqItem = ({ question, answer, className }: FaqItemProps) => {
|
|
17
|
+
const detailsRef = useRef<HTMLDetailsElement>(null);
|
|
18
|
+
const contentRef = useRef<HTMLDivElement>(null);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const details = detailsRef.current;
|
|
22
|
+
const content = contentRef.current;
|
|
23
|
+
if (!details || !content) return;
|
|
24
|
+
|
|
25
|
+
const handleAnimation = (e: Event) => {
|
|
26
|
+
accordionAnimation(e, details, content);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
details.addEventListener('click', handleAnimation);
|
|
30
|
+
return () => details.removeEventListener('click', handleAnimation);
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<details data-accordion ref={detailsRef} className={clsx('bg-beige-dark group open:bg-beige-light hover:bg-beige-light rounded-input md:rounded-card border-claret-violet-dark w-full cursor-pointer border p-4 transition-colors duration-300 md:p-6', className)}>
|
|
35
|
+
<summary className="flex list-none items-center justify-between gap-2">
|
|
36
|
+
<ParagraphTitle size="heading-md" className="font-semibold md:hidden">
|
|
37
|
+
{question}
|
|
38
|
+
</ParagraphTitle>
|
|
39
|
+
<Text size="xl" className="hidden md:block">
|
|
40
|
+
{question}
|
|
41
|
+
</Text>
|
|
42
|
+
<FAQButton variant={'plus'} className="flex shrink-0 group-data-[open=true]:hidden" />
|
|
43
|
+
<FAQButton variant={'minus'} className="hidden shrink-0 group-data-[open=true]:flex" />
|
|
44
|
+
</summary>
|
|
45
|
+
<div data-accordion-content ref={contentRef} style={{ maxHeight: '0px', transitionDuration: '300ms' }} className="overflow-hidden transition-[max-height] will-change-[max-height]">
|
|
46
|
+
<ParagraphTitle size="heading-md" className="mt-2.5 md:hidden">
|
|
47
|
+
{answer}
|
|
48
|
+
</ParagraphTitle>
|
|
49
|
+
<Text size="md" className="mt-2.5 hidden md:block">
|
|
50
|
+
{answer}
|
|
51
|
+
</Text>
|
|
52
|
+
</div>
|
|
53
|
+
</details>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { Ingredient } from './Ingredient';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Accordions/Ingredient',
|
|
7
|
+
component: Ingredient,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
label: { control: 'text' },
|
|
14
|
+
description: { control: 'text' },
|
|
15
|
+
image: {
|
|
16
|
+
control: 'select',
|
|
17
|
+
options: ['carrot', 'quinoa', 'potato', 'dry-apple', 'dry-carrot', 'beef', 'chicken', 'courgette', 'duck', 'fish', 'liquid', 'oil', 'pork', 'turkey', 'vitamins', 'seaweed', 'rice', 'beer-yeast', 'calcium'],
|
|
18
|
+
description: 'Name of the ingredient image. Same as the name in the API one',
|
|
19
|
+
},
|
|
20
|
+
className: { control: 'text', description: 'Additional class names' },
|
|
21
|
+
},
|
|
22
|
+
globals: {
|
|
23
|
+
backgrounds: {
|
|
24
|
+
value: 'white',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
args: {
|
|
28
|
+
image: 'carrot',
|
|
29
|
+
label: 'Carotte',
|
|
30
|
+
description: 'Légume digestible par nos chiens, les carottes apportent des fibres essentielles pour des crottes impeccables et des caroténoïdes idéales pour la santé oculaire.',
|
|
31
|
+
className: 'max-md:w-80',
|
|
32
|
+
},
|
|
33
|
+
} satisfies Meta<typeof Ingredient>;
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
import BeefImage from '../../../assets/images/ingredients/beef.webp';
|
|
8
|
+
import BeerYeastImage from '../../../assets/images/ingredients/beer-yeast.webp';
|
|
9
|
+
import CalciumImage from '../../../assets/images/ingredients/calcium.webp';
|
|
10
|
+
import CarrotImage from '../../../assets/images/ingredients/carrot.webp';
|
|
11
|
+
import ChickenImage from '../../../assets/images/ingredients/chicken.webp';
|
|
12
|
+
import CourgetteImage from '../../../assets/images/ingredients/courgette.webp';
|
|
13
|
+
import DryAppleImage from '../../../assets/images/ingredients/dry-apple.webp';
|
|
14
|
+
import DryCarrotImage from '../../../assets/images/ingredients/dry-carrot.webp';
|
|
15
|
+
import DuckImage from '../../../assets/images/ingredients/duck.webp';
|
|
16
|
+
import FishImage from '../../../assets/images/ingredients/fish.webp';
|
|
17
|
+
import LiquidImage from '../../../assets/images/ingredients/liquid.webp';
|
|
18
|
+
import OilImage from '../../../assets/images/ingredients/oil.webp';
|
|
19
|
+
import PorkImage from '../../../assets/images/ingredients/pork.webp';
|
|
20
|
+
import PotatoImage from '../../../assets/images/ingredients/potato.webp';
|
|
21
|
+
import QuinoaImage from '../../../assets/images/ingredients/quinoa.webp';
|
|
22
|
+
import RiceImage from '../../../assets/images/ingredients/rice.webp';
|
|
23
|
+
import SeaweedImage from '../../../assets/images/ingredients/seaweed.webp';
|
|
24
|
+
import TurkeyImage from '../../../assets/images/ingredients/turkey.webp';
|
|
25
|
+
import VitaminsImage from '../../../assets/images/ingredients/vitamins.webp';
|
|
26
|
+
import { ArrowIcon, Text } from '../../../components';
|
|
27
|
+
import { accordionAnimation } from '../../../helpers';
|
|
28
|
+
|
|
29
|
+
export interface IngredientProps {
|
|
30
|
+
label: string;
|
|
31
|
+
description: string;
|
|
32
|
+
image: 'carrot' | 'quinoa' | 'potato' | 'dry-apple' | 'dry-carrot' | 'beef' | 'chicken' | 'courgette' | 'duck' | 'fish' | 'liquid' | 'oil' | 'pork' | 'turkey' | 'vitamins' | 'seaweed' | 'rice' | 'beer-yeast' | 'calcium';
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const imageMap = {
|
|
37
|
+
beef: BeefImage,
|
|
38
|
+
'beer-yeast': BeerYeastImage,
|
|
39
|
+
calcium: CalciumImage,
|
|
40
|
+
carrot: CarrotImage,
|
|
41
|
+
chicken: ChickenImage,
|
|
42
|
+
courgette: CourgetteImage,
|
|
43
|
+
'dry-apple': DryAppleImage,
|
|
44
|
+
'dry-carrot': DryCarrotImage,
|
|
45
|
+
duck: DuckImage,
|
|
46
|
+
fish: FishImage,
|
|
47
|
+
liquid: LiquidImage,
|
|
48
|
+
oil: OilImage,
|
|
49
|
+
pork: PorkImage,
|
|
50
|
+
potato: PotatoImage,
|
|
51
|
+
quinoa: QuinoaImage,
|
|
52
|
+
rice: RiceImage,
|
|
53
|
+
seaweed: SeaweedImage,
|
|
54
|
+
turkey: TurkeyImage,
|
|
55
|
+
vitamins: VitaminsImage,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const Ingredient = ({ label, description, image, className }: IngredientProps) => {
|
|
59
|
+
const detailsRef = useRef<HTMLDetailsElement>(null);
|
|
60
|
+
const contentRef = useRef<HTMLDivElement>(null);
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const details = detailsRef.current;
|
|
64
|
+
const content = contentRef.current;
|
|
65
|
+
if (!details || !content) return;
|
|
66
|
+
|
|
67
|
+
const handleAnimation = (e: Event) => {
|
|
68
|
+
accordionAnimation(e, details, content);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
details.addEventListener('click', handleAnimation);
|
|
72
|
+
return () => details.removeEventListener('click', handleAnimation);
|
|
73
|
+
}, []);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<details data-accordion ref={detailsRef} className={clsx('bg-beige-light group hover:bg-beige-dark rounded-input min-h-15 cursor-pointer px-3 transition-colors duration-300 max-md:py-3 md:min-h-18 md:px-6', className)}>
|
|
77
|
+
<summary className="flex list-none items-center justify-between gap-2">
|
|
78
|
+
<div className="flex items-center gap-4">
|
|
79
|
+
<img src={imageMap[image]} alt={label} className="w-14 object-contain md:w-25" loading="lazy" decoding="async" />
|
|
80
|
+
<Text size="button">{label}</Text>
|
|
81
|
+
</div>
|
|
82
|
+
<div className={clsx('group-hover:bg-claret-violet-dark group-hover:text-beige-light flex h-5 w-5 items-center justify-center rounded-sm transition-colors duration-300', 'bg-claret-violet-dark/50 text-claret-violet-dark group-open:bg-claret-violet-dark group-open:text-beige-light')}>
|
|
83
|
+
<ArrowIcon className={clsx('w-2 rotate-0 transition-transform duration-300 group-data-[open=true]:rotate-180')} />
|
|
84
|
+
</div>
|
|
85
|
+
</summary>
|
|
86
|
+
<div data-accordion-content ref={contentRef} style={{ maxHeight: '0px', transitionDuration: '300ms' }} className="transition-height overflow-hidden">
|
|
87
|
+
<Text size="md" className="mt-3 md:pb-6">
|
|
88
|
+
{description}
|
|
89
|
+
</Text>
|
|
90
|
+
</div>
|
|
91
|
+
</details>
|
|
92
|
+
);
|
|
93
|
+
};
|