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,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Accordion from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof Accordion>;
|
|
5
|
+
export declare const _Accordion: ComponentStory<React.FC<import("./index").Props>>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Accordion from './index';
|
|
3
|
+
import { idAndClassName } from '../../utils/controls';
|
|
4
|
+
const items = [
|
|
5
|
+
{
|
|
6
|
+
title: 'This is a title',
|
|
7
|
+
boldTitle: true,
|
|
8
|
+
iconProps: {
|
|
9
|
+
type: 'heart',
|
|
10
|
+
hollow: true,
|
|
11
|
+
colour: 'white',
|
|
12
|
+
bgColour: 'primary'
|
|
13
|
+
},
|
|
14
|
+
children: React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper in neque in venenatis. Mauris scelerisque orci magna, et ultricies nulla lobortis ac. Aliquam vitae faucibus nisl. Nunc in tellus libero. Donec ut augue consequat, convallis risus in, pulvinar nibh. Duis mi nibh, posuere molestie pharetra cursus, viverra ut dolor. Vivamus eget arcu dui. Donec ullamcorper ornare justo sed feugiat. Curabitur aliquam lectus sed quam pharetra scelerisque. Integer vitae eleifend dolor. Duis luctus metus ipsum, et commodo magna bibendum quis. Quisque gravida leo sodales quam feugiat, id vulputate arcu pulvinar. Duis dictum gravida risus, et bibendum nunc condimentum eu.")
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: 'This is a title',
|
|
18
|
+
subtitle: 'This is a subtitle',
|
|
19
|
+
boldTitle: true,
|
|
20
|
+
iconProps: {
|
|
21
|
+
type: 'heart',
|
|
22
|
+
colour: 'white',
|
|
23
|
+
bgColour: 'primary'
|
|
24
|
+
},
|
|
25
|
+
children: React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper in neque in venenatis. Mauris scelerisque orci magna, et ultricies nulla lobortis ac. Aliquam vitae faucibus nisl. Nunc in tellus libero. Donec ut augue consequat, convallis risus in, pulvinar nibh. Duis mi nibh, posuere molestie pharetra cursus, viverra ut dolor. Vivamus eget arcu dui. Donec ullamcorper ornare justo sed feugiat. Curabitur aliquam lectus sed quam pharetra scelerisque. Integer vitae eleifend dolor. Duis luctus metus ipsum, et commodo magna bibendum quis. Quisque gravida leo sodales quam feugiat, id vulputate arcu pulvinar. Duis dictum gravida risus, et bibendum nunc condimentum eu.")
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: 'This is a title',
|
|
29
|
+
subtitle: 'This is a subtitle',
|
|
30
|
+
boldTitle: true,
|
|
31
|
+
iconProps: {
|
|
32
|
+
type: 'heart',
|
|
33
|
+
size: 2,
|
|
34
|
+
hollow: true,
|
|
35
|
+
colour: 'white',
|
|
36
|
+
bgColour: 'primary'
|
|
37
|
+
},
|
|
38
|
+
children: React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper in neque in venenatis. Mauris scelerisque orci magna, et ultricies nulla lobortis ac. Aliquam vitae faucibus nisl. Nunc in tellus libero. Donec ut augue consequat, convallis risus in, pulvinar nibh. Duis mi nibh, posuere molestie pharetra cursus, viverra ut dolor. Vivamus eget arcu dui. Donec ullamcorper ornare justo sed feugiat. Curabitur aliquam lectus sed quam pharetra scelerisque. Integer vitae eleifend dolor. Duis luctus metus ipsum, et commodo magna bibendum quis. Quisque gravida leo sodales quam feugiat, id vulputate arcu pulvinar. Duis dictum gravida risus, et bibendum nunc condimentum eu.")
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: 'This is a title',
|
|
42
|
+
subtitle: 'This is a subtitle',
|
|
43
|
+
boldTitle: true,
|
|
44
|
+
children: React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper in neque in venenatis. Mauris scelerisque orci magna, et ultricies nulla lobortis ac. Aliquam vitae faucibus nisl. Nunc in tellus libero. Donec ut augue consequat, convallis risus in, pulvinar nibh. Duis mi nibh, posuere molestie pharetra cursus, viverra ut dolor. Vivamus eget arcu dui. Donec ullamcorper ornare justo sed feugiat. Curabitur aliquam lectus sed quam pharetra scelerisque. Integer vitae eleifend dolor. Duis luctus metus ipsum, et commodo magna bibendum quis. Quisque gravida leo sodales quam feugiat, id vulputate arcu pulvinar. Duis dictum gravida risus, et bibendum nunc condimentum eu.")
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
boldTitle: true,
|
|
48
|
+
iconProps: {
|
|
49
|
+
type: 'heart',
|
|
50
|
+
colour: 'white',
|
|
51
|
+
bgColour: 'primary'
|
|
52
|
+
},
|
|
53
|
+
children: React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper in neque in venenatis. Mauris scelerisque orci magna, et ultricies nulla lobortis ac. Aliquam vitae faucibus nisl. Nunc in tellus libero. Donec ut augue consequat, convallis risus in, pulvinar nibh. Duis mi nibh, posuere molestie pharetra cursus, viverra ut dolor. Vivamus eget arcu dui. Donec ullamcorper ornare justo sed feugiat. Curabitur aliquam lectus sed quam pharetra scelerisque. Integer vitae eleifend dolor. Duis luctus metus ipsum, et commodo magna bibendum quis. Quisque gravida leo sodales quam feugiat, id vulputate arcu pulvinar. Duis dictum gravida risus, et bibendum nunc condimentum eu.")
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: 'This is title 6',
|
|
57
|
+
boldTitle: true,
|
|
58
|
+
children: React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper in neque in venenatis. Mauris scelerisque orci magna, et ultricies nulla lobortis ac. Aliquam vitae faucibus nisl. Nunc in tellus libero. Donec ut augue consequat, convallis risus in, pulvinar nibh. Duis mi nibh, posuere molestie pharetra cursus, viverra ut dolor. Vivamus eget arcu dui. Donec ullamcorper ornare justo sed feugiat. Curabitur aliquam lectus sed quam pharetra scelerisque. Integer vitae eleifend dolor. Duis luctus metus ipsum, et commodo magna bibendum quis. Quisque gravida leo sodales quam feugiat, id vulputate arcu pulvinar. Duis dictum gravida risus, et bibendum nunc condimentum eu.")
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
const componentMeta = {
|
|
62
|
+
title: 'Trepur Components/Other/Organisms/Accordion',
|
|
63
|
+
component: Accordion,
|
|
64
|
+
argTypes: Object.assign(Object.assign({}, idAndClassName), { items: {
|
|
65
|
+
description: 'An array of collapsible props',
|
|
66
|
+
control: { type: 'array', default: undefined },
|
|
67
|
+
table: {
|
|
68
|
+
category: 'Accordion',
|
|
69
|
+
type: { summary: 'array' },
|
|
70
|
+
defaultValue: { summary: 'undefined' }
|
|
71
|
+
}
|
|
72
|
+
} }),
|
|
73
|
+
args: {
|
|
74
|
+
items: items
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const Template = (args) => React.createElement(Accordion, Object.assign({}, args));
|
|
78
|
+
export const _Accordion = Template.bind({});
|
|
79
|
+
export default componentMeta;
|
|
80
|
+
//# sourceMappingURL=Accordion.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Accordion/Accordion.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAS,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGhD,MAAM,KAAK,GAAG;IACZ;QACE,KAAK,EAAE,iBAAiB;QACxB,SAAS,EAAE,IAAI;QACf,SAAS,EAAE;YACT,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,SAAS;SACpB;QACD,QAAQ,EAAE,qsBAA0qB;KACrrB;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,oBAAoB;QAC9B,SAAS,EAAE,IAAI;QACf,SAAS,EAAE;YACT,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,SAAS;SACpB;QACD,QAAQ,EAAE,qsBAA0qB;KACrrB;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,oBAAoB;QAC9B,SAAS,EAAE,IAAI;QACf,SAAS,EAAE;YACT,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,CAAC;YACP,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,SAAS;SACpB;QACD,QAAQ,EAAE,qsBAA0qB;KACrrB;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,oBAAoB;QAC9B,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,qsBAA0qB;KACrrB;IACD;QACE,SAAS,EAAE,IAAI;QACf,SAAS,EAAE;YACT,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,SAAS;SACpB;QACD,QAAQ,EAAE,qsBAA0qB;KACrrB;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,qsBAA0qB;KACrrB;CACF,CAAA;AAED,MAAM,aAAa,GAAoC;IACrD,KAAK,EAAE,6CAA6C;IACpD,SAAS,EAAE,SAAS;IACpB,QAAQ,kCACH,cAAc,KACjB,KAAK,EAAE;YACL,WAAW,EAAE,+BAA+B;YAC5C,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;YAC9C,KAAK,EAAE;gBACL,QAAQ,EAAE,WAAW;gBACrB,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;gBAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF,GACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK;KACb;CACF,CAAA;AAED,MAAM,QAAQ,GAAqC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,SAAS,oBAAK,IAAI,EAAI,CAAA;AAEpF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE3C,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Collapsible from '../Collapsible';
|
|
3
|
+
const Accordion = ({ id, className, items }) => {
|
|
4
|
+
return (React.createElement("div", { id: id, className: className }, items === null || items === void 0 ? void 0 : items.map((item, i) => {
|
|
5
|
+
return (React.createElement(Collapsible, Object.assign({ key: `collapsible_item_${i}` }, item), item.children));
|
|
6
|
+
})));
|
|
7
|
+
};
|
|
8
|
+
export default Accordion;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Accordion/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,WAA0C,MAAM,yBAAyB,CAAA;AAQhF,MAAM,SAAS,GAAoB,CAAC,EAClC,EAAE,EACF,SAAS,EACT,KAAK,EACC,EAAe,EAAE;IACvB,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IAC9B,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,CAAC,IAAS,EAAE,CAAS,EAAE,EAAE;QACnC,OAAO,CACL,oBAAC,WAAW,kBACV,GAAG,EAAE,oBAAoB,CAAC,EAAE,IACxB,IAAI,GAEP,IAAI,CAAC,QAAQ,CACF,CACf,CAAA;IACH,CAAC,CAAC,CACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import AlertBar from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof AlertBar>;
|
|
5
|
+
export declare const _AlertBar: ComponentStory<({ id, className, type, text, theme, leftIconProps, rightIconProps, textCenter, isDismissable, onDismissClick }: import("./index").Props) => JSX.Element>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import AlertBar from './index';
|
|
3
|
+
import { idAndClassName } from '../../utils/controls';
|
|
4
|
+
const componentMeta = {
|
|
5
|
+
title: 'Trepur Components/Rupert Bennett/Atoms/Alert Bar',
|
|
6
|
+
component: AlertBar,
|
|
7
|
+
argTypes: Object.assign(Object.assign({}, idAndClassName), { type: {
|
|
8
|
+
type: { name: 'string', required: false },
|
|
9
|
+
options: ['success', 'warning', 'error', 'info'],
|
|
10
|
+
description: 'The type of alert to render',
|
|
11
|
+
table: {
|
|
12
|
+
type: { summary: 'warning' },
|
|
13
|
+
defaultValue: { summary: 'warning' }
|
|
14
|
+
},
|
|
15
|
+
defaultValue: 'warning',
|
|
16
|
+
control: { type: 'radio' }
|
|
17
|
+
}, text: {
|
|
18
|
+
type: { name: 'string', required: false },
|
|
19
|
+
description: 'The text to display in the component',
|
|
20
|
+
table: {
|
|
21
|
+
type: { summary: 'string' },
|
|
22
|
+
defaultValue: { summary: 'undefined' }
|
|
23
|
+
}
|
|
24
|
+
}, theme: {
|
|
25
|
+
type: { name: 'string', required: false },
|
|
26
|
+
options: ['light', 'dark'],
|
|
27
|
+
description: 'The theme to render the component in',
|
|
28
|
+
table: {
|
|
29
|
+
type: { summary: 'light' },
|
|
30
|
+
defaultValue: { summary: 'light' }
|
|
31
|
+
},
|
|
32
|
+
defaultValue: 'light',
|
|
33
|
+
control: { type: 'radio' }
|
|
34
|
+
}, leftIconProps: {
|
|
35
|
+
description: 'The icon props for the icon to display aligned to the left',
|
|
36
|
+
table: {
|
|
37
|
+
category: '',
|
|
38
|
+
type: { summary: 'string' },
|
|
39
|
+
defaultValue: { summary: 'undefined' }
|
|
40
|
+
}
|
|
41
|
+
}, rightIconProps: {
|
|
42
|
+
description: 'The icon props for the icon to display aligned to the right',
|
|
43
|
+
table: {
|
|
44
|
+
category: '',
|
|
45
|
+
type: { summary: 'string' },
|
|
46
|
+
defaultValue: { summary: 'undefined' }
|
|
47
|
+
}
|
|
48
|
+
}, textCenter: {
|
|
49
|
+
type: { name: 'boolean', required: false },
|
|
50
|
+
description: 'Aligns the text in the center of the component',
|
|
51
|
+
table: {
|
|
52
|
+
type: { summary: 'boolean' },
|
|
53
|
+
defaultValue: { summary: 'false' }
|
|
54
|
+
},
|
|
55
|
+
defaultValue: 'false'
|
|
56
|
+
}, isDismissable: {
|
|
57
|
+
type: { name: 'boolean', required: false },
|
|
58
|
+
description: 'Enables the component to be closed when set to true',
|
|
59
|
+
table: {
|
|
60
|
+
type: { summary: 'boolean' },
|
|
61
|
+
defaultValue: { summary: 'false' }
|
|
62
|
+
},
|
|
63
|
+
defaultValue: 'false'
|
|
64
|
+
}, onDismissClick: {
|
|
65
|
+
type: { name: 'function', required: false },
|
|
66
|
+
description: 'The action to perform when the component is closed',
|
|
67
|
+
action: 'onClick',
|
|
68
|
+
table: {
|
|
69
|
+
type: {
|
|
70
|
+
summary: 'function'
|
|
71
|
+
},
|
|
72
|
+
defaultValue: { summary: 'undefined' }
|
|
73
|
+
}
|
|
74
|
+
} }),
|
|
75
|
+
args: {
|
|
76
|
+
text: 'This is an alert bar message',
|
|
77
|
+
leftIconProps: {
|
|
78
|
+
type: 'heart',
|
|
79
|
+
colour: 'white',
|
|
80
|
+
hollow: true
|
|
81
|
+
},
|
|
82
|
+
rightIconProps: {
|
|
83
|
+
type: 'heart',
|
|
84
|
+
colour: 'white'
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const Template = (args) => React.createElement(AlertBar, Object.assign({}, args));
|
|
89
|
+
export const _AlertBar = Template.bind({});
|
|
90
|
+
export default componentMeta;
|
|
91
|
+
//# sourceMappingURL=AlertBar.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertBar.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/AlertBar/AlertBar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,QAAQ,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,aAAa,GAAmC;IACpD,KAAK,EAAE,kDAAkD;IACzD,SAAS,EAAE,QAAQ;IACnB,QAAQ,kCACH,cAAc,KACjB,IAAI,EAAE;YACJ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C,oBAAC,QAAQ,oBAAK,IAAI,EAAI,CAAA;AAElF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE1C,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Props as iconProps } from '../Icon';
|
|
3
|
+
export interface Props {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
type?: 'success' | 'warning' | 'error' | 'info';
|
|
7
|
+
text?: string;
|
|
8
|
+
leftIconProps?: iconProps;
|
|
9
|
+
rightIconProps?: iconProps;
|
|
10
|
+
textCenter?: boolean;
|
|
11
|
+
isDismissable?: boolean;
|
|
12
|
+
theme?: 'light' | 'dark';
|
|
13
|
+
onDismissClick?: React.MouseEventHandler;
|
|
14
|
+
}
|
|
15
|
+
declare const AlertBar: ({ id, className, type, text, theme, leftIconProps, rightIconProps, textCenter, isDismissable, onDismissClick }: Props) => JSX.Element;
|
|
16
|
+
export default AlertBar;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import Icon from '../Icon';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { getTheme } from '../../utils/theme';
|
|
5
|
+
const AlertBar = ({ id, className, type = 'warning', text, theme = 'light', leftIconProps, rightIconProps, textCenter = false, isDismissable = false, onDismissClick }) => {
|
|
6
|
+
const themeToUse = getTheme();
|
|
7
|
+
const [alertBarStatus, setAlertBarStatus] = useState({
|
|
8
|
+
state: 'open',
|
|
9
|
+
display: true
|
|
10
|
+
});
|
|
11
|
+
const bgColor = classNames({
|
|
12
|
+
'bg-rupertbennett-success': type === 'success' && themeToUse === 'rupertbennett',
|
|
13
|
+
'bg-rupertbennett-warning': type === 'warning' && themeToUse === 'rupertbennett',
|
|
14
|
+
'bg-rupertbennett-error': type === 'error' && themeToUse === 'rupertbennett',
|
|
15
|
+
'bg-rupertbennett-info-light': type === 'info' && themeToUse === 'rupertbennett',
|
|
16
|
+
'bg-bootson-success': type === 'success' && themeToUse === 'bootson',
|
|
17
|
+
'bg-bootson-warning': type === 'warning' && themeToUse === 'bootson',
|
|
18
|
+
'bg-bootson-error': type === 'error' && themeToUse === 'bootson',
|
|
19
|
+
'bg-bootson-info-light': type === 'info' && themeToUse === 'bootson'
|
|
20
|
+
});
|
|
21
|
+
const alertBarState = classNames({
|
|
22
|
+
'opacity-100': alertBarStatus.state === 'open',
|
|
23
|
+
'opacity-0': alertBarStatus.state === 'closed',
|
|
24
|
+
hidden: !alertBarStatus.display
|
|
25
|
+
});
|
|
26
|
+
const classList = classNames(className, bgColor, alertBarState, 'text-white w-parent flex py-2 transition-opactiy duration-700');
|
|
27
|
+
const textClassList = classNames({
|
|
28
|
+
'text-center': textCenter,
|
|
29
|
+
'pl-4': !textCenter
|
|
30
|
+
}, 'w-full py-3');
|
|
31
|
+
const rightIconClasses = classNames({
|
|
32
|
+
'hover:cursor-pointer': isDismissable
|
|
33
|
+
}, 'px-8 pt-3');
|
|
34
|
+
const leftIconClasses = 'pt-3 pl-8';
|
|
35
|
+
const closeAlertBar = (e) => {
|
|
36
|
+
setAlertBarStatus({
|
|
37
|
+
state: 'closed',
|
|
38
|
+
display: alertBarStatus.display
|
|
39
|
+
});
|
|
40
|
+
setTimeout(() => setAlertBarStatus({
|
|
41
|
+
state: 'closed',
|
|
42
|
+
display: false
|
|
43
|
+
}), 700);
|
|
44
|
+
if (onDismissClick != null) {
|
|
45
|
+
onDismissClick(e);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const dismissIcon = (React.createElement(Icon, { type: 'multiply', colour: 'white' }));
|
|
49
|
+
const iconLeft = (leftIconProps != null) &&
|
|
50
|
+
React.createElement(Icon, Object.assign({}, leftIconProps));
|
|
51
|
+
const iconRight = (rightIconProps != null) &&
|
|
52
|
+
React.createElement(Icon, Object.assign({}, rightIconProps));
|
|
53
|
+
return (React.createElement("div", { id: id, className: classList },
|
|
54
|
+
(leftIconProps != null) &&
|
|
55
|
+
React.createElement("span", { className: leftIconClasses }, iconLeft),
|
|
56
|
+
React.createElement("h3", { className: textClassList }, text),
|
|
57
|
+
isDismissable &&
|
|
58
|
+
React.createElement("a", { className: rightIconClasses, onClick: (e) => closeAlertBar(e) },
|
|
59
|
+
React.createElement("span", null, dismissIcon)),
|
|
60
|
+
(iconRight != null) && !isDismissable &&
|
|
61
|
+
React.createElement("span", { className: rightIconClasses }, iconRight)));
|
|
62
|
+
};
|
|
63
|
+
export default AlertBar;
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/AlertBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,IAA4B,MAAM,kBAAkB,CAAA;AAC3D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAevC,MAAM,QAAQ,GAAG,CAAC,EAChB,EAAE,EACF,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,IAAI,EACJ,KAAK,GAAG,OAAO,EACf,aAAa,EACb,cAAc,EACd,UAAU,GAAG,KAAK,EAClB,aAAa,GAAG,KAAK,EACrB,cAAc,EACR,EAAe,EAAE;IACvB,MAAM,UAAU,GAAW,QAAQ,EAAE,CAAA;IACrC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC;QACnD,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,IAAI;KACd,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,UAAU,CAAC;QACzB,0BAA0B,EAAE,IAAI,KAAK,SAAS,IAAI,UAAU,KAAK,eAAe;QAChF,0BAA0B,EAAE,IAAI,KAAK,SAAS,IAAI,UAAU,KAAK,eAAe;QAChF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I,IAAI,EAAE;YAC1B,cAAc,CAAC,CAAC,CAAC,CAAA;SAClB;IACH,CAAC,CAAA;IAED,MAAM,WAAW,GAAG,CAClB,oBAAC,IAAI,IACH,IAAI,EAAC,UAAU,EACf,MAAM,EAAC,OAAO,GACd,CACH,CAAA;IAED,MAAM,QAAQ,GAAG,CAAC,aAAa,IAAI,IAAI,CAAC;QACtC,oBAAC,IAAI,oBACC,aAAa,EACjB,CAAA;IAEJ,MAAM,SAAS,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC;QACxC,oBAAC,IAAI,oBACC,cAAc,EAClB,CAAA;IAEJ,OAAO,CACL,6BACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS;QAEnB,CAAC,aAAa,IAAI,IAAI,CAAC;YACtB,8BAAM,SAAS,EAAE,eAAe,IAC7B,QAAQ,CACJ;QACT,4BAAI,SAAS,EAAE,aAAa,IAAG,IAAI,CAAM;QACxC,aAAa;YACZ,2BAAG,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC9D,kCACG,WAAW,CACP,CACL;QACL,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa;YACpC,8BAAM,SAAS,EAAE,gBAAgB,IAC9B,SAAS,CACL,CACL,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import Breadcrumbs from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof Breadcrumbs>;
|
|
5
|
+
export declare const _Breadcrumbs: ComponentStory<({ id, className, links }: import("./index").Props) => JSX.Element>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Breadcrumbs from './index';
|
|
3
|
+
const componentMeta = {
|
|
4
|
+
title: 'Trepur Components/Other/Atoms/Breadcrumbs',
|
|
5
|
+
component: Breadcrumbs,
|
|
6
|
+
argTypes: {
|
|
7
|
+
id: {
|
|
8
|
+
description: 'Defines the id of the component',
|
|
9
|
+
table: {
|
|
10
|
+
category: '',
|
|
11
|
+
type: { summary: 'string' },
|
|
12
|
+
defaultValue: { summary: 'undefined' }
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
className: {
|
|
16
|
+
description: 'Defines any additional classes for the components',
|
|
17
|
+
table: {
|
|
18
|
+
category: '',
|
|
19
|
+
type: { summary: 'string' },
|
|
20
|
+
defaultValue: { summary: 'undefined' }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
links: {
|
|
24
|
+
description: 'An array of items to be displayed in the component',
|
|
25
|
+
table: {
|
|
26
|
+
category: '',
|
|
27
|
+
type: { summary: 'array' },
|
|
28
|
+
defaultValue: { summary: 'undefined' }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
links: [
|
|
34
|
+
{
|
|
35
|
+
href: '/',
|
|
36
|
+
name: 'link 1'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
href: '/',
|
|
40
|
+
name: 'link 2'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
href: '/',
|
|
44
|
+
name: 'link 3'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
href: '/',
|
|
48
|
+
name: 'link 4'
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const Template = (args) => React.createElement(Breadcrumbs, Object.assign({}, args));
|
|
54
|
+
export const _Breadcrumbs = Template.bind({});
|
|
55
|
+
export default componentMeta;
|
|
56
|
+
//# sourceMappingURL=Breadcrumbs.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.stories.js","s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AM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE7C,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Props {
|
|
3
|
+
id?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
links?: Array<{
|
|
6
|
+
name: string;
|
|
7
|
+
href: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
declare const Breadcrumbs: ({ id, className, links }: Props) => JSX.Element;
|
|
11
|
+
export default Breadcrumbs;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
const Breadcrumbs = ({ id, className, links }) => {
|
|
4
|
+
const linksLength = (links != null)
|
|
5
|
+
? Object.keys(links).length
|
|
6
|
+
: 0;
|
|
7
|
+
const classList = classNames(className, 'flex py-2 px-8');
|
|
8
|
+
return (React.createElement("ul", { id: id, className: classList }, links === null || links === void 0 ? void 0 : links.map((link, i) => {
|
|
9
|
+
return (React.createElement("div", { key: `breadcrumb_${i + 1}`, className: 'flex' },
|
|
10
|
+
React.createElement("li", { className: 'h-8' }, i + 1 >= linksLength
|
|
11
|
+
? (React.createElement("p", { className: 'px-1 py-1' }, link.name))
|
|
12
|
+
: (React.createElement("p", { className: 'px-1 py-1' },
|
|
13
|
+
React.createElement("a", { className: 'text-facebook hover:underline', href: link.href }, link.name)))),
|
|
14
|
+
i + 1 < linksLength &&
|
|
15
|
+
React.createElement("li", { className: 'h-8' },
|
|
16
|
+
React.createElement("p", { className: 'py-1' }, "\u00A0 > \u00A0"))));
|
|
17
|
+
})));
|
|
18
|
+
};
|
|
19
|
+
export default Breadcrumbs;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Breadcrumbs/index.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sBordered from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof BreadcrumbsBordered>;
|
|
5
|
+
export declare const _BreadcrumbsBordered: ComponentStory<React.FC<import("./index").Props>>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { idAndClassName } from '../../utils/controls';
|
|
3
|
+
import BreadcrumbsBordered from './index';
|
|
4
|
+
const componentMeta = {
|
|
5
|
+
title: 'Trepur Components/Other/Organisms/Breadcrumbs',
|
|
6
|
+
component: BreadcrumbsBordered,
|
|
7
|
+
parameters: {},
|
|
8
|
+
argTypes: Object.assign(Object.assign({}, idAndClassName), { links: {
|
|
9
|
+
description: 'An array of objects to be displayed in the component',
|
|
10
|
+
control: { type: 'array', default: undefined },
|
|
11
|
+
table: {
|
|
12
|
+
category: '',
|
|
13
|
+
type: { summary: 'array' },
|
|
14
|
+
defaultValue: { summary: 'undefined' }
|
|
15
|
+
}
|
|
16
|
+
} }),
|
|
17
|
+
args: {
|
|
18
|
+
links: [
|
|
19
|
+
{
|
|
20
|
+
link: '/',
|
|
21
|
+
name: 'link 1'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
link: '/',
|
|
25
|
+
name: 'link 2'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
link: '/',
|
|
29
|
+
name: 'link 3'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
link: '/',
|
|
33
|
+
name: 'link 4'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
link: '/',
|
|
37
|
+
name: 'link 5'
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const Template = (args) => React.createElement(BreadcrumbsBordered, Object.assign({}, args));
|
|
43
|
+
export const _BreadcrumbsBordered = Template.bind({});
|
|
44
|
+
export default componentMeta;
|
|
45
|
+
//# sourceMappingURL=BreadcrumbsBordered.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BreadcrumbsBordered.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,mBAAmB,MAAM,SAAS,CAAA;AAGzC,MAAM,aAAa,GAA8C;IAC/D,KAAK,EAAE,+CAA+C;IACtD,SAAS,EAAE,mBAAmB;IAC9B,UAAU,EAAE,EAAE;IACd,QAAQ,kCACH,cAAc,KACjB,KAAK,EAAE;YACL,WAAW,EAAE,sDAAsD;YACnE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;YAC9C,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;gBAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF,GACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAA;AAED,MAAM,QAAQ,GAA+C,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAA;AAExG,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAErD,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Props as breadcrumbsItemProps } from '../BreadcrumbsItem/index';
|
|
3
|
+
export interface Props {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
links?: breadcrumbsItemProps[];
|
|
7
|
+
}
|
|
8
|
+
declare const Breadcrumbs: React.FC<Props>;
|
|
9
|
+
export default Breadcrumbs;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import BreadcrumbsItem from '../BreadcrumbsItem/index';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
const Breadcrumbs = ({ id, className, links }) => {
|
|
5
|
+
const linksLength = (links === null || links === void 0 ? void 0 : links.length) !== undefined ? links.length : 0;
|
|
6
|
+
const classList = classNames(className, 'flex');
|
|
7
|
+
return (React.createElement("ul", { id: id, className: classList }, links === null || links === void 0 ? void 0 : links.map((link, i) => {
|
|
8
|
+
const margin = i === 0 ? ' mr-3' : ' mx-3';
|
|
9
|
+
const first = i === 0;
|
|
10
|
+
let bType = 'standard';
|
|
11
|
+
if (linksLength >= 1 && i + 1 < linksLength) {
|
|
12
|
+
bType = 'link';
|
|
13
|
+
}
|
|
14
|
+
return (React.createElement(BreadcrumbsItem, { key: `breadcrumb_item_${i + 0}`, className: margin, name: link.name, link: link.link, type: bType, firstItem: first }));
|
|
15
|
+
})));
|
|
16
|
+
};
|
|
17
|
+
export default Breadcrumbs;
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/BreadcrumbsBordered/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,eAAkD,MAAM,mCAAmC,CAAA;AAClG,OAAO,UAAU,MAAM,YAAY,CAAA;AAQnC,MAAM,WAAW,GAAoB,CAAC,EACpC,EAAE,EACF,SAAS,EACT,KAAK,EACN,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,MAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IAClE,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IAE/C,OAAO,CACL,4BAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IAC7B,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,CAAC,IAA0B,EAAE,CAAS,EAAE,EAAE;QACpD,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAA;QAC1C,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,CAAA;QAErB,IAAI,KAAK,GAAG,UAAU,CAAA;QACtB,IAAI,WAAW,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,WAAW,EAAE;YAC3C,KAAK,GAAG,MAAM,CAAA;SACf;QACD,OAAO,CACL,oBAAC,eAAe,IACd,GAAG,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAAE,EAC/B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,KAAK,GAChB,CACH,CAAA;IACH,CAAC,CAAC,CACC,CACN,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BreadcrumbsItem from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof BreadcrumbsItem>;
|
|
5
|
+
export declare const _BreadcrumbsItem: ComponentStory<({ id, className, name, link, href, type, firstItem }: import("./index").Props) => JSX.Element>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import BreadcrumbsItem from './index';
|
|
3
|
+
const componentMeta = {
|
|
4
|
+
title: 'Trepur Components/Other/Atoms/Breadcrumbs Item',
|
|
5
|
+
component: BreadcrumbsItem,
|
|
6
|
+
parameters: {},
|
|
7
|
+
argTypes: {
|
|
8
|
+
id: {
|
|
9
|
+
description: 'Defines the id of the component',
|
|
10
|
+
table: {
|
|
11
|
+
category: '',
|
|
12
|
+
type: { summary: 'string' },
|
|
13
|
+
defaultValue: { summary: 'undefined' }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
className: {
|
|
17
|
+
description: 'Defines any additional classes for the components',
|
|
18
|
+
table: {
|
|
19
|
+
category: '',
|
|
20
|
+
type: { summary: 'string' },
|
|
21
|
+
defaultValue: { summary: 'undefined' }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
name: {
|
|
25
|
+
description: 'Specifies the name for the key attribute',
|
|
26
|
+
table: {
|
|
27
|
+
category: '',
|
|
28
|
+
type: { summary: 'string' },
|
|
29
|
+
defaultValue: { summary: 'undefined' }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
type: {
|
|
33
|
+
description: 'Specifies the type of breadcrumbs to display ie link',
|
|
34
|
+
table: {
|
|
35
|
+
category: '',
|
|
36
|
+
type: { summary: 'string' },
|
|
37
|
+
defaultValue: { summary: 'undefined' }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
args: {
|
|
42
|
+
name: 'Link 1',
|
|
43
|
+
href: '/',
|
|
44
|
+
firstItem: false
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const Template = (args) => React.createElement(BreadcrumbsItem, Object.assign({}, args));
|
|
48
|
+
export const _BreadcrumbsItem = Template.bind({});
|
|
49
|
+
export default componentMeta;
|
|
50
|
+
//# sourceMappingURL=BreadcrumbsItem.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BreadcrumbsItem.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,eAAe,MAAM,SAAS,CAAA;AAGrC,MAAM,aAAa,GAA0C;IAC3D,KAAK,EAAE,gDAAgD;IACvD,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC3B,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF;QACD,SAAS,EAAE;YACT,WAAW,EAAE,mDAAmD;YAChE,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC3B,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,0CAA0C;YACvD,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC3B,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,sDAAsD;YACnE,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC3B,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF;KACF;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,GAAG;QACT,SAAS,EAAE,KAAK;KACjB;CACF,CAAA;AAED,MAAM,QAAQ,GAA2C,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,eAAe,oBAAK,IAAI,EAAI,CAAA;AAEhG,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAEjD,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Props {
|
|
3
|
+
id?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
link: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
firstItem?: boolean;
|
|
9
|
+
href?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const BreadcrumbsItem: ({ id, className, name, link, href, type, firstItem }: Props) => JSX.Element;
|
|
12
|
+
export default BreadcrumbsItem;
|