trepur_components 0.1.41 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +84 -0
- package/dist/components/Atoms/AlertBar/index.js +66 -0
- package/dist/components/Atoms/Breadcrumbs/Breadcrumbs.stories.js +49 -0
- package/dist/components/{Breadcrumbs → Atoms/Breadcrumbs}/index.js +2 -0
- package/dist/components/Atoms/BreadcrumbsItem/BreadcrumbsItem.stories.js +103 -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 +86 -0
- package/dist/components/Atoms/Button/button.stories.mdx +72 -0
- package/dist/components/{Button → Atoms/Button}/index.js +28 -24
- package/dist/components/Atoms/Collapsible/Collapsible.stories.js +157 -0
- package/dist/components/Atoms/Collapsible/index.js +111 -0
- package/dist/components/Atoms/Column/Column.stories.js +42 -0
- package/dist/components/{Column → Atoms/Column}/index.js +22 -4
- package/dist/components/Atoms/Icon/Icon.stories.js +39 -0
- package/dist/components/{Icon → Atoms/Icon}/index.js +2 -0
- package/dist/components/Atoms/Image/Image.stories.js +40 -0
- package/dist/components/Atoms/Image/index.js +66 -0
- package/dist/components/Atoms/InformationIcon/InformationIcon.stories.js +108 -0
- package/dist/components/{InformationIcon → Atoms/InformationIcon}/index.js +3 -2
- package/dist/components/Atoms/Input/Input.stories.js +60 -0
- package/dist/components/Atoms/Input/index.js +40 -0
- package/dist/components/Atoms/NavItem/NavItem.stories.js +115 -0
- package/dist/components/{NavItem → Atoms/NavItem}/index.js +7 -6
- package/dist/components/Atoms/Row/Row.stories.js +33 -0
- package/dist/components/Atoms/Row/index.js +35 -0
- package/dist/components/Atoms/StarRating/StarRating.stories.js +41 -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 +66 -0
- package/dist/components/{TextAndTitle → Atoms/TextAndTitle}/index.js +10 -2
- package/dist/components/Atoms/Tubestops/Tubestops.stories.js +57 -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 +50 -0
- package/dist/components/Atoms/Video/index.js +57 -0
- package/dist/components/{Accordion → Organisms/Accordion}/Accordion.stories.js +69 -30
- package/dist/components/Organisms/Accordion/index.js +46 -0
- package/dist/components/Organisms/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +125 -0
- package/dist/components/{BreadcrumbsBordered → Organisms/BreadcrumbsBordered}/index.js +4 -2
- package/dist/components/Organisms/Card/Card.stories.js +359 -0
- package/dist/components/{Card → Organisms/Card}/index.js +38 -2
- package/dist/components/Organisms/CardWithTopImage/CardWithTopImage.stories.js +73 -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 +130 -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 +28 -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 +124 -0
- package/dist/components/{Form → Organisms/Form}/index.js +6 -4
- package/dist/components/Organisms/FyreCard/FyreCard.stories.js +136 -0
- package/dist/components/{Input → Organisms/FyreCard}/index.js +34 -30
- package/dist/components/Organisms/ImageLink/ImageLink.stories.js +87 -0
- package/dist/components/Organisms/ImageLink/index.js +45 -0
- package/dist/components/Organisms/ImageLinkList/ImageLinkList.stories.js +48 -0
- package/dist/components/Organisms/ImageLinkList/index.js +33 -0
- package/dist/components/Organisms/Jumbotron/Jumbotron.stories.js +55 -0
- package/dist/components/{Jumbotron → Organisms/Jumbotron}/index.js +8 -6
- package/dist/components/Organisms/Nav/Nav.stories.js +113 -0
- package/dist/components/{Nav → Organisms/Nav}/index.js +79 -44
- package/dist/components/Organisms/NewsCard/NewsCard.stories.js +69 -0
- package/dist/components/Organisms/NewsCard/index.js +73 -0
- package/dist/components/Organisms/Profile/Profile.stories.js +94 -0
- package/dist/components/{Profile → Organisms/Profile}/index.js +10 -7
- package/dist/components/Organisms/Search/Search.stories.js +57 -0
- package/dist/components/{Search → Organisms/Search}/index.js +22 -13
- package/dist/components/Organisms/Testimonial/Testimonial.stories.js +116 -0
- package/dist/components/{Testimonial → Organisms/Testimonial}/index.js +2 -0
- package/dist/components/Organisms/Timeline/Timeline.stories.js +77 -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 +55 -0
- package/dist/components/{UserIcon → Organisms/UserIcon}/index.js +2 -0
- package/dist/index.js +91 -51
- package/dist/utils/controls.js +505 -0
- package/package.json +24 -23
- 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 -320
- package/dist/components/Nav/README.md +0 -45
- 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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Collapsible = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: 'Trepur Components/Atoms/Collapsible',
|
|
16
|
+
components: _index.default,
|
|
17
|
+
parameters: {},
|
|
18
|
+
argTypes: {
|
|
19
|
+
title: {
|
|
20
|
+
description: '',
|
|
21
|
+
control: 'text',
|
|
22
|
+
table: {
|
|
23
|
+
category: ''
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
subtitle: {
|
|
27
|
+
description: '',
|
|
28
|
+
control: 'text',
|
|
29
|
+
table: {
|
|
30
|
+
category: ''
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
isDropdown: {
|
|
34
|
+
description: '',
|
|
35
|
+
control: 'boolean',
|
|
36
|
+
table: {
|
|
37
|
+
category: ''
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
icon: {
|
|
41
|
+
description: '',
|
|
42
|
+
control: 'text',
|
|
43
|
+
table: {
|
|
44
|
+
category: ''
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
content: {
|
|
48
|
+
description: '',
|
|
49
|
+
control: 'text',
|
|
50
|
+
table: {
|
|
51
|
+
category: ''
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
boldTitle: {
|
|
55
|
+
description: '',
|
|
56
|
+
control: 'boolean',
|
|
57
|
+
table: {
|
|
58
|
+
category: ''
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
borderTop: {
|
|
62
|
+
description: '',
|
|
63
|
+
control: 'boolean',
|
|
64
|
+
table: {
|
|
65
|
+
category: ''
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
borderBottom: {
|
|
69
|
+
description: '',
|
|
70
|
+
control: 'boolean',
|
|
71
|
+
table: {
|
|
72
|
+
category: ''
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
showBottomLine: {
|
|
76
|
+
description: '',
|
|
77
|
+
control: 'boolean',
|
|
78
|
+
table: {
|
|
79
|
+
category: ''
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
children: {
|
|
83
|
+
description: '',
|
|
84
|
+
control: 'array',
|
|
85
|
+
table: {
|
|
86
|
+
category: ''
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
contentBgColor: {
|
|
90
|
+
description: '',
|
|
91
|
+
control: 'color',
|
|
92
|
+
table: {
|
|
93
|
+
category: 'Colors'
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
contentTextColor: {
|
|
97
|
+
description: '',
|
|
98
|
+
control: 'color',
|
|
99
|
+
table: {
|
|
100
|
+
category: 'Colors'
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
bgColor: {
|
|
104
|
+
description: '',
|
|
105
|
+
control: 'color',
|
|
106
|
+
table: {
|
|
107
|
+
category: 'Colors'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
textColor: {
|
|
111
|
+
description: '',
|
|
112
|
+
control: 'color',
|
|
113
|
+
table: {
|
|
114
|
+
category: 'Colors'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
hoverBgColor: {
|
|
118
|
+
description: '',
|
|
119
|
+
control: 'color',
|
|
120
|
+
table: {
|
|
121
|
+
category: 'Colors',
|
|
122
|
+
subcategory: 'Hover'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
hoverTextColor: {
|
|
126
|
+
description: '',
|
|
127
|
+
control: 'color',
|
|
128
|
+
table: {
|
|
129
|
+
category: 'Colors',
|
|
130
|
+
subcategory: 'Hover'
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
iconSize: {
|
|
134
|
+
description: 'Between 1 and 5',
|
|
135
|
+
control: 'number',
|
|
136
|
+
table: {
|
|
137
|
+
category: ''
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
args: {
|
|
142
|
+
title: 'This is a title',
|
|
143
|
+
subtitle: 'This is a subtitle',
|
|
144
|
+
isDropdown: true,
|
|
145
|
+
icon: 'th',
|
|
146
|
+
boldTitle: true,
|
|
147
|
+
children: [/*#__PURE__*/_react.default.createElement("p", null, "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?")]
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
exports.default = _default;
|
|
151
|
+
|
|
152
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_index.default, args);
|
|
153
|
+
|
|
154
|
+
const _Collapsible = Template.bind({});
|
|
155
|
+
|
|
156
|
+
exports._Collapsible = _Collapsible;
|
|
157
|
+
_Collapsible.args = {};
|
|
@@ -0,0 +1,111 @@
|
|
|
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 _index = _interopRequireDefault(require("../Icon/index"));
|
|
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 Collapsible = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
title,
|
|
25
|
+
subtitle,
|
|
26
|
+
isDropdown,
|
|
27
|
+
textColor,
|
|
28
|
+
bgColor,
|
|
29
|
+
hoverTextColor,
|
|
30
|
+
hoverBgColor,
|
|
31
|
+
icon,
|
|
32
|
+
content,
|
|
33
|
+
boldTitle,
|
|
34
|
+
borderTop,
|
|
35
|
+
borderBottom,
|
|
36
|
+
contentBgColor,
|
|
37
|
+
contentTextColor,
|
|
38
|
+
showBottomLine,
|
|
39
|
+
iconSize,
|
|
40
|
+
children
|
|
41
|
+
} = _ref;
|
|
42
|
+
const [expanded, setExpanded] = (0, _react.useState)(false);
|
|
43
|
+
const [styles, setStyles] = (0, _react.useState)({
|
|
44
|
+
'background-color': bgColor ? bgColor : 'grey',
|
|
45
|
+
color: textColor ? textColor : 'white'
|
|
46
|
+
});
|
|
47
|
+
const [contentStyles, setContentStyles] = (0, _react.useState)({
|
|
48
|
+
'background-color': contentBgColor ? contentBgColor : 'white',
|
|
49
|
+
color: contentTextColor ? contentTextColor : 'black'
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const toggleExpanded = () => {
|
|
53
|
+
setExpanded(!expanded);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const setHoverState = isHovering => {
|
|
57
|
+
if (isHovering) {
|
|
58
|
+
setStyles({
|
|
59
|
+
'background-color': hoverBgColor ? hoverBgColor : 'black',
|
|
60
|
+
color: hoverTextColor ? hoverTextColor : 'white'
|
|
61
|
+
});
|
|
62
|
+
} else {
|
|
63
|
+
setStyles({
|
|
64
|
+
'background-color': bgColor ? bgColor : 'grey',
|
|
65
|
+
color: textColor ? textColor : 'white'
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const padding = title && subtitle ? 'pt-7' : 'pt-4';
|
|
71
|
+
const sizeIcon = iconSize ? iconSize : '1';
|
|
72
|
+
const iconPadding = title && subtitle ? 'pt-6' : 'pt-4';
|
|
73
|
+
const textSubstitutePadding = !title && !subtitle ? 'pb-4' : '';
|
|
74
|
+
let borders = '';
|
|
75
|
+
borders += borderBottom ? 'border-b ' : '';
|
|
76
|
+
borders += borderTop ? 'border-t ' : '';
|
|
77
|
+
const bottomLine = showBottomLine ? 'border-b' : ''; // let alignment = ''
|
|
78
|
+
// alignment = contentAlignment && contentAlignment === 'left' && 'text-left'
|
|
79
|
+
// alignment = contentAlignment && contentAlignment === 'right' && 'text-right'
|
|
80
|
+
// alignment = contentAlignment && contentAlignment === 'center' && 'text-center'
|
|
81
|
+
// alignment = contentAlignment && contentAlignment === 'justified' && 'text-justify'
|
|
82
|
+
|
|
83
|
+
const contentWrapperClasses = 'expandable w-auto ' + bottomLine; //+ ' ' + alignment
|
|
84
|
+
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
+
style: styles,
|
|
87
|
+
onMouseOver: () => setHoverState(true),
|
|
88
|
+
onMouseOut: () => setHoverState(false),
|
|
89
|
+
onClick: () => toggleExpanded(),
|
|
90
|
+
className: 'w-auto flex text-center ' + borders
|
|
91
|
+
}, icon && /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
+
className: 'pl-4 text-left ' + iconPadding + ' ' + textSubstitutePadding
|
|
93
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
94
|
+
type: icon,
|
|
95
|
+
size: sizeIcon
|
|
96
|
+
}))), title || subtitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
97
|
+
className: "w-full pl-4 py-4 text-left"
|
|
98
|
+
}, title && boldTitle ? /*#__PURE__*/_react.default.createElement("h1", null, /*#__PURE__*/_react.default.createElement("b", null, title)) : /*#__PURE__*/_react.default.createElement("h1", null, title), subtitle && /*#__PURE__*/_react.default.createElement("h2", null, /*#__PURE__*/_react.default.createElement("small", null, subtitle))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
className: 'w-full pr-8 text-right ' + padding
|
|
100
|
+
}, isDropdown ? expanded ? /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
101
|
+
type: "arrow-up"
|
|
102
|
+
})) : /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
103
|
+
type: "arrow-down"
|
|
104
|
+
})) : null)), expanded ? /*#__PURE__*/_react.default.createElement("div", {
|
|
105
|
+
style: contentStyles,
|
|
106
|
+
className: contentWrapperClasses
|
|
107
|
+
}, children) : null);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var _default = Collapsible;
|
|
111
|
+
exports.default = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Column = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
|
|
12
|
+
var _controls = require("../../../utils/controls");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
+
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
|
|
20
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
|
|
22
|
+
var _default = {
|
|
23
|
+
title: 'Trepur Components/Atoms/Column',
|
|
24
|
+
component: _index.default,
|
|
25
|
+
parameters: {},
|
|
26
|
+
argTypes: _objectSpread({}, _controls.columnOptions),
|
|
27
|
+
args: {
|
|
28
|
+
sm: 1,
|
|
29
|
+
md: 1,
|
|
30
|
+
lg: 1,
|
|
31
|
+
xl: 1,
|
|
32
|
+
className: 'border h-16'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.default = _default;
|
|
36
|
+
|
|
37
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_index.default, args);
|
|
38
|
+
|
|
39
|
+
const _Column = Template.bind({});
|
|
40
|
+
|
|
41
|
+
exports._Column = _Column;
|
|
42
|
+
_Column.args = {};
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
require("../../../../index.css");
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
|
|
12
14
|
const Column = _ref => {
|
|
@@ -17,8 +19,23 @@ const Column = _ref => {
|
|
|
17
19
|
md,
|
|
18
20
|
lg,
|
|
19
21
|
xl,
|
|
20
|
-
children
|
|
22
|
+
children,
|
|
23
|
+
id
|
|
21
24
|
} = _ref;
|
|
25
|
+
const widthOptions = {
|
|
26
|
+
1: 'w-1/12',
|
|
27
|
+
2: 'w-2/12',
|
|
28
|
+
3: 'w-3/12',
|
|
29
|
+
4: 'w-4/12',
|
|
30
|
+
5: 'w-5/12',
|
|
31
|
+
6: 'w-6/12',
|
|
32
|
+
7: 'w-7/12',
|
|
33
|
+
8: 'w-8/12',
|
|
34
|
+
9: 'w-9/12',
|
|
35
|
+
10: 'w-10/12',
|
|
36
|
+
11: 'w-11/12',
|
|
37
|
+
12: 'w-12/12'
|
|
38
|
+
};
|
|
22
39
|
|
|
23
40
|
const calculateWidth = size => {
|
|
24
41
|
let width;
|
|
@@ -26,13 +43,13 @@ const Column = _ref => {
|
|
|
26
43
|
if (size === 12) {
|
|
27
44
|
width = 'w-full';
|
|
28
45
|
} else {
|
|
29
|
-
width =
|
|
46
|
+
width = widthOptions[size];
|
|
30
47
|
}
|
|
31
48
|
|
|
32
49
|
return width;
|
|
33
50
|
};
|
|
34
51
|
|
|
35
|
-
let classes = className + ' ';
|
|
52
|
+
let classes = className ? className + ' ' : '';
|
|
36
53
|
|
|
37
54
|
if (xs) {
|
|
38
55
|
let xsClass;
|
|
@@ -42,7 +59,7 @@ const Column = _ref => {
|
|
|
42
59
|
|
|
43
60
|
if (sm) {
|
|
44
61
|
let smClass;
|
|
45
|
-
smClass =
|
|
62
|
+
smClass = calculateWidth(sm);
|
|
46
63
|
classes += smClass + ' ';
|
|
47
64
|
}
|
|
48
65
|
|
|
@@ -65,6 +82,7 @@ const Column = _ref => {
|
|
|
65
82
|
}
|
|
66
83
|
|
|
67
84
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
id: id,
|
|
68
86
|
className: classes
|
|
69
87
|
}, children);
|
|
70
88
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Icon = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
|
|
12
|
+
var _controls = require("../../../utils/controls");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
+
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
|
|
20
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
|
|
22
|
+
var _default = {
|
|
23
|
+
title: 'Trepur Components/Atoms/Icon',
|
|
24
|
+
components: _index.default,
|
|
25
|
+
parameters: {},
|
|
26
|
+
argTypes: _objectSpread({}, _controls.iconOptions),
|
|
27
|
+
args: {
|
|
28
|
+
type: 'th',
|
|
29
|
+
size: 3
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.default = _default;
|
|
33
|
+
|
|
34
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_index.default, args);
|
|
35
|
+
|
|
36
|
+
const _Icon = Template.bind({});
|
|
37
|
+
|
|
38
|
+
exports._Icon = _Icon;
|
|
39
|
+
_Icon.args = {};
|
|
@@ -9,6 +9,8 @@ require("core-js/modules/es.object.assign.js");
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
+
require("../../../../index.css");
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
16
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Image = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
|
|
12
|
+
var _logoWhite = _interopRequireDefault(require("../../../Assets/Images/logoWhite.png"));
|
|
13
|
+
|
|
14
|
+
var _controls = require("../../../utils/controls");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
|
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
|
|
24
|
+
var _default = {
|
|
25
|
+
title: 'Trepur Components/Atoms/Image',
|
|
26
|
+
components: _index.default,
|
|
27
|
+
parameters: {},
|
|
28
|
+
argTypes: _objectSpread({}, _controls.imageOptions),
|
|
29
|
+
args: {
|
|
30
|
+
image: _logoWhite.default
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.default = _default;
|
|
34
|
+
|
|
35
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_index.default, args);
|
|
36
|
+
|
|
37
|
+
const _Image = Template.bind({});
|
|
38
|
+
|
|
39
|
+
exports._Image = _Image;
|
|
40
|
+
_Image.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
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
require("../../../../index.css");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const Image = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
id,
|
|
17
|
+
image,
|
|
18
|
+
altText,
|
|
19
|
+
height,
|
|
20
|
+
width,
|
|
21
|
+
classNames
|
|
22
|
+
} = _ref;
|
|
23
|
+
const widthOptions = {
|
|
24
|
+
2: 'w-2',
|
|
25
|
+
4: 'w-4',
|
|
26
|
+
8: 'w-8',
|
|
27
|
+
12: 'w-12',
|
|
28
|
+
16: 'w-16',
|
|
29
|
+
20: 'w-20',
|
|
30
|
+
24: 'w-24',
|
|
31
|
+
28: 'w-28',
|
|
32
|
+
32: 'w-32'
|
|
33
|
+
};
|
|
34
|
+
const heightOptions = {
|
|
35
|
+
2: 'h-2',
|
|
36
|
+
4: 'h-4',
|
|
37
|
+
8: 'h-8',
|
|
38
|
+
12: 'h-12',
|
|
39
|
+
16: 'h-16',
|
|
40
|
+
20: 'h-20',
|
|
41
|
+
24: 'h-24',
|
|
42
|
+
28: 'h-28',
|
|
43
|
+
32: 'h-32'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const getWidth = width => {
|
|
47
|
+
return widthOptions[width];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const getHeight = height => {
|
|
51
|
+
return heightOptions[height];
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const imgWidth = width && getWidth(width);
|
|
55
|
+
const imgHeight = height && getHeight(height);
|
|
56
|
+
const classes = imgWidth + ' ' + imgHeight + ' ' + classNames;
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
58
|
+
id: id,
|
|
59
|
+
className: classes,
|
|
60
|
+
src: image,
|
|
61
|
+
alt: altText
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var _default = Image;
|
|
66
|
+
exports.default = _default;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._InformationIcon = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: 'Trepur Components/Atoms/Information Icon',
|
|
16
|
+
components: _index.default,
|
|
17
|
+
parameters: {},
|
|
18
|
+
argTypes: {
|
|
19
|
+
type: {
|
|
20
|
+
description: 'The name of the icon you wish to use',
|
|
21
|
+
control: 'text',
|
|
22
|
+
table: {
|
|
23
|
+
category: ''
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
text: {
|
|
27
|
+
description: '',
|
|
28
|
+
control: 'text',
|
|
29
|
+
table: {
|
|
30
|
+
category: ''
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
number: {
|
|
34
|
+
description: '',
|
|
35
|
+
control: 'number',
|
|
36
|
+
table: {
|
|
37
|
+
category: ''
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
description: 'An integer between 1 and 5 to dictate the magnification of the icon',
|
|
42
|
+
control: 'number',
|
|
43
|
+
table: {
|
|
44
|
+
category: ''
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
bordered: {
|
|
48
|
+
description: '',
|
|
49
|
+
control: 'boolean',
|
|
50
|
+
table: {
|
|
51
|
+
category: ''
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
rounded: {
|
|
55
|
+
description: '',
|
|
56
|
+
control: 'boolean',
|
|
57
|
+
table: {
|
|
58
|
+
category: ''
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
bgColor: {
|
|
62
|
+
description: '',
|
|
63
|
+
control: 'color',
|
|
64
|
+
table: {
|
|
65
|
+
category: 'Colors'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
textColor: {
|
|
69
|
+
description: '',
|
|
70
|
+
control: 'color',
|
|
71
|
+
table: {
|
|
72
|
+
category: 'Colors'
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
hoverBgColor: {
|
|
76
|
+
description: '',
|
|
77
|
+
control: 'color',
|
|
78
|
+
table: {
|
|
79
|
+
category: 'Colors',
|
|
80
|
+
subcategory: 'Hover'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
hoverTextColor: {
|
|
84
|
+
description: '',
|
|
85
|
+
control: 'color',
|
|
86
|
+
table: {
|
|
87
|
+
category: 'Colors',
|
|
88
|
+
subcategory: 'Hover'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
args: {
|
|
93
|
+
type: 'th',
|
|
94
|
+
text: 'Text',
|
|
95
|
+
number: 21,
|
|
96
|
+
size: 3,
|
|
97
|
+
bordered: true,
|
|
98
|
+
rounded: true
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.default = _default;
|
|
102
|
+
|
|
103
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_index.default, args);
|
|
104
|
+
|
|
105
|
+
const _InformationIcon = Template.bind({});
|
|
106
|
+
|
|
107
|
+
exports._InformationIcon = _InformationIcon;
|
|
108
|
+
_InformationIcon.args = {};
|
|
@@ -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
|
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); }
|
|
13
15
|
|
|
14
16
|
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; }
|
|
@@ -59,13 +61,12 @@ const Icon = _ref => {
|
|
|
59
61
|
}; //-----------------------------------
|
|
60
62
|
|
|
61
63
|
|
|
62
|
-
if (!type) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
63
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
65
|
style: styles,
|
|
65
66
|
className: classes,
|
|
66
67
|
onMouseOver: () => setHoverState(true),
|
|
67
68
|
onMouseOut: () => setHoverState(false)
|
|
68
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
69
|
+
}, type && /*#__PURE__*/_react.default.createElement("span", {
|
|
69
70
|
className: classList,
|
|
70
71
|
role: "img",
|
|
71
72
|
"aria-hidden": "true",
|