trepur_components 0.1.43 → 0.2.2
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/Assets/Images/logoCoco.png +0 -0
- package/dist/Assets/Images/logoCocoBanner.png +0 -0
- package/dist/Assets/Videos/example.mp4 +0 -0
- package/dist/Assets/Videos/example.ogv +0 -0
- package/dist/components/Atoms/AlertBar/AlertBar.stories.js +69 -0
- package/dist/components/Atoms/AlertBar/index.js +66 -0
- package/dist/components/Atoms/Breadcrumbs/Breadcrumbs.stories.js +41 -0
- package/dist/components/{Breadcrumbs → Atoms/Breadcrumbs}/index.js +2 -0
- package/dist/components/Atoms/BreadcrumbsItem/BreadcrumbsItem.stories.js +86 -0
- package/dist/components/Atoms/BreadcrumbsItem/index.css +42 -0
- package/dist/components/{BreadcrumbsBorderedItem → Atoms/BreadcrumbsItem}/index.js +2 -0
- package/dist/components/{Button → Atoms/Button}/Styles.css +0 -0
- package/dist/components/Atoms/Button/button.stories.js +68 -0
- package/dist/components/{Button → Atoms/Button}/index.js +28 -24
- package/dist/components/Atoms/Collapsible/Collapsible.stories.js +144 -0
- package/dist/components/Atoms/Collapsible/index.js +111 -0
- package/dist/components/Atoms/Column/Column.stories.js +24 -0
- package/dist/components/{Column → Atoms/Column}/index.js +22 -4
- package/dist/components/Atoms/Icon/Icon.stories.js +21 -0
- package/dist/components/{Icon → Atoms/Icon}/index.js +2 -0
- package/dist/components/Atoms/Image/Image.stories.js +21 -0
- package/dist/components/Atoms/Image/index.js +66 -0
- package/dist/components/Atoms/InformationIcon/InformationIcon.stories.js +95 -0
- package/dist/components/{InformationIcon → Atoms/InformationIcon}/index.js +3 -2
- package/dist/components/Atoms/Input/Input.stories.js +47 -0
- package/dist/components/Atoms/Input/index.js +40 -0
- package/dist/components/Atoms/NavItem/NavItem.stories.js +100 -0
- package/dist/components/{NavItem → Atoms/NavItem}/index.js +7 -6
- package/dist/components/Atoms/Row/Row.stories.js +18 -0
- package/dist/components/Atoms/Row/index.js +35 -0
- package/dist/components/Atoms/StarRating/StarRating.stories.js +22 -0
- package/dist/components/Atoms/StarRating/index.css +8 -0
- package/dist/components/{StarRating → Atoms/StarRating}/index.js +2 -2
- package/dist/components/Atoms/TextAndTitle/TextAndTitle.stories.js +53 -0
- package/dist/components/{TextAndTitle → Atoms/TextAndTitle}/index.js +10 -2
- package/dist/components/Atoms/Tubestops/Tubestops.stories.js +49 -0
- package/dist/components/Atoms/Tubestops/index.js +59 -0
- package/dist/components/Atoms/Tubestops/styles.css +92 -0
- package/dist/components/Atoms/Video/Video.stories.js +29 -0
- package/dist/components/Atoms/Video/index.js +57 -0
- package/dist/components/Organisms/Accordion/Accordion.stories.js +99 -0
- package/dist/components/Organisms/Accordion/index.js +46 -0
- package/dist/components/Organisms/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +122 -0
- package/dist/components/{BreadcrumbsBordered → Organisms/BreadcrumbsBordered}/index.js +4 -2
- package/dist/components/Organisms/Card/Card.stories.js +352 -0
- package/dist/components/{Card → Organisms/Card}/index.js +38 -2
- package/dist/components/Organisms/CardWithTopImage/CardWithTopImage.stories.js +64 -0
- package/dist/components/Organisms/CardWithTopImage/index.js +59 -0
- package/dist/components/Organisms/CardWithTopImage/styles.css +3 -0
- package/dist/components/Organisms/Carousel/Carousel.stories.js +111 -0
- package/dist/components/Organisms/Carousel/index.css +7 -0
- package/dist/components/{Carousel → Organisms/Carousel}/index.js +5 -2
- package/dist/components/Organisms/Chevron Card/ChevronCard.stories.js +18 -0
- package/dist/components/Organisms/Chevron Card/index.js +60 -0
- package/dist/components/Organisms/Chevron Card/styles.css +0 -0
- package/dist/components/Organisms/Form/Form.stories.js +118 -0
- package/dist/components/{Form → Organisms/Form}/index.js +6 -4
- package/dist/components/Organisms/FyreCard/FyreCard.stories.js +127 -0
- package/dist/components/{Input → Organisms/FyreCard}/index.js +34 -30
- package/dist/components/Organisms/ImageLink/ImageLink.stories.js +64 -0
- package/dist/components/Organisms/ImageLink/index.js +45 -0
- package/dist/components/Organisms/ImageLinkList/ImageLinkList.stories.js +35 -0
- package/dist/components/Organisms/ImageLinkList/index.js +33 -0
- package/dist/components/Organisms/Jumbotron/Jumbotron.stories.js +42 -0
- package/dist/components/{Jumbotron → Organisms/Jumbotron}/index.js +8 -6
- package/dist/components/Organisms/Nav/Nav.stories.js +103 -0
- package/dist/components/{Nav → Organisms/Nav}/index.js +65 -20
- package/dist/components/Organisms/NewsCard/NewsCard.stories.js +56 -0
- package/dist/components/Organisms/NewsCard/index.js +73 -0
- package/dist/components/Organisms/Profile/Profile.stories.js +85 -0
- package/dist/components/{Profile → Organisms/Profile}/index.js +10 -7
- package/dist/components/Organisms/Search/Search.stories.js +44 -0
- package/dist/components/{Search → Organisms/Search}/index.js +22 -13
- package/dist/components/Organisms/Testimonial/Testimonial.stories.js +103 -0
- package/dist/components/{Testimonial → Organisms/Testimonial}/index.js +2 -0
- package/dist/components/Organisms/Timeline/Timeline.stories.js +73 -0
- package/dist/components/Organisms/Timeline/index.js +127 -0
- package/dist/components/Organisms/Timeline/styles.css +89 -0
- package/dist/components/Organisms/UserIcon/UserIcon.stories.js +41 -0
- package/dist/components/{UserIcon → Organisms/UserIcon}/index.js +2 -0
- package/dist/index.js +84 -52
- package/dist/utils/controls.js +505 -0
- package/package.json +28 -24
- package/dist/components/Accordion/Accordion.stories.js +0 -64
- package/dist/components/Accordion/README.md +0 -29
- package/dist/components/Accordion/index.js +0 -40
- package/dist/components/AlertBar/AlertBar.stories.js +0 -128
- package/dist/components/AlertBar/README.md +0 -19
- package/dist/components/AlertBar/index.js +0 -43
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.js +0 -60
- package/dist/components/Breadcrumbs/README.md +0 -28
- package/dist/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +0 -73
- package/dist/components/BreadcrumbsBordered/README.md +0 -28
- package/dist/components/BreadcrumbsBorderedItem/BreadcrumbsBorderedItem.stories.js +0 -57
- package/dist/components/BreadcrumbsBorderedItem/README.md +0 -28
- package/dist/components/BreadcrumbsBorderedItem/index.css +0 -57
- package/dist/components/Button/Button.stories.js +0 -389
- package/dist/components/Button/README.md +0 -36
- package/dist/components/Card/Card.stories.js +0 -353
- package/dist/components/Card/README.md +0 -44
- package/dist/components/CardImageLink/CardImageLink.stories.js +0 -115
- package/dist/components/CardImageLink/README.md +0 -1
- package/dist/components/CardImageLink/index.js +0 -49
- package/dist/components/CardImageLinkList/CardImageLinkList.stories.js +0 -63
- package/dist/components/CardImageLinkList/README.md +0 -1
- package/dist/components/CardImageLinkList/index.js +0 -48
- package/dist/components/Carousel/Carousel.stories.js +0 -124
- package/dist/components/Carousel/README.md +0 -22
- package/dist/components/Carousel/index.css +0 -7
- package/dist/components/Collapsible/Collapsible.stories.js +0 -101
- package/dist/components/Collapsible/README.md +0 -19
- package/dist/components/Collapsible/index.js +0 -58
- package/dist/components/Column/Column.stories.js +0 -168
- package/dist/components/Column/README.md +0 -23
- package/dist/components/Form/Form.stories.js +0 -59
- package/dist/components/Form/README.md +0 -16
- package/dist/components/Icon/Icon.stories.js +0 -68
- package/dist/components/Icon/README.md +0 -12
- package/dist/components/Image/Image.stories.js +0 -62
- package/dist/components/Image/README.md +0 -12
- package/dist/components/Image/index.js +0 -31
- package/dist/components/InformationIcon/InformationIcon.stories.js +0 -122
- package/dist/components/InformationIcon/README.md +0 -23
- package/dist/components/Input/Input.stories.js +0 -58
- package/dist/components/Input/README.md +0 -23
- package/dist/components/Jumbotron/Jumbotron.stories.js +0 -118
- package/dist/components/Jumbotron/README.md +0 -24
- package/dist/components/ListItem/ListItem.stories.js +0 -50
- package/dist/components/ListItem/README.md +0 -17
- package/dist/components/ListItem/index.js +0 -25
- package/dist/components/ListItemDropdown/ListItemDropdown.stories.js +0 -50
- package/dist/components/ListItemDropdown/README.md +0 -16
- package/dist/components/ListItemDropdown/index.js +0 -56
- package/dist/components/Nav/Nav.stories.js +0 -322
- package/dist/components/Nav/README.md +0 -30
- package/dist/components/NavItem/NavItem.stories.js +0 -150
- package/dist/components/NavItem/README.md +0 -36
- package/dist/components/Profile/Profile.stories.js +0 -86
- package/dist/components/Profile/README.md +0 -17
- package/dist/components/Profile/user.jpeg +0 -0
- package/dist/components/Search/README.md +0 -21
- package/dist/components/Search/Search.stories.js +0 -122
- package/dist/components/StarRating/README.md +0 -12
- package/dist/components/StarRating/StarRating.stories.js +0 -79
- package/dist/components/StarRating/index.css +0 -8
- package/dist/components/Testimonial/README.md +0 -22
- package/dist/components/Testimonial/Testimonial.stories.js +0 -125
- package/dist/components/TextAndTitle/README.md +0 -14
- package/dist/components/TextAndTitle/TextAndTitle.stories.js +0 -66
- package/dist/components/UserIcon/README.md +0 -18
- package/dist/components/UserIcon/UserIcon.stories.js +0 -38
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import AlertBar from './index';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Trepur Components/Atoms/AlertBar',
|
|
6
|
+
component: AlertBar,
|
|
7
|
+
parameters: {},
|
|
8
|
+
argTypes: {
|
|
9
|
+
text: {
|
|
10
|
+
description: 'The text the appears as an overlay on the Jumbotron',
|
|
11
|
+
control: 'text',
|
|
12
|
+
table: {
|
|
13
|
+
category: ''
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
textColor: {
|
|
17
|
+
description: '',
|
|
18
|
+
control: 'color',
|
|
19
|
+
table: {
|
|
20
|
+
category: 'Colors'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
type: {
|
|
24
|
+
description: 'Select',
|
|
25
|
+
options: ['success', 'warning', 'error'],
|
|
26
|
+
control: { type: 'select' },
|
|
27
|
+
table: {
|
|
28
|
+
category: '',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
leftIcon: {
|
|
32
|
+
description: '',
|
|
33
|
+
control: 'text',
|
|
34
|
+
table: {
|
|
35
|
+
category: ''
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
leftIconColor: {
|
|
39
|
+
description: '',
|
|
40
|
+
control: 'color',
|
|
41
|
+
table: {
|
|
42
|
+
category: 'Colors'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
rightIcon: {
|
|
46
|
+
description: '',
|
|
47
|
+
control: 'text',
|
|
48
|
+
table: {
|
|
49
|
+
category: ''
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
rightIconColor: {
|
|
53
|
+
description: '',
|
|
54
|
+
control: 'color',
|
|
55
|
+
table: {
|
|
56
|
+
category: 'Colors'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
args: {
|
|
61
|
+
text: 'this is a message',
|
|
62
|
+
type: 'success'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const Template = (args) => <AlertBar {...args} />
|
|
67
|
+
|
|
68
|
+
export const _AlertBar = Template.bind({});
|
|
69
|
+
_AlertBar.args = {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Icon = _interopRequireDefault(require("../../Atoms/Icon"));
|
|
13
|
+
|
|
14
|
+
require("../../../../index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
const AlertBar = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
type,
|
|
25
|
+
text,
|
|
26
|
+
leftIcon,
|
|
27
|
+
rightIcon,
|
|
28
|
+
textColor,
|
|
29
|
+
leftIconColor,
|
|
30
|
+
rightIconColor
|
|
31
|
+
} = _ref;
|
|
32
|
+
let bgColor;
|
|
33
|
+
if (type === 'success') bgColor = 'bg-brand-success';
|
|
34
|
+
if (type === 'warning') bgColor = 'bg-brand-warning';
|
|
35
|
+
if (type === 'error') bgColor = 'bg-brand-error';
|
|
36
|
+
let iconLeft = leftIcon ? /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
37
|
+
type: leftIcon
|
|
38
|
+
}) : null;
|
|
39
|
+
let iconRight = rightIcon ? /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
40
|
+
type: rightIcon
|
|
41
|
+
}) : null;
|
|
42
|
+
const [styles, setStyles] = (0, _react.useState)({
|
|
43
|
+
'color': textColor
|
|
44
|
+
});
|
|
45
|
+
const [leftIconStyles, setLeftIconStyles] = (0, _react.useState)({
|
|
46
|
+
'color': leftIconColor
|
|
47
|
+
});
|
|
48
|
+
const [rightIconStyles, setRightIconStyles] = (0, _react.useState)({
|
|
49
|
+
'color': rightIconColor
|
|
50
|
+
});
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
+
className: 'w-parent flex text-center h-8 ' + bgColor
|
|
53
|
+
}, leftIcon && /*#__PURE__*/_react.default.createElement("span", {
|
|
54
|
+
style: leftIconStyles,
|
|
55
|
+
className: "pt-1 left-5 pl-8"
|
|
56
|
+
}, iconLeft), /*#__PURE__*/_react.default.createElement("h3", {
|
|
57
|
+
style: styles,
|
|
58
|
+
className: "w-full text-center pt-1 pl-8"
|
|
59
|
+
}, text), rightIcon && /*#__PURE__*/_react.default.createElement("span", {
|
|
60
|
+
style: rightIconStyles,
|
|
61
|
+
className: "px-8 pt-1 float-right"
|
|
62
|
+
}, iconRight));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var _default = AlertBar;
|
|
66
|
+
exports.default = _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Breadcrumbs from './index'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Trepur Components/Atoms/Breadcrumbs',
|
|
6
|
+
components: Breadcrumbs,
|
|
7
|
+
argTypes: {
|
|
8
|
+
links: {
|
|
9
|
+
description: '',
|
|
10
|
+
control: 'array',
|
|
11
|
+
table: {
|
|
12
|
+
category: ''
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
args: {
|
|
17
|
+
links: [
|
|
18
|
+
{
|
|
19
|
+
link: '/',
|
|
20
|
+
name: 'link 1'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
link: '/',
|
|
24
|
+
name: 'link 2'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
link: '/',
|
|
28
|
+
name: 'link 3'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
link: '/',
|
|
32
|
+
name: 'link 4'
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const Template = (args) => <Breadcrumbs {...args} />;
|
|
39
|
+
|
|
40
|
+
export const _Breadcrumbs = Template.bind({});
|
|
41
|
+
_Breadcrumbs.args = {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Column from '../Column';
|
|
3
|
+
import BreadcrumbsItem from './index'
|
|
4
|
+
import './index.css';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Trepur Components/Atoms/Breadcrumbs Item',
|
|
8
|
+
components: BreadcrumbsItem,
|
|
9
|
+
parameters: {},
|
|
10
|
+
argTypes: {
|
|
11
|
+
link: {
|
|
12
|
+
description: '',
|
|
13
|
+
control: 'text',
|
|
14
|
+
table: {
|
|
15
|
+
category: ''
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
description: '',
|
|
20
|
+
control: 'text',
|
|
21
|
+
table: {
|
|
22
|
+
category: ''
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
textColor: {
|
|
26
|
+
description: '',
|
|
27
|
+
control: 'color',
|
|
28
|
+
table: {
|
|
29
|
+
category: 'Colors'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
bgColor: {
|
|
33
|
+
description: '',
|
|
34
|
+
control: 'color',
|
|
35
|
+
table: {
|
|
36
|
+
category: 'Colors'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
borderColor: {
|
|
40
|
+
description: '',
|
|
41
|
+
control: 'color',
|
|
42
|
+
table: {
|
|
43
|
+
category: 'Colors'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
hoverBgColor: {
|
|
47
|
+
description: '',
|
|
48
|
+
control: 'color',
|
|
49
|
+
table: {
|
|
50
|
+
category: 'Colors',
|
|
51
|
+
subcategory: 'Hover'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
hoverTextColor: {
|
|
55
|
+
description: '',
|
|
56
|
+
control: 'color',
|
|
57
|
+
table: {
|
|
58
|
+
category: 'Colors',
|
|
59
|
+
subcategory: 'Hover'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
hoverBorderColor: {
|
|
63
|
+
description: '',
|
|
64
|
+
control: 'color',
|
|
65
|
+
table: {
|
|
66
|
+
category: 'Colors',
|
|
67
|
+
subcategory: 'Hover'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
type: {
|
|
71
|
+
description: '',
|
|
72
|
+
control: 'text',
|
|
73
|
+
table: {
|
|
74
|
+
category: '',
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
args: {
|
|
79
|
+
name: 'Link 1',
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const Template = (args) => <Column sm={1}><BreadcrumbsItem {...args} /></Column>
|
|
84
|
+
|
|
85
|
+
export const _BreadcrumbsItem = Template.bind({});
|
|
86
|
+
_BreadcrumbsItem.args = {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.right-arrow {
|
|
2
|
+
@apply w-0;
|
|
3
|
+
@apply h-0;
|
|
4
|
+
border-top: 17px solid transparent;
|
|
5
|
+
border-bottom: 15px solid transparent;
|
|
6
|
+
border-left: 16px solid;
|
|
7
|
+
@apply absolute;
|
|
8
|
+
right: -16px;
|
|
9
|
+
@apply top-0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.test-arrow-bottom {
|
|
13
|
+
@apply w-0;
|
|
14
|
+
@apply h-0;
|
|
15
|
+
border-top: 17px solid;
|
|
16
|
+
border-bottom: 18px solid transparent;
|
|
17
|
+
border-left: 17px solid transparent;
|
|
18
|
+
@apply absolute;
|
|
19
|
+
left: -17px;
|
|
20
|
+
bottom: -0px;
|
|
21
|
+
-webkit-transform: scaleY(-1);
|
|
22
|
+
transform: scaleY(-1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.test-arrow-top {
|
|
26
|
+
@apply w-0;
|
|
27
|
+
@apply h-0;
|
|
28
|
+
border-top: 18px solid;
|
|
29
|
+
border-bottom: 17px solid transparent;
|
|
30
|
+
border-left: 17px solid transparent;
|
|
31
|
+
@apply absolute;
|
|
32
|
+
left: -17px;
|
|
33
|
+
top: 0px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.bc-item {
|
|
37
|
+
@apply relative;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.bc-item:focus {
|
|
41
|
+
@apply border-0;
|
|
42
|
+
}
|
|
@@ -9,6 +9,8 @@ require("core-js/modules/web.dom-collections.iterator.js");
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
require("../../../../index.css");
|
|
13
|
+
|
|
12
14
|
require("./index.css");
|
|
13
15
|
|
|
14
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
File without changes
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Button from './index'
|
|
3
|
+
import { action } from '@storybook/addon-actions'
|
|
4
|
+
import './Styles.css'
|
|
5
|
+
import { buttonOptions } from '../../../utils/controls'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Trepur Components/Atoms/Button',
|
|
9
|
+
component: Button,
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: 'A Button which can either be internal, external or social as well as a standard design or a slide design.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
...buttonOptions
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const Template = (args) => <Button {...args} />;
|
|
25
|
+
|
|
26
|
+
export const HoverButton = Template.bind({});
|
|
27
|
+
HoverButton.args = {
|
|
28
|
+
ctaText: 'This is a button',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const SocialButtonFacebook = Template.bind({});
|
|
32
|
+
SocialButtonFacebook.args = {
|
|
33
|
+
onClick: action('button-click'),
|
|
34
|
+
buttonCenterIcon: 'facebook-f',
|
|
35
|
+
hoverButtonBgColor: 'white',
|
|
36
|
+
buttonBgColor: '#3b5999',
|
|
37
|
+
buttonTextColor: 'white',
|
|
38
|
+
hoverButtonTextColor: '#3b5999',
|
|
39
|
+
hoverButtonBorderColor: '#3b5999',
|
|
40
|
+
buttonType: 'social',
|
|
41
|
+
url: '/'
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const SocialButtonWhatsapp = Template.bind({});
|
|
45
|
+
SocialButtonWhatsapp.args = {
|
|
46
|
+
onClick: action('button-click'),
|
|
47
|
+
buttonCenterIcon: 'whatsapp',
|
|
48
|
+
hoverButtonBgColor: 'white',
|
|
49
|
+
buttonBgColor: '#25d366',
|
|
50
|
+
buttonTextColor: 'white',
|
|
51
|
+
hoverButtonTextColor: '#25d366',
|
|
52
|
+
hoverButtonBorderColor: '#25d366',
|
|
53
|
+
buttonType: 'social',
|
|
54
|
+
url: '/'
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const SocialButtonTwitter = Template.bind({});
|
|
58
|
+
SocialButtonTwitter.args = {
|
|
59
|
+
onClick: action('button-click'),
|
|
60
|
+
buttonCenterIcon: 'twitter',
|
|
61
|
+
hoverButtonBgColor: 'white',
|
|
62
|
+
buttonBgColor: '#55acee',
|
|
63
|
+
buttonTextColor: 'white',
|
|
64
|
+
hoverButtonTextColor: '#55acee',
|
|
65
|
+
hoverButtonBorderColor: '#55acee',
|
|
66
|
+
buttonType: 'social',
|
|
67
|
+
url: '/'
|
|
68
|
+
};
|
|
@@ -11,7 +11,11 @@ require("core-js/modules/web.dom-collections.iterator.js");
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _Icon = _interopRequireDefault(require("../../Atoms/Icon"));
|
|
15
|
+
|
|
16
|
+
require("../../../../index.css");
|
|
17
|
+
|
|
18
|
+
require("./Styles.css");
|
|
15
19
|
|
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
21
|
|
|
@@ -26,14 +30,14 @@ const Button = _ref => {
|
|
|
26
30
|
ctaText,
|
|
27
31
|
className,
|
|
28
32
|
onClick,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
buttonLeftIcon,
|
|
34
|
+
buttonRightIcon,
|
|
35
|
+
buttonCenterIcon,
|
|
36
|
+
buttonBgColor,
|
|
37
|
+
buttonTextColor,
|
|
34
38
|
borderColor,
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
hoverButtonBgColor,
|
|
40
|
+
hoverButtonTextColor,
|
|
37
41
|
hoverBorderColor,
|
|
38
42
|
hoverCtaText,
|
|
39
43
|
url,
|
|
@@ -54,24 +58,24 @@ const Button = _ref => {
|
|
|
54
58
|
classes = slideClasses;
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
let iconLeft =
|
|
61
|
+
let iconLeft = buttonLeftIcon && /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
58
62
|
className: "pr-2",
|
|
59
|
-
type:
|
|
63
|
+
type: buttonLeftIcon
|
|
60
64
|
});
|
|
61
65
|
|
|
62
|
-
let iconRight =
|
|
66
|
+
let iconRight = buttonRightIcon && /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
63
67
|
className: "pl-2",
|
|
64
|
-
type:
|
|
68
|
+
type: buttonRightIcon
|
|
65
69
|
});
|
|
66
70
|
|
|
67
|
-
let iconCenter =
|
|
68
|
-
type:
|
|
71
|
+
let iconCenter = buttonCenterIcon && /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
72
|
+
type: buttonCenterIcon
|
|
69
73
|
}); //---------- Styling ---------------
|
|
70
74
|
|
|
71
75
|
|
|
72
76
|
const [styles, setStyles] = (0, _react.useState)({
|
|
73
|
-
'backgroundColor':
|
|
74
|
-
color:
|
|
77
|
+
'backgroundColor': buttonBgColor ? buttonBgColor : 'white',
|
|
78
|
+
color: buttonTextColor ? buttonTextColor : 'black',
|
|
75
79
|
'borderColor': borderColor ? borderColor : 'black'
|
|
76
80
|
});
|
|
77
81
|
const [hovering, setHovering] = (0, _react.useState)(false);
|
|
@@ -80,15 +84,15 @@ const Button = _ref => {
|
|
|
80
84
|
if (isHovering) {
|
|
81
85
|
setHovering(true);
|
|
82
86
|
setStyles({
|
|
83
|
-
'backgroundColor':
|
|
84
|
-
color:
|
|
87
|
+
'backgroundColor': hoverButtonBgColor ? hoverButtonBgColor : 'black',
|
|
88
|
+
color: hoverButtonTextColor ? hoverButtonTextColor : 'white',
|
|
85
89
|
'borderColor': hoverBorderColor ? hoverBorderColor : 'black'
|
|
86
90
|
});
|
|
87
91
|
} else {
|
|
88
92
|
setHovering(false);
|
|
89
93
|
setStyles({
|
|
90
|
-
'backgroundColor':
|
|
91
|
-
color:
|
|
94
|
+
'backgroundColor': buttonBgColor ? buttonBgColor : 'white',
|
|
95
|
+
color: buttonTextColor ? buttonTextColor : 'black',
|
|
92
96
|
'borderColor': borderColor ? borderColor : 'black'
|
|
93
97
|
});
|
|
94
98
|
}
|
|
@@ -105,7 +109,7 @@ const Button = _ref => {
|
|
|
105
109
|
onMouseOver: () => setHoverState(true),
|
|
106
110
|
onMouseOut: () => setHoverState(false),
|
|
107
111
|
className: classes
|
|
108
|
-
},
|
|
112
|
+
}, buttonLeftIcon && iconLeft, hovering ? hoverCtaText ? hoverCtaText : ctaText : ctaText, buttonRightIcon && iconRight));
|
|
109
113
|
} else if (buttonType === 'internal') {
|
|
110
114
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
111
115
|
href: url,
|
|
@@ -115,7 +119,7 @@ const Button = _ref => {
|
|
|
115
119
|
onMouseOver: () => setHoverState(true),
|
|
116
120
|
onMouseOut: () => setHoverState(false),
|
|
117
121
|
className: classes
|
|
118
|
-
},
|
|
122
|
+
}, buttonLeftIcon && iconLeft, hovering ? hoverCtaText ? hoverCtaText : ctaText : ctaText, buttonRightIcon && iconRight));
|
|
119
123
|
} else if (buttonType === 'social') {
|
|
120
124
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
121
125
|
href: url,
|
|
@@ -126,7 +130,7 @@ const Button = _ref => {
|
|
|
126
130
|
onMouseOver: () => setHoverState(true),
|
|
127
131
|
onMouseOut: () => setHoverState(false),
|
|
128
132
|
className: classes
|
|
129
|
-
},
|
|
133
|
+
}, buttonCenterIcon && iconCenter));
|
|
130
134
|
}
|
|
131
135
|
|
|
132
136
|
return /*#__PURE__*/_react.default.createElement("button", _extends({
|
|
@@ -138,7 +142,7 @@ const Button = _ref => {
|
|
|
138
142
|
}, {
|
|
139
143
|
href: url,
|
|
140
144
|
className: classes
|
|
141
|
-
}),
|
|
145
|
+
}), buttonLeftIcon && iconLeft, hovering ? hoverCtaText ? hoverCtaText : ctaText : ctaText, buttonRightIcon && iconRight);
|
|
142
146
|
};
|
|
143
147
|
|
|
144
148
|
var _default = Button;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Collapsible from './index';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Trepur Components/Atoms/Collapsible',
|
|
6
|
+
components: Collapsible,
|
|
7
|
+
parameters: {},
|
|
8
|
+
argTypes: {
|
|
9
|
+
title: {
|
|
10
|
+
description: '',
|
|
11
|
+
control: 'text',
|
|
12
|
+
table: {
|
|
13
|
+
category: ''
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
subtitle: {
|
|
17
|
+
description: '',
|
|
18
|
+
control: 'text',
|
|
19
|
+
table: {
|
|
20
|
+
category: ''
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
isDropdown: {
|
|
24
|
+
description: '',
|
|
25
|
+
control: 'boolean',
|
|
26
|
+
table: {
|
|
27
|
+
category: ''
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
icon: {
|
|
31
|
+
description: '',
|
|
32
|
+
control: 'text',
|
|
33
|
+
table: {
|
|
34
|
+
category: ''
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
content: {
|
|
38
|
+
description: '',
|
|
39
|
+
control: 'text',
|
|
40
|
+
table: {
|
|
41
|
+
category: ''
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
boldTitle: {
|
|
45
|
+
description: '',
|
|
46
|
+
control: 'boolean',
|
|
47
|
+
table: {
|
|
48
|
+
category: ''
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
borderTop: {
|
|
52
|
+
description: '',
|
|
53
|
+
control: 'boolean',
|
|
54
|
+
table: {
|
|
55
|
+
category: ''
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
borderBottom: {
|
|
59
|
+
description: '',
|
|
60
|
+
control: 'boolean',
|
|
61
|
+
table: {
|
|
62
|
+
category: ''
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
showBottomLine: {
|
|
66
|
+
description: '',
|
|
67
|
+
control: 'boolean',
|
|
68
|
+
table: {
|
|
69
|
+
category: ''
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
children: {
|
|
73
|
+
description: '',
|
|
74
|
+
control: 'array',
|
|
75
|
+
table: {
|
|
76
|
+
category: ''
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
contentBgColor: {
|
|
80
|
+
description: '',
|
|
81
|
+
control: 'color',
|
|
82
|
+
table: {
|
|
83
|
+
category: 'Colors'
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
contentTextColor: {
|
|
87
|
+
description: '',
|
|
88
|
+
control: 'color',
|
|
89
|
+
table: {
|
|
90
|
+
category: 'Colors'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
bgColor: {
|
|
94
|
+
description: '',
|
|
95
|
+
control: 'color',
|
|
96
|
+
table: {
|
|
97
|
+
category: 'Colors'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
textColor: {
|
|
101
|
+
description: '',
|
|
102
|
+
control: 'color',
|
|
103
|
+
table: {
|
|
104
|
+
category: 'Colors'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
hoverBgColor: {
|
|
108
|
+
description: '',
|
|
109
|
+
control: 'color',
|
|
110
|
+
table: {
|
|
111
|
+
category: 'Colors',
|
|
112
|
+
subcategory: 'Hover'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
hoverTextColor: {
|
|
116
|
+
description: '',
|
|
117
|
+
control: 'color',
|
|
118
|
+
table: {
|
|
119
|
+
category: 'Colors',
|
|
120
|
+
subcategory: 'Hover'
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
iconSize: {
|
|
124
|
+
description: 'Between 1 and 5',
|
|
125
|
+
control: 'number',
|
|
126
|
+
table: {
|
|
127
|
+
category: '',
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
args: {
|
|
132
|
+
title: 'This is a title',
|
|
133
|
+
subtitle: 'This is a subtitle',
|
|
134
|
+
isDropdown: true,
|
|
135
|
+
icon: 'th',
|
|
136
|
+
boldTitle: true,
|
|
137
|
+
children: [<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Error, unde perferendis quibusdam eos repellendus vero rerum sunt reiciendis velit autem odio, fuga molestiae perspiciatis dolor voluptatum mollitia quos ipsa! Doloribus? Lorem ipsum, dolor sit amet consectetur adipisicing elit. Reiciendis ducimus, dolorum tempore unde earum aspernatur placeat magnam, alias neque, blanditiis esse tenetur dignissimos in optio nihil libero cum cupiditate debitis?</p>]
|
|
138
|
+
},
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const Template = (args) => <Collapsible {...args} />;
|
|
142
|
+
|
|
143
|
+
export const _Collapsible = Template.bind({});
|
|
144
|
+
_Collapsible.args = {};
|