intelicoreact 0.1.79 → 0.1.82
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.
|
@@ -30,9 +30,12 @@ var Button = function Button(_ref) {
|
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
style = _ref.style,
|
|
32
32
|
noIcon = _ref.noIcon,
|
|
33
|
-
isIconRight = _ref.isIconRight
|
|
33
|
+
isIconRight = _ref.isIconRight,
|
|
34
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
35
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
34
36
|
var noRenderIcon = noIcon || variant === "ellipse-apply" || variant === "ellipse-cancel";
|
|
35
37
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
38
|
+
tabIndex: tabIndex,
|
|
36
39
|
style: style,
|
|
37
40
|
className: (0, _classnames.default)(className, RC, (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "_").concat(variant), variant), (0, _defineProperty2.default)(_cn, 'button_icon-left', icon && !isIconRight), (0, _defineProperty2.default)(_cn, 'button_icon-right', icon && isIconRight), _cn)),
|
|
38
41
|
onClick: onClick,
|
|
@@ -39,6 +39,7 @@ var Modal = function Modal(_ref) {
|
|
|
39
39
|
className = _ref.className,
|
|
40
40
|
title = _ref.title,
|
|
41
41
|
variant = _ref.variant,
|
|
42
|
+
onlyTitle = _ref.onlyTitle,
|
|
42
43
|
mode = _ref.mode,
|
|
43
44
|
size = _ref.size,
|
|
44
45
|
confirmBtnClassName = _ref.confirmBtnClassName,
|
|
@@ -46,6 +47,8 @@ var Modal = function Modal(_ref) {
|
|
|
46
47
|
_ref$confirmBtnVarian = _ref.confirmBtnVariant,
|
|
47
48
|
confirmBtnVariant = _ref$confirmBtnVarian === void 0 ? 'primary' : _ref$confirmBtnVarian,
|
|
48
49
|
confirmBtnDisable = _ref.confirmBtnDisable,
|
|
50
|
+
confirmBtnIcon = _ref.confirmBtnIcon,
|
|
51
|
+
isConfirmBtnIconPositionRight = _ref.isConfirmBtnIconPositionRight,
|
|
49
52
|
noConfirmBtn = _ref.noConfirmBtn,
|
|
50
53
|
noCloseBtn = _ref.noCloseBtn,
|
|
51
54
|
noFooter = _ref.noFooter,
|
|
@@ -54,13 +57,14 @@ var Modal = function Modal(_ref) {
|
|
|
54
57
|
closeBtnText = _ref.closeBtnText,
|
|
55
58
|
closeBtnVariant = _ref.closeBtnVariant,
|
|
56
59
|
closeBtnDisable = _ref.closeBtnDisable,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
btnClassNames = _ref.btnClassNames
|
|
60
|
+
closeBtnIcon = _ref.closeBtnIcon,
|
|
61
|
+
forced = _ref.forced,
|
|
62
|
+
btnClassNames = _ref.btnClassNames,
|
|
63
|
+
isCloseBtnIconPositionRight = _ref.isCloseBtnIconPositionRight;
|
|
60
64
|
if (!isOpen) return null;
|
|
61
65
|
|
|
62
66
|
var renderModalTitle = function renderModalTitle() {
|
|
63
|
-
if (mode && mode !== 'default') return "".concat(
|
|
67
|
+
if (mode && mode !== 'default' && !onlyTitle) return "".concat(mode[0].toUpperCase() + mode.slice(1), " ").concat(title);
|
|
64
68
|
return title;
|
|
65
69
|
};
|
|
66
70
|
|
|
@@ -92,7 +96,7 @@ var Modal = function Modal(_ref) {
|
|
|
92
96
|
className: (0, _classnames.default)('modal__header', (0, _defineProperty2.default)({}, "modal__header-".concat(variant), variant))
|
|
93
97
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
94
98
|
className: (0, _classnames.default)('modal__header-title', (0, _defineProperty2.default)({}, "modal__header-".concat(variant, "-title"), variant))
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, renderModalTitle())), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, renderModalTitle())), !forced && /*#__PURE__*/_react.default.createElement("div", {
|
|
96
100
|
onClick: closeModal,
|
|
97
101
|
className: (0, _classnames.default)('modal-close-icon-box', {
|
|
98
102
|
'modal-close-icon-box-primary': variant === 'primary'
|
|
@@ -110,7 +114,9 @@ var Modal = function Modal(_ref) {
|
|
|
110
114
|
variant: closeBtnVariant || 'dark-outline',
|
|
111
115
|
onClick: closeModal,
|
|
112
116
|
label: closeBtnText || 'Cancel',
|
|
113
|
-
disabled: closeBtnDisable
|
|
117
|
+
disabled: closeBtnDisable,
|
|
118
|
+
icon: closeBtnIcon,
|
|
119
|
+
isIconRight: isCloseBtnIconPositionRight
|
|
114
120
|
}), !noConfirmBtn && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
115
121
|
onClick: function onClick() {
|
|
116
122
|
return handle.confirm();
|
|
@@ -118,7 +124,9 @@ var Modal = function Modal(_ref) {
|
|
|
118
124
|
label: confirmBtnLabel || (mode === null || mode === void 0 ? void 0 : mode[0].toUpperCase()) + (mode === null || mode === void 0 ? void 0 : mode.slice(1)) || 'Apply',
|
|
119
125
|
className: (0, _classnames.default)('ml5', confirmBtnClassName, btnClassNames),
|
|
120
126
|
variant: confirmBtnVariant,
|
|
121
|
-
disabled: confirmBtnDisable
|
|
127
|
+
disabled: confirmBtnDisable,
|
|
128
|
+
icon: confirmBtnIcon,
|
|
129
|
+
isIconRight: isConfirmBtnIconPositionRight
|
|
122
130
|
}))));
|
|
123
131
|
};
|
|
124
132
|
|
package/dist/Functions/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.changeMeta = exports.addBitDepthPoints = exports.throttle = exports.debounce = exports.getColorById = exports.getStyles = exports.logout = exports.useOutsideToggle = exports.handleObjectChange = void 0;
|
|
8
|
+
exports.firstLetterCapital = exports.changeMeta = exports.addBitDepthPoints = exports.throttle = exports.debounce = exports.getColorById = exports.getStyles = exports.logout = exports.useOutsideToggle = exports.handleObjectChange = void 0;
|
|
9
9
|
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
|
|
@@ -155,4 +155,10 @@ var changeMeta = function changeMeta(key) {
|
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
-
exports.changeMeta = changeMeta;
|
|
158
|
+
exports.changeMeta = changeMeta;
|
|
159
|
+
|
|
160
|
+
var firstLetterCapital = function firstLetterCapital(str) {
|
|
161
|
+
return "".concat(str.charAt(0).toUpperCase()).concat(str.slice(1));
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
exports.firstLetterCapital = firstLetterCapital;
|