trepur_components 0.4.2 → 0.4.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.
|
@@ -9,6 +9,8 @@ exports.imageProps = exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
11
11
|
|
|
12
|
+
require("core-js/modules/es.array.includes.js");
|
|
13
|
+
|
|
12
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
15
|
|
|
14
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -62,7 +64,9 @@ const Image = _ref => {
|
|
|
62
64
|
'w-32': imageProps.width === 8,
|
|
63
65
|
'w-36': imageProps.width === 9,
|
|
64
66
|
'w-40': imageProps.width === 10,
|
|
65
|
-
'w-44': imageProps.width === 11
|
|
67
|
+
'w-44': imageProps.width === 11,
|
|
68
|
+
'w-full': imageProps.width === undefined,
|
|
69
|
+
'w-full': ![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(imageProps.width)
|
|
66
70
|
});
|
|
67
71
|
const heightClassList = (0, _classnames.default)({
|
|
68
72
|
'h-6': imageProps.height === 1,
|
|
@@ -75,7 +79,9 @@ const Image = _ref => {
|
|
|
75
79
|
'h-32': imageProps.height === 8,
|
|
76
80
|
'h-36': imageProps.height === 9,
|
|
77
81
|
'h-40': imageProps.height === 10,
|
|
78
|
-
'h-44': imageProps.height === 11
|
|
82
|
+
'h-44': imageProps.height === 11,
|
|
83
|
+
'h-full': imageProps.height === undefined,
|
|
84
|
+
'h-full': ![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(imageProps.height)
|
|
79
85
|
});
|
|
80
86
|
const rounded = imageProps !== null && imageProps !== void 0 && imageProps.rounded ? 'rounded-full' : '';
|
|
81
87
|
const classList = (0, _classnames.default)({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.assign.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
require("core-js/modules/es.object.assign.js");
|
|
9
|
-
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -17,11 +17,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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
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
|
+
|
|
20
26
|
const Testimonial = _ref => {
|
|
21
27
|
let {
|
|
22
28
|
id,
|
|
23
29
|
classes,
|
|
24
|
-
imageClasses,
|
|
25
30
|
text,
|
|
26
31
|
imageProps,
|
|
27
32
|
companyName,
|
|
@@ -42,20 +47,24 @@ const Testimonial = _ref => {
|
|
|
42
47
|
[textColor]: textColor,
|
|
43
48
|
'text-black': !textColor
|
|
44
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');
|
|
45
53
|
const imageClassList = (0, _classnames.default)({
|
|
46
|
-
[imageClasses]: imageClasses
|
|
47
|
-
}, 'mx-auto
|
|
48
|
-
imageProps.wrapperClasses =
|
|
54
|
+
[imageProps === null || imageProps === void 0 ? void 0 : imageProps.imageClasses]: imageProps === null || imageProps === void 0 ? void 0 : imageProps.imageClasses
|
|
55
|
+
}, 'mx-auto');
|
|
56
|
+
imageProps.wrapperClasses = wrapperClassList;
|
|
57
|
+
imageProps.imageClasses = imageClassList;
|
|
49
58
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
|
|
50
59
|
id: id
|
|
51
60
|
}, {
|
|
52
61
|
className: classList
|
|
53
62
|
}), /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
54
|
-
imageProps: imageProps
|
|
63
|
+
imageProps: _objectSpread({}, imageProps)
|
|
55
64
|
}), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", {
|
|
56
|
-
className: "text-md md:text-
|
|
65
|
+
className: "text-md md:text-md"
|
|
57
66
|
}, companyName, " "), /*#__PURE__*/_react.default.createElement("p", {
|
|
58
|
-
className: "text-md md:text-
|
|
67
|
+
className: "text-md md:text-sm"
|
|
59
68
|
}, position), /*#__PURE__*/_react.default.createElement("p", null, positionStartDate, " - ", positionEndDate), /*#__PURE__*/_react.default.createElement("p", null, text), /*#__PURE__*/_react.default.createElement("p", {
|
|
60
69
|
className: authorTextColor
|
|
61
70
|
}, authorsName, " - ", authorsPosition, ": ", date)));
|