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,58 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { idAndClassName } from '@utils/controls'
|
|
3
|
+
import Search from './index'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
const componentMeta: ComponentMeta<typeof Search> = {
|
|
7
|
+
title: 'Trepur Components/Other/Organisms/Search',
|
|
8
|
+
component: Search,
|
|
9
|
+
parameters: {},
|
|
10
|
+
argTypes: {
|
|
11
|
+
...idAndClassName,
|
|
12
|
+
leftIconProps: {
|
|
13
|
+
description: 'An optional param to display an icon to the left of the search bar',
|
|
14
|
+
control: 'text',
|
|
15
|
+
table: {
|
|
16
|
+
category: ''
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
rightIconProps: {
|
|
20
|
+
description: 'An optional param to display an icon to the right of the search bar',
|
|
21
|
+
control: 'text',
|
|
22
|
+
table: {
|
|
23
|
+
category: ''
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
placeholder: {
|
|
27
|
+
description: 'An optional param to display a placeholder inside the search box',
|
|
28
|
+
control: 'text',
|
|
29
|
+
table: {
|
|
30
|
+
category: ''
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
text: {
|
|
34
|
+
description: 'An optional param to display a label on the left of the search bar',
|
|
35
|
+
control: 'text',
|
|
36
|
+
table: {
|
|
37
|
+
category: ''
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
args: {
|
|
42
|
+
placeholder: 'search...',
|
|
43
|
+
leftIconProps: {
|
|
44
|
+
type: 'heart',
|
|
45
|
+
className: 'absolute py-4 left-3 flex items-center'
|
|
46
|
+
},
|
|
47
|
+
rightIconProps: {
|
|
48
|
+
type: 'heart',
|
|
49
|
+
className: 'absolute py-4 right-3 flex items-center'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const Template: ComponentStory<typeof Search> = (args) => <Search {...args} />
|
|
55
|
+
|
|
56
|
+
export const _Search = Template.bind({})
|
|
57
|
+
|
|
58
|
+
export default componentMeta
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { ChangeEventHandler } from 'react'
|
|
2
|
+
import Icon, { Props as iconProps } from '@components/Icon'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
id?: string
|
|
7
|
+
className?: string
|
|
8
|
+
onChange?: (val: string | number) => void
|
|
9
|
+
placeholder?: string
|
|
10
|
+
text?: string
|
|
11
|
+
leftIconProps?: iconProps
|
|
12
|
+
rightIconProps?: iconProps
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const Search = ({
|
|
16
|
+
id,
|
|
17
|
+
className,
|
|
18
|
+
onChange,
|
|
19
|
+
placeholder,
|
|
20
|
+
text,
|
|
21
|
+
leftIconProps,
|
|
22
|
+
rightIconProps
|
|
23
|
+
}: Props): JSX.Element => {
|
|
24
|
+
const classList = classNames(className, 'flex')
|
|
25
|
+
|
|
26
|
+
const inputClasses = classNames({
|
|
27
|
+
'pl-9': leftIconProps !== undefined,
|
|
28
|
+
'pl-2': leftIconProps === undefined
|
|
29
|
+
}, 'w-full border-2 rounded-md py-2 pr-9')
|
|
30
|
+
|
|
31
|
+
const onChangeFunc: ChangeEventHandler<HTMLInputElement> | undefined = (onChange != null) ? (e: any) => onChange(e.target.value) : undefined
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div id={id} className={classList}>
|
|
35
|
+
<div>
|
|
36
|
+
{text !== undefined &&
|
|
37
|
+
<h2 className='font-base-lg py-2 pr-4'>{text}</h2>}
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<div className='relative w-full flex'>
|
|
41
|
+
{(leftIconProps != null) &&
|
|
42
|
+
<Icon {...leftIconProps} />}
|
|
43
|
+
<input
|
|
44
|
+
className={inputClasses}
|
|
45
|
+
onChange={onChangeFunc}
|
|
46
|
+
placeholder={placeholder}
|
|
47
|
+
type='text'
|
|
48
|
+
name='search'
|
|
49
|
+
/>
|
|
50
|
+
{(rightIconProps != null) &&
|
|
51
|
+
<Icon {...rightIconProps} />}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default Search
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import SocialBlock from './index'
|
|
3
|
+
import { action } from '@storybook/addon-actions'
|
|
4
|
+
import Icon from '@components/Icon'
|
|
5
|
+
import Button from '@components/Button'
|
|
6
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
7
|
+
|
|
8
|
+
const socialButtons = [
|
|
9
|
+
<Button
|
|
10
|
+
key='btn_1'
|
|
11
|
+
className='mx-2 w-16 py-4 border border-1'
|
|
12
|
+
href='https://www.facebook.com/rupert.bennett'
|
|
13
|
+
type='social'
|
|
14
|
+
>
|
|
15
|
+
<Icon
|
|
16
|
+
type='facebook-f'
|
|
17
|
+
brand
|
|
18
|
+
size={2}
|
|
19
|
+
className='mx-auto'
|
|
20
|
+
colour='white'
|
|
21
|
+
bgColour='primary'
|
|
22
|
+
/>
|
|
23
|
+
</Button>,
|
|
24
|
+
<Button
|
|
25
|
+
key='btn_2'
|
|
26
|
+
className='mx-2 w-16 py-4 border border-1'
|
|
27
|
+
href='https://www.linkedin.com/in/rupert-bennett'
|
|
28
|
+
type='social'
|
|
29
|
+
>
|
|
30
|
+
<Icon
|
|
31
|
+
brand
|
|
32
|
+
type='linkedin-in'
|
|
33
|
+
size={2}
|
|
34
|
+
className='mx-auto'
|
|
35
|
+
colour='white'
|
|
36
|
+
bgColour='primary'
|
|
37
|
+
/>
|
|
38
|
+
</Button>,
|
|
39
|
+
<Button
|
|
40
|
+
key='btn_3'
|
|
41
|
+
className='mx-2 w-16 py-4 border border-1'
|
|
42
|
+
href='https://github.com/irupertbennett'
|
|
43
|
+
type='social'
|
|
44
|
+
>
|
|
45
|
+
<Icon
|
|
46
|
+
brand
|
|
47
|
+
type='github'
|
|
48
|
+
size={2}
|
|
49
|
+
className='mx-auto'
|
|
50
|
+
colour='white'
|
|
51
|
+
bgColour='primary'
|
|
52
|
+
/>
|
|
53
|
+
</Button>,
|
|
54
|
+
<Button
|
|
55
|
+
key='btn_4'
|
|
56
|
+
className='mx-2 w-16 py-4 border border-1'
|
|
57
|
+
href='mailto:irupertbennett@gmail.com?subject=rupertbennett.com-&body=Referred from rupertbennett.com'
|
|
58
|
+
type='social'
|
|
59
|
+
>
|
|
60
|
+
<Icon
|
|
61
|
+
type='envelope'
|
|
62
|
+
size={2}
|
|
63
|
+
className='mx-auto'
|
|
64
|
+
colour='white'
|
|
65
|
+
bgColour='primary'
|
|
66
|
+
/>
|
|
67
|
+
</Button>
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
const componentMeta: ComponentMeta<typeof SocialBlock> = {
|
|
71
|
+
title: 'Trepur Components/Rupert Bennett/Organisms/Social Block',
|
|
72
|
+
component: SocialBlock,
|
|
73
|
+
parameters: {},
|
|
74
|
+
argTypes: {
|
|
75
|
+
withLiveUpdates: {
|
|
76
|
+
description: '',
|
|
77
|
+
control: 'boolean',
|
|
78
|
+
table: { category: '' }
|
|
79
|
+
},
|
|
80
|
+
onSave: {
|
|
81
|
+
type: { name: 'function', required: false },
|
|
82
|
+
description: 'Fires a function when you click save',
|
|
83
|
+
action: 'onClick',
|
|
84
|
+
table: {
|
|
85
|
+
type: { summary: 'function' },
|
|
86
|
+
defaultValue: { summary: 'undefined' }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
theme: {
|
|
90
|
+
type: { name: 'string', required: false },
|
|
91
|
+
options: ['dark', 'light'],
|
|
92
|
+
description: 'The variant of button to render',
|
|
93
|
+
table: { type: { summary: 'dark' }, defaultValue: { summary: 'dark' } },
|
|
94
|
+
defaultValue: 'dark',
|
|
95
|
+
control: { type: 'radio' }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
args: {
|
|
99
|
+
title: 'Why not connect with me on LinkedIn or Facebook?',
|
|
100
|
+
text: 'Or send me a E-Mail to get in touch',
|
|
101
|
+
editTitleClasses: 'text-md sm:text-lg ',
|
|
102
|
+
editTextClasses: '',
|
|
103
|
+
editInputClasses: 'mt-4 border border-black text-black bg-white',
|
|
104
|
+
onSave: action('button-save'),
|
|
105
|
+
withLiveUpdates: true,
|
|
106
|
+
socialButtons
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const Template: ComponentStory<typeof SocialBlock> = (args) => <SocialBlock {...args} />
|
|
111
|
+
|
|
112
|
+
export const _SocialBlock = Template.bind({})
|
|
113
|
+
|
|
114
|
+
export default componentMeta
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import Input from '@components/Input'
|
|
3
|
+
import Button, { Props as buttonProps } from '@components/Button'
|
|
4
|
+
import classNames from 'classnames'
|
|
5
|
+
|
|
6
|
+
export interface Props {
|
|
7
|
+
id?: string
|
|
8
|
+
className?: string
|
|
9
|
+
title?: string
|
|
10
|
+
text?: string
|
|
11
|
+
withLiveUpdates?: boolean
|
|
12
|
+
onSave?: (arr: any[], id: string | undefined) => void
|
|
13
|
+
saveButtonProps?: buttonProps
|
|
14
|
+
cancelButtonProps?: buttonProps
|
|
15
|
+
editTitleClasses?: string
|
|
16
|
+
editTextClasses?: string
|
|
17
|
+
editInputClasses?: string
|
|
18
|
+
buttonWrapperClasses?: string
|
|
19
|
+
textWrapperClasses?: string
|
|
20
|
+
socialButtons?: buttonProps[]
|
|
21
|
+
theme: 'light' | 'dark'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const SocialBlock = ({
|
|
25
|
+
id,
|
|
26
|
+
className,
|
|
27
|
+
title,
|
|
28
|
+
text,
|
|
29
|
+
withLiveUpdates,
|
|
30
|
+
onSave,
|
|
31
|
+
saveButtonProps,
|
|
32
|
+
cancelButtonProps,
|
|
33
|
+
editTitleClasses,
|
|
34
|
+
editTextClasses,
|
|
35
|
+
editInputClasses,
|
|
36
|
+
buttonWrapperClasses,
|
|
37
|
+
textWrapperClasses,
|
|
38
|
+
socialButtons,
|
|
39
|
+
theme = 'light'
|
|
40
|
+
}: Props): JSX.Element => {
|
|
41
|
+
const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary'
|
|
42
|
+
const defaultComponentData = {
|
|
43
|
+
title: {
|
|
44
|
+
text: title
|
|
45
|
+
},
|
|
46
|
+
text: {
|
|
47
|
+
text
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const [isInEditingMode, setIsInEditingMode] = useState(false)
|
|
52
|
+
const [isHovering, setIsHovering] = useState(false)
|
|
53
|
+
const [componentData, setComponentData] = useState(defaultComponentData)
|
|
54
|
+
const hoverClasses = 'border-dashed border'
|
|
55
|
+
|
|
56
|
+
const classList = classNames(className, colours)
|
|
57
|
+
const buttnoWrapperClasslist = classNames(buttonWrapperClasses, 'py-4')
|
|
58
|
+
|
|
59
|
+
const hoverClassList = classNames({
|
|
60
|
+
[hoverClasses]: withLiveUpdates !== undefined && !isInEditingMode && isHovering
|
|
61
|
+
}, textWrapperClasses)
|
|
62
|
+
|
|
63
|
+
const toggleEditState = (): void => {
|
|
64
|
+
withLiveUpdates === true && setIsInEditingMode(!isInEditingMode)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const handleButtonSave = (): void => {
|
|
68
|
+
const arr = []
|
|
69
|
+
arr.push({ key: 'title', value: componentData.title.text })
|
|
70
|
+
arr.push({ key: 'text', value: componentData.text.text })
|
|
71
|
+
toggleEditState()
|
|
72
|
+
onSave?.(arr, id)
|
|
73
|
+
setIsHovering(false)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const handleButtonCancel = (): void => {
|
|
77
|
+
toggleEditState()
|
|
78
|
+
setIsHovering(false)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const handleChange = (e: any): void => {
|
|
82
|
+
let id = e.target.id
|
|
83
|
+
id = id.split('-')[id.split('-').length - 1]
|
|
84
|
+
setComponentData({
|
|
85
|
+
...componentData,
|
|
86
|
+
[id]: {
|
|
87
|
+
text: e.target.value
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const toggleHoverState = (): void => {
|
|
93
|
+
withLiveUpdates === true && setIsHovering(!isHovering)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<div
|
|
98
|
+
id={id}
|
|
99
|
+
className={classList}
|
|
100
|
+
>
|
|
101
|
+
{withLiveUpdates === true && isInEditingMode
|
|
102
|
+
? (
|
|
103
|
+
<div className={colours}>
|
|
104
|
+
<Input
|
|
105
|
+
id='title'
|
|
106
|
+
className={editTitleClasses}
|
|
107
|
+
inputClasses={editInputClasses}
|
|
108
|
+
autoFocus
|
|
109
|
+
value={componentData.title.text}
|
|
110
|
+
onChange={(e: any) => handleChange(e)}
|
|
111
|
+
type='text'
|
|
112
|
+
theme={theme}
|
|
113
|
+
/>
|
|
114
|
+
<Input
|
|
115
|
+
id='text'
|
|
116
|
+
className={editTextClasses}
|
|
117
|
+
inputClasses={editInputClasses}
|
|
118
|
+
value={componentData.text.text}
|
|
119
|
+
onChange={(e: any) => handleChange(e)}
|
|
120
|
+
type='text'
|
|
121
|
+
theme={theme}
|
|
122
|
+
/>
|
|
123
|
+
<Button
|
|
124
|
+
className='mt-4'
|
|
125
|
+
onClick={handleButtonSave}
|
|
126
|
+
>
|
|
127
|
+
Save
|
|
128
|
+
</Button>
|
|
129
|
+
<Button
|
|
130
|
+
className='mt-4 ml-4'
|
|
131
|
+
onClick={handleButtonCancel}
|
|
132
|
+
>
|
|
133
|
+
Cancel
|
|
134
|
+
</Button>
|
|
135
|
+
</div>
|
|
136
|
+
)
|
|
137
|
+
: (
|
|
138
|
+
<>
|
|
139
|
+
<div
|
|
140
|
+
onMouseOver={() => toggleHoverState()}
|
|
141
|
+
onMouseOut={() => toggleHoverState()}
|
|
142
|
+
onClick={toggleEditState}
|
|
143
|
+
className={hoverClassList}
|
|
144
|
+
>
|
|
145
|
+
<h2 className='text-md sm:text-lg'>{componentData.title.text}</h2>
|
|
146
|
+
<p className='pt-4'>{componentData.text.text}</p>
|
|
147
|
+
</div>
|
|
148
|
+
<div className={buttnoWrapperClasslist}>
|
|
149
|
+
<div className='flex flex-wrap w-full justify-center'>
|
|
150
|
+
{socialButtons?.map((button, i: number) => {
|
|
151
|
+
return <div key={`social_btn_${i + 1}`}>{button}</div>
|
|
152
|
+
})}
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</>
|
|
156
|
+
)}
|
|
157
|
+
</div>
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export default SocialBlock
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import StarRating from './index'
|
|
3
|
+
import { idAndClassName } from '@utils/controls'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
const componentMeta: ComponentMeta<typeof StarRating> = {
|
|
7
|
+
title: 'Trepur Components/Other/Atoms/Star Rating',
|
|
8
|
+
component: StarRating,
|
|
9
|
+
parameters: {},
|
|
10
|
+
argTypes: {
|
|
11
|
+
...idAndClassName
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
stars: 3,
|
|
15
|
+
size: 2
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Template: ComponentStory<typeof StarRating> = (args) => <StarRating {...args} />
|
|
20
|
+
|
|
21
|
+
export const _StarRating = Template.bind({})
|
|
22
|
+
|
|
23
|
+
export default componentMeta
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Icon from '@components/Icon'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
id: string
|
|
7
|
+
className: string
|
|
8
|
+
stars: number
|
|
9
|
+
size: number
|
|
10
|
+
}
|
|
11
|
+
const StarRating = ({
|
|
12
|
+
id,
|
|
13
|
+
className,
|
|
14
|
+
stars = 1,
|
|
15
|
+
size = 1
|
|
16
|
+
}: Props): JSX.Element => {
|
|
17
|
+
const classList = classNames({
|
|
18
|
+
}, `${className} flex`)
|
|
19
|
+
|
|
20
|
+
const getStars = (): JSX.Element[] => {
|
|
21
|
+
const starsArr = []
|
|
22
|
+
for (let i = 0; i < stars; i++) {
|
|
23
|
+
starsArr.push(
|
|
24
|
+
<Icon
|
|
25
|
+
key={`checked_star_${i + 0}`}
|
|
26
|
+
id={`checked-${i}`}
|
|
27
|
+
className='checked'
|
|
28
|
+
type='star'
|
|
29
|
+
size={size}
|
|
30
|
+
colour='gold'
|
|
31
|
+
bgColour='white'
|
|
32
|
+
/>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
return starsArr
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const getStarsChecked = (): JSX.Element[] => {
|
|
39
|
+
const starsArr = []
|
|
40
|
+
for (let i = 0; i < 5 - stars; i++) {
|
|
41
|
+
starsArr.push(
|
|
42
|
+
<Icon
|
|
43
|
+
key={`unchecked_star_${i + 0}`}
|
|
44
|
+
id={`unchecked-${i}`}
|
|
45
|
+
className='unchecked opacity-30 gold'
|
|
46
|
+
type='star'
|
|
47
|
+
size={size}
|
|
48
|
+
colour='gold'
|
|
49
|
+
bgColour='white'
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
return starsArr
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const getAllStars = (): JSX.Element[] => {
|
|
57
|
+
const starArray = [...getStars(), ...getStarsChecked()]
|
|
58
|
+
return starArray
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
id={id}
|
|
64
|
+
className={classList}
|
|
65
|
+
>
|
|
66
|
+
{getAllStars()}
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default StarRating
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { idAndClassName } from '@utils/controls'
|
|
3
|
+
import Testimonial from './index'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
const componentMeta: ComponentMeta<typeof Testimonial> = {
|
|
7
|
+
title: 'Trepur Components/Rupert Bennett/Organisms/Testimonial',
|
|
8
|
+
component: Testimonial,
|
|
9
|
+
parameters: {},
|
|
10
|
+
argTypes: {
|
|
11
|
+
...idAndClassName,
|
|
12
|
+
text: {
|
|
13
|
+
description: 'The description to display on the component',
|
|
14
|
+
control: 'text',
|
|
15
|
+
table: {
|
|
16
|
+
type: { summary: 'default' }
|
|
17
|
+
},
|
|
18
|
+
defaultValue: { summary: 'undefined' }
|
|
19
|
+
},
|
|
20
|
+
companyName: {
|
|
21
|
+
description: 'The company name to display on the component',
|
|
22
|
+
control: 'text',
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: 'default' }
|
|
25
|
+
},
|
|
26
|
+
defaultValue: { summary: 'undefined' }
|
|
27
|
+
},
|
|
28
|
+
positionStartDate: {
|
|
29
|
+
description: 'The start date to display on the component',
|
|
30
|
+
control: 'text',
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: 'default' }
|
|
33
|
+
},
|
|
34
|
+
defaultValue: { summary: 'undefined' }
|
|
35
|
+
},
|
|
36
|
+
positionEndDate: {
|
|
37
|
+
description: 'The end date to display on the component',
|
|
38
|
+
control: 'text',
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: 'default' }
|
|
41
|
+
},
|
|
42
|
+
defaultValue: { summary: 'undefined' }
|
|
43
|
+
},
|
|
44
|
+
position: {
|
|
45
|
+
description: 'The position to display on the component',
|
|
46
|
+
control: 'text',
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'default' }
|
|
49
|
+
},
|
|
50
|
+
defaultValue: { summary: 'undefined' }
|
|
51
|
+
},
|
|
52
|
+
date: {
|
|
53
|
+
description: 'The date of the testimonial to display on the component',
|
|
54
|
+
control: 'text',
|
|
55
|
+
table: {
|
|
56
|
+
type: { summary: 'default' }
|
|
57
|
+
},
|
|
58
|
+
defaultValue: { summary: 'undefined' }
|
|
59
|
+
},
|
|
60
|
+
authorsName: {
|
|
61
|
+
description: 'The authors name to display on the component',
|
|
62
|
+
control: 'text',
|
|
63
|
+
table: {
|
|
64
|
+
type: { summary: 'default' }
|
|
65
|
+
},
|
|
66
|
+
defaultValue: { summary: 'undefined' }
|
|
67
|
+
},
|
|
68
|
+
authorsPosition: {
|
|
69
|
+
description: 'The authors position to display on the component',
|
|
70
|
+
control: 'text',
|
|
71
|
+
table: {
|
|
72
|
+
type: { summary: 'default' }
|
|
73
|
+
},
|
|
74
|
+
defaultValue: { summary: 'undefined' }
|
|
75
|
+
},
|
|
76
|
+
imageProps: {
|
|
77
|
+
type: { name: 'other', value: 'object' },
|
|
78
|
+
description: 'The props to pass to the image to display on the component',
|
|
79
|
+
table: {
|
|
80
|
+
type: {
|
|
81
|
+
summary: 'object'
|
|
82
|
+
},
|
|
83
|
+
defaultValue: { summary: 'undefined' }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
args: {
|
|
88
|
+
imageProps: {
|
|
89
|
+
image: 'https://picsum.photos/100/100',
|
|
90
|
+
height: 8,
|
|
91
|
+
width: 8,
|
|
92
|
+
roundedFull: true,
|
|
93
|
+
centerAligned: true
|
|
94
|
+
},
|
|
95
|
+
authorsName: 'Authors Name',
|
|
96
|
+
authorsPosition: 'Authors Position',
|
|
97
|
+
position: 'Position',
|
|
98
|
+
positionEndDate: 'End Date',
|
|
99
|
+
positionStartDate: 'Start Date',
|
|
100
|
+
date: 'Date',
|
|
101
|
+
companyName: 'Company Name',
|
|
102
|
+
text: 'This is some text'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const Template: ComponentStory<typeof Testimonial> = (args) => <Testimonial {...args} />
|
|
107
|
+
|
|
108
|
+
export const _Testimonial = Template.bind({})
|
|
109
|
+
|
|
110
|
+
export default componentMeta
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
import Image, { Props as imageProps } from '@components/Image'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
id?: string
|
|
7
|
+
className?: string
|
|
8
|
+
text?: string
|
|
9
|
+
imageProps?: imageProps
|
|
10
|
+
companyName?: string
|
|
11
|
+
position?: string
|
|
12
|
+
date?: string
|
|
13
|
+
positionStartDate?: string
|
|
14
|
+
positionEndDate?: string
|
|
15
|
+
authorsName?: string
|
|
16
|
+
authorsPosition?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Testimonial = ({
|
|
20
|
+
id,
|
|
21
|
+
className,
|
|
22
|
+
text,
|
|
23
|
+
imageProps,
|
|
24
|
+
companyName,
|
|
25
|
+
position,
|
|
26
|
+
date,
|
|
27
|
+
positionStartDate,
|
|
28
|
+
positionEndDate,
|
|
29
|
+
authorsName,
|
|
30
|
+
authorsPosition
|
|
31
|
+
}: Props): JSX.Element => {
|
|
32
|
+
const classList = classNames(className, 'text-center')
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div id={id} className={classList}>
|
|
36
|
+
<div className='mx-auto'>
|
|
37
|
+
<Image {...imageProps} />
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<h2 className='text-md md:text-md'>{companyName} </h2>
|
|
41
|
+
<p className='text-md md:text-sm'>{position}</p>
|
|
42
|
+
<p>{positionStartDate} - {positionEndDate}</p>
|
|
43
|
+
<p>{text}</p>
|
|
44
|
+
<p>{authorsName} - {authorsPosition}: {date}</p>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default Testimonial
|