trepur_components 0.4.8 → 1.0.1
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/src/lib/components/Accordion/Accordion.stories.d.ts +6 -0
- package/dist/src/lib/components/Accordion/Accordion.stories.js +80 -0
- package/dist/src/lib/components/Accordion/Accordion.stories.js.map +1 -0
- package/dist/src/lib/components/Accordion/index.d.ts +8 -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 +64 -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 +20 -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 +57 -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 +132 -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 +8 -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 +66 -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 +59 -0
- package/dist/src/lib/components/Carousel/index.js +122 -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 +66 -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 +64 -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 +17 -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/HamburgerIcon/HamburgerIcon.stories.d.ts +6 -0
- package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js +46 -0
- package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js.map +1 -0
- package/dist/src/lib/components/HamburgerIcon/index.d.ts +7 -0
- package/dist/src/lib/components/HamburgerIcon/index.js +26 -0
- package/dist/src/lib/components/HamburgerIcon/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 +87 -0
- package/dist/src/lib/components/Icon/Icon.stories.js.map +1 -0
- package/dist/src/lib/components/Icon/index.d.ts +19 -0
- package/dist/src/lib/components/Icon/index.js +56 -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 +9 -0
- package/dist/src/lib/components/ImageLink/ImageLink.stories.js +50 -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 +27 -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 +73 -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 +45 -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.d.ts +6 -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 +65 -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 +36 -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 +65 -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 +104 -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 +19 -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 +87 -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 +208 -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 +16 -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 +12 -0
- package/dist/src/lib/typography/Fonts.stories.js.map +1 -0
- package/dist/src/lib/typography/index.d.ts +6 -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 +3 -0
- package/dist/src/lib/utils/theme.js +28 -0
- package/dist/src/lib/utils/theme.js.map +1 -0
- package/dist/tailwind.config.d.ts +65 -0
- package/dist/tailwind.config.js +81 -0
- package/dist/tailwind.config.js.map +1 -0
- package/package.json +19 -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 +0 -133
- package/dist/components/Timeline/index.css.map +0 -1
- package/dist/components/Timeline/index.js +0 -254
- package/dist/components/Tubestops/index.css +0 -92
- 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
- package/dist/fonts/Sora/OFL.txt +0 -93
- package/dist/fonts/Sora/README.txt +0 -70
- package/dist/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-Bold.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-Light.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-Medium.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-Regular.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
- package/dist/fonts/Sora/static/Sora-Thin.ttf +0 -0
- package/dist/index.js +0 -311
- package/dist/styles/base.css +0 -73
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props as iconProps } from '../Icon';
|
|
3
|
+
export interface Props {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
onChange?: (val: string | number) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
leftIconProps?: iconProps;
|
|
10
|
+
rightIconProps?: iconProps;
|
|
11
|
+
}
|
|
12
|
+
declare const Search: ({ id, className, onChange, placeholder, text, leftIconProps, rightIconProps }: Props) => JSX.Element;
|
|
13
|
+
export default Search;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Icon from '../Icon';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
const Search = ({ id, className, onChange, placeholder, text, leftIconProps, rightIconProps }) => {
|
|
5
|
+
const classList = classNames(className, 'flex');
|
|
6
|
+
const inputClasses = classNames({
|
|
7
|
+
'pl-9': leftIconProps !== undefined,
|
|
8
|
+
'pl-2': leftIconProps === undefined
|
|
9
|
+
}, 'w-full border-2 rounded-md py-2 pr-9');
|
|
10
|
+
const onChangeFunc = (onChange != null) ? (e) => onChange(e.target.value) : undefined;
|
|
11
|
+
return (React.createElement("div", { id: id, className: classList },
|
|
12
|
+
React.createElement("div", null, text !== undefined &&
|
|
13
|
+
React.createElement("h2", { className: 'font-base-lg py-2 pr-4' }, text)),
|
|
14
|
+
React.createElement("div", null,
|
|
15
|
+
React.createElement("div", { className: 'relative w-full flex' },
|
|
16
|
+
(leftIconProps != null) &&
|
|
17
|
+
React.createElement(Icon, Object.assign({}, leftIconProps)),
|
|
18
|
+
React.createElement("input", { className: inputClasses, onChange: onChangeFunc, placeholder: placeholder, type: 'text', name: 'search' }),
|
|
19
|
+
(rightIconProps != null) &&
|
|
20
|
+
React.createElement(Icon, Object.assign({}, rightIconProps))))));
|
|
21
|
+
};
|
|
22
|
+
export default Search;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Search/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,IAA4B,MAAM,kBAAkB,CAAA;AAC3D,OAAO,UAAU,MAAM,YAAY,CAAA;AAYnC,MAAM,MAAM,GAAG,CAAC,EACd,EAAE,EACF,SAAS,EACT,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,aAAa,EACb,cAAc,EACR,EAAe,EAAE;IACvB,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IAE/C,MAAM,YAAY,GAAG,UAAU,CAAC;QAC9B,MAAM,EAAE,aAAa,KAAK,SAAS;QACnC,MAAM,EAAE,aAAa,KAAK,SAAS;KACpC,EAAE,sCAAsC,CAAC,CAAA;IAE1C,MAAM,YAAY,GAAqD,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAE5I,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS;QAC/B,iCACG,IAAI,KAAK,SAAS;YACjB,4BAAI,SAAS,EAAC,wBAAwB,IAAE,IAAI,CAAM,CAChD;QACN;YACE,6BAAK,SAAS,EAAC,sBAAsB;gBAClC,CAAC,aAAa,IAAI,IAAI,CAAC;oBACtB,oBAAC,IAAI,oBAAK,aAAa,EAAI;gBAC7B,+BACE,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,GACb;gBACD,CAAC,cAAc,IAAI,IAAI,CAAC;oBACvB,oBAAC,IAAI,oBAAK,cAAc,EAAI,CAC1B,CACF,CACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import SocialBlock from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof SocialBlock>;
|
|
5
|
+
export declare const _SocialBlock: ComponentStory<({ id, className, title, text, withLiveUpdates, onSave, saveButtonProps, cancelButtonProps, editTitleClasses, editTextClasses, editInputClasses, buttonWrapperClasses, textWrapperClasses, socialButtons, theme }: import("./index").Props) => JSX.Element>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SocialBlock from './index';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import Icon from '../Icon';
|
|
5
|
+
import Button from '../Button';
|
|
6
|
+
const socialButtons = [
|
|
7
|
+
React.createElement(Button, { key: 'btn_1', className: 'mx-2 w-16 py-4 border border-1', href: 'https://www.facebook.com/rupert.bennett', type: 'social' },
|
|
8
|
+
React.createElement(Icon, { type: 'facebook-f', brand: true, size: 2, className: 'mx-auto', colour: 'white', bgColour: 'primary' })),
|
|
9
|
+
React.createElement(Button, { key: 'btn_2', className: 'mx-2 w-16 py-4 border border-1', href: 'https://www.linkedin.com/in/rupert-bennett', type: 'social' },
|
|
10
|
+
React.createElement(Icon, { brand: true, type: 'linkedin-in', size: 2, className: 'mx-auto', colour: 'white', bgColour: 'primary' })),
|
|
11
|
+
React.createElement(Button, { key: 'btn_3', className: 'mx-2 w-16 py-4 border border-1', href: 'https://github.com/irupertbennett', type: 'social' },
|
|
12
|
+
React.createElement(Icon, { brand: true, type: 'github', size: 2, className: 'mx-auto', colour: 'white', bgColour: 'primary' })),
|
|
13
|
+
React.createElement(Button, { key: 'btn_4', className: 'mx-2 w-16 py-4 border border-1', href: 'mailto:irupertbennett@gmail.com?subject=rupertbennett.com-&body=Referred from rupertbennett.com', type: 'social' },
|
|
14
|
+
React.createElement(Icon, { type: 'envelope', size: 2, className: 'mx-auto', colour: 'white', bgColour: 'primary' }))
|
|
15
|
+
];
|
|
16
|
+
const componentMeta = {
|
|
17
|
+
title: 'Trepur Components/Rupert Bennett/Organisms/Social Block',
|
|
18
|
+
component: SocialBlock,
|
|
19
|
+
parameters: {},
|
|
20
|
+
argTypes: {
|
|
21
|
+
withLiveUpdates: {
|
|
22
|
+
description: '',
|
|
23
|
+
control: 'boolean',
|
|
24
|
+
table: { category: '' }
|
|
25
|
+
},
|
|
26
|
+
onSave: {
|
|
27
|
+
type: { name: 'function', required: false },
|
|
28
|
+
description: 'Fires a function when you click save',
|
|
29
|
+
action: 'onClick',
|
|
30
|
+
table: {
|
|
31
|
+
type: { summary: 'function' },
|
|
32
|
+
defaultValue: { summary: 'undefined' }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
theme: {
|
|
36
|
+
type: { name: 'string', required: false },
|
|
37
|
+
options: ['dark', 'light'],
|
|
38
|
+
description: 'The variant of button to render',
|
|
39
|
+
table: { type: { summary: 'dark' }, defaultValue: { summary: 'dark' } },
|
|
40
|
+
defaultValue: 'dark',
|
|
41
|
+
control: { type: 'radio' }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
title: 'Why not connect with me on LinkedIn or Facebook?',
|
|
46
|
+
text: 'Or send me a E-Mail to get in touch',
|
|
47
|
+
editTitleClasses: 'text-md sm:text-lg ',
|
|
48
|
+
editTextClasses: '',
|
|
49
|
+
editInputClasses: 'mt-4 border border-black text-black bg-white',
|
|
50
|
+
onSave: action('button-save'),
|
|
51
|
+
withLiveUpdates: true,
|
|
52
|
+
socialButtons
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const Template = (args) => React.createElement(SocialBlock, Object.assign({}, args));
|
|
56
|
+
export const _SocialBlock = Template.bind({});
|
|
57
|
+
export default componentMeta;
|
|
58
|
+
//# sourceMappingURL=SocialBlock.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialBlock.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/SocialBlock/SocialBlock.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,WAAW,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,IAAI,MAAM,kBAAkB,CAAA;AACnC,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAGvC,MAAM,aAAa,GAAG;IACpB,oBAAC,MAAM,IACL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
|
|
2
|
+
import { Props as buttonProps } from '../Button';
|
|
3
|
+
export interface Props {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
withLiveUpdates?: boolean;
|
|
9
|
+
onSave?: (arr: any[], id: string | undefined) => void;
|
|
10
|
+
saveButtonProps?: buttonProps;
|
|
11
|
+
cancelButtonProps?: buttonProps;
|
|
12
|
+
editTitleClasses?: string;
|
|
13
|
+
editTextClasses?: string;
|
|
14
|
+
editInputClasses?: string;
|
|
15
|
+
buttonWrapperClasses?: string;
|
|
16
|
+
textWrapperClasses?: string;
|
|
17
|
+
socialButtons?: buttonProps[];
|
|
18
|
+
theme: 'light' | 'dark';
|
|
19
|
+
}
|
|
20
|
+
declare const SocialBlock: ({ id, className, title, text, withLiveUpdates, onSave, saveButtonProps, cancelButtonProps, editTitleClasses, editTextClasses, editInputClasses, buttonWrapperClasses, textWrapperClasses, socialButtons, theme }: Props) => JSX.Element;
|
|
21
|
+
export default SocialBlock;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import Input from '../Input';
|
|
3
|
+
import Button from '../Button';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
const SocialBlock = ({ id, className, title, text, withLiveUpdates, onSave, saveButtonProps, cancelButtonProps, editTitleClasses, editTextClasses, editInputClasses, buttonWrapperClasses, textWrapperClasses, socialButtons, theme = 'light' }) => {
|
|
6
|
+
const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary';
|
|
7
|
+
const defaultComponentData = {
|
|
8
|
+
title: {
|
|
9
|
+
text: title
|
|
10
|
+
},
|
|
11
|
+
text: {
|
|
12
|
+
text
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const [isInEditingMode, setIsInEditingMode] = useState(false);
|
|
16
|
+
const [isHovering, setIsHovering] = useState(false);
|
|
17
|
+
const [componentData, setComponentData] = useState(defaultComponentData);
|
|
18
|
+
const hoverClasses = 'border-dashed border';
|
|
19
|
+
const classList = classNames(className, colours);
|
|
20
|
+
const buttnoWrapperClasslist = classNames(buttonWrapperClasses, 'py-4');
|
|
21
|
+
const hoverClassList = classNames({
|
|
22
|
+
[hoverClasses]: withLiveUpdates !== undefined && !isInEditingMode && isHovering
|
|
23
|
+
}, textWrapperClasses);
|
|
24
|
+
const toggleEditState = () => {
|
|
25
|
+
withLiveUpdates === true && setIsInEditingMode(!isInEditingMode);
|
|
26
|
+
};
|
|
27
|
+
const handleButtonSave = () => {
|
|
28
|
+
const arr = [];
|
|
29
|
+
arr.push({ key: 'title', value: componentData.title.text });
|
|
30
|
+
arr.push({ key: 'text', value: componentData.text.text });
|
|
31
|
+
toggleEditState();
|
|
32
|
+
onSave === null || onSave === void 0 ? void 0 : onSave(arr, id);
|
|
33
|
+
setIsHovering(false);
|
|
34
|
+
};
|
|
35
|
+
const handleButtonCancel = () => {
|
|
36
|
+
toggleEditState();
|
|
37
|
+
setIsHovering(false);
|
|
38
|
+
};
|
|
39
|
+
const handleChange = (e) => {
|
|
40
|
+
let id = e.target.id;
|
|
41
|
+
id = id.split('-')[id.split('-').length - 1];
|
|
42
|
+
setComponentData(Object.assign(Object.assign({}, componentData), { [id]: {
|
|
43
|
+
text: e.target.value
|
|
44
|
+
} }));
|
|
45
|
+
};
|
|
46
|
+
const toggleHoverState = () => {
|
|
47
|
+
withLiveUpdates === true && setIsHovering(!isHovering);
|
|
48
|
+
};
|
|
49
|
+
return (React.createElement("div", { id: id, className: classList }, withLiveUpdates === true && isInEditingMode
|
|
50
|
+
? (React.createElement("div", { className: colours },
|
|
51
|
+
React.createElement(Input, { id: 'title', className: editTitleClasses, inputClasses: editInputClasses, autoFocus: true, value: componentData.title.text, onChange: (e) => handleChange(e), type: 'text', theme: theme }),
|
|
52
|
+
React.createElement(Input, { id: 'text', className: editTextClasses, inputClasses: editInputClasses, value: componentData.text.text, onChange: (e) => handleChange(e), type: 'text', theme: theme }),
|
|
53
|
+
React.createElement(Button, { className: 'mt-4', onClick: handleButtonSave }, "Save"),
|
|
54
|
+
React.createElement(Button, { className: 'mt-4 ml-4', onClick: handleButtonCancel }, "Cancel")))
|
|
55
|
+
: (React.createElement(React.Fragment, null,
|
|
56
|
+
React.createElement("div", { onMouseOver: () => toggleHoverState(), onMouseOut: () => toggleHoverState(), onClick: toggleEditState, className: hoverClassList },
|
|
57
|
+
React.createElement("h2", { className: 'text-md sm:text-lg' }, componentData.title.text),
|
|
58
|
+
React.createElement("p", { className: 'pt-4' }, componentData.text.text)),
|
|
59
|
+
React.createElement("div", { className: buttnoWrapperClasslist },
|
|
60
|
+
React.createElement("div", { className: 'flex flex-wrap w-full justify-center' }, socialButtons === null || socialButtons === void 0 ? void 0 : socialButtons.map((button, i) => {
|
|
61
|
+
return React.createElement("div", { key: `social_btn_${i + 1}` }, button);
|
|
62
|
+
})))))));
|
|
63
|
+
};
|
|
64
|
+
export default SocialBlock;
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/SocialBlock/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,MAAM,mBAAmB,CAAA;AACrC,OAAO,MAAgC,MAAM,oBAAoB,CAAA;AACjE,OAAO,UAAU,MAAM,YAAY,CAAA;AAoBnC,MAAM,WAAW,GAAG,CAAC,EACnB,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,EACJ,eAAe,EACf,MAAM,EACN,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,KAAK,GAAG,OAAO,EACT,EAAe,EAAE;IACvB,MAAM,OAAO,GAAG,KAAK,KAAK,MAAM,CAAC,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EAAE,gBAAgB,EAC9B,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,EAC9B,QAAQ,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EACrC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,GACZ;YACF,oBAAC,MAAM,IACL,SAAS,EAAC,MAAM,EAChB,OAAO,EAAE,gBAAgB,WAGlB;YACT,oBAAC,MAAM,IACL,SAAS,EAAC,WAAW,EACrB,OAAO,EAAE,kBAAkB,aAGpB,CACL,CACL;QACH,CAAC,CAAC,CACA;YACE,6BACE,WAAW,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,EACrC,UAAU,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,EACpC,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,cAAc;gBAEzB,4BAAI,SAAS,EAAC,oBAAoB,IAAE,aAAa,CAAC,KAAK,CAAC,IAAI,CAAM;gBAClE,2BAAG,SAAS,EAAC,MAAM,IAAE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAK,CAC7C;YACN,6BAAK,SAAS,EAAE,sBAAsB;gBACpC,6BAAK,SAAS,EAAC,sCAAsC,IAClD,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,GAAG,CAAC,CAAC,MAAM,EAAE,CAAS,EAAE,EAAE;oBACxC,OAAO,6BAAK,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,IAAG,MAAM,CAAO,CAAA;gBACxD,CAAC,CAAC,CACE,CACF,CACL,CACF,CACD,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import StarRating from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof StarRating>;
|
|
5
|
+
export declare const _StarRating: ComponentStory<({ id, className, stars, size }: import("./index").Props) => JSX.Element>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import StarRating from './index';
|
|
3
|
+
import { idAndClassName } from '../../utils/controls';
|
|
4
|
+
const componentMeta = {
|
|
5
|
+
title: 'Trepur Components/Other/Atoms/Star Rating',
|
|
6
|
+
component: StarRating,
|
|
7
|
+
parameters: {},
|
|
8
|
+
argTypes: Object.assign({}, idAndClassName),
|
|
9
|
+
args: {
|
|
10
|
+
stars: 3,
|
|
11
|
+
size: 2
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const Template = (args) => React.createElement(StarRating, Object.assign({}, args));
|
|
15
|
+
export const _StarRating = Template.bind({});
|
|
16
|
+
export default componentMeta;
|
|
17
|
+
//# sourceMappingURL=StarRating.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarRating.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/StarRating/StarRating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGhD,MAAM,aAAa,GAAqC;IACtD,KAAK,EAAE,2CAA2C;IAClD,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,EAAE;IACd,QAAQ,oBACH,cAAc,CAClB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;KACR;CACF,CAAA;AAED,MAAM,QAAQ,GAAsC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,UAAU,oBAAK,IAAI,EAAI,CAAA;AAEtF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE5C,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Icon from '../Icon';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
const StarRating = ({ id, className, stars = 1, size = 1 }) => {
|
|
5
|
+
const classList = classNames({}, `${className} flex`);
|
|
6
|
+
const getStars = () => {
|
|
7
|
+
const starsArr = [];
|
|
8
|
+
for (let i = 0; i < stars; i++) {
|
|
9
|
+
starsArr.push(React.createElement(Icon, { key: `checked_star_${i + 0}`, id: `checked-${i}`, className: 'checked', type: 'star', size: size, colour: 'gold', bgColour: 'white' }));
|
|
10
|
+
}
|
|
11
|
+
return starsArr;
|
|
12
|
+
};
|
|
13
|
+
const getStarsChecked = () => {
|
|
14
|
+
const starsArr = [];
|
|
15
|
+
for (let i = 0; i < 5 - stars; i++) {
|
|
16
|
+
starsArr.push(React.createElement(Icon, { key: `unchecked_star_${i + 0}`, id: `unchecked-${i}`, className: 'unchecked opacity-30 gold', type: 'star', size: size, colour: 'gold', bgColour: 'white' }));
|
|
17
|
+
}
|
|
18
|
+
return starsArr;
|
|
19
|
+
};
|
|
20
|
+
const getAllStars = () => {
|
|
21
|
+
const starArray = [...getStars(), ...getStarsChecked()];
|
|
22
|
+
return starArray;
|
|
23
|
+
};
|
|
24
|
+
return (React.createElement("div", { id: id, className: classList }, getAllStars()));
|
|
25
|
+
};
|
|
26
|
+
export default StarRating;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/StarRating/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,IAAI,MAAM,kBAAkB,CAAA;AACnC,OAAO,UAAU,MAAM,YAAY,CAAA;AAQnC,MAAM,UAAU,GAAG,CAAC,EAClB,EAAE,EACF,SAAS,EACT,KAAK,GAAG,CAAC,EACT,IAAI,GAAG,CAAC,EACF,EAAe,EAAE;IACvB,MAAM,SAAS,GAAG,UAAU,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S,IAEnB,WAAW,EAAE,CACV,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import Testimonial from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof Testimonial>;
|
|
5
|
+
export declare const _Testimonial: ComponentStory<({ id, className, text, imageProps, companyName, position, date, positionStartDate, positionEndDate, authorsName, authorsPosition }: import("./index").Props) => JSX.Element>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { idAndClassName } from '../../utils/controls';
|
|
3
|
+
import Testimonial from './index';
|
|
4
|
+
const componentMeta = {
|
|
5
|
+
title: 'Trepur Components/Rupert Bennett/Organisms/Testimonial',
|
|
6
|
+
component: Testimonial,
|
|
7
|
+
parameters: {},
|
|
8
|
+
argTypes: Object.assign(Object.assign({}, idAndClassName), { text: {
|
|
9
|
+
description: 'The description to display on the component',
|
|
10
|
+
control: 'text',
|
|
11
|
+
table: {
|
|
12
|
+
type: { summary: 'default' }
|
|
13
|
+
},
|
|
14
|
+
defaultValue: { summary: 'undefined' }
|
|
15
|
+
}, companyName: {
|
|
16
|
+
description: 'The company name to display on the component',
|
|
17
|
+
control: 'text',
|
|
18
|
+
table: {
|
|
19
|
+
type: { summary: 'default' }
|
|
20
|
+
},
|
|
21
|
+
defaultValue: { summary: 'undefined' }
|
|
22
|
+
}, positionStartDate: {
|
|
23
|
+
description: 'The start date to display on the component',
|
|
24
|
+
control: 'text',
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: 'default' }
|
|
27
|
+
},
|
|
28
|
+
defaultValue: { summary: 'undefined' }
|
|
29
|
+
}, positionEndDate: {
|
|
30
|
+
description: 'The end date to display on the component',
|
|
31
|
+
control: 'text',
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: 'default' }
|
|
34
|
+
},
|
|
35
|
+
defaultValue: { summary: 'undefined' }
|
|
36
|
+
}, position: {
|
|
37
|
+
description: 'The position to display on the component',
|
|
38
|
+
control: 'text',
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: 'default' }
|
|
41
|
+
},
|
|
42
|
+
defaultValue: { summary: 'undefined' }
|
|
43
|
+
}, date: {
|
|
44
|
+
description: 'The date of the testimonial to display on the component',
|
|
45
|
+
control: 'text',
|
|
46
|
+
table: {
|
|
47
|
+
type: { summary: 'default' }
|
|
48
|
+
},
|
|
49
|
+
defaultValue: { summary: 'undefined' }
|
|
50
|
+
}, authorsName: {
|
|
51
|
+
description: 'The authors name to display on the component',
|
|
52
|
+
control: 'text',
|
|
53
|
+
table: {
|
|
54
|
+
type: { summary: 'default' }
|
|
55
|
+
},
|
|
56
|
+
defaultValue: { summary: 'undefined' }
|
|
57
|
+
}, authorsPosition: {
|
|
58
|
+
description: 'The authors position to display on the component',
|
|
59
|
+
control: 'text',
|
|
60
|
+
table: {
|
|
61
|
+
type: { summary: 'default' }
|
|
62
|
+
},
|
|
63
|
+
defaultValue: { summary: 'undefined' }
|
|
64
|
+
}, imageProps: {
|
|
65
|
+
type: { name: 'other', value: 'object' },
|
|
66
|
+
description: 'The props to pass to the image to display on the component',
|
|
67
|
+
table: {
|
|
68
|
+
type: {
|
|
69
|
+
summary: 'object'
|
|
70
|
+
},
|
|
71
|
+
defaultValue: { summary: 'undefined' }
|
|
72
|
+
}
|
|
73
|
+
} }),
|
|
74
|
+
args: {
|
|
75
|
+
imageProps: {
|
|
76
|
+
image: 'https://picsum.photos/100/100',
|
|
77
|
+
height: 8,
|
|
78
|
+
width: 8,
|
|
79
|
+
roundedFull: true,
|
|
80
|
+
centerAligned: true
|
|
81
|
+
},
|
|
82
|
+
authorsName: 'Authors Name',
|
|
83
|
+
authorsPosition: 'Authors Position',
|
|
84
|
+
position: 'Position',
|
|
85
|
+
positionEndDate: 'End Date',
|
|
86
|
+
positionStartDate: 'Start Date',
|
|
87
|
+
date: 'Date',
|
|
88
|
+
companyName: 'Company Name',
|
|
89
|
+
text: 'This is some text'
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const Template = (args) => React.createElement(Testimonial, Object.assign({}, args));
|
|
93
|
+
export const _Testimonial = Template.bind({});
|
|
94
|
+
export default componentMeta;
|
|
95
|
+
//# sourceMappingURL=Testimonial.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Testimonial.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Testimonial/Testimonial.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,WAAW,MAAM,SAAS,CAAA;AAGjC,MAAM,aAAa,GAAsC;IACvD,KAAK,EAAE,wDAAwD;IAC/D,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,EAAE;IACd,QAAQ,kCACH,cAAc,KACjB,IAAI,EAAE;YACJ,WAAW,EAAE,6CAA6C;YAC1D,OAAO,EAAE,MAAM;YACf,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aAC7B;YACD,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SACvC,EACD,WAAW,EAAE;YACX,WAAW,EAAE,8CAA8C;YAC3D,OAAO,EAAE,MAAM;YACf,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aAC7B;YACD,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SACvC,EACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE,MAAM;YACf,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aAC7B;YACD,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SACvC,EACD,e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,EAAE;YACV,KAAK,EAAE,+BAA+B;YACtC,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,cAAc;QAC3B,eAAe,EAAE,kBAAkB;QACnC,QAAQ,EAAE,UAAU;QACpB,eAAe,EAAE,UAAU;QAC3B,iBAAiB,EAAE,YAAY;QAC/B,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,mBAAmB;KAC1B;CACF,CAAA;AAED,MAAM,QAAQ,GAAuC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,WAAW,oBAAK,IAAI,EAAI,CAAA;AAExF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE7C,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props as imageProps } from '../Image';
|
|
3
|
+
export interface Props {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
imageProps?: imageProps;
|
|
8
|
+
companyName?: string;
|
|
9
|
+
position?: string;
|
|
10
|
+
date?: string;
|
|
11
|
+
positionStartDate?: string;
|
|
12
|
+
positionEndDate?: string;
|
|
13
|
+
authorsName?: string;
|
|
14
|
+
authorsPosition?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const Testimonial: ({ id, className, text, imageProps, companyName, position, date, positionStartDate, positionEndDate, authorsName, authorsPosition }: Props) => JSX.Element;
|
|
17
|
+
export default Testimonial;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import Image from '../Image';
|
|
4
|
+
const Testimonial = ({ id, className, text, imageProps, companyName, position, date, positionStartDate, positionEndDate, authorsName, authorsPosition }) => {
|
|
5
|
+
const classList = classNames(className, 'text-center');
|
|
6
|
+
return (React.createElement("div", { id: id, className: classList },
|
|
7
|
+
React.createElement("div", { className: 'mx-auto' },
|
|
8
|
+
React.createElement(Image, Object.assign({}, imageProps))),
|
|
9
|
+
React.createElement("div", null,
|
|
10
|
+
React.createElement("h2", { className: 'text-md md:text-md' },
|
|
11
|
+
companyName,
|
|
12
|
+
" "),
|
|
13
|
+
React.createElement("p", { className: 'text-md md:text-sm' }, position),
|
|
14
|
+
React.createElement("p", null,
|
|
15
|
+
positionStartDate,
|
|
16
|
+
" - ",
|
|
17
|
+
positionEndDate),
|
|
18
|
+
React.createElement("p", null, text),
|
|
19
|
+
React.createElement("p", null,
|
|
20
|
+
authorsName,
|
|
21
|
+
" - ",
|
|
22
|
+
authorsPosition,
|
|
23
|
+
": ",
|
|
24
|
+
date))));
|
|
25
|
+
};
|
|
26
|
+
export default Testimonial;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Testimonial/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAA8B,MAAM,mBAAmB,CAAA;AAgB9D,MAAM,WAAW,GAAG,CAAC,EACnB,EAAE,EACF,SAAS,EACT,IAAI,EACJ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,eAAe,EACT,EAAe,EAAE;IACvB,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;IAEtD,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS;QAC/B,6BAAK,SAAS,EAAC,SAAS;YACtB,oBAAC,KAAK,oBAAK,UAAU,EAAI,CACrB;QACN;YACE,4BAAI,SAAS,EAAC,oBAAoB;gBAAE,WAAW;oBAAO;YACtD,2BAAG,SAAS,EAAC,oBAAoB,IAAE,QAAQ,CAAK;YAChD;gBAAI,iBAAiB;;gBAAK,eAAe,CAAK;YAC9C,+BAAI,IAAI,CAAK;YACb;gBAAI,WAAW;;gBAAK,eAAe;;gBAAI,IAAI,CAAK,CAC5C,CACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TextAndTitle from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof TextAndTitle>;
|
|
5
|
+
export declare const _TextAndTitle: ComponentStory<React.FC<import("./index").Props>>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TextAndTitle from './index';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import Greeting from '../Greeting';
|
|
5
|
+
const componentMeta = {
|
|
6
|
+
title: 'Trepur Components/Rupert Bennett/Organisms/Text And Title',
|
|
7
|
+
component: TextAndTitle,
|
|
8
|
+
argTypes: {
|
|
9
|
+
id: {
|
|
10
|
+
description: 'Defines the id of the component',
|
|
11
|
+
table: {
|
|
12
|
+
category: '',
|
|
13
|
+
type: { summary: 'string' },
|
|
14
|
+
defaultValue: { summary: 'undefined' }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
className: {
|
|
18
|
+
description: 'Defines any additional classes for the components',
|
|
19
|
+
table: {
|
|
20
|
+
category: '',
|
|
21
|
+
type: { summary: 'string' },
|
|
22
|
+
defaultValue: { summary: 'undefined' }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
onSave: {
|
|
26
|
+
type: { name: 'function', required: false },
|
|
27
|
+
description: 'Fires a function when you click save',
|
|
28
|
+
action: 'onClick',
|
|
29
|
+
table: {
|
|
30
|
+
type: {
|
|
31
|
+
summary: 'function'
|
|
32
|
+
},
|
|
33
|
+
defaultValue: { summary: 'undefined' }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
args: {
|
|
38
|
+
children: React.createElement("p", null, "This is a child"),
|
|
39
|
+
editTitleClasses: 'text-md sm:text-lg ',
|
|
40
|
+
editTextClasses: 'break-words',
|
|
41
|
+
editInputClasses: 'border border-black text-black bg-white',
|
|
42
|
+
textLineOne: React.createElement("div", null,
|
|
43
|
+
React.createElement(Greeting, null),
|
|
44
|
+
React.createElement("p", null, "Loremipsumdolorsitamet consectetur adipisicing elit")),
|
|
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
|
+
const Template = (args) => React.createElement(TextAndTitle, Object.assign({}, args));
|
|
61
|
+
export const _TextAndTitle = Template.bind({});
|
|
62
|
+
export default componentMeta;
|
|
63
|
+
//# sourceMappingURL=TextAndTitle.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAndTitle.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/TextAndTitle/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,CAAC,aAAa,CAAC;QAC7B,eAAe,EAAE,IAAI;QACrB,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE;YACf,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,MAAM;SACjB;QACD,iBAAiB,EAAE;YACjB,SAAS,EAAE,WAAW;YACtB,QAAQ,EAAE,QAAQ;SACnB;KACF;CACF,CAAA;AAED,MAAM,QAAQ,GAAwC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,YAAY,oBAAK,IAAI,EAAI,CAAA;AAE1F,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE9C,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Props as buttonProps } from '../Button';
|
|
3
|
+
export interface Props {
|
|
4
|
+
id: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
titleClasses?: string;
|
|
7
|
+
editTitleClasses?: string;
|
|
8
|
+
editTextClasses?: string;
|
|
9
|
+
editInputClasses?: string;
|
|
10
|
+
textClasses?: string;
|
|
11
|
+
textLineOne?: string | object;
|
|
12
|
+
textLineTwo?: string | object;
|
|
13
|
+
textLineThree?: string | object;
|
|
14
|
+
title?: string;
|
|
15
|
+
titleBold?: boolean;
|
|
16
|
+
textCenter?: boolean;
|
|
17
|
+
titleCenter?: boolean;
|
|
18
|
+
withLiveUpdates?: boolean;
|
|
19
|
+
onSave?: (arr: any[], id: string | undefined) => void;
|
|
20
|
+
saveButtonProps?: buttonProps;
|
|
21
|
+
cancelButtonProps?: buttonProps;
|
|
22
|
+
isHorizontal?: boolean;
|
|
23
|
+
children?: any;
|
|
24
|
+
}
|
|
25
|
+
declare const TextAndTitle: React.FC<Props>;
|
|
26
|
+
export default TextAndTitle;
|