@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,54 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Description from './Description';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Description',
|
|
5
|
+
component: Description,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
containerClassName: {
|
|
12
|
+
control: 'none',
|
|
13
|
+
description: 'Styles for the container.',
|
|
14
|
+
},
|
|
15
|
+
titleClassName: {
|
|
16
|
+
control: 'none',
|
|
17
|
+
description: 'Styles for the title.',
|
|
18
|
+
},
|
|
19
|
+
contentClassName: {
|
|
20
|
+
control: 'none',
|
|
21
|
+
description: 'Styles for the content.',
|
|
22
|
+
},
|
|
23
|
+
title: {
|
|
24
|
+
control: 'none',
|
|
25
|
+
description: 'Title of the description.',
|
|
26
|
+
},
|
|
27
|
+
children: {
|
|
28
|
+
control: 'none',
|
|
29
|
+
description: 'Content of the description.',
|
|
30
|
+
},
|
|
31
|
+
style: {
|
|
32
|
+
control: 'none',
|
|
33
|
+
description: 'Styles for the description.',
|
|
34
|
+
table: { disable: true }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const Template = (args) => _jsx(Description, { ...args });
|
|
39
|
+
export const Default = Template.bind({});
|
|
40
|
+
Default.args = {
|
|
41
|
+
title: 'Sample Title',
|
|
42
|
+
children: _jsx("span", { children: "This is a sample description content." }),
|
|
43
|
+
containerClassName: 'p-4 sm:p-6 md:p-8 lg:p-10',
|
|
44
|
+
titleClassName: 'text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold mb-4',
|
|
45
|
+
contentClassName: 'text-base sm:text-lg md:text-xl lg:text-2xl',
|
|
46
|
+
};
|
|
47
|
+
export const WithCustomStyles = Template.bind({});
|
|
48
|
+
WithCustomStyles.args = {
|
|
49
|
+
title: 'Styled Title',
|
|
50
|
+
children: (_jsx("span", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." })),
|
|
51
|
+
containerClassName: 'p-4 sm:p-6 md:p-8 lg:p-10 bg-gray-100',
|
|
52
|
+
titleClassName: 'text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold mb-4 text-blue-500',
|
|
53
|
+
contentClassName: 'text-base sm:text-lg md:text-xl lg:text-2xl text-blue-500',
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import IconButton from "../IconButton/IconButton";
|
|
4
|
+
const DropDownIconButton = ({ icon, iconSize, iconColor, hasNotification, notificationTextColor, notificationBgColor, notificationCount, text, textContainerClasses, hoverBorderColor, hoverBackgroundColor, backgroundColor, borderColor, textClasses, submenu, menuPlacementClasses, onClick, }) => {
|
|
5
|
+
const [open, setOpen] = useState(false);
|
|
6
|
+
const menuTrigger = useRef(null);
|
|
7
|
+
const menuRef = useRef(null);
|
|
8
|
+
const useClickOutside = (refs, isOpen, setIsOpen) => {
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const clickHandler = ({ target }) => {
|
|
11
|
+
if (!refs.some((ref) => ref.current) ||
|
|
12
|
+
!isOpen ||
|
|
13
|
+
refs.some((ref) => ref.current?.contains(target)))
|
|
14
|
+
return;
|
|
15
|
+
setIsOpen(false);
|
|
16
|
+
};
|
|
17
|
+
document.addEventListener("click", clickHandler);
|
|
18
|
+
return () => document.removeEventListener("click", clickHandler);
|
|
19
|
+
}, [refs, isOpen, setIsOpen]);
|
|
20
|
+
};
|
|
21
|
+
useClickOutside([menuRef, menuTrigger], open, setOpen);
|
|
22
|
+
return (_jsxs("div", { className: "relative z-20", children: [_jsx("div", { ref: menuTrigger, onClick: () => setOpen(!open), className: "flex flex-col items-center justify-center group", children: _jsx(IconButton, { icon: icon, iconSize: iconSize, iconColor: iconColor, hasNotification: hasNotification, notificationTextClasses: notificationTextColor, notificationBgColor: notificationBgColor, notificationCount: notificationCount, text: text, textClasses: textClasses, hoverBorderColor: hoverBorderColor, hoverBackgroundColor: hoverBackgroundColor, backgroundColor: backgroundColor, borderColor: borderColor, additionalContainerClasses: textContainerClasses, onClick: onClick }) }), _jsx("div", { ref: menuRef, className: `absolute ${menuPlacementClasses} ${!open ? "hidden" : ""}`, children: submenu })] }));
|
|
23
|
+
};
|
|
24
|
+
export default DropDownIconButton;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import DropDownIconButton from "./DropDownIconButton";
|
|
3
|
+
import { getFontAwesomeIcon } from "../../utils/getFontAwesomeIcon";
|
|
4
|
+
import AlertSubmenu from "../Submenus/AlertSubmenu";
|
|
5
|
+
import AdminSubmenu from "../Submenus/AdminSubmenu";
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/DropDownIconButton",
|
|
8
|
+
component: DropDownIconButton,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
iconSize: {
|
|
12
|
+
control: 'none',
|
|
13
|
+
description: "Tailwind classes for the icon size. Example: `h-6 w-6`",
|
|
14
|
+
},
|
|
15
|
+
iconColor: {
|
|
16
|
+
control: 'none',
|
|
17
|
+
description: "Tailwind classes for the icon color. Example: `text-blue-500`",
|
|
18
|
+
},
|
|
19
|
+
backgroundColor: {
|
|
20
|
+
control: 'none',
|
|
21
|
+
description: "Tailwind classes for the background color. Example: `bg-gray-200`",
|
|
22
|
+
},
|
|
23
|
+
borderColor: {
|
|
24
|
+
control: 'none',
|
|
25
|
+
description: "Tailwind classes for the border color. Example: `border-gray-300`",
|
|
26
|
+
},
|
|
27
|
+
hoverBorderColor: {
|
|
28
|
+
control: 'none',
|
|
29
|
+
description: "Tailwind classes for the border color on hover. Example: `hover:border-blue-500`",
|
|
30
|
+
},
|
|
31
|
+
hoverBackgroundColor: {
|
|
32
|
+
control: 'none',
|
|
33
|
+
description: "Tailwind classes for the background on hover. Example: `hover:bg-gray-300`",
|
|
34
|
+
},
|
|
35
|
+
hasNotification: {
|
|
36
|
+
control: 'none',
|
|
37
|
+
description: "Flag to indicate if the button has a notification badge.",
|
|
38
|
+
},
|
|
39
|
+
notificationTextColor: {
|
|
40
|
+
control: 'none',
|
|
41
|
+
description: "Tailwind classes for the notification text color. Example: `text-white`",
|
|
42
|
+
},
|
|
43
|
+
notificationBgColor: {
|
|
44
|
+
control: 'none',
|
|
45
|
+
description: "Tailwind classes for the notification background color. Example: `bg-red-500`",
|
|
46
|
+
},
|
|
47
|
+
notificationCount: {
|
|
48
|
+
control: 'none',
|
|
49
|
+
description: "The number to be displayed inside the notification badge. Example: `12`",
|
|
50
|
+
},
|
|
51
|
+
text: {
|
|
52
|
+
control: 'none',
|
|
53
|
+
description: "The text to be displayed below the button. Example: `Profile`",
|
|
54
|
+
},
|
|
55
|
+
textClasses: {
|
|
56
|
+
control: 'none',
|
|
57
|
+
description: "Tailwind classes to style the text. Example: `text-sm text-black`",
|
|
58
|
+
},
|
|
59
|
+
menuPlacementClasses: {
|
|
60
|
+
control: 'none',
|
|
61
|
+
description: "Tailwind classes to position the dropdown menu. Example: `right-0 top-full mt-5 w-[200px]`",
|
|
62
|
+
},
|
|
63
|
+
submenu: {
|
|
64
|
+
control: 'none',
|
|
65
|
+
description: "React node representing the submenu to be displayed in the dropdown.",
|
|
66
|
+
},
|
|
67
|
+
onClick: {
|
|
68
|
+
table: {
|
|
69
|
+
disable: true,
|
|
70
|
+
},
|
|
71
|
+
control: 'none',
|
|
72
|
+
description: "Callback function to handle click events.",
|
|
73
|
+
},
|
|
74
|
+
icon: {
|
|
75
|
+
control: 'none',
|
|
76
|
+
description: "React node representing the icon to be displayed in the button.",
|
|
77
|
+
},
|
|
78
|
+
textContainerClasses: {
|
|
79
|
+
control: 'none',
|
|
80
|
+
description: "Tailwind classes to style the container of the text. Example: `text-center`",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
parameters: {
|
|
84
|
+
layout: "centered",
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const Template = (args) => _jsx(DropDownIconButton, { ...args });
|
|
88
|
+
export const Default = Template.bind({});
|
|
89
|
+
Default.args = {
|
|
90
|
+
icon: getFontAwesomeIcon("cog"),
|
|
91
|
+
iconSize: "h-8 w-8",
|
|
92
|
+
iconColor: "text-black",
|
|
93
|
+
hasNotification: true,
|
|
94
|
+
notificationTextColor: "text-white",
|
|
95
|
+
notificationBgColor: "bg-green-600",
|
|
96
|
+
notificationCount: 5,
|
|
97
|
+
text: "Settings",
|
|
98
|
+
textClasses: "text-black font-serif text-md",
|
|
99
|
+
hoverBackgroundColor: "hover:bg-gray-300",
|
|
100
|
+
backgroundColor: "bg-gray-200",
|
|
101
|
+
borderColor: "border-gray-300",
|
|
102
|
+
hoverBorderColor: "hover:border-black",
|
|
103
|
+
menuPlacementClasses: "right-0 top-full mt-2 w-[200px]",
|
|
104
|
+
submenu: (_jsx(AdminSubmenu, { menuClasses: "p-4 bg-white rounded-lg shadow-lg", callToActionChildren: _jsx("div", { className: "text-gray-800 font-medium", children: "Manage Settings" }), secondCallToActionChildren: _jsx("div", { className: "text-gray-600", children: "More settings options..." }) })),
|
|
105
|
+
};
|
|
106
|
+
export const Alerts = Template.bind({});
|
|
107
|
+
Alerts.args = {
|
|
108
|
+
icon: getFontAwesomeIcon("bell"),
|
|
109
|
+
iconSize: "h-8 w-8",
|
|
110
|
+
iconColor: "text-black",
|
|
111
|
+
hasNotification: true,
|
|
112
|
+
notificationTextColor: "text-white",
|
|
113
|
+
notificationBgColor: "bg-red-600",
|
|
114
|
+
notificationCount: 3,
|
|
115
|
+
text: "Alerts",
|
|
116
|
+
textClasses: "text-black font-serif text-md",
|
|
117
|
+
hoverBackgroundColor: "hover:bg-gray-300",
|
|
118
|
+
backgroundColor: "bg-gray-200",
|
|
119
|
+
borderColor: "border-gray-300",
|
|
120
|
+
hoverBorderColor: "hover:border-black",
|
|
121
|
+
menuPlacementClasses: "right-0 top-full mt-2 w-[344px]",
|
|
122
|
+
submenu: (_jsx(AlertSubmenu, { data: [
|
|
123
|
+
{ title: "Order SA100000 status updated to Fulfilled", subtitle: "14h ago", link: "#" },
|
|
124
|
+
{ title: "You have a new request from Gina Prince", subtitle: "Open TOGa Supply", link: "#" },
|
|
125
|
+
{ title: "Order SA100002 status updated to Fulfilled", subtitle: "2d ago", link: "#" },
|
|
126
|
+
], newAlertCount: 4, newAlertColor: "bg-light-green-800", clearAlertsText: "Mark all as Read", clearAlertsTextClasses: "text-gray-3 hover:text-dark-green-800", newAlertCountClasses: "text-gray-900 font-semibold", menuContainerClasses: "overflow-hidden rounded-lg border-1 border-stroke bg-white shadow-lg", menuHeaderContainerClasses: "flex justify-between items-center p-4 border-b border-gray-200", alertListContainerClasses: "overflow-y-auto max-h-[300px] divide-y divide-gray-200" })),
|
|
127
|
+
};
|
|
128
|
+
export const Admin = Template.bind({});
|
|
129
|
+
Admin.args = {
|
|
130
|
+
icon: getFontAwesomeIcon("user"),
|
|
131
|
+
iconSize: "h-8 w-8",
|
|
132
|
+
iconColor: "text-black",
|
|
133
|
+
hasNotification: false,
|
|
134
|
+
notificationTextColor: "text-white",
|
|
135
|
+
notificationBgColor: "bg-blue-600",
|
|
136
|
+
notificationCount: 0,
|
|
137
|
+
text: "Admin",
|
|
138
|
+
textClasses: "text-black font-serif text-md",
|
|
139
|
+
hoverBackgroundColor: "hover:bg-gray-300",
|
|
140
|
+
backgroundColor: "bg-gray-200",
|
|
141
|
+
borderColor: "border-gray-300",
|
|
142
|
+
hoverBorderColor: "hover:border-black",
|
|
143
|
+
menuPlacementClasses: "right-0 top-full mt-2 w-[344px]",
|
|
144
|
+
submenu: (_jsx(AdminSubmenu, { menuClasses: "overflow-hidden rounded-lg border-1 border-stroke bg-white shadow-lg p-6", callToActionChildren: _jsx("div", { className: "flex items-center text-gray-700", children: _jsxs("a", { href: "#", className: "hover:text-dark-green-800", children: [_jsx("span", { className: "pr-2", children: getFontAwesomeIcon("inbox", "regular") }), "Manage Requests"] }) }), secondCallToActionChildren: _jsxs("div", { className: "flex flex-col text-gray-700", children: [_jsxs("p", { className: "pb-3", children: [_jsx("span", { className: "pr-2", children: getFontAwesomeIcon("glasses", "regular") }), "View As"] }), _jsx("div", { className: "border rounded-md border-stroke p-4", children: "Placeholder Input - Behavior TBD" })] }) })),
|
|
145
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { render, screen, fireEvent } from "@testing-library/react";
|
|
3
|
+
import DropDownIconButton from "./DropDownIconButton";
|
|
4
|
+
import { describe, expect, test } from "vitest";
|
|
5
|
+
const alertData = [
|
|
6
|
+
{
|
|
7
|
+
link: "#",
|
|
8
|
+
title: "New Comment",
|
|
9
|
+
subtitle: "You have a new comment on your post.",
|
|
10
|
+
status: true,
|
|
11
|
+
externalLink: "View Comment",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
link: "#",
|
|
15
|
+
title: "New Like",
|
|
16
|
+
subtitle: "Someone liked your post.",
|
|
17
|
+
status: true,
|
|
18
|
+
externalLink: "View Post",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
const AlertSubmenu = ({ data }) => (_jsx("div", { "data-testid": "alert-submenu", children: data.map((alert, index) => (_jsxs("div", { children: [_jsx("h6", { children: alert.title }), _jsx("p", { children: alert.subtitle })] }, index))) }));
|
|
22
|
+
describe("DropDownIconButton", () => {
|
|
23
|
+
test("renders correctly with AlertSubmenu", () => {
|
|
24
|
+
render(_jsx(DropDownIconButton, { icon: _jsx("img", { src: "/path/to/icon.png", alt: "icon" }), iconSize: "text-sm", iconColor: "text-black", hasNotification: true, notificationTextColor: "text-white", notificationBgColor: "bg-dark-green-800", notificationCount: 4, text: "Notifications", textClasses: "text-sm pt-1 font-medium text-black", hoverBackgroundColor: "group-hover:bg-dark-green-200", backgroundColor: "bg-gray-2", menuPlacementClasses: "right-0 top-full mt-5 w-[344px]", submenu: _jsx(AlertSubmenu, { data: alertData }) }));
|
|
25
|
+
const button = screen.getByLabelText(/Notifications/);
|
|
26
|
+
fireEvent.click(button);
|
|
27
|
+
expect(screen.getByTestId("alert-submenu")).toBeInTheDocument();
|
|
28
|
+
expect(screen.getByText(/New Comment/)).toBeInTheDocument();
|
|
29
|
+
expect(screen.getByText(/New Like/)).toBeInTheDocument();
|
|
30
|
+
});
|
|
31
|
+
test("toggles menu visibility on button click", () => {
|
|
32
|
+
render(_jsx(DropDownIconButton, { icon: _jsx("img", { src: "/path/to/icon.png", alt: "icon" }), iconSize: "text-sm", iconColor: "text-black", hasNotification: true, notificationTextColor: "text-white", notificationBgColor: "bg-dark-green-800", notificationCount: 4, text: "Notifications", textClasses: "text-sm pt-1 font-medium text-black", hoverBackgroundColor: "group-hover:bg-dark-green-200", backgroundColor: "bg-gray-2", menuPlacementClasses: "right-0 top-full mt-5 w-[344px]", submenu: _jsx(AlertSubmenu, { data: alertData }) }));
|
|
33
|
+
const button = screen.getByLabelText(/Notifications/);
|
|
34
|
+
fireEvent.click(button);
|
|
35
|
+
const submenu = screen.getByTestId("alert-submenu");
|
|
36
|
+
expect(submenu).toBeVisible();
|
|
37
|
+
fireEvent.click(button);
|
|
38
|
+
expect(submenu).not.toBeVisible();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DropDownIconButtonProps {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
iconSize: string;
|
|
5
|
+
iconColor: string;
|
|
6
|
+
hasNotification: boolean;
|
|
7
|
+
notificationTextColor: string;
|
|
8
|
+
notificationBgColor: string;
|
|
9
|
+
notificationCount: number;
|
|
10
|
+
text: string;
|
|
11
|
+
textContainerClasses?: string;
|
|
12
|
+
hoverBorderColor?: string;
|
|
13
|
+
hoverBackgroundColor?: string;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
borderColor?: string;
|
|
16
|
+
textClasses?: string;
|
|
17
|
+
submenu: React.ReactNode;
|
|
18
|
+
menuPlacementClasses: string;
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const ContactInfoItem = ({ icon, children, }) => {
|
|
3
|
+
return (_jsxs("div", { className: "flex w-full space-between pb-3", children: [_jsx("div", { className: "flex w-[10%] my-1", children: icon }), _jsx("div", { className: "my-1", children: children })] }));
|
|
4
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"DUMMYCONTACTDATA": [
|
|
3
|
+
{
|
|
4
|
+
"id": "1",
|
|
5
|
+
"address": "3 Seaview Boulevard",
|
|
6
|
+
"city": "Port Washington",
|
|
7
|
+
"state": "NY 11050",
|
|
8
|
+
"googleLink": "https://maps.app.goo.gl/kyLZNYZHfyKxSnSH8",
|
|
9
|
+
"phone": "217.472.0953",
|
|
10
|
+
"email": "generic-company@email.com"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"DUMMYNAVDATA": [
|
|
14
|
+
{
|
|
15
|
+
"id": "1",
|
|
16
|
+
"title": "About",
|
|
17
|
+
"link": "#",
|
|
18
|
+
"links": [
|
|
19
|
+
{
|
|
20
|
+
"menuItem": "Features",
|
|
21
|
+
"link": "#"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"menuItem": "Pricing",
|
|
25
|
+
"link": "#"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"menuItem": "Support",
|
|
29
|
+
"link": "#"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"menuItem": "Forums",
|
|
33
|
+
"link": "#"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": 2,
|
|
39
|
+
"title": "Projects",
|
|
40
|
+
"links": [
|
|
41
|
+
{
|
|
42
|
+
"menuItem": "Contribute",
|
|
43
|
+
"link": "#"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"menuItem": "Media assets",
|
|
47
|
+
"link": "#"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"menuItem": "Changelog",
|
|
51
|
+
"link": "#"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"menuItem": "Releases",
|
|
55
|
+
"link": "#"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": 3,
|
|
61
|
+
"title": "Community",
|
|
62
|
+
"links": [
|
|
63
|
+
{
|
|
64
|
+
"menuItem": "Join Discord",
|
|
65
|
+
"link": "#"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"menuItem": "Follow on Twitter",
|
|
69
|
+
"link": "#"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"menuItem": "Email newsletter",
|
|
73
|
+
"link": "#"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"menuItem": "GitHub discussions",
|
|
77
|
+
"link": "#"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": 4,
|
|
83
|
+
"title": "Store",
|
|
84
|
+
"links": [
|
|
85
|
+
{
|
|
86
|
+
"menuItem": "Computers",
|
|
87
|
+
"link": "#"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"menuItem": "IpadsIpads",
|
|
91
|
+
"link": "#"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"menuItem": "Accessories",
|
|
95
|
+
"link": "#"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"title": "Extra Row",
|
|
101
|
+
"links": [
|
|
102
|
+
{
|
|
103
|
+
"menuItem": "One submenu",
|
|
104
|
+
"link": "#"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"DUMMYSOCIALDATA": [
|
|
110
|
+
{
|
|
111
|
+
"type": "Twitter",
|
|
112
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
113
|
+
"path": "M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z",
|
|
114
|
+
"ariaLabel": "Twitter",
|
|
115
|
+
"href": "https://twitter.com/"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "YouTube",
|
|
119
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
120
|
+
"path": "M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z",
|
|
121
|
+
"ariaLabel": "YouTube",
|
|
122
|
+
"href": "https://youtube.com/"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "Facebook",
|
|
126
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
127
|
+
"path": "M9 8h-3v4h3v12h5v-12h3.642l.358-4h-4v-1.667c0-.955.192-1.333 1.115-1.333h2.885v-5h-3.808c-3.596 0-5.192 1.583-5.192 4.615v3.385z",
|
|
128
|
+
"ariaLabel": "Facebook",
|
|
129
|
+
"href": "https://facebook.com/"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import Image from "../Image/Image";
|
|
3
|
+
import { DUMMYCONTACTDATA, DUMMYNAVDATA, DUMMYSOCIALDATA } from "./DUMMYFOOTERDATA.json";
|
|
4
|
+
import { SocialList } from "../../utils/generateSocialList";
|
|
5
|
+
import { NavList } from "../../utils/generateNavMenu";
|
|
6
|
+
import { Accordion } from "../../utils/generateAccordionItem";
|
|
7
|
+
import { FooterContacts } from "../../utils/generateFooterContacts";
|
|
8
|
+
const Footer = ({ logo = (_jsx(Image, { src: "../../../assets/Logo.png", alt: "Generic Company Logo.", background: false, additionalClasses: "w-40 p-2" })), hasTitle, hasSlogan, title, slogan, backgroundColor = "bg-gray-800", logoBorderRadius = "rounded-md", logoHoverColor = "hover:bg-gray-700", hasNavItems = true, hasSocial = true, hasContact = true, hasCopyRight = true, copyRightText, socialData = DUMMYSOCIALDATA, navData = DUMMYNAVDATA, contactData = DUMMYCONTACTDATA, socialTitle, contactTitle, copyRightTextPlacement = "text-center", socialPlacement = "flex justify-center mt-4", accordionParentStyle = "border-2 rounded-md border-black p-2 w-full", accordionExpandedStyle = "pl-3", accordionGap = "gap-4", }) => {
|
|
9
|
+
const logoClasses = `${logoHoverColor} ${logoBorderRadius}`;
|
|
10
|
+
return (_jsxs("footer", { className: `footer flex flex-col ${backgroundColor} py-6 px-6`, "data-testid": "footer", children: [_jsxs("div", { className: "flex justify-between w-full max-xl:px-2 max-lg:flex max-lg:flex-col max-xl:gap-10", children: [_jsxs("div", { className: "max-lg:flex max-lg:justify-between max-lg:w-full", children: [_jsx("div", { className: logoClasses, children: _jsx("a", { tabIndex: 0, href: "", "data-testid": "footer-logo", children: logo }) }), _jsxs("div", { "data-testid": "title-slogan", children: [hasTitle ? (_jsx("div", { "data-testid": "title", children: title })) : null, hasSlogan ? (_jsx("div", { "data-testid": "slogan", children: slogan })) : null] })] }), hasNavItems ? (_jsxs(_Fragment, { children: [_jsx("nav", { className: "flex gap-12 max-sm:hidden", "aria-label": "Site navigation", "data-testid": "footer-site-navigation", tabIndex: 0, children: _jsx(NavList, { navDataList: navData }) }), _jsx("nav", { className: `hidden flex-col ${accordionGap} col-span-6 w-3/4 max-sm:w-full max-sm:flex`, "aria-label": "Site navigation", "data-testid": "footer-mobile-navigation", children: _jsx(Accordion, { navData: navData, accordionParentStyle: accordionParentStyle, accordionExpandedStyle: accordionExpandedStyle }) })] })) : null, hasContact ? (_jsxs("div", { className: "flex flex-col space-between", "data-testid": "footer-contact-info", children: [contactTitle ? contactTitle : null, _jsx(FooterContacts, { contactDataList: contactData })] })) : null] }), hasSocial ? (_jsxs("nav", { className: `w-full ${socialPlacement}`, "aria-hidden": "false", "aria-label": "Social media navigation", "data-testid": "footer-social-navigation", children: [socialTitle ? socialTitle : null, _jsx("div", { className: "flex justify-center gap-4 mt-4", children: _jsx(SocialList, { socialDataList: socialData }) })] })) : null, hasCopyRight ? (_jsx("div", { className: `w-full ${copyRightTextPlacement}`, "aria-hidden": "false", children: copyRightText })) : null] }));
|
|
11
|
+
};
|
|
12
|
+
export default Footer;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { FooterProps } from "./Footer.types";
|
|
3
|
+
declare const _default: Meta<FooterProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: any;
|
|
6
|
+
export declare const CompassFooter: any;
|
|
7
|
+
export declare const AlternateMobileNavStyle: any;
|