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 from 'react'
|
|
2
|
+
import TextAndTitle from './index'
|
|
3
|
+
import { action } from '@storybook/addon-actions'
|
|
4
|
+
import Greeting from '@components/Greeting'
|
|
5
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
6
|
+
|
|
7
|
+
const componentMeta: ComponentMeta<typeof TextAndTitle> = {
|
|
8
|
+
title: 'Trepur Components/Rupert Bennett/Organisms/Text And Title',
|
|
9
|
+
component: TextAndTitle,
|
|
10
|
+
argTypes: {
|
|
11
|
+
id: {
|
|
12
|
+
description: 'Defines the id of the component',
|
|
13
|
+
table: {
|
|
14
|
+
category: '',
|
|
15
|
+
type: { summary: 'string' },
|
|
16
|
+
defaultValue: { summary: 'undefined' }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
className: {
|
|
20
|
+
description: 'Defines any additional classes for the components',
|
|
21
|
+
table: {
|
|
22
|
+
category: '',
|
|
23
|
+
type: { summary: 'string' },
|
|
24
|
+
defaultValue: { summary: 'undefined' }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
onSave: {
|
|
28
|
+
type: { name: 'function', required: false },
|
|
29
|
+
description: 'Fires a function when you click save',
|
|
30
|
+
action: 'onClick',
|
|
31
|
+
table: {
|
|
32
|
+
type: {
|
|
33
|
+
summary: 'function'
|
|
34
|
+
},
|
|
35
|
+
defaultValue: { summary: 'undefined' }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
args: {
|
|
40
|
+
children: <p>This is a child</p>,
|
|
41
|
+
editTitleClasses: 'text-md sm:text-lg ',
|
|
42
|
+
editTextClasses: 'break-words',
|
|
43
|
+
editInputClasses: 'border border-black text-black bg-white',
|
|
44
|
+
textLineOne: <div><Greeting /><p>Loremipsumdolorsitamet consectetur adipisicing elit</p></div>,
|
|
45
|
+
textLineTwo: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi impedit sed, quis aspernatur voluptate minima vel placeat ipsa amet voluptatem reprehenderit ullam rem cum tempora explicabo veritatis numquam libero asperiores!',
|
|
46
|
+
textLineThree: 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tenetur nihil voluptas ipsum labore? Eligendi et ipsam, repellat culpa porro a animi laudantium molestiae provident facere non tempora odit? Perferendis, assumenda.',
|
|
47
|
+
onSave: action('button-save'),
|
|
48
|
+
withLiveUpdates: true,
|
|
49
|
+
isHorizontal: true,
|
|
50
|
+
saveButtonProps: {
|
|
51
|
+
className: 'mt-4',
|
|
52
|
+
children: 'Save'
|
|
53
|
+
},
|
|
54
|
+
cancelButtonProps: {
|
|
55
|
+
className: 'mt-4 ml-4',
|
|
56
|
+
children: 'Cancel'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const Template: ComponentStory<typeof TextAndTitle> = (args) => <TextAndTitle {...args} />
|
|
62
|
+
|
|
63
|
+
export const _TextAndTitle = Template.bind({})
|
|
64
|
+
|
|
65
|
+
export default componentMeta
|
|
@@ -0,0 +1,257 @@
|
|
|
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
|
+
import TextArea from '@components/TextArea'
|
|
6
|
+
|
|
7
|
+
export interface Props {
|
|
8
|
+
id: string
|
|
9
|
+
className?: string
|
|
10
|
+
titleClasses?: string
|
|
11
|
+
editTitleClasses?: string
|
|
12
|
+
editTextClasses?: string
|
|
13
|
+
editInputClasses?: string
|
|
14
|
+
textClasses?: string
|
|
15
|
+
textLineOne?: string | object
|
|
16
|
+
textLineTwo?: string | object
|
|
17
|
+
textLineThree?: string | object
|
|
18
|
+
title?: string
|
|
19
|
+
titleBold?: boolean
|
|
20
|
+
textCenter?: boolean
|
|
21
|
+
titleCenter?: boolean
|
|
22
|
+
withLiveUpdates?: boolean
|
|
23
|
+
onSave?: (arr: any[], id: string | undefined) => void
|
|
24
|
+
saveButtonProps?: buttonProps
|
|
25
|
+
cancelButtonProps?: buttonProps
|
|
26
|
+
isHorizontal?: boolean
|
|
27
|
+
children?: any
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const TextAndTitle: React.FC<Props> = ({
|
|
31
|
+
id,
|
|
32
|
+
className,
|
|
33
|
+
titleClasses,
|
|
34
|
+
editTitleClasses,
|
|
35
|
+
editTextClasses,
|
|
36
|
+
editInputClasses,
|
|
37
|
+
textClasses,
|
|
38
|
+
textLineOne,
|
|
39
|
+
textLineTwo,
|
|
40
|
+
textLineThree,
|
|
41
|
+
title,
|
|
42
|
+
titleBold,
|
|
43
|
+
textCenter,
|
|
44
|
+
titleCenter,
|
|
45
|
+
withLiveUpdates = false,
|
|
46
|
+
onSave,
|
|
47
|
+
saveButtonProps,
|
|
48
|
+
cancelButtonProps,
|
|
49
|
+
isHorizontal = true,
|
|
50
|
+
children
|
|
51
|
+
}: Props): JSX.Element => {
|
|
52
|
+
const getLineHeight = (id: string): number => {
|
|
53
|
+
const element = document.getElementById(id)
|
|
54
|
+
const divHeight = element?.offsetHeight !== undefined ? element.offsetHeight : 0
|
|
55
|
+
const lineHeight = (element != null) ? parseFloat(getComputedStyle(element).fontSize) : 1
|
|
56
|
+
const pt = (element != null) ? parseFloat(getComputedStyle(element).paddingTop) : 0
|
|
57
|
+
const pb = (element != null) ? parseFloat(getComputedStyle(element).paddingBottom) : 0
|
|
58
|
+
const mt = (element != null) ? parseFloat(getComputedStyle(element).marginTop) : 0
|
|
59
|
+
const mb = (element != null) ? parseFloat(getComputedStyle(element).marginBottom) : 0
|
|
60
|
+
const bw = (element != null) ? parseFloat(getComputedStyle(element).borderWidth) : 0
|
|
61
|
+
const height = divHeight - mt - mb - pt - pb - (bw * 2)
|
|
62
|
+
|
|
63
|
+
if (isHorizontal) {
|
|
64
|
+
return Math.floor(height / lineHeight) - 1
|
|
65
|
+
}
|
|
66
|
+
return Math.floor(height / lineHeight)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const defaultComponentData = {
|
|
70
|
+
title,
|
|
71
|
+
textLineOne,
|
|
72
|
+
textLineTwo,
|
|
73
|
+
textLineThree
|
|
74
|
+
}
|
|
75
|
+
const [isInEditingMode, setIsInEditingMode] = useState(false)
|
|
76
|
+
const [componentData, setComponentData] = useState(defaultComponentData)
|
|
77
|
+
|
|
78
|
+
const borderClasses = 'border border-transparent'
|
|
79
|
+
const classList = classNames(className, 'bg-primary text-white')
|
|
80
|
+
|
|
81
|
+
const titleClassList = classNames({
|
|
82
|
+
'font-bold': titleBold,
|
|
83
|
+
'text-center': titleCenter,
|
|
84
|
+
[borderClasses]: withLiveUpdates && !isInEditingMode
|
|
85
|
+
}, titleClasses, 'text-md break-words')
|
|
86
|
+
|
|
87
|
+
const textClassList = classNames({
|
|
88
|
+
'text-center': textCenter,
|
|
89
|
+
[borderClasses]: withLiveUpdates && !isInEditingMode
|
|
90
|
+
}, textClasses, 'pt-2 mt-2')
|
|
91
|
+
|
|
92
|
+
const toggleEditState = (): void => {
|
|
93
|
+
withLiveUpdates &&
|
|
94
|
+
setIsInEditingMode(!isInEditingMode)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const handleButtonSave = (): void => {
|
|
98
|
+
const arr = []
|
|
99
|
+
arr.push({ key: 'title', value: componentData.title })
|
|
100
|
+
arr.push({ key: 'textLineOne', value: componentData.textLineOne })
|
|
101
|
+
arr.push({ key: 'textLineTwo', value: componentData.textLineTwo })
|
|
102
|
+
arr.push({ key: 'textLineThree', value: componentData.textLineThree })
|
|
103
|
+
toggleEditState()
|
|
104
|
+
onSave?.(arr, id)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const handleButtonCancel = (): void => {
|
|
108
|
+
return toggleEditState()
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const handleChange = (e: any): void => {
|
|
112
|
+
let id = e.target.id
|
|
113
|
+
id = id.split('-')[id.split('-').length - 1]
|
|
114
|
+
|
|
115
|
+
setComponentData({
|
|
116
|
+
...componentData,
|
|
117
|
+
[id]: e.target.value
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const wrapperClassList = classNames({
|
|
122
|
+
'flex flex-wrap justify-center md:items-center': isHorizontal,
|
|
123
|
+
'hover:border-black hover:border-dashed': withLiveUpdates && !isInEditingMode
|
|
124
|
+
}, 'border-2 border-transparent')
|
|
125
|
+
|
|
126
|
+
const titleWrapperClassList = classNames({
|
|
127
|
+
'md:w-1/2 md:text-center md:px-8': isHorizontal
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
const textWrapperClassList = classNames({
|
|
131
|
+
'md:w-1/2 md:text-center md:py-8 md:px-8': isHorizontal
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
const inputClassList = classNames(editInputClasses, textClassList)
|
|
135
|
+
|
|
136
|
+
const node = document.getElementById('textLineOne')
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<div
|
|
140
|
+
id={id}
|
|
141
|
+
className={classList}
|
|
142
|
+
>
|
|
143
|
+
{withLiveUpdates && isInEditingMode
|
|
144
|
+
? (
|
|
145
|
+
<>
|
|
146
|
+
<div className={wrapperClassList}>
|
|
147
|
+
<div className={titleWrapperClassList}>
|
|
148
|
+
{componentData?.title !== undefined
|
|
149
|
+
? (
|
|
150
|
+
<Input
|
|
151
|
+
className={editTitleClasses}
|
|
152
|
+
inputClasses={inputClassList}
|
|
153
|
+
autoFocus
|
|
154
|
+
value={componentData?.title}
|
|
155
|
+
onChange={(e: any) => handleChange(e)}
|
|
156
|
+
type='text'
|
|
157
|
+
theme='dark'
|
|
158
|
+
/>
|
|
159
|
+
)
|
|
160
|
+
: (
|
|
161
|
+
<div>
|
|
162
|
+
{children}
|
|
163
|
+
</div>
|
|
164
|
+
)}
|
|
165
|
+
</div>
|
|
166
|
+
<div className={textWrapperClassList}>
|
|
167
|
+
<TextArea
|
|
168
|
+
className={editTextClasses}
|
|
169
|
+
textAreaClasses={classNames({
|
|
170
|
+
'text-center': isHorizontal
|
|
171
|
+
}, editInputClasses)}
|
|
172
|
+
rows={getLineHeight('textLineOne') + 1}
|
|
173
|
+
onChange={(e: any) => handleChange(e)}
|
|
174
|
+
theme='dark'
|
|
175
|
+
>
|
|
176
|
+
{node?.innerHTML}
|
|
177
|
+
</TextArea>
|
|
178
|
+
<TextArea
|
|
179
|
+
className={editTextClasses}
|
|
180
|
+
textAreaClasses={classNames({
|
|
181
|
+
'text-center': isHorizontal
|
|
182
|
+
}, editInputClasses)}
|
|
183
|
+
rows={getLineHeight('textLineTwo')}
|
|
184
|
+
onChange={(e: any) => handleChange(e)}
|
|
185
|
+
theme='dark'
|
|
186
|
+
>
|
|
187
|
+
{componentData.textLineTwo}
|
|
188
|
+
</TextArea>
|
|
189
|
+
<TextArea
|
|
190
|
+
className={editTextClasses}
|
|
191
|
+
textAreaClasses={classNames({
|
|
192
|
+
'text-center': isHorizontal
|
|
193
|
+
}, editInputClasses)}
|
|
194
|
+
rows={getLineHeight('textLineThree')}
|
|
195
|
+
onChange={(e: any) => handleChange(e)}
|
|
196
|
+
theme='dark'
|
|
197
|
+
>
|
|
198
|
+
{componentData.textLineThree}
|
|
199
|
+
</TextArea>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
<Button
|
|
203
|
+
className={saveButtonProps?.className}
|
|
204
|
+
onClick={handleButtonSave}
|
|
205
|
+
>
|
|
206
|
+
{saveButtonProps?.children}
|
|
207
|
+
</Button>
|
|
208
|
+
<Button
|
|
209
|
+
className={cancelButtonProps?.className}
|
|
210
|
+
onClick={handleButtonCancel}
|
|
211
|
+
>
|
|
212
|
+
{cancelButtonProps?.children}
|
|
213
|
+
</Button>
|
|
214
|
+
</>
|
|
215
|
+
)
|
|
216
|
+
: (
|
|
217
|
+
<div
|
|
218
|
+
className={wrapperClassList}
|
|
219
|
+
onClick={toggleEditState}
|
|
220
|
+
>
|
|
221
|
+
<div className={titleWrapperClassList}>
|
|
222
|
+
{componentData?.title !== undefined
|
|
223
|
+
? (
|
|
224
|
+
<h1 className={titleClassList}>
|
|
225
|
+
{componentData.title}
|
|
226
|
+
</h1>
|
|
227
|
+
)
|
|
228
|
+
: (
|
|
229
|
+
children
|
|
230
|
+
)}
|
|
231
|
+
</div>
|
|
232
|
+
<div className={textWrapperClassList}>
|
|
233
|
+
{componentData?.title !== undefined
|
|
234
|
+
? (
|
|
235
|
+
<h1 id='title' className={titleClassList}>
|
|
236
|
+
{componentData.title}
|
|
237
|
+
</h1>
|
|
238
|
+
)
|
|
239
|
+
: (
|
|
240
|
+
<div id='textLineOne' className={textClassList}>
|
|
241
|
+
{componentData.textLineOne}
|
|
242
|
+
</div>
|
|
243
|
+
)}
|
|
244
|
+
<div id='textLineTwo' className={textClassList}>
|
|
245
|
+
{componentData.textLineTwo}
|
|
246
|
+
</div>
|
|
247
|
+
<div id='textLineThree' className={textClassList}>
|
|
248
|
+
{componentData.textLineThree}
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
)}
|
|
253
|
+
</div>
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export default TextAndTitle
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import TextArea from './index'
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
4
|
+
|
|
5
|
+
const componentMeta: ComponentMeta<typeof TextArea> = {
|
|
6
|
+
title: 'Trepur Components/Rupert Bennett/Atoms/Text Area',
|
|
7
|
+
component: TextArea,
|
|
8
|
+
parameters: {},
|
|
9
|
+
argTypes: {
|
|
10
|
+
id: {
|
|
11
|
+
description: 'Defines the id of the component',
|
|
12
|
+
table: {
|
|
13
|
+
category: '',
|
|
14
|
+
type: { summary: 'string' },
|
|
15
|
+
defaultValue: { summary: 'undefined' }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
className: {
|
|
19
|
+
description: 'Defines any additional classes for the components',
|
|
20
|
+
table: {
|
|
21
|
+
category: '',
|
|
22
|
+
type: { summary: 'string' },
|
|
23
|
+
defaultValue: { summary: 'undefined' }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
label: {
|
|
27
|
+
description: '',
|
|
28
|
+
control: 'text',
|
|
29
|
+
table: {
|
|
30
|
+
category: ''
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
placeholder: {
|
|
34
|
+
description: '',
|
|
35
|
+
control: 'text',
|
|
36
|
+
table: {
|
|
37
|
+
category: ''
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
bold: {
|
|
41
|
+
description: '',
|
|
42
|
+
control: 'boolean',
|
|
43
|
+
table: {
|
|
44
|
+
category: ''
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
theme: {
|
|
48
|
+
type: { name: 'string', required: false },
|
|
49
|
+
options: ['dark', 'light'],
|
|
50
|
+
description: 'The variant of button to render',
|
|
51
|
+
table: { type: { summary: 'dark' }, defaultValue: { summary: 'dark' } },
|
|
52
|
+
defaultValue: 'dark',
|
|
53
|
+
control: { type: 'radio' }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
args: {
|
|
57
|
+
label: 'This is a label',
|
|
58
|
+
placeholder: 'This is a text area placeholder',
|
|
59
|
+
withPadding: true
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const Template: ComponentStory<typeof TextArea> = (args) => <TextArea {...args} />
|
|
64
|
+
|
|
65
|
+
export const _TextArea = Template.bind({})
|
|
66
|
+
|
|
67
|
+
export default componentMeta
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
id?: string
|
|
6
|
+
className?: string
|
|
7
|
+
labelClasses?: string
|
|
8
|
+
textAreaClasses?: string
|
|
9
|
+
label?: string
|
|
10
|
+
placeholder?: string
|
|
11
|
+
bold?: boolean
|
|
12
|
+
name?: string
|
|
13
|
+
disabled?: boolean
|
|
14
|
+
rows?: number
|
|
15
|
+
cols?: number
|
|
16
|
+
autoFocus?: boolean
|
|
17
|
+
formId?: string
|
|
18
|
+
maxLength?: number
|
|
19
|
+
readOnly?: boolean
|
|
20
|
+
required?: boolean
|
|
21
|
+
onBlur?: () => void
|
|
22
|
+
onFocus?: () => void
|
|
23
|
+
onChange?: (e: any) => void
|
|
24
|
+
withPadding?: boolean
|
|
25
|
+
children?: any
|
|
26
|
+
theme?: 'dark' | 'light'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const TextArea = ({
|
|
30
|
+
id,
|
|
31
|
+
className,
|
|
32
|
+
labelClasses,
|
|
33
|
+
textAreaClasses,
|
|
34
|
+
label,
|
|
35
|
+
placeholder,
|
|
36
|
+
bold,
|
|
37
|
+
name,
|
|
38
|
+
disabled,
|
|
39
|
+
rows,
|
|
40
|
+
cols,
|
|
41
|
+
autoFocus,
|
|
42
|
+
formId,
|
|
43
|
+
maxLength,
|
|
44
|
+
readOnly,
|
|
45
|
+
required,
|
|
46
|
+
onBlur,
|
|
47
|
+
onFocus,
|
|
48
|
+
onChange,
|
|
49
|
+
withPadding,
|
|
50
|
+
children,
|
|
51
|
+
theme = 'light'
|
|
52
|
+
}: Props): JSX.Element => {
|
|
53
|
+
const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary'
|
|
54
|
+
const classList = classNames(className, colours, 'flex flex-col')
|
|
55
|
+
const newId = id !== undefined ? `-${id}` : '-'
|
|
56
|
+
const labelClassList = classNames({
|
|
57
|
+
'font-bold': bold
|
|
58
|
+
}, labelClasses, 'w-auto pb-2')
|
|
59
|
+
|
|
60
|
+
const textAreaClassList = classNames({
|
|
61
|
+
'p-2': withPadding
|
|
62
|
+
}, textAreaClasses, colours, 'border rounded-md mb-2')
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div
|
|
66
|
+
id={id}
|
|
67
|
+
className={classList}
|
|
68
|
+
>
|
|
69
|
+
{label !== undefined &&
|
|
70
|
+
<label
|
|
71
|
+
className={labelClassList}
|
|
72
|
+
htmlFor={`text-area${newId}`}
|
|
73
|
+
>
|
|
74
|
+
{label}
|
|
75
|
+
</label>}
|
|
76
|
+
<textarea
|
|
77
|
+
className={textAreaClassList}
|
|
78
|
+
autoFocus={autoFocus}
|
|
79
|
+
form={formId}
|
|
80
|
+
maxLength={maxLength}
|
|
81
|
+
readOnly={readOnly}
|
|
82
|
+
required={required}
|
|
83
|
+
disabled={disabled}
|
|
84
|
+
rows={rows}
|
|
85
|
+
cols={cols}
|
|
86
|
+
name={name}
|
|
87
|
+
placeholder={placeholder}
|
|
88
|
+
onChange={onChange}
|
|
89
|
+
onFocus={onFocus}
|
|
90
|
+
onBlur={onBlur}
|
|
91
|
+
defaultValue={children}
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export default TextArea
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Timeline from './index'
|
|
3
|
+
import CardWithTopImage from '@components/CardWithTopImage'
|
|
4
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
+
import logo from '@assets/images/primary-logo.png'
|
|
6
|
+
import { Props as imageProps } from '@components/Image'
|
|
7
|
+
|
|
8
|
+
const timelineItems = (): Array<{ component: JSX.Element, centerImageProps: imageProps }> => {
|
|
9
|
+
return new Array(8).fill(null).map(() => {
|
|
10
|
+
return (
|
|
11
|
+
{
|
|
12
|
+
component:
|
|
13
|
+
<CardWithTopImage
|
|
14
|
+
imageProps={{
|
|
15
|
+
image: logo,
|
|
16
|
+
roundedFull: true,
|
|
17
|
+
width: 4,
|
|
18
|
+
height: 4
|
|
19
|
+
}}
|
|
20
|
+
className='px-4'
|
|
21
|
+
>
|
|
22
|
+
<p>This is some text</p>
|
|
23
|
+
<p>This is some more text</p>
|
|
24
|
+
<p>This is a bit more text</p>
|
|
25
|
+
<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>
|
|
26
|
+
</CardWithTopImage>,
|
|
27
|
+
centerImageProps: {
|
|
28
|
+
image: logo,
|
|
29
|
+
imageClasses: 'mx-auto',
|
|
30
|
+
width: 4,
|
|
31
|
+
height: 4,
|
|
32
|
+
centerAligned: true,
|
|
33
|
+
roundedFull: true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const componentMeta: ComponentMeta<typeof Timeline> = {
|
|
41
|
+
title: 'Trepur Components/Rupert Bennett/Organisms/Timeline',
|
|
42
|
+
component: Timeline,
|
|
43
|
+
parameters: {},
|
|
44
|
+
argTypes: {
|
|
45
|
+
id: {
|
|
46
|
+
description: 'Defines the id of the component',
|
|
47
|
+
control: { type: 'text', default: false },
|
|
48
|
+
table: {
|
|
49
|
+
category: 'Id',
|
|
50
|
+
type: { summary: 'string' },
|
|
51
|
+
defaultValue: { summary: 'undefined' }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
className: {
|
|
55
|
+
description: 'Defines any additional classes for the components',
|
|
56
|
+
control: { type: 'text', default: false },
|
|
57
|
+
table: {
|
|
58
|
+
category: 'Classes',
|
|
59
|
+
type: { summary: 'string' },
|
|
60
|
+
defaultValue: { summary: 'undefined' }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
isHorizontal: {
|
|
64
|
+
description: '',
|
|
65
|
+
control: 'boolean',
|
|
66
|
+
table: {
|
|
67
|
+
category: ''
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
useImages: {
|
|
71
|
+
description: '',
|
|
72
|
+
control: 'boolean',
|
|
73
|
+
table: {
|
|
74
|
+
category: ''
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
items: {
|
|
78
|
+
description: '',
|
|
79
|
+
control: 'array',
|
|
80
|
+
table: {
|
|
81
|
+
category: ''
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
args: {
|
|
86
|
+
isHorizontal: true,
|
|
87
|
+
reverse: false,
|
|
88
|
+
items: timelineItems(),
|
|
89
|
+
textCenter: true,
|
|
90
|
+
useImages: true,
|
|
91
|
+
horizontalComponentClasses: 'w-96 h-96',
|
|
92
|
+
isSm: true
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const Template: ComponentStory<typeof Timeline> = (args) => <Timeline {...args} />
|
|
97
|
+
|
|
98
|
+
export const _Timeline = Template.bind({})
|
|
99
|
+
|
|
100
|
+
export default componentMeta
|