trepur_components 0.4.5 → 0.4.7

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, _imageProps3, _imageProps4, _imageProps5;
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 classList = (0, _classnames.default)({
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
- }, 'flex mx-auto w-24 bg-white p-4');
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: ((_imageProps3 = imageProps) === null || _imageProps3 === void 0 ? void 0 : _imageProps3.wrapperClasses) + ' ' + imageClassList
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: classList
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
- })), /*#__PURE__*/_react.default.createElement("div", _extends({}, contentId && {
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,
@@ -95,7 +96,8 @@ const Image = _ref => {
95
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,
@@ -19,11 +19,16 @@ 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
- imageClasses,
27
32
  isHorizontal,
28
33
  items,
29
34
  reverse,
@@ -49,9 +54,6 @@ const Timeline = _ref => {
49
54
  'items-center flex-col-reverse': reverse && isHorizontal,
50
55
  'flex-row-reverse': reverse && !isHorizontal
51
56
  }, 'status-flow-item relative flex flex-auto flex-row leading-tight');
52
- const imageClassList = (0, _classnames.default)({
53
- [imageClasses]: imageClasses
54
- }, 'mx-auto');
55
57
  const circle = (0, _classnames.default)({
56
58
  'horizontal collapse': isHorizontal && isSm,
57
59
  'horizontal': isHorizontal && !isSm,
@@ -194,13 +196,7 @@ const Timeline = _ref => {
194
196
  id: circlePos,
195
197
  className: isHorizontal ? 'horizontal py-0 my-0' : 'vertical'
196
198
  }, /*#__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
- }
199
+ imageProps: _objectSpread({}, item.centerImageProps)
204
200
  })) : /*#__PURE__*/_react.default.createElement("p", {
205
201
  id: circlePos,
206
202
  className: circle
@@ -233,16 +229,7 @@ const Timeline = _ref => {
233
229
  }, /*#__PURE__*/_react.default.createElement("span", {
234
230
  style: verticalCircleStylesBefore
235
231
  }), /*#__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
- }
232
+ imageProps: _objectSpread({}, item.centerImageProps)
246
233
  }), /*#__PURE__*/_react.default.createElement("span", {
247
234
  style: verticalCircleStylesAfter
248
235
  })) : /*#__PURE__*/_react.default.createElement("p", {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "trepur_components",
3
3
  "description": "component lib",
4
4
  "author": "trepur_ttenneb",
5
- "version": "0.4.5",
5
+ "version": "0.4.7",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",