@agilant/toga-blox 1.0.9 → 1.0.11
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/dist/components/Badge/Badge.d.ts +4 -0
- package/dist/components/Badge/Badge.js +9 -0
- package/dist/components/Badge/Badge.stories.d.ts +7 -0
- package/dist/components/Badge/Badge.stories.js +196 -0
- package/dist/components/Badge/Badge.test.d.ts +1 -0
- package/dist/components/Badge/Badge.test.js +80 -0
- package/dist/components/Badge/Badge.types.d.ts +25 -0
- package/dist/components/Badge/Badge.types.js +1 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Card/Card.d.ts +4 -0
- package/dist/components/Card/Card.js +11 -0
- package/dist/components/Card/Card.stories.d.ts +12 -0
- package/dist/components/Card/Card.stories.js +173 -0
- package/dist/components/Card/Card.test.d.ts +1 -0
- package/dist/components/Card/Card.test.js +35 -0
- package/dist/components/Card/Card.types.d.ts +10 -0
- package/dist/components/Card/Card.types.js +1 -0
- package/dist/components/Card/DUMMYPRODUCTDATA.json +826 -0
- package/dist/components/Card/index.d.ts +3 -0
- package/dist/components/Card/templates/CategoryCardTemplate.d.ts +27 -0
- package/dist/components/Card/templates/CategoryCardTemplate.js +7 -0
- package/dist/components/Card/templates/CompassCardTemplate.d.ts +23 -0
- package/dist/components/Card/templates/CompassCardTemplate.js +7 -0
- package/dist/components/Card/templates/CounterContentCardTemplate.d.ts +53 -0
- package/dist/components/Card/templates/CounterContentCardTemplate.js +46 -0
- package/dist/components/Card/templates/HorizontalCardTemplate.d.ts +65 -0
- package/dist/components/Card/templates/HorizontalCardTemplate.js +13 -0
- package/dist/components/Card/templates/ItemCardTemplate.d.ts +61 -0
- package/dist/components/Card/templates/ItemCardTemplate.js +9 -0
- package/dist/components/Card/templates/KitContentCardTemplate.d.ts +53 -0
- package/dist/components/Card/templates/KitContentCardTemplate.js +9 -0
- package/dist/components/Card/templates/ShippingAddressCardTemplate.d.ts +15 -0
- package/dist/components/Card/templates/ShippingAddressCardTemplate.js +9 -0
- package/dist/components/Card/templates/VerticalCardTemplate.d.ts +61 -0
- package/dist/components/Card/templates/VerticalCardTemplate.js +9 -0
- package/dist/components/CounterButton/CounterButton.d.ts +4 -0
- package/dist/components/CounterButton/CounterButton.js +7 -0
- package/dist/components/CounterButton/CounterButton.stories.d.ts +4 -0
- package/dist/components/CounterButton/CounterButton.stories.js +69 -0
- package/dist/components/CounterButton/CounterButton.types.d.ts +10 -0
- package/dist/components/CounterButton/CounterButton.types.js +1 -0
- package/dist/components/Description/Description.d.ts +4 -0
- package/dist/components/Description/Description.js +5 -0
- package/dist/components/Description/Description.stories.d.ts +5 -0
- package/dist/components/Description/Description.stories.js +54 -0
- package/dist/components/Description/Description.types.d.ts +8 -0
- package/dist/components/Description/Description.types.js +1 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.d.ts +4 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.js +24 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.stories.d.ts +6 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.stories.js +145 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.test.d.ts +1 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.test.js +40 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.types.d.ts +20 -0
- package/dist/components/DropDownIconButton/DropDownIconButton.types.js +1 -0
- package/dist/components/DropDownIconButton/index.js +2 -0
- package/dist/components/Footer/ContactInfoItem.d.ts +7 -0
- package/dist/components/Footer/ContactInfoItem.js +4 -0
- package/dist/components/Footer/DUMMYFOOTERDATA.json +132 -0
- package/dist/components/Footer/Footer.d.ts +4 -0
- package/dist/components/Footer/Footer.js +12 -0
- package/dist/components/Footer/Footer.stories.d.ts +7 -0
- package/dist/components/Footer/Footer.stories.js +155 -0
- package/dist/components/Footer/Footer.test.d.ts +1 -0
- package/dist/components/Footer/Footer.test.js +48 -0
- package/dist/components/Footer/Footer.types.d.ts +42 -0
- package/dist/components/Footer/Footer.types.js +1 -0
- package/dist/components/FormButton/FormButton.d.ts +4 -0
- package/dist/components/FormButton/FormButton.js +49 -0
- package/dist/components/FormButton/FormButton.stories.d.ts +12 -0
- package/dist/components/FormButton/FormButton.stories.js +200 -0
- package/dist/components/FormButton/FormButton.test.d.ts +1 -0
- package/dist/components/FormButton/FormButton.test.js +27 -0
- package/dist/components/FormButton/FormButton.types.d.ts +24 -0
- package/dist/components/FormButton/FormButton.types.js +1 -0
- package/dist/components/FormButton/index.js +2 -0
- package/dist/components/GenericList/DUMMYLISTDATA.json +560 -0
- package/dist/components/GenericList/GenericList.d.ts +16 -0
- package/dist/components/GenericList/GenericList.js +50 -0
- package/dist/components/GenericList/GenericList.stories.d.ts +35 -0
- package/dist/components/GenericList/GenericList.stories.js +87 -0
- package/dist/components/GenericList/GenericList.test.d.ts +1 -0
- package/dist/components/GenericList/GenericList.test.js +24 -0
- package/dist/components/GenericList/templates/DummyDataList.d.ts +6 -0
- package/dist/components/GenericList/templates/DummyDataList.js +6 -0
- package/dist/components/GenericList/templates/DynamicIconList.d.ts +32 -0
- package/dist/components/GenericList/templates/DynamicIconList.js +7 -0
- package/dist/components/GetSupport/GetSupport.d.ts +4 -0
- package/dist/components/GetSupport/GetSupport.js +7 -0
- package/dist/components/GetSupport/GetSupport.stories.d.ts +5 -0
- package/dist/components/GetSupport/GetSupport.stories.js +70 -0
- package/dist/components/GetSupport/GetSupport.test.d.ts +1 -0
- package/dist/components/GetSupport/GetSupport.test.js +49 -0
- package/dist/components/GetSupport/GetSupport.types.d.ts +11 -0
- package/dist/components/GetSupport/GetSupport.types.js +1 -0
- package/dist/components/HamburgerButton/Hamburger.stories.d.ts +5 -0
- package/dist/components/HamburgerButton/Hamburger.stories.js +97 -0
- package/dist/components/HamburgerButton/HamburgerButton.d.ts +4 -0
- package/dist/components/HamburgerButton/HamburgerButton.js +15 -0
- package/dist/components/HamburgerButton/HamburgerButton.types.d.ts +7 -0
- package/dist/components/HamburgerButton/HamburgerButton.types.js +1 -0
- package/dist/components/HamburgerButton/index.js +2 -0
- package/dist/components/Header/DUMMYICONDATA.json +136 -0
- package/dist/components/Header/Header.d.ts +4 -0
- package/dist/components/Header/Header.js +62 -0
- package/dist/components/Header/Header.stories.d.ts +8 -0
- package/dist/components/Header/Header.stories.js +225 -0
- package/dist/components/Header/Header.test.d.ts +1 -0
- package/dist/components/Header/Header.test.js +107 -0
- package/dist/components/Header/Header.types.d.ts +40 -0
- package/dist/components/Header/Header.types.js +1 -0
- package/dist/components/Header/headerContext.d.ts +39 -0
- package/dist/components/Header/headerContext.js +44 -0
- package/dist/components/Header/index.js +2 -0
- package/dist/components/Hero/Hero.d.ts +4 -0
- package/dist/components/Hero/Hero.js +21 -0
- package/dist/components/Hero/Hero.stories.d.ts +13 -0
- package/dist/components/Hero/Hero.stories.js +46 -0
- package/dist/components/Hero/Hero.test.d.ts +1 -0
- package/dist/components/Hero/Hero.test.js +62 -0
- package/dist/components/Hero/Hero.types.d.ts +8 -0
- package/dist/components/Hero/Hero.types.js +1 -0
- package/dist/components/Hero/index.js +2 -0
- package/dist/components/IconButton/IconButton.d.ts +4 -0
- package/dist/components/IconButton/IconButton.js +18 -0
- package/dist/components/IconButton/IconButton.stories.d.ts +7 -0
- package/dist/components/IconButton/IconButton.stories.js +187 -0
- package/dist/components/IconButton/IconButton.test.d.ts +1 -0
- package/dist/components/IconButton/IconButton.test.js +28 -0
- package/dist/components/IconButton/IconButton.types.d.ts +27 -0
- package/dist/components/IconButton/IconButton.types.js +1 -0
- package/dist/components/IconButton/index.js +2 -0
- package/dist/components/Image/Image.d.ts +4 -0
- package/dist/components/Image/Image.js +19 -0
- package/dist/components/Image/Image.stories.d.ts +14 -0
- package/dist/components/Image/Image.stories.js +63 -0
- package/dist/components/Image/Image.test.d.ts +1 -0
- package/dist/components/Image/Image.test.js +47 -0
- package/dist/components/Image/Image.types.d.ts +12 -0
- package/dist/components/Image/Image.types.js +1 -0
- package/dist/components/Image/index.js +2 -0
- package/dist/components/Input/Input.d.ts +4 -0
- package/dist/components/Input/Input.js +51 -0
- package/dist/components/Input/Input.stories.d.ts +13 -0
- package/dist/components/Input/Input.stories.js +364 -0
- package/dist/components/Input/Input.test.d.ts +1 -0
- package/dist/components/Input/Input.test.js +45 -0
- package/dist/components/Input/Input.types.d.ts +36 -0
- package/dist/components/Input/Input.types.js +1 -0
- package/dist/components/Input/InputMemoTypes.d.ts +2 -0
- package/dist/components/Input/InputMemoTypes.js +28 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/MobileMenu/MobileMenu.d.ts +3 -0
- package/dist/components/MobileMenu/MobileMenu.js +7 -0
- package/dist/components/MobileMenu/MobileMenu.types.d.ts +20 -0
- package/dist/components/MobileMenu/MobileMenu.types.js +1 -0
- package/dist/components/MobileMenu/index.js +2 -0
- package/dist/components/Nav/DUMMYNAVDATA.json +234 -0
- package/dist/components/Nav/Nav.d.ts +4 -0
- package/dist/components/Nav/Nav.js +31 -0
- package/dist/components/Nav/Nav.stories.d.ts +6 -0
- package/dist/components/Nav/Nav.stories.js +164 -0
- package/dist/components/Nav/Nav.test.d.ts +1 -0
- package/dist/components/Nav/Nav.test.js +52 -0
- package/dist/components/Nav/Nav.types.d.ts +38 -0
- package/dist/components/Nav/Nav.types.js +1 -0
- package/dist/components/Nav/index.js +2 -0
- package/dist/components/Page/TableDataDummy.d.ts +3 -0
- package/dist/components/Page/TableDataDummy.js +5 -0
- package/dist/components/Page/ViewPageTemplate.d.ts +3 -0
- package/dist/components/Page/ViewPageTemplate.js +5 -0
- package/dist/components/Page/ViewPageTemplate.stories.d.ts +8 -0
- package/dist/components/Page/ViewPageTemplate.stories.js +73 -0
- package/dist/components/Page/ViewPageTemplate.test.d.ts +1 -0
- package/dist/components/Page/ViewPageTemplate.test.js +71 -0
- package/{src/components/Page/ViewPageTemplate.types.ts → dist/components/Page/ViewPageTemplate.types.d.ts} +2 -3
- package/dist/components/Page/ViewPageTemplate.types.js +1 -0
- package/dist/components/Page/index.js +2 -0
- package/dist/components/PageSection/PageSection.d.ts +4 -0
- package/dist/components/PageSection/PageSection.js +5 -0
- package/dist/components/PageSection/PageSection.stories.d.ts +6 -0
- package/dist/components/PageSection/PageSection.stories.js +40 -0
- package/{src/components/PageSection/PageSection.types.ts → dist/components/PageSection/PageSection.types.d.ts} +2 -3
- package/dist/components/PageSection/PageSection.types.js +1 -0
- package/dist/components/PageSection/PageSections.test.d.ts +1 -0
- package/dist/components/PageSection/PageSections.test.js +31 -0
- package/dist/components/PageSection/index.js +2 -0
- package/dist/components/SearchInput/SearchInput.d.ts +4 -0
- package/dist/components/SearchInput/SearchInput.js +17 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +9 -0
- package/dist/components/SearchInput/SearchInput.stories.js +128 -0
- package/dist/components/SearchInput/SearchInput.types.d.ts +25 -0
- package/dist/components/SearchInput/SearchInput.types.js +1 -0
- package/dist/components/Slider/Slider.d.ts +4 -0
- package/dist/components/Slider/Slider.js +56 -0
- package/dist/components/Slider/Slider.stories.d.ts +6 -0
- package/dist/components/Slider/Slider.stories.js +82 -0
- package/dist/components/Slider/Slider.types.d.ts +21 -0
- package/dist/components/Slider/Slider.types.js +1 -0
- package/dist/components/Submenus/AdminSubmenu.d.ts +4 -0
- package/dist/components/Submenus/AdminSubmenu.js +5 -0
- package/dist/components/Submenus/AlertSubmenu.d.ts +4 -0
- package/dist/components/Submenus/AlertSubmenu.js +7 -0
- package/dist/components/Submenus/AlertSubmenuItem.d.ts +4 -0
- package/dist/components/Submenus/AlertSubmenuItem.js +5 -0
- package/dist/components/Submenus/types.d.ts +29 -0
- package/dist/components/Submenus/types.js +1 -0
- package/dist/components/Text/Text.d.ts +4 -0
- package/dist/components/Text/Text.js +12 -0
- package/dist/components/Text/Text.stories.d.ts +5 -0
- package/dist/components/Text/Text.stories.js +79 -0
- package/dist/components/Text/Text.test.d.ts +1 -0
- package/dist/components/Text/Text.test.js +31 -0
- package/{src/components/Text/Text.types.ts → dist/components/Text/Text.types.d.ts} +6 -8
- package/dist/components/Text/Text.types.js +1 -0
- package/dist/components/Text/index.js +2 -0
- package/dist/components/Toaster/Toaster.d.ts +4 -0
- package/dist/components/Toaster/Toaster.js +22 -0
- package/dist/components/Toaster/Toaster.stories.d.ts +23 -0
- package/dist/components/Toaster/Toaster.stories.js +102 -0
- package/dist/components/Toaster/Toaster.test.d.ts +1 -0
- package/dist/components/Toaster/Toaster.test.js +47 -0
- package/dist/components/Toaster/Toaster.types.d.ts +15 -0
- package/dist/components/Toaster/Toaster.types.js +1 -0
- package/dist/components/Toaster/index.js +2 -0
- package/dist/hoc/index.d.ts +1 -0
- package/dist/hoc/styling/withStoryBook.d.ts +6 -0
- package/dist/hoc/styling/withStoryBook.js +7 -0
- package/dist/main.css +1 -0
- package/dist/setupTests.js +1 -0
- package/dist/userHoc/index.js +1 -0
- package/dist/userHoc/withMemo.d.ts +5 -0
- package/dist/userHoc/withMemo.js +6 -0
- package/dist/utils/assertTagName.d.ts +3 -0
- package/dist/utils/assertTagName.js +6 -0
- package/dist/utils/generateAccordionItem.d.ts +15 -0
- package/dist/utils/generateAccordionItem.js +22 -0
- package/dist/utils/generateFooterContacts.d.ts +14 -0
- package/dist/utils/generateFooterContacts.js +19 -0
- package/dist/utils/generateNavMenu.d.ts +14 -0
- package/dist/utils/generateNavMenu.js +5 -0
- package/dist/utils/generateSocialList.d.ts +12 -0
- package/dist/utils/generateSocialList.js +4 -0
- package/dist/utils/getFontAwesomeIcon.d.ts +2 -0
- package/dist/utils/getFontAwesomeIcon.js +19 -0
- package/dist/utils/inputValidation.d.ts +6 -0
- package/dist/utils/inputValidation.js +12 -0
- package/package.json +9 -4
- package/.gitattributes +0 -5
- package/Dockerfile +0 -9
- package/assets/Logo.png +0 -0
- package/assets/cable.jpg +0 -0
- package/assets/card-1.jpg +0 -0
- package/assets/cat-logo.png +0 -0
- package/assets/compass-card-image-2.png +0 -0
- package/assets/compass-card-image-3.png +0 -0
- package/assets/compass-card-image-4.png +0 -0
- package/assets/compass-card-image.png +0 -0
- package/assets/compass-logo.png +0 -0
- package/assets/compass-tech-hero-bg.png +0 -0
- package/assets/contact-image.png +0 -0
- package/assets/green-laptop.png +0 -0
- package/assets/heroImage.png +0 -0
- package/assets/item.jpg +0 -0
- package/assets/map.png +0 -0
- package/assets/placeholder-no-image-available.png +0 -0
- package/assets/team.png +0 -0
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/clover.xml +0 -953
- package/coverage/coverage-final.json +0 -74
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -551
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/toga-blox-npm/index.html +0 -131
- package/coverage/toga-blox-npm/postcss.config.js.html +0 -103
- package/coverage/toga-blox-npm/src/components/Badge/Badge.stories.tsx.html +0 -793
- package/coverage/toga-blox-npm/src/components/Badge/Badge.tsx.html +0 -247
- package/coverage/toga-blox-npm/src/components/Badge/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Card/Card.stories.tsx.html +0 -787
- package/coverage/toga-blox-npm/src/components/Card/Card.tsx.html +0 -163
- package/coverage/toga-blox-npm/src/components/Card/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Card/templates/CategoryCardTemplate.tsx.html +0 -343
- package/coverage/toga-blox-npm/src/components/Card/templates/CompassCardTemplate.tsx.html +0 -259
- package/coverage/toga-blox-npm/src/components/Card/templates/CounterContentCardTemplate.tsx.html +0 -685
- package/coverage/toga-blox-npm/src/components/Card/templates/HorizontalCardTemplate.tsx.html +0 -637
- package/coverage/toga-blox-npm/src/components/Card/templates/ItemCardTemplate.tsx.html +0 -550
- package/coverage/toga-blox-npm/src/components/Card/templates/KitContentCardTemplate.tsx.html +0 -469
- package/coverage/toga-blox-npm/src/components/Card/templates/ShippingAddressCardTemplate.tsx.html +0 -418
- package/coverage/toga-blox-npm/src/components/Card/templates/VerticalCardTemplate.tsx.html +0 -592
- package/coverage/toga-blox-npm/src/components/Card/templates/index.html +0 -221
- package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.stories.tsx.html +0 -358
- package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.tsx.html +0 -385
- package/coverage/toga-blox-npm/src/components/CounterButton/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Description/Description.stories.tsx.html +0 -286
- package/coverage/toga-blox-npm/src/components/Description/Description.tsx.html +0 -124
- package/coverage/toga-blox-npm/src/components/Description/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.stories.tsx.html +0 -676
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.tsx.html +0 -346
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Footer/ContactInfoItem.tsx.html +0 -139
- package/coverage/toga-blox-npm/src/components/Footer/Footer.stories.tsx.html +0 -934
- package/coverage/toga-blox-npm/src/components/Footer/Footer.tsx.html +0 -373
- package/coverage/toga-blox-npm/src/components/Footer/index.html +0 -146
- package/coverage/toga-blox-npm/src/components/FormButton/FormButton.stories.tsx.html +0 -952
- package/coverage/toga-blox-npm/src/components/FormButton/FormButton.tsx.html +0 -343
- package/coverage/toga-blox-npm/src/components/FormButton/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/GenericList/GenericList.stories.tsx.html +0 -376
- package/coverage/toga-blox-npm/src/components/GenericList/GenericList.tsx.html +0 -520
- package/coverage/toga-blox-npm/src/components/GenericList/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/GenericList/templates/DummyDataList.tsx.html +0 -154
- package/coverage/toga-blox-npm/src/components/GenericList/templates/DynamicIconList.tsx.html +0 -250
- package/coverage/toga-blox-npm/src/components/GenericList/templates/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.stories.tsx.html +0 -325
- package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.tsx.html +0 -262
- package/coverage/toga-blox-npm/src/components/GetSupport/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/HamburgerButton/Hamburger.stories.tsx.html +0 -760
- package/coverage/toga-blox-npm/src/components/HamburgerButton/HamburgerButton.tsx.html +0 -232
- package/coverage/toga-blox-npm/src/components/HamburgerButton/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Header/Header.stories.tsx.html +0 -1633
- package/coverage/toga-blox-npm/src/components/Header/Header.tsx.html +0 -814
- package/coverage/toga-blox-npm/src/components/Header/headerContext.tsx.html +0 -460
- package/coverage/toga-blox-npm/src/components/Header/index.html +0 -146
- package/coverage/toga-blox-npm/src/components/Hero/Hero.stories.tsx.html +0 -289
- package/coverage/toga-blox-npm/src/components/Hero/Hero.tsx.html +0 -259
- package/coverage/toga-blox-npm/src/components/Hero/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/IconButton/IconButton.stories.tsx.html +0 -673
- package/coverage/toga-blox-npm/src/components/IconButton/IconButton.tsx.html +0 -313
- package/coverage/toga-blox-npm/src/components/IconButton/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Image/Image.stories.tsx.html +0 -322
- package/coverage/toga-blox-npm/src/components/Image/Image.tsx.html +0 -226
- package/coverage/toga-blox-npm/src/components/Image/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Input/Input.stories.tsx.html +0 -1621
- package/coverage/toga-blox-npm/src/components/Input/Input.tsx.html +0 -568
- package/coverage/toga-blox-npm/src/components/Input/InputMemoTypes.tsx.html +0 -181
- package/coverage/toga-blox-npm/src/components/Input/index.html +0 -146
- package/coverage/toga-blox-npm/src/components/MobileMenu/MobileMenu.tsx.html +0 -208
- package/coverage/toga-blox-npm/src/components/MobileMenu/index.html +0 -116
- package/coverage/toga-blox-npm/src/components/Nav/Nav.stories.tsx.html +0 -628
- package/coverage/toga-blox-npm/src/components/Nav/Nav.tsx.html +0 -622
- package/coverage/toga-blox-npm/src/components/Nav/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Page/TableDataDummy.tsx.html +0 -733
- package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.stories.tsx.html +0 -1714
- package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.tsx.html +0 -115
- package/coverage/toga-blox-npm/src/components/Page/index.html +0 -146
- package/coverage/toga-blox-npm/src/components/PageSection/PageSection.stories.tsx.html +0 -433
- package/coverage/toga-blox-npm/src/components/PageSection/PageSection.tsx.html +0 -121
- package/coverage/toga-blox-npm/src/components/PageSection/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.stories.tsx.html +0 -517
- package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.tsx.html +0 -325
- package/coverage/toga-blox-npm/src/components/SearchInput/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Slider/Slider.stories.tsx.html +0 -349
- package/coverage/toga-blox-npm/src/components/Slider/Slider.tsx.html +0 -502
- package/coverage/toga-blox-npm/src/components/Slider/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Submenus/AdminSubmenu.tsx.html +0 -136
- package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenu.tsx.html +0 -253
- package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenuItem.tsx.html +0 -202
- package/coverage/toga-blox-npm/src/components/Submenus/index.html +0 -146
- package/coverage/toga-blox-npm/src/components/Text/Text.stories.tsx.html +0 -235
- package/coverage/toga-blox-npm/src/components/Text/Text.tsx.html +0 -172
- package/coverage/toga-blox-npm/src/components/Text/index.html +0 -131
- package/coverage/toga-blox-npm/src/components/Toaster/Toaster.stories.tsx.html +0 -445
- package/coverage/toga-blox-npm/src/components/Toaster/Toaster.tsx.html +0 -301
- package/coverage/toga-blox-npm/src/components/Toaster/index.html +0 -131
- package/coverage/toga-blox-npm/src/hoc/styling/index.html +0 -116
- package/coverage/toga-blox-npm/src/hoc/styling/withStoryBook.tsx.html +0 -142
- package/coverage/toga-blox-npm/src/userHoc/index.html +0 -116
- package/coverage/toga-blox-npm/src/userHoc/withMemo.tsx.html +0 -145
- package/coverage/toga-blox-npm/src/utils/assertTagName.tsx.html +0 -106
- package/coverage/toga-blox-npm/src/utils/generateAccordionItem.tsx.html +0 -373
- package/coverage/toga-blox-npm/src/utils/generateFooterContacts.tsx.html +0 -295
- package/coverage/toga-blox-npm/src/utils/generateNavMenu.tsx.html +0 -247
- package/coverage/toga-blox-npm/src/utils/generateSocialList.tsx.html +0 -187
- package/coverage/toga-blox-npm/src/utils/getFontAwesomeIcon.tsx.html +0 -145
- package/coverage/toga-blox-npm/src/utils/index.html +0 -206
- package/coverage/toga-blox-npm/src/utils/inputValidation.tsx.html +0 -163
- package/coverage/toga-blox-npm/tailwind.config.js.html +0 -205
- package/declarations.d.ts +0 -4
- package/docker-compose.yml +0 -22
- package/global.css +0 -4
- package/index.js +0 -4
- package/nodemon.json +0 -5
- package/postcss.config.js +0 -6
- package/src/components/Badge/Badge.stories.tsx +0 -236
- package/src/components/Badge/Badge.test.tsx +0 -175
- package/src/components/Badge/Badge.tsx +0 -54
- package/src/components/Badge/Badge.types.tsx +0 -26
- package/src/components/Card/Card.stories.tsx +0 -235
- package/src/components/Card/Card.test.tsx +0 -53
- package/src/components/Card/Card.tsx +0 -26
- package/src/components/Card/Card.types.ts +0 -11
- package/src/components/Card/DUMMYPRODUCTDATA.json +0 -826
- package/src/components/Card/templates/CategoryCardTemplate.tsx +0 -86
- package/src/components/Card/templates/CompassCardTemplate.tsx +0 -58
- package/src/components/Card/templates/CounterContentCardTemplate.tsx +0 -200
- package/src/components/Card/templates/HorizontalCardTemplate.tsx +0 -184
- package/src/components/Card/templates/ItemCardTemplate.tsx +0 -155
- package/src/components/Card/templates/KitContentCardTemplate.tsx +0 -128
- package/src/components/Card/templates/ShippingAddressCardTemplate.tsx +0 -111
- package/src/components/Card/templates/VerticalCardTemplate.tsx +0 -169
- package/src/components/CounterButton/CounterButton.stories.tsx +0 -91
- package/src/components/CounterButton/CounterButton.tsx +0 -100
- package/src/components/CounterButton/CounterButton.types.ts +0 -12
- package/src/components/Description/Description.stories.tsx +0 -67
- package/src/components/Description/Description.tsx +0 -13
- package/src/components/Description/Description.types.ts +0 -9
- package/src/components/DropDownIconButton/DropDownIconButton.stories.tsx +0 -197
- package/src/components/DropDownIconButton/DropDownIconButton.test.tsx +0 -90
- package/src/components/DropDownIconButton/DropDownIconButton.tsx +0 -87
- package/src/components/DropDownIconButton/DropDownIconButton.types.ts +0 -21
- package/src/components/Footer/ContactInfoItem.tsx +0 -18
- package/src/components/Footer/DUMMYFOOTERDATA.json +0 -132
- package/src/components/Footer/Footer.stories.tsx +0 -283
- package/src/components/Footer/Footer.test.tsx +0 -90
- package/src/components/Footer/Footer.tsx +0 -96
- package/src/components/Footer/Footer.types.tsx +0 -61
- package/src/components/FormButton/FormButton.stories.tsx +0 -289
- package/src/components/FormButton/FormButton.test.tsx +0 -73
- package/src/components/FormButton/FormButton.tsx +0 -86
- package/src/components/FormButton/FormButton.types.ts +0 -27
- package/src/components/GenericList/DUMMYLISTDATA.json +0 -560
- package/src/components/GenericList/GenericList.stories.tsx +0 -97
- package/src/components/GenericList/GenericList.test.tsx +0 -29
- package/src/components/GenericList/GenericList.tsx +0 -145
- package/src/components/GenericList/templates/DummyDataList.tsx +0 -23
- package/src/components/GenericList/templates/DynamicIconList.tsx +0 -55
- package/src/components/GetSupport/GetSupport.stories.tsx +0 -80
- package/src/components/GetSupport/GetSupport.test.tsx +0 -62
- package/src/components/GetSupport/GetSupport.tsx +0 -59
- package/src/components/GetSupport/GetSupport.types.ts +0 -11
- package/src/components/HamburgerButton/Hamburger.stories.tsx +0 -225
- package/src/components/HamburgerButton/HamburgerButton.tsx +0 -49
- package/src/components/HamburgerButton/HamburgerButton.types.tsx +0 -7
- package/src/components/Header/DUMMYICONDATA.json +0 -136
- package/src/components/Header/Header.stories.tsx +0 -516
- package/src/components/Header/Header.test.tsx +0 -322
- package/src/components/Header/Header.tsx +0 -243
- package/src/components/Header/Header.types.ts +0 -52
- package/src/components/Header/headerContext.tsx +0 -125
- package/src/components/Hero/Hero.stories.tsx +0 -68
- package/src/components/Hero/Hero.test.tsx +0 -109
- package/src/components/Hero/Hero.tsx +0 -58
- package/src/components/Hero/Hero.types.ts +0 -9
- package/src/components/IconButton/IconButton.stories.tsx +0 -196
- package/src/components/IconButton/IconButton.test.tsx +0 -52
- package/src/components/IconButton/IconButton.tsx +0 -76
- package/src/components/IconButton/IconButton.types.ts +0 -28
- package/src/components/Image/Image.stories.tsx +0 -79
- package/src/components/Image/Image.test.tsx +0 -87
- package/src/components/Image/Image.tsx +0 -47
- package/src/components/Image/Image.types.ts +0 -11
- package/src/components/Image/declarations.d.ts +0 -24
- package/src/components/Input/Input.stories.tsx +0 -512
- package/src/components/Input/Input.test.tsx +0 -89
- package/src/components/Input/Input.tsx +0 -161
- package/src/components/Input/Input.types.ts +0 -52
- package/src/components/Input/InputMemoTypes.tsx +0 -32
- package/src/components/MobileMenu/MobileMenu.tsx +0 -41
- package/src/components/MobileMenu/MobileMenu.types.tsx +0 -28
- package/src/components/Nav/DUMMYNAVDATA.json +0 -234
- package/src/components/Nav/Nav.stories.tsx +0 -181
- package/src/components/Nav/Nav.test.tsx +0 -89
- package/src/components/Nav/Nav.tsx +0 -179
- package/src/components/Nav/Nav.types.tsx +0 -47
- package/src/components/Page/TableDataDummy.tsx +0 -216
- package/src/components/Page/ViewPageTemplate.stories.tsx +0 -543
- package/src/components/Page/ViewPageTemplate.test.tsx +0 -361
- package/src/components/Page/ViewPageTemplate.tsx +0 -10
- package/src/components/PageSection/PageSection.stories.tsx +0 -116
- package/src/components/PageSection/PageSection.tsx +0 -12
- package/src/components/PageSection/PageSections.test.tsx +0 -89
- package/src/components/SearchInput/SearchInput.stories.tsx +0 -144
- package/src/components/SearchInput/SearchInput.tsx +0 -81
- package/src/components/SearchInput/SearchInput.types.ts +0 -28
- package/src/components/Slider/Slider.stories.tsx +0 -88
- package/src/components/Slider/Slider.tsx +0 -139
- package/src/components/Slider/Slider.types.ts +0 -21
- package/src/components/Submenus/AdminSubmenu.tsx +0 -17
- package/src/components/Submenus/AlertSubmenu.tsx +0 -56
- package/src/components/Submenus/AlertSubmenuItem.tsx +0 -39
- package/src/components/Submenus/types.tsx +0 -32
- package/src/components/Text/Text.stories.tsx +0 -50
- package/src/components/Text/Text.test.tsx +0 -52
- package/src/components/Text/Text.tsx +0 -29
- package/src/components/Toaster/Toaster.stories.tsx +0 -120
- package/src/components/Toaster/Toaster.test.tsx +0 -60
- package/src/components/Toaster/Toaster.tsx +0 -72
- package/src/components/Toaster/Toaster.types.ts +0 -12
- package/src/hoc/styling/withStoryBook.tsx +0 -19
- package/src/main.css +0 -3
- package/src/userHoc/withMemo.tsx +0 -20
- package/src/utils/assertTagName.tsx +0 -7
- package/src/utils/generateAccordionItem.tsx +0 -96
- package/src/utils/generateFooterContacts.tsx +0 -70
- package/src/utils/generateNavMenu.tsx +0 -54
- package/src/utils/generateSocialList.tsx +0 -34
- package/src/utils/getFontAwesomeIcon.tsx +0 -20
- package/src/utils/inputValidation.tsx +0 -26
- package/tailwind.config.js +0 -40
- package/tsconfig.json +0 -25
- package/vite.config.ts +0 -33
- /package/{src/components/Badge/index.ts → dist/components/Badge/index.d.ts} +0 -0
- /package/{src/components/Card/index.ts → dist/components/Card/index.js} +0 -0
- /package/{src/components/DropDownIconButton/index.ts → dist/components/DropDownIconButton/index.d.ts} +0 -0
- /package/{src/components/FormButton/index.ts → dist/components/FormButton/index.d.ts} +0 -0
- /package/{src/components/HamburgerButton/index.ts → dist/components/HamburgerButton/index.d.ts} +0 -0
- /package/{src/components/Header/index.ts → dist/components/Header/index.d.ts} +0 -0
- /package/{src/components/Hero/index.ts → dist/components/Hero/index.d.ts} +0 -0
- /package/{src/components/IconButton/index.ts → dist/components/IconButton/index.d.ts} +0 -0
- /package/{src/components/Image/index.ts → dist/components/Image/index.d.ts} +0 -0
- /package/{src/components/Input/index.ts → dist/components/Input/index.d.ts} +0 -0
- /package/{src/components/MobileMenu/index.ts → dist/components/MobileMenu/index.d.ts} +0 -0
- /package/{src/components/Nav/index.ts → dist/components/Nav/index.d.ts} +0 -0
- /package/{src/components/Page/index.ts → dist/components/Page/index.d.ts} +0 -0
- /package/{src/components/PageSection/index.ts → dist/components/PageSection/index.d.ts} +0 -0
- /package/{src/components/Text/index.ts → dist/components/Text/index.d.ts} +0 -0
- /package/{src/components/Toaster/index.ts → dist/components/Toaster/index.d.ts} +0 -0
- /package/{src/hoc/index.ts → dist/hoc/index.js} +0 -0
- /package/{src/setupTests.ts → dist/setupTests.d.ts} +0 -0
- /package/{src/userHoc/index.ts → dist/userHoc/index.d.ts} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TagName } from "../../Text/Text.types";
|
|
2
|
+
type DataTypes = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
link: string;
|
|
6
|
+
productCount: number;
|
|
7
|
+
imageBackgroundColor: string;
|
|
8
|
+
textBackgroundColor: string;
|
|
9
|
+
titleProps: {
|
|
10
|
+
tag: TagName;
|
|
11
|
+
size: string;
|
|
12
|
+
fontColor: string;
|
|
13
|
+
fontFamily: string;
|
|
14
|
+
additionalClasses: string;
|
|
15
|
+
};
|
|
16
|
+
imageUrl: string | null;
|
|
17
|
+
altText: string;
|
|
18
|
+
};
|
|
19
|
+
type CategoryCardTemplateProps = {
|
|
20
|
+
data: DataTypes;
|
|
21
|
+
containerClasses?: string;
|
|
22
|
+
imageContainerClasses?: string;
|
|
23
|
+
titleClasses?: string;
|
|
24
|
+
productCountClasses?: string;
|
|
25
|
+
};
|
|
26
|
+
declare const CategoryCardTemplate: ({ data, containerClasses, imageContainerClasses, titleClasses, productCountClasses, }: CategoryCardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default CategoryCardTemplate;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Text from "../../Text/Text";
|
|
3
|
+
import Image from "../../Image/Image";
|
|
4
|
+
const CategoryCardTemplate = ({ data, containerClasses = "", imageContainerClasses = "", titleClasses = "", productCountClasses = "", }) => {
|
|
5
|
+
return (_jsxs("div", { className: `${containerClasses} p-4`, children: [_jsx("a", { href: data.link, className: `${imageContainerClasses}`, children: data.imageUrl ? (_jsx(Image, { background: false, src: data.imageUrl, alt: data.altText, additionalClasses: "w-full h-full object-contain" })) : (_jsx("div", { className: `${data.imageBackgroundColor} flex items-center justify-center w-full h-full`, children: _jsx(Text, { tag: "p", size: "text-4xl", text: "\uD83D\uDEA7", color: "text-gray-300", fontFamily: "" }) })) }), _jsxs("div", { className: titleClasses, children: [_jsx(Text, { tag: data.titleProps.tag, size: data.titleProps.size, text: data.title, color: data.titleProps.fontColor, fontFamily: data.titleProps.fontFamily, additionalClasses: `${data.titleProps.additionalClasses} font-bold` }), _jsx(Text, { tag: "p", size: "text-sm", text: `${data.productCount} products`, color: "text-gray-500", fontFamily: "font-sans", additionalClasses: productCountClasses })] })] }));
|
|
6
|
+
};
|
|
7
|
+
export default CategoryCardTemplate;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TagName } from "../../Text/Text.types";
|
|
2
|
+
type DataTypes = {
|
|
3
|
+
id: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
rating: number;
|
|
6
|
+
link: string;
|
|
7
|
+
linkTitle: boolean;
|
|
8
|
+
imageBackgroundColor: string;
|
|
9
|
+
textBackgroundColor: string;
|
|
10
|
+
titleProps: {
|
|
11
|
+
tag: TagName;
|
|
12
|
+
size: string;
|
|
13
|
+
fontColor: string;
|
|
14
|
+
fontFamily: string;
|
|
15
|
+
additionalClasses: string;
|
|
16
|
+
};
|
|
17
|
+
imageUrl: string | null;
|
|
18
|
+
altText: string;
|
|
19
|
+
};
|
|
20
|
+
declare const CompassCardTemplate: ({ data }: {
|
|
21
|
+
data: DataTypes;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default CompassCardTemplate;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Text from "../../Text/Text";
|
|
3
|
+
import Image from "../../Image/Image";
|
|
4
|
+
const CompassCardTemplate = ({ data }) => {
|
|
5
|
+
return (_jsxs("a", { href: "#", className: `flex flex-col justify-center w-full max-sm:w-full h-full`, "data-testid": "card", children: [_jsx("div", { className: data.imageBackgroundColor, "data-testid": "card-image-container", children: _jsx(Image, { background: false, src: data.imageUrl, alt: data.altText }) }), _jsx("div", { "data-testid": "card-text-container", className: `flex flex-col w-full p-2 h-full items-center justify-center max-sm:text-xs ${data.textBackgroundColor}`, children: _jsx(Text, { tag: data.titleProps.tag, size: data.titleProps.size, text: data.title, color: "black", fontFamily: "", additionalClasses: data.titleProps.additionalClasses }) })] }));
|
|
6
|
+
};
|
|
7
|
+
export default CompassCardTemplate;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TagName } from "../../Text/Text.types";
|
|
2
|
+
type DataTypes = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
rating: number;
|
|
6
|
+
link: string;
|
|
7
|
+
inStock: boolean;
|
|
8
|
+
inStockProps: {
|
|
9
|
+
tag: TagName;
|
|
10
|
+
size: string;
|
|
11
|
+
fontColor: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
inStockIcon: string;
|
|
14
|
+
outOfStockIcon: string;
|
|
15
|
+
additionalClasses: string;
|
|
16
|
+
};
|
|
17
|
+
linkTitle: boolean;
|
|
18
|
+
identifier: string;
|
|
19
|
+
titleProps: {
|
|
20
|
+
tag: TagName;
|
|
21
|
+
size: string;
|
|
22
|
+
fontColor: string;
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
additionalClasses: string;
|
|
25
|
+
};
|
|
26
|
+
price: string;
|
|
27
|
+
priceProps: {
|
|
28
|
+
tag: TagName;
|
|
29
|
+
size: string;
|
|
30
|
+
fontColor: string;
|
|
31
|
+
fontFamily: string;
|
|
32
|
+
additionalClasses: string;
|
|
33
|
+
};
|
|
34
|
+
imageUrl: string | null;
|
|
35
|
+
altText: string;
|
|
36
|
+
buttonProps: {
|
|
37
|
+
text: string;
|
|
38
|
+
as: string;
|
|
39
|
+
size: string;
|
|
40
|
+
fontColor: string;
|
|
41
|
+
borderColor: string;
|
|
42
|
+
shape: string;
|
|
43
|
+
color: string;
|
|
44
|
+
hoverBackground?: string;
|
|
45
|
+
additionalClasses: string;
|
|
46
|
+
};
|
|
47
|
+
badgeText: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
declare const CounterContentCardTemplate: ({ data }: {
|
|
51
|
+
data: DataTypes;
|
|
52
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export default CounterContentCardTemplate;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
import CounterButton from "../../CounterButton/CounterButton";
|
|
7
|
+
import { getFontAwesomeIcon } from "../../../utils/getFontAwesomeIcon";
|
|
8
|
+
import FormButton from "../../FormButton";
|
|
9
|
+
const truncateDescription = (description, maxLength) => {
|
|
10
|
+
if (description.length > maxLength) {
|
|
11
|
+
return description.slice(0, maxLength) + "...";
|
|
12
|
+
}
|
|
13
|
+
return description;
|
|
14
|
+
};
|
|
15
|
+
const CounterContentCardTemplate = ({ data }) => {
|
|
16
|
+
const [count, setCount] = useState(0);
|
|
17
|
+
const [inCart, setInCart] = useState(false);
|
|
18
|
+
const handleIncrementClick = () => {
|
|
19
|
+
setCount((prevCount) => prevCount + 1);
|
|
20
|
+
};
|
|
21
|
+
const handleDecrementClick = () => {
|
|
22
|
+
if (count === 1) {
|
|
23
|
+
setInCart(false);
|
|
24
|
+
setCount(0);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
setCount((prevCount) => Math.max(1, prevCount - 1)); // Prevent going below 1
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const handleInputChange = (e) => {
|
|
31
|
+
const value = parseInt(e.target.value, 10);
|
|
32
|
+
if (!isNaN(value) && value > 0) {
|
|
33
|
+
setCount(value);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const handleAddToCartClick = () => {
|
|
37
|
+
setInCart(true);
|
|
38
|
+
setCount(1);
|
|
39
|
+
};
|
|
40
|
+
const handleDeleteClick = () => {
|
|
41
|
+
setInCart(false);
|
|
42
|
+
setCount(0);
|
|
43
|
+
};
|
|
44
|
+
return (_jsxs("div", { className: "flex flex-col items-start w-full sm:w-[300px] h-auto sm:h-[350px] border border-[#DFE4EA] bg-white rounded-lg relative p-4 sm:p-4 hover:border-teal-600 hover:shadow-inner", children: [_jsx("div", { className: "absolute top-3 left-3", children: _jsx(Badge, { text: _jsx(Text, { color: "", fontFamily: "font-serif", tag: "p", text: data.badgeText, size: "text-xs sm:text-sm" }), type: "span", hoverColor: "", backgroundColor: "bg-green-100", badgeContainerClasses: "text-green-800" }) }), _jsx("div", { className: "flex justify-center items-center mt-4 w-full", children: _jsx(Image, { background: false, src: data.imageUrl, alt: data.altText, additionalClasses: "w-[100px] sm:w-[120px] h-[100px] sm:h-[120px] object-contain" }) }), _jsxs("div", { className: "flex flex-col items-start w-full mt-4", children: [_jsx(Text, { tag: data.titleProps.tag, size: "text-md", text: truncateDescription(data.title, 52), color: data.titleProps.fontColor, fontFamily: data.titleProps.fontFamily, additionalClasses: `${data.titleProps.additionalClasses} text-left font-bold` }), _jsx(Text, { tag: "span", size: "text-xs sm:text-sm", text: data.identifier, color: "text-gray-500", fontFamily: "font-sans", additionalClasses: "text-left mt-1" }), _jsx(Text, { tag: "p", size: "text-xs sm:text-sm", text: truncateDescription(data.description, 52), color: "text-gray-700", fontFamily: "font-sans", additionalClasses: "text-left mt-2" })] }), _jsxs("div", { className: "flex justify-between items-center w-full mt-4 sm:mt-auto", children: [_jsx(Text, { tag: data.priceProps.tag, size: "text-sm sm:text-md", text: data.price, color: data.priceProps.fontColor, fontFamily: data.priceProps.fontFamily, additionalClasses: data.priceProps.additionalClasses }), _jsx("div", { className: "flex items-center gap-2 min-w-[120px] sm:min-w-[150px] justify-end", children: inCart ? (_jsxs(_Fragment, { children: [_jsx(FormButton, { additionalClasses: "w-6 sm:w-8 h-6 sm:h-8 flex items-center justify-center text-red-600", icon: getFontAwesomeIcon("trash"), onClick: handleDeleteClick }), _jsx(CounterButton, { count: count, onIncrementClick: handleIncrementClick, onDecrementClick: handleDecrementClick, onInputChange: handleInputChange, containerClassName: "flex items-center border border-gray-300 rounded-md overflow-hidden", inputClassName: "w-8 h-8 text-center text-xs sm:text-sm border-none outline-none bg-white", buttonClassName: "w-8 h-8 flex items-center justify-center text-gray-600", iconClasses: "fill-current text-gray-600" })] })) : (_jsx(FormButton, { text: "Add to Cart", backgroundColor: "bg-teal-600", shape: "rounded-md", borderColor: "border-none", additionalClasses: "w-[100px] sm:w-[120px] h-[32px] sm:h-[40px] hover:bg-teal-800", onClick: handleAddToCartClick })) })] })] }));
|
|
45
|
+
};
|
|
46
|
+
export default CounterContentCardTemplate;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { TagName } from "../../Text/Text.types";
|
|
2
|
+
type DataTypes = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
rating: number;
|
|
6
|
+
ratingProps: {
|
|
7
|
+
tag: TagName;
|
|
8
|
+
size: string;
|
|
9
|
+
fontColor: string;
|
|
10
|
+
fontFamily: string;
|
|
11
|
+
additionalClasses: string;
|
|
12
|
+
};
|
|
13
|
+
link: string;
|
|
14
|
+
inStock: boolean;
|
|
15
|
+
inStockProps: {
|
|
16
|
+
tag: TagName;
|
|
17
|
+
size: string;
|
|
18
|
+
fontColor: string;
|
|
19
|
+
fontFamily: string;
|
|
20
|
+
inStockIcon: string;
|
|
21
|
+
outOfStockIcon: string;
|
|
22
|
+
additionalClasses: string;
|
|
23
|
+
};
|
|
24
|
+
linkTitle: boolean;
|
|
25
|
+
identifier: string;
|
|
26
|
+
identifierProps: {
|
|
27
|
+
tag: TagName;
|
|
28
|
+
size: string;
|
|
29
|
+
fontColor: string;
|
|
30
|
+
fontFamily: string;
|
|
31
|
+
additionalClasses: string;
|
|
32
|
+
};
|
|
33
|
+
titleProps: {
|
|
34
|
+
tag: TagName;
|
|
35
|
+
size: string;
|
|
36
|
+
fontColor: string;
|
|
37
|
+
fontFamily: string;
|
|
38
|
+
additionalClasses: string;
|
|
39
|
+
};
|
|
40
|
+
price: string;
|
|
41
|
+
priceProps: {
|
|
42
|
+
tag: TagName;
|
|
43
|
+
size: string;
|
|
44
|
+
fontColor: string;
|
|
45
|
+
fontFamily: string;
|
|
46
|
+
additionalClasses: string;
|
|
47
|
+
};
|
|
48
|
+
imageUrl: string | null;
|
|
49
|
+
altText: string;
|
|
50
|
+
buttonProps: {
|
|
51
|
+
text: string;
|
|
52
|
+
as: string;
|
|
53
|
+
size: string;
|
|
54
|
+
fontColor: string;
|
|
55
|
+
borderColor: string;
|
|
56
|
+
shape: string;
|
|
57
|
+
color: string;
|
|
58
|
+
hoverBackground: string;
|
|
59
|
+
additionalClasses: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
declare const HorizontalCardTemplate: ({ data }: {
|
|
63
|
+
data: DataTypes;
|
|
64
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export default HorizontalCardTemplate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import { getFontAwesomeIcon } from "../../../utils/getFontAwesomeIcon";
|
|
6
|
+
const HorizontalCardTemplate = ({ data }) => {
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx("a", { href: "#", className: `flex justify-center w-72 max-sm:w-full`, children: _jsx(Image, { background: false, src: data.imageUrl, alt: data.altText }) }), _jsxs("div", { className: "flex flex-col justify-between w-3/4 h-full p-3 max-sm:w-full", children: [_jsx("div", { className: "flex h-full mb-12 max-sm:mb-2", children: _jsx("a", { href: data.link, children: _jsx(Text, { tag: data.titleProps.tag, size: data.titleProps.size, text: data.title, color: "black", fontFamily: "", additionalClasses: data.titleProps.additionalClasses }) }) }), _jsxs("div", { className: `flex justify-between mb-12 max-sm:flex-col max-sm:items-end max-sm:mb-2`, children: [_jsx("div", { className: "flex items-center space-x-1 rtl:space-x-reverse max-sm:mb-1", children: _jsx(Text, { tag: data.identifierProps.tag, size: data.identifierProps.size, text: data.identifier, color: "", fontFamily: "", additionalClasses: data.identifierProps.additionalClasses }) }), _jsxs("div", { className: "flex items-center justify-center px-2 max-sm:mb-1", children: [_jsx("div", { className: "pr-2 text-xs", children: data.inStock === true
|
|
8
|
+
? getFontAwesomeIcon(data.inStockProps.inStockIcon)
|
|
9
|
+
: getFontAwesomeIcon(data.inStockProps.outOfStockIcon) }), _jsx(Text, { tag: data.inStockProps.tag, size: data.inStockProps.size, text: data.inStock === true
|
|
10
|
+
? "In Stock"
|
|
11
|
+
: "Out of Stock", color: "black", fontFamily: "", additionalClasses: data.inStockProps.additionalClasses })] }), _jsxs("div", { className: "flex px-2 items-center space-x-1 rtl:space-x-reverse max-sm:mb-1", children: [_jsx("svg", { className: "w-4 h-4 text-yellow-300", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 22 20", children: _jsx("path", { d: "M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z" }) }), _jsx(Text, { tag: data.ratingProps.tag, size: data.ratingProps.size, text: data.rating, color: "", fontFamily: "", additionalClasses: data.ratingProps.additionalClasses })] })] }), _jsxs("div", { className: "flex items-end flex-col w-full max-sm:flex-row max-sm:justify-between", children: [_jsx("div", { className: "px-2", children: _jsx(Text, { tag: data.priceProps.tag, size: data.priceProps.size, text: data.price, color: "black", fontFamily: "", additionalClasses: data.priceProps.additionalClasses }) }), _jsx(FormButton, { text: data.buttonProps.text, backgroundColor: data.buttonProps.color, shape: data.buttonProps.shape, borderColor: data.buttonProps.borderColor, hoverBackground: data.buttonProps.hoverBackground, additionalClasses: "w-24" })] })] })] }));
|
|
12
|
+
};
|
|
13
|
+
export default HorizontalCardTemplate;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { TagName } from "../../Text/Text.types";
|
|
2
|
+
type DataTypes = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
rating: number;
|
|
6
|
+
link: string;
|
|
7
|
+
inStock: boolean;
|
|
8
|
+
inStockProps: {
|
|
9
|
+
tag: TagName;
|
|
10
|
+
size: string;
|
|
11
|
+
fontColor: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
inStockIcon: string;
|
|
14
|
+
outOfStockIcon: string;
|
|
15
|
+
additionalClasses: string;
|
|
16
|
+
};
|
|
17
|
+
linkTitle: boolean;
|
|
18
|
+
identifier: string;
|
|
19
|
+
titleProps: {
|
|
20
|
+
tag: TagName;
|
|
21
|
+
size: string;
|
|
22
|
+
fontColor: string;
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
additionalClasses: string;
|
|
25
|
+
};
|
|
26
|
+
price: string;
|
|
27
|
+
priceProps: {
|
|
28
|
+
tag: TagName;
|
|
29
|
+
size: string;
|
|
30
|
+
fontColor: string;
|
|
31
|
+
fontFamily: string;
|
|
32
|
+
additionalClasses: string;
|
|
33
|
+
};
|
|
34
|
+
imageUrl: string | null;
|
|
35
|
+
altText: string;
|
|
36
|
+
buttonProps: {
|
|
37
|
+
text: string;
|
|
38
|
+
as: string;
|
|
39
|
+
size: string;
|
|
40
|
+
fontColor: string;
|
|
41
|
+
borderColor: string;
|
|
42
|
+
shape: string;
|
|
43
|
+
color: string;
|
|
44
|
+
hoverBackground?: string;
|
|
45
|
+
additionalClasses: string;
|
|
46
|
+
};
|
|
47
|
+
badgeText: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
type ItemCardTemplateProps = {
|
|
51
|
+
data: DataTypes;
|
|
52
|
+
containerClasses?: string;
|
|
53
|
+
imageContainerClasses?: string;
|
|
54
|
+
titleContainerClasses?: string;
|
|
55
|
+
descriptionContainerClasses?: string;
|
|
56
|
+
priceContainerClasses?: string;
|
|
57
|
+
buttonContainerClasses?: string;
|
|
58
|
+
badgeContainerClasses?: string;
|
|
59
|
+
};
|
|
60
|
+
declare const ItemCardTemplate: ({ data, containerClasses, imageContainerClasses, titleContainerClasses, descriptionContainerClasses, priceContainerClasses, buttonContainerClasses, badgeContainerClasses, }: ItemCardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export default ItemCardTemplate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
const ItemCardTemplate = ({ data, containerClasses = "", imageContainerClasses = "", titleContainerClasses = "", descriptionContainerClasses = "", priceContainerClasses = "", buttonContainerClasses = "", badgeContainerClasses = "", }) => {
|
|
7
|
+
return (_jsxs("div", { className: `${containerClasses}`, children: [_jsx("div", { className: badgeContainerClasses, children: _jsx(Badge, { text: _jsx(Text, { color: "", fontFamily: "font-serif", tag: "p", text: data.badgeText, size: "text-xs sm:text-sm" }), type: "span", hoverColor: "", backgroundColor: "bg-green-100", badgeContainerClasses: "text-green-800" }) }), _jsx("div", { className: `flex justify-center items-center ${imageContainerClasses}`, children: _jsx(Image, { background: false, src: data.imageUrl, alt: data.altText, additionalClasses: "object-contain max-h-full" }) }), _jsxs("div", { className: `${titleContainerClasses}`, children: [_jsx(Text, { tag: data.titleProps.tag, size: "text-sm sm:text-md", text: data.title, color: data.titleProps.fontColor, fontFamily: data.titleProps.fontFamily, additionalClasses: data.titleProps.additionalClasses }), _jsx(Text, { tag: "span", size: "text-xs sm:text-sm", text: data.identifier, color: "text-gray-500", fontFamily: "font-sans", additionalClasses: "mb-1 sm:mb-2" }), _jsx(Text, { tag: "span", size: "text-xs sm:text-sm", text: data.description, color: "text-gray-500", fontFamily: "font-sans", additionalClasses: "mb-2 sm:mb-4" }), _jsxs("div", { className: `${priceContainerClasses}`, children: [_jsx(Text, { tag: data.priceProps.tag, size: "text-sm sm:text-md", text: data.price, color: data.priceProps.fontColor, fontFamily: data.priceProps.fontFamily, additionalClasses: data.priceProps.additionalClasses }), _jsx(FormButton, { text: data.buttonProps.text, backgroundColor: data.buttonProps.color, shape: data.buttonProps.shape, borderColor: data.buttonProps.borderColor, additionalClasses: `${buttonContainerClasses} hover:bg-teal-800` })] })] })] }));
|
|
8
|
+
};
|
|
9
|
+
export default ItemCardTemplate;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TagName } from "../../Text/Text.types";
|
|
2
|
+
type DataTypes = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
rating: number;
|
|
6
|
+
link: string;
|
|
7
|
+
inStock: boolean;
|
|
8
|
+
inStockProps: {
|
|
9
|
+
tag: TagName;
|
|
10
|
+
size: string;
|
|
11
|
+
fontColor: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
inStockIcon: string;
|
|
14
|
+
outOfStockIcon: string;
|
|
15
|
+
additionalClasses: string;
|
|
16
|
+
};
|
|
17
|
+
linkTitle: boolean;
|
|
18
|
+
identifier: string;
|
|
19
|
+
titleProps: {
|
|
20
|
+
tag: TagName;
|
|
21
|
+
size: string;
|
|
22
|
+
fontColor: string;
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
additionalClasses: string;
|
|
25
|
+
};
|
|
26
|
+
price: string;
|
|
27
|
+
priceProps: {
|
|
28
|
+
tag: TagName;
|
|
29
|
+
size: string;
|
|
30
|
+
fontColor: string;
|
|
31
|
+
fontFamily: string;
|
|
32
|
+
additionalClasses: string;
|
|
33
|
+
};
|
|
34
|
+
imageUrl: string | null;
|
|
35
|
+
altText: string;
|
|
36
|
+
buttonProps: {
|
|
37
|
+
text: string;
|
|
38
|
+
as: string;
|
|
39
|
+
size: string;
|
|
40
|
+
fontColor: string;
|
|
41
|
+
borderColor: string;
|
|
42
|
+
shape: string;
|
|
43
|
+
color: string;
|
|
44
|
+
hoverBackground?: string;
|
|
45
|
+
additionalClasses: string;
|
|
46
|
+
};
|
|
47
|
+
badgeText: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
declare const KitContentCardTemplate: ({ data }: {
|
|
51
|
+
data: DataTypes;
|
|
52
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export default KitContentCardTemplate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
const KitContentCardTemplate = ({ data }) => {
|
|
7
|
+
return (_jsxs("div", { className: "flex flex-col items-start w-full sm:w-[244px] h-auto sm:h-[255px] border border-[#DFE4EA] bg-white rounded-lg relative p-3 hover:border-1 hover:border-teal-600 hover:shadow-inner", children: [_jsx("div", { className: "absolute top-2 left-2", children: _jsx(Badge, { text: _jsx(Text, { color: "", fontFamily: "font-serif", tag: "p", text: data.badgeText, size: "text-xs" }), type: "span", hoverColor: "", backgroundColor: "bg-green-100", badgeContainerClasses: "text-yellow-800" }) }), _jsx("div", { className: "flex flex-col items-center gap-2 mt-6 w-full", children: _jsx(Image, { background: false, src: data.imageUrl, alt: data.altText, additionalClasses: "w-[80px] h-[80px] sm:w-[100px] sm:h-[100px] object-contain" }) }), _jsxs("div", { className: "flex flex-col items-start w-full mt-2", children: [_jsx(Text, { tag: data.titleProps.tag, size: "text-xs sm:text-sm", text: data.title, color: data.titleProps.fontColor, fontFamily: data.titleProps.fontFamily, additionalClasses: `${data.titleProps.additionalClasses} text-left` }), _jsx(Text, { tag: "span", size: "text-xs", text: data.identifier, color: "text-slate-400", fontFamily: "font-sans", additionalClasses: "text-left" })] }), _jsxs("div", { className: "flex items-end justify-between w-full mt-auto", children: [_jsx(Text, { tag: data.priceProps.tag, size: "text-xs sm:text-sm", text: data.price, color: data.priceProps.fontColor, fontFamily: data.priceProps.fontFamily, additionalClasses: data.priceProps.additionalClasses }), _jsx(FormButton, { text: data.buttonProps.text, backgroundColor: "bg-slate-200", shape: data.buttonProps.shape, borderColor: data.buttonProps.borderColor, additionalClasses: "px-2 py-1 cursor-not-allowed", isDisabled: true })] })] }));
|
|
8
|
+
};
|
|
9
|
+
export default KitContentCardTemplate;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type DataTypes = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
addressLine1: string;
|
|
5
|
+
addressLine2: string;
|
|
6
|
+
addressLine3: string;
|
|
7
|
+
imageUrl: string | null;
|
|
8
|
+
altText: string;
|
|
9
|
+
badgeText: string;
|
|
10
|
+
};
|
|
11
|
+
type ShippingAddressCardTemplateProps = {
|
|
12
|
+
data: DataTypes;
|
|
13
|
+
};
|
|
14
|
+
declare const ShippingAddressCardTemplate: ({ data, }: ShippingAddressCardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default ShippingAddressCardTemplate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
const ShippingAddressCardTemplate = ({ data, }) => {
|
|
7
|
+
return (_jsxs("div", { className: "flex flex-col sm:flex-row p-4 sm:p-6 m-4 sm:m-20 border border-[#00B9A8] bg-white rounded-lg w-full relative hover:border-teal-500 hover:shadow-inner", children: [_jsx("div", { className: "flex-shrink-0 w-full sm:w-auto mb-4 sm:mb-0", children: _jsx(Image, { background: false, src: data.imageUrl, alt: data.altText, additionalClasses: "w-full h-auto sm:h-auto object-contain" }) }), _jsxs("div", { className: "flex flex-col w-full h-full sm:ml-5", children: [_jsx(Badge, { text: _jsx(Text, { color: "text-green-800", fontFamily: "font-serif", tag: "span", text: data.badgeText, size: "text-xs" }), type: "span", hoverColor: "", backgroundColor: "bg-green-100", badgeContainerClasses: "w-[fit-content] h-[fit-content]" }), _jsxs("div", { className: "mt-2 sm:mt-0", children: [_jsx(Text, { tag: "h2", size: "text-lg", text: data.title, color: "text-black", fontFamily: "font-serif", additionalClasses: "font-bold" }), _jsxs("div", { className: "mt-1", children: [_jsx(Text, { tag: "span", size: "text-sm", text: data.addressLine1, color: "text-slate-400", fontFamily: "font-sans", additionalClasses: "block" }), _jsx(Text, { tag: "span", size: "text-sm", text: data.addressLine2, color: "text-slate-400", fontFamily: "font-sans", additionalClasses: "block" }), _jsx(Text, { tag: "span", size: "text-sm", text: data.addressLine3, color: "text-slate-400", fontFamily: "font-sans", additionalClasses: "block" })] })] }), _jsxs("div", { className: "flex flex-row sm:flex-row gap-2 mt-4 sm:mt-20 w-full sm:w-auto", children: [_jsx(FormButton, { text: "Edit", backgroundColor: "bg-teal-600", shape: "rounded-md", borderColor: "border-none", additionalClasses: "px-2 py-1 sm:px-4 sm:py-2 hover:bg-teal-800" }), _jsx(FormButton, { text: "Delete", backgroundColor: "bg-transparent", shape: "rounded-md", borderColor: "border border-red-600", additionalClasses: "px-2 py-1 sm:px-4 sm:py-2 hover:bg-[#FFEBEE]" })] })] })] }));
|
|
8
|
+
};
|
|
9
|
+
export default ShippingAddressCardTemplate;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { TagName } from "../../Text/Text.types";
|
|
2
|
+
type DataTypes = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
rating: number;
|
|
6
|
+
link: string;
|
|
7
|
+
inStock: boolean;
|
|
8
|
+
inStockProps: {
|
|
9
|
+
tag: TagName;
|
|
10
|
+
size: string;
|
|
11
|
+
fontColor: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
inStockIcon: string;
|
|
14
|
+
outOfStockIcon: string;
|
|
15
|
+
additionalClasses: string;
|
|
16
|
+
};
|
|
17
|
+
linkTitle: boolean;
|
|
18
|
+
identifier: string;
|
|
19
|
+
titleProps: {
|
|
20
|
+
tag: TagName;
|
|
21
|
+
size: string;
|
|
22
|
+
fontColor: string;
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
additionalClasses: string;
|
|
25
|
+
};
|
|
26
|
+
price: string;
|
|
27
|
+
priceProps: {
|
|
28
|
+
tag: TagName;
|
|
29
|
+
size: string;
|
|
30
|
+
fontColor: string;
|
|
31
|
+
fontFamily: string;
|
|
32
|
+
additionalClasses: string;
|
|
33
|
+
};
|
|
34
|
+
imageUrl: string | null;
|
|
35
|
+
altText: string;
|
|
36
|
+
buttonProps: {
|
|
37
|
+
text: string;
|
|
38
|
+
as: string;
|
|
39
|
+
size: string;
|
|
40
|
+
fontColor: string;
|
|
41
|
+
borderColor: string;
|
|
42
|
+
shape: string;
|
|
43
|
+
color: string;
|
|
44
|
+
hoverBackground?: string;
|
|
45
|
+
additionalClasses: string;
|
|
46
|
+
};
|
|
47
|
+
badgeText: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
type VerticalCardTemplateProps = {
|
|
51
|
+
data: DataTypes;
|
|
52
|
+
containerClasses?: string;
|
|
53
|
+
imageContainerClasses?: string;
|
|
54
|
+
titleContainerClasses?: string;
|
|
55
|
+
descriptionContainerClasses?: string;
|
|
56
|
+
priceContainerClasses?: string;
|
|
57
|
+
buttonContainerClasses?: string;
|
|
58
|
+
badgeContainerClasses?: string;
|
|
59
|
+
};
|
|
60
|
+
declare const VerticalCardTemplate: ({ data, containerClasses, imageContainerClasses, titleContainerClasses, descriptionContainerClasses, priceContainerClasses, buttonContainerClasses, badgeContainerClasses, }: VerticalCardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export default VerticalCardTemplate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
const VerticalCardTemplate = ({ data, containerClasses = "", imageContainerClasses = "", titleContainerClasses = "", descriptionContainerClasses = "", priceContainerClasses = "", buttonContainerClasses = "", badgeContainerClasses = "", }) => {
|
|
7
|
+
return (_jsxs("div", { className: `${containerClasses} p-4`, children: [_jsx("div", { className: badgeContainerClasses, children: _jsx(Badge, { text: _jsx(Text, { color: "", fontFamily: "font-serif", tag: "p", text: data.badgeText, size: "text-md" }), type: "span", hoverColor: "", badgeContainerClasses: "text-slate-800", backgroundColor: "bg-slate-100" }) }), _jsx("div", { className: `relative ${imageContainerClasses}`, children: _jsx(Image, { background: false, src: data.imageUrl, alt: data.altText, additionalClasses: "w-full h-full object-contain" }) }), _jsxs("div", { className: titleContainerClasses, children: [_jsx("div", { className: "flex flex-col", children: _jsx(Text, { tag: data.titleProps.tag, size: data.titleProps.size, text: data.title, color: data.titleProps.fontColor, fontFamily: data.titleProps.fontFamily, additionalClasses: data.titleProps.additionalClasses }) }), _jsx("div", { className: descriptionContainerClasses, children: _jsxs("div", { className: "relative flex items-center gap-2", children: [_jsx("div", { className: "w-[30px] h-[30px] rounded-full border border-gray-300 flex items-center justify-center overflow-hidden z-10", children: _jsx(Image, { background: false, src: "../../../assets/compass-card-image-4.png", alt: "Icon 1", additionalClasses: "object-cover w-full h-full" }) }), _jsx("div", { className: "w-[30px] h-[30px] rounded-full border border-gray-300 flex items-center justify-center overflow-hidden -ml-[20px]", children: _jsx(Image, { background: false, src: "../../../assets/compass-card-image-2.png", alt: "Icon 2", additionalClasses: "object-cover w-full h-full" }) }), _jsx(Text, { tag: "span", size: "text-sm", text: data.description, color: "text-gray-500", fontFamily: "font-sans", additionalClasses: "ml-4" })] }) }), _jsxs("div", { className: priceContainerClasses, children: [_jsx(Text, { tag: data.priceProps.tag, size: data.priceProps.size, text: data.price, color: data.priceProps.fontColor, fontFamily: data.priceProps.fontFamily, additionalClasses: data.priceProps.additionalClasses }), _jsx(FormButton, { text: data.buttonProps.text, backgroundColor: data.buttonProps.color, shape: data.buttonProps.shape, borderColor: data.buttonProps.borderColor, additionalClasses: buttonContainerClasses })] })] })] }));
|
|
8
|
+
};
|
|
9
|
+
export default VerticalCardTemplate;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import FormButton from "../FormButton/FormButton";
|
|
3
|
+
import Text from "../Text/Text";
|
|
4
|
+
const CounterButton = ({ count, containerClassName, inputClassName, buttonClassName, iconClasses, onIncrementClick, onDecrementClick, onInputChange, }) => {
|
|
5
|
+
return (_jsxs("div", { className: containerClassName, children: [_jsx(FormButton, { icon: _jsx("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: iconClasses, children: _jsx("path", { d: "M11.0626 6.43135H0.937598C0.712598 6.43135 0.506348 6.24385 0.506348 6.0001C0.506348 5.7751 0.693848 5.56885 0.937598 5.56885H11.0626C11.2876 5.56885 11.4938 5.75635 11.4938 6.0001C11.4938 6.2251 11.2876 6.43135 11.0626 6.43135Z" }) }), text: _jsx(Text, { size: "", color: "", text: "Decrement", fontFamily: "", additionalClasses: "sr-only" }), backgroundColor: "clear", borderColor: "none", shape: "cornered", additionalClasses: buttonClassName, onClick: onDecrementClick }), _jsx("div", { className: `flex justify-center items-center border-x border-gray-300`, children: _jsx("input", { type: "text", value: count, className: inputClassName, onChange: onInputChange, onFocus: (e) => e.target.select() }) }), _jsx(FormButton, { icon: _jsxs("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: iconClasses, children: [_jsx("g", { clipPath: "url(#clip0_1032_24236)", children: _jsx("path", { d: "M11.2501 5.5876H6.43135V0.750098C6.43135 0.525098 6.24385 0.318848 6.0001 0.318848C5.7751 0.318848 5.56885 0.506348 5.56885 0.750098V5.5876H0.750098C0.525098 5.5876 0.318848 5.7751 0.318848 6.01885C0.318848 6.24385 0.506348 6.4501 0.750098 6.4501H5.5876V11.2501C5.5876 11.4751 5.7751 11.6813 6.01885 11.6813C6.24385 11.6813 6.4501 11.4938 6.4501 11.2501V6.43135H11.2501C11.4751 6.43135 11.6813 6.24385 11.6813 6.0001C11.6813 5.7751 11.4751 5.5876 11.2501 5.5876Z" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_1032_24236", children: _jsx("rect", { width: 12, height: 12, fill: "white" }) }) })] }), text: _jsx(Text, { size: "", color: "", text: "Increment", fontFamily: "", additionalClasses: "sr-only" }), backgroundColor: "clear", borderColor: "none", shape: "cornered", additionalClasses: buttonClassName, onClick: onIncrementClick })] }));
|
|
6
|
+
};
|
|
7
|
+
export default CounterButton;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import CounterButton from "../CounterButton/CounterButton";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/CounterButton",
|
|
6
|
+
component: CounterButton,
|
|
7
|
+
argTypes: {
|
|
8
|
+
count: {
|
|
9
|
+
control: "none",
|
|
10
|
+
description: "The initial count value to be displayed in the input field.",
|
|
11
|
+
},
|
|
12
|
+
containerClassName: {
|
|
13
|
+
control: "none",
|
|
14
|
+
description: "Additional classes for styling the outer container of the counter.",
|
|
15
|
+
},
|
|
16
|
+
inputClassName: {
|
|
17
|
+
control: "none",
|
|
18
|
+
description: "Additional classes for styling the input field.",
|
|
19
|
+
},
|
|
20
|
+
buttonClassName: {
|
|
21
|
+
control: "none",
|
|
22
|
+
description: "Additional classes for styling the increment and decrement buttons.",
|
|
23
|
+
},
|
|
24
|
+
iconClasses: {
|
|
25
|
+
control: "none",
|
|
26
|
+
description: "Additional classes for styling the icons.",
|
|
27
|
+
},
|
|
28
|
+
onIncrementClick: {
|
|
29
|
+
table: { disable: true },
|
|
30
|
+
control: "none",
|
|
31
|
+
description: "Function to handle increment button click.",
|
|
32
|
+
},
|
|
33
|
+
onDecrementClick: {
|
|
34
|
+
table: { disable: true },
|
|
35
|
+
control: "none",
|
|
36
|
+
description: "Function to handle decrement button click.",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
tags: ["autodocs"],
|
|
40
|
+
parameters: {
|
|
41
|
+
layout: "centered",
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
const Template = (args) => {
|
|
45
|
+
const [count, setCount] = useState(args.count);
|
|
46
|
+
const handleIncrement = () => {
|
|
47
|
+
setCount((prevCount) => prevCount + 1);
|
|
48
|
+
};
|
|
49
|
+
const handleDecrement = () => {
|
|
50
|
+
setCount((prevCount) => prevCount - 1);
|
|
51
|
+
};
|
|
52
|
+
const handleInputChange = (e) => {
|
|
53
|
+
const newCount = e.target.value === "" || e.target.value === null
|
|
54
|
+
? 0
|
|
55
|
+
: parseInt(e.target.value, 10);
|
|
56
|
+
if (!isNaN(newCount) && newCount >= 0) {
|
|
57
|
+
setCount(newCount);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return (_jsx(CounterButton, { ...args, count: count, onIncrementClick: handleIncrement, onDecrementClick: handleDecrement, onInputChange: handleInputChange }));
|
|
61
|
+
};
|
|
62
|
+
export const Default = Template.bind({});
|
|
63
|
+
Default.args = {
|
|
64
|
+
count: 1,
|
|
65
|
+
containerClassName: "flex items-center border border-gray-300 rounded-lg overflow-hidden ",
|
|
66
|
+
inputClassName: "w-full h-full text-center text-xl border-none outline-none m-0 p-0 bg-white",
|
|
67
|
+
buttonClassName: "w-12 h-12 flex items-center justify-center",
|
|
68
|
+
iconClasses: "fill-current text-blue-600",
|
|
69
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface CounterButtonTypes {
|
|
2
|
+
count: number;
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
inputClassName?: string;
|
|
5
|
+
buttonClassName?: string;
|
|
6
|
+
iconClasses?: string;
|
|
7
|
+
onIncrementClick: () => void;
|
|
8
|
+
onDecrementClick: () => void;
|
|
9
|
+
onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const Description = ({ title, children, containerClassName, titleClassName, contentClassName }) => {
|
|
3
|
+
return (_jsxs("div", { className: `${containerClassName}`, children: [_jsx("div", { className: `${titleClassName}`, children: title }), _jsx("div", { className: `${contentClassName}`, children: children })] }));
|
|
4
|
+
};
|
|
5
|
+
export default Description;
|