@true-engineering/true-react-common-ui-kit 2.2.0 → 2.3.1
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.
- package/README.md +16 -0
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/true-react-common-ui-kit.js +95 -41
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +95 -41
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +2 -2
- package/src/components/Modal/Modal.tsx +26 -12
- package/src/helpers/deprecated.ts +2 -1
package/README.md
CHANGED
|
@@ -10,6 +10,22 @@
|
|
|
10
10
|
|
|
11
11
|
# Release Notes
|
|
12
12
|
|
|
13
|
+
## v2.3.0
|
|
14
|
+
|
|
15
|
+
### Changes
|
|
16
|
+
|
|
17
|
+
- **Modal**: расширяет свойства модального окна свойствами для CSSTransition
|
|
18
|
+
|
|
19
|
+
### Breaking changes
|
|
20
|
+
|
|
21
|
+
- **Modal**: удалена пропса `onCompletelyHidden`. Вместо неё нужно использовать `onExited`
|
|
22
|
+
|
|
23
|
+
## v2.2.0
|
|
24
|
+
|
|
25
|
+
### Changes
|
|
26
|
+
|
|
27
|
+
- Подключена **@true-engineering/true-react-platform-helpers**
|
|
28
|
+
|
|
13
29
|
## v2.1.0
|
|
14
30
|
|
|
15
31
|
### Changes
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TransitionProps } from 'react-transition-group/Transition';
|
|
2
3
|
import { ICommonProps } from '../../types';
|
|
3
4
|
import { ModalStyles } from './Modal.styles';
|
|
4
5
|
export declare type IModalPosition = 'center' | 'left' | 'right' | 'static';
|
|
5
|
-
export
|
|
6
|
+
export declare type IModalTransitionProps = Pick<TransitionProps<HTMLDivElement>, 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited'>;
|
|
7
|
+
export interface IModalProps extends ICommonProps, IModalTransitionProps {
|
|
6
8
|
tweakStyles?: ModalStyles;
|
|
7
9
|
title?: ReactNode;
|
|
8
10
|
size?: 'l' | 'm' | 's';
|
|
@@ -19,8 +21,6 @@ export interface IModalProps extends ICommonProps {
|
|
|
19
21
|
isOpen?: boolean;
|
|
20
22
|
zIndex?: number;
|
|
21
23
|
testId?: string;
|
|
22
|
-
onEnter?(): void;
|
|
23
24
|
onClose?(): void;
|
|
24
|
-
onCompletelyHidden?(): void;
|
|
25
25
|
}
|
|
26
26
|
export declare const Modal: FC<IModalProps>;
|
|
@@ -1435,7 +1435,7 @@ var getTestId = getTestId$1;
|
|
|
1435
1435
|
var isStringNotEmpty = isStringNotEmpty$1;
|
|
1436
1436
|
var isEmpty = isEmpty$1;
|
|
1437
1437
|
var isNotEmpty = function(val) {
|
|
1438
|
-
return isString(val) && isStringNotEmpty(val) || isNotEmpty(val);
|
|
1438
|
+
return isString(val) && isStringNotEmpty$1(val) || isNotEmpty$1(val);
|
|
1439
1439
|
};
|
|
1440
1440
|
var useIsMounted = function() {
|
|
1441
1441
|
var isMounted = useRef(false);
|
|
@@ -7295,10 +7295,10 @@ function _object_spread_props$r(target, source) {
|
|
|
7295
7295
|
}
|
|
7296
7296
|
return target;
|
|
7297
7297
|
}
|
|
7298
|
-
function _object_without_properties$
|
|
7298
|
+
function _object_without_properties$9(source, excluded) {
|
|
7299
7299
|
if (source == null)
|
|
7300
7300
|
return {};
|
|
7301
|
-
var target = _object_without_properties_loose$
|
|
7301
|
+
var target = _object_without_properties_loose$9(source, excluded);
|
|
7302
7302
|
var key, i;
|
|
7303
7303
|
if (Object.getOwnPropertySymbols) {
|
|
7304
7304
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7313,7 +7313,7 @@ function _object_without_properties$8(source, excluded) {
|
|
|
7313
7313
|
}
|
|
7314
7314
|
return target;
|
|
7315
7315
|
}
|
|
7316
|
-
function _object_without_properties_loose$
|
|
7316
|
+
function _object_without_properties_loose$9(source, excluded) {
|
|
7317
7317
|
if (source == null)
|
|
7318
7318
|
return {};
|
|
7319
7319
|
var target = {};
|
|
@@ -7328,7 +7328,7 @@ function _object_without_properties_loose$8(source, excluded) {
|
|
|
7328
7328
|
return target;
|
|
7329
7329
|
}
|
|
7330
7330
|
var DateInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
7331
|
-
var date = _param.date, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? "" : _param_startDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? "" : _param_endDate, mask = _param.mask, className = _param.className, placeholder = _param.placeholder, data = _param.data, isRange = _param.isRange, tweakStyles = _param.tweakStyles, onClick = _param.onClick, onChange = _param.onChange, inputProps = _object_without_properties$
|
|
7331
|
+
var date = _param.date, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? "" : _param_startDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? "" : _param_endDate, mask = _param.mask, className = _param.className, placeholder = _param.placeholder, data = _param.data, isRange = _param.isRange, tweakStyles = _param.tweakStyles, onClick = _param.onClick, onChange = _param.onChange, inputProps = _object_without_properties$9(_param, [
|
|
7332
7332
|
"date",
|
|
7333
7333
|
"startDate",
|
|
7334
7334
|
"endDate",
|
|
@@ -7500,10 +7500,10 @@ function _object_spread_props$q(target, source) {
|
|
|
7500
7500
|
}
|
|
7501
7501
|
return target;
|
|
7502
7502
|
}
|
|
7503
|
-
function _object_without_properties$
|
|
7503
|
+
function _object_without_properties$8(source, excluded) {
|
|
7504
7504
|
if (source == null)
|
|
7505
7505
|
return {};
|
|
7506
|
-
var target = _object_without_properties_loose$
|
|
7506
|
+
var target = _object_without_properties_loose$8(source, excluded);
|
|
7507
7507
|
var key, i;
|
|
7508
7508
|
if (Object.getOwnPropertySymbols) {
|
|
7509
7509
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7518,7 +7518,7 @@ function _object_without_properties$7(source, excluded) {
|
|
|
7518
7518
|
}
|
|
7519
7519
|
return target;
|
|
7520
7520
|
}
|
|
7521
|
-
function _object_without_properties_loose$
|
|
7521
|
+
function _object_without_properties_loose$8(source, excluded) {
|
|
7522
7522
|
if (source == null)
|
|
7523
7523
|
return {};
|
|
7524
7524
|
var target = {};
|
|
@@ -7533,7 +7533,7 @@ function _object_without_properties_loose$7(source, excluded) {
|
|
|
7533
7533
|
return target;
|
|
7534
7534
|
}
|
|
7535
7535
|
var SearchInput = function(_param) {
|
|
7536
|
-
var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, props = _object_without_properties$
|
|
7536
|
+
var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, props = _object_without_properties$8(_param, [
|
|
7537
7537
|
"isClearable",
|
|
7538
7538
|
"tweakStyles",
|
|
7539
7539
|
"testId",
|
|
@@ -7716,10 +7716,10 @@ function _object_spread$x(target) {
|
|
|
7716
7716
|
}
|
|
7717
7717
|
return target;
|
|
7718
7718
|
}
|
|
7719
|
-
function _object_without_properties$
|
|
7719
|
+
function _object_without_properties$7(source, excluded) {
|
|
7720
7720
|
if (source == null)
|
|
7721
7721
|
return {};
|
|
7722
|
-
var target = _object_without_properties_loose$
|
|
7722
|
+
var target = _object_without_properties_loose$7(source, excluded);
|
|
7723
7723
|
var key, i;
|
|
7724
7724
|
if (Object.getOwnPropertySymbols) {
|
|
7725
7725
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -7734,7 +7734,7 @@ function _object_without_properties$6(source, excluded) {
|
|
|
7734
7734
|
}
|
|
7735
7735
|
return target;
|
|
7736
7736
|
}
|
|
7737
|
-
function _object_without_properties_loose$
|
|
7737
|
+
function _object_without_properties_loose$7(source, excluded) {
|
|
7738
7738
|
if (source == null)
|
|
7739
7739
|
return {};
|
|
7740
7740
|
var target = {};
|
|
@@ -7846,7 +7846,7 @@ var ScrollIntoViewIfNeeded = /* @__PURE__ */ function(PureComponent2) {
|
|
|
7846
7846
|
_this_props.active;
|
|
7847
7847
|
var elementType = _this_props.elementType, children = _this_props.children;
|
|
7848
7848
|
_this_props.options;
|
|
7849
|
-
var wrapperProps = _object_without_properties$
|
|
7849
|
+
var wrapperProps = _object_without_properties$7(_this_props, [
|
|
7850
7850
|
"active",
|
|
7851
7851
|
"elementType",
|
|
7852
7852
|
"children",
|
|
@@ -8310,10 +8310,10 @@ function _object_spread_props$o(target, source) {
|
|
|
8310
8310
|
}
|
|
8311
8311
|
return target;
|
|
8312
8312
|
}
|
|
8313
|
-
function _object_without_properties$
|
|
8313
|
+
function _object_without_properties$6(source, excluded) {
|
|
8314
8314
|
if (source == null)
|
|
8315
8315
|
return {};
|
|
8316
|
-
var target = _object_without_properties_loose$
|
|
8316
|
+
var target = _object_without_properties_loose$6(source, excluded);
|
|
8317
8317
|
var key, i;
|
|
8318
8318
|
if (Object.getOwnPropertySymbols) {
|
|
8319
8319
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -8328,7 +8328,7 @@ function _object_without_properties$5(source, excluded) {
|
|
|
8328
8328
|
}
|
|
8329
8329
|
return target;
|
|
8330
8330
|
}
|
|
8331
|
-
function _object_without_properties_loose$
|
|
8331
|
+
function _object_without_properties_loose$6(source, excluded) {
|
|
8332
8332
|
if (source == null)
|
|
8333
8333
|
return {};
|
|
8334
8334
|
var target = {};
|
|
@@ -8464,7 +8464,7 @@ var __generator$4 = globalThis && globalThis.__generator || function(thisArg, bo
|
|
|
8464
8464
|
}
|
|
8465
8465
|
};
|
|
8466
8466
|
function Select(props) {
|
|
8467
|
-
var options = props.options, value = props.value, defaultOptionLabel = props.defaultOptionLabel, allOptionsLabel = props.allOptionsLabel, _props_debounceTime = props.debounceTime, debounceTime = _props_debounceTime === void 0 ? 400 : _props_debounceTime, _props_optionsMode = props.optionsMode, optionsMode = _props_optionsMode === void 0 ? "normal" : _props_optionsMode, noMatchesLabel = props.noMatchesLabel, loadingLabel = props.loadingLabel, tweakStyles = props.tweakStyles, testId = props.testId, isReadonly = props.isReadonly, isDisabled = props.isDisabled, dropdownOptions = props.dropdownOptions, _props_minSymbolsCountToOpenList = props.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _props_minSymbolsCountToOpenList === void 0 ? 0 : _props_minSymbolsCountToOpenList, _props_dropdownIcon = props.dropdownIcon, dropdownIcon = _props_dropdownIcon === void 0 ? "chevron-down" : _props_dropdownIcon, _props_shouldScrollToList = props.shouldScrollToList, shouldScrollToList = _props_shouldScrollToList === void 0 ? true : _props_shouldScrollToList, searchInput = props.searchInput, iconType = props.iconType, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, onType = props.onType, onOpen = props.onOpen, _props_isOptionDisabled = props.isOptionDisabled, isOptionDisabled = _props_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _props_isOptionDisabled, _props_compareValuesOnChange = props.compareValuesOnChange, compareValuesOnChange = _props_compareValuesOnChange === void 0 ? defaultCompareFunction : _props_compareValuesOnChange, _props_convertValueToString = props.convertValueToString, convertValueToString = _props_convertValueToString === void 0 ? defaultConvertFunction$2 : _props_convertValueToString, convertValueToId = props.convertValueToId, convertValueToReactNode = props.convertValueToReactNode, optionsFilter = props.optionsFilter, inputProps = _object_without_properties$
|
|
8467
|
+
var options = props.options, value = props.value, defaultOptionLabel = props.defaultOptionLabel, allOptionsLabel = props.allOptionsLabel, _props_debounceTime = props.debounceTime, debounceTime = _props_debounceTime === void 0 ? 400 : _props_debounceTime, _props_optionsMode = props.optionsMode, optionsMode = _props_optionsMode === void 0 ? "normal" : _props_optionsMode, noMatchesLabel = props.noMatchesLabel, loadingLabel = props.loadingLabel, tweakStyles = props.tweakStyles, testId = props.testId, isReadonly = props.isReadonly, isDisabled = props.isDisabled, dropdownOptions = props.dropdownOptions, _props_minSymbolsCountToOpenList = props.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _props_minSymbolsCountToOpenList === void 0 ? 0 : _props_minSymbolsCountToOpenList, _props_dropdownIcon = props.dropdownIcon, dropdownIcon = _props_dropdownIcon === void 0 ? "chevron-down" : _props_dropdownIcon, _props_shouldScrollToList = props.shouldScrollToList, shouldScrollToList = _props_shouldScrollToList === void 0 ? true : _props_shouldScrollToList, searchInput = props.searchInput, iconType = props.iconType, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, onType = props.onType, onOpen = props.onOpen, _props_isOptionDisabled = props.isOptionDisabled, isOptionDisabled = _props_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _props_isOptionDisabled, _props_compareValuesOnChange = props.compareValuesOnChange, compareValuesOnChange = _props_compareValuesOnChange === void 0 ? defaultCompareFunction : _props_compareValuesOnChange, _props_convertValueToString = props.convertValueToString, convertValueToString = _props_convertValueToString === void 0 ? defaultConvertFunction$2 : _props_convertValueToString, convertValueToId = props.convertValueToId, convertValueToReactNode = props.convertValueToReactNode, optionsFilter = props.optionsFilter, inputProps = _object_without_properties$6(props, [
|
|
8468
8468
|
"options",
|
|
8469
8469
|
"value",
|
|
8470
8470
|
"defaultOptionLabel",
|
|
@@ -9165,10 +9165,10 @@ function _object_spread_props$n(target, source) {
|
|
|
9165
9165
|
}
|
|
9166
9166
|
return target;
|
|
9167
9167
|
}
|
|
9168
|
-
function _object_without_properties$
|
|
9168
|
+
function _object_without_properties$5(source, excluded) {
|
|
9169
9169
|
if (source == null)
|
|
9170
9170
|
return {};
|
|
9171
|
-
var target = _object_without_properties_loose$
|
|
9171
|
+
var target = _object_without_properties_loose$5(source, excluded);
|
|
9172
9172
|
var key, i;
|
|
9173
9173
|
if (Object.getOwnPropertySymbols) {
|
|
9174
9174
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -9183,7 +9183,7 @@ function _object_without_properties$4(source, excluded) {
|
|
|
9183
9183
|
}
|
|
9184
9184
|
return target;
|
|
9185
9185
|
}
|
|
9186
|
-
function _object_without_properties_loose$
|
|
9186
|
+
function _object_without_properties_loose$5(source, excluded) {
|
|
9187
9187
|
if (source == null)
|
|
9188
9188
|
return {};
|
|
9189
9189
|
var target = {};
|
|
@@ -9223,7 +9223,7 @@ var PopperContainer = function(param) {
|
|
|
9223
9223
|
});
|
|
9224
9224
|
};
|
|
9225
9225
|
var DatePicker = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
9226
|
-
var data = _param.data, _param_selectedDate = _param.selectedDate, selectedDate = _param_selectedDate === void 0 ? null : _param_selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? null : _param_endDate, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? null : _param_startDate, locale2 = _param.locale, months = _param.months, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, placeholder = _param.placeholder, isRange = _param.isRange, isInline = _param.isInline, isDisabled = _param.isDisabled, isClearable = _param.isClearable, strictParsing = _param.strictParsing, focusSelectedMonth = _param.focusSelectedMonth, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, _param_allowSameDay = _param.allowSameDay, allowSameDay = _param_allowSameDay === void 0 ? false : _param_allowSameDay, shouldCloseOnSelect = _param.shouldCloseOnSelect, showPreviousMonths = _param.showPreviousMonths, preventOpenOnFocus = _param.preventOpenOnFocus, popperModifiers = _param.popperModifiers, popperPlacement = _param.popperPlacement, todayButton = _param.todayButton, calendarContainer = _param.calendarContainer, dayClassName = _param.dayClassName, tmp = _param.customInput, CustomInput = tmp === void 0 ? DateInput : tmp, customInputRef = _param.customInputRef, renderCustomHeader = _param.renderCustomHeader, filterDate = _param.filterDate, onYearChange = _param.onYearChange, onMonthChange = _param.onMonthChange, onCalendarOpen = _param.onCalendarOpen, onCalendarClose = _param.onCalendarClose, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, onBlur = _param.onBlur, onFocus = _param.onFocus, onKeyDown = _param.onKeyDown, tweakStyles = _param.tweakStyles, inputProps = _object_without_properties$
|
|
9226
|
+
var data = _param.data, _param_selectedDate = _param.selectedDate, selectedDate = _param_selectedDate === void 0 ? null : _param_selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, _param_endDate = _param.endDate, endDate = _param_endDate === void 0 ? null : _param_endDate, _param_startDate = _param.startDate, startDate = _param_startDate === void 0 ? null : _param_startDate, locale2 = _param.locale, months = _param.months, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, placeholder = _param.placeholder, isRange = _param.isRange, isInline = _param.isInline, isDisabled = _param.isDisabled, isClearable = _param.isClearable, strictParsing = _param.strictParsing, focusSelectedMonth = _param.focusSelectedMonth, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, _param_allowSameDay = _param.allowSameDay, allowSameDay = _param_allowSameDay === void 0 ? false : _param_allowSameDay, shouldCloseOnSelect = _param.shouldCloseOnSelect, showPreviousMonths = _param.showPreviousMonths, preventOpenOnFocus = _param.preventOpenOnFocus, popperModifiers = _param.popperModifiers, popperPlacement = _param.popperPlacement, todayButton = _param.todayButton, calendarContainer = _param.calendarContainer, dayClassName = _param.dayClassName, tmp = _param.customInput, CustomInput = tmp === void 0 ? DateInput : tmp, customInputRef = _param.customInputRef, renderCustomHeader = _param.renderCustomHeader, filterDate = _param.filterDate, onYearChange = _param.onYearChange, onMonthChange = _param.onMonthChange, onCalendarOpen = _param.onCalendarOpen, onCalendarClose = _param.onCalendarClose, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, onBlur = _param.onBlur, onFocus = _param.onFocus, onKeyDown = _param.onKeyDown, tweakStyles = _param.tweakStyles, inputProps = _object_without_properties$5(_param, [
|
|
9227
9227
|
"data",
|
|
9228
9228
|
"selectedDate",
|
|
9229
9229
|
"minDate",
|
|
@@ -9769,10 +9769,10 @@ function _object_spread$r(target) {
|
|
|
9769
9769
|
}
|
|
9770
9770
|
return target;
|
|
9771
9771
|
}
|
|
9772
|
-
function _object_without_properties$
|
|
9772
|
+
function _object_without_properties$4(source, excluded) {
|
|
9773
9773
|
if (source == null)
|
|
9774
9774
|
return {};
|
|
9775
|
-
var target = _object_without_properties_loose$
|
|
9775
|
+
var target = _object_without_properties_loose$4(source, excluded);
|
|
9776
9776
|
var key, i;
|
|
9777
9777
|
if (Object.getOwnPropertySymbols) {
|
|
9778
9778
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -9787,7 +9787,7 @@ function _object_without_properties$3(source, excluded) {
|
|
|
9787
9787
|
}
|
|
9788
9788
|
return target;
|
|
9789
9789
|
}
|
|
9790
|
-
function _object_without_properties_loose$
|
|
9790
|
+
function _object_without_properties_loose$4(source, excluded) {
|
|
9791
9791
|
if (source == null)
|
|
9792
9792
|
return {};
|
|
9793
9793
|
var target = {};
|
|
@@ -9920,7 +9920,7 @@ var __generator$3 = globalThis && globalThis.__generator || function(thisArg, bo
|
|
|
9920
9920
|
}
|
|
9921
9921
|
};
|
|
9922
9922
|
var NumberInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
9923
|
-
var value = _param.value, _param_canBeFloat = _param.canBeFloat, canBeFloat = _param_canBeFloat === void 0 ? false : _param_canBeFloat, _param_canBeNegative = _param.canBeNegative, canBeNegative = _param_canBeNegative === void 0 ? false : _param_canBeNegative, defaultValue = _param.defaultValue, _param_precision = _param.precision, precision = _param_precision === void 0 ? 3 : _param_precision, _param_intPartPrecision = _param.intPartPrecision, intPartPrecision = _param_intPartPrecision === void 0 ? 7 : _param_intPartPrecision, onChange = _param.onChange, onBlur = _param.onBlur, min2 = _param.min, max2 = _param.max, props = _object_without_properties$
|
|
9923
|
+
var value = _param.value, _param_canBeFloat = _param.canBeFloat, canBeFloat = _param_canBeFloat === void 0 ? false : _param_canBeFloat, _param_canBeNegative = _param.canBeNegative, canBeNegative = _param_canBeNegative === void 0 ? false : _param_canBeNegative, defaultValue = _param.defaultValue, _param_precision = _param.precision, precision = _param_precision === void 0 ? 3 : _param_precision, _param_intPartPrecision = _param.intPartPrecision, intPartPrecision = _param_intPartPrecision === void 0 ? 7 : _param_intPartPrecision, onChange = _param.onChange, onBlur = _param.onBlur, min2 = _param.min, max2 = _param.max, props = _object_without_properties$4(_param, [
|
|
9924
9924
|
"value",
|
|
9925
9925
|
"canBeFloat",
|
|
9926
9926
|
"canBeNegative",
|
|
@@ -21835,10 +21835,10 @@ function _object_spread_props$b(target, source) {
|
|
|
21835
21835
|
}
|
|
21836
21836
|
return target;
|
|
21837
21837
|
}
|
|
21838
|
-
function _object_without_properties$
|
|
21838
|
+
function _object_without_properties$3(source, excluded) {
|
|
21839
21839
|
if (source == null)
|
|
21840
21840
|
return {};
|
|
21841
|
-
var target = _object_without_properties_loose$
|
|
21841
|
+
var target = _object_without_properties_loose$3(source, excluded);
|
|
21842
21842
|
var key, i;
|
|
21843
21843
|
if (Object.getOwnPropertySymbols) {
|
|
21844
21844
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -21853,7 +21853,7 @@ function _object_without_properties$2(source, excluded) {
|
|
|
21853
21853
|
}
|
|
21854
21854
|
return target;
|
|
21855
21855
|
}
|
|
21856
|
-
function _object_without_properties_loose$
|
|
21856
|
+
function _object_without_properties_loose$3(source, excluded) {
|
|
21857
21857
|
if (source == null)
|
|
21858
21858
|
return {};
|
|
21859
21859
|
var target = {};
|
|
@@ -21868,7 +21868,7 @@ function _object_without_properties_loose$2(source, excluded) {
|
|
|
21868
21868
|
return target;
|
|
21869
21869
|
}
|
|
21870
21870
|
var IncrementInput = function(_param) {
|
|
21871
|
-
var value = _param.value, onChange = _param.onChange, min2 = _param.min, max2 = _param.max, _param_step = _param.step, step = _param_step === void 0 ? 1 : _param_step, intPartPrecision = _param.intPartPrecision, data = _param.data, tweakStyles = _param.tweakStyles, props = _object_without_properties$
|
|
21871
|
+
var value = _param.value, onChange = _param.onChange, min2 = _param.min, max2 = _param.max, _param_step = _param.step, step = _param_step === void 0 ? 1 : _param_step, intPartPrecision = _param.intPartPrecision, data = _param.data, tweakStyles = _param.tweakStyles, props = _object_without_properties$3(_param, [
|
|
21872
21872
|
"value",
|
|
21873
21873
|
"onChange",
|
|
21874
21874
|
"min",
|
|
@@ -22280,6 +22280,38 @@ function _object_spread_props$a(target, source) {
|
|
|
22280
22280
|
}
|
|
22281
22281
|
return target;
|
|
22282
22282
|
}
|
|
22283
|
+
function _object_without_properties$2(source, excluded) {
|
|
22284
|
+
if (source == null)
|
|
22285
|
+
return {};
|
|
22286
|
+
var target = _object_without_properties_loose$2(source, excluded);
|
|
22287
|
+
var key, i;
|
|
22288
|
+
if (Object.getOwnPropertySymbols) {
|
|
22289
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
22290
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
22291
|
+
key = sourceSymbolKeys[i];
|
|
22292
|
+
if (excluded.indexOf(key) >= 0)
|
|
22293
|
+
continue;
|
|
22294
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
22295
|
+
continue;
|
|
22296
|
+
target[key] = source[key];
|
|
22297
|
+
}
|
|
22298
|
+
}
|
|
22299
|
+
return target;
|
|
22300
|
+
}
|
|
22301
|
+
function _object_without_properties_loose$2(source, excluded) {
|
|
22302
|
+
if (source == null)
|
|
22303
|
+
return {};
|
|
22304
|
+
var target = {};
|
|
22305
|
+
var sourceKeys = Object.keys(source);
|
|
22306
|
+
var key, i;
|
|
22307
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
22308
|
+
key = sourceKeys[i];
|
|
22309
|
+
if (excluded.indexOf(key) >= 0)
|
|
22310
|
+
continue;
|
|
22311
|
+
target[key] = source[key];
|
|
22312
|
+
}
|
|
22313
|
+
return target;
|
|
22314
|
+
}
|
|
22283
22315
|
function _sliced_to_array$7(arr, i) {
|
|
22284
22316
|
return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
|
|
22285
22317
|
}
|
|
@@ -22296,8 +22328,31 @@ function _unsupported_iterable_to_array$7(o, minLen) {
|
|
|
22296
22328
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
22297
22329
|
return _array_like_to_array$7(o, minLen);
|
|
22298
22330
|
}
|
|
22299
|
-
var Modal = function(
|
|
22300
|
-
var data =
|
|
22331
|
+
var Modal = function(_param) {
|
|
22332
|
+
var data = _param.data, tweakStyles = _param.tweakStyles, title = _param.title, _param_size = _param.size, size = _param_size === void 0 ? "l" : _param_size, isFooterSticky = _param.isFooterSticky, buttons = _param.buttons, _param_buttonsAlign = _param.buttonsAlign, buttonsAlign = _param_buttonsAlign === void 0 ? "right" : _param_buttonsAlign, _param_hasCloseButton = _param.hasCloseButton, hasCloseButton = _param_hasCloseButton === void 0 ? true : _param_hasCloseButton, _param_hasOverlay = _param.hasOverlay, hasOverlay = _param_hasOverlay === void 0 ? true : _param_hasOverlay, _param_isOpen = _param.isOpen, isOpen = _param_isOpen === void 0 ? false : _param_isOpen, _param_position = _param.position, position = _param_position === void 0 ? "center" : _param_position, children = _param.children, zIndex = _param.zIndex, testId = _param.testId, _param_shouldCloseOnOverlayClick = _param.shouldCloseOnOverlayClick, shouldCloseOnOverlayClick = _param_shouldCloseOnOverlayClick === void 0 ? true : _param_shouldCloseOnOverlayClick, _param_shouldCloseOnEsc = _param.shouldCloseOnEsc, shouldCloseOnEsc = _param_shouldCloseOnEsc === void 0 ? true : _param_shouldCloseOnEsc, _param_shouldBlockScroll = _param.shouldBlockScroll, shouldBlockScroll = _param_shouldBlockScroll === void 0 ? true : _param_shouldBlockScroll, _param_timeout = _param.timeout, timeout = _param_timeout === void 0 ? 150 : _param_timeout, _param_unmountOnExit = _param.unmountOnExit, unmountOnExit = _param_unmountOnExit === void 0 ? true : _param_unmountOnExit, onClose = _param.onClose, restProps = _object_without_properties$2(_param, [
|
|
22333
|
+
"data",
|
|
22334
|
+
"tweakStyles",
|
|
22335
|
+
"title",
|
|
22336
|
+
"size",
|
|
22337
|
+
"isFooterSticky",
|
|
22338
|
+
"buttons",
|
|
22339
|
+
"buttonsAlign",
|
|
22340
|
+
"hasCloseButton",
|
|
22341
|
+
"hasOverlay",
|
|
22342
|
+
"isOpen",
|
|
22343
|
+
"position",
|
|
22344
|
+
"children",
|
|
22345
|
+
"zIndex",
|
|
22346
|
+
"testId",
|
|
22347
|
+
"shouldCloseOnOverlayClick",
|
|
22348
|
+
"shouldCloseOnEsc",
|
|
22349
|
+
"shouldBlockScroll",
|
|
22350
|
+
"timeout",
|
|
22351
|
+
"unmountOnExit",
|
|
22352
|
+
"onClose"
|
|
22353
|
+
]);
|
|
22354
|
+
var _ref;
|
|
22355
|
+
var isModalOpen = (_ref = isOpen !== null && isOpen !== void 0 ? isOpen : restProps.in) !== null && _ref !== void 0 ? _ref : false;
|
|
22301
22356
|
var _useTheme = useTheme("Modal", styles$d, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
22302
22357
|
var tweakCloseButtonStyles = useTweakStyles(componentStyles, tweakStyles, "tweakCloseButton");
|
|
22303
22358
|
var _useState = _sliced_to_array$7(useState(false), 2), isClickOnOverlay = _useState[0], setIsClickOnOverlay = _useState[1];
|
|
@@ -22325,7 +22380,7 @@ var Modal = function(param) {
|
|
|
22325
22380
|
onClose
|
|
22326
22381
|
]);
|
|
22327
22382
|
useEffect(function() {
|
|
22328
|
-
if (!shouldCloseOnEsc || onClose === void 0 || !
|
|
22383
|
+
if (!shouldCloseOnEsc || onClose === void 0 || !isModalOpen) {
|
|
22329
22384
|
return function() {
|
|
22330
22385
|
return null;
|
|
22331
22386
|
};
|
|
@@ -22337,22 +22392,21 @@ var Modal = function(param) {
|
|
|
22337
22392
|
}, [
|
|
22338
22393
|
shouldCloseOnEsc,
|
|
22339
22394
|
onClose,
|
|
22340
|
-
|
|
22395
|
+
isModalOpen,
|
|
22341
22396
|
handleEscClose
|
|
22342
22397
|
]);
|
|
22343
22398
|
var _obj, _obj1;
|
|
22344
|
-
return /* @__PURE__ */ jsx(CSSTransition, {
|
|
22345
|
-
in:
|
|
22346
|
-
timeout
|
|
22347
|
-
unmountOnExit
|
|
22399
|
+
return /* @__PURE__ */ jsx(CSSTransition, _object_spread_props$a(_object_spread$c({
|
|
22400
|
+
in: isModalOpen,
|
|
22401
|
+
timeout,
|
|
22402
|
+
unmountOnExit,
|
|
22348
22403
|
classNames: {
|
|
22349
22404
|
enter: classes["modal-enter"],
|
|
22350
22405
|
enterActive: classes["modal-enter-active"],
|
|
22351
22406
|
exit: classes["modal-exit"],
|
|
22352
22407
|
exitActive: classes["modal-exit-active"]
|
|
22353
|
-
}
|
|
22354
|
-
|
|
22355
|
-
onExited: onCompletelyHidden,
|
|
22408
|
+
}
|
|
22409
|
+
}, restProps), {
|
|
22356
22410
|
children: /* @__PURE__ */ jsx("div", {
|
|
22357
22411
|
className: classes.modalWrapper,
|
|
22358
22412
|
children: /* @__PURE__ */ jsx(RemoveScroll, {
|
|
@@ -22403,7 +22457,7 @@ var Modal = function(param) {
|
|
|
22403
22457
|
}))
|
|
22404
22458
|
})
|
|
22405
22459
|
})
|
|
22406
|
-
});
|
|
22460
|
+
}));
|
|
22407
22461
|
};
|
|
22408
22462
|
var styles$c = {
|
|
22409
22463
|
root: {
|