From 1e986f0e0fddab6076b8b28161a825ddb8310b95 Mon Sep 17 00:00:00 2001 From: Damien Foulhoux Date: Fri, 13 Sep 2024 16:24:44 +0200 Subject: [PATCH] change file extension twig components (#57) * change file extension twig components * typo * typo * improve component integ --- 404.html.twig | 2 +- base.html.twig | 4 +- category.html.twig | 4 +- checkout.html.twig | 6 +-- .../Colors/{Colors.twig => Colors.html.twig} | 0 components/Atoms/Colors/Colors.stories.js | 2 +- components/Atoms/Font/Font.stories.js | 6 +-- .../Font/{Other.twig => Other.html.twig} | 0 .../{Paragraph.twig => Paragraph.html.twig} | 0 .../Font/{Title.twig => Title.html.twig} | 0 .../{Checkbox.twig => Checkbox.html.twig} | 0 components/Atoms/Form/Checkboxs.html.twig | 7 +++ components/Atoms/Form/Checkboxs.twig | 7 --- components/Atoms/Form/Form.stories.js | 6 +-- .../Form/{Radio.twig => Radio.html.twig} | 0 components/Atoms/Form/Radios.html.twig | 5 ++ components/Atoms/Form/Radios.twig | 5 -- .../Form/{Toggle.twig => Toggle.html.twig} | 0 components/Atoms/Form/Toggles.html.twig | 4 ++ components/Atoms/Form/Toggles.twig | 4 -- .../Atoms/Icon/{Icon.twig => Icon.html.twig} | 0 components/Atoms/Icon/Icon.stories.js | 2 +- .../CategoryProduct/CategoryProduct.html.twig | 12 ++--- .../CrossSelling/CrossSelling.html.twig | 19 +++++++ .../CrossSelling/CrossSelling.stories.js | 2 +- .../Layout/CrossSelling/CrossSelling.twig | 21 -------- .../Footer/{Footer.twig => Footer.html.twig} | 4 +- components/Layout/Footer/Footer.stories.js | 4 +- ...Checkout.twig => FooterCheckout.html.twig} | 0 .../Header/{Header.twig => Header.html.twig} | 10 ++-- components/Layout/Header/Header.stories.js | 4 +- ...Checkout.twig => HeaderCheckout.html.twig} | 0 .../Layout/Hero/{Hero.twig => Hero.html.twig} | 2 +- components/Layout/Hero/Hero.stories.js | 10 ++-- .../ProductCategory/ProductCategory.html.twig | 12 +++++ .../ProductCategory.stories.js | 2 +- .../ProductCategory/ProductCategory.twig | 12 ----- ...tGallery.twig => ProductGallery.html.twig} | 0 components/Layout/ProductGallery/test.twig | 1 - ...anner.twig => PromotionalBanner.html.twig} | 0 .../PromotionalBanner.stories.js | 2 +- ...Reinsurance.twig => Reinsurance.html.twig} | 0 .../Layout/Reinsurance/Reinsurance.stories.js | 2 +- .../Review/{Review.twig => Review.html.twig} | 4 +- components/Layout/Review/Review.stories.js | 2 +- ...rContent.twig => SimilarContent.html.twig} | 4 +- .../SimilarContent/SimilarContent.stories.js | 2 +- ...egory.twig => SubheaderCategory.html.twig} | 2 +- .../Category/SubheaderCategory.stories.js | 2 +- ...ge.twig => SubheaderContentPage.html.twig} | 0 .../SubheaderContentPage.stories.js | 2 +- .../Orders/SubheaderOrders.html.twig | 12 +++++ .../Orders/SubheaderOrders.stories.js | 2 +- .../Subheader/Orders/SubheaderOrders.twig | 12 ----- ...rSearch.twig => SubheaderSearch.html.twig} | 4 +- .../SearchResult/SubheaderSearch.stories.js | 2 +- ...derTitle.twig => SubheaderTitle.html.twig} | 0 .../TitleOnly/SubheaderTitle.stories.js | 2 +- .../{Accordion.twig => Accordion.html.twig} | 0 .../Molecules/Accordion/Accordion.stories.js | 20 ++++---- .../{Breadcrumb.twig => Breadcrumb.html.twig} | 0 .../Breadcrumb/Breadcrumb.stories.js | 5 +- .../Button/{Button.twig => Button.html.twig} | 0 components/Molecules/Button/Button.stories.js | 8 +-- .../{Classic.twig => Classic.html.twig} | 12 ++--- .../Molecules/Button/Quantities.html.twig | 39 +++++++++++++++ components/Molecules/Button/Quantities.twig | 39 --------------- .../{Quantity.twig => Quantity.html.twig} | 0 ...tyButton.twig => QuantityButton.html.twig} | 4 +- .../Button/{Rounds.twig => Rounds.html.twig} | 8 +-- .../{Dropdown.twig => Dropdown.html.twig} | 0 .../Molecules/Dropdown/Dropdown.stories.js | 19 ++++--- .../{Favorite.twig => Favorite.html.twig} | 0 .../Molecules/Favorite/Favorite.stories.js | 2 +- .../{FieldInput.twig => FieldInput.html.twig} | 4 +- .../Fields/FieldInput/FieldInput.stories.js | 2 +- ...FieldNumber.twig => FieldNumber.html.twig} | 0 .../Fields/FieldNumber/FieldNumber.stories.js | 12 ++--- ...FieldSelect.twig => FieldSelect.html.twig} | 2 +- .../Fields/FieldSelect/FieldSelect.stories.js | 22 +++++---- .../{FilterList.twig => FilterList.html.twig} | 0 .../Filters/FilterList/FilterList.stories.js | 8 +-- .../{FilterPill.twig => FilterPill.html.twig} | 0 .../Filters/FilterPill/FilterPill.stories.js | 2 +- ...lterSelect.twig => FilterSelect.html.twig} | 0 ...aderButton.twig => HeaderButton.html.twig} | 0 .../HeaderButton/HeaderButton.stories.js | 2 +- .../HeaderButton/HeaderButtons.html.twig | 15 ++++++ .../Molecules/HeaderButton/HeaderButtons.twig | 15 ------ .../{ItemHeader.twig => ItemHeader.html.twig} | 0 .../ItemHeader/ItemHeader.stories.js | 2 +- .../Link/{Link.twig => Link.html.twig} | 0 components/Molecules/Link/Link.stories.js | 20 +++----- .../{OrderTag.twig => OrderTag.html.twig} | 0 .../Molecules/OrderTag/OrderTag.stories.js | 24 ++++----- .../{Pagination.twig => Pagination.html.twig} | 0 .../Pagination/Pagination.stories.js | 4 +- ...ntrols.twig => PasswordControls.html.twig} | 0 .../PasswordControls.stories.js | 4 +- .../{RadioCard.twig => RadioCard.html.twig} | 0 .../Molecules/RadioCard/RadioCard.stories.js | 2 +- .../Score/{Score.twig => Score.html.twig} | 0 components/Molecules/Score/Score.stories.js | 8 +-- .../SearchBar/{Base.twig => Base.html.twig} | 2 +- .../{SearchBar.twig => SearchBar.html.twig} | 0 .../Molecules/SearchBar/SearchBar.stories.js | 2 +- .../{Shortcut.twig => Shortcut.html.twig} | 0 .../Molecules/Shortcut/Shortcut.stories.js | 2 +- .../Step/{Steps.twig => Steps.html.twig} | 0 components/Molecules/Step/Steps.stories.js | 2 +- .../Molecules/Tab/{Tab.twig => Tab.html.twig} | 0 components/Molecules/Tab/Tab.stories.js | 14 +++--- .../Molecules/Tag/{Tag.twig => Tag.html.twig} | 0 components/Molecules/Tag/Tag.stories.js | 28 +++++------ .../{Tooltip.twig => Tooltip.html.twig} | 0 .../Molecules/Tooltip/Tooltip.stories.js | 13 ++--- .../{UserMenu.twig => UserMenu.html.twig} | 0 .../Molecules/userMenu/UserMenu.stories.js | 10 ++-- .../{AddToCart.twig => AddToCart.html.twig} | 2 +- .../Organisms/AddToCart/AddToCart.stories.js | 2 +- ...AddressCard.twig => AddressCard.html.twig} | 4 +- .../Card/Address/AddressCard.stories.js | 31 ++++++------ ...sCard.twig => ClientAddressCard.html.twig} | 2 +- .../{Article.twig => Article.html.twig} | 0 .../Organisms/Card/Article/Article.stories.js | 2 +- .../{OrderCard.twig => OrderCard.html.twig} | 4 +- .../Organisms/Card/Order/OrderCard.stories.js | 2 +- .../Organisms/Card/Payment/Payment.stories.js | 2 +- ...PaymentCard.twig => PaymentCard.html.twig} | 4 +- ...PickupPoint.twig => PickupPoint.html.twig} | 4 +- .../Card/PickupPoint/PickupPoint.stories.js | 4 +- ...rawer.twig => PickupPointDrawer.html.twig} | 2 +- .../Review/{Review.twig => Review.html.twig} | 2 +- .../Organisms/Card/Review/Review.stories.js | 13 ++--- ...Promotion.twig => SelfPromotion.html.twig} | 0 .../SelfPromotion/SelfPromotion.stories.js | 2 +- .../{StoreInfo.twig => StoreInfo.html.twig} | 4 +- .../Card/StoreInfo/StoreInfo.stories.js | 2 +- ...tFilters.twig => SuggestFilters.html.twig} | 2 +- .../SuggestFilters/SuggestFilters.stories.js | 7 +-- ...Transporter.twig => Transporter.html.twig} | 2 +- .../Card/Transporter/Transporter.stories.js | 6 +-- ...tegoryCard.twig => CategoryCard.html.twig} | 2 +- .../CategoryCard/CategoryCard.stories.js | 2 +- .../Organisms/HeaderNav/HeaderNav.html.twig | 7 +++ components/Organisms/HeaderNav/HeaderNav.twig | 7 --- ...erClassic.twig => FilterClassic.html.twig} | 4 +- ...FilterColor.twig => FilterColor.html.twig} | 4 +- .../Modules/Filters/Filters.stories.js | 4 +- ...meDelivery.twig => HomeDelivery.html.twig} | 16 +++--- .../HomeDelivery/HomeDelivery.stories.js | 2 +- .../{Payment.twig => Payment.html.twig} | 12 ++--- .../Modules/Payment/Payment.stories.js | 2 +- ...odule.twig => PickupPointModule.html.twig} | 12 ++--- .../PickupPointModule.stories.js | 2 +- ...eDelivery.twig => StoreDelivery.html.twig} | 8 +-- .../StoreDelivery/StoreDelivery.stories.js | 2 +- .../AddToCartConfirmation.html.twig | 1 + .../ProductCard/AddToCartConfirmation.twig | 1 - .../Organisms/ProductCard/Order.html.twig | 1 + components/Organisms/ProductCard/Order.twig | 1 - ...ProductCard.twig => ProductCard.html.twig} | 12 ++--- .../ProductCard/ProductCard.stories.js | 12 ++--- .../ProductCard/PurchaseFunnel.html.twig | 17 +++++++ .../Organisms/ProductCard/PurchaseFunnel.twig | 17 ------- .../ProductCard/RemoveProduct.html.twig | 1 + .../Organisms/ProductCard/RemoveProduct.twig | 1 - .../Organisms/ProductCard/Search.html.twig | 13 +++++ components/Organisms/ProductCard/Search.twig | 13 ----- .../Organisms/ProductCard/Standard.html.twig | 1 + .../Organisms/ProductCard/Standard.twig | 1 - ...Reinsurance.twig => Reinsurance.html.twig} | 0 .../Reinsurance/Reinsurance.stories.js | 2 +- ...Card.twig => SimilarContentCard.html.twig} | 0 .../SimilarContentCard.stories.js | 2 +- .../{SnackBar.twig => SnackBar.html.twig} | 2 +- .../Organisms/SnackBar/SnackBar.stories.js | 2 +- ...SummaryCard.twig => SummaryCard.html.twig} | 4 +- .../SummaryCard/SummaryCard.stories.js | 2 +- components/account-address.html.twig | 6 +-- components/account-orders.html.twig | 4 +- components/account.html.twig | 2 +- config/packages/.gitkeep | 0 content.html.twig | 10 ++-- email-verification.html.twig | 4 +- error.html.twig | 2 +- faq.html.twig | 8 +-- index.html.twig | 41 ++++------------ login.html.twig | 10 ++-- product.html.twig | 23 +++++---- register.html.twig | 20 ++++---- search.html.twig | 4 +- src/FlexyBundle.php | 9 +++- src/Twig/CrossSelling.php | 36 ++++++++++++++ src/Twig/ProductCategory.php | 49 +++++++++++++++++++ .../{messages.en.yaml => messages.en_US.yaml} | 0 .../{messages.fr.yaml => messages.fr_FR.yaml} | 0 wishlist.html.twig | 2 +- 198 files changed, 604 insertions(+), 535 deletions(-) rename components/Atoms/Colors/{Colors.twig => Colors.html.twig} (100%) rename components/Atoms/Font/{Other.twig => Other.html.twig} (100%) rename components/Atoms/Font/{Paragraph.twig => Paragraph.html.twig} (100%) rename components/Atoms/Font/{Title.twig => Title.html.twig} (100%) rename components/Atoms/Form/{Checkbox.twig => Checkbox.html.twig} (100%) create mode 100644 components/Atoms/Form/Checkboxs.html.twig delete mode 100644 components/Atoms/Form/Checkboxs.twig rename components/Atoms/Form/{Radio.twig => Radio.html.twig} (100%) create mode 100644 components/Atoms/Form/Radios.html.twig delete mode 100644 components/Atoms/Form/Radios.twig rename components/Atoms/Form/{Toggle.twig => Toggle.html.twig} (100%) create mode 100644 components/Atoms/Form/Toggles.html.twig delete mode 100644 components/Atoms/Form/Toggles.twig rename components/Atoms/Icon/{Icon.twig => Icon.html.twig} (100%) create mode 100644 components/Layout/CrossSelling/CrossSelling.html.twig delete mode 100644 components/Layout/CrossSelling/CrossSelling.twig rename components/Layout/Footer/{Footer.twig => Footer.html.twig} (90%) rename components/Layout/Footer/{FooterCheckout.twig => FooterCheckout.html.twig} (100%) rename components/Layout/Header/{Header.twig => Header.html.twig} (73%) rename components/Layout/Header/{HeaderCheckout.twig => HeaderCheckout.html.twig} (100%) rename components/Layout/Hero/{Hero.twig => Hero.html.twig} (93%) create mode 100644 components/Layout/ProductCategory/ProductCategory.html.twig delete mode 100644 components/Layout/ProductCategory/ProductCategory.twig rename components/Layout/ProductGallery/{ProductGallery.twig => ProductGallery.html.twig} (100%) delete mode 100644 components/Layout/ProductGallery/test.twig rename components/Layout/PromotionalBanner/{PromotionalBanner.twig => PromotionalBanner.html.twig} (100%) rename components/Layout/Reinsurance/{Reinsurance.twig => Reinsurance.html.twig} (100%) rename components/Layout/Review/{Review.twig => Review.html.twig} (57%) rename components/Layout/SimilarContent/{SimilarContent.twig => SimilarContent.html.twig} (67%) rename components/Layout/Subheader/Category/{SubheaderCategory.twig => SubheaderCategory.html.twig} (81%) rename components/Layout/Subheader/ContentPage/{SubheaderContentPage.twig => SubheaderContentPage.html.twig} (100%) create mode 100644 components/Layout/Subheader/Orders/SubheaderOrders.html.twig delete mode 100644 components/Layout/Subheader/Orders/SubheaderOrders.twig rename components/Layout/Subheader/SearchResult/{SubheaderSearch.twig => SubheaderSearch.html.twig} (51%) rename components/Layout/Subheader/TitleOnly/{SubheaderTitle.twig => SubheaderTitle.html.twig} (100%) rename components/Molecules/Accordion/{Accordion.twig => Accordion.html.twig} (100%) rename components/Molecules/Breadcrumb/{Breadcrumb.twig => Breadcrumb.html.twig} (100%) rename components/Molecules/Button/{Button.twig => Button.html.twig} (100%) rename components/Molecules/Button/{Classic.twig => Classic.html.twig} (84%) create mode 100644 components/Molecules/Button/Quantities.html.twig delete mode 100644 components/Molecules/Button/Quantities.twig rename components/Molecules/Button/{Quantity.twig => Quantity.html.twig} (100%) rename components/Molecules/Button/{QuantityButton.twig => QuantityButton.html.twig} (50%) rename components/Molecules/Button/{Rounds.twig => Rounds.html.twig} (80%) rename components/Molecules/Dropdown/{Dropdown.twig => Dropdown.html.twig} (100%) rename components/Molecules/Favorite/{Favorite.twig => Favorite.html.twig} (100%) rename components/Molecules/Fields/FieldInput/{FieldInput.twig => FieldInput.html.twig} (90%) rename components/Molecules/Fields/FieldNumber/{FieldNumber.twig => FieldNumber.html.twig} (100%) rename components/Molecules/Fields/FieldSelect/{FieldSelect.twig => FieldSelect.html.twig} (93%) rename components/Molecules/Filters/FilterList/{FilterList.twig => FilterList.html.twig} (100%) rename components/Molecules/Filters/FilterPill/{FilterPill.twig => FilterPill.html.twig} (100%) rename components/Molecules/Filters/FilterSelect/{FilterSelect.twig => FilterSelect.html.twig} (100%) rename components/Molecules/HeaderButton/{HeaderButton.twig => HeaderButton.html.twig} (100%) create mode 100644 components/Molecules/HeaderButton/HeaderButtons.html.twig delete mode 100644 components/Molecules/HeaderButton/HeaderButtons.twig rename components/Molecules/ItemHeader/{ItemHeader.twig => ItemHeader.html.twig} (100%) rename components/Molecules/Link/{Link.twig => Link.html.twig} (100%) rename components/Molecules/OrderTag/{OrderTag.twig => OrderTag.html.twig} (100%) rename components/Molecules/Pagination/{Pagination.twig => Pagination.html.twig} (100%) rename components/Molecules/PasswordControls/{PasswordControls.twig => PasswordControls.html.twig} (100%) rename components/Molecules/RadioCard/{RadioCard.twig => RadioCard.html.twig} (100%) rename components/Molecules/Score/{Score.twig => Score.html.twig} (100%) rename components/Molecules/SearchBar/{Base.twig => Base.html.twig} (51%) rename components/Molecules/SearchBar/{SearchBar.twig => SearchBar.html.twig} (100%) rename components/Molecules/Shortcut/{Shortcut.twig => Shortcut.html.twig} (100%) rename components/Molecules/Step/{Steps.twig => Steps.html.twig} (100%) rename components/Molecules/Tab/{Tab.twig => Tab.html.twig} (100%) rename components/Molecules/Tag/{Tag.twig => Tag.html.twig} (100%) rename components/Molecules/Tooltip/{Tooltip.twig => Tooltip.html.twig} (100%) rename components/Molecules/userMenu/{UserMenu.twig => UserMenu.html.twig} (100%) rename components/Organisms/AddToCart/{AddToCart.twig => AddToCart.html.twig} (90%) rename components/Organisms/Card/Address/{AddressCard.twig => AddressCard.html.twig} (86%) rename components/Organisms/Card/Address/{ClientAddressCard.twig => ClientAddressCard.html.twig} (94%) rename components/Organisms/Card/Article/{Article.twig => Article.html.twig} (100%) rename components/Organisms/Card/Order/{OrderCard.twig => OrderCard.html.twig} (84%) rename components/Organisms/Card/Payment/{PaymentCard.twig => PaymentCard.html.twig} (77%) rename components/Organisms/Card/PickupPoint/{PickupPoint.twig => PickupPoint.html.twig} (87%) rename components/Organisms/Card/PickupPoint/{PickupPointDrawer.twig => PickupPointDrawer.html.twig} (94%) rename components/Organisms/Card/Review/{Review.twig => Review.html.twig} (79%) rename components/Organisms/Card/SelfPromotion/{SelfPromotion.twig => SelfPromotion.html.twig} (100%) rename components/Organisms/Card/StoreInfo/{StoreInfo.twig => StoreInfo.html.twig} (79%) rename components/Organisms/Card/SuggestFilters/{SuggestFilters.twig => SuggestFilters.html.twig} (53%) rename components/Organisms/Card/Transporter/{Transporter.twig => Transporter.html.twig} (85%) rename components/Organisms/CategoryCard/{CategoryCard.twig => CategoryCard.html.twig} (82%) create mode 100644 components/Organisms/HeaderNav/HeaderNav.html.twig delete mode 100644 components/Organisms/HeaderNav/HeaderNav.twig rename components/Organisms/Modules/Filters/{FilterClassic.twig => FilterClassic.html.twig} (75%) rename components/Organisms/Modules/Filters/{FilterColor.twig => FilterColor.html.twig} (77%) rename components/Organisms/Modules/HomeDelivery/{HomeDelivery.twig => HomeDelivery.html.twig} (64%) rename components/Organisms/Modules/Payment/{Payment.twig => Payment.html.twig} (67%) rename components/Organisms/Modules/PickupPointModule/{PickupPointModule.twig => PickupPointModule.html.twig} (74%) rename components/Organisms/Modules/StoreDelivery/{StoreDelivery.twig => StoreDelivery.html.twig} (83%) create mode 100644 components/Organisms/ProductCard/AddToCartConfirmation.html.twig delete mode 100644 components/Organisms/ProductCard/AddToCartConfirmation.twig create mode 100644 components/Organisms/ProductCard/Order.html.twig delete mode 100644 components/Organisms/ProductCard/Order.twig rename components/Organisms/ProductCard/{ProductCard.twig => ProductCard.html.twig} (90%) create mode 100644 components/Organisms/ProductCard/PurchaseFunnel.html.twig delete mode 100644 components/Organisms/ProductCard/PurchaseFunnel.twig create mode 100644 components/Organisms/ProductCard/RemoveProduct.html.twig delete mode 100644 components/Organisms/ProductCard/RemoveProduct.twig create mode 100644 components/Organisms/ProductCard/Search.html.twig delete mode 100644 components/Organisms/ProductCard/Search.twig create mode 100644 components/Organisms/ProductCard/Standard.html.twig delete mode 100644 components/Organisms/ProductCard/Standard.twig rename components/Organisms/Reinsurance/{Reinsurance.twig => Reinsurance.html.twig} (100%) rename components/Organisms/SimilarContentCard/{SimilarContentCard.twig => SimilarContentCard.html.twig} (100%) rename components/Organisms/SnackBar/{SnackBar.twig => SnackBar.html.twig} (93%) rename components/Organisms/SummaryCard/{SummaryCard.twig => SummaryCard.html.twig} (97%) create mode 100644 config/packages/.gitkeep create mode 100644 src/Twig/CrossSelling.php create mode 100644 src/Twig/ProductCategory.php rename translations/{messages.en.yaml => messages.en_US.yaml} (100%) rename translations/{messages.fr.yaml => messages.fr_FR.yaml} (100%) diff --git a/404.html.twig b/404.html.twig index 64f9a96..bd4ef3f 100644 --- a/404.html.twig +++ b/404.html.twig @@ -9,7 +9,7 @@ {{ source('assets/images/not-found.svg') }}

{{ 'Oops, this page does not exist...'|trans }}

- {% include '@components/Molecules/Button/Button.twig' with {text: 'Homepage', classes:'Button--large', href: "/", variant: 'primary', icon_left: "chevron-left"} %} + {% include '@components/Molecules/Button/Button.html.twig' with {text: 'Homepage', classes:'Button--large', href: "/", variant: 'primary', icon_left: "chevron-left"} %} {% endblock %} diff --git a/base.html.twig b/base.html.twig index 4b80208..d3829eb 100644 --- a/base.html.twig +++ b/base.html.twig @@ -17,13 +17,13 @@ {% block header %} - {% include '@components/Layout/Header/Header.twig' %} + {% include '@components/Layout/Header/Header.html.twig' %} {% endblock %} {% block body %}{% endblock %} {% block footer %} - {% include '@components/Layout/Footer/Footer.twig' %} + {% include '@components/Layout/Footer/Footer.html.twig' %} {% endblock %} diff --git a/category.html.twig b/category.html.twig index 30fedc2..830be57 100644 --- a/category.html.twig +++ b/category.html.twig @@ -7,10 +7,10 @@ {% set products = resources('/api/front/products', {'productCategories.category.id': attr('category', 'id'), itemsPerPage:9, page: page}) %} {% set totalProducts = resources('/api/front/products', {'productCategories.category.id': attr('category', 'id'), itemsPerPage:9, page: page}) %} - {% include '@components/Layout/Subheader/Category/SubheaderCategory.twig' with {title: attr('category', 'title'), description: attr('category', 'description'), nbProducts: products|length} %} + {% include '@components/Layout/Subheader/Category/SimilarContent.html.twig' with {title: attr('category', 'title'), description: attr('category', 'description'), nbProducts: products|length} %} {% include '@components/Layout/CategoryProduct/CategoryProduct.html.twig' with {products: products, totalProducts:totalProducts} %} - {% include '@components/Layout/Reinsurance/Reinsurance.twig' with { data: [ + {% include '@components/Layout/Reinsurance/Reinsurance.html.twig' with { data: [ { strongText: 'Free delivery' | trans, text: 'For any order over €100' | trans, diff --git a/checkout.html.twig b/checkout.html.twig index 4077562..9b721d8 100644 --- a/checkout.html.twig +++ b/checkout.html.twig @@ -9,15 +9,15 @@ {% endblock %} {% block header %} - {% include '@components/Layout/Header/HeaderCheckout.twig' %} + {% include '@components/Layout/Header/HeaderCheckout.html.twig' %} {% endblock %} {% block body %} {% set products = resources('/api/front/products', {'productCategories.category.id':1, itemsPerPage:3}) %}
- {% include '@components/Layout/CrossSelling/CrossSelling.twig' with {products: products, title: 'Consultés récemment'} %} + {% include '@components/Layout/CrossSelling/CrossSelling.html.twig' with {products: products, title: 'Consultés récemment'} %}
{% endblock %} {% block footer %} - {% include '@components/Layout/Footer/FooterCheckout.twig' %} + {% include '@components/Layout/Footer/FooterCheckout.html.twig' %} {% endblock %} diff --git a/components/Atoms/Colors/Colors.twig b/components/Atoms/Colors/Colors.html.twig similarity index 100% rename from components/Atoms/Colors/Colors.twig rename to components/Atoms/Colors/Colors.html.twig diff --git a/components/Atoms/Colors/Colors.stories.js b/components/Atoms/Colors/Colors.stories.js index 6e44156..0da0b3a 100644 --- a/components/Atoms/Colors/Colors.stories.js +++ b/components/Atoms/Colors/Colors.stories.js @@ -1,4 +1,4 @@ -import Colors from './Colors.twig'; +import Colors from './Colors.html.twig'; import colors from './colors.json'; import './colors.css'; diff --git a/components/Atoms/Font/Font.stories.js b/components/Atoms/Font/Font.stories.js index e625046..4505a7b 100644 --- a/components/Atoms/Font/Font.stories.js +++ b/components/Atoms/Font/Font.stories.js @@ -1,6 +1,6 @@ -import Title from './Title.twig'; -import Paragraph from './Paragraph.twig'; -import Other from './Other.twig'; +import Title from './Title.html.twig'; +import Paragraph from './Paragraph.html.twig'; +import Other from './Other.html.twig'; import './font.css'; export default { diff --git a/components/Atoms/Font/Other.twig b/components/Atoms/Font/Other.html.twig similarity index 100% rename from components/Atoms/Font/Other.twig rename to components/Atoms/Font/Other.html.twig diff --git a/components/Atoms/Font/Paragraph.twig b/components/Atoms/Font/Paragraph.html.twig similarity index 100% rename from components/Atoms/Font/Paragraph.twig rename to components/Atoms/Font/Paragraph.html.twig diff --git a/components/Atoms/Font/Title.twig b/components/Atoms/Font/Title.html.twig similarity index 100% rename from components/Atoms/Font/Title.twig rename to components/Atoms/Font/Title.html.twig diff --git a/components/Atoms/Form/Checkbox.twig b/components/Atoms/Form/Checkbox.html.twig similarity index 100% rename from components/Atoms/Form/Checkbox.twig rename to components/Atoms/Form/Checkbox.html.twig diff --git a/components/Atoms/Form/Checkboxs.html.twig b/components/Atoms/Form/Checkboxs.html.twig new file mode 100644 index 0000000..fd8db80 --- /dev/null +++ b/components/Atoms/Form/Checkboxs.html.twig @@ -0,0 +1,7 @@ +
+ {% include './Checkbox.html.twig' with {label: 'Unchecked',disabled: disabled, error:error} %} + {% include './Checkbox.html.twig' with {label: 'Checked',disabled: disabled, error:error, checked:true} %} + {% include './Checkbox.html.twig' with + {label: 'Undefined',disabled: disabled, error:error, classes:'indeterminate'} + %} +
diff --git a/components/Atoms/Form/Checkboxs.twig b/components/Atoms/Form/Checkboxs.twig deleted file mode 100644 index 22dc900..0000000 --- a/components/Atoms/Form/Checkboxs.twig +++ /dev/null @@ -1,7 +0,0 @@ -
- {% include './Checkbox.twig' with {label: 'Unchecked',disabled: disabled, error:error} %} - {% include './Checkbox.twig' with {label: 'Checked',disabled: disabled, error:error, checked:true} %} - {% include './Checkbox.twig' with - {label: 'Undefined',disabled: disabled, error:error, classes:'indeterminate'} - %} -
diff --git a/components/Atoms/Form/Form.stories.js b/components/Atoms/Form/Form.stories.js index c2c6fc9..1e472be 100644 --- a/components/Atoms/Form/Form.stories.js +++ b/components/Atoms/Form/Form.stories.js @@ -1,6 +1,6 @@ -import Checkbox from './Checkboxs.twig'; -import Radio from './Radios.twig'; -import Toggle from './Toggles.twig'; +import Checkbox from './Checkboxs.html.twig'; +import Radio from './Radios.html.twig'; +import Toggle from './Toggles.html.twig'; import './checkbox.css'; import './toggle.css'; diff --git a/components/Atoms/Form/Radio.twig b/components/Atoms/Form/Radio.html.twig similarity index 100% rename from components/Atoms/Form/Radio.twig rename to components/Atoms/Form/Radio.html.twig diff --git a/components/Atoms/Form/Radios.html.twig b/components/Atoms/Form/Radios.html.twig new file mode 100644 index 0000000..61492f3 --- /dev/null +++ b/components/Atoms/Form/Radios.html.twig @@ -0,0 +1,5 @@ +
+ {% include './Radio.html.twig' with {label: 'Radio 1', name: 'radio',disabled: disabled, error:error} %} + {% include './Radio.html.twig' with {label: 'Radio 2', name: 'radio',disabled: disabled, error:error, checked:true} %} + {% include './Radio.html.twig' with {label: 'Radio 3', name: 'radio',disabled: disabled, error:error} %} +
diff --git a/components/Atoms/Form/Radios.twig b/components/Atoms/Form/Radios.twig deleted file mode 100644 index 88b4ea2..0000000 --- a/components/Atoms/Form/Radios.twig +++ /dev/null @@ -1,5 +0,0 @@ -
- {% include './Radio.twig' with {label: 'Radio 1', name: 'radio',disabled: disabled, error:error} %} - {% include './Radio.twig' with {label: 'Radio 2', name: 'radio',disabled: disabled, error:error, checked:true} %} - {% include './Radio.twig' with {label: 'Radio 3', name: 'radio',disabled: disabled, error:error} %} -
diff --git a/components/Atoms/Form/Toggle.twig b/components/Atoms/Form/Toggle.html.twig similarity index 100% rename from components/Atoms/Form/Toggle.twig rename to components/Atoms/Form/Toggle.html.twig diff --git a/components/Atoms/Form/Toggles.html.twig b/components/Atoms/Form/Toggles.html.twig new file mode 100644 index 0000000..1c48e8a --- /dev/null +++ b/components/Atoms/Form/Toggles.html.twig @@ -0,0 +1,4 @@ +{% include './Toggle.html.twig' with {labelOff: 'Off', labelOn: 'On',disabled: disabled, error:error} %} +
+ {% include './Toggle.html.twig' with {disabled: disabled, error:error, checked:true} %} +
diff --git a/components/Atoms/Form/Toggles.twig b/components/Atoms/Form/Toggles.twig deleted file mode 100644 index f37d581..0000000 --- a/components/Atoms/Form/Toggles.twig +++ /dev/null @@ -1,4 +0,0 @@ -{% include './Toggle.twig' with {labelOff: 'Off', labelOn: 'On',disabled: disabled, error:error} %} -
- {% include './Toggle.twig' with {disabled: disabled, error:error, checked:true} %} -
diff --git a/components/Atoms/Icon/Icon.twig b/components/Atoms/Icon/Icon.html.twig similarity index 100% rename from components/Atoms/Icon/Icon.twig rename to components/Atoms/Icon/Icon.html.twig diff --git a/components/Atoms/Icon/Icon.stories.js b/components/Atoms/Icon/Icon.stories.js index b5518e5..9279dd1 100644 --- a/components/Atoms/Icon/Icon.stories.js +++ b/components/Atoms/Icon/Icon.stories.js @@ -1,4 +1,4 @@ -import Icon from './Icon.twig'; +import Icon from './Icon.html.twig'; import icons from './icons.json'; export default { diff --git a/components/Layout/CategoryProduct/CategoryProduct.html.twig b/components/Layout/CategoryProduct/CategoryProduct.html.twig index 01661bf..69be4ae 100644 --- a/components/Layout/CategoryProduct/CategoryProduct.html.twig +++ b/components/Layout/CategoryProduct/CategoryProduct.html.twig @@ -6,15 +6,15 @@
{{ 'Filter'|trans }}
- {% include '@components/Molecules/Accordion/Accordion.twig' with { + {% include '@components/Molecules/Accordion/Accordion.html.twig' with { title: "Size" | trans, content: "" } %} - {% include '@components/Molecules/Accordion/Accordion.twig' with { + {% include '@components/Molecules/Accordion/Accordion.html.twig' with { title: "Color" | trans, content: "test" } %} - {% include '@components/Molecules/Accordion/Accordion.twig' with { + {% include '@components/Molecules/Accordion/Accordion.html.twig' with { title: "Material" | trans, content: "test" } %} @@ -27,7 +27,7 @@ {{ 'item(s)'|trans }}
- {% include '@components/Molecules/Fields/FieldSelect/FieldSelect.twig' with { + {% include '@components/Molecules/Fields/FieldSelect/FieldSelect.html.twig' with { label: "Sort by" | trans, tooltip: "Sort the products" | trans, placeholder: "Sort by" | trans, @@ -51,12 +51,12 @@
{% for product in products %} - {% include '@components/Organisms/ProductCard/ProductCard.twig' with product|merge({displayWishButton: true}) %} + {% include '@components/Organisms/ProductCard/ProductCard.html.twig' with product|merge({displayWishButton: true}) %} {% endfor %}
- {% include '@components/Molecules/Pagination/Pagination.twig' with { + {% include '@components/Molecules/Pagination/Pagination.html.twig' with { prevText: 'Previous' | trans, nextText: 'Next' | trans, currentPage: page, diff --git a/components/Layout/CrossSelling/CrossSelling.html.twig b/components/Layout/CrossSelling/CrossSelling.html.twig new file mode 100644 index 0000000..af2596a --- /dev/null +++ b/components/Layout/CrossSelling/CrossSelling.html.twig @@ -0,0 +1,19 @@ +{% set title = title|default('') %} + +{% set button = button|default(null) %} + + + +
+
{{ title }}
+
+ {% for product in this.products %} + {% include '@components/Organisms/ProductCard/ProductCard.html.twig' with product|merge({displayWishButton: true}) %} + {% endfor %} +
+ {% if button %} +
+ {% include '@components/Molecules/Button/Button.html.twig' with {text: button.label, href: button.href,icon_right:'chevron-right', variant:'secondary'} %} +
+ {% endif %} +
diff --git a/components/Layout/CrossSelling/CrossSelling.stories.js b/components/Layout/CrossSelling/CrossSelling.stories.js index cd2f533..78cf1d2 100644 --- a/components/Layout/CrossSelling/CrossSelling.stories.js +++ b/components/Layout/CrossSelling/CrossSelling.stories.js @@ -1,4 +1,4 @@ -import CrossSelling from './CrossSelling.twig'; +import CrossSelling from './CrossSelling.html.twig'; import { slider } from '../../../assets/js/slider'; import { MAX_SECTION_PRODUCT } from '../../base'; diff --git a/components/Layout/CrossSelling/CrossSelling.twig b/components/Layout/CrossSelling/CrossSelling.twig deleted file mode 100644 index c9c7cd3..0000000 --- a/components/Layout/CrossSelling/CrossSelling.twig +++ /dev/null @@ -1,21 +0,0 @@ -{% set title = title|default('') %} -{% set products = products|default(null) %} -{% set button = button|default(null) %} - -{% if categoryId is defined %} - {% set products = resources('/api/front/products', {'productCategories.category.id':categoryId, itemsPerPage:3}) %} -{% endif %} - -
-
{{ title }}
-
- {% for product in products %} - {% include '@components/Organisms/ProductCard/ProductCard.twig' with product|merge({displayWishButton: true}) %} - {% endfor %} -
- {% if button %} -
- {% include '@components/Molecules/Button/Button.twig' with {text: button.label, href: button.href,icon_right:'chevron-right', variant:'secondary'} %} -
- {% endif %} -
diff --git a/components/Layout/Footer/Footer.twig b/components/Layout/Footer/Footer.html.twig similarity index 90% rename from components/Layout/Footer/Footer.twig rename to components/Layout/Footer/Footer.html.twig index 43491f2..4660271 100644 --- a/components/Layout/Footer/Footer.twig +++ b/components/Layout/Footer/Footer.html.twig @@ -17,7 +17,7 @@ {% endif %} - {% include '@components/Molecules/Button/Button.twig' with {text: 'Contactez nous', type: 'primary', icon_right: "email", isFill: true, classes: "w-full md:w-auto Button--secondary Button--large"} %} + {% include '@components/Molecules/Button/Button.html.twig' with {text: 'Contactez nous', type: 'primary', icon_right: "email", isFill: true, classes: "w-full md:w-auto Button--secondary Button--large"} %}
    {% set footerLinkClass = 'underline hover:no-underline focus:no-underline hover:opacity-75 focus:opacity-75' %} diff --git a/components/Layout/Footer/Footer.stories.js b/components/Layout/Footer/Footer.stories.js index 2de4cc5..5e1c93f 100644 --- a/components/Layout/Footer/Footer.stories.js +++ b/components/Layout/Footer/Footer.stories.js @@ -1,5 +1,5 @@ -import Footer from './Footer.twig'; -import FooterCheckout from './FooterCheckout.twig'; +import Footer from './Footer.html.twig'; +import FooterCheckout from './FooterCheckout.html.twig'; export default { title: 'Design System/Layout/Footer' diff --git a/components/Layout/Footer/FooterCheckout.twig b/components/Layout/Footer/FooterCheckout.html.twig similarity index 100% rename from components/Layout/Footer/FooterCheckout.twig rename to components/Layout/Footer/FooterCheckout.html.twig diff --git a/components/Layout/Header/Header.twig b/components/Layout/Header/Header.html.twig similarity index 73% rename from components/Layout/Header/Header.twig rename to components/Layout/Header/Header.html.twig index c9d57e6..a1804a4 100644 --- a/components/Layout/Header/Header.twig +++ b/components/Layout/Header/Header.html.twig @@ -5,7 +5,7 @@
    {% if type == "searchbar" %} {% endif %} @@ -18,7 +18,7 @@ {% if type == "searchbar" %} {% else %} {% endif %} - {% include '@components/Organisms/HeaderNav/HeaderNav.twig' with {type: type} %} + {% include '@components/Organisms/HeaderNav/HeaderNav.html.twig' with {type: type} %} {% if type == "searchbar" %} diff --git a/components/Layout/Header/Header.stories.js b/components/Layout/Header/Header.stories.js index bbeceb8..a19aebd 100644 --- a/components/Layout/Header/Header.stories.js +++ b/components/Layout/Header/Header.stories.js @@ -1,6 +1,6 @@ -import Header from './Header.twig'; +import Header from './Header.html.twig'; import HeaderScript from './Header.js'; -import HeaderCheckout from './HeaderCheckout.twig'; +import HeaderCheckout from './HeaderCheckout.html.twig'; export default { title: 'Design System/Layout/Header' diff --git a/components/Layout/Header/HeaderCheckout.twig b/components/Layout/Header/HeaderCheckout.html.twig similarity index 100% rename from components/Layout/Header/HeaderCheckout.twig rename to components/Layout/Header/HeaderCheckout.html.twig diff --git a/components/Layout/Hero/Hero.twig b/components/Layout/Hero/Hero.html.twig similarity index 93% rename from components/Layout/Hero/Hero.twig rename to components/Layout/Hero/Hero.html.twig index 66fbbf1..239a8f9 100644 --- a/components/Layout/Hero/Hero.twig +++ b/components/Layout/Hero/Hero.html.twig @@ -12,7 +12,7 @@
    {{ block.title | default('Title') }}
    - {% include '@components/Molecules/Button/Button.twig' with { + {% include '@components/Molecules/Button/Button.html.twig' with { text: block.linkLabel, type: 'primary', icon_right: "chevron-right", diff --git a/components/Layout/Hero/Hero.stories.js b/components/Layout/Hero/Hero.stories.js index ca5c85b..7bdc7e5 100644 --- a/components/Layout/Hero/Hero.stories.js +++ b/components/Layout/Hero/Hero.stories.js @@ -1,17 +1,16 @@ -import Hero from './Hero.twig'; +import Hero from './Hero.html.twig'; export default { title: 'Design System/Layout/Hero' }; - - export const Base = { render: (args) => Hero(args), args: { blocks: [ { - image: 'https://sabatier-k.openstudio-lab.com/cache/images/carousel/design780x480-4-4.png', + image: + 'https://sabatier-k.openstudio-lab.com/cache/images/carousel/design780x480-4-4.png', title: 'Ici une phrase d’accroche pour accompagner le visuel', href: 'http://sabatier-k.openstudio-lab.com/couteaux-sabatier.html', linkLabel: 'Je découvre' @@ -31,7 +30,6 @@ export const Base = { ] }, argTypes: { - blocks: { control: 'object' }, + blocks: { control: 'object' } } }; - diff --git a/components/Layout/ProductCategory/ProductCategory.html.twig b/components/Layout/ProductCategory/ProductCategory.html.twig new file mode 100644 index 0000000..15f586b --- /dev/null +++ b/components/Layout/ProductCategory/ProductCategory.html.twig @@ -0,0 +1,12 @@ +{% set title = title|default('') %} +{% set categories = this.categories|default([]) %} + +
    +

    {{ title }}

    +
    + +
    + {% for category in categories %} + {% include '@components/Organisms/CategoryCard/CategoryCard.html.twig' with category %} + {% endfor %} +
    diff --git a/components/Layout/ProductCategory/ProductCategory.stories.js b/components/Layout/ProductCategory/ProductCategory.stories.js index 4538387..c981093 100644 --- a/components/Layout/ProductCategory/ProductCategory.stories.js +++ b/components/Layout/ProductCategory/ProductCategory.stories.js @@ -1,4 +1,4 @@ -import ProductCategory from './ProductCategory.twig'; +import ProductCategory from './ProductCategory.html.twig'; export default { title: 'Design System/Layout/Product Category' diff --git a/components/Layout/ProductCategory/ProductCategory.twig b/components/Layout/ProductCategory/ProductCategory.twig deleted file mode 100644 index 04c0ad9..0000000 --- a/components/Layout/ProductCategory/ProductCategory.twig +++ /dev/null @@ -1,12 +0,0 @@ -{% set title = title|default('') %} -{% set categories = categories|default([]) %} - -
    -

    {{ title }}

    -
    - -
    - {% for category in categories %} - {% include '@components/Organisms/CategoryCard/CategoryCard.twig' with category %} - {% endfor %} -
    diff --git a/components/Layout/ProductGallery/ProductGallery.twig b/components/Layout/ProductGallery/ProductGallery.html.twig similarity index 100% rename from components/Layout/ProductGallery/ProductGallery.twig rename to components/Layout/ProductGallery/ProductGallery.html.twig diff --git a/components/Layout/ProductGallery/test.twig b/components/Layout/ProductGallery/test.twig deleted file mode 100644 index b0b9969..0000000 --- a/components/Layout/ProductGallery/test.twig +++ /dev/null @@ -1 +0,0 @@ -

    Toto

    diff --git a/components/Layout/PromotionalBanner/PromotionalBanner.twig b/components/Layout/PromotionalBanner/PromotionalBanner.html.twig similarity index 100% rename from components/Layout/PromotionalBanner/PromotionalBanner.twig rename to components/Layout/PromotionalBanner/PromotionalBanner.html.twig diff --git a/components/Layout/PromotionalBanner/PromotionalBanner.stories.js b/components/Layout/PromotionalBanner/PromotionalBanner.stories.js index 305a18b..1f5a8de 100644 --- a/components/Layout/PromotionalBanner/PromotionalBanner.stories.js +++ b/components/Layout/PromotionalBanner/PromotionalBanner.stories.js @@ -1,4 +1,4 @@ -import PromotionalBanner from './PromotionalBanner.twig'; +import PromotionalBanner from './PromotionalBanner.html.twig'; import promotionalBanner from './PromotionalBanner'; export default { diff --git a/components/Layout/Reinsurance/Reinsurance.twig b/components/Layout/Reinsurance/Reinsurance.html.twig similarity index 100% rename from components/Layout/Reinsurance/Reinsurance.twig rename to components/Layout/Reinsurance/Reinsurance.html.twig diff --git a/components/Layout/Reinsurance/Reinsurance.stories.js b/components/Layout/Reinsurance/Reinsurance.stories.js index bd7990f..e580ec6 100644 --- a/components/Layout/Reinsurance/Reinsurance.stories.js +++ b/components/Layout/Reinsurance/Reinsurance.stories.js @@ -1,4 +1,4 @@ -import Reinsurance from './Reinsurance.twig'; +import Reinsurance from './Reinsurance.html.twig'; export default { title: 'Design System/Layout/Reinsurance' diff --git a/components/Layout/Review/Review.twig b/components/Layout/Review/Review.html.twig similarity index 57% rename from components/Layout/Review/Review.twig rename to components/Layout/Review/Review.html.twig index 4c0f1e5..fe3d90c 100644 --- a/components/Layout/Review/Review.twig +++ b/components/Layout/Review/Review.html.twig @@ -6,8 +6,8 @@
    {{ title }}
    {% for review in reviews %} - {% include '@components/Organisms/Card/Review/Review.twig' with review %} + {% include '@components/Organisms/Card/Review/Review.html.twig' with review %} {% endfor %}
    - {% include '@components/Molecules/Button/Button.twig' with {text: button.label, href: button.href,icon_right:'chevron-right', variant:'secondary', classes: "mt-5"} %} + {% include '@components/Molecules/Button/Button.html.twig' with {text: button.label, href: button.href,icon_right:'chevron-right', variant:'secondary', classes: "mt-5"} %}
    diff --git a/components/Layout/Review/Review.stories.js b/components/Layout/Review/Review.stories.js index 5751a23..dca09bb 100644 --- a/components/Layout/Review/Review.stories.js +++ b/components/Layout/Review/Review.stories.js @@ -1,4 +1,4 @@ -import Review from './Review.twig'; +import Review from './Review.html.twig'; import { slider } from '../../../assets/js/slider'; export default { diff --git a/components/Layout/SimilarContent/SimilarContent.twig b/components/Layout/SimilarContent/SimilarContent.html.twig similarity index 67% rename from components/Layout/SimilarContent/SimilarContent.twig rename to components/Layout/SimilarContent/SimilarContent.html.twig index 0f590c7..e8fb7f5 100644 --- a/components/Layout/SimilarContent/SimilarContent.twig +++ b/components/Layout/SimilarContent/SimilarContent.html.twig @@ -7,10 +7,10 @@
    {% for similarContent in similarContents %} - {% include '@components/Organisms/SimilarContentCard/SimilarContentCard.twig' with similarContent %} + {% include '@components/Organisms/SimilarContentCard/SimilarContentCard.html.twig' with similarContent %} {% endfor %}
    {% if button %} - {% include '@components/Molecules/Button/Button.twig' with {text: button.label, href: button.href,icon_right:'chevron-right', variant:'secondary', classes: 'mt-5'} %} + {% include '@components/Molecules/Button/Button.html.twig' with {text: button.label, href: button.href,icon_right:'chevron-right', variant:'secondary', classes: 'mt-5'} %} {% endif %}
diff --git a/components/Layout/SimilarContent/SimilarContent.stories.js b/components/Layout/SimilarContent/SimilarContent.stories.js index e160151..94bbb6b 100644 --- a/components/Layout/SimilarContent/SimilarContent.stories.js +++ b/components/Layout/SimilarContent/SimilarContent.stories.js @@ -1,4 +1,4 @@ -import SimilarContent from './SimilarContent.twig'; +import SimilarContent from './SimilarContent.html.twig'; import { slider } from '../../../assets/js/slider'; export default { diff --git a/components/Layout/Subheader/Category/SubheaderCategory.twig b/components/Layout/Subheader/Category/SubheaderCategory.html.twig similarity index 81% rename from components/Layout/Subheader/Category/SubheaderCategory.twig rename to components/Layout/Subheader/Category/SubheaderCategory.html.twig index b23cbfa..107c7d8 100644 --- a/components/Layout/Subheader/Category/SubheaderCategory.twig +++ b/components/Layout/Subheader/Category/SubheaderCategory.html.twig @@ -13,7 +13,7 @@
{{ nbProducts }} {{ 'product(s)'|trans }}
- {% include '@components/Molecules/Button/Button.twig' with {text: 'Filter & Sort'|trans, icon_left:'filter', variant: 'secondary'} %} + {% include '@components/Molecules/Button/Button.html.twig' with {text: 'Filter & Sort'|trans, icon_left:'filter', variant: 'secondary'} %}
diff --git a/components/Layout/Subheader/Category/SubheaderCategory.stories.js b/components/Layout/Subheader/Category/SubheaderCategory.stories.js index 677ec82..3230783 100644 --- a/components/Layout/Subheader/Category/SubheaderCategory.stories.js +++ b/components/Layout/Subheader/Category/SubheaderCategory.stories.js @@ -1,4 +1,4 @@ -import SubheaderCategory from './SubheaderCategory.twig'; +import SubheaderCategory from './SubheaderCategory.html.twig'; export default { title: 'Design System/Layout/Subheader/Category' diff --git a/components/Layout/Subheader/ContentPage/SubheaderContentPage.twig b/components/Layout/Subheader/ContentPage/SubheaderContentPage.html.twig similarity index 100% rename from components/Layout/Subheader/ContentPage/SubheaderContentPage.twig rename to components/Layout/Subheader/ContentPage/SubheaderContentPage.html.twig diff --git a/components/Layout/Subheader/ContentPage/SubheaderContentPage.stories.js b/components/Layout/Subheader/ContentPage/SubheaderContentPage.stories.js index 8fcc3bc..4b16538 100644 --- a/components/Layout/Subheader/ContentPage/SubheaderContentPage.stories.js +++ b/components/Layout/Subheader/ContentPage/SubheaderContentPage.stories.js @@ -1,4 +1,4 @@ -import SubheaderContentPage from './SubheaderContentPage.twig'; +import SubheaderContentPage from './SubheaderContentPage.html.twig'; export default { title: 'Design System/Layout/Subheader/Content Page' diff --git a/components/Layout/Subheader/Orders/SubheaderOrders.html.twig b/components/Layout/Subheader/Orders/SubheaderOrders.html.twig new file mode 100644 index 0000000..41334a7 --- /dev/null +++ b/components/Layout/Subheader/Orders/SubheaderOrders.html.twig @@ -0,0 +1,12 @@ +{% set title = title|default('') %} +{% set selected = selected|default('in_progress') %} + +
+
+

{{ title }}

+
+ {% include '@components/Molecules/Button/Button.html.twig' with {text: 'In progress'|trans, sharp:true, variant:selected == 'in_progress' ? 'primary' : 'secondary'} %} + {% include '@components/Molecules/Button/Button.html.twig' with {text: 'History'|trans, sharp:true, variant: selected == 'in_progress' ? 'secondary' : 'primary'} %} +
+
+
diff --git a/components/Layout/Subheader/Orders/SubheaderOrders.stories.js b/components/Layout/Subheader/Orders/SubheaderOrders.stories.js index 13c842f..e6690b2 100644 --- a/components/Layout/Subheader/Orders/SubheaderOrders.stories.js +++ b/components/Layout/Subheader/Orders/SubheaderOrders.stories.js @@ -1,4 +1,4 @@ -import SubheaderOrders from './SubheaderOrders.twig'; +import SubheaderOrders from './SubheaderOrders.html.twig'; export default { title: 'Design System/Layout/Subheader/Orders' diff --git a/components/Layout/Subheader/Orders/SubheaderOrders.twig b/components/Layout/Subheader/Orders/SubheaderOrders.twig deleted file mode 100644 index 61ca41f..0000000 --- a/components/Layout/Subheader/Orders/SubheaderOrders.twig +++ /dev/null @@ -1,12 +0,0 @@ -{% set title = title|default('') %} -{% set selected = selected|default('in_progress') %} - -
-
-

{{ title }}

-
- {% include '@components/Molecules/Button/Button.twig' with {text: 'In progress'|trans, sharp:true, variant:selected == 'in_progress' ? 'primary' : 'secondary'} %} - {% include '@components/Molecules/Button/Button.twig' with {text: 'History'|trans, sharp:true, variant: selected == 'in_progress' ? 'secondary' : 'primary'} %} -
-
-
diff --git a/components/Layout/Subheader/SearchResult/SubheaderSearch.twig b/components/Layout/Subheader/SearchResult/SubheaderSearch.html.twig similarity index 51% rename from components/Layout/Subheader/SearchResult/SubheaderSearch.twig rename to components/Layout/Subheader/SearchResult/SubheaderSearch.html.twig index 4884dfb..50bd4eb 100644 --- a/components/Layout/Subheader/SearchResult/SubheaderSearch.twig +++ b/components/Layout/Subheader/SearchResult/SubheaderSearch.html.twig @@ -5,11 +5,11 @@

{{ title }}

- {% include '@components/Molecules/SearchBar/SearchBar.twig' with { label: "Find a delivery address"|trans, classes: 'SearchBar--white ',placeholder: "e.g. City, Postcode"|trans,iconButtonLeft:true, iconButton: "search" } %} + {% include '@components/Molecules/SearchBar/SearchBar.html.twig' with { label: "Find a delivery address"|trans, classes: 'SearchBar--white ',placeholder: "e.g. City, Postcode"|trans,iconButtonLeft:true, iconButton: "search" } %}
{{ nbProducts}} {{ 'product(s)'|trans }}
- {% include '@components/Molecules/Button/Button.twig' with {text: 'Filter & Sort'|trans,icon_left:'filter', variant: 'secondary'} %} + {% include '@components/Molecules/Button/Button.html.twig' with {text: 'Filter & Sort'|trans,icon_left:'filter', variant: 'secondary'} %}
diff --git a/components/Layout/Subheader/SearchResult/SubheaderSearch.stories.js b/components/Layout/Subheader/SearchResult/SubheaderSearch.stories.js index 277c2f4..21af82c 100644 --- a/components/Layout/Subheader/SearchResult/SubheaderSearch.stories.js +++ b/components/Layout/Subheader/SearchResult/SubheaderSearch.stories.js @@ -1,4 +1,4 @@ -import SubheaderSearch from './SubheaderSearch.twig'; +import SubheaderSearch from './SubheaderSearch.html.twig'; export default { title: 'Design System/Layout/Subheader/Search Results' diff --git a/components/Layout/Subheader/TitleOnly/SubheaderTitle.twig b/components/Layout/Subheader/TitleOnly/SubheaderTitle.html.twig similarity index 100% rename from components/Layout/Subheader/TitleOnly/SubheaderTitle.twig rename to components/Layout/Subheader/TitleOnly/SubheaderTitle.html.twig diff --git a/components/Layout/Subheader/TitleOnly/SubheaderTitle.stories.js b/components/Layout/Subheader/TitleOnly/SubheaderTitle.stories.js index 2f28b7a..ca2dee8 100644 --- a/components/Layout/Subheader/TitleOnly/SubheaderTitle.stories.js +++ b/components/Layout/Subheader/TitleOnly/SubheaderTitle.stories.js @@ -1,4 +1,4 @@ -import SubheaderTitle from './SubheaderTitle.twig'; +import SubheaderTitle from './SubheaderTitle.html.twig'; export default { title: 'Design System/Layout/Subheader/TitleOnly' diff --git a/components/Molecules/Accordion/Accordion.twig b/components/Molecules/Accordion/Accordion.html.twig similarity index 100% rename from components/Molecules/Accordion/Accordion.twig rename to components/Molecules/Accordion/Accordion.html.twig diff --git a/components/Molecules/Accordion/Accordion.stories.js b/components/Molecules/Accordion/Accordion.stories.js index a744a17..9742c67 100644 --- a/components/Molecules/Accordion/Accordion.stories.js +++ b/components/Molecules/Accordion/Accordion.stories.js @@ -1,6 +1,6 @@ -import Accordion from './Accordion.twig'; -import FilterList from '../Filters/FilterList/FilterList.twig'; -import FieldInput from '../Fields/FieldInput/FieldInput.twig'; +import Accordion from './Accordion.html.twig'; +import FilterList from '../Filters/FilterList/FilterList.html.twig'; +import FieldInput from '../Fields/FieldInput/FieldInput.html.twig'; export default { title: 'Design System/Molecules/Accordion' @@ -10,19 +10,19 @@ const commonProps = { args: { title: 'Concertina', iconPlus: null, - iconMinus: null, + iconMinus: null }, argTypes: { variant: { options: ['text', 'promo', 'filter', 'faq'], - control: { type: 'select' }, + control: { type: 'select' } }, - iconPlus: { - control: { type: 'text' }, - }, - iconMinus: { - control: { type: 'text' }, + iconPlus: { + control: { type: 'text' } }, + iconMinus: { + control: { type: 'text' } + } } }; diff --git a/components/Molecules/Breadcrumb/Breadcrumb.twig b/components/Molecules/Breadcrumb/Breadcrumb.html.twig similarity index 100% rename from components/Molecules/Breadcrumb/Breadcrumb.twig rename to components/Molecules/Breadcrumb/Breadcrumb.html.twig diff --git a/components/Molecules/Breadcrumb/Breadcrumb.stories.js b/components/Molecules/Breadcrumb/Breadcrumb.stories.js index e190360..b290469 100644 --- a/components/Molecules/Breadcrumb/Breadcrumb.stories.js +++ b/components/Molecules/Breadcrumb/Breadcrumb.stories.js @@ -1,4 +1,4 @@ -import Breadcrumb from './Breadcrumb.twig'; +import Breadcrumb from './Breadcrumb.html.twig'; import breadcrumbFunction from './Breadcrumb.js'; export default { @@ -19,7 +19,7 @@ export const Base = { export const Lengthy = { render: (args) => Breadcrumb(args), play: () => { - breadcrumbFunction() + breadcrumbFunction(); }, args: { items: [ @@ -29,6 +29,5 @@ export const Lengthy = { { label: 'Page mère', href: '#' }, { label: 'Page actuelle' } ] - } }; diff --git a/components/Molecules/Button/Button.twig b/components/Molecules/Button/Button.html.twig similarity index 100% rename from components/Molecules/Button/Button.twig rename to components/Molecules/Button/Button.html.twig diff --git a/components/Molecules/Button/Button.stories.js b/components/Molecules/Button/Button.stories.js index 15be54a..164daf4 100644 --- a/components/Molecules/Button/Button.stories.js +++ b/components/Molecules/Button/Button.stories.js @@ -1,7 +1,7 @@ -import Compact from './Classic.twig'; -import Quantities from './Quantities.twig'; -import Rounds from './Rounds.twig'; -import {quantityButton} from "./button"; +import Compact from './Classic.html.twig'; +import Quantities from './Quantities.html.twig'; +import Rounds from './Rounds.html.twig'; +import { quantityButton } from './button'; export default { title: 'Design System/Molecules/Button' diff --git a/components/Molecules/Button/Classic.twig b/components/Molecules/Button/Classic.html.twig similarity index 84% rename from components/Molecules/Button/Classic.twig rename to components/Molecules/Button/Classic.html.twig index 8cd5df8..b65cda1 100644 --- a/components/Molecules/Button/Classic.twig +++ b/components/Molecules/Button/Classic.html.twig @@ -3,11 +3,11 @@
Large
- {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: false, classes:'Button--large', variant:variant, fill:fill, rectangle:rectangle, text:customText, icon_left: iconLeft, icon_right: iconRight} %} - {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: true, classes:'Button--large', variant:variant, fill:fill, rectangle:rectangle, text:customText, icon_left: iconLeft, icon_right: iconRight} %} @@ -17,11 +17,11 @@
Medium
- {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: false, variant:variant, fill:fill, rectangle:rectangle, text:customText, icon_left: iconLeft, icon_right: iconRight} %} - {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: true, classes:classes, text:customText, icon_left: iconLeft, icon_right: iconRight} %} @@ -31,11 +31,11 @@
Small
- {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: false, classes:'Button--small', variant:variant, fill:fill, rectangle:rectangle, text:customText, icon_left: iconLeft, icon_right: iconRight} %} - {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: true, classes:'Button--small', variant:variant, fill:fill, rectangle:rectangle, text:customText, icon_left: iconLeft, icon_right: iconRight} %} diff --git a/components/Molecules/Button/Quantities.html.twig b/components/Molecules/Button/Quantities.html.twig new file mode 100644 index 0000000..55950fc --- /dev/null +++ b/components/Molecules/Button/Quantities.html.twig @@ -0,0 +1,39 @@ + +
+
Large
+
+ {% include './Quantity.html.twig' with {disabled: false, value:1, classes:'Button--large'} %} + {% include './Quantity.html.twig' with {disabled: true, value:1, classes:'Button--large'} %} + {% include './QuantityButton.html.twig' with {value:1, classes:'Button--large', text:'Ajouter au panier', icon:'cart'} %} +
+ +
Medium
+
+ {% include './Quantity.html.twig' with {disabled: false, value:1} %} + {% include './Quantity.html.twig' with {disabled: true, value:1} %} + {% include './QuantityButton.html.twig' with {value:1, text:'Ajouter au panier', icon:'cart'} %} + {% include './QuantityButton.html.twig' with {disabled: true,value:1, text:'Ajouter au panier', icon:'cart'} %} + +
+ +
Small
+
+ {% include './Quantity.html.twig' with {disabled: false, value:1, classes:'Button--small'} %} + {% include './Quantity.html.twig' with {disabled: true, value:1, classes:'Button--small'} %} + {% include './QuantityButton.html.twig' with {value:1, classes:'Button--small', text:'Ajouter au panier', icon:'cart'} %} + +
+ +
XSmall
+
+ {% include './Quantity.html.twig' with {disabled: false, value:1, classes:'Button--small Button--xsmall'} %} + {% include './Quantity.html.twig' with {disabled: true, value:1, classes:'Button--small Button--xsmall'} %} + +
+ +
Secondary
+
+ {% include './Quantity.html.twig' with {disabled: false, value:1, classes:'Button--secondary'} %} + {% include './Quantity.html.twig' with {disabled: true, value:1, classes:'Button--secondary'} %} +
+
diff --git a/components/Molecules/Button/Quantities.twig b/components/Molecules/Button/Quantities.twig deleted file mode 100644 index 78495df..0000000 --- a/components/Molecules/Button/Quantities.twig +++ /dev/null @@ -1,39 +0,0 @@ - -
-
Large
-
- {% include './Quantity.twig' with {disabled: false, value:1, classes:'Button--large'} %} - {% include './Quantity.twig' with {disabled: true, value:1, classes:'Button--large'} %} - {% include './QuantityButton.twig' with {value:1, classes:'Button--large', text:'Ajouter au panier', icon:'cart'} %} -
- -
Medium
-
- {% include './Quantity.twig' with {disabled: false, value:1} %} - {% include './Quantity.twig' with {disabled: true, value:1} %} - {% include './QuantityButton.twig' with {value:1, text:'Ajouter au panier', icon:'cart'} %} - {% include './QuantityButton.twig' with {disabled: true,value:1, text:'Ajouter au panier', icon:'cart'} %} - -
- -
Small
-
- {% include './Quantity.twig' with {disabled: false, value:1, classes:'Button--small'} %} - {% include './Quantity.twig' with {disabled: true, value:1, classes:'Button--small'} %} - {% include './QuantityButton.twig' with {value:1, classes:'Button--small', text:'Ajouter au panier', icon:'cart'} %} - -
- -
XSmall
-
- {% include './Quantity.twig' with {disabled: false, value:1, classes:'Button--small Button--xsmall'} %} - {% include './Quantity.twig' with {disabled: true, value:1, classes:'Button--small Button--xsmall'} %} - -
- -
Secondary
-
- {% include './Quantity.twig' with {disabled: false, value:1, classes:'Button--secondary'} %} - {% include './Quantity.twig' with {disabled: true, value:1, classes:'Button--secondary'} %} -
-
diff --git a/components/Molecules/Button/Quantity.twig b/components/Molecules/Button/Quantity.html.twig similarity index 100% rename from components/Molecules/Button/Quantity.twig rename to components/Molecules/Button/Quantity.html.twig diff --git a/components/Molecules/Button/QuantityButton.twig b/components/Molecules/Button/QuantityButton.html.twig similarity index 50% rename from components/Molecules/Button/QuantityButton.twig rename to components/Molecules/Button/QuantityButton.html.twig index 814acc0..4c15b0f 100644 --- a/components/Molecules/Button/QuantityButton.twig +++ b/components/Molecules/Button/QuantityButton.html.twig @@ -6,6 +6,6 @@ {% set fill = fill|default(false) %}
- {% include '@components/Molecules/Button/Quantity.twig' with {disabled: disabled, value:value, classes:classes} %} - {% include '@components/Molecules/Button/Button.twig' with {disabled: disabled, text:text, classes:classes, icon_left: icon, fill:fill} %} + {% include '@components/Molecules/Button/Quantity.html.twig' with {disabled: disabled, value:value, classes:classes} %} + {% include '@components/Molecules/Button/Button.html.twig' with {disabled: disabled, text:text, classes:classes, icon_left: icon, fill:fill} %}
diff --git a/components/Molecules/Button/Rounds.twig b/components/Molecules/Button/Rounds.html.twig similarity index 80% rename from components/Molecules/Button/Rounds.twig rename to components/Molecules/Button/Rounds.html.twig index 6901e49..fd10422 100644 --- a/components/Molecules/Button/Rounds.twig +++ b/components/Molecules/Button/Rounds.html.twig @@ -4,12 +4,12 @@
Large
- {% include './Button.twig' with + {% include './Button.html.twig' with {classes:'Button--large', round:true, variant:variant, icon_left: icon} %} - {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: true,round:true, classes:'Button--large', icon_left: icon} %}
@@ -18,10 +18,10 @@
Small
- {% include './Button.twig' with + {% include './Button.html.twig' with {classes:'Button--small', round:true, icon_left: icon} %} - {% include './Button.twig' with + {% include './Button.html.twig' with {disabled: true, classes:'Button--small', round:true, icon_left: icon} %}
diff --git a/components/Molecules/Dropdown/Dropdown.twig b/components/Molecules/Dropdown/Dropdown.html.twig similarity index 100% rename from components/Molecules/Dropdown/Dropdown.twig rename to components/Molecules/Dropdown/Dropdown.html.twig diff --git a/components/Molecules/Dropdown/Dropdown.stories.js b/components/Molecules/Dropdown/Dropdown.stories.js index 382a047..368e9f2 100644 --- a/components/Molecules/Dropdown/Dropdown.stories.js +++ b/components/Molecules/Dropdown/Dropdown.stories.js @@ -1,4 +1,4 @@ -import Dropdown from './Dropdown.twig'; +import Dropdown from './Dropdown.html.twig'; import dropdownFunction from './Dropdown.js'; export default { @@ -8,14 +8,19 @@ export default { export const Base = { render: (args) => Dropdown(args), args: { - id: "civility", - placeholder: "Civilité", - options: [{ value: 1, label: "M." }, { value: 2, label: "Mme" }, { value: 3, label: "Neutre / Non binaire / Agenre" }, { value: 4, label: "Je ne souhaite pas répondre" }], + id: 'civility', + placeholder: 'Civilité', + options: [ + { value: 1, label: 'M.' }, + { value: 2, label: 'Mme' }, + { value: 3, label: 'Neutre / Non binaire / Agenre' }, + { value: 4, label: 'Je ne souhaite pas répondre' } + ] }, play: () => { - dropdownFunction() + dropdownFunction(); }, parameters: { - backgrounds: { default: 'grey' }, - }, + backgrounds: { default: 'grey' } + } }; diff --git a/components/Molecules/Favorite/Favorite.twig b/components/Molecules/Favorite/Favorite.html.twig similarity index 100% rename from components/Molecules/Favorite/Favorite.twig rename to components/Molecules/Favorite/Favorite.html.twig diff --git a/components/Molecules/Favorite/Favorite.stories.js b/components/Molecules/Favorite/Favorite.stories.js index 162d41a..76c5957 100644 --- a/components/Molecules/Favorite/Favorite.stories.js +++ b/components/Molecules/Favorite/Favorite.stories.js @@ -1,4 +1,4 @@ -import Favorite from './Favorite.twig'; +import Favorite from './Favorite.html.twig'; export default { title: 'Design System/Molecules/Favorite' diff --git a/components/Molecules/Fields/FieldInput/FieldInput.twig b/components/Molecules/Fields/FieldInput/FieldInput.html.twig similarity index 90% rename from components/Molecules/Fields/FieldInput/FieldInput.twig rename to components/Molecules/Fields/FieldInput/FieldInput.html.twig index bdeb19f..34c3735 100644 --- a/components/Molecules/Fields/FieldInput/FieldInput.twig +++ b/components/Molecules/Fields/FieldInput/FieldInput.html.twig @@ -42,7 +42,7 @@ {% endif %} {% if tooltip %} - {% include '../../Tooltip/Tooltip.twig' with {tooltip: tooltip, position: 'bottom'} %} + {% include '../../Tooltip/Tooltip.html.twig' with {tooltip: tooltip, position: 'bottom'} %} {% endif %}
@@ -57,7 +57,7 @@ {% endif %} {% if button %}
- {% include '../../Button/Button.twig' with {text: button, rectangle: true, type: "submit", classes: size == 'small' ? ' Button--small' : ''} %} + {% include '../../Button/Button.html.twig' with {text: button, rectangle: true, type: "submit", classes: size == 'small' ? ' Button--small' : ''} %}
{% endif %}
diff --git a/components/Molecules/Fields/FieldInput/FieldInput.stories.js b/components/Molecules/Fields/FieldInput/FieldInput.stories.js index 3bc62c5..c8ba138 100644 --- a/components/Molecules/Fields/FieldInput/FieldInput.stories.js +++ b/components/Molecules/Fields/FieldInput/FieldInput.stories.js @@ -1,4 +1,4 @@ -import FieldInput from './FieldInput.twig'; +import FieldInput from './FieldInput.html.twig'; import fieldInputFunction from './FieldInput.js'; export default { diff --git a/components/Molecules/Fields/FieldNumber/FieldNumber.twig b/components/Molecules/Fields/FieldNumber/FieldNumber.html.twig similarity index 100% rename from components/Molecules/Fields/FieldNumber/FieldNumber.twig rename to components/Molecules/Fields/FieldNumber/FieldNumber.html.twig diff --git a/components/Molecules/Fields/FieldNumber/FieldNumber.stories.js b/components/Molecules/Fields/FieldNumber/FieldNumber.stories.js index ed790c0..0408c42 100644 --- a/components/Molecules/Fields/FieldNumber/FieldNumber.stories.js +++ b/components/Molecules/Fields/FieldNumber/FieldNumber.stories.js @@ -1,4 +1,4 @@ -import FieldNumber from './FieldNumber.twig'; +import FieldNumber from './FieldNumber.html.twig'; import fieldNumberFunction from './FieldNumber.js'; export default { @@ -11,10 +11,10 @@ export const Base = { fieldNumberFunction(); }, args: { - name: "Indication", - min: "", - max: "", - error: "", + name: 'Indication', + min: '', + max: '', + error: '' }, argTypes: { disabled: { @@ -22,6 +22,6 @@ export const Base = { }, required: { control: { type: 'boolean' } - }, + } } }; diff --git a/components/Molecules/Fields/FieldSelect/FieldSelect.twig b/components/Molecules/Fields/FieldSelect/FieldSelect.html.twig similarity index 93% rename from components/Molecules/Fields/FieldSelect/FieldSelect.twig rename to components/Molecules/Fields/FieldSelect/FieldSelect.html.twig index 240e6d9..e644542 100644 --- a/components/Molecules/Fields/FieldSelect/FieldSelect.twig +++ b/components/Molecules/Fields/FieldSelect/FieldSelect.html.twig @@ -27,7 +27,7 @@ {{ label }}{% if required and label %} *{% endif %} {% if tooltip %} - {% include '@components/Molecules/Tooltip/Tooltip.twig' with {tooltip: tooltip, position: 'bottom'} %} + {% include '@components/Molecules/Tooltip/Tooltip.html.twig' with {tooltip: tooltip, position: 'bottom'} %} {% endif %}