trepur_components 0.3.18 → 0.3.19

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.
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.object.assign.js");
3
+ require("core-js/modules/web.dom-collections.iterator.js");
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = exports.buttonProps = void 0;
9
9
 
10
- require("core-js/modules/web.dom-collections.iterator.js");
10
+ require("core-js/modules/es.object.assign.js");
11
11
 
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
 
@@ -36,7 +36,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
36
36
  const buttonProps = {
37
37
  id: _propTypes.default.string,
38
38
  classes: _propTypes.default.string,
39
- text: _propTypes.default.string,
40
39
  onClick: _propTypes.default.func,
41
40
  bgColor: _propTypes.default.string,
42
41
  textColor: _propTypes.default.string,
@@ -52,6 +51,7 @@ const buttonProps = {
52
51
  rounded: _propTypes.default.bool,
53
52
  disabled: _propTypes.default.bool,
54
53
  isLoading: _propTypes.default.bool,
54
+ target: _propTypes.default.string,
55
55
  leftIcon: _propTypes.default.shape(_Icon.iconProps),
56
56
  rightIcon: _propTypes.default.shape(_Icon.iconProps),
57
57
  centerIcon: _propTypes.default.shape(_Icon.iconProps)
@@ -60,9 +60,9 @@ exports.buttonProps = buttonProps;
60
60
 
61
61
  const Button = _ref => {
62
62
  let {
63
- buttonProps
63
+ buttonProps,
64
+ children
64
65
  } = _ref;
65
- const [hovering, setHovering] = (0, _react.useState)(false);
66
66
  if (buttonProps == undefined) return;
67
67
  const design = (0, _classnames.default)({
68
68
  [buttonProps.design]: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.design,
@@ -104,28 +104,6 @@ const Button = _ref => {
104
104
  'invisible': buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.isLoading
105
105
  }, 'flex');
106
106
 
107
- const iconLeft = (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.leftIcon) && /*#__PURE__*/_react.default.createElement(_Icon.default, {
108
- iconProps: {
109
- classes: (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.leftIcon.brand) && 'fa-brands',
110
- size: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.leftIcon.size,
111
- type: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.leftIcon.type,
112
- hollow: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.leftIcon.hollow
113
- }
114
- });
115
-
116
- const iconRight = (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.rightIcon) && /*#__PURE__*/_react.default.createElement(_Icon.default, {
117
- iconProps: {
118
- classes: buttonProps !== null && buttonProps !== void 0 && buttonProps.rightIcon.brand ? 'fa-brands' : '',
119
- size: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.rightIcon.size,
120
- type: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.rightIcon.type,
121
- hollow: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.rightIcon.hollow
122
- }
123
- });
124
-
125
- const iconCenter = (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.centerIcon) && /*#__PURE__*/_react.default.createElement(_Icon.default, {
126
- iconProps: buttonProps.centerIcon
127
- });
128
-
129
107
  const loadingIcon = /*#__PURE__*/_react.default.createElement(_Icon.default, {
130
108
  iconProps: {
131
109
  size: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.size,
@@ -134,61 +112,23 @@ const Button = _ref => {
134
112
  }
135
113
  });
136
114
 
137
- if (['internal', 'external'].includes(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.type)) {
138
- return /*#__PURE__*/_react.default.createElement("a", _extends({}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.type) === 'external' && {
139
- target: '_blank'
140
- }, {
141
- href: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.url
142
- }), /*#__PURE__*/_react.default.createElement("button", _extends({}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id) && {
143
- id: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id
144
- }, {
145
- className: classList,
146
- type: "button",
147
- "aria-busy": buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.isLoading,
148
- onMouseOver: () => setHovering(true),
149
- onMouseOut: () => setHovering(false)
150
- }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick) && {
151
- onClick: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick
152
- }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled) && {
153
- disabled: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled
154
- }), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
155
- className: buttonContentClasses
156
- }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.leftIcon) && iconLeft, /*#__PURE__*/_react.default.createElement("p", null, hovering ? buttonProps !== null && buttonProps !== void 0 && buttonProps.hoverText ? buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.hoverText : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.text : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.text), (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.rightIcon) && iconRight), /*#__PURE__*/_react.default.createElement("div", {
157
- className: loadingClasses
158
- }, loadingIcon))));
159
- } else if (['social', 'icon'].includes(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.type)) {
160
- return /*#__PURE__*/_react.default.createElement("button", _extends({}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id) && {
161
- id: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id
162
- }, {
163
- className: classList,
164
- type: "button",
165
- "aria-busy": buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.isLoading,
166
- onMouseOver: () => setHovering(true),
167
- onMouseOut: () => setHovering(false)
168
- }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick) && {
169
- onClick: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick
170
- }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled) && {
171
- disabled: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled
172
- }), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
173
- className: buttonProps !== null && buttonProps !== void 0 && buttonProps.isLoading ? 'invisible' : ''
174
- }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.centerIcon) && iconCenter), /*#__PURE__*/_react.default.createElement("div", {
175
- className: loadingClasses
176
- }, loadingIcon)));
177
- } else return /*#__PURE__*/_react.default.createElement("button", _extends({}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id) && {
115
+ return /*#__PURE__*/_react.default.createElement("a", _extends({}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.target) && {
116
+ target: '_blank'
117
+ }, {
118
+ href: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.url
119
+ }), /*#__PURE__*/_react.default.createElement("button", _extends({}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id) && {
178
120
  id: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id
179
121
  }, {
180
122
  className: classList,
181
123
  type: "button",
182
- "aria-busy": buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.isLoading,
183
- onMouseOver: () => setHovering(true),
184
- onMouseOut: () => setHovering(false)
124
+ "aria-busy": buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.isLoading
185
125
  }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick) && {
186
126
  onClick: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick
187
127
  }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled) && {
188
128
  disabled: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled
189
- }), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
129
+ }), /*#__PURE__*/_react.default.createElement("div", {
190
130
  className: buttonProps !== null && buttonProps !== void 0 && buttonProps.isLoading ? 'invisible' : ''
191
- }, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.leftIcon) && iconLeft, /*#__PURE__*/_react.default.createElement("p", null, hovering ? buttonProps !== null && buttonProps !== void 0 && buttonProps.hoverText ? buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.hoverText : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.text : buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.text), (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.rightIcon) && iconRight), /*#__PURE__*/_react.default.createElement("div", {
131
+ }, children), buttonProps.isLoading && /*#__PURE__*/_react.default.createElement("div", {
192
132
  className: loadingClasses
193
133
  }, loadingIcon)));
194
134
  };
@@ -21,6 +21,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
21
21
 
22
22
  require("../index.css");
23
23
 
24
+ var _Icon = _interopRequireDefault(require("../Icon"));
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
28
  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); }
@@ -140,13 +142,13 @@ const Card = _ref => {
140
142
  className: "flex p-2 order-last h-24"
141
143
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
142
144
  buttonProps: iconButtonProps
143
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
145
+ }, iconButtonProps.children), /*#__PURE__*/_react.default.createElement(_Button.default, {
144
146
  buttonProps: button2Props
145
- }))), hasCta && /*#__PURE__*/_react.default.createElement("div", {
147
+ }, button2Props.children))), cardButtonProps && /*#__PURE__*/_react.default.createElement("div", {
146
148
  className: btnClass
147
149
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
148
150
  buttonProps: cardButtonProps
149
- })));
151
+ }, cardButtonProps.children)));
150
152
  };
151
153
 
152
154
  var _default = Card;
@@ -49,7 +49,7 @@ const FyreCard = _ref => {
49
49
  className: "flex justify-end"
50
50
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
51
51
  buttonProps: buttonProps
52
- }))));
52
+ }, buttonProps.children))));
53
53
  };
54
54
 
55
55
  var _default = FyreCard;
@@ -57,7 +57,7 @@ const NewsCard = _ref => {
57
57
  className: "px-8"
58
58
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
59
59
  buttonProps: buttonProps
60
- }))));
60
+ }, buttonProps.children))));
61
61
  };
62
62
 
63
63
  var _default = NewsCard;
@@ -23,6 +23,8 @@ require("../index.css");
23
23
 
24
24
  var _classnames = _interopRequireDefault(require("classnames"));
25
25
 
26
+ var _Icon = _interopRequireDefault(require("../Icon"));
27
+
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
29
 
28
30
  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); }
@@ -51,7 +53,8 @@ const SocialBlock = _ref => {
51
53
  editTextClasses,
52
54
  editInputClasses,
53
55
  buttonWrapperClasses,
54
- textWrapperClasses
56
+ textWrapperClasses,
57
+ socialButtons
55
58
  } = _ref;
56
59
  const defaultComponentData = {
57
60
  title: {
@@ -75,70 +78,6 @@ const SocialBlock = _ref => {
75
78
  [hoverClasses]: withLiveUpdates && !isInEditingMode && isHovering,
76
79
  [textWrapperClasses]: textWrapperClasses
77
80
  });
78
- const socialButtons = [{
79
- classes: 'mx-2 w-16 py-4 border border-1',
80
- bgColor: "bg-social-facebook",
81
- textColor: "text-white",
82
- borderColor: "border-social-facebook",
83
- type: "social",
84
- hoverBgColor: "hover:bg-white",
85
- hoverBorderColor: "hover:border-social-facebook",
86
- hoverTextColor: "hover:text-social-facebook",
87
- url: "https://www.facebook.com/rupert.bennett",
88
- iconProps: {
89
- type: "facebook-f",
90
- brand: true,
91
- size: 2,
92
- classes: 'mx-auto'
93
- }
94
- }, {
95
- classes: 'mx-2 w-16 py-4 border border-1',
96
- bgColor: "bg-social-linkedin",
97
- textColor: "text-white",
98
- borderColor: "border-social-linkedin",
99
- type: "social",
100
- hoverBgColor: "hover:bg-white",
101
- hoverBorderColor: "hover:border-social-linkedin",
102
- hoverTextColor: "hover:text-social-linkedin",
103
- url: "https://www.linkedin.com/in/rupert-bennett",
104
- iconProps: {
105
- brand: true,
106
- type: "linkedin-in",
107
- size: 2,
108
- classes: 'mx-auto'
109
- }
110
- }, {
111
- classes: 'mx-2 w-16 py-4 border border-1',
112
- bgColor: "bg-black",
113
- textColor: "text-white",
114
- borderColor: "border-black",
115
- type: "social",
116
- hoverBgColor: "hover:bg-white",
117
- hoverBorderColor: "hover:border-black",
118
- hoverTextColor: "hover:text-black",
119
- url: "https://github.com/irupertbennett",
120
- iconProps: {
121
- brand: true,
122
- type: "github",
123
- size: 2,
124
- classes: 'mx-auto'
125
- }
126
- }, {
127
- classes: 'mx-2 w-16 py-4 border border-1',
128
- bgColor: "bg-brand-error",
129
- textColor: "text-white",
130
- borderColor: "border-brand-error",
131
- type: "social",
132
- hoverBgColor: "hover:bg-white",
133
- hoverBorderColor: "hover:border-brand-error",
134
- hoverTextColor: "hover:text-brand-error",
135
- url: "mailto:irupertbennett@gmail.com?subject=rupertbennett.com-&body=Referred from rupertbennett.com",
136
- iconProps: {
137
- type: "envelope",
138
- size: 2,
139
- classes: 'mx-auto'
140
- }
141
- }];
142
81
 
143
82
  const toggleEditState = () => {
144
83
  withLiveUpdates && setIsInEditingMode(!isInEditingMode);
@@ -205,7 +144,6 @@ const SocialBlock = _ref => {
205
144
  }), /*#__PURE__*/_react.default.createElement(_Button.default, {
206
145
  buttonProps: {
207
146
  classes: 'mt-4',
208
- text: 'Save',
209
147
  onClick: handleButtonSave,
210
148
  bgColor: saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.bgColor,
211
149
  borderColor: saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.borderColor,
@@ -214,10 +152,9 @@ const SocialBlock = _ref => {
214
152
  hoverBorderColor: saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.hoverBorderColor,
215
153
  hoverBgColor: saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.hoverBgColor
216
154
  }
217
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
155
+ }, "Save"), /*#__PURE__*/_react.default.createElement(_Button.default, {
218
156
  buttonProps: {
219
157
  classes: 'mt-4 ml-4',
220
- text: 'Cancel',
221
158
  onClick: handleButtonCancel,
222
159
  bgColor: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.bgColor,
223
160
  borderColor: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.borderColor,
@@ -226,7 +163,7 @@ const SocialBlock = _ref => {
226
163
  hoverBorderColor: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.hoverBorderColor,
227
164
  hoverBgColor: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.hoverBgColor
228
165
  }
229
- })) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
166
+ }, "Cancel")) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
230
167
  onMouseOver: () => toggleHoverState(),
231
168
  onMouseOut: () => toggleHoverState(),
232
169
  onClick: toggleEditState,
@@ -238,23 +175,7 @@ const SocialBlock = _ref => {
238
175
  }, componentData.text.text)), /*#__PURE__*/_react.default.createElement("div", {
239
176
  className: buttnoWrapperClasslist
240
177
  }, socialButtons && socialButtons.map((button, i) => {
241
- return /*#__PURE__*/_react.default.createElement(_Button.default, {
242
- key: "".concat(i, "_button"),
243
- buttonProps: {
244
- classes: button.classes,
245
- bgColor: button.bgColor,
246
- textColor: button.textColor,
247
- borderColor: button.borderColor,
248
- type: button.type,
249
- hoverBgColor: button.hoverBgColor,
250
- hoverBorderColor: button.hoverBorderColor,
251
- hoverTextColor: button.hoverTextColor,
252
- onClick: button.onClick,
253
- url: button.url,
254
- border: true,
255
- centerIcon: button.iconProps
256
- }
257
- });
178
+ return button;
258
179
  }))));
259
180
  };
260
181
 
@@ -161,7 +161,7 @@ const TextAndTitle = _ref => {
161
161
  };
162
162
 
163
163
  const wrapperClassList = (0, _classnames.default)({
164
- 'flex flex-wrap md:items-center': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
164
+ 'flex flex-wrap justify-center md:items-center': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
165
165
  });
166
166
  const titleWrapperClassList = (0, _classnames.default)({
167
167
  'md:w-1/2 md:text-center': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
@@ -215,28 +215,26 @@ const TextAndTitle = _ref => {
215
215
  }), /*#__PURE__*/_react.default.createElement(_Button.default, {
216
216
  buttonProps: {
217
217
  classes: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa === void 0 ? void 0 : _textAndTitleProps$sa.classes,
218
- text: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa2 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa2 === void 0 ? void 0 : _textAndTitleProps$sa2.text,
219
218
  onClick: handleButtonSave,
220
- bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa3 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa3 === void 0 ? void 0 : _textAndTitleProps$sa3.bgColor,
221
- borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa4 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa4 === void 0 ? void 0 : _textAndTitleProps$sa4.borderColor,
222
- textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa5 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa5 === void 0 ? void 0 : _textAndTitleProps$sa5.textColor,
223
- hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa6 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa6 === void 0 ? void 0 : _textAndTitleProps$sa6.hoverTextColor,
224
- hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa7 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa7 === void 0 ? void 0 : _textAndTitleProps$sa7.hoverBorderColor,
225
- hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa8 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa8 === void 0 ? void 0 : _textAndTitleProps$sa8.hoverBgColor
219
+ bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa2 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa2 === void 0 ? void 0 : _textAndTitleProps$sa2.bgColor,
220
+ borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa3 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa3 === void 0 ? void 0 : _textAndTitleProps$sa3.borderColor,
221
+ textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa4 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa4 === void 0 ? void 0 : _textAndTitleProps$sa4.textColor,
222
+ hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa5 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa5 === void 0 ? void 0 : _textAndTitleProps$sa5.hoverTextColor,
223
+ hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa6 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa6 === void 0 ? void 0 : _textAndTitleProps$sa6.hoverBorderColor,
224
+ hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa7 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa7 === void 0 ? void 0 : _textAndTitleProps$sa7.hoverBgColor
226
225
  }
227
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
226
+ }, textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa8 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa8 === void 0 ? void 0 : _textAndTitleProps$sa8.text), /*#__PURE__*/_react.default.createElement(_Button.default, {
228
227
  buttonProps: {
229
228
  classes: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca === void 0 ? void 0 : _textAndTitleProps$ca.classes,
230
- text: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca2 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca2 === void 0 ? void 0 : _textAndTitleProps$ca2.text,
231
229
  onClick: handleButtonCancel,
232
- bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca3 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca3 === void 0 ? void 0 : _textAndTitleProps$ca3.bgColor,
233
- borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca4 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca4 === void 0 ? void 0 : _textAndTitleProps$ca4.borderColor,
234
- textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca5 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca5 === void 0 ? void 0 : _textAndTitleProps$ca5.textColor,
235
- hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca6 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca6 === void 0 ? void 0 : _textAndTitleProps$ca6.hoverTextColor,
236
- hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca7 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca7 === void 0 ? void 0 : _textAndTitleProps$ca7.hoverBorderColor,
237
- hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca8 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca8 === void 0 ? void 0 : _textAndTitleProps$ca8.hoverBgColor
230
+ bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca2 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca2 === void 0 ? void 0 : _textAndTitleProps$ca2.bgColor,
231
+ borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca3 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca3 === void 0 ? void 0 : _textAndTitleProps$ca3.borderColor,
232
+ textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca4 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca4 === void 0 ? void 0 : _textAndTitleProps$ca4.textColor,
233
+ hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca5 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca5 === void 0 ? void 0 : _textAndTitleProps$ca5.hoverTextColor,
234
+ hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca6 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca6 === void 0 ? void 0 : _textAndTitleProps$ca6.hoverBorderColor,
235
+ hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca7 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca7 === void 0 ? void 0 : _textAndTitleProps$ca7.hoverBgColor
238
236
  }
239
- })) : /*#__PURE__*/_react.default.createElement("div", {
237
+ }, textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca8 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca8 === void 0 ? void 0 : _textAndTitleProps$ca8.text)) : /*#__PURE__*/_react.default.createElement("div", {
240
238
  className: wrapperClassList,
241
239
  onClick: toggleEditState
242
240
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -245,7 +243,9 @@ const TextAndTitle = _ref => {
245
243
  className: titleClassList
246
244
  }, componentData.title.text) : /*#__PURE__*/_react.default.createElement("div", null, children)), /*#__PURE__*/_react.default.createElement("div", {
247
245
  className: textWrapperClassList
248
- }, /*#__PURE__*/_react.default.createElement("p", {
246
+ }, !componentData.title.text ? /*#__PURE__*/_react.default.createElement("h1", {
247
+ className: titleClassList
248
+ }, componentData.textLineOne.text) : /*#__PURE__*/_react.default.createElement("p", {
249
249
  className: textClassList
250
250
  }, componentData.textLineOne.text), /*#__PURE__*/_react.default.createElement("p", {
251
251
  className: textClassList
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.3.18",
5
+ "version": "0.3.19",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",