trepur_components 1.0.2 → 1.0.3
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/Carousel/index.d.ts +0 -1
- package/dist/src/lib/components/Carousel/index.js +1 -1
- package/dist/src/lib/components/Carousel/index.js.map +1 -1
- package/dist/src/lib/components/FooterBar/{footerBar.stories.d.ts → FooterBar.stories.d.ts} +0 -0
- package/dist/src/lib/components/FooterBar/{footerBar.stories.js → FooterBar.stories.js} +1 -1
- package/dist/src/lib/components/FooterBar/{footerBar.stories.js.map → FooterBar.stories.js.map} +1 -1
- package/dist/src/lib/components/Nav/index.js +2 -2
- package/dist/src/lib/components/Nav/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Accordion/Accordion.stories.tsx +0 -88
- package/dist/components/Accordion/index.tsx +0 -31
- package/dist/components/AlertBar/AlertBar.stories.tsx +0 -105
- package/dist/components/AlertBar/index.tsx +0 -127
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -60
- package/dist/components/Breadcrumbs/index.tsx +0 -55
- package/dist/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx +0 -52
- package/dist/components/BreadcrumbsBordered/index.tsx +0 -44
- package/dist/components/BreadcrumbsItem/BreadcrumbsItem.stories.tsx +0 -54
- package/dist/components/BreadcrumbsItem/index.tsx +0 -151
- package/dist/components/Button/button.stories.tsx +0 -148
- package/dist/components/Button/index.tsx +0 -91
- package/dist/components/Card/Card.stories.tsx +0 -150
- package/dist/components/Card/index.tsx +0 -162
- package/dist/components/CardWithTopImage/CardWithTopImage.stories.tsx +0 -48
- package/dist/components/CardWithTopImage/index.tsx +0 -40
- package/dist/components/Carousel/Carousel.stories.tsx +0 -369
- package/dist/components/Carousel/index.tsx +0 -267
- package/dist/components/ChevronCard/ChevronCard.stories.tsx +0 -21
- package/dist/components/ChevronCard/index.tsx +0 -39
- package/dist/components/Collapsible/Collapsible.stories.tsx +0 -70
- package/dist/components/Collapsible/index.tsx +0 -124
- package/dist/components/Column/Column.stories.tsx +0 -82
- package/dist/components/Column/index.tsx +0 -114
- package/dist/components/Container/Container.stories.tsx +0 -38
- package/dist/components/Container/index.tsx +0 -30
- package/dist/components/FooterBar/FooterBar.stories.tsx +0 -57
- package/dist/components/FooterBar/index.tsx +0 -44
- package/dist/components/Form/Form.stories.tsx +0 -93
- package/dist/components/Form/index.tsx +0 -58
- package/dist/components/FyreCard/FyreCard.stories.tsx +0 -29
- package/dist/components/FyreCard/index.tsx +0 -46
- package/dist/components/Greeting/Greeting.stories.tsx +0 -42
- package/dist/components/Greeting/index.tsx +0 -46
- package/dist/components/HamburgerIcon/HamburgerIcon.stories.tsx +0 -50
- package/dist/components/HamburgerIcon/index.tsx +0 -65
- package/dist/components/Icon/Icon.stories.tsx +0 -102
- package/dist/components/Icon/index.tsx +0 -112
- package/dist/components/Image/Image.stories.tsx +0 -88
- package/dist/components/Image/index.tsx +0 -113
- package/dist/components/ImageLink/ImageLink.stories.tsx +0 -60
- package/dist/components/ImageLink/index.tsx +0 -62
- package/dist/components/ImageLinkList/ImageLinkList.stories.tsx +0 -34
- package/dist/components/ImageLinkList/index.tsx +0 -33
- package/dist/components/InformationIcon/InformationIcon.stories.tsx +0 -86
- package/dist/components/InformationIcon/index.tsx +0 -84
- package/dist/components/Input/Input.stories.tsx +0 -99
- package/dist/components/Input/index.tsx +0 -126
- package/dist/components/Jumbotron/Jumbotron.stories.tsx +0 -22
- package/dist/components/Jumbotron/index.tsx +0 -25
- package/dist/components/Nav/Nav.stories.tsx +0 -155
- package/dist/components/Nav/index.tsx +0 -180
- package/dist/components/NavItem/NavItem.stories.tsx +0 -89
- package/dist/components/NavItem/index.tsx +0 -65
- package/dist/components/NewsCard/NewsCard.stories.tsx +0 -71
- package/dist/components/NewsCard/index.tsx +0 -48
- package/dist/components/Profile/Profile.stories.tsx +0 -50
- package/dist/components/Profile/index.tsx +0 -87
- package/dist/components/Row/Row.stories.tsx +0 -51
- package/dist/components/Row/index.tsx +0 -24
- package/dist/components/Search/Search.stories.tsx +0 -58
- package/dist/components/Search/index.tsx +0 -58
- package/dist/components/SocialBlock/SocialBlock.stories.tsx +0 -114
- package/dist/components/SocialBlock/index.tsx +0 -161
- package/dist/components/StarRating/StarRating.stories.tsx +0 -23
- package/dist/components/StarRating/index.tsx +0 -71
- package/dist/components/Testimonial/Testimonial.stories.tsx +0 -110
- package/dist/components/Testimonial/index.tsx +0 -50
- package/dist/components/TextAndTitle/TextAndTitle.stories.tsx +0 -65
- package/dist/components/TextAndTitle/index.tsx +0 -257
- package/dist/components/TextArea/TextArea.stories.tsx +0 -67
- package/dist/components/TextArea/index.tsx +0 -97
- package/dist/components/Timeline/Timeline.stories.tsx +0 -100
- package/dist/components/Timeline/index.css +0 -133
- package/dist/components/Timeline/index.tsx +0 -315
- package/dist/components/Tubestops/Tubestops.stories.tsx +0 -66
- package/dist/components/Tubestops/index.css +0 -92
- package/dist/components/Tubestops/index.tsx +0 -77
- package/dist/components/UserIcon/UserIcon.stories.tsx +0 -67
- package/dist/components/UserIcon/index.tsx +0 -42
- package/dist/components/Video/Video.stories.tsx +0 -23
- package/dist/components/Video/index.tsx +0 -49
- 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 -272
- package/dist/styles/base.css +0 -73
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Carousel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Carousel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,2CAA2C;AAC3C,OAAO,EAAE,aAAa,EAA0D,MAAM,mBAAmB,CAAA;AACzG,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,IAAI,MAAM,kBAAkB,CAAA;AA0CnC,MAAM,QAAQ,GAAoB,CAAC,EACjC,EAAE,EACF,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,OAAO,EACP,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,MAAM,EACb,KAAK,EACL,UAAU,EACV,GAAG,EACH,UAAU,EACV,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,SAAS,EACT,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,OAAO,EACP,OAAO,GAAG,CAAC,EACX,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,IAAI,EACL,EAAE,EAAE;;IACH,MAAM,SAAS,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACnD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE3C,MAAM,aAAa,GAAG,CAAC,MAAW,EAAQ,EAAE;QAC1C,IAAI,YAAiB,CAAA;QACrB,IAA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C;AAED,eAAe,QAAQ,CAAA"}
|
|
File without changes
|
|
@@ -45,4 +45,4 @@ const componentMeta = {
|
|
|
45
45
|
const Template = (args) => React.createElement(FooterBar, Object.assign({}, args));
|
|
46
46
|
export const _FooterBar = Template.bind({});
|
|
47
47
|
export default componentMeta;
|
|
48
|
-
//# sourceMappingURL=
|
|
48
|
+
//# sourceMappingURL=FooterBar.stories.js.map
|
package/dist/src/lib/components/FooterBar/{footerBar.stories.js.map → FooterBar.stories.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"FooterBar.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/FooterBar/FooterBar.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;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAEjD,MAAM,aAAa,GAAoC;IACrD,KAAK,EAAE,uDAAuD;IAC9D,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,EAAE;IACd,QAAQ,kCACH,cAAc,KACjB,IAAI,EAAE;YACJ,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,WAAW,EAAE,mCAAmC;YAChD,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aAC7B;YACD,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SACvC,EACD,WAAW,EAAE;YACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;YACxC,WAAW,EAAE,6DAA6D;YAC1E,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;gBACD,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF,EACD,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;gBAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;aACnC;YACD,YAAY,EAAE,OAAO;YACrB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B,GACF;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,sDAAsD;QAC5D,KAAK,EAAE,MAAM;QACb,WAAW,EAAE;YACX,QAAQ,EAAE,aAAa;YACvB,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC;SAClC;KACF;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"}
|
|
@@ -25,7 +25,7 @@ const Nav = ({ id, className, navLinks, asSideBar, dropdownNavHeight, logo, logo
|
|
|
25
25
|
}, colours, mobileClasses, 'flex items-center md:hidden py-2');
|
|
26
26
|
const desktopClassList = classNames({
|
|
27
27
|
'fixed w-full z-50 top-0 mt-0': fixedTop
|
|
28
|
-
}, 'w-full justify-between hidden md:flex items-center justify-between sm:items-stretch text-center');
|
|
28
|
+
}, 'w-full justify-between hidden md:flex items-center justify-between sm:items-stretch text-center flex bg-primary');
|
|
29
29
|
const toggleMenu = () => {
|
|
30
30
|
getNavStatus === null || getNavStatus === void 0 ? void 0 : getNavStatus(asSideBar, true);
|
|
31
31
|
if (asSideBar) {
|
|
@@ -41,7 +41,7 @@ const Nav = ({ id, className, navLinks, asSideBar, dropdownNavHeight, logo, logo
|
|
|
41
41
|
React.createElement(HamburgerIcon, { onClick: toggleMenu })),
|
|
42
42
|
React.createElement("a", { id: 'logo-link', className: 'mx-auto', href: logoLink },
|
|
43
43
|
React.createElement("img", { className: logoImageClassList, src: theme === 'dark' ? mobileLogoDarkTheme : mobileLogo, alt: 'Logo' }))),
|
|
44
|
-
React.createElement("div", { id: 'destop-nav', className:
|
|
44
|
+
React.createElement("div", { id: 'destop-nav', className: desktopClassList },
|
|
45
45
|
React.createElement("div", { className: logoClassList },
|
|
46
46
|
React.createElement("a", { id: 'logo-link', className: 'mx-auto', href: logoLink },
|
|
47
47
|
React.createElement("img", { className: logoImageClassList, src: theme === 'dark' ? logoDarkTheme : logo, alt: 'Logo' }))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Nav/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,OAAkC,MAAM,qBAAqB,CAAA;AACpE,OAAO,aAAa,MAAM,2BAA2B,CAAA;AAqBrD,MAAM,GAAG,GAAG,CAAC,EACX,EAAE,EACF,SAAS,EACT,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,IAAI,EACJ,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,KAAK,GAAG,MAAM,EACd,IAAI,EACJ,QAAQ,EACF,EAAe,EAAE;IACvB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACrD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE7D,MAAM,OAAO,GAAG,KAAK,KAAK,MAAM,CAAC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WAAW,CAAC,EAAE,IACf,OAAO,IACX,SAAS,EAAC,WAAW,EACrB,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,KAAK,EACd,gBAAgB,QAChB,OAAO,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,IACnD,CACH,CAAA;gBACH,CAAC,CAAC,CACE,CACF,CACL,CACE,CACV,CAAA;AACH,CAAC,CAAA;AAED,eAAe,GAAG,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Accordion from './index'
|
|
3
|
-
import { idAndClassName } from '@utils/controls'
|
|
4
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
-
|
|
6
|
-
const items = [
|
|
7
|
-
{
|
|
8
|
-
title: 'This is a title',
|
|
9
|
-
boldTitle: true,
|
|
10
|
-
iconProps: {
|
|
11
|
-
type: 'heart',
|
|
12
|
-
hollow: true,
|
|
13
|
-
colour: 'white',
|
|
14
|
-
bgColour: 'primary'
|
|
15
|
-
},
|
|
16
|
-
children: <p>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.</p>
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: 'This is a title',
|
|
20
|
-
subtitle: 'This is a subtitle',
|
|
21
|
-
boldTitle: true,
|
|
22
|
-
iconProps: {
|
|
23
|
-
type: 'heart',
|
|
24
|
-
colour: 'white',
|
|
25
|
-
bgColour: 'primary'
|
|
26
|
-
},
|
|
27
|
-
children: <p>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.</p>
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: 'This is a title',
|
|
31
|
-
subtitle: 'This is a subtitle',
|
|
32
|
-
boldTitle: true,
|
|
33
|
-
iconProps: {
|
|
34
|
-
type: 'heart',
|
|
35
|
-
size: 2,
|
|
36
|
-
hollow: true,
|
|
37
|
-
colour: 'white',
|
|
38
|
-
bgColour: 'primary'
|
|
39
|
-
},
|
|
40
|
-
children: <p>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.</p>
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: 'This is a title',
|
|
44
|
-
subtitle: 'This is a subtitle',
|
|
45
|
-
boldTitle: true,
|
|
46
|
-
children: <p>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.</p>
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
boldTitle: true,
|
|
50
|
-
iconProps: {
|
|
51
|
-
type: 'heart',
|
|
52
|
-
colour: 'white',
|
|
53
|
-
bgColour: 'primary'
|
|
54
|
-
},
|
|
55
|
-
children: <p>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.</p>
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: 'This is title 6',
|
|
59
|
-
boldTitle: true,
|
|
60
|
-
children: <p>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.</p>
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
const componentMeta: ComponentMeta<typeof Accordion> = {
|
|
65
|
-
title: 'Trepur Components/Other/Organisms/Accordion',
|
|
66
|
-
component: Accordion,
|
|
67
|
-
argTypes: {
|
|
68
|
-
...idAndClassName,
|
|
69
|
-
items: {
|
|
70
|
-
description: 'An array of collapsible props',
|
|
71
|
-
control: { type: 'array', default: undefined },
|
|
72
|
-
table: {
|
|
73
|
-
category: 'Accordion',
|
|
74
|
-
type: { summary: 'array' },
|
|
75
|
-
defaultValue: { summary: 'undefined' }
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
args: {
|
|
80
|
-
items: items
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const Template: ComponentStory<typeof Accordion> = (args) => <Accordion {...args} />
|
|
85
|
-
|
|
86
|
-
export const _Accordion = Template.bind({})
|
|
87
|
-
|
|
88
|
-
export default componentMeta
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Collapsible, { Props as collapsibleProps } from '@components/Collapsible'
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
id?: string
|
|
6
|
-
className?: string
|
|
7
|
-
items: any
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const Accordion: React.FC<Props> = ({
|
|
11
|
-
id,
|
|
12
|
-
className,
|
|
13
|
-
items
|
|
14
|
-
}: Props): JSX.Element => {
|
|
15
|
-
return (
|
|
16
|
-
<div id={id} className={className}>
|
|
17
|
-
{items?.map((item: any, i: number) => {
|
|
18
|
-
return (
|
|
19
|
-
<Collapsible
|
|
20
|
-
key={`collapsible_item_${i}`}
|
|
21
|
-
{...item}
|
|
22
|
-
>
|
|
23
|
-
{item.children}
|
|
24
|
-
</Collapsible>
|
|
25
|
-
)
|
|
26
|
-
})}
|
|
27
|
-
</div>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default Accordion
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import AlertBar from './index'
|
|
3
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
4
|
-
import { idAndClassName } from '@utils/controls'
|
|
5
|
-
|
|
6
|
-
const componentMeta: ComponentMeta<typeof AlertBar> = {
|
|
7
|
-
title: 'Trepur Components/Rupert Bennett/Atoms/Alert Bar',
|
|
8
|
-
component: AlertBar,
|
|
9
|
-
argTypes: {
|
|
10
|
-
...idAndClassName,
|
|
11
|
-
type: {
|
|
12
|
-
type: { name: 'string', required: false },
|
|
13
|
-
options: ['success', 'warning', 'error', 'info'],
|
|
14
|
-
description: 'The type of alert to render',
|
|
15
|
-
table: {
|
|
16
|
-
type: { summary: 'warning' },
|
|
17
|
-
defaultValue: { summary: 'warning' }
|
|
18
|
-
},
|
|
19
|
-
defaultValue: 'warning',
|
|
20
|
-
control: { type: 'radio' }
|
|
21
|
-
},
|
|
22
|
-
text: {
|
|
23
|
-
type: { name: 'string', required: false },
|
|
24
|
-
description: 'The text to display in the component',
|
|
25
|
-
table: {
|
|
26
|
-
type: { summary: 'string' },
|
|
27
|
-
defaultValue: { summary: 'undefined' }
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
theme: {
|
|
31
|
-
type: { name: 'string', required: false },
|
|
32
|
-
options: ['light', 'dark'],
|
|
33
|
-
description: 'The theme to render the component in',
|
|
34
|
-
table: {
|
|
35
|
-
type: { summary: 'light' },
|
|
36
|
-
defaultValue: { summary: 'light' }
|
|
37
|
-
},
|
|
38
|
-
defaultValue: 'light',
|
|
39
|
-
control: { type: 'radio' }
|
|
40
|
-
},
|
|
41
|
-
leftIconProps: {
|
|
42
|
-
description: 'The icon props for the icon to display aligned to the left',
|
|
43
|
-
table: {
|
|
44
|
-
category: '',
|
|
45
|
-
type: { summary: 'string' },
|
|
46
|
-
defaultValue: { summary: 'undefined' }
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
rightIconProps: {
|
|
50
|
-
description: 'The icon props for the icon to display aligned to the right',
|
|
51
|
-
table: {
|
|
52
|
-
category: '',
|
|
53
|
-
type: { summary: 'string' },
|
|
54
|
-
defaultValue: { summary: 'undefined' }
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
textCenter: {
|
|
58
|
-
type: { name: 'boolean', required: false },
|
|
59
|
-
description: 'Aligns the text in the center of the component',
|
|
60
|
-
table: {
|
|
61
|
-
type: { summary: 'boolean' },
|
|
62
|
-
defaultValue: { summary: 'false' }
|
|
63
|
-
},
|
|
64
|
-
defaultValue: 'false'
|
|
65
|
-
},
|
|
66
|
-
isDismissable: {
|
|
67
|
-
type: { name: 'boolean', required: false },
|
|
68
|
-
description: 'Enables the component to be closed when set to true',
|
|
69
|
-
table: {
|
|
70
|
-
type: { summary: 'boolean' },
|
|
71
|
-
defaultValue: { summary: 'false' }
|
|
72
|
-
},
|
|
73
|
-
defaultValue: 'false'
|
|
74
|
-
},
|
|
75
|
-
onDismissClick: {
|
|
76
|
-
type: { name: 'function', required: false },
|
|
77
|
-
description: 'The action to perform when the component is closed',
|
|
78
|
-
action: 'onClick',
|
|
79
|
-
table: {
|
|
80
|
-
type: {
|
|
81
|
-
summary: 'function'
|
|
82
|
-
},
|
|
83
|
-
defaultValue: { summary: 'undefined' }
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
args: {
|
|
88
|
-
text: 'This is an alert bar message',
|
|
89
|
-
leftIconProps: {
|
|
90
|
-
type: 'heart',
|
|
91
|
-
colour: 'white',
|
|
92
|
-
hollow: true
|
|
93
|
-
},
|
|
94
|
-
rightIconProps: {
|
|
95
|
-
type: 'heart',
|
|
96
|
-
colour: 'white'
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const Template: ComponentStory<typeof AlertBar> = (args) => <AlertBar {...args} />
|
|
102
|
-
|
|
103
|
-
export const _AlertBar = Template.bind({})
|
|
104
|
-
|
|
105
|
-
export default componentMeta
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import Icon, { Props as iconProps } from '@components/Icon'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
import { getTheme } from '@utils/theme'
|
|
5
|
-
|
|
6
|
-
export interface Props {
|
|
7
|
-
id?: string
|
|
8
|
-
className?: string
|
|
9
|
-
type?: 'success' | 'warning' | 'error' | 'info'
|
|
10
|
-
text?: string
|
|
11
|
-
leftIconProps?: iconProps
|
|
12
|
-
rightIconProps?: iconProps
|
|
13
|
-
textCenter?: boolean
|
|
14
|
-
isDismissable?: boolean
|
|
15
|
-
theme?: 'light' | 'dark'
|
|
16
|
-
onDismissClick?: React.MouseEventHandler
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const AlertBar = ({
|
|
20
|
-
id,
|
|
21
|
-
className,
|
|
22
|
-
type = 'warning',
|
|
23
|
-
text,
|
|
24
|
-
theme = 'light',
|
|
25
|
-
leftIconProps,
|
|
26
|
-
rightIconProps,
|
|
27
|
-
textCenter = false,
|
|
28
|
-
isDismissable = false,
|
|
29
|
-
onDismissClick
|
|
30
|
-
}: Props): JSX.Element => {
|
|
31
|
-
const themeToUse: string = getTheme()
|
|
32
|
-
const [alertBarStatus, setAlertBarStatus] = useState({
|
|
33
|
-
state: 'open',
|
|
34
|
-
display: true
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
const bgColor = classNames({
|
|
38
|
-
'bg-rupertbennett-success': type === 'success' && themeToUse === 'rupertbennett',
|
|
39
|
-
'bg-rupertbennett-warning': type === 'warning' && themeToUse === 'rupertbennett',
|
|
40
|
-
'bg-rupertbennett-error': type === 'error' && themeToUse === 'rupertbennett',
|
|
41
|
-
'bg-rupertbennett-info-light': type === 'info' && themeToUse === 'rupertbennett',
|
|
42
|
-
'bg-bootson-success': type === 'success' && themeToUse === 'bootson',
|
|
43
|
-
'bg-bootson-warning': type === 'warning' && themeToUse === 'bootson',
|
|
44
|
-
'bg-bootson-error': type === 'error' && themeToUse === 'bootson',
|
|
45
|
-
'bg-bootson-info-light': type === 'info' && themeToUse === 'bootson'
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
const alertBarState = classNames({
|
|
49
|
-
'opacity-100': alertBarStatus.state === 'open',
|
|
50
|
-
'opacity-0': alertBarStatus.state === 'closed',
|
|
51
|
-
hidden: !alertBarStatus.display
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
const classList = classNames(
|
|
55
|
-
className,
|
|
56
|
-
bgColor,
|
|
57
|
-
alertBarState,
|
|
58
|
-
'text-white w-parent flex py-2 transition-opactiy duration-700'
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
const textClassList = classNames({
|
|
62
|
-
'text-center': textCenter,
|
|
63
|
-
'pl-4': !textCenter
|
|
64
|
-
}, 'w-full py-3')
|
|
65
|
-
|
|
66
|
-
const rightIconClasses = classNames({
|
|
67
|
-
'hover:cursor-pointer': isDismissable
|
|
68
|
-
}, 'px-8 pt-3')
|
|
69
|
-
|
|
70
|
-
const leftIconClasses = 'pt-3 pl-8'
|
|
71
|
-
|
|
72
|
-
const closeAlertBar = (e: any): void => {
|
|
73
|
-
setAlertBarStatus({
|
|
74
|
-
state: 'closed',
|
|
75
|
-
display: alertBarStatus.display
|
|
76
|
-
})
|
|
77
|
-
setTimeout(() => setAlertBarStatus({
|
|
78
|
-
state: 'closed',
|
|
79
|
-
display: false
|
|
80
|
-
}), 700)
|
|
81
|
-
if (onDismissClick != null) {
|
|
82
|
-
onDismissClick(e)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const dismissIcon = (
|
|
87
|
-
<Icon
|
|
88
|
-
type='multiply'
|
|
89
|
-
colour='white'
|
|
90
|
-
/>
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
const iconLeft = (leftIconProps != null) &&
|
|
94
|
-
<Icon
|
|
95
|
-
{...leftIconProps}
|
|
96
|
-
/>
|
|
97
|
-
|
|
98
|
-
const iconRight = (rightIconProps != null) &&
|
|
99
|
-
<Icon
|
|
100
|
-
{...rightIconProps}
|
|
101
|
-
/>
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<div
|
|
105
|
-
id={id}
|
|
106
|
-
className={classList}
|
|
107
|
-
>
|
|
108
|
-
{(leftIconProps != null) &&
|
|
109
|
-
<span className={leftIconClasses}>
|
|
110
|
-
{iconLeft}
|
|
111
|
-
</span>}
|
|
112
|
-
<h3 className={textClassList}>{text}</h3>
|
|
113
|
-
{isDismissable &&
|
|
114
|
-
<a className={rightIconClasses} onClick={(e) => closeAlertBar(e)}>
|
|
115
|
-
<span>
|
|
116
|
-
{dismissIcon}
|
|
117
|
-
</span>
|
|
118
|
-
</a>}
|
|
119
|
-
{(iconRight != null) && !isDismissable &&
|
|
120
|
-
<span className={rightIconClasses}>
|
|
121
|
-
{iconRight}
|
|
122
|
-
</span>}
|
|
123
|
-
</div>
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export default AlertBar
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Breadcrumbs from './index'
|
|
3
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
4
|
-
|
|
5
|
-
const componentMeta: ComponentMeta<typeof Breadcrumbs> = {
|
|
6
|
-
title: 'Trepur Components/Other/Atoms/Breadcrumbs',
|
|
7
|
-
component: Breadcrumbs,
|
|
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
|
-
links: {
|
|
26
|
-
description: 'An array of items to be displayed in the component',
|
|
27
|
-
table: {
|
|
28
|
-
category: '',
|
|
29
|
-
type: { summary: 'array' },
|
|
30
|
-
defaultValue: { summary: 'undefined' }
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
args: {
|
|
35
|
-
links: [
|
|
36
|
-
{
|
|
37
|
-
href: '/',
|
|
38
|
-
name: 'link 1'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
href: '/',
|
|
42
|
-
name: 'link 2'
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
href: '/',
|
|
46
|
-
name: 'link 3'
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
href: '/',
|
|
50
|
-
name: 'link 4'
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const Template: ComponentStory<typeof Breadcrumbs> = (args) => <Breadcrumbs {...args} />
|
|
57
|
-
|
|
58
|
-
export const _Breadcrumbs = Template.bind({})
|
|
59
|
-
|
|
60
|
-
export default componentMeta
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import classNames from 'classnames'
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
id?: string
|
|
6
|
-
className?: string
|
|
7
|
-
links?: Array<{ name: string, href: string }>
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const Breadcrumbs = ({
|
|
11
|
-
id,
|
|
12
|
-
className,
|
|
13
|
-
links
|
|
14
|
-
}: Props): JSX.Element => {
|
|
15
|
-
const linksLength = (links != null)
|
|
16
|
-
? Object.keys(links).length
|
|
17
|
-
: 0
|
|
18
|
-
|
|
19
|
-
const classList = classNames(className, 'flex py-2 px-8')
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<ul id={id} className={classList}>
|
|
23
|
-
{links?.map((link, i) => {
|
|
24
|
-
return (
|
|
25
|
-
<div key={`breadcrumb_${i + 1}`} className='flex'>
|
|
26
|
-
<li className='h-8'>
|
|
27
|
-
{i + 1 >= linksLength
|
|
28
|
-
? (
|
|
29
|
-
<p className='px-1 py-1'>
|
|
30
|
-
{link.name}
|
|
31
|
-
</p>
|
|
32
|
-
)
|
|
33
|
-
: (
|
|
34
|
-
<p className='px-1 py-1'>
|
|
35
|
-
<a
|
|
36
|
-
className='text-facebook hover:underline'
|
|
37
|
-
href={link.href}
|
|
38
|
-
>
|
|
39
|
-
{link.name}
|
|
40
|
-
</a>
|
|
41
|
-
</p>
|
|
42
|
-
)}
|
|
43
|
-
</li>
|
|
44
|
-
{i + 1 < linksLength &&
|
|
45
|
-
<li className='h-8'>
|
|
46
|
-
<p className='py-1'> > </p>
|
|
47
|
-
</li>}
|
|
48
|
-
</div>
|
|
49
|
-
)
|
|
50
|
-
})}
|
|
51
|
-
</ul>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export default Breadcrumbs
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { idAndClassName } from '@utils/controls'
|
|
3
|
-
import BreadcrumbsBordered from './index'
|
|
4
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
5
|
-
|
|
6
|
-
const componentMeta: ComponentMeta<typeof BreadcrumbsBordered> = {
|
|
7
|
-
title: 'Trepur Components/Other/Organisms/Breadcrumbs',
|
|
8
|
-
component: BreadcrumbsBordered,
|
|
9
|
-
parameters: {},
|
|
10
|
-
argTypes: {
|
|
11
|
-
...idAndClassName,
|
|
12
|
-
links: {
|
|
13
|
-
description: 'An array of objects to be displayed in the component',
|
|
14
|
-
control: { type: 'array', default: undefined },
|
|
15
|
-
table: {
|
|
16
|
-
category: '',
|
|
17
|
-
type: { summary: 'array' },
|
|
18
|
-
defaultValue: { summary: 'undefined' }
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
args: {
|
|
23
|
-
links: [
|
|
24
|
-
{
|
|
25
|
-
link: '/',
|
|
26
|
-
name: 'link 1'
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
link: '/',
|
|
30
|
-
name: 'link 2'
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
link: '/',
|
|
34
|
-
name: 'link 3'
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
link: '/',
|
|
38
|
-
name: 'link 4'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
link: '/',
|
|
42
|
-
name: 'link 5'
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const Template: ComponentStory<typeof BreadcrumbsBordered> = (args) => <BreadcrumbsBordered {...args} />
|
|
49
|
-
|
|
50
|
-
export const _BreadcrumbsBordered = Template.bind({})
|
|
51
|
-
|
|
52
|
-
export default componentMeta
|