trepur_components 0.4.7 → 1.0.0
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/Accordion/Accordion.stories.tsx +88 -0
- package/dist/components/Accordion/index.tsx +31 -0
- package/dist/components/AlertBar/AlertBar.stories.tsx +105 -0
- package/dist/components/AlertBar/index.tsx +127 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.tsx +60 -0
- package/dist/components/Breadcrumbs/index.tsx +55 -0
- package/dist/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx +52 -0
- package/dist/components/BreadcrumbsBordered/index.tsx +44 -0
- package/dist/components/BreadcrumbsItem/BreadcrumbsItem.stories.tsx +54 -0
- package/dist/components/BreadcrumbsItem/index.tsx +151 -0
- package/dist/components/Button/button.stories.tsx +148 -0
- package/dist/components/Button/index.tsx +91 -0
- package/dist/components/Card/Card.stories.tsx +150 -0
- package/dist/components/Card/index.tsx +162 -0
- package/dist/components/CardWithTopImage/CardWithTopImage.stories.tsx +48 -0
- package/dist/components/CardWithTopImage/index.tsx +40 -0
- package/dist/components/Carousel/Carousel.stories.tsx +369 -0
- package/dist/components/Carousel/index.tsx +267 -0
- package/dist/components/ChevronCard/ChevronCard.stories.tsx +21 -0
- package/dist/components/ChevronCard/index.tsx +39 -0
- package/dist/components/Collapsible/Collapsible.stories.tsx +70 -0
- package/dist/components/Collapsible/index.tsx +124 -0
- package/dist/components/Column/Column.stories.tsx +82 -0
- package/dist/components/Column/index.tsx +114 -0
- package/dist/components/Container/Container.stories.tsx +38 -0
- package/dist/components/Container/index.tsx +30 -0
- package/dist/components/FooterBar/footerBar.stories.tsx +57 -0
- package/dist/components/FooterBar/index.tsx +44 -0
- package/dist/components/Form/Form.stories.tsx +93 -0
- package/dist/components/Form/index.tsx +58 -0
- package/dist/components/FyreCard/FyreCard.stories.tsx +29 -0
- package/dist/components/FyreCard/index.tsx +46 -0
- package/dist/components/Greeting/Greeting.stories.tsx +42 -0
- package/dist/components/Greeting/index.tsx +46 -0
- package/dist/components/HamburgerIcon/HamburgerIcon.stories.tsx +50 -0
- package/dist/components/HamburgerIcon/index.tsx +65 -0
- package/dist/components/Icon/Icon.stories.tsx +102 -0
- package/dist/components/Icon/index.tsx +112 -0
- package/dist/components/Image/Image.stories.tsx +88 -0
- package/dist/components/Image/index.tsx +113 -0
- package/dist/components/ImageLink/ImageLink.stories.tsx +60 -0
- package/dist/components/ImageLink/index.tsx +62 -0
- package/dist/components/ImageLinkList/ImageLinkList.stories.tsx +32 -0
- package/dist/components/ImageLinkList/index.tsx +33 -0
- package/dist/components/InformationIcon/InformationIcon.stories.tsx +86 -0
- package/dist/components/InformationIcon/index.tsx +84 -0
- package/dist/components/Input/Input.stories.tsx +99 -0
- package/dist/components/Input/index.tsx +126 -0
- package/dist/components/Jumbotron/Jumbotron.stories.tsx +22 -0
- package/dist/components/Jumbotron/index.tsx +25 -0
- package/dist/components/Nav/Nav.stories.tsx +155 -0
- package/dist/components/Nav/index.tsx +180 -0
- package/dist/components/NavItem/NavItem.stories.tsx +89 -0
- package/dist/components/NavItem/index.tsx +65 -0
- package/dist/components/NewsCard/NewsCard.stories.tsx +71 -0
- package/dist/components/NewsCard/index.tsx +48 -0
- package/dist/components/Profile/Profile.stories.tsx +50 -0
- package/dist/components/Profile/index.tsx +87 -0
- package/dist/components/Row/Row.stories.tsx +51 -0
- package/dist/components/Row/index.tsx +24 -0
- package/dist/components/Search/Search.stories.tsx +58 -0
- package/dist/components/Search/index.tsx +58 -0
- package/dist/components/SocialBlock/SocialBlock.stories.tsx +114 -0
- package/dist/components/SocialBlock/index.tsx +161 -0
- package/dist/components/StarRating/StarRating.stories.tsx +23 -0
- package/dist/components/StarRating/index.tsx +71 -0
- package/dist/components/Testimonial/Testimonial.stories.tsx +110 -0
- package/dist/components/Testimonial/index.tsx +50 -0
- package/dist/components/TextAndTitle/TextAndTitle.stories.tsx +65 -0
- package/dist/components/TextAndTitle/index.tsx +257 -0
- package/dist/components/TextArea/TextArea.stories.tsx +67 -0
- package/dist/components/TextArea/index.tsx +97 -0
- package/dist/components/Timeline/Timeline.stories.tsx +100 -0
- package/dist/components/Timeline/index.tsx +315 -0
- package/dist/components/Tubestops/Tubestops.stories.tsx +66 -0
- package/dist/components/Tubestops/index.tsx +77 -0
- package/dist/components/UserIcon/UserIcon.stories.tsx +67 -0
- package/dist/components/UserIcon/index.tsx +42 -0
- package/dist/components/Video/Video.stories.tsx +23 -0
- package/dist/components/Video/index.tsx +49 -0
- package/dist/index.js +0 -39
- package/dist/src/lib/components/Accordion/Accordion.stories.d.ts +6 -0
- package/dist/src/lib/components/Accordion/Accordion.stories.js +72 -0
- package/dist/src/lib/components/Accordion/Accordion.stories.js.map +1 -0
- package/dist/src/lib/components/Accordion/index.d.ts +9 -0
- package/dist/src/lib/components/Accordion/index.js +9 -0
- package/dist/src/lib/components/Accordion/index.js.map +1 -0
- package/dist/src/lib/components/AlertBar/AlertBar.stories.d.ts +6 -0
- package/dist/src/lib/components/AlertBar/AlertBar.stories.js +91 -0
- package/dist/src/lib/components/AlertBar/AlertBar.stories.js.map +1 -0
- package/dist/src/lib/components/AlertBar/index.d.ts +16 -0
- package/dist/src/lib/components/AlertBar/index.js +62 -0
- package/dist/src/lib/components/AlertBar/index.js.map +1 -0
- package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +6 -0
- package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js +56 -0
- package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
- package/dist/src/lib/components/Breadcrumbs/index.d.ts +11 -0
- package/dist/src/lib/components/Breadcrumbs/index.js +22 -0
- package/dist/src/lib/components/Breadcrumbs/index.js.map +1 -0
- package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.d.ts +6 -0
- package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +45 -0
- package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js.map +1 -0
- package/dist/src/lib/components/BreadcrumbsBordered/index.d.ts +9 -0
- package/dist/src/lib/components/BreadcrumbsBordered/index.js +18 -0
- package/dist/src/lib/components/BreadcrumbsBordered/index.js.map +1 -0
- package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.d.ts +6 -0
- package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js +50 -0
- package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js.map +1 -0
- package/dist/src/lib/components/BreadcrumbsItem/index.d.ts +12 -0
- package/dist/src/lib/components/BreadcrumbsItem/index.js +59 -0
- package/dist/src/lib/components/BreadcrumbsItem/index.js.map +1 -0
- package/dist/src/lib/components/Button/button.stories.d.ts +6 -0
- package/dist/src/lib/components/Button/button.stories.js +87 -0
- package/dist/src/lib/components/Button/button.stories.js.map +1 -0
- package/dist/src/lib/components/Button/index.d.ts +17 -0
- package/dist/src/lib/components/Button/index.js +32 -0
- package/dist/src/lib/components/Button/index.js.map +1 -0
- package/dist/src/lib/components/Card/Card.stories.d.ts +5 -0
- package/dist/src/lib/components/Card/Card.stories.js +124 -0
- package/dist/src/lib/components/Card/Card.stories.js.map +1 -0
- package/dist/src/lib/components/Card/index.d.ts +31 -0
- package/dist/src/lib/components/Card/index.js +63 -0
- package/dist/src/lib/components/Card/index.js.map +1 -0
- package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.d.ts +6 -0
- package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js +40 -0
- package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js.map +1 -0
- package/dist/src/lib/components/CardWithTopImage/index.d.ts +10 -0
- package/dist/src/lib/components/CardWithTopImage/index.js +15 -0
- package/dist/src/lib/components/CardWithTopImage/index.js.map +1 -0
- package/dist/src/lib/components/Carousel/Carousel.stories.d.ts +6 -0
- package/dist/src/lib/components/Carousel/Carousel.stories.js +297 -0
- package/dist/src/lib/components/Carousel/Carousel.stories.js.map +1 -0
- package/dist/src/lib/components/Carousel/index.d.ts +61 -0
- package/dist/src/lib/components/Carousel/index.js +81 -0
- package/dist/src/lib/components/Carousel/index.js.map +1 -0
- package/dist/src/lib/components/ChevronCard/ChevronCard.stories.d.ts +6 -0
- package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js +14 -0
- package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js.map +1 -0
- package/dist/src/lib/components/ChevronCard/index.d.ts +7 -0
- package/dist/src/lib/components/ChevronCard/index.js +20 -0
- package/dist/src/lib/components/ChevronCard/index.js.map +1 -0
- package/dist/src/lib/components/Collapsible/Collapsible.stories.d.ts +6 -0
- package/dist/src/lib/components/Collapsible/Collapsible.stories.js +64 -0
- package/dist/src/lib/components/Collapsible/Collapsible.stories.js.map +1 -0
- package/dist/src/lib/components/Collapsible/index.d.ts +16 -0
- package/dist/src/lib/components/Collapsible/index.js +67 -0
- package/dist/src/lib/components/Collapsible/index.js.map +1 -0
- package/dist/src/lib/components/Column/Column.stories.d.ts +6 -0
- package/dist/src/lib/components/Column/Column.stories.js +30 -0
- package/dist/src/lib/components/Column/Column.stories.js.map +1 -0
- package/dist/src/lib/components/Column/index.d.ts +12 -0
- package/dist/src/lib/components/Column/index.js +83 -0
- package/dist/src/lib/components/Column/index.js.map +1 -0
- package/dist/src/lib/components/Container/Container.stories.d.ts +6 -0
- package/dist/src/lib/components/Container/Container.stories.js +30 -0
- package/dist/src/lib/components/Container/Container.stories.js.map +1 -0
- package/dist/src/lib/components/Container/index.d.ts +9 -0
- package/dist/src/lib/components/Container/index.js +8 -0
- package/dist/src/lib/components/Container/index.js.map +1 -0
- package/dist/src/lib/components/FooterBar/footerBar.stories.d.ts +6 -0
- package/dist/src/lib/components/FooterBar/footerBar.stories.js +48 -0
- package/dist/src/lib/components/FooterBar/footerBar.stories.js.map +1 -0
- package/dist/src/lib/components/FooterBar/index.d.ts +11 -0
- package/dist/src/lib/components/FooterBar/index.js +15 -0
- package/dist/src/lib/components/FooterBar/index.js.map +1 -0
- package/dist/src/lib/components/Form/Form.stories.d.ts +6 -0
- package/dist/src/lib/components/Form/Form.stories.js +82 -0
- package/dist/src/lib/components/Form/Form.stories.js.map +1 -0
- package/dist/src/lib/components/Form/index.d.ts +16 -0
- package/dist/src/lib/components/Form/index.js +19 -0
- package/dist/src/lib/components/Form/index.js.map +1 -0
- package/dist/src/lib/components/FyreCard/FyreCard.stories.d.ts +6 -0
- package/dist/src/lib/components/FyreCard/FyreCard.stories.js +22 -0
- package/dist/src/lib/components/FyreCard/FyreCard.stories.js.map +1 -0
- package/dist/src/lib/components/FyreCard/index.d.ts +13 -0
- package/dist/src/lib/components/FyreCard/index.js +18 -0
- package/dist/src/lib/components/FyreCard/index.js.map +1 -0
- package/dist/src/lib/components/Greeting/Greeting.stories.d.ts +6 -0
- package/dist/src/lib/components/Greeting/Greeting.stories.js +33 -0
- package/dist/src/lib/components/Greeting/Greeting.stories.js.map +1 -0
- package/dist/src/lib/components/Greeting/index.d.ts +10 -0
- package/dist/src/lib/components/Greeting/index.js +23 -0
- package/dist/src/lib/components/Greeting/index.js.map +1 -0
- package/dist/src/lib/components/Icon/Icon.stories.d.ts +6 -0
- package/dist/src/lib/components/Icon/Icon.stories.js +85 -0
- package/dist/src/lib/components/Icon/Icon.stories.js.map +1 -0
- package/dist/src/lib/components/Icon/index.d.ts +17 -0
- package/dist/src/lib/components/Icon/index.js +42 -0
- package/dist/src/lib/components/Icon/index.js.map +1 -0
- package/dist/src/lib/components/Image/Image.stories.d.ts +6 -0
- package/dist/src/lib/components/Image/Image.stories.js +73 -0
- package/dist/src/lib/components/Image/Image.stories.js.map +1 -0
- package/dist/src/lib/components/Image/index.d.ts +16 -0
- package/dist/src/lib/components/Image/index.js +54 -0
- package/dist/src/lib/components/Image/index.js.map +1 -0
- package/dist/src/lib/components/ImageLink/ImageLink.stories.d.ts +6 -0
- package/dist/src/lib/components/ImageLink/ImageLink.stories.js +49 -0
- package/dist/src/lib/components/ImageLink/ImageLink.stories.js.map +1 -0
- package/dist/src/lib/components/ImageLink/index.d.ts +15 -0
- package/dist/src/lib/components/ImageLink/index.js +18 -0
- package/dist/src/lib/components/ImageLink/index.js.map +1 -0
- package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.d.ts +6 -0
- package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js +25 -0
- package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js.map +1 -0
- package/dist/src/lib/components/ImageLinkList/index.d.ts +9 -0
- package/dist/src/lib/components/ImageLinkList/index.js +11 -0
- package/dist/src/lib/components/ImageLinkList/index.js.map +1 -0
- package/dist/src/lib/components/InformationIcon/InformationIcon.stories.d.ts +6 -0
- package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js +71 -0
- package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js.map +1 -0
- package/dist/src/lib/components/InformationIcon/index.d.ts +15 -0
- package/dist/src/lib/components/InformationIcon/index.js +46 -0
- package/dist/src/lib/components/InformationIcon/index.js.map +1 -0
- package/dist/src/lib/components/Input/Input.stories.d.ts +6 -0
- package/dist/src/lib/components/Input/Input.stories.js +95 -0
- package/dist/src/lib/components/Input/Input.stories.js.map +1 -0
- package/dist/src/lib/components/Input/index.d.ts +31 -0
- package/dist/src/lib/components/Input/index.js +25 -0
- package/dist/src/lib/components/Input/index.js.map +1 -0
- package/dist/src/lib/components/Jumbotron/Jumbotron.stories.d.ts +6 -0
- package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js +16 -0
- package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js.map +1 -0
- package/dist/src/lib/components/Jumbotron/index.d.ts +9 -0
- package/dist/src/lib/components/Jumbotron/index.js +9 -0
- package/dist/src/lib/components/Jumbotron/index.js.map +1 -0
- package/dist/src/lib/components/Nav/Nav.stories.js +134 -0
- package/dist/src/lib/components/Nav/Nav.stories.js.map +1 -0
- package/dist/src/lib/components/Nav/index.d.ts +22 -0
- package/dist/src/lib/components/Nav/index.js +75 -0
- package/dist/src/lib/components/Nav/index.js.map +1 -0
- package/dist/src/lib/components/NavItem/NavItem.stories.d.ts +6 -0
- package/dist/src/lib/components/NavItem/NavItem.stories.js +75 -0
- package/dist/src/lib/components/NavItem/NavItem.stories.js.map +1 -0
- package/dist/src/lib/components/NavItem/index.d.ts +15 -0
- package/dist/src/lib/components/NavItem/index.js +24 -0
- package/dist/src/lib/components/NavItem/index.js.map +1 -0
- package/dist/src/lib/components/NewsCard/NewsCard.stories.d.ts +6 -0
- package/dist/src/lib/components/NewsCard/NewsCard.stories.js +60 -0
- package/dist/src/lib/components/NewsCard/NewsCard.stories.js.map +1 -0
- package/dist/src/lib/components/NewsCard/index.d.ts +14 -0
- package/dist/src/lib/components/NewsCard/index.js +20 -0
- package/dist/src/lib/components/NewsCard/index.js.map +1 -0
- package/dist/src/lib/components/Profile/Profile.stories.d.ts +6 -0
- package/dist/src/lib/components/Profile/Profile.stories.js +41 -0
- package/dist/src/lib/components/Profile/Profile.stories.js.map +1 -0
- package/dist/src/lib/components/Profile/index.d.ts +18 -0
- package/dist/src/lib/components/Profile/index.js +38 -0
- package/dist/src/lib/components/Profile/index.js.map +1 -0
- package/dist/src/lib/components/Row/Row.stories.d.ts +6 -0
- package/dist/src/lib/components/Row/Row.stories.js +37 -0
- package/dist/src/lib/components/Row/Row.stories.js.map +1 -0
- package/dist/src/lib/components/Row/index.d.ts +8 -0
- package/dist/src/lib/components/Row/index.js +8 -0
- package/dist/src/lib/components/Row/index.js.map +1 -0
- package/dist/src/lib/components/Search/Search.stories.d.ts +6 -0
- package/dist/src/lib/components/Search/Search.stories.js +48 -0
- package/dist/src/lib/components/Search/Search.stories.js.map +1 -0
- package/dist/src/lib/components/Search/index.d.ts +13 -0
- package/dist/src/lib/components/Search/index.js +23 -0
- package/dist/src/lib/components/Search/index.js.map +1 -0
- package/dist/src/lib/components/SocialBlock/SocialBlock.stories.d.ts +6 -0
- package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js +58 -0
- package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js.map +1 -0
- package/dist/src/lib/components/SocialBlock/index.d.ts +21 -0
- package/dist/src/lib/components/SocialBlock/index.js +66 -0
- package/dist/src/lib/components/SocialBlock/index.js.map +1 -0
- package/dist/src/lib/components/StarRating/StarRating.stories.d.ts +6 -0
- package/dist/src/lib/components/StarRating/StarRating.stories.js +17 -0
- package/dist/src/lib/components/StarRating/StarRating.stories.js.map +1 -0
- package/dist/src/lib/components/StarRating/index.d.ts +9 -0
- package/dist/src/lib/components/StarRating/index.js +27 -0
- package/dist/src/lib/components/StarRating/index.js.map +1 -0
- package/dist/src/lib/components/Testimonial/Testimonial.stories.d.ts +6 -0
- package/dist/src/lib/components/Testimonial/Testimonial.stories.js +95 -0
- package/dist/src/lib/components/Testimonial/Testimonial.stories.js.map +1 -0
- package/dist/src/lib/components/Testimonial/index.d.ts +17 -0
- package/dist/src/lib/components/Testimonial/index.js +27 -0
- package/dist/src/lib/components/Testimonial/index.js.map +1 -0
- package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.d.ts +6 -0
- package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js +63 -0
- package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js.map +1 -0
- package/dist/src/lib/components/TextAndTitle/index.d.ts +26 -0
- package/dist/src/lib/components/TextAndTitle/index.js +113 -0
- package/dist/src/lib/components/TextAndTitle/index.js.map +1 -0
- package/dist/src/lib/components/TextArea/TextArea.stories.d.ts +6 -0
- package/dist/src/lib/components/TextArea/TextArea.stories.js +63 -0
- package/dist/src/lib/components/TextArea/TextArea.stories.js.map +1 -0
- package/dist/src/lib/components/TextArea/index.d.ts +27 -0
- package/dist/src/lib/components/TextArea/index.js +18 -0
- package/dist/src/lib/components/TextArea/index.js.map +1 -0
- package/dist/src/lib/components/Timeline/Timeline.stories.d.ts +6 -0
- package/dist/src/lib/components/Timeline/Timeline.stories.js +88 -0
- package/dist/src/lib/components/Timeline/Timeline.stories.js.map +1 -0
- package/dist/src/lib/components/Timeline/index.d.ts +14 -0
- package/dist/src/lib/components/Timeline/index.js +186 -0
- package/dist/src/lib/components/Timeline/index.js.map +1 -0
- package/dist/src/lib/components/Tubestops/Tubestops.stories.d.ts +6 -0
- package/dist/src/lib/components/Tubestops/Tubestops.stories.js +62 -0
- package/dist/src/lib/components/Tubestops/Tubestops.stories.js.map +1 -0
- package/dist/src/lib/components/Tubestops/index.d.ts +13 -0
- package/dist/src/lib/components/Tubestops/index.js +44 -0
- package/dist/src/lib/components/Tubestops/index.js.map +1 -0
- package/dist/src/lib/components/UserIcon/UserIcon.stories.d.ts +6 -0
- package/dist/src/lib/components/UserIcon/UserIcon.stories.js +63 -0
- package/dist/src/lib/components/UserIcon/UserIcon.stories.js.map +1 -0
- package/dist/src/lib/components/UserIcon/index.d.ts +11 -0
- package/dist/src/lib/components/UserIcon/index.js +17 -0
- package/dist/src/lib/components/UserIcon/index.js.map +1 -0
- package/dist/src/lib/components/Video/Video.stories.d.ts +6 -0
- package/dist/src/lib/components/Video/Video.stories.js +17 -0
- package/dist/src/lib/components/Video/Video.stories.js.map +1 -0
- package/dist/src/lib/components/Video/index.d.ts +17 -0
- package/dist/src/lib/components/Video/index.js +9 -0
- package/dist/src/lib/components/Video/index.js.map +1 -0
- package/dist/src/lib/index.d.ts +39 -0
- package/dist/src/lib/index.js +43 -0
- package/dist/src/lib/index.js.map +1 -0
- package/dist/src/lib/typography/Fonts.stories.d.ts +6 -0
- package/dist/src/lib/typography/Fonts.stories.js +42 -0
- package/dist/src/lib/typography/Fonts.stories.js.map +1 -0
- package/dist/src/lib/typography/index.d.ts +4 -0
- package/dist/src/lib/typography/index.js +23 -0
- package/dist/src/lib/typography/index.js.map +1 -0
- package/dist/src/lib/utils/controls.d.ts +35 -0
- package/dist/src/lib/utils/controls.js +21 -0
- package/dist/src/lib/utils/controls.js.map +1 -0
- package/dist/src/lib/utils/theme.d.ts +2 -0
- package/dist/src/lib/utils/theme.js +8 -0
- package/dist/src/lib/utils/theme.js.map +1 -0
- package/dist/tailwind.config.d.ts +64 -0
- package/dist/tailwind.config.js +80 -0
- package/dist/tailwind.config.js.map +1 -0
- package/package.json +18 -5
- package/dist/components/Accordion/index.js +0 -37
- package/dist/components/AlertBar/index.js +0 -129
- package/dist/components/Breadcrumbs/index.js +0 -66
- package/dist/components/BreadcrumbsBordered/index.js +0 -66
- package/dist/components/BreadcrumbsItem/index.js +0 -160
- package/dist/components/Button/index.js +0 -141
- package/dist/components/Card/index.js +0 -151
- package/dist/components/CardWithTopImage/index.js +0 -64
- package/dist/components/Carousel/index.css +0 -4
- package/dist/components/Carousel/index.css.map +0 -1
- package/dist/components/Carousel/index.js +0 -185
- package/dist/components/ChevronCard/index.js +0 -65
- package/dist/components/Collapsible/index.js +0 -158
- package/dist/components/Column/index.js +0 -137
- package/dist/components/Container/index.js +0 -55
- package/dist/components/FooterBar/index.js +0 -60
- package/dist/components/Form/index.js +0 -78
- package/dist/components/FyreCard/index.js +0 -54
- package/dist/components/Greeting/index.js +0 -69
- package/dist/components/Icon/index.js +0 -91
- package/dist/components/Image/index.js +0 -142
- package/dist/components/ImageLink/index.js +0 -61
- package/dist/components/ImageLinkList/index.js +0 -45
- package/dist/components/InformationIcon/index.js +0 -120
- package/dist/components/Input/index.js +0 -112
- package/dist/components/Jumbotron/index.js +0 -39
- package/dist/components/Nav/index.js +0 -302
- package/dist/components/NavItem/index.js +0 -129
- package/dist/components/NewsCard/index.js +0 -62
- package/dist/components/Profile/index.js +0 -86
- package/dist/components/Row/index.js +0 -55
- package/dist/components/Search/index.js +0 -60
- package/dist/components/SocialBlock/index.js +0 -184
- package/dist/components/StarRating/index.js +0 -110
- package/dist/components/Testimonial/index.js +0 -70
- package/dist/components/TextAndTitle/index.js +0 -283
- package/dist/components/TextArea/index.js +0 -97
- package/dist/components/Timeline/index.css.map +0 -1
- package/dist/components/Timeline/index.js +0 -254
- package/dist/components/Tubestops/index.css.map +0 -1
- package/dist/components/Tubestops/index.js +0 -95
- package/dist/components/UserIcon/index.js +0 -50
- package/dist/components/Users/rupertb/Documents/apps/trepur_components/src/lib/styles/base.css +0 -1831
- package/dist/components/Users/rupertb/Documents/apps/trepur_components/src/lib/styles/base.css.map +0 -1
- package/dist/components/Video/index.js +0 -67
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
import Button from '@components/Button'
|
|
4
|
+
|
|
5
|
+
interface Props extends Partial<Pick<HTMLElement, 'className' | 'id'>> {
|
|
6
|
+
opened?: boolean
|
|
7
|
+
onClick?: React.MouseEventHandler
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const HamburgerIcon = ({
|
|
11
|
+
id,
|
|
12
|
+
className,
|
|
13
|
+
onClick
|
|
14
|
+
}: Props): JSX.Element => {
|
|
15
|
+
const [opened, setOpened] = useState(false)
|
|
16
|
+
const lineOneClassList = classNames({
|
|
17
|
+
'origin-top-left rotate-45 translate-x-1 -translate-y-0.5': opened
|
|
18
|
+
}, 'origin-top-left transition-transform duration-200 ease-linear')
|
|
19
|
+
|
|
20
|
+
const lineTwoClassList = classNames({
|
|
21
|
+
'opacity-0': opened
|
|
22
|
+
}, 'opacity-100 transition-opacity duration-200 ease-linear')
|
|
23
|
+
|
|
24
|
+
const lineThreeClassList = classNames({
|
|
25
|
+
'origin-bottom-left -rotate-45 translate-x-1 translate-y-px': opened
|
|
26
|
+
}, 'origin-bottom-left transition-transform duration-200 ease-linear')
|
|
27
|
+
|
|
28
|
+
const toggleOpened = (e: any): void => {
|
|
29
|
+
setOpened(!opened)
|
|
30
|
+
onClick?.(e)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Button
|
|
35
|
+
id={id}
|
|
36
|
+
className={className}
|
|
37
|
+
onClick={(e) => toggleOpened(e)}
|
|
38
|
+
variant='primary'
|
|
39
|
+
type='icon'
|
|
40
|
+
>
|
|
41
|
+
<svg
|
|
42
|
+
className='mx-auto overflow-visible fill-white group-hover:fill-primary transition-backgroundColor duration-500 transform'
|
|
43
|
+
width='24'
|
|
44
|
+
height='24'
|
|
45
|
+
viewBox='0 0 24 15'
|
|
46
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
47
|
+
>
|
|
48
|
+
<path
|
|
49
|
+
className={lineOneClassList}
|
|
50
|
+
d='M0 1.5C0 0.947715 0.447715 0.5 1 0.5H21C21.5523 0.5 22 0.947715 22 1.5C22 2.05228 21.5523 2.5 21 2.5H1C0.447716 2.5 0 2.05228 0 1.5Z'
|
|
51
|
+
/>
|
|
52
|
+
<path
|
|
53
|
+
className={lineTwoClassList}
|
|
54
|
+
d='M0 7.5C0 6.94772 0.447715 6.5 1 6.5H21C21.5523 6.5 22 6.94772 22 7.5C22 8.05228 21.5523 8.5 21 8.5H1C0.447716 8.5 0 8.05228 0 7.5Z'
|
|
55
|
+
/>
|
|
56
|
+
<path
|
|
57
|
+
className={lineThreeClassList}
|
|
58
|
+
d='M0 13.5C0 12.9477 0.447715 12.5 1 12.5H21C21.5523 12.5 22 12.9477 22 13.5C22 14.0523 21.5523 14.5 21 14.5H1C0.447716 14.5 0 14.0523 0 13.5Z'
|
|
59
|
+
/>
|
|
60
|
+
</svg>
|
|
61
|
+
</Button>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default HamburgerIcon
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Icon from './index'
|
|
3
|
+
import { idAndClassName } from '@utils/controls'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
const componentMeta: ComponentMeta<typeof Icon> = {
|
|
7
|
+
title: 'Trepur Components/Rupert Bennett/Atoms/Icon',
|
|
8
|
+
component: Icon,
|
|
9
|
+
argTypes: {
|
|
10
|
+
...idAndClassName,
|
|
11
|
+
type: {
|
|
12
|
+
options: ['heart', 'arrow-up', 'arrow-down', 'multiply', 'burger', 'bars'],
|
|
13
|
+
type: { name: 'string', required: false },
|
|
14
|
+
description: 'The name of the icon to display in the component',
|
|
15
|
+
table: {
|
|
16
|
+
type: { summary: 'string' }
|
|
17
|
+
},
|
|
18
|
+
control: 'select'
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
type: { name: 'number', required: false },
|
|
22
|
+
description: 'The size of the icon to show in the component',
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: 'number' }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
animation: {
|
|
28
|
+
type: { name: 'string', required: false },
|
|
29
|
+
options: ['none', 'pulse', 'spin', 'beat'],
|
|
30
|
+
description: 'Type of annimation to apply to the component',
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: 'string' }
|
|
33
|
+
},
|
|
34
|
+
control: 'select'
|
|
35
|
+
},
|
|
36
|
+
reverseSpin: {
|
|
37
|
+
type: { name: 'boolean', required: false },
|
|
38
|
+
description: 'To reverse the animation on the component',
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: 'boolean' }
|
|
41
|
+
},
|
|
42
|
+
defaultValue: 'false'
|
|
43
|
+
},
|
|
44
|
+
hollow: {
|
|
45
|
+
type: { name: 'boolean', required: false },
|
|
46
|
+
description: 'To render a hollow version of the icon in component',
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'boolean' }
|
|
49
|
+
},
|
|
50
|
+
defaultValue: 'false'
|
|
51
|
+
},
|
|
52
|
+
colour: {
|
|
53
|
+
type: { name: 'string', required: false },
|
|
54
|
+
options: ['primary', 'secondary', 'white', 'black', 'gold'],
|
|
55
|
+
description: 'The font colour of the component',
|
|
56
|
+
table: {
|
|
57
|
+
type: { summary: 'string' }
|
|
58
|
+
},
|
|
59
|
+
defaultValue: 'primary',
|
|
60
|
+
control: 'select'
|
|
61
|
+
},
|
|
62
|
+
bgColour: {
|
|
63
|
+
type: { name: 'string', required: false },
|
|
64
|
+
options: ['primary', 'secondary', 'white', 'black', 'gold'],
|
|
65
|
+
description: 'The background colour of the component',
|
|
66
|
+
table: {
|
|
67
|
+
type: { summary: 'string' }
|
|
68
|
+
},
|
|
69
|
+
defaultValue: 'secondary',
|
|
70
|
+
control: 'select'
|
|
71
|
+
},
|
|
72
|
+
rounded: {
|
|
73
|
+
type: { name: 'boolean', required: false },
|
|
74
|
+
description: 'Sets the component to a circle shape',
|
|
75
|
+
table: {
|
|
76
|
+
type: { summary: 'boolean' }
|
|
77
|
+
},
|
|
78
|
+
defaultValue: 'false'
|
|
79
|
+
},
|
|
80
|
+
brand: {
|
|
81
|
+
type: { name: 'boolean', required: false },
|
|
82
|
+
description: 'Set to true if the icon type to render is a brand image',
|
|
83
|
+
table: {
|
|
84
|
+
type: { summary: 'boolean' }
|
|
85
|
+
},
|
|
86
|
+
defaultValue: 'false'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
args: {
|
|
90
|
+
type: 'heart',
|
|
91
|
+
size: 3,
|
|
92
|
+
animation: 'none',
|
|
93
|
+
hoverBgColour: 'primary',
|
|
94
|
+
hoverColour: 'secondary'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const Template: ComponentStory<typeof Icon> = (args) => <Icon {...args} />
|
|
99
|
+
|
|
100
|
+
export const _Icon = Template.bind({})
|
|
101
|
+
|
|
102
|
+
export default componentMeta
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
import { Colours } from '@utils/controls'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
id?: string
|
|
7
|
+
className?: string
|
|
8
|
+
type: string
|
|
9
|
+
size?: number
|
|
10
|
+
animation?: 'pulse' | 'none'
|
|
11
|
+
reverseSpin?: boolean
|
|
12
|
+
hollow?: boolean
|
|
13
|
+
colour?: Colours
|
|
14
|
+
bgColour?: Colours
|
|
15
|
+
hoverColour?: Colours
|
|
16
|
+
hoverBgColour?: Colours
|
|
17
|
+
rounded?: boolean
|
|
18
|
+
brand?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const Icon = ({
|
|
22
|
+
id,
|
|
23
|
+
className,
|
|
24
|
+
type,
|
|
25
|
+
size = 1,
|
|
26
|
+
animation = 'none',
|
|
27
|
+
reverseSpin = false,
|
|
28
|
+
hollow = false,
|
|
29
|
+
colour = 'primary',
|
|
30
|
+
bgColour = 'secondary',
|
|
31
|
+
hoverColour = 'primary',
|
|
32
|
+
hoverBgColour = 'secondary',
|
|
33
|
+
rounded = false,
|
|
34
|
+
brand = false
|
|
35
|
+
}: Props): JSX.Element => {
|
|
36
|
+
const fontColour: { [key in Colours]: string } = {
|
|
37
|
+
primary: 'text-primary',
|
|
38
|
+
secondary: 'text-secondary',
|
|
39
|
+
white: 'text-white',
|
|
40
|
+
black: 'text-black',
|
|
41
|
+
gold: 'text-gold'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const backgroundColour: { [key in Colours]: string } = {
|
|
45
|
+
primary: 'bg-primary',
|
|
46
|
+
secondary: 'bg-secondary',
|
|
47
|
+
white: 'bg-white',
|
|
48
|
+
black: 'bg-black',
|
|
49
|
+
gold: 'bg-gold'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const hoverFontColour: { [key in Colours]: string } = {
|
|
53
|
+
primary: 'group-hover:text-primary',
|
|
54
|
+
secondary: 'group-hover:text-secondary',
|
|
55
|
+
white: 'group-hover:text-white',
|
|
56
|
+
black: 'group-hover:text-black',
|
|
57
|
+
gold: 'group-hover:text-gold'
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const hoverBackgroundColour: { [key in Colours]: string } = {
|
|
61
|
+
primary: 'group-hover:bg-primary',
|
|
62
|
+
secondary: 'group-hover:bg-secondary',
|
|
63
|
+
white: 'group-hover:bg-white',
|
|
64
|
+
black: 'group-hover:bg-black',
|
|
65
|
+
gold: 'group-hover:bg-gold'
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const wrapperClassList = classNames({
|
|
69
|
+
'w-6 h-6': size === 1,
|
|
70
|
+
'w-10 h-10': size === 2,
|
|
71
|
+
'w-14 h-14': size === 3,
|
|
72
|
+
'w-20 h-20': size === 4,
|
|
73
|
+
'w-24 h-24': size === 5,
|
|
74
|
+
'w-28 h-28': size === 6,
|
|
75
|
+
'w-32 h-32': size === 7,
|
|
76
|
+
'w-36 h-36': size === 8,
|
|
77
|
+
'w-40 h-40': size === 9,
|
|
78
|
+
'w-44 h-44': size === 10,
|
|
79
|
+
'rounded-full': rounded
|
|
80
|
+
},
|
|
81
|
+
className,
|
|
82
|
+
backgroundColour[bgColour],
|
|
83
|
+
fontColour[colour],
|
|
84
|
+
hoverBackgroundColour[hoverBgColour],
|
|
85
|
+
hoverFontColour[hoverColour],
|
|
86
|
+
'flex transition-backgroundColor duration-500 transform'
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
const classList = classNames({
|
|
90
|
+
'fa-brands': brand,
|
|
91
|
+
[`fa-${size}x`]: size,
|
|
92
|
+
[`fa-${animation}`]: animation,
|
|
93
|
+
'fa-spin-reverse': reverseSpin,
|
|
94
|
+
'fa-regular': hollow
|
|
95
|
+
}, `fa fa-${type} mx-auto my-auto`)
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<div
|
|
99
|
+
id={id}
|
|
100
|
+
className={wrapperClassList}
|
|
101
|
+
>
|
|
102
|
+
<span
|
|
103
|
+
className={classList}
|
|
104
|
+
role='img'
|
|
105
|
+
aria-hidden='true'
|
|
106
|
+
aria-label={type}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export default Icon
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Image from '.'
|
|
3
|
+
import { idAndClassName } from '@utils/controls'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
import logo from '@assets/images/primary-logo.png'
|
|
6
|
+
|
|
7
|
+
const componentMeta: ComponentMeta<typeof Image> = {
|
|
8
|
+
title: 'Trepur Components/Rupert Bennett/Atoms/Image',
|
|
9
|
+
component: Image,
|
|
10
|
+
argTypes: {
|
|
11
|
+
...idAndClassName,
|
|
12
|
+
image: {
|
|
13
|
+
type: { name: 'string', required: false },
|
|
14
|
+
description: 'The image to display on the component',
|
|
15
|
+
table: {
|
|
16
|
+
type: { summary: 'default' }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
altText: {
|
|
20
|
+
type: { name: 'string', required: false },
|
|
21
|
+
description: 'The accessibility alt text for the image on the component',
|
|
22
|
+
table: {
|
|
23
|
+
type: { summary: 'default' }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
type: { name: 'string', required: false },
|
|
28
|
+
description: 'The accessibility title for the image on the component',
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: 'default' }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
rounded: {
|
|
34
|
+
type: { name: 'boolean', required: false },
|
|
35
|
+
description: 'Sets the corners of the component to rounded',
|
|
36
|
+
table: {
|
|
37
|
+
type: { summary: 'boolean' }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
roundedFull: {
|
|
41
|
+
type: { name: 'boolean', required: false },
|
|
42
|
+
description: 'Sets the component to a circle shape',
|
|
43
|
+
table: {
|
|
44
|
+
type: { summary: 'boolean' }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
height: {
|
|
48
|
+
type: { name: 'number', required: false },
|
|
49
|
+
description: 'Defines the height of the component',
|
|
50
|
+
table: {
|
|
51
|
+
type: { summary: 'number' }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
width: {
|
|
55
|
+
type: { name: 'number', required: false },
|
|
56
|
+
description: 'Defines the width of the component',
|
|
57
|
+
table: {
|
|
58
|
+
type: { summary: 'number' }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
overlayText: {
|
|
62
|
+
type: { name: 'string', required: false },
|
|
63
|
+
description: 'The text to show when hovering over the component',
|
|
64
|
+
table: {
|
|
65
|
+
type: { summary: 'default' }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
centerAligned: {
|
|
69
|
+
type: { name: 'boolean', required: false },
|
|
70
|
+
description: 'Sets the component to the center',
|
|
71
|
+
table: {
|
|
72
|
+
type: { summary: 'boolean' }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
args: {
|
|
77
|
+
image: logo,
|
|
78
|
+
height: 8,
|
|
79
|
+
width: 8,
|
|
80
|
+
overlayText: 'logo'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const Template: ComponentStory<typeof Image> = (args) => <Image {...args} />
|
|
85
|
+
|
|
86
|
+
export const _Image = Template.bind({})
|
|
87
|
+
|
|
88
|
+
export default componentMeta
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
id?: string
|
|
6
|
+
className?: string
|
|
7
|
+
image?: string
|
|
8
|
+
altText?: string
|
|
9
|
+
title?: string
|
|
10
|
+
rounded?: boolean
|
|
11
|
+
roundedFull?: boolean
|
|
12
|
+
height?: number
|
|
13
|
+
width?: number
|
|
14
|
+
overlayText?: string
|
|
15
|
+
centerAligned?: boolean
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Image = ({
|
|
19
|
+
id,
|
|
20
|
+
className,
|
|
21
|
+
image,
|
|
22
|
+
altText,
|
|
23
|
+
title,
|
|
24
|
+
rounded = false,
|
|
25
|
+
roundedFull = false,
|
|
26
|
+
height = 8,
|
|
27
|
+
width = 8,
|
|
28
|
+
overlayText,
|
|
29
|
+
centerAligned = false
|
|
30
|
+
}: Props): JSX.Element => {
|
|
31
|
+
const [isHovering, setIsHovering] = useState(false)
|
|
32
|
+
const opacity = classNames({
|
|
33
|
+
'opacity-80': isHovering,
|
|
34
|
+
'opacity-0': !isHovering
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const widthClassList = classNames({
|
|
38
|
+
'w-6': width === 1,
|
|
39
|
+
'w-10': width === 2,
|
|
40
|
+
'w-14': width === 3,
|
|
41
|
+
'w-16': width === 4,
|
|
42
|
+
'w-20': width === 5,
|
|
43
|
+
'w-24': width === 6,
|
|
44
|
+
'w-28': width === 7,
|
|
45
|
+
'w-32': width === 8,
|
|
46
|
+
'w-36': width === 9,
|
|
47
|
+
'w-40': width === 10,
|
|
48
|
+
'w-44': width === 11,
|
|
49
|
+
'w-full': (width === undefined) || (![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(width))
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
const heightClassList = classNames({
|
|
53
|
+
'h-6': height === 1,
|
|
54
|
+
'h-10': height === 2,
|
|
55
|
+
'h-14': height === 3,
|
|
56
|
+
'h-16': height === 4,
|
|
57
|
+
'h-20': height === 5,
|
|
58
|
+
'h-24': height === 6,
|
|
59
|
+
'h-28': height === 7,
|
|
60
|
+
'h-32': height === 8,
|
|
61
|
+
'h-36': height === 9,
|
|
62
|
+
'h-40': height === 10,
|
|
63
|
+
'h-44': height === 11,
|
|
64
|
+
'h-full': (height === undefined) || (![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(height))
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const imageClassList = classNames({
|
|
68
|
+
'rounded-2xl': rounded,
|
|
69
|
+
'rounded-full': roundedFull,
|
|
70
|
+
'mx-auto': centerAligned
|
|
71
|
+
}, className, widthClassList, heightClassList)
|
|
72
|
+
|
|
73
|
+
const overlayClassList = classNames(
|
|
74
|
+
widthClassList,
|
|
75
|
+
heightClassList,
|
|
76
|
+
opacity,
|
|
77
|
+
'absolute z-10 transition-opacity duration-700 bg-white'
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
const overlayTextWrapperClassList = classNames(
|
|
81
|
+
widthClassList,
|
|
82
|
+
heightClassList,
|
|
83
|
+
opacity,
|
|
84
|
+
'flex absolute z-20 transition-opacity duration-700'
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
const overlayTextClassList = 'm-auto text-center text-primary'
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<>
|
|
91
|
+
{overlayText !== undefined &&
|
|
92
|
+
<>
|
|
93
|
+
<div className={overlayClassList} />
|
|
94
|
+
<div
|
|
95
|
+
className={overlayTextWrapperClassList}
|
|
96
|
+
onMouseEnter={() => setIsHovering(true)}
|
|
97
|
+
onMouseLeave={() => setIsHovering(false)}
|
|
98
|
+
>
|
|
99
|
+
<p className={overlayTextClassList}>{overlayText}</p>
|
|
100
|
+
</div>
|
|
101
|
+
</>}
|
|
102
|
+
<img
|
|
103
|
+
id={id}
|
|
104
|
+
className={imageClassList}
|
|
105
|
+
src={image}
|
|
106
|
+
{...(altText !== undefined && { alt: altText })}
|
|
107
|
+
{...(title !== undefined && { title })}
|
|
108
|
+
/>
|
|
109
|
+
</>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default Image
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { idAndClassName } from '@utils/controls'
|
|
3
|
+
import Column from '@components/Column'
|
|
4
|
+
import ImageLink from './index'
|
|
5
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
6
|
+
|
|
7
|
+
const componentMeta: ComponentMeta<typeof ImageLink> = {
|
|
8
|
+
title: 'Trepur Components/Other/Organisms/Image Link',
|
|
9
|
+
component: ImageLink,
|
|
10
|
+
parameters: {},
|
|
11
|
+
argTypes: {
|
|
12
|
+
...idAndClassName,
|
|
13
|
+
title: {
|
|
14
|
+
description: '',
|
|
15
|
+
control: 'text',
|
|
16
|
+
table: {
|
|
17
|
+
category: ''
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
image: {
|
|
21
|
+
description: '',
|
|
22
|
+
control: 'text',
|
|
23
|
+
table: {
|
|
24
|
+
category: ''
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
args: {
|
|
29
|
+
image: 'https://picsum.photos/400/400',
|
|
30
|
+
link: '/'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const Template: ComponentStory<typeof ImageLink> = (args) => <Column sm={3} md={3}><ImageLink {...args} /></Column>
|
|
35
|
+
|
|
36
|
+
export const _ImageLink = Template.bind({})
|
|
37
|
+
_ImageLink.args = {}
|
|
38
|
+
|
|
39
|
+
export const _ImageLinkWithTitle = Template.bind({})
|
|
40
|
+
_ImageLinkWithTitle.args = {
|
|
41
|
+
title: 'Title'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const _ImageLinkWithButton = Template.bind({})
|
|
45
|
+
_ImageLinkWithButton.args = {
|
|
46
|
+
buttonProps: {
|
|
47
|
+
children: 'Button 1'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const _ImageLinkRounded = Template.bind({})
|
|
52
|
+
_ImageLinkRounded.args = {
|
|
53
|
+
title: 'Title',
|
|
54
|
+
buttonProps: {
|
|
55
|
+
children: 'Button 1'
|
|
56
|
+
},
|
|
57
|
+
rounded: true
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default componentMeta
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Button, { Props as buttonProps } from '@components/Button'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
id?: string
|
|
7
|
+
className?: string
|
|
8
|
+
image?: string
|
|
9
|
+
altText?: string
|
|
10
|
+
title?: string
|
|
11
|
+
link?: string
|
|
12
|
+
rounded?: boolean
|
|
13
|
+
openInNewTab?: boolean
|
|
14
|
+
buttonProps?: buttonProps
|
|
15
|
+
}
|
|
16
|
+
const ImageLink = ({
|
|
17
|
+
id,
|
|
18
|
+
className,
|
|
19
|
+
image,
|
|
20
|
+
altText,
|
|
21
|
+
title,
|
|
22
|
+
link,
|
|
23
|
+
rounded,
|
|
24
|
+
openInNewTab,
|
|
25
|
+
buttonProps
|
|
26
|
+
}: Props): JSX.Element => {
|
|
27
|
+
const classList = classNames(className, 'cursor-pointer lg:mx-3 md:mx-1 mx-1 lg:mb-5 md:mb-2 mb-2 hover:opacity-50 overflow-hidden text-center')
|
|
28
|
+
|
|
29
|
+
const roundedClass = classNames({
|
|
30
|
+
'rounded-full': rounded
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<a
|
|
35
|
+
id={id}
|
|
36
|
+
href={link}
|
|
37
|
+
{...(openInNewTab !== false && { target: 'blank' })}
|
|
38
|
+
>
|
|
39
|
+
<div className={roundedClass + ' ' + classList + ' relative overflow-hidden'}>
|
|
40
|
+
<img
|
|
41
|
+
src={image}
|
|
42
|
+
alt={altText}
|
|
43
|
+
className='object-cover w-full h-full'
|
|
44
|
+
/>
|
|
45
|
+
{title !== undefined &&
|
|
46
|
+
<h1
|
|
47
|
+
className='absolute bg-black text-white py-2 mt-4 top-0 inset-x-0 text-center'
|
|
48
|
+
>
|
|
49
|
+
{title}
|
|
50
|
+
</h1>}
|
|
51
|
+
{buttonProps?.children !== undefined &&
|
|
52
|
+
<Button
|
|
53
|
+
className='absolute mx-8 mb-4 bottom-0 inset-x-0 text-center'
|
|
54
|
+
>
|
|
55
|
+
{buttonProps.children}
|
|
56
|
+
</Button>}
|
|
57
|
+
</div>
|
|
58
|
+
</a>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default ImageLink
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { idAndClassName } from '@utils/controls'
|
|
3
|
+
import ImageLinkList from './index'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
const getLinks = (): object => {
|
|
7
|
+
return new Array(16).fill(null).map(() => {
|
|
8
|
+
return {
|
|
9
|
+
image: 'https://picsum.photos/400/400',
|
|
10
|
+
title: 'Hi',
|
|
11
|
+
ctaText: 'button'
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const componentMeta: ComponentMeta<typeof ImageLinkList> = {
|
|
17
|
+
title: 'Trepur Components/Other/Organisms/Image Link List',
|
|
18
|
+
component: ImageLinkList,
|
|
19
|
+
parameters: {},
|
|
20
|
+
argTypes: {
|
|
21
|
+
...idAndClassName
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
items: getLinks()
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const Template: ComponentStory<typeof ImageLinkList> = (args) => <ImageLinkList {...args} />
|
|
29
|
+
|
|
30
|
+
export const _ImageLinkList = Template.bind({})
|
|
31
|
+
|
|
32
|
+
export default componentMeta
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import ImageLink, { Props as imageLinkProps } from '../ImageLink/index'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
id?: string
|
|
7
|
+
className?: string
|
|
8
|
+
items?: imageLinkProps[]
|
|
9
|
+
}
|
|
10
|
+
const ImageLinkList = ({
|
|
11
|
+
id,
|
|
12
|
+
className,
|
|
13
|
+
items
|
|
14
|
+
}: Props): JSX.Element => {
|
|
15
|
+
const classList = classNames(className, 'grid md:grid-cols-4 sm:grid-cols-2')
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div id={id} className={classList}>
|
|
19
|
+
{items?.map((item, i: number) => {
|
|
20
|
+
return (
|
|
21
|
+
<ImageLink
|
|
22
|
+
key={`image_link_${i + 0}`}
|
|
23
|
+
altText='image'
|
|
24
|
+
image={item.image}
|
|
25
|
+
title={item.title}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
})}
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default ImageLinkList
|