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,180 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
import NavItem, { Props as navItemProps } from '@components/NavItem'
|
|
4
|
+
import HamburgerIcon from '@components/HamburgerIcon'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
id: string
|
|
8
|
+
className: string
|
|
9
|
+
navLinks: navItemProps[]
|
|
10
|
+
asSideBar: boolean
|
|
11
|
+
dropdownNavHeight: string
|
|
12
|
+
logo: string
|
|
13
|
+
logoDarkTheme: string
|
|
14
|
+
mobileLogo: string
|
|
15
|
+
mobileLogoDarkTheme: string
|
|
16
|
+
logoLink: string
|
|
17
|
+
mobileClasses: string
|
|
18
|
+
fixedTop: boolean
|
|
19
|
+
getNavStatus: (asSideBar: boolean, open: boolean) => void
|
|
20
|
+
theme: 'light' | 'dark'
|
|
21
|
+
text?: string
|
|
22
|
+
textLink?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const Nav = ({
|
|
26
|
+
id,
|
|
27
|
+
className,
|
|
28
|
+
navLinks,
|
|
29
|
+
asSideBar,
|
|
30
|
+
dropdownNavHeight,
|
|
31
|
+
logo,
|
|
32
|
+
logoDarkTheme,
|
|
33
|
+
mobileLogo,
|
|
34
|
+
mobileLogoDarkTheme,
|
|
35
|
+
logoLink,
|
|
36
|
+
fixedTop,
|
|
37
|
+
mobileClasses,
|
|
38
|
+
getNavStatus,
|
|
39
|
+
theme = 'dark',
|
|
40
|
+
text,
|
|
41
|
+
textLink
|
|
42
|
+
}: Props): JSX.Element => {
|
|
43
|
+
const [showSideNav, setShowSideNav] = useState(false)
|
|
44
|
+
const [showDropdownNav, setShowDropdownNav] = useState(false)
|
|
45
|
+
|
|
46
|
+
const colours = theme === 'dark' ? 'text-white bg-primary' : 'text-primary bg-white'
|
|
47
|
+
const textColour = theme === 'dark' ? 'text-white' : 'text-primary'
|
|
48
|
+
const navItemsClassList = 'flex justify-center my-auto px-4 lg:px-8'
|
|
49
|
+
const logoClassList = 'flex justify-center my-auto pl-16 lg:pl-24'
|
|
50
|
+
const emailClassList = 'flex justify-center my-auto pr-24'
|
|
51
|
+
const classList = classNames(className, colours, 'h-16')
|
|
52
|
+
|
|
53
|
+
const sideNavClasses = classNames({
|
|
54
|
+
'w-0': !showSideNav,
|
|
55
|
+
'w-full sm:w-1/3': showSideNav
|
|
56
|
+
}, colours, 'z-50 md:hidden mt-20 fixed overflow-hidden h-full duration-700')
|
|
57
|
+
|
|
58
|
+
const dropdownNavClasses = classNames({
|
|
59
|
+
'h-0': !showDropdownNav,
|
|
60
|
+
[`h-${dropdownNavHeight}`]: showDropdownNav
|
|
61
|
+
}, colours, 'z-50 md:hidden overflow-hidden pt-20')
|
|
62
|
+
|
|
63
|
+
const logoImageClassList = 'h-16 w-auto'
|
|
64
|
+
|
|
65
|
+
const mobileClassList = classNames({
|
|
66
|
+
'fixed w-full z-50 top-0 mt-0': fixedTop
|
|
67
|
+
}, colours, mobileClasses, 'flex items-center md:hidden py-2')
|
|
68
|
+
|
|
69
|
+
const desktopClassList = classNames({
|
|
70
|
+
'fixed w-full z-50 top-0 mt-0': fixedTop
|
|
71
|
+
}, 'w-full justify-between hidden md:flex items-center justify-between sm:items-stretch text-center')
|
|
72
|
+
|
|
73
|
+
const toggleMenu = (): void => {
|
|
74
|
+
getNavStatus?.(asSideBar, true)
|
|
75
|
+
if (asSideBar) {
|
|
76
|
+
setShowSideNav(!showSideNav)
|
|
77
|
+
} else {
|
|
78
|
+
setShowDropdownNav(!showDropdownNav)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<header id={id} className={classList}>
|
|
84
|
+
{/* mobile */}
|
|
85
|
+
<div
|
|
86
|
+
id='mobile-nav'
|
|
87
|
+
className={`${mobileClassList}`}
|
|
88
|
+
>
|
|
89
|
+
{/* Nav collapse icon */}
|
|
90
|
+
<div
|
|
91
|
+
id='nav-collapse-btn-wrapper'
|
|
92
|
+
className='absolute inset-y-0 left-8 top-5'
|
|
93
|
+
>
|
|
94
|
+
<HamburgerIcon onClick={toggleMenu} />
|
|
95
|
+
</div>
|
|
96
|
+
{/* Logo */}
|
|
97
|
+
<a id='logo-link' className='mx-auto' href={logoLink}>
|
|
98
|
+
<img className={logoImageClassList} src={theme === 'dark' ? mobileLogoDarkTheme : mobileLogo} alt='Logo' />
|
|
99
|
+
</a>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div id='destop-nav' className={`${desktopClassList} flex`}>
|
|
103
|
+
<div className={logoClassList}>
|
|
104
|
+
<a id='logo-link' className='mx-auto' href={logoLink}>
|
|
105
|
+
<img className={logoImageClassList} src={theme === 'dark' ? logoDarkTheme : logo} alt='Logo' />
|
|
106
|
+
</a>
|
|
107
|
+
</div>
|
|
108
|
+
<div className={navItemsClassList}>
|
|
109
|
+
{navLinks?.map((navLink, i) => {
|
|
110
|
+
return (
|
|
111
|
+
<NavItem
|
|
112
|
+
key={`navItem_${i}`}
|
|
113
|
+
{...navLink}
|
|
114
|
+
className={i !== 0 ? 'pl-8' : ''}
|
|
115
|
+
bordered={false}
|
|
116
|
+
rounded={false}
|
|
117
|
+
underlineOnHover
|
|
118
|
+
variant={theme === 'dark' ? 'secondary' : 'primary'}
|
|
119
|
+
/>
|
|
120
|
+
)
|
|
121
|
+
})}
|
|
122
|
+
</div>
|
|
123
|
+
<div className={emailClassList}>
|
|
124
|
+
<a
|
|
125
|
+
className={`hidden lg:inline-block ${textColour}`}
|
|
126
|
+
href={textLink}
|
|
127
|
+
>
|
|
128
|
+
{text}
|
|
129
|
+
</a>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
{/* Mobile Links */}
|
|
134
|
+
{/* Side Bar */}
|
|
135
|
+
{asSideBar
|
|
136
|
+
? (
|
|
137
|
+
<div className={sideNavClasses}>
|
|
138
|
+
{navLinks?.map((navLink, i) => {
|
|
139
|
+
return (
|
|
140
|
+
<NavItem
|
|
141
|
+
key={`navItem_${i}`}
|
|
142
|
+
{...navLink}
|
|
143
|
+
className='pl-8 pt-4'
|
|
144
|
+
bordered={false}
|
|
145
|
+
rounded={false}
|
|
146
|
+
underlineOnHover
|
|
147
|
+
variant={theme === 'dark' ? 'secondary' : 'primary'}
|
|
148
|
+
/>
|
|
149
|
+
)
|
|
150
|
+
})}
|
|
151
|
+
</div>
|
|
152
|
+
/* dropdown */
|
|
153
|
+
)
|
|
154
|
+
: (
|
|
155
|
+
<div
|
|
156
|
+
className={dropdownNavClasses}
|
|
157
|
+
id='mobile-menu'
|
|
158
|
+
>
|
|
159
|
+
<div className='pt-2 pb-3 space-y-1'>
|
|
160
|
+
{navLinks?.map((navLink, i) => {
|
|
161
|
+
return (
|
|
162
|
+
<NavItem
|
|
163
|
+
key={`navItem_${i}`}
|
|
164
|
+
{...navLink}
|
|
165
|
+
className='pl-8 pt-2'
|
|
166
|
+
bordered={false}
|
|
167
|
+
rounded={false}
|
|
168
|
+
underlineOnHover
|
|
169
|
+
variant={theme === 'dark' ? 'secondary' : 'primary'}
|
|
170
|
+
/>
|
|
171
|
+
)
|
|
172
|
+
})}
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
)}
|
|
176
|
+
</header>
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export default Nav
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import NavItem from './index'
|
|
3
|
+
import { action } from '@storybook/addon-actions'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
import { idAndClassName } from '@utils/controls'
|
|
6
|
+
|
|
7
|
+
const componentMeta: ComponentMeta<typeof NavItem> = {
|
|
8
|
+
title: 'Trepur Components/Rupert Bennett/Atoms/Nav Item',
|
|
9
|
+
component: NavItem,
|
|
10
|
+
parameters: {},
|
|
11
|
+
argTypes: {
|
|
12
|
+
...idAndClassName,
|
|
13
|
+
title: {
|
|
14
|
+
type: { name: 'string', required: false },
|
|
15
|
+
description: 'A title for the component',
|
|
16
|
+
table: {
|
|
17
|
+
type: { summary: 'string' }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
href: {
|
|
21
|
+
type: { name: 'string', required: false },
|
|
22
|
+
description: 'A href for the component',
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: 'string' }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
onClick: {
|
|
28
|
+
type: { name: 'function', required: false },
|
|
29
|
+
description: 'An on click handle to execute when clicking on the component',
|
|
30
|
+
table: {
|
|
31
|
+
type: { summary: 'function' }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
bordered: {
|
|
35
|
+
type: { name: 'boolean', required: false },
|
|
36
|
+
description: 'Enables borders around the component',
|
|
37
|
+
table: {
|
|
38
|
+
type: { summary: 'boolean' }
|
|
39
|
+
},
|
|
40
|
+
defaultValue: false
|
|
41
|
+
},
|
|
42
|
+
rounded: {
|
|
43
|
+
type: { name: 'boolean', required: false },
|
|
44
|
+
description: 'Roundes the corners of the component',
|
|
45
|
+
table: {
|
|
46
|
+
type: { summary: 'boolean' }
|
|
47
|
+
},
|
|
48
|
+
defaultValue: true
|
|
49
|
+
},
|
|
50
|
+
underlineOnHover: {
|
|
51
|
+
type: { name: 'boolean', required: false },
|
|
52
|
+
description: 'Underlines the title when hovering over the component',
|
|
53
|
+
table: {
|
|
54
|
+
type: { summary: 'boolean' }
|
|
55
|
+
},
|
|
56
|
+
defaultValue: true
|
|
57
|
+
},
|
|
58
|
+
isActive: {
|
|
59
|
+
type: { name: 'boolean', required: false },
|
|
60
|
+
description: 'Set the active state to the component',
|
|
61
|
+
table: {
|
|
62
|
+
type: { summary: 'array' }
|
|
63
|
+
},
|
|
64
|
+
defaultValue: false
|
|
65
|
+
},
|
|
66
|
+
variant: {
|
|
67
|
+
type: { name: 'string', required: false },
|
|
68
|
+
options: ['primary', 'secondary'],
|
|
69
|
+
description: 'The varient of the component to render',
|
|
70
|
+
table: {
|
|
71
|
+
type: { summary: 'string' }
|
|
72
|
+
},
|
|
73
|
+
defaultValue: 'primary',
|
|
74
|
+
control: 'radio'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
args: {
|
|
78
|
+
title: 'Home',
|
|
79
|
+
href: '/',
|
|
80
|
+
underlineOnHover: true,
|
|
81
|
+
onClick: action('button-click')
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const Template: ComponentStory<typeof NavItem> = (args) => <NavItem {...args} />
|
|
86
|
+
|
|
87
|
+
export const _NavItem = Template.bind({})
|
|
88
|
+
|
|
89
|
+
export default componentMeta
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
id?: string
|
|
6
|
+
className?: string
|
|
7
|
+
title: string
|
|
8
|
+
href?: string
|
|
9
|
+
onClick?: React.MouseEventHandler
|
|
10
|
+
bordered?: boolean
|
|
11
|
+
rounded?: boolean
|
|
12
|
+
underlineOnHover?: boolean
|
|
13
|
+
isActive?: boolean
|
|
14
|
+
variant?: 'primary' | 'secondary'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const NavItem = ({
|
|
18
|
+
id,
|
|
19
|
+
className,
|
|
20
|
+
title,
|
|
21
|
+
href,
|
|
22
|
+
onClick,
|
|
23
|
+
bordered = false,
|
|
24
|
+
rounded = true,
|
|
25
|
+
underlineOnHover = true,
|
|
26
|
+
isActive = false,
|
|
27
|
+
variant = 'primary'
|
|
28
|
+
}: Props): JSX.Element => {
|
|
29
|
+
const linkClassList = classNames({
|
|
30
|
+
'active before:w-full': isActive,
|
|
31
|
+
'border-2 px-2 py-2': bordered,
|
|
32
|
+
'rounded-md': rounded,
|
|
33
|
+
'before:w-full': isActive,
|
|
34
|
+
'before:w-0': !isActive,
|
|
35
|
+
'text-primary before:bg-primary': variant === 'primary',
|
|
36
|
+
'text-white before:bg-white': variant === 'secondary',
|
|
37
|
+
'relative before:absolute before:-bottom-1 before:left-0 hover:before:w-full focus:before:w-full before:h-1 before:transition-all ease-linear': underlineOnHover
|
|
38
|
+
}, 'text-center whitespace-nowrap')
|
|
39
|
+
|
|
40
|
+
const classList = classNames(className, 'w-auto list-none')
|
|
41
|
+
|
|
42
|
+
const anchorClassList = classNames({
|
|
43
|
+
'relative ease-linear': underlineOnHover,
|
|
44
|
+
[linkClassList]: true // TODO: remove this once css files are compilable
|
|
45
|
+
}, 'focus:outline-none')
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
id={id}
|
|
50
|
+
className={classList}
|
|
51
|
+
>
|
|
52
|
+
<a
|
|
53
|
+
href={href}
|
|
54
|
+
onClick={onClick}
|
|
55
|
+
className={anchorClassList}
|
|
56
|
+
>
|
|
57
|
+
<span className={linkClassList}>
|
|
58
|
+
{title}
|
|
59
|
+
</span>
|
|
60
|
+
</a>
|
|
61
|
+
</div>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default NavItem
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { idAndClassName } from '@utils/controls'
|
|
3
|
+
import NewsCard from './index'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
const componentMeta: ComponentMeta<typeof NewsCard> = {
|
|
7
|
+
title: 'Trepur Components/Other/Organisms/News Card',
|
|
8
|
+
component: NewsCard,
|
|
9
|
+
parameters: {},
|
|
10
|
+
argTypes: {
|
|
11
|
+
...idAndClassName,
|
|
12
|
+
title: {
|
|
13
|
+
description: '',
|
|
14
|
+
control: 'text',
|
|
15
|
+
table: {
|
|
16
|
+
category: ''
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
content: {
|
|
20
|
+
description: '',
|
|
21
|
+
control: 'text',
|
|
22
|
+
table: {
|
|
23
|
+
category: ''
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
imageProps: {
|
|
27
|
+
type: { name: 'other', value: 'object' },
|
|
28
|
+
description: 'The props to pass to the image to display on the component',
|
|
29
|
+
table: {
|
|
30
|
+
type: {
|
|
31
|
+
summary: 'object'
|
|
32
|
+
},
|
|
33
|
+
defaultValue: { summary: 'undefined' }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
buttonProps: {
|
|
37
|
+
description: '',
|
|
38
|
+
control: 'text',
|
|
39
|
+
table: {
|
|
40
|
+
category: ''
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
rounded: {
|
|
44
|
+
description: '',
|
|
45
|
+
control: 'text',
|
|
46
|
+
table: {
|
|
47
|
+
category: ''
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
args: {
|
|
52
|
+
title: 'This is a title',
|
|
53
|
+
content: 'This is some content that will only be displayed if the collapsible item is expanded and will dissappear when the collapsible item is collapsed.',
|
|
54
|
+
rounded: true,
|
|
55
|
+
imageProps: {
|
|
56
|
+
image: 'https://picsum.photos/400/200',
|
|
57
|
+
rounded: true
|
|
58
|
+
},
|
|
59
|
+
buttonProps: {
|
|
60
|
+
children: 'Button 1',
|
|
61
|
+
className: 'w-full',
|
|
62
|
+
href: '/'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const Template: ComponentStory<typeof NewsCard> = (args) => <NewsCard {...args} />
|
|
68
|
+
|
|
69
|
+
export const _NewsCard = Template.bind({})
|
|
70
|
+
|
|
71
|
+
export default componentMeta
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Button, { Props as buttonProps } from '@components/Button'
|
|
3
|
+
import Image, { Props as imageProps } from '@components/Image'
|
|
4
|
+
import classNames from 'classnames'
|
|
5
|
+
|
|
6
|
+
export interface Props {
|
|
7
|
+
id?: string
|
|
8
|
+
className?: string
|
|
9
|
+
title?: string
|
|
10
|
+
content?: string
|
|
11
|
+
imageProps?: imageProps
|
|
12
|
+
buttonProps?: buttonProps
|
|
13
|
+
rounded?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const NewsCard = ({
|
|
17
|
+
id,
|
|
18
|
+
className,
|
|
19
|
+
title,
|
|
20
|
+
content,
|
|
21
|
+
imageProps,
|
|
22
|
+
buttonProps,
|
|
23
|
+
rounded
|
|
24
|
+
}: Props): JSX.Element => {
|
|
25
|
+
const classList = classNames({
|
|
26
|
+
'rounded-lg': rounded
|
|
27
|
+
}, className, 'border flex p-2')
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div id={id} className={classList}>
|
|
31
|
+
<div>
|
|
32
|
+
<Image {...imageProps} />
|
|
33
|
+
</div>
|
|
34
|
+
<div className='flex flex-col justify-between expandable w-auto text-center'>
|
|
35
|
+
<p>{title}</p>
|
|
36
|
+
<p>{content}</p>
|
|
37
|
+
{(buttonProps != null) &&
|
|
38
|
+
<div className='px-8'>
|
|
39
|
+
<Button {...buttonProps}>
|
|
40
|
+
{buttonProps.children}
|
|
41
|
+
</Button>
|
|
42
|
+
</div>}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default NewsCard
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Profile from './index'
|
|
3
|
+
import userImage from '@assets/images/user.jpeg'
|
|
4
|
+
import { idAndClassName } from '@utils/controls'
|
|
5
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
6
|
+
|
|
7
|
+
const componentMeta: ComponentMeta<typeof Profile> = {
|
|
8
|
+
title: 'Trepur Components/Other/Organisms/Profile',
|
|
9
|
+
component: Profile,
|
|
10
|
+
parameters: {},
|
|
11
|
+
argTypes: {
|
|
12
|
+
...idAndClassName,
|
|
13
|
+
imageProps: {
|
|
14
|
+
type: { name: 'other', value: 'object' },
|
|
15
|
+
description: 'The props to pass to the image to display on the component',
|
|
16
|
+
table: {
|
|
17
|
+
type: {
|
|
18
|
+
summary: 'object'
|
|
19
|
+
},
|
|
20
|
+
defaultValue: { summary: 'undefined' }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
alignment: {
|
|
24
|
+
description: '',
|
|
25
|
+
control: 'select',
|
|
26
|
+
options: ['left', 'center', 'right'],
|
|
27
|
+
table: {
|
|
28
|
+
category: ''
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
profileLinks: {
|
|
32
|
+
description: '',
|
|
33
|
+
control: 'text',
|
|
34
|
+
table: {
|
|
35
|
+
category: ''
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
args: {
|
|
40
|
+
imageProps: {
|
|
41
|
+
image: userImage
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const Template: ComponentStory<typeof Profile> = (args) => <Profile {...args} />
|
|
47
|
+
|
|
48
|
+
export const _Profile = Template.bind({})
|
|
49
|
+
|
|
50
|
+
export default componentMeta
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import Image, { Props as imageProps } from '@components/Image'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
id?: string
|
|
7
|
+
className?: string
|
|
8
|
+
profileLinks?: Array<{ name: string, link: string }>
|
|
9
|
+
alignment?: 'left' | 'right'
|
|
10
|
+
imageHeight?: number
|
|
11
|
+
imageWidth?: number
|
|
12
|
+
rounded?: boolean
|
|
13
|
+
bordered?: boolean
|
|
14
|
+
imageProps?: imageProps
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const Profile = ({
|
|
18
|
+
id,
|
|
19
|
+
className,
|
|
20
|
+
profileLinks,
|
|
21
|
+
alignment,
|
|
22
|
+
imageHeight = 0,
|
|
23
|
+
imageWidth = 0,
|
|
24
|
+
rounded,
|
|
25
|
+
bordered,
|
|
26
|
+
imageProps
|
|
27
|
+
}: Props): JSX.Element => {
|
|
28
|
+
const [profileState, setProfileState] = useState(false)
|
|
29
|
+
|
|
30
|
+
const profileAlignment = classNames({
|
|
31
|
+
'float-right': alignment === 'right',
|
|
32
|
+
'float-left': alignment === 'left'
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const dropdownAlignement = classNames({
|
|
36
|
+
'mt-16 -mr-16': alignment === 'right',
|
|
37
|
+
'mt-16 -ml-16': alignment === 'left'
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const dropdownTextAlignement = classNames({
|
|
41
|
+
'text-center': alignment !== 'right' && alignment !== 'left'
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const classList = classNames({
|
|
45
|
+
'rounded-full': rounded === true,
|
|
46
|
+
border: bordered === true
|
|
47
|
+
}, className, `h-${imageHeight} w-${imageWidth} object-cover`)
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<>
|
|
51
|
+
<div id={id} className={`text-center ${classList}`}>
|
|
52
|
+
<div className={`hidden sm:inline-flex inset-y-0 ${profileAlignment}`}>
|
|
53
|
+
<button
|
|
54
|
+
onClick={() => setProfileState(!profileState)}
|
|
55
|
+
type='button'
|
|
56
|
+
className='flex rounded-full'
|
|
57
|
+
>
|
|
58
|
+
<Image {...imageProps} />
|
|
59
|
+
</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
{profileState &&
|
|
63
|
+
<div className={dropdownTextAlignement}>
|
|
64
|
+
<div className={`w-48 sm:inline-block shadow-lg
|
|
65
|
+
z-10 ${profileAlignment} ${dropdownAlignement}`}
|
|
66
|
+
>
|
|
67
|
+
{profileLinks?.map((link, i) => {
|
|
68
|
+
return (
|
|
69
|
+
<a
|
|
70
|
+
key={`profile_link_${i + 1}`}
|
|
71
|
+
href={link.link}
|
|
72
|
+
className='border-b font-bold block px-4 py-2 text-sm'
|
|
73
|
+
role='menuitem'
|
|
74
|
+
// tabindex="-1"
|
|
75
|
+
id={`user-menu-item-${i + 1}`}
|
|
76
|
+
>
|
|
77
|
+
{link.name}
|
|
78
|
+
</a>
|
|
79
|
+
)
|
|
80
|
+
})}
|
|
81
|
+
</div>
|
|
82
|
+
</div>}
|
|
83
|
+
</>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export default Profile
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Row from './index'
|
|
3
|
+
import CardWithTopImage from '@components/CardWithTopImage'
|
|
4
|
+
import logo from '@assets/images/primary-logo.png'
|
|
5
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
6
|
+
import { idAndClassName } from '@utils/controls'
|
|
7
|
+
|
|
8
|
+
const cardChild = (
|
|
9
|
+
<CardWithTopImage
|
|
10
|
+
imageProps={{
|
|
11
|
+
image: logo,
|
|
12
|
+
rounded: true,
|
|
13
|
+
height: 4,
|
|
14
|
+
width: 4,
|
|
15
|
+
roundedFull: true
|
|
16
|
+
}}
|
|
17
|
+
className='w-1/3'
|
|
18
|
+
>
|
|
19
|
+
<p>This is some text</p>
|
|
20
|
+
<p>This is some more text</p>
|
|
21
|
+
<p>This is a bit more text</p>
|
|
22
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem odit ad sed, quam recusandae voluptatem provident eveniet beatae omnis vero minus unde facilis. Quia commodi quas odit iusto ut enim!</p>
|
|
23
|
+
</CardWithTopImage>
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
const componentMeta: ComponentMeta<typeof Row> = {
|
|
27
|
+
title: 'Trepur Components/Rupert Bennett/Atoms/Row',
|
|
28
|
+
component: Row,
|
|
29
|
+
argTypes: {
|
|
30
|
+
...idAndClassName,
|
|
31
|
+
children: {
|
|
32
|
+
type: { name: 'other', value: 'string | React.ReactNode' },
|
|
33
|
+
description: 'The child elements to show in the component',
|
|
34
|
+
table: {
|
|
35
|
+
type: {
|
|
36
|
+
summary: 'Array'
|
|
37
|
+
},
|
|
38
|
+
defaultValue: { summary: 'undefined' }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
args: {
|
|
43
|
+
children: cardChild
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const Template: ComponentStory<typeof Row> = (args) => <Row {...args} />
|
|
48
|
+
|
|
49
|
+
export const _Row = Template.bind({})
|
|
50
|
+
|
|
51
|
+
export default componentMeta
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
id?: string
|
|
6
|
+
className?: string
|
|
7
|
+
children: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const Row = ({
|
|
11
|
+
id,
|
|
12
|
+
className,
|
|
13
|
+
children
|
|
14
|
+
}: Props): JSX.Element => {
|
|
15
|
+
const classList = classNames(className, 'flex flex-wrap')
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div id={id} className={classList}>
|
|
19
|
+
{children}
|
|
20
|
+
</div>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default Row
|