intelicoreact 1.2.20 → 1.2.22

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.
@@ -98,7 +98,6 @@ var Modal = function Modal(_ref2) {
98
98
  renderModal = _useMobileModal.renderModal,
99
99
  isMobile = _useMobileModal.isMobile;
100
100
 
101
- if (!isOpen) return null;
102
101
  var handle = {
103
102
  confirm: function confirm() {
104
103
  onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
@@ -123,77 +122,83 @@ var Modal = function Modal(_ref2) {
123
122
  document.removeEventListener('keyup', handle.pressEsc);
124
123
  };
125
124
  }, [submitOnEnter, closeOnEsc]);
126
- return /*#__PURE__*/_react.default.createElement("div", {
127
- style: {
128
- zIndex: zIndex
129
- },
130
- "data-testid": testId,
131
- className: "modal-box j5"
132
- }, /*#__PURE__*/_react.default.createElement("div", {
133
- "data-testid": 'modal-closeOverlay',
134
- className: isOpen ? 'modal-overlay' : 'hidden',
135
- onClick: closeModal
136
- }), renderModal( /*#__PURE__*/_react.default.createElement("div", {
137
- style: {
138
- width: size
139
- },
140
- className: (0, _classnames.default)(className, {
141
- 'modal': isOpen,
142
- 'modal-mobile': isOpen && isMobile,
143
- 'hidden': !isOpen
144
- })
145
- }, !noHeader && /*#__PURE__*/_react.default.createElement(_ModalTitle.default, {
146
- wrapperRef: modalMobileHeaderRef,
147
- className: (0, _classnames.default)({
148
- 'modal__header--hidden': MODALS_LOGIC.IS_HEADER_HIDDEN,
149
- 'modal__header--sticky': !MODALS_LOGIC.IS_HEADER_HIDDEN && MODALS_LOGIC.IS_HEADER_STICKY
150
- }),
151
- variant: variant,
152
- isForced: forced,
153
- onClose: handle.decline,
154
- noHeaderCloseBtn: noHeaderCloseBtn
155
- }, /*#__PURE__*/_react.default.createElement("span", null, renderModalTitle({
156
- mode: mode,
157
- title: title,
158
- onlyTitle: onlyTitle
159
- }))), /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, atributesForModalBody, {
160
- ref: modalMobileBodyRef,
161
- className: (0, _classnames.default)('modal__body', {
162
- 'modal__body--no-footer': noFooter
163
- })
164
- }), children), !noFooter && /*#__PURE__*/_react.default.createElement(_ModalFooter.default, {
165
- wrapperRef: modalMobileFooterRef,
166
- className: (0, _classnames.default)({
167
- 'modal__footer--hidden': MODALS_LOGIC.IS_FOOTER_HIDDEN,
168
- 'modal__footer--sticky': !MODALS_LOGIC.IS_FOOTER_HIDDEN && MODALS_LOGIC.IS_FOOTER_STICKY,
169
- 'modal__footer_with-left-content': leftContentOfFooter
170
- })
171
- }, leftContentOfFooter, /*#__PURE__*/_react.default.createElement("div", {
172
- className: "modal__buttons-block"
173
- }, !noCloseBtn && /*#__PURE__*/_react.default.createElement(_Button.default, {
174
- testId: "modal",
175
- className: (0, _classnames.default)(closeBtnClassName, btnClassNames),
176
- variant: closeBtnVariant || 'dark-outline',
177
- onClick: function onClick() {
178
- return handle.decline();
179
- },
180
- label: closeBtnText || 'Cancel',
181
- disabled: closeBtnDisable,
182
- icon: closeBtnIcon,
183
- isIconRight: isCloseBtnIconPositionRight,
184
- tabIndex: 1
185
- }), !noConfirmBtn && /*#__PURE__*/_react.default.createElement(_Button.default, {
186
- testId: "modal",
187
- onClick: function onClick() {
188
- return handle.confirm();
189
- },
190
- label: confirmBtnLabel || (mode === null || mode === void 0 ? void 0 : mode[0].toUpperCase()) + (mode === null || mode === void 0 ? void 0 : mode.slice(1)) || 'Apply',
191
- className: (0, _classnames.default)('ml5', confirmBtnClassName, btnClassNames),
192
- variant: confirmBtnVariant,
193
- disabled: confirmBtnDisable,
194
- icon: confirmBtnIcon,
195
- isIconRight: isConfirmBtnIconPositionRight
196
- }))))));
125
+
126
+ var render = function render() {
127
+ return /*#__PURE__*/_react.default.createElement("div", {
128
+ style: {
129
+ zIndex: zIndex
130
+ },
131
+ "data-testid": testId,
132
+ className: "modal-box j5"
133
+ }, /*#__PURE__*/_react.default.createElement("div", {
134
+ "data-testid": 'modal-closeOverlay',
135
+ className: isOpen ? 'modal-overlay' : 'hidden',
136
+ onClick: closeModal
137
+ }), renderModal( /*#__PURE__*/_react.default.createElement("div", {
138
+ style: {
139
+ width: size
140
+ },
141
+ className: (0, _classnames.default)(className, {
142
+ 'modal': isOpen,
143
+ 'modal-mobile': isOpen && isMobile,
144
+ 'hidden': !isOpen
145
+ })
146
+ }, !noHeader && /*#__PURE__*/_react.default.createElement(_ModalTitle.default, {
147
+ wrapperRef: modalMobileHeaderRef,
148
+ className: (0, _classnames.default)({
149
+ 'modal__header--hidden': MODALS_LOGIC.IS_HEADER_HIDDEN,
150
+ 'modal__header--sticky': !MODALS_LOGIC.IS_HEADER_HIDDEN && MODALS_LOGIC.IS_HEADER_STICKY
151
+ }),
152
+ variant: variant,
153
+ isForced: forced,
154
+ onClose: handle.decline,
155
+ noHeaderCloseBtn: noHeaderCloseBtn
156
+ }, /*#__PURE__*/_react.default.createElement("span", null, renderModalTitle({
157
+ mode: mode,
158
+ title: title,
159
+ onlyTitle: onlyTitle
160
+ }))), /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, atributesForModalBody, {
161
+ ref: modalMobileBodyRef,
162
+ className: (0, _classnames.default)('modal__body', {
163
+ 'modal__body--no-footer': noFooter
164
+ })
165
+ }), children), !noFooter && /*#__PURE__*/_react.default.createElement(_ModalFooter.default, {
166
+ wrapperRef: modalMobileFooterRef,
167
+ className: (0, _classnames.default)({
168
+ 'modal__footer--hidden': MODALS_LOGIC.IS_FOOTER_HIDDEN,
169
+ 'modal__footer--sticky': !MODALS_LOGIC.IS_FOOTER_HIDDEN && MODALS_LOGIC.IS_FOOTER_STICKY,
170
+ 'modal__footer_with-left-content': leftContentOfFooter
171
+ })
172
+ }, leftContentOfFooter, /*#__PURE__*/_react.default.createElement("div", {
173
+ className: "modal__buttons-block"
174
+ }, !noCloseBtn && /*#__PURE__*/_react.default.createElement(_Button.default, {
175
+ testId: "modal",
176
+ className: (0, _classnames.default)(closeBtnClassName, btnClassNames),
177
+ variant: closeBtnVariant || 'dark-outline',
178
+ onClick: function onClick() {
179
+ return handle.decline();
180
+ },
181
+ label: closeBtnText || 'Cancel',
182
+ disabled: closeBtnDisable,
183
+ icon: closeBtnIcon,
184
+ isIconRight: isCloseBtnIconPositionRight,
185
+ tabIndex: 1
186
+ }), !noConfirmBtn && /*#__PURE__*/_react.default.createElement(_Button.default, {
187
+ testId: "modal",
188
+ onClick: function onClick() {
189
+ return handle.confirm();
190
+ },
191
+ label: confirmBtnLabel || (mode === null || mode === void 0 ? void 0 : mode[0].toUpperCase()) + (mode === null || mode === void 0 ? void 0 : mode.slice(1)) || 'Apply',
192
+ className: (0, _classnames.default)('ml5', confirmBtnClassName, btnClassNames),
193
+ variant: confirmBtnVariant,
194
+ disabled: confirmBtnDisable,
195
+ icon: confirmBtnIcon,
196
+ isIconRight: isConfirmBtnIconPositionRight
197
+ }))))));
198
+ };
199
+
200
+ if (!isOpen) return null;
201
+ return render();
197
202
  };
198
203
 
199
204
  var _default = Modal;
@@ -7,6 +7,8 @@
7
7
  overflow-y: auto;
8
8
  box-sizing: border-box;
9
9
  border-radius: 16px 16px 0 0;
10
+ display: flex;
11
+ align-items: flex-end;
10
12
 
11
13
  .modal {
12
14
  margin-top: 16px!important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [