trepur_components 0.3.14 → 0.3.17
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.
|
@@ -17,6 +17,10 @@ var _react2 = require("keen-slider/react");
|
|
|
17
17
|
|
|
18
18
|
require("./index.css");
|
|
19
19
|
|
|
20
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
20
24
|
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); }
|
|
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; }
|
|
@@ -156,19 +160,23 @@ const CarouselV2 = _ref => {
|
|
|
156
160
|
};
|
|
157
161
|
|
|
158
162
|
function Arrow(props) {
|
|
159
|
-
var _props$arrows, _props$arrows2, _props$arrows3;
|
|
160
|
-
|
|
161
|
-
const
|
|
163
|
+
var _props$arrows, _props$arrows2, _props$arrows3, _props$arrows4;
|
|
164
|
+
|
|
165
|
+
const arrowClasses = (0, _classnames.default)({
|
|
166
|
+
'arrow--left left-1.5': props.left,
|
|
167
|
+
'arrow--right left-auto right-1.5': !props.left,
|
|
168
|
+
[props === null || props === void 0 ? void 0 : (_props$arrows = props.arrows) === null || _props$arrows === void 0 ? void 0 : _props$arrows.colours]: (props === null || props === void 0 ? void 0 : (_props$arrows2 = props.arrows) === null || _props$arrows2 === void 0 ? void 0 : _props$arrows2.colours) && !props.disabled,
|
|
169
|
+
[props === null || props === void 0 ? void 0 : (_props$arrows3 = props.arrows) === null || _props$arrows3 === void 0 ? void 0 : _props$arrows3.disabledColours]: (props === null || props === void 0 ? void 0 : (_props$arrows4 = props.arrows) === null || _props$arrows4 === void 0 ? void 0 : _props$arrows4.disabledColours) && props.disabled,
|
|
170
|
+
'arrow--disabled': props.disabled
|
|
171
|
+
}, 'arrow w-12 translate-y-2/4 h-12 absolute cursor-pointer top-1/2');
|
|
162
172
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
163
173
|
onClick: props === null || props === void 0 ? void 0 : props.onClick,
|
|
164
|
-
className: "
|
|
174
|
+
className: "".concat(arrowClasses),
|
|
165
175
|
xmlns: "http://www.w3.org/2000/svg",
|
|
166
176
|
viewBox: "0 0 24 24"
|
|
167
177
|
}, (props === null || props === void 0 ? void 0 : props.left) && /*#__PURE__*/_react.default.createElement("path", {
|
|
168
|
-
className: "".concat(props === null || props === void 0 ? void 0 : (_props$arrows2 = props.arrows) === null || _props$arrows2 === void 0 ? void 0 : _props$arrows2.colours),
|
|
169
178
|
d: "M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"
|
|
170
179
|
}), !(props !== null && props !== void 0 && props.left) && /*#__PURE__*/_react.default.createElement("path", {
|
|
171
|
-
className: "".concat(props === null || props === void 0 ? void 0 : (_props$arrows3 = props.arrows) === null || _props$arrows3 === void 0 ? void 0 : _props$arrows3.colours),
|
|
172
180
|
d: "M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"
|
|
173
181
|
}));
|
|
174
182
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.containerProps = void 0;
|
|
7
|
+
|
|
8
|
+
require("core-js/modules/es.object.assign.js");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
require("../index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
|
+
|
|
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); }
|
|
27
|
+
|
|
28
|
+
const containerProps = {
|
|
29
|
+
id: _propTypes.default.string,
|
|
30
|
+
classes: _propTypes.default.string
|
|
31
|
+
};
|
|
32
|
+
exports.containerProps = containerProps;
|
|
33
|
+
|
|
34
|
+
const Container = _ref => {
|
|
35
|
+
let {
|
|
36
|
+
containerProps,
|
|
37
|
+
children
|
|
38
|
+
} = _ref;
|
|
39
|
+
const classList = (0, _classnames.default)({
|
|
40
|
+
[containerProps.classes]: containerProps === null || containerProps === void 0 ? void 0 : containerProps.classes
|
|
41
|
+
}, 'mx-auto');
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
43
|
+
style: {
|
|
44
|
+
'max-width': containerProps.maxWidth
|
|
45
|
+
}
|
|
46
|
+
}, (containerProps === null || containerProps === void 0 ? void 0 : containerProps.id) && {
|
|
47
|
+
id: containerProps === null || containerProps === void 0 ? void 0 : containerProps.id
|
|
48
|
+
}, {
|
|
49
|
+
className: classList
|
|
50
|
+
}), children);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
Container.propTypes = {
|
|
54
|
+
containerProps: _propTypes.default.shape(_objectSpread({}, containerProps))
|
|
55
|
+
};
|
|
56
|
+
var _default = Container;
|
|
57
|
+
exports.default = _default;
|
|
@@ -61,12 +61,13 @@ const textAndTitleProps = {
|
|
|
61
61
|
withLiveUpdates: _propTypes.default.bool,
|
|
62
62
|
onSave: _propTypes.default.func,
|
|
63
63
|
saveButtonProps: _propTypes.default.object,
|
|
64
|
-
cancelButtonProps: _propTypes.default.object
|
|
64
|
+
cancelButtonProps: _propTypes.default.object,
|
|
65
|
+
isHorizontal: _propTypes.default.bool
|
|
65
66
|
};
|
|
66
67
|
exports.textAndTitleProps = textAndTitleProps;
|
|
67
68
|
|
|
68
69
|
const TextAndTitle = _ref => {
|
|
69
|
-
var _textAndTitleProps$sa, _textAndTitleProps$sa2, _textAndTitleProps$sa3, _textAndTitleProps$sa4, _textAndTitleProps$sa5, _textAndTitleProps$sa6, _textAndTitleProps$ca, _textAndTitleProps$ca2, _textAndTitleProps$ca3, _textAndTitleProps$ca4, _textAndTitleProps$ca5, _textAndTitleProps$ca6;
|
|
70
|
+
var _textAndTitleProps$sa, _textAndTitleProps$sa2, _textAndTitleProps$sa3, _textAndTitleProps$sa4, _textAndTitleProps$sa5, _textAndTitleProps$sa6, _textAndTitleProps$sa7, _textAndTitleProps$sa8, _textAndTitleProps$ca, _textAndTitleProps$ca2, _textAndTitleProps$ca3, _textAndTitleProps$ca4, _textAndTitleProps$ca5, _textAndTitleProps$ca6, _textAndTitleProps$ca7, _textAndTitleProps$ca8;
|
|
70
71
|
|
|
71
72
|
let {
|
|
72
73
|
textAndTitleProps
|
|
@@ -158,6 +159,15 @@ const TextAndTitle = _ref => {
|
|
|
158
159
|
(textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.withLiveUpdates) && setIsHovering(!isHovering);
|
|
159
160
|
};
|
|
160
161
|
|
|
162
|
+
const wrapperClassList = (0, _classnames.default)({
|
|
163
|
+
'flex flex-wrap md:items-center': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
|
|
164
|
+
}, 'border');
|
|
165
|
+
const titleWrapperClassList = (0, _classnames.default)({
|
|
166
|
+
'md:w-1/2 md:text-center': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
|
|
167
|
+
});
|
|
168
|
+
const textWrapperClassList = (0, _classnames.default)({
|
|
169
|
+
'md:w-1/2 md:text-center md:py-8 md:pr-8': textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.isHorizontal
|
|
170
|
+
});
|
|
161
171
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, (textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : textAndTitleProps.id) && {
|
|
162
172
|
id: textAndTitleProps.id
|
|
163
173
|
}, {
|
|
@@ -203,39 +213,44 @@ const TextAndTitle = _ref => {
|
|
|
203
213
|
}
|
|
204
214
|
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
205
215
|
buttonProps: {
|
|
206
|
-
classes: textAndTitleProps.saveButtonProps.classes,
|
|
207
|
-
text: textAndTitleProps.saveButtonProps.text,
|
|
216
|
+
classes: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa === void 0 ? void 0 : _textAndTitleProps$sa.classes,
|
|
217
|
+
text: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa2 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa2 === void 0 ? void 0 : _textAndTitleProps$sa2.text,
|
|
208
218
|
onClick: handleButtonSave,
|
|
209
|
-
bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
210
|
-
borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
211
|
-
textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
212
|
-
hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
213
|
-
hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
214
|
-
hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
219
|
+
bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa3 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa3 === void 0 ? void 0 : _textAndTitleProps$sa3.bgColor,
|
|
220
|
+
borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa4 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa4 === void 0 ? void 0 : _textAndTitleProps$sa4.borderColor,
|
|
221
|
+
textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa5 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa5 === void 0 ? void 0 : _textAndTitleProps$sa5.textColor,
|
|
222
|
+
hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa6 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa6 === void 0 ? void 0 : _textAndTitleProps$sa6.hoverTextColor,
|
|
223
|
+
hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa7 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa7 === void 0 ? void 0 : _textAndTitleProps$sa7.hoverBorderColor,
|
|
224
|
+
hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$sa8 = textAndTitleProps.saveButtonProps) === null || _textAndTitleProps$sa8 === void 0 ? void 0 : _textAndTitleProps$sa8.hoverBgColor
|
|
215
225
|
}
|
|
216
226
|
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
217
227
|
buttonProps: {
|
|
218
|
-
classes: textAndTitleProps.cancelButtonProps.classes,
|
|
219
|
-
text: textAndTitleProps.cancelButtonProps.text,
|
|
228
|
+
classes: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca === void 0 ? void 0 : _textAndTitleProps$ca.classes,
|
|
229
|
+
text: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca2 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca2 === void 0 ? void 0 : _textAndTitleProps$ca2.text,
|
|
220
230
|
onClick: handleButtonCancel,
|
|
221
|
-
bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
222
|
-
borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
223
|
-
textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
224
|
-
hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
225
|
-
hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
226
|
-
hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$
|
|
231
|
+
bgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca3 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca3 === void 0 ? void 0 : _textAndTitleProps$ca3.bgColor,
|
|
232
|
+
borderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca4 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca4 === void 0 ? void 0 : _textAndTitleProps$ca4.borderColor,
|
|
233
|
+
textColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca5 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca5 === void 0 ? void 0 : _textAndTitleProps$ca5.textColor,
|
|
234
|
+
hoverTextColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca6 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca6 === void 0 ? void 0 : _textAndTitleProps$ca6.hoverTextColor,
|
|
235
|
+
hoverBorderColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca7 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca7 === void 0 ? void 0 : _textAndTitleProps$ca7.hoverBorderColor,
|
|
236
|
+
hoverBgColor: textAndTitleProps === null || textAndTitleProps === void 0 ? void 0 : (_textAndTitleProps$ca8 = textAndTitleProps.cancelButtonProps) === null || _textAndTitleProps$ca8 === void 0 ? void 0 : _textAndTitleProps$ca8.hoverBgColor
|
|
227
237
|
}
|
|
228
238
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
239
|
+
className: wrapperClassList,
|
|
229
240
|
onClick: toggleEditState
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
242
|
+
className: titleWrapperClassList
|
|
230
243
|
}, /*#__PURE__*/_react.default.createElement("h1", {
|
|
231
244
|
className: titleClassList
|
|
232
|
-
}, componentData.title.text), /*#__PURE__*/_react.default.createElement("
|
|
245
|
+
}, componentData.title.text)), /*#__PURE__*/_react.default.createElement("div", {
|
|
246
|
+
className: textWrapperClassList
|
|
247
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
233
248
|
className: textClassList
|
|
234
249
|
}, componentData.textLineOne.text), /*#__PURE__*/_react.default.createElement("p", {
|
|
235
250
|
className: textClassList
|
|
236
251
|
}, componentData.textLineTwo.text), /*#__PURE__*/_react.default.createElement("p", {
|
|
237
252
|
className: textClassList
|
|
238
|
-
}, componentData.textLineThree.text)));
|
|
253
|
+
}, componentData.textLineThree.text))));
|
|
239
254
|
};
|
|
240
255
|
|
|
241
256
|
TextAndTitle.propTypes = {
|
package/dist/index.js
CHANGED
|
@@ -81,6 +81,12 @@ Object.defineProperty(exports, "Column", {
|
|
|
81
81
|
return _Column.default;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
+
Object.defineProperty(exports, "Container", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function get() {
|
|
87
|
+
return _Container.default;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
84
90
|
Object.defineProperty(exports, "FooterBar", {
|
|
85
91
|
enumerable: true,
|
|
86
92
|
get: function get() {
|
|
@@ -258,6 +264,8 @@ var _Collapsible = _interopRequireDefault(require("./components/Collapsible"));
|
|
|
258
264
|
|
|
259
265
|
var _Column = _interopRequireDefault(require("./components/Column"));
|
|
260
266
|
|
|
267
|
+
var _Container = _interopRequireDefault(require("./components/Container"));
|
|
268
|
+
|
|
261
269
|
var _Form = _interopRequireDefault(require("./components/Form"));
|
|
262
270
|
|
|
263
271
|
var _FooterBar = _interopRequireDefault(require("./components/FooterBar"));
|