@geneui/components 2.11.2 → 2.12.2
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/{ActionableList.js → ActionableList/index.js} +83 -152
- package/{AdvancedSearch.js → AdvancedSearch/index.js} +290 -304
- package/Alert/index.js +97 -0
- package/Avatar/index.js +30 -0
- package/Badge/index.js +75 -0
- package/{Breadcrumb.js → Breadcrumb/index.js} +32 -31
- package/BusyLoader/index.js +68 -0
- package/Button/index.js +129 -0
- package/CHANGELOG.md +53 -0
- package/{Card.js → Card/index.js} +82 -94
- package/{CardList.js → CardList/index.js} +120 -165
- package/{CellMeasurerCache-b786dd93.js → CellMeasurerCache-3741d716.js} +2 -2
- package/{index-9164a86d.js → Charts/index.js} +17103 -30447
- package/{Checkbox.js → Checkbox/index.js} +37 -38
- package/{CheckboxGroup.js → CheckboxGroup/index.js} +41 -42
- package/{CheckboxGroupWithSearch.js → CheckboxGroupWithSearch/index.js} +64 -65
- package/{Collapse.js → Collapse/index.js} +28 -29
- package/{ColorPicker.js → ColorPicker/index.js} +16 -16
- package/ComboBox/index.js +525 -0
- package/Counter/index.js +310 -0
- package/{DateFilter.js → DateFilter/index.js} +45 -43
- package/{DatePicker.js → DatePicker/index.js} +106 -108
- package/{index-0199942c.js → DatePickerInput/index.js} +114 -100
- package/{Divider.js → Divider/index.js} +9 -10
- package/{Drawer.js → Drawer/index.js} +40 -41
- package/Dropdown/index.js +41 -0
- package/{Editor.js → Editor/index.js} +165 -164
- package/{Empty.js → Empty/index.js} +12 -13
- package/{ExtendedInput.js → ExtendedInput/index.js} +81 -71
- package/Form/index.js +83 -0
- package/{FormContainer.js → FormContainer/index.js} +25 -26
- package/FormableCheckbox/index.js +26 -0
- package/FormableDatePicker/index.js +41 -0
- package/FormableDropdown/index.js +48 -0
- package/FormableEditor/index.js +24 -0
- package/{FormableHOC-21051057.js → FormableHOC-55263162.js} +3 -3
- package/FormableMultiSelectDropdown/index.js +48 -0
- package/FormableNumberInput/index.js +32 -0
- package/FormableRadio/index.js +22 -0
- package/FormableSwitcher/index.js +22 -0
- package/FormableTextInput/index.js +32 -0
- package/FormableUploader/index.js +42 -0
- package/GeneUIProvider/index.js +282 -0
- package/{Grid.js → Grid/index.js} +27 -27
- package/Holder/index.js +261 -0
- package/{Icon.js → Icon/index.js} +9 -10
- package/Image/index.js +129 -0
- package/ImagePreview/index.js +481 -0
- package/{KeyValue.js → KeyValue/index.js} +11 -12
- package/LICENSE +21 -0
- package/Label/index.js +57 -0
- package/LinkButton/index.js +67 -0
- package/{Menu.js → Menu/index.js} +27 -28
- package/MobileNavigation/index.js +94 -0
- package/{MobilePopup.js → MobilePopup/index.js} +42 -41
- package/{Modal.js → Modal/index.js} +39 -40
- package/ModuleTitle/index.js +143 -0
- package/{NavigationMenu.js → NavigationMenu/index.js} +30 -29
- package/Notification/index.js +119 -0
- package/Option/index.js +184 -0
- package/Overlay/index.js +189 -0
- package/Overspread/index.js +289 -0
- package/{Pagination.js → Pagination/index.js} +35 -34
- package/Paper/index.js +96 -0
- package/{index-084588e9.js → Popover/index.js} +48 -58
- package/PopoverV2/index.js +18 -0
- package/{Portal.js → Portal/index.js} +7 -8
- package/{Products.js → Products/index.js} +20 -21
- package/Profile/index.js +585 -0
- package/Progress/index.js +199 -0
- package/{QRCode.js → QRCode/index.js} +4 -6
- package/{Radio.js → Radio/index.js} +25 -26
- package/{RadioGroup.js → RadioGroup/index.js} +17 -18
- package/{index-00fe8887.js → Range/index.js} +29 -32
- package/RichEditor/index.js +13 -0
- package/{RichEditor-98accead.js → RichEditor-8b0f7ccd.js} +18 -18
- package/{Scrollbar.js → Scrollbar/index.js} +15 -17
- package/{Search.js → Search/index.js} +25 -24
- package/SearchWithDropdown/index.js +138 -0
- package/Section/index.js +61 -0
- package/{SkeletonLoader.js → SkeletonLoader/index.js} +13 -14
- package/{Slider.js → Slider/index.js} +46 -43
- package/Status/index.js +103 -0
- package/Steps/index.js +313 -0
- package/{index-897d8240.js → SuggestionList/index.js} +15 -38
- package/{Switcher.js → Switcher/index.js} +30 -31
- package/Table/index.js +53 -0
- package/{TableCompositions.js → TableCompositions/index.js} +131 -168
- package/Tabs/index.js +235 -0
- package/Tag/index.js +102 -0
- package/{TextLink.js → TextLink/index.js} +3 -3
- package/{Textarea.js → Textarea/index.js} +66 -65
- package/{Time.js → Time/index.js} +13 -14
- package/TimePicker/index.js +555 -0
- package/Timeline/index.js +113 -0
- package/Title/index.js +65 -0
- package/{Toaster.js → Toaster/index.js} +19 -20
- package/{Tooltip.js → Tooltip/index.js} +27 -28
- package/{TransferList.js → TransferList/index.js} +44 -55
- package/{index-135b9d17.js → Uploader/index.js} +119 -116
- package/{ValidatableCheckbox.js → ValidatableCheckbox/index.js} +23 -24
- package/{ValidatableDatePicker.js → ValidatableDatePicker/index.js} +44 -42
- package/ValidatableDropdown/index.js +139 -0
- package/ValidatableElements/index.js +65 -0
- package/ValidatableMultiSelectDropdown/index.js +150 -0
- package/{ValidatableNumberInput.js → ValidatableNumberInput/index.js} +41 -33
- package/{ValidatableRadio.js → ValidatableRadio/index.js} +19 -20
- package/{ValidatableSwitcher.js → ValidatableSwitcher/index.js} +19 -20
- package/{ValidatableTextInput.js → ValidatableTextInput/index.js} +32 -31
- package/{ValidatableTimeInput.js → ValidatableTimeInput/index.js} +31 -30
- package/{ValidatableUploader.js → ValidatableUploader/index.js} +36 -34
- package/Widget/index.js +227 -0
- package/config-0ca92874.js +31 -0
- package/{configs-91c86664.js → configs-fed6ac34.js} +28 -1
- package/hooks/useBodyScroll.js +16 -0
- package/hooks/useClick.js +18 -0
- package/{useClickOutside-5183e396.js → hooks/useClickOutside.js} +1 -1
- package/hooks/useDebounceHook.js +16 -0
- package/{useDeviceType-dd51db38.js → hooks/useDeviceType.js} +4 -3
- package/hooks/useDidMount.js +15 -0
- package/{useEllipsisDetection-ef536015.js → hooks/useEllipsisDetection.js} +1 -1
- package/hooks/useForceUpdate.js +8 -0
- package/hooks/useImgDownload.js +18 -0
- package/{useKeyDown-38102ae7.js → hooks/useKeyDown.js} +1 -1
- package/hooks/useMount.js +13 -0
- package/hooks/useMutationObserver.js +21 -0
- package/hooks/usePrevious.js +10 -0
- package/hooks/useThrottle.js +16 -0
- package/hooks/useToggle.js +11 -0
- package/hooks/useUpdatableRef.js +14 -0
- package/hooks/useUpdate.js +10 -0
- package/{useWidth-9f4647f8.js → hooks/useWidth.js} +2 -2
- package/{useWindowSize-80369d76.js → hooks/useWindowSize.js} +1 -1
- package/{index-8c98317a.js → index-11eea761.js} +678 -752
- package/index-2ad83e03.js +4 -0
- package/index-34e47647.js +10054 -0
- package/index-45eafea6.js +90 -0
- package/{index-5e96cb4d.js → index-462461c0.js} +50 -48
- package/{index-ac59cb10.js → index-a0e4e333.js} +6 -6
- package/{index-e8776f3d.js → index-b1e429a7.js} +1 -1
- package/index.d.ts +115 -0
- package/index.js +137 -113
- package/index.mobile.d.ts +16 -0
- package/lib/atoms/Avatar/Avatar.d.ts +34 -0
- package/lib/atoms/Avatar/index.d.ts +1 -0
- package/lib/atoms/LinkButton/LinkButton.d.ts +46 -0
- package/lib/atoms/LinkButton/index.d.ts +1 -0
- package/{objectWithoutPropertiesLoose-299691d8.js → objectWithoutPropertiesLoose-d8a4a68c.js} +12 -12
- package/package.json +42 -22
- package/{rangeAndSlider-20599da4.js → rangeAndSlider-0301a458.js} +220 -375
- package/{react-beautiful-dnd.esm-38c37304.js → react-beautiful-dnd.esm-04c14563.js} +9 -9
- package/react-lifecycles-compat.es-6e1f3768.js +158 -0
- package/Alert.js +0 -98
- package/Avatar.js +0 -77
- package/Badge.js +0 -76
- package/BusyLoader.js +0 -69
- package/Button.js +0 -130
- package/Charts.js +0 -99
- package/ComboBox.js +0 -99
- package/Counter.js +0 -99
- package/DatePickerInput.js +0 -30
- package/Dropdown.js +0 -99
- package/Form.js +0 -116
- package/FormableCheckbox.js +0 -27
- package/FormableDatePicker.js +0 -39
- package/FormableDropdown.js +0 -105
- package/FormableEditor.js +0 -24
- package/FormableMultiSelectDropdown.js +0 -105
- package/FormableNumberInput.js +0 -31
- package/FormableRadio.js +0 -23
- package/FormableSwitcher.js +0 -23
- package/FormableTextInput.js +0 -31
- package/FormableUploader.js +0 -40
- package/GeneUIProvider.js +0 -256
- package/Holder.js +0 -99
- package/Image.js +0 -130
- package/ImagePreview.js +0 -99
- package/Label.js +0 -58
- package/LinkButton.js +0 -104
- package/MobileNavigation.js +0 -95
- package/ModuleTitle.js +0 -99
- package/Notification.js +0 -120
- package/Option.js +0 -186
- package/Overlay.js +0 -99
- package/Overspread.js +0 -343
- package/Paper.js +0 -97
- package/Popover.js +0 -20
- package/PopoverV2.js +0 -19
- package/Profile.js +0 -99
- package/Progress.js +0 -200
- package/Range.js +0 -14
- package/RichEditor.js +0 -13
- package/SearchWithDropdown.js +0 -195
- package/Section.js +0 -62
- package/Status.js +0 -104
- package/Steps.js +0 -312
- package/SuggestionList.js +0 -15
- package/Table.js +0 -102
- package/Tabs.js +0 -236
- package/Tag.js +0 -103
- package/TimePicker.js +0 -99
- package/Timeline.js +0 -114
- package/Title.js +0 -66
- package/Uploader.js +0 -32
- package/ValidatableDropdown.js +0 -99
- package/ValidatableElements.js +0 -99
- package/ValidatableMultiSelectDropdown.js +0 -99
- package/Widget.js +0 -99
- package/globalStyling-9c60a159.js +0 -4
- package/index-2030e31c.js +0 -4
- package/index-b7a33c58.js +0 -11
- package/index-e0af0caf.js +0 -1182
- package/useMount-6fef51a5.js +0 -9
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React__default, { useCallback, useMemo } from 'react';
|
|
2
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
3
|
+
import { n as noop } from '../index-a0e4e333.js';
|
|
4
|
+
import Icon from '../Icon/index.js';
|
|
5
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
6
|
+
import 'prop-types';
|
|
7
|
+
import '../dateValidation-67caec66.js';
|
|
8
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
9
|
+
import 'react-dom';
|
|
10
|
+
import '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
11
|
+
|
|
12
|
+
/******************************************************************************
|
|
13
|
+
Copyright (c) Microsoft Corporation.
|
|
14
|
+
|
|
15
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
16
|
+
purpose with or without fee is hereby granted.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
19
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
20
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
21
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
22
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
23
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
24
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
25
|
+
***************************************************************************** */
|
|
26
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
function __rest(s, e) {
|
|
30
|
+
var t = {};
|
|
31
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
32
|
+
t[p] = s[p];
|
|
33
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
34
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
35
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
36
|
+
t[p[i]] = s[p[i]];
|
|
37
|
+
}
|
|
38
|
+
return t;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
42
|
+
var e = new Error(message);
|
|
43
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .linkButton{align-items:center;color:var(--hero);cursor:pointer;display:flex;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;padding:0 .8rem}[data-gene-ui-version=\"2.12.2\"] .linkButton:focus-visible{border-radius:.4rem;outline:.2rem var(--hero) solid}[data-gene-ui-version=\"2.12.2\"] .linkButton__icon{display:inline-block}[data-gene-ui-version=\"2.12.2\"] .linkButton-disable{opacity:.3;pointer-events:none}";
|
|
47
|
+
styleInject(css_248z);
|
|
48
|
+
|
|
49
|
+
const LinkButton = (_a) => {
|
|
50
|
+
var { href, onClick, children, iconAfter, className, iconBefore, isDisabled, onMouseDown, ariaLabel } = _a, restProps = __rest(_a, ["href", "onClick", "children", "iconAfter", "className", "iconBefore", "isDisabled", "onMouseDown", "ariaLabel"]);
|
|
51
|
+
const onClickHandler = useCallback((e) => onClick === null || onClick === void 0 ? void 0 : onClick(e), [onClick]);
|
|
52
|
+
const onMouseDownHandler = useCallback((e) => onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e), [onMouseDown]);
|
|
53
|
+
const attributes = useMemo(() => (Object.assign(Object.assign({ className: classnames('linkButton', { 'linkButton-disable': isDisabled }, className), onMouseDown: onMouseDownHandler, onClick: onClickHandler }, (ariaLabel ? { 'aria-label': ariaLabel } : {})), restProps)), [isDisabled, className, onMouseDownHandler, onClickHandler, restProps]);
|
|
54
|
+
const content = useMemo(() => (React__default.createElement(React__default.Fragment, null,
|
|
55
|
+
iconBefore && React__default.createElement(Icon, { type: iconBefore, className: "linkButton__icon" }),
|
|
56
|
+
children,
|
|
57
|
+
iconAfter && React__default.createElement(Icon, { type: iconAfter, className: "linkButton__icon" }))), [iconBefore, children, iconAfter]);
|
|
58
|
+
return (React__default.createElement(React__default.Fragment, null, href ? (React__default.createElement("a", Object.assign({}, attributes, { href: href }), content)) : (React__default.createElement("button", Object.assign({}, attributes, { type: "button" }), content))));
|
|
59
|
+
};
|
|
60
|
+
LinkButton.defaultProps = {
|
|
61
|
+
children: 'LinkButton example',
|
|
62
|
+
isDisabled: false,
|
|
63
|
+
onMouseDown: noop
|
|
64
|
+
};
|
|
65
|
+
LinkButton.displayName = 'LinkButton';
|
|
66
|
+
|
|
67
|
+
export { LinkButton as default };
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { forwardRef, useMemo, useState, useRef, useEffect, useCallback } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import Option from '
|
|
7
|
-
import CustomScrollbar from '
|
|
8
|
-
import '
|
|
9
|
-
import
|
|
10
|
-
import '
|
|
11
|
-
import './_commonjsHelpers-24198af3.js';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { s as screenTypes } from '../configs-fed6ac34.js';
|
|
6
|
+
import Option from '../Option/index.js';
|
|
7
|
+
import CustomScrollbar from '../Scrollbar/index.js';
|
|
8
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
9
|
+
import '../dateValidation-67caec66.js';
|
|
10
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
12
11
|
import 'react-dom';
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import '
|
|
20
|
-
import '
|
|
12
|
+
import '../hooks/useDeviceType.js';
|
|
13
|
+
import '../hooks/useWindowSize.js';
|
|
14
|
+
import '../hooks/useEllipsisDetection.js';
|
|
15
|
+
import '../Icon/index.js';
|
|
16
|
+
import '../Tooltip/index.js';
|
|
17
|
+
import '../Popover-f4d1cac0.js';
|
|
18
|
+
import '../index-a0e4e333.js';
|
|
19
|
+
import '../GeneUIProvider/index.js';
|
|
21
20
|
|
|
22
21
|
const findDeep = function (data, indexStack) {
|
|
23
22
|
let index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
24
23
|
return index < indexStack.length ? findDeep(data[indexStack[index]].children, indexStack, index + 1) : data;
|
|
25
24
|
};
|
|
26
25
|
|
|
27
|
-
var css_248z = "[data-gene-ui-version=\"
|
|
26
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper{min-width:18rem;overflow:hidden;white-space:nowrap;width:100%}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper>ul{display:flex;min-width:100%;transform:translateX(calc(var(--translate-x)*-1));transition:transform .3s}html[dir=rtl] .menu-items-wrapper>ul{transform:translateX(var(--translate-x))}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper>ul.reversed>li:first-child{order:0}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper>ul.reversed>li:nth-child(2){order:2}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper>ul.reversed>li:nth-child(3){order:1}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper>ul>li{display:flex;flex-direction:column;flex-shrink:0;width:100%}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .divider.type-horizontal{margin:0;width:100%}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .divider.type-horizontal.full-width{margin:1rem 0;width:100%}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-item{align-items:center;cursor:pointer;display:flex;font:600 1.4rem/2rem var(--font-family);padding:1rem 1.4rem;transition:color .3s,background .3s}[data-gene-ui-version=\"2.12.2\"] .popover-positioner.mobile-view .menu-items-wrapper .menu-item{padding:1.4rem 2rem}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-item.highlighted{color:var(--hero)}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-item:hover{background:rgba(var(--background-sc-rgb),.05)}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-item.act-direction:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-item .icon{margin:-.2rem 0}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-item .icon.menu-custom-icon{margin-inline-end:1rem}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-item.header{flex-direction:row-reverse}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-text{flex:auto}[data-gene-ui-version=\"2.12.2\"] .menu-items-wrapper .menu-text .small-text{font-size:1.2rem;line-height:1.4rem;opacity:.7}";
|
|
28
27
|
styleInject(css_248z);
|
|
29
28
|
|
|
30
29
|
const findHeaderByIndexStack = (data, indexStack) => {
|
|
@@ -246,38 +245,38 @@ Menu.propTypes = {
|
|
|
246
245
|
* used for the atoms/Option component.<br/>
|
|
247
246
|
* Add <code>maxHeight</code> to data to add scrollbar with maxHeight(px)
|
|
248
247
|
*/
|
|
249
|
-
data:
|
|
250
|
-
component:
|
|
251
|
-
maxHeight:
|
|
248
|
+
data: PropTypes.arrayOf(PropTypes.shape({
|
|
249
|
+
component: PropTypes.node,
|
|
250
|
+
maxHeight: PropTypes.number,
|
|
252
251
|
...Option.propTypes
|
|
253
252
|
})),
|
|
254
253
|
/**
|
|
255
254
|
* Fires event when user click on header elements;
|
|
256
255
|
* (event: Event, item: Object) => void
|
|
257
256
|
*/
|
|
258
|
-
onBack:
|
|
257
|
+
onBack: PropTypes.func,
|
|
259
258
|
/**
|
|
260
259
|
* Fires event when user click on option elements;
|
|
261
260
|
* (event: Event, item: Object) => void
|
|
262
261
|
*/
|
|
263
|
-
onNext:
|
|
262
|
+
onNext: PropTypes.func,
|
|
264
263
|
/**
|
|
265
264
|
* Fires event when user click on elements;
|
|
266
265
|
* (event: Event, item: Object) => void
|
|
267
266
|
*/
|
|
268
|
-
onSelect:
|
|
267
|
+
onSelect: PropTypes.func,
|
|
269
268
|
/**
|
|
270
269
|
* Controls screen type
|
|
271
270
|
*/
|
|
272
|
-
screenType:
|
|
271
|
+
screenType: PropTypes.oneOf(screenTypes),
|
|
273
272
|
/**
|
|
274
273
|
* auto scroll to activeElement
|
|
275
274
|
*/
|
|
276
|
-
scrollToActiveElement:
|
|
275
|
+
scrollToActiveElement: PropTypes.bool,
|
|
277
276
|
/**
|
|
278
277
|
* Initial selected options indexes array
|
|
279
278
|
*/
|
|
280
|
-
initialIndexStack:
|
|
279
|
+
initialIndexStack: PropTypes.arrayOf(PropTypes.string)
|
|
281
280
|
};
|
|
282
281
|
|
|
283
282
|
export { Menu as default };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import Badge from '../Badge/index.js';
|
|
6
|
+
import Icon from '../Icon/index.js';
|
|
7
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
8
|
+
import '../configs-fed6ac34.js';
|
|
9
|
+
|
|
10
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar{background:var(--background);border-top:1px solid rgba(var(--background-sc-rgb),.06);bottom:0;font:600 1rem/1.4rem var(--font-family);left:0;position:fixed;text-align:center;width:100%;z-index:200}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul{display:table;table-layout:fixed;width:100%}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li{display:table-cell;overflow:hidden;padding:.8rem 0 .4rem;position:relative;transition:color .3s,opacity .3s}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li .badge{margin:0 auto;position:absolute;top:.8rem;width:5.2rem}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li .badge-right .badge{right:calc(50% - 2.5rem)}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li .badge-left .badge{left:calc(50% - 2.5rem)}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li:before{background:var(--hero);border-radius:0 0 .5rem .5rem;content:\"\";display:block;height:.3rem;left:calc(50% - 2.6rem);position:absolute;top:0;transform:translateY(-100%);transition:transform .3s;width:5.2rem}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li.active{color:var(--hero)}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li.active:before{transform:translateY(0)}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar>ul>li.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.12.2\"] .mob-navigation-bar .icon{margin:0 0 .2rem}";
|
|
11
|
+
styleInject(css_248z);
|
|
12
|
+
|
|
13
|
+
function MobileNavigation(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
list,
|
|
16
|
+
activeSlug,
|
|
17
|
+
onChange,
|
|
18
|
+
className,
|
|
19
|
+
...restProps
|
|
20
|
+
} = _ref;
|
|
21
|
+
const handleClick = event => {
|
|
22
|
+
const {
|
|
23
|
+
index
|
|
24
|
+
} = event.currentTarget.dataset;
|
|
25
|
+
const item = list[index];
|
|
26
|
+
onChange && onChange(item);
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
29
|
+
className: classnames('mob-navigation-bar', className)
|
|
30
|
+
}, restProps), /*#__PURE__*/React__default.createElement("ul", null, list.map((item, index) => /*#__PURE__*/React__default.createElement("li", {
|
|
31
|
+
key: item.slug,
|
|
32
|
+
"data-index": index,
|
|
33
|
+
className: classnames({
|
|
34
|
+
active: item.slug === activeSlug,
|
|
35
|
+
disabled: item.disabled
|
|
36
|
+
}),
|
|
37
|
+
onClick: !item.disabled ? handleClick : null
|
|
38
|
+
}, item.badge && /*#__PURE__*/React__default.createElement("div", {
|
|
39
|
+
className: "badge-".concat(item.badge.position || 'right')
|
|
40
|
+
}, /*#__PURE__*/React__default.createElement(Badge, {
|
|
41
|
+
size: "default",
|
|
42
|
+
maxCount: item.badge.maxCount,
|
|
43
|
+
count: item.badge.count
|
|
44
|
+
})), /*#__PURE__*/React__default.createElement(Icon, {
|
|
45
|
+
type: item.icon
|
|
46
|
+
}), /*#__PURE__*/React__default.createElement("p", {
|
|
47
|
+
className: "ellipsis-text"
|
|
48
|
+
}, item.title)))));
|
|
49
|
+
}
|
|
50
|
+
MobileNavigation.propTypes = {
|
|
51
|
+
/**
|
|
52
|
+
* Array of menu items data
|
|
53
|
+
*/
|
|
54
|
+
list: PropTypes.arrayOf(PropTypes.shape({
|
|
55
|
+
/**
|
|
56
|
+
* Title for navigation item
|
|
57
|
+
*/
|
|
58
|
+
title: PropTypes.string,
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
slug: PropTypes.string,
|
|
63
|
+
/**
|
|
64
|
+
* Icon for navigation item
|
|
65
|
+
*/
|
|
66
|
+
icon: PropTypes.string,
|
|
67
|
+
/**
|
|
68
|
+
* Notification Badge
|
|
69
|
+
* count - the value of badge
|
|
70
|
+
* maxCount - if the count is greater than the max count, the Badge shows maxCount+
|
|
71
|
+
* position - position of Badge
|
|
72
|
+
*/
|
|
73
|
+
badge: PropTypes.shape({
|
|
74
|
+
count: PropTypes.number,
|
|
75
|
+
maxCount: PropTypes.number,
|
|
76
|
+
position: PropTypes.oneOf(['left', 'right'])
|
|
77
|
+
})
|
|
78
|
+
}).isRequired),
|
|
79
|
+
/**
|
|
80
|
+
* Initially selected item
|
|
81
|
+
*/
|
|
82
|
+
activeSlug: PropTypes.string,
|
|
83
|
+
/**
|
|
84
|
+
* CSS class name for element
|
|
85
|
+
*/
|
|
86
|
+
className: PropTypes.string,
|
|
87
|
+
/**
|
|
88
|
+
* Fires event when user click on one of the items
|
|
89
|
+
* (item: Object) => void
|
|
90
|
+
*/
|
|
91
|
+
onChange: PropTypes.func
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { MobileNavigation as default };
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { useState, useCallback, forwardRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { c as classnames } from '
|
|
5
|
-
import { n as noop } from '
|
|
6
|
-
import Icon from '
|
|
7
|
-
import Portal from '
|
|
8
|
-
import '
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { n as noop } from '../index-a0e4e333.js';
|
|
6
|
+
import Icon from '../Icon/index.js';
|
|
7
|
+
import Portal from '../Portal/index.js';
|
|
8
|
+
import '../dateValidation-67caec66.js';
|
|
9
9
|
import 'react-dom';
|
|
10
|
-
import '
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import Menu from '
|
|
14
|
-
import { s as styleInject } from '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import '
|
|
20
|
-
import '
|
|
21
|
-
import '
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
24
|
-
import '
|
|
25
|
-
import '
|
|
26
|
-
import '
|
|
10
|
+
import '../configs-fed6ac34.js';
|
|
11
|
+
import useClickOutside from '../hooks/useClickOutside.js';
|
|
12
|
+
import Popover from '../Popover/index.js';
|
|
13
|
+
import Menu from '../Menu/index.js';
|
|
14
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
15
|
+
import '../GeneUIProvider/index.js';
|
|
16
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
17
|
+
import '../Popover-f4d1cac0.js';
|
|
18
|
+
import '../index-122432cd.js';
|
|
19
|
+
import '../hooks/useDeviceType.js';
|
|
20
|
+
import '../hooks/useWindowSize.js';
|
|
21
|
+
import '../hooks/useUpdatableRef.js';
|
|
22
|
+
import '../hooks/useForceUpdate.js';
|
|
23
|
+
import '../Scrollbar/index.js';
|
|
24
|
+
import '../guid-8ddf77b3.js';
|
|
25
|
+
import '../Option/index.js';
|
|
26
|
+
import '../hooks/useEllipsisDetection.js';
|
|
27
|
+
import '../Tooltip/index.js';
|
|
27
28
|
|
|
28
29
|
function ActionMenu(_ref) {
|
|
29
30
|
let {
|
|
@@ -57,7 +58,7 @@ function ActionMenu(_ref) {
|
|
|
57
58
|
return children;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
var css_248z = "[data-gene-ui-version=\"
|
|
61
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .m-popup-holder{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:400}[data-gene-ui-version=\"2.12.2\"] .m-popup-backdrop{animation:m-popup-backdrop-reveal .3s forwards;background-color:#0003;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}@keyframes m-popup-backdrop-reveal{to{opacity:1}}[data-gene-ui-version=\"2.12.2\"] .m-popup-c{animation:m-popup-c-reveal .4s .25s forwards;background:var(--background);border-radius:1rem 1rem 0 0;bottom:0;box-shadow:0 -1px .2rem 0 #0000000d;display:flex;flex-direction:column;left:0;max-height:calc(100% - 2rem);padding:0 1.6rem;position:absolute;right:0;transform:translate3d(0,100%,0)}@keyframes m-popup-c-reveal{to{transform:translateZ(0)}}[data-gene-ui-version=\"2.12.2\"] .m-popup-head{border-bottom:1px solid rgba(var(--background-sc-rgb),.1);display:grid;font-weight:700;grid-template-columns:1fr auto 1fr;height:5.1rem;position:relative}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li{align-items:center;display:flex;overflow:hidden}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li:first-child .mp-action .icon{margin-inline-end:1rem}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li:last-child .mp-action{flex-direction:row-reverse}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li:last-child .mp-action .icon{margin-inline-start:1rem}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li:nth-child(2){padding:0 1rem}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li:not(:nth-child(2)){min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li:nth-child(3){justify-content:flex-end}[data-gene-ui-version=\"2.12.2\"] .m-popup-head>li .mp-action{align-items:center;color:var(--hero);cursor:pointer;display:flex;font:600 1.4rem/3.6rem var(--font-family);overflow:hidden}[data-gene-ui-version=\"2.12.2\"] .m-popup-content{-webkit-overflow-scrolling:auto;flex:auto;margin:0 -1.6rem;overflow-y:auto;padding:0 1.6rem env(safe-area-inset-bottom);transition:padding .4s;width:calc(100% + 3.2rem)}";
|
|
61
62
|
styleInject(css_248z);
|
|
62
63
|
|
|
63
64
|
const MobilePopUp = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -118,26 +119,26 @@ MobilePopUp.propTypes = {
|
|
|
118
119
|
* Fires event when user clicks on right action button
|
|
119
120
|
* (event: SyntheticEvent) => void
|
|
120
121
|
*/
|
|
121
|
-
rightActionClick:
|
|
122
|
+
rightActionClick: PropTypes.func,
|
|
122
123
|
/**
|
|
123
124
|
* Fires event when user clicks on left action button
|
|
124
125
|
* (event: SyntheticEvent) => void
|
|
125
126
|
*/
|
|
126
|
-
leftActionClick:
|
|
127
|
+
leftActionClick: PropTypes.func,
|
|
127
128
|
/**
|
|
128
129
|
* Container for portal
|
|
129
130
|
*/
|
|
130
|
-
portalContainer:
|
|
131
|
+
portalContainer: PropTypes.any,
|
|
131
132
|
/**
|
|
132
133
|
* Props for right action
|
|
133
134
|
* iconType: String
|
|
134
135
|
* text: String
|
|
135
136
|
* menuOptions: Option atom's props
|
|
136
137
|
*/
|
|
137
|
-
rightAction:
|
|
138
|
-
iconType:
|
|
139
|
-
text:
|
|
140
|
-
menuOptions:
|
|
138
|
+
rightAction: PropTypes.oneOfType([PropTypes.any, PropTypes.shape({
|
|
139
|
+
iconType: PropTypes.string,
|
|
140
|
+
text: PropTypes.string,
|
|
141
|
+
menuOptions: PropTypes.arrayOf(PropTypes.object)
|
|
141
142
|
})]),
|
|
142
143
|
/**
|
|
143
144
|
* Props for left action
|
|
@@ -145,31 +146,31 @@ MobilePopUp.propTypes = {
|
|
|
145
146
|
* text: String
|
|
146
147
|
* menuOptions: Option atom's props
|
|
147
148
|
*/
|
|
148
|
-
leftAction:
|
|
149
|
-
iconType:
|
|
150
|
-
text:
|
|
151
|
-
menuOptions:
|
|
149
|
+
leftAction: PropTypes.oneOfType([PropTypes.any, PropTypes.shape({
|
|
150
|
+
iconType: PropTypes.string,
|
|
151
|
+
text: PropTypes.string,
|
|
152
|
+
menuOptions: PropTypes.arrayOf(PropTypes.object)
|
|
152
153
|
})]),
|
|
153
154
|
/**
|
|
154
155
|
* Additional classname
|
|
155
156
|
*/
|
|
156
|
-
className:
|
|
157
|
+
className: PropTypes.string,
|
|
157
158
|
/**
|
|
158
159
|
* Displays popup if [true]
|
|
159
160
|
*/
|
|
160
|
-
isOpened:
|
|
161
|
+
isOpened: PropTypes.bool,
|
|
161
162
|
/**
|
|
162
163
|
* Valid React elements for popup body
|
|
163
164
|
*/
|
|
164
|
-
children:
|
|
165
|
+
children: PropTypes.node,
|
|
165
166
|
/**
|
|
166
167
|
* Custom title for popup
|
|
167
168
|
*/
|
|
168
|
-
title:
|
|
169
|
+
title: PropTypes.string,
|
|
169
170
|
/*
|
|
170
171
|
* Backdrop click event handler
|
|
171
172
|
*/
|
|
172
|
-
onBackdropClick:
|
|
173
|
+
onBackdropClick: PropTypes.func
|
|
173
174
|
};
|
|
174
175
|
MobilePopUp.defaultProps = {
|
|
175
176
|
onBackdropClick: noop,
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { useRef, useState, useCallback } from 'react';
|
|
3
|
-
import { c as classnames } from '
|
|
4
|
-
import
|
|
5
|
-
import { n as noop } from '
|
|
6
|
-
import
|
|
7
|
-
import '
|
|
8
|
-
import Button from '
|
|
9
|
-
import Portal from '
|
|
10
|
-
import '
|
|
11
|
-
import
|
|
12
|
-
import '
|
|
13
|
-
import './_commonjsHelpers-24198af3.js';
|
|
3
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { n as noop } from '../index-a0e4e333.js';
|
|
6
|
+
import useKeyDown from '../hooks/useKeyDown.js';
|
|
7
|
+
import '../configs-fed6ac34.js';
|
|
8
|
+
import Button from '../Button/index.js';
|
|
9
|
+
import Portal from '../Portal/index.js';
|
|
10
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
11
|
+
import '../dateValidation-67caec66.js';
|
|
12
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
14
13
|
import 'react-dom';
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
14
|
+
import '../Icon/index.js';
|
|
15
|
+
import '../GeneUIProvider/index.js';
|
|
17
16
|
|
|
18
|
-
var css_248z = "[data-gene-ui-version=\"
|
|
17
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .modal-splash{animation:modal-splash .3s forwards;display:flex;height:calc(100% - var(--header-height, 0px));left:0;opacity:0;overflow-y:auto;padding:2.8rem;position:fixed;top:var(--header-height,0);width:100%;z-index:300}@keyframes modal-splash{to{opacity:1}}[data-gene-ui-version=\"2.12.2\"] .modal-splash.p-top{padding-top:0}[data-gene-ui-version=\"2.12.2\"] .modal-splash.p-bottom{padding-bottom:0}[data-gene-ui-version=\"2.12.2\"] .modal-splash.light-background{background:#fff9}[data-gene-ui-version=\"2.12.2\"] .modal-splash.dark-background{background:#0006}[data-gene-ui-version=\"2.12.2\"] .modal-content{animation:modal-content .4s .1s forwards;background:var(--background);border:1px solid rgba(var(--background-sc-rgb),.1);border-radius:2rem;box-shadow:0 .2rem .4rem 0 #0000001a;display:flex;flex-direction:column;margin:auto;max-width:100%;opacity:0;position:relative}@keyframes modal-content{to{opacity:1}}[data-gene-ui-version=\"2.12.2\"] .modal-content.s-default{width:35rem}[data-gene-ui-version=\"2.12.2\"] .modal-content .modal-close{position:absolute;top:.5rem}html:not([dir=rtl]) .modal-content .modal-close{right:1.6rem}html[dir=rtl] .modal-content .modal-close{left:1.6rem}[data-gene-ui-version=\"2.12.2\"] .modal-splash.p-top .modal-content{align-self:flex-start;border-top-left-radius:0;border-top-right-radius:0;margin:0 auto}[data-gene-ui-version=\"2.12.2\"] .modal-splash.p-bottom .modal-content{align-self:flex-end;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:0 -.2rem .4rem 0 #0000001a;margin:0 auto}[data-gene-ui-version=\"2.12.2\"] .modal-head{align-items:center;border-bottom:1px solid rgba(var(--background-sc-rgb),.1);display:flex;font:700 1.4rem/1.8rem var(--font-family);justify-content:center;min-height:4rem;padding:0 5.4rem;position:relative;text-align:center;width:100%}[data-gene-ui-version=\"2.12.2\"] .modal-head .modal-close{top:50%;transform:translateY(-50%)}[data-gene-ui-version=\"2.12.2\"] .a-compact .modal-head{border-bottom:0;line-height:1.6rem;margin:2.6rem 0 .6rem;min-height:inherit}[data-gene-ui-version=\"2.12.2\"] .modal-body{color:rgba(var(--background-sc-rgb),.62);font:600 1.2rem/1.42 var(--font-family);padding:2rem;width:100%}[data-gene-ui-version=\"2.12.2\"] .modal-footer{border-top:1px solid rgba(var(--background-sc-rgb),.1);display:flex;justify-content:center;padding:1.5rem 2.5rem;width:100%}[data-gene-ui-version=\"2.12.2\"] .modal-footer>*{margin:0 .5rem}";
|
|
19
18
|
styleInject(css_248z);
|
|
20
19
|
|
|
21
20
|
const sizes = ['default', 'content-size'];
|
|
@@ -131,104 +130,104 @@ Modal.propTypes = {
|
|
|
131
130
|
/**
|
|
132
131
|
* Displays modal if [true]
|
|
133
132
|
*/
|
|
134
|
-
visible:
|
|
133
|
+
visible: PropTypes.bool,
|
|
135
134
|
/**
|
|
136
135
|
* Controls modal size
|
|
137
136
|
*/
|
|
138
|
-
size:
|
|
137
|
+
size: PropTypes.oneOf(sizes),
|
|
139
138
|
/**
|
|
140
139
|
* Controls background color of modal
|
|
141
140
|
*/
|
|
142
|
-
background:
|
|
141
|
+
background: PropTypes.oneOf(backgrounds),
|
|
143
142
|
/**
|
|
144
143
|
* Controls divider between modal's header and body
|
|
145
144
|
*/
|
|
146
|
-
appearance:
|
|
145
|
+
appearance: PropTypes.oneOf(appearances),
|
|
147
146
|
/**
|
|
148
147
|
* Controls modal position on screen
|
|
149
148
|
*/
|
|
150
|
-
position:
|
|
149
|
+
position: PropTypes.oneOf(positions),
|
|
151
150
|
/**
|
|
152
151
|
* Displays close button on modal,
|
|
153
152
|
* Fires onCancel function when clicked
|
|
154
153
|
*/
|
|
155
|
-
closable:
|
|
154
|
+
closable: PropTypes.bool,
|
|
156
155
|
/**
|
|
157
156
|
* Disables footer in modal
|
|
158
157
|
*/
|
|
159
|
-
disableFooter:
|
|
158
|
+
disableFooter: PropTypes.bool,
|
|
160
159
|
/**
|
|
161
160
|
* Enables footers Ok button in modal
|
|
162
161
|
*/
|
|
163
|
-
isOkActive:
|
|
162
|
+
isOkActive: PropTypes.bool,
|
|
164
163
|
/**
|
|
165
164
|
* Custom text for cancel button
|
|
166
165
|
*/
|
|
167
|
-
cancelText:
|
|
166
|
+
cancelText: PropTypes.string,
|
|
168
167
|
/**
|
|
169
168
|
* Custom text for ok button
|
|
170
169
|
*/
|
|
171
|
-
okText:
|
|
170
|
+
okText: PropTypes.string,
|
|
172
171
|
/**
|
|
173
172
|
* Custom title for modal
|
|
174
173
|
*/
|
|
175
|
-
title:
|
|
174
|
+
title: PropTypes.any,
|
|
176
175
|
/**
|
|
177
176
|
* Wraps component with Portal component if [true]
|
|
178
177
|
*/
|
|
179
|
-
withPortal:
|
|
180
|
-
portalContainer:
|
|
178
|
+
withPortal: PropTypes.bool,
|
|
179
|
+
portalContainer: PropTypes.any,
|
|
181
180
|
/**
|
|
182
181
|
* Custom value to override default css value
|
|
183
182
|
*/
|
|
184
|
-
width:
|
|
183
|
+
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
185
184
|
/**
|
|
186
185
|
* Custom zIndex value to overRide default css value
|
|
187
186
|
*/
|
|
188
|
-
zIndex:
|
|
187
|
+
zIndex: PropTypes.number,
|
|
189
188
|
/**
|
|
190
189
|
* Valid React elements for modal body
|
|
191
190
|
*/
|
|
192
|
-
children:
|
|
191
|
+
children: PropTypes.node,
|
|
193
192
|
/**
|
|
194
193
|
* Additional classname
|
|
195
194
|
*/
|
|
196
|
-
className:
|
|
195
|
+
className: PropTypes.string,
|
|
197
196
|
/**
|
|
198
197
|
* Fires event when user clicks on ok button
|
|
199
198
|
* (event: Event) => void
|
|
200
199
|
*/
|
|
201
|
-
onOK:
|
|
200
|
+
onOK: PropTypes.func,
|
|
202
201
|
/**
|
|
203
202
|
* Fires event when user clicks on Cancel button
|
|
204
203
|
* (event: Event) => void
|
|
205
204
|
*/
|
|
206
|
-
onCancel:
|
|
205
|
+
onCancel: PropTypes.func,
|
|
207
206
|
/**
|
|
208
207
|
* Custom footer element for modal
|
|
209
208
|
*/
|
|
210
|
-
footer:
|
|
209
|
+
footer: PropTypes.element,
|
|
211
210
|
/**
|
|
212
211
|
* Pass [true] if you need to hide a modal when people click outside of it's content
|
|
213
212
|
*/
|
|
214
|
-
closeOnClickOutside:
|
|
213
|
+
closeOnClickOutside: PropTypes.bool,
|
|
215
214
|
/**
|
|
216
215
|
* Custom action elements for modal's header
|
|
217
216
|
*/
|
|
218
|
-
customActions:
|
|
217
|
+
customActions: PropTypes.node,
|
|
219
218
|
/**
|
|
220
219
|
* Enable keyboard Enter
|
|
221
220
|
*/
|
|
222
|
-
needEnter:
|
|
221
|
+
needEnter: PropTypes.bool,
|
|
223
222
|
/**
|
|
224
223
|
* Fires event when user clicks on Close icon
|
|
225
224
|
* (event: Event) => void
|
|
226
225
|
*/
|
|
227
|
-
onClose:
|
|
226
|
+
onClose: PropTypes.func,
|
|
228
227
|
/**
|
|
229
228
|
* Loader for ok button
|
|
230
229
|
*/
|
|
231
|
-
isOkButtonLoading:
|
|
230
|
+
isOkButtonLoading: PropTypes.bool
|
|
232
231
|
};
|
|
233
232
|
Modal.defaultProps = {
|
|
234
233
|
visible: false,
|