trepur_components 0.3.0 → 0.3.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/components/Accordion/index.js +1 -19
- package/dist/components/AlertBar/index.js +82 -56
- package/dist/components/Breadcrumbs/index.js +31 -11
- package/dist/components/BreadcrumbsBordered/index.js +13 -11
- package/dist/components/BreadcrumbsItem/index.css +3 -23
- package/dist/components/BreadcrumbsItem/index.js +110 -138
- package/dist/components/Button/index.js +123 -117
- package/dist/components/Card/index.js +73 -163
- package/dist/components/CardWithTopImage/index.js +21 -24
- package/dist/components/Carousel/index.js +8 -4
- package/dist/components/CarouselV2/index.js +12 -10
- package/dist/components/Collapsible/index.js +85 -74
- package/dist/components/Column/index.js +36 -18
- package/dist/components/FyreCard/index.js +4 -23
- package/dist/components/Icon/index.js +66 -26
- package/dist/components/Image/index.js +36 -14
- package/dist/components/ImageLink/index.js +15 -7
- package/dist/components/ImageLinkList/index.js +5 -1
- package/dist/components/InformationIcon/index.js +74 -82
- package/dist/components/Input/index.js +82 -61
- package/dist/components/Nav/index.js +96 -129
- package/dist/components/NavItem/index.js +82 -71
- package/dist/components/NewsCard/index.js +26 -42
- package/dist/components/Profile/index.js +35 -23
- package/dist/components/Row/index.js +31 -10
- package/dist/components/Search/index.js +19 -25
- package/dist/components/SocialBlock/index.js +108 -84
- package/dist/components/StarRating/index.js +61 -31
- package/dist/components/Testimonial/index.js +22 -18
- package/dist/components/TextAndTitle/index.js +121 -99
- package/dist/components/TextArea/index.js +68 -47
- package/dist/components/Timeline/index.js +81 -51
- package/dist/components/Tubestops/index.js +62 -30
- package/dist/components/UserIcon/index.js +14 -10
- package/dist/components/Video/index.js +45 -34
- package/package.json +1 -1
|
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _index = _interopRequireDefault(require("../Image/index"));
|
|
13
13
|
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
14
16
|
require("../index.css");
|
|
15
17
|
|
|
16
18
|
require("./index.css");
|
|
@@ -23,42 +25,37 @@ const CardWithTopImage = _ref => {
|
|
|
23
25
|
let {
|
|
24
26
|
id,
|
|
25
27
|
contentId,
|
|
26
|
-
imageId,
|
|
27
28
|
classes,
|
|
28
29
|
imageWrapperClasses,
|
|
29
|
-
imageClasses,
|
|
30
30
|
contentClasses,
|
|
31
|
-
image,
|
|
32
|
-
altText,
|
|
33
|
-
roundedCard,
|
|
34
|
-
roundedImage,
|
|
35
31
|
bordered,
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
children,
|
|
33
|
+
imageProps
|
|
38
34
|
} = _ref;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
contentClassList
|
|
49
|
-
|
|
35
|
+
const classList = (0, _classnames.default)({
|
|
36
|
+
[classes]: classes
|
|
37
|
+
}, 'w-full px-4');
|
|
38
|
+
const imageWrapperClassList = (0, _classnames.default)({
|
|
39
|
+
[imageWrapperClasses]: imageWrapperClasses
|
|
40
|
+
});
|
|
41
|
+
const imageClassList = (0, _classnames.default)({
|
|
42
|
+
[imageProps.classes]: imageProps.classes
|
|
43
|
+
}, 'flex mx-auto w-24 bg-white p-4');
|
|
44
|
+
const contentClassList = (0, _classnames.default)({
|
|
45
|
+
'border border-grey border-opacity-100': bordered,
|
|
46
|
+
[contentClasses]: contentClasses
|
|
47
|
+
}, 'pt-12 px-4 h-auto pb-16 -mt-12 bg-white');
|
|
48
|
+
imageProps.classes = imageProps.classes + ' ' + imageClassList;
|
|
50
49
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
|
|
51
50
|
id: id
|
|
52
51
|
}, {
|
|
53
52
|
className: classList
|
|
54
|
-
}), /*#__PURE__*/_react.default.createElement("div", _extends({},
|
|
55
|
-
id:
|
|
53
|
+
}), /*#__PURE__*/_react.default.createElement("div", _extends({}, imageProps.id && {
|
|
54
|
+
id: imageProps.id + '_imageId'
|
|
56
55
|
}, {
|
|
57
56
|
className: imageWrapperClassList
|
|
58
57
|
}), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
59
|
-
|
|
60
|
-
image: image,
|
|
61
|
-
classes: imageClassList
|
|
58
|
+
imageProps: imageProps
|
|
62
59
|
})), /*#__PURE__*/_react.default.createElement("div", _extends({}, contentId && {
|
|
63
60
|
id: contentId + '_content'
|
|
64
61
|
}, {
|
|
@@ -95,8 +95,10 @@ const Carousel = _ref => {
|
|
|
95
95
|
return slider === null || slider === void 0 ? void 0 : (_slider$current = slider.current) === null || _slider$current === void 0 ? void 0 : _slider$current.slickNext();
|
|
96
96
|
}
|
|
97
97
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
iconProps: {
|
|
99
|
+
type: nextArrowIcon,
|
|
100
|
+
size: nextArrowIconSize
|
|
101
|
+
}
|
|
100
102
|
}));
|
|
101
103
|
};
|
|
102
104
|
|
|
@@ -111,8 +113,10 @@ const Carousel = _ref => {
|
|
|
111
113
|
return slider === null || slider === void 0 ? void 0 : (_slider$current2 = slider.current) === null || _slider$current2 === void 0 ? void 0 : _slider$current2.slickPrev();
|
|
112
114
|
}
|
|
113
115
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
iconProps: {
|
|
117
|
+
type: previousArrowIcon,
|
|
118
|
+
size: previousArrowIconSize
|
|
119
|
+
}
|
|
116
120
|
}));
|
|
117
121
|
};
|
|
118
122
|
|
|
@@ -65,7 +65,7 @@ const CarouselV2 = _ref => {
|
|
|
65
65
|
dots
|
|
66
66
|
} = _ref;
|
|
67
67
|
const classList = "".concat(classes);
|
|
68
|
-
const dotClasses = "w-4 h-4 cursor-pointer focus:".concat(dots.activeColours, " rounded-full mx-1 ");
|
|
68
|
+
const dotClasses = "w-4 h-4 cursor-pointer focus:".concat(dots === null || dots === void 0 ? void 0 : dots.activeColours, " rounded-full mx-1 ");
|
|
69
69
|
const [currentSlide, setCurrentSlide] = (0, _react.useState)(0);
|
|
70
70
|
const [loaded, setLoaded] = (0, _react.useState)(false);
|
|
71
71
|
const [sliderRef, instanceRef] = (0, _react2.useKeenSlider)({
|
|
@@ -121,7 +121,7 @@ const CarouselV2 = _ref => {
|
|
|
121
121
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
122
122
|
ref: sliderRef,
|
|
123
123
|
className: "keen-slider"
|
|
124
|
-
}, slides && slides), arrows.visible && loaded && instanceRef.current && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Arrow, {
|
|
124
|
+
}, slides && slides), (arrows === null || arrows === void 0 ? void 0 : arrows.visible) && loaded && instanceRef.current && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Arrow, {
|
|
125
125
|
left: true,
|
|
126
126
|
onClick: e => {
|
|
127
127
|
var _instanceRef$current;
|
|
@@ -138,7 +138,7 @@ const CarouselV2 = _ref => {
|
|
|
138
138
|
},
|
|
139
139
|
disabled: currentSlide === instanceRef.current.track.details.slides.length - 1,
|
|
140
140
|
arrows: arrows
|
|
141
|
-
}))), dots.visible && loaded && instanceRef.current && /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
}))), (dots === null || dots === void 0 ? void 0 : dots.visible) && loaded && instanceRef.current && /*#__PURE__*/_react.default.createElement("div", {
|
|
142
142
|
className: "flex py-4 justify-center"
|
|
143
143
|
}, [...Array(instanceRef.current.track.details.slides.length).keys()].map(idx => {
|
|
144
144
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -148,23 +148,25 @@ const CarouselV2 = _ref => {
|
|
|
148
148
|
|
|
149
149
|
(_instanceRef$current3 = instanceRef.current) === null || _instanceRef$current3 === void 0 ? void 0 : _instanceRef$current3.moveToIdx(idx);
|
|
150
150
|
},
|
|
151
|
-
className: dotClasses + (currentSlide === idx ? " active ".concat(dots.activeColours) : " ".concat(dots.colours))
|
|
151
|
+
className: dotClasses + (currentSlide === idx ? " active ".concat(dots === null || dots === void 0 ? void 0 : dots.activeColours) : " ".concat(dots === null || dots === void 0 ? void 0 : dots.colours))
|
|
152
152
|
});
|
|
153
153
|
})));
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
function Arrow(props) {
|
|
157
|
-
|
|
157
|
+
var _props$arrows, _props$arrows2, _props$arrows3;
|
|
158
|
+
|
|
159
|
+
const disabeld = props.disabled ? " arrow--disabled ".concat(props === null || props === void 0 ? void 0 : (_props$arrows = props.arrows) === null || _props$arrows === void 0 ? void 0 : _props$arrows.disabledColours) : "";
|
|
158
160
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
159
|
-
onClick: props.onClick,
|
|
161
|
+
onClick: props === null || props === void 0 ? void 0 : props.onClick,
|
|
160
162
|
className: "arrow w-12 translate-y-2/4 h-12 absolute cursor-pointer top-1/2 ".concat(props.left ? "arrow--left left-1.5" : "arrow--right left-auto right-1.5", " ").concat(disabeld),
|
|
161
163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
162
164
|
viewBox: "0 0 24 24"
|
|
163
|
-
}, props.left && /*#__PURE__*/_react.default.createElement("path", {
|
|
164
|
-
className: "".concat(props.arrows.colours),
|
|
165
|
+
}, (props === null || props === void 0 ? void 0 : props.left) && /*#__PURE__*/_react.default.createElement("path", {
|
|
166
|
+
className: "".concat(props === null || props === void 0 ? void 0 : (_props$arrows2 = props.arrows) === null || _props$arrows2 === void 0 ? void 0 : _props$arrows2.colours),
|
|
165
167
|
d: "M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"
|
|
166
|
-
}), !props.left && /*#__PURE__*/_react.default.createElement("path", {
|
|
167
|
-
className: "".concat(props.arrows.colours),
|
|
168
|
+
}), !(props !== null && props !== void 0 && props.left) && /*#__PURE__*/_react.default.createElement("path", {
|
|
169
|
+
className: "".concat(props === null || props === void 0 ? void 0 : (_props$arrows3 = props.arrows) === null || _props$arrows3 === void 0 ? void 0 : _props$arrows3.colours),
|
|
168
170
|
d: "M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"
|
|
169
171
|
}));
|
|
170
172
|
}
|
|
@@ -5,7 +5,7 @@ require("core-js/modules/es.object.assign.js");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.collapsibleProps = void 0;
|
|
9
9
|
|
|
10
10
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
11
11
|
|
|
@@ -13,6 +13,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _index = _interopRequireDefault(require("../Icon/index"));
|
|
15
15
|
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
16
20
|
require("../index.css");
|
|
17
21
|
|
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -21,93 +25,100 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
25
|
|
|
22
26
|
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; }
|
|
23
27
|
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
24
34
|
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); }
|
|
25
35
|
|
|
36
|
+
const collapsibleProps = {
|
|
37
|
+
id: _propTypes.default.string,
|
|
38
|
+
classes: _propTypes.default.string,
|
|
39
|
+
title: _propTypes.default.string,
|
|
40
|
+
subtitle: _propTypes.default.string,
|
|
41
|
+
isDropdown: _propTypes.default.bool,
|
|
42
|
+
textColor: _propTypes.default.string,
|
|
43
|
+
bgColor: _propTypes.default.string,
|
|
44
|
+
hoverTextColor: _propTypes.default.string,
|
|
45
|
+
hoverBgColor: _propTypes.default.string,
|
|
46
|
+
boldTitle: _propTypes.default.bool,
|
|
47
|
+
borderTop: _propTypes.default.bool,
|
|
48
|
+
borderBottom: _propTypes.default.bool,
|
|
49
|
+
contentBgColor: _propTypes.default.string,
|
|
50
|
+
contentTextColor: _propTypes.default.string,
|
|
51
|
+
showBottomLine: _propTypes.default.bool,
|
|
52
|
+
iconProps: _propTypes.default.object,
|
|
53
|
+
children: _propTypes.default.any
|
|
54
|
+
};
|
|
55
|
+
exports.collapsibleProps = collapsibleProps;
|
|
56
|
+
|
|
26
57
|
const Collapsible = _ref => {
|
|
27
58
|
let {
|
|
28
|
-
|
|
29
|
-
classes,
|
|
30
|
-
title,
|
|
31
|
-
subtitle,
|
|
32
|
-
isDropdown,
|
|
33
|
-
textColor,
|
|
34
|
-
bgColor,
|
|
35
|
-
hoverTextColor,
|
|
36
|
-
hoverBgColor,
|
|
37
|
-
icon,
|
|
38
|
-
boldTitle,
|
|
39
|
-
borderTop,
|
|
40
|
-
borderBottom,
|
|
41
|
-
contentBgColor,
|
|
42
|
-
contentTextColor,
|
|
43
|
-
showBottomLine,
|
|
44
|
-
iconSize,
|
|
45
|
-
children
|
|
59
|
+
collapsibleProps
|
|
46
60
|
} = _ref;
|
|
47
61
|
const [expanded, setExpanded] = (0, _react.useState)(false);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
if (collapsibleProps == undefined) return;
|
|
63
|
+
const titleBold = collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.boldTitle ? 'text-bold' : '';
|
|
64
|
+
const padding = (0, _classnames.default)({
|
|
65
|
+
'pt-7': (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.title) && (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.subtitle),
|
|
66
|
+
'pt-4': (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.title) && !(collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.subtitle)
|
|
51
67
|
});
|
|
52
|
-
const
|
|
53
|
-
'
|
|
54
|
-
color: contentTextColor ? contentTextColor : 'black'
|
|
68
|
+
const textSubstitutePadding = (0, _classnames.default)({
|
|
69
|
+
'pb-4': !(collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.title) && !(collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.subtitle)
|
|
55
70
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const textSubstitutePadding = !title && !subtitle ? 'pb-4' : '';
|
|
78
|
-
let borders = '';
|
|
79
|
-
borders += borderBottom ? 'border-b ' : '';
|
|
80
|
-
borders += borderTop ? 'border-t ' : '';
|
|
81
|
-
let contentWrapperClasses = 'expandable w-auto ';
|
|
82
|
-
contentWrapperClasses += showBottomLine ? 'border-b' : '';
|
|
83
|
-
return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
|
|
84
|
-
id: id
|
|
71
|
+
const borders = (0, _classnames.default)({
|
|
72
|
+
'border-b': collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.borderBottom,
|
|
73
|
+
'border-t': collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.borderTop,
|
|
74
|
+
[collapsibleProps.textColor]: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.textColor,
|
|
75
|
+
[collapsibleProps.bgColor]: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.bgColor,
|
|
76
|
+
'text-white': !(collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.textColor),
|
|
77
|
+
'bg-light-grey': !collapsibleProps.bgColor,
|
|
78
|
+
[collapsibleProps.hoverTextColor]: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.hoverTextColor,
|
|
79
|
+
[collapsibleProps.hoverBgColor]: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.hoverBgColor,
|
|
80
|
+
'hover:text-white': !(collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.hoverTextColor),
|
|
81
|
+
'hover:bg-light-grey': !collapsibleProps.hoverBgColor
|
|
82
|
+
}, 'w-auto flex text-center');
|
|
83
|
+
const contentWrapperClasses = (0, _classnames.default)({
|
|
84
|
+
'border-b': collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.showBottomLine,
|
|
85
|
+
[collapsibleProps.contentBgColor]: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.contentBgColor,
|
|
86
|
+
'bg-light-grey': !(collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.contentBgColor),
|
|
87
|
+
[collapsibleProps.contentTextColor]: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.contentTextColor,
|
|
88
|
+
'text-white': collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.contentTextColor
|
|
89
|
+
}, 'expandable w-auto');
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.id) && {
|
|
91
|
+
id: collapsibleProps.id
|
|
85
92
|
}, {
|
|
86
|
-
className: classes
|
|
93
|
+
className: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.classes
|
|
87
94
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
96
|
-
type: icon,
|
|
97
|
-
size: sizeIcon
|
|
98
|
-
}))), title || subtitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
onClick: () => setExpanded(!expanded),
|
|
96
|
+
className: borders
|
|
97
|
+
}, (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.iconProps) && /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: "pl-4 text-left ".concat(padding, " ").concat(textSubstitutePadding)
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
100
|
+
iconProps: collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.iconProps
|
|
101
|
+
})), collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.title || collapsibleProps !== null && collapsibleProps !== void 0 && collapsibleProps.subtitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
99
102
|
className: "w-full pl-4 py-4 text-left"
|
|
100
|
-
},
|
|
101
|
-
className:
|
|
102
|
-
},
|
|
103
|
-
|
|
103
|
+
}, (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.title) && /*#__PURE__*/_react.default.createElement("h4", {
|
|
104
|
+
className: titleBold
|
|
105
|
+
}, collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.title), (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.subtitle) && /*#__PURE__*/_react.default.createElement("h5", null, /*#__PURE__*/_react.default.createElement("small", null, collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.subtitle))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.isDropdown) && /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: "w-full pr-8 text-right ".concat(padding)
|
|
107
|
+
}, expanded ? /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
108
|
+
iconProps: {
|
|
109
|
+
type: 'chevron-up'
|
|
110
|
+
}
|
|
104
111
|
})) : /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
iconProps: {
|
|
113
|
+
type: 'chevron-down'
|
|
114
|
+
}
|
|
115
|
+
})))), (collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.isDropdown) && expanded && /*#__PURE__*/_react.default.createElement("div", {
|
|
108
116
|
className: contentWrapperClasses
|
|
109
|
-
},
|
|
117
|
+
}, collapsibleProps === null || collapsibleProps === void 0 ? void 0 : collapsibleProps.children));
|
|
110
118
|
};
|
|
111
119
|
|
|
120
|
+
Collapsible.propTypes = {
|
|
121
|
+
collapsibleProps: _propTypes.default.shape(_objectSpread({}, collapsibleProps))
|
|
122
|
+
};
|
|
112
123
|
var _default = Collapsible;
|
|
113
124
|
exports.default = _default;
|
|
@@ -3,28 +3,43 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.columnProps = void 0;
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/es.object.assign.js");
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
12
14
|
require("../index.css");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
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
|
+
|
|
16
24
|
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); }
|
|
17
25
|
|
|
26
|
+
const columnProps = {
|
|
27
|
+
id: _propTypes.default.string,
|
|
28
|
+
classes: _propTypes.default.string,
|
|
29
|
+
sm: _propTypes.default.number,
|
|
30
|
+
md: _propTypes.default.number,
|
|
31
|
+
lg: _propTypes.default.number,
|
|
32
|
+
xl: _propTypes.default.number,
|
|
33
|
+
children: _propTypes.default.any
|
|
34
|
+
};
|
|
35
|
+
exports.columnProps = columnProps;
|
|
36
|
+
|
|
18
37
|
const Column = _ref => {
|
|
19
38
|
let {
|
|
20
|
-
|
|
21
|
-
classes,
|
|
22
|
-
sm,
|
|
23
|
-
md,
|
|
24
|
-
lg,
|
|
25
|
-
xl,
|
|
39
|
+
columnProps,
|
|
26
40
|
children
|
|
27
41
|
} = _ref;
|
|
42
|
+
if (columnProps == undefined) return;
|
|
28
43
|
const widthOptions = {
|
|
29
44
|
1: 'w-1/12',
|
|
30
45
|
2: 'w-2/12',
|
|
@@ -52,38 +67,41 @@ const Column = _ref => {
|
|
|
52
67
|
return width;
|
|
53
68
|
};
|
|
54
69
|
|
|
55
|
-
let classList = classes ? classes : '';
|
|
70
|
+
let classList = columnProps !== null && columnProps !== void 0 && columnProps.classes ? columnProps === null || columnProps === void 0 ? void 0 : columnProps.classes : '';
|
|
56
71
|
|
|
57
|
-
if (sm) {
|
|
72
|
+
if (columnProps !== null && columnProps !== void 0 && columnProps.sm) {
|
|
58
73
|
let smClass;
|
|
59
|
-
smClass = calculateWidth(sm);
|
|
74
|
+
smClass = calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.sm);
|
|
60
75
|
classList += ' ' + smClass + ' ';
|
|
61
76
|
}
|
|
62
77
|
|
|
63
|
-
if (md) {
|
|
78
|
+
if (columnProps !== null && columnProps !== void 0 && columnProps.md) {
|
|
64
79
|
let mdClass;
|
|
65
|
-
mdClass = 'md:' + calculateWidth(md);
|
|
80
|
+
mdClass = 'md:' + calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.md);
|
|
66
81
|
classList += ' ' + mdClass + ' ';
|
|
67
82
|
}
|
|
68
83
|
|
|
69
|
-
if (lg) {
|
|
84
|
+
if (columnProps !== null && columnProps !== void 0 && columnProps.lg) {
|
|
70
85
|
let lgClass;
|
|
71
|
-
lgClass = 'lg:' + calculateWidth(lg);
|
|
86
|
+
lgClass = 'lg:' + calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.lg);
|
|
72
87
|
classList += ' ' + lgClass + ' ';
|
|
73
88
|
}
|
|
74
89
|
|
|
75
|
-
if (xl) {
|
|
90
|
+
if (columnProps !== null && columnProps !== void 0 && columnProps.xl) {
|
|
76
91
|
let xlClass;
|
|
77
|
-
xlClass = 'xl:' + calculateWidth(xl);
|
|
92
|
+
xlClass = 'xl:' + calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.xl);
|
|
78
93
|
classList += ' ' + xlClass + ' ';
|
|
79
94
|
}
|
|
80
95
|
|
|
81
|
-
return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
|
|
82
|
-
id: id
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, (columnProps === null || columnProps === void 0 ? void 0 : columnProps.id) && {
|
|
97
|
+
id: columnProps === null || columnProps === void 0 ? void 0 : columnProps.id
|
|
83
98
|
}, {
|
|
84
99
|
className: classList
|
|
85
100
|
}), children);
|
|
86
101
|
};
|
|
87
102
|
|
|
103
|
+
Column.propTypes = {
|
|
104
|
+
columnProps: _propTypes.default.shape(_objectSpread({}, columnProps))
|
|
105
|
+
};
|
|
88
106
|
var _default = Column;
|
|
89
107
|
exports.default = _default;
|
|
@@ -22,19 +22,10 @@ const FyreCard = _ref => {
|
|
|
22
22
|
id,
|
|
23
23
|
classes,
|
|
24
24
|
image,
|
|
25
|
-
ctaText,
|
|
26
25
|
imageClass,
|
|
27
26
|
altText,
|
|
28
|
-
buttonType,
|
|
29
27
|
bordered,
|
|
30
|
-
|
|
31
|
-
buttonDesign,
|
|
32
|
-
buttonBgColor,
|
|
33
|
-
buttonTextColor,
|
|
34
|
-
buttonBorderColor,
|
|
35
|
-
hoverButtonBgColor,
|
|
36
|
-
hoverButtonTextColor,
|
|
37
|
-
hoverButtonBorderColor
|
|
28
|
+
buttonProps
|
|
38
29
|
} = _ref;
|
|
39
30
|
let border = bordered && ' border border-grey border-opacity-100 ';
|
|
40
31
|
let classList = 'flex flex-col ';
|
|
@@ -56,19 +47,9 @@ const FyreCard = _ref => {
|
|
|
56
47
|
alt: altText
|
|
57
48
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
49
|
className: "flex justify-end"
|
|
59
|
-
}, /*#__PURE__*/_react.default.createElement(_Button.default,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
buttonUrl: url,
|
|
63
|
-
buttonBgColor: buttonBgColor,
|
|
64
|
-
buttonTextColor: buttonTextColor,
|
|
65
|
-
borderColor: buttonBorderColor,
|
|
66
|
-
buttonHoverBgColor: hoverButtonBgColor,
|
|
67
|
-
buttonHoverTextColor: hoverButtonTextColor,
|
|
68
|
-
buttonHoverBorderColor: hoverButtonBorderColor
|
|
69
|
-
}, buttonDesign && {
|
|
70
|
-
buttonDesign: buttonDesign
|
|
71
|
-
})))));
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
51
|
+
buttonProps: buttonProps
|
|
52
|
+
}))));
|
|
72
53
|
};
|
|
73
54
|
|
|
74
55
|
var _default = FyreCard;
|
|
@@ -1,53 +1,93 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.assign.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.default = void 0;
|
|
6
|
+
exports.iconProps = exports.default = void 0;
|
|
9
7
|
|
|
10
|
-
require("core-js/modules/es.
|
|
8
|
+
require("core-js/modules/es.object.assign.js");
|
|
11
9
|
|
|
12
10
|
var _react = _interopRequireDefault(require("react"));
|
|
13
11
|
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
14
16
|
require("../index.css");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
18
26
|
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); }
|
|
19
27
|
|
|
28
|
+
const iconProps = {
|
|
29
|
+
id: _propTypes.default.string,
|
|
30
|
+
classes: _propTypes.default.string,
|
|
31
|
+
type: _propTypes.default.string,
|
|
32
|
+
size: _propTypes.default.number,
|
|
33
|
+
onClick: _propTypes.default.func,
|
|
34
|
+
style: _propTypes.default.string,
|
|
35
|
+
animation: _propTypes.default.string,
|
|
36
|
+
reverseSpin: _propTypes.default.bool,
|
|
37
|
+
hollow: _propTypes.default.bool,
|
|
38
|
+
colour: _propTypes.default.string,
|
|
39
|
+
bgColour: _propTypes.default.string,
|
|
40
|
+
rounded: _propTypes.default.bool,
|
|
41
|
+
brand: _propTypes.default.bool
|
|
42
|
+
};
|
|
43
|
+
exports.iconProps = iconProps;
|
|
44
|
+
|
|
20
45
|
const Icon = _ref => {
|
|
21
46
|
let {
|
|
22
|
-
|
|
23
|
-
classes,
|
|
24
|
-
type,
|
|
25
|
-
size,
|
|
26
|
-
onClick,
|
|
27
|
-
style,
|
|
28
|
-
animation,
|
|
29
|
-
reverse,
|
|
30
|
-
hollow
|
|
47
|
+
iconProps
|
|
31
48
|
} = _ref;
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
if (iconProps == undefined) return;
|
|
50
|
+
if ((iconProps === null || iconProps === void 0 ? void 0 : iconProps.size) == undefined) iconProps.size = 1;
|
|
51
|
+
const wrapperClassList = (0, _classnames.default)({
|
|
52
|
+
'w-6 h-6': iconProps.size === 1,
|
|
53
|
+
'w-10 h-10': iconProps.size === 2,
|
|
54
|
+
'w-14 h-14': iconProps.size === 3,
|
|
55
|
+
'w-20 h-20': iconProps.size === 4,
|
|
56
|
+
'w-24 h-24': iconProps.size === 5,
|
|
57
|
+
'w-28 h-28': iconProps.size === 6,
|
|
58
|
+
'w-32 h-32': iconProps.size === 7,
|
|
59
|
+
'w-36 h-36': iconProps.size === 8,
|
|
60
|
+
'w-40 h-40': iconProps.size === 9,
|
|
61
|
+
'w-44 h-44': iconProps.size === 10,
|
|
62
|
+
[iconProps.classes]: iconProps === null || iconProps === void 0 ? void 0 : iconProps.classes,
|
|
63
|
+
[iconProps.colour]: iconProps === null || iconProps === void 0 ? void 0 : iconProps.colour,
|
|
64
|
+
[iconProps.bgColour]: iconProps === null || iconProps === void 0 ? void 0 : iconProps.bgColour,
|
|
65
|
+
'rounded-full': iconProps === null || iconProps === void 0 ? void 0 : iconProps.rounded
|
|
66
|
+
}, 'flex');
|
|
67
|
+
const classList = (0, _classnames.default)({
|
|
68
|
+
'fa-brands': iconProps === null || iconProps === void 0 ? void 0 : iconProps.brand,
|
|
69
|
+
["fa-".concat(iconProps.size, "x")]: iconProps === null || iconProps === void 0 ? void 0 : iconProps.size,
|
|
70
|
+
["fa-".concat(iconProps.animation)]: iconProps === null || iconProps === void 0 ? void 0 : iconProps.animation,
|
|
71
|
+
'fa-spin-reverse': iconProps === null || iconProps === void 0 ? void 0 : iconProps.reverseSpin,
|
|
72
|
+
'fa-regular': iconProps === null || iconProps === void 0 ? void 0 : iconProps.hollow
|
|
73
|
+
}, "fa fa-".concat(iconProps.type, " mx-auto my-auto"));
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, (iconProps === null || iconProps === void 0 ? void 0 : iconProps.id) && {
|
|
75
|
+
id: iconProps.id
|
|
41
76
|
}, {
|
|
77
|
+
className: wrapperClassList
|
|
78
|
+
}, (iconProps === null || iconProps === void 0 ? void 0 : iconProps.onClick) && {
|
|
79
|
+
onClick: iconProps.onClick
|
|
80
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
42
81
|
className: classList,
|
|
43
|
-
style: style,
|
|
82
|
+
style: iconProps === null || iconProps === void 0 ? void 0 : iconProps.style,
|
|
44
83
|
role: "img",
|
|
45
84
|
"aria-hidden": "true",
|
|
46
|
-
"aria-label": type
|
|
47
|
-
}, onClick && {
|
|
48
|
-
onClick: onClick
|
|
85
|
+
"aria-label": iconProps === null || iconProps === void 0 ? void 0 : iconProps.type
|
|
49
86
|
}));
|
|
50
87
|
};
|
|
51
88
|
|
|
89
|
+
Icon.propTypes = {
|
|
90
|
+
iconProps: _propTypes.default.shape(_objectSpread({}, iconProps))
|
|
91
|
+
};
|
|
52
92
|
var _default = Icon;
|
|
53
93
|
exports.default = _default;
|