trepur_components 0.4.4 → 0.4.6
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.
|
@@ -24,33 +24,24 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
24
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
25
|
|
|
26
26
|
const CardWithTopImage = _ref => {
|
|
27
|
-
var _imageProps, _imageProps2
|
|
27
|
+
var _imageProps, _imageProps2;
|
|
28
28
|
|
|
29
29
|
let {
|
|
30
30
|
id,
|
|
31
31
|
contentId,
|
|
32
32
|
classes,
|
|
33
|
-
imageWrapperClasses,
|
|
34
33
|
contentClasses,
|
|
35
|
-
bordered,
|
|
36
34
|
children,
|
|
37
35
|
imageProps
|
|
38
36
|
} = _ref;
|
|
39
|
-
const
|
|
40
|
-
[classes]: classes
|
|
41
|
-
}, 'w-full px-4');
|
|
42
|
-
const imageWrapperClassList = (0, _classnames.default)({
|
|
43
|
-
[imageWrapperClasses]: imageWrapperClasses
|
|
44
|
-
});
|
|
45
|
-
const imageClassList = (0, _classnames.default)({
|
|
37
|
+
const wrapperClassList = (0, _classnames.default)({
|
|
46
38
|
[(_imageProps = imageProps) === null || _imageProps === void 0 ? void 0 : _imageProps.wrapperClasses]: (_imageProps2 = imageProps) === null || _imageProps2 === void 0 ? void 0 : _imageProps2.wrapperClasses
|
|
47
|
-
}, '
|
|
39
|
+
}, 'mx-auto max-w-max bg-white p-4');
|
|
48
40
|
const contentClassList = (0, _classnames.default)({
|
|
49
|
-
'border border-grey border-opacity-100': bordered,
|
|
50
41
|
[contentClasses]: contentClasses
|
|
51
42
|
}, 'pt-12 px-4 h-auto pb-16 -mt-12 bg-white');
|
|
52
43
|
imageProps = _objectSpread(_objectSpread({}, imageProps), {}, {
|
|
53
|
-
wrapperClasses:
|
|
44
|
+
wrapperClasses: wrapperClassList
|
|
54
45
|
});
|
|
55
46
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
56
47
|
style: {
|
|
@@ -59,14 +50,10 @@ const CardWithTopImage = _ref => {
|
|
|
59
50
|
}, id && {
|
|
60
51
|
id: id
|
|
61
52
|
}, {
|
|
62
|
-
className:
|
|
63
|
-
}), /*#__PURE__*/_react.default.createElement("div", _extends({}, ((_imageProps4 = imageProps) === null || _imageProps4 === void 0 ? void 0 : _imageProps4.id) && {
|
|
64
|
-
id: ((_imageProps5 = imageProps) === null || _imageProps5 === void 0 ? void 0 : _imageProps5.id) + '_imageId'
|
|
65
|
-
}, {
|
|
66
|
-
className: imageWrapperClassList
|
|
53
|
+
className: classes
|
|
67
54
|
}), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
68
55
|
imageProps: imageProps
|
|
69
|
-
})
|
|
56
|
+
}), /*#__PURE__*/_react.default.createElement("div", _extends({}, contentId && {
|
|
70
57
|
id: contentId + '_content'
|
|
71
58
|
}, {
|
|
72
59
|
className: contentClassList
|
|
@@ -39,6 +39,7 @@ const imageProps = {
|
|
|
39
39
|
altText: _propTypes.default.string,
|
|
40
40
|
title: _propTypes.default.string,
|
|
41
41
|
rounded: _propTypes.default.bool,
|
|
42
|
+
roundedFull: _propTypes.default.bool,
|
|
42
43
|
height: _propTypes.default.number,
|
|
43
44
|
width: _propTypes.default.number,
|
|
44
45
|
overlayColour: _propTypes.default.string,
|
|
@@ -92,10 +93,11 @@ const Image = _ref => {
|
|
|
92
93
|
[imageProps === null || imageProps === void 0 ? void 0 : imageProps.wrapperClasses]: imageProps === null || imageProps === void 0 ? void 0 : imageProps.wrapperClasses
|
|
93
94
|
});
|
|
94
95
|
const imageClassList = (0, _classnames.default)({
|
|
95
|
-
[imageProps
|
|
96
|
+
[imageProps.imageClasses]: imageProps === null || imageProps === void 0 ? void 0 : imageProps.imageClasses,
|
|
96
97
|
[widthClassList]: true,
|
|
97
98
|
[heightClassList]: true,
|
|
98
|
-
'rounded-2xl': imageProps === null || imageProps === void 0 ? void 0 : imageProps.rounded
|
|
99
|
+
'rounded-2xl': imageProps === null || imageProps === void 0 ? void 0 : imageProps.rounded,
|
|
100
|
+
'rounded-full': imageProps === null || imageProps === void 0 ? void 0 : imageProps.roundedFull
|
|
99
101
|
});
|
|
100
102
|
const overlayClassList = (0, _classnames.default)({
|
|
101
103
|
[widthClassList]: true,
|
|
@@ -47,13 +47,9 @@ const Testimonial = _ref => {
|
|
|
47
47
|
[textColor]: textColor,
|
|
48
48
|
'text-black': !textColor
|
|
49
49
|
}, 'text-center');
|
|
50
|
-
const wrapperClassList = (0, _classnames.default)({
|
|
51
|
-
[imageProps === null || imageProps === void 0 ? void 0 : imageProps.wrapperClasses]: imageProps === null || imageProps === void 0 ? void 0 : imageProps.wrapperClasses
|
|
52
|
-
}, 'mx-auto');
|
|
53
50
|
const imageClassList = (0, _classnames.default)({
|
|
54
51
|
[imageProps === null || imageProps === void 0 ? void 0 : imageProps.imageClasses]: imageProps === null || imageProps === void 0 ? void 0 : imageProps.imageClasses
|
|
55
52
|
}, 'mx-auto');
|
|
56
|
-
imageProps.wrapperClasses = wrapperClassList;
|
|
57
53
|
imageProps.imageClasses = imageClassList;
|
|
58
54
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
|
|
59
55
|
id: id
|
|
@@ -19,11 +19,18 @@ var _Row = _interopRequireDefault(require("../Row"));
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
22
28
|
const Timeline = _ref => {
|
|
23
29
|
let {
|
|
24
30
|
id,
|
|
25
31
|
classes,
|
|
26
|
-
|
|
32
|
+
verticalImageProps,
|
|
33
|
+
horizontalImageProps,
|
|
27
34
|
isHorizontal,
|
|
28
35
|
items,
|
|
29
36
|
reverse,
|
|
@@ -49,9 +56,6 @@ const Timeline = _ref => {
|
|
|
49
56
|
'items-center flex-col-reverse': reverse && isHorizontal,
|
|
50
57
|
'flex-row-reverse': reverse && !isHorizontal
|
|
51
58
|
}, 'status-flow-item relative flex flex-auto flex-row leading-tight');
|
|
52
|
-
const imageClassList = (0, _classnames.default)({
|
|
53
|
-
[imageClasses]: imageClasses
|
|
54
|
-
}, 'mx-auto');
|
|
55
59
|
const circle = (0, _classnames.default)({
|
|
56
60
|
'horizontal collapse': isHorizontal && isSm,
|
|
57
61
|
'horizontal': isHorizontal && !isSm,
|
|
@@ -194,13 +198,7 @@ const Timeline = _ref => {
|
|
|
194
198
|
id: circlePos,
|
|
195
199
|
className: isHorizontal ? 'horizontal py-0 my-0' : 'vertical'
|
|
196
200
|
}, /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
197
|
-
imageProps: {
|
|
198
|
-
wrapperClasses: imageClassList,
|
|
199
|
-
title: item.logoTitle,
|
|
200
|
-
image: item.logo,
|
|
201
|
-
altText: "".concat(item.logoAltText, " center logo"),
|
|
202
|
-
rounded: true
|
|
203
|
-
}
|
|
201
|
+
imageProps: _objectSpread({}, horizontalImageProps)
|
|
204
202
|
})) : /*#__PURE__*/_react.default.createElement("p", {
|
|
205
203
|
id: circlePos,
|
|
206
204
|
className: circle
|
|
@@ -233,16 +231,7 @@ const Timeline = _ref => {
|
|
|
233
231
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
234
232
|
style: verticalCircleStylesBefore
|
|
235
233
|
}), /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
236
|
-
imageProps: {
|
|
237
|
-
wrapperClasses: imageClassList,
|
|
238
|
-
imageClasses: 'border-2',
|
|
239
|
-
title: item.logoTitle,
|
|
240
|
-
image: item.logo,
|
|
241
|
-
altText: "".concat(item.logoAltText, " center logo"),
|
|
242
|
-
rounded: true,
|
|
243
|
-
width: isSm ? 3 : 5,
|
|
244
|
-
height: isSm ? 3 : 5
|
|
245
|
-
}
|
|
234
|
+
imageProps: _objectSpread({}, verticalImageProps)
|
|
246
235
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
247
236
|
style: verticalCircleStylesAfter
|
|
248
237
|
})) : /*#__PURE__*/_react.default.createElement("p", {
|