@geneui/components 2.11.1 → 2.12.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/{ActionableList.js → ActionableList/index.js} +83 -152
- package/{AdvancedSearch.js → AdvancedSearch/index.js} +291 -304
- package/{Alert.js → Alert/index.js} +19 -20
- package/Avatar/index.js +30 -0
- package/{Badge.js → Badge/index.js} +13 -14
- package/{Breadcrumb.js → Breadcrumb/index.js} +32 -31
- package/{BusyLoader.js → BusyLoader/index.js} +11 -12
- package/{Button.js → Button/index.js} +20 -21
- package/CHANGELOG.md +56 -0
- package/{Card.js → Card/index.js} +82 -94
- package/{CardList.js → CardList/index.js} +118 -165
- package/{CellMeasurerCache-c11cec83.js → CellMeasurerCache-bc2163c1.js} +2 -2
- package/{index-0cf65939.js → Charts/index.js} +17103 -30439
- 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} +46 -43
- package/{DatePicker.js → DatePicker/index.js} +106 -108
- package/{index-5e722d91.js → DatePickerInput/index.js} +103 -89
- 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} +83 -73
- package/Form/index.js +86 -0
- package/{FormContainer.js → FormContainer/index.js} +25 -26
- package/FormableCheckbox/index.js +26 -0
- package/FormableDatePicker/index.js +42 -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.js → Image/index.js} +29 -30
- package/ImagePreview/index.js +481 -0
- package/{KeyValue.js → KeyValue/index.js} +11 -12
- package/LICENSE +21 -0
- package/{Label.js → Label/index.js} +8 -9
- package/LinkButton/index.js +67 -0
- package/{Menu.js → Menu/index.js} +39 -34
- package/{MobileNavigation.js → MobileNavigation/index.js} +19 -20
- 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} +44 -35
- package/{Notification.js → Notification/index.js} +24 -25
- package/{Option.js → Option/index.js} +37 -39
- package/Overlay/index.js +189 -0
- package/{Overspread.js → Overspread/index.js} +65 -121
- package/{Pagination.js → Pagination/index.js} +35 -34
- package/Paper/index.js +96 -0
- package/{index-a4635754.js → Popover/index.js} +48 -58
- package/{index-702bf24a.js → PopoverV2/index.js} +57 -1006
- package/{Portal.js → Portal/index.js} +7 -8
- package/{Products.js → Products/index.js} +20 -21
- package/Profile/index.js +585 -0
- package/{Progress.js → Progress/index.js} +24 -25
- 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-b7928765.js → RichEditor-8b9c3afa.js} +18 -18
- package/{Scrollbar.js → Scrollbar/index.js} +15 -17
- package/{Search.js → Search/index.js} +25 -24
- package/{SearchWithDropdown.js → SearchWithDropdown/index.js} +47 -104
- package/{Section.js → Section/index.js} +15 -16
- package/{SkeletonLoader.js → SkeletonLoader/index.js} +13 -14
- package/{Slider.js → Slider/index.js} +46 -43
- package/{Status.js → Status/index.js} +23 -24
- package/{Steps.js → Steps/index.js} +42 -41
- package/{index-5cea9a7d.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} +132 -168
- package/{Tabs.js → Tabs/index.js} +27 -28
- package/{Tag.js → Tag/index.js} +17 -18
- 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 +556 -0
- package/{Timeline.js → Timeline/index.js} +19 -20
- package/{Title.js → Title/index.js} +13 -14
- 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-d9e8a888.js → Uploader/index.js} +119 -116
- package/{ValidatableCheckbox.js → ValidatableCheckbox/index.js} +23 -24
- package/{ValidatableDatePicker.js → ValidatableDatePicker/index.js} +45 -42
- package/ValidatableDropdown/index.js +139 -0
- package/ValidatableElements/index.js +68 -0
- package/ValidatableMultiSelectDropdown/index.js +150 -0
- package/{ValidatableNumberInput.js → ValidatableNumberInput/index.js} +34 -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-45eafea6.js +90 -0
- package/{index-a59530cd.js → index-583e0b30.js} +1 -1
- package/{index-67f4d4d1.js → index-78d2ea5b.js} +684 -752
- package/{index-ac59cb10.js → index-a0e4e333.js} +6 -6
- package/{index-e8776f3d.js → index-b1e429a7.js} +1 -1
- package/index-bd525a3a.js +10054 -0
- package/index.d.ts +115 -0
- package/index.js +138 -113
- package/index.mobile.d.ts +16 -0
- package/jsx-runtime-57b40d9e.js +957 -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/Avatar.js +0 -77
- 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/ImagePreview.js +0 -99
- package/LinkButton.js +0 -104
- package/ModuleTitle.js +0 -99
- package/Overlay.js +0 -99
- package/Paper.js +0 -97
- package/Popover.js +0 -20
- package/PopoverV2.js +0 -19
- package/Profile.js +0 -99
- package/Range.js +0 -14
- package/RichEditor.js +0 -13
- package/SuggestionList.js +0 -15
- package/Table.js +0 -102
- package/TimePicker.js +0 -99
- 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-b7a33c58.js +0 -11
- package/index-e0af0caf.js +0 -1182
- package/useMount-6fef51a5.js +0 -9
|
@@ -1,32 +1,40 @@
|
|
|
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=\"2.
|
|
26
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper{min-width:18rem;overflow:hidden;white-space:nowrap;width:100%}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .menu-items-wrapper>ul.reversed>li:first-child{order:0}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper>ul.reversed>li:nth-child(2){order:2}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper>ul.reversed>li:nth-child(3){order:1}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper>ul>li{display:flex;flex-direction:column;flex-shrink:0;width:100%}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .divider.type-horizontal{margin:0;width:100%}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .divider.type-horizontal.full-width{margin:1rem 0;width:100%}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .popover-positioner.mobile-view .menu-items-wrapper .menu-item{padding:1.4rem 2rem}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-item.highlighted{color:var(--hero)}@media (hover:hover){[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-item:hover{background:rgba(var(--background-sc-rgb),.05)}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-item.act-direction:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-item .icon{margin:-.2rem 0}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-item .icon.menu-custom-icon{margin-inline-end:1rem}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-item.header{flex-direction:row-reverse}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-text{flex:auto}[data-gene-ui-version=\"2.12.1\"] .menu-items-wrapper .menu-text .small-text{font-size:1.2rem;line-height:1.4rem;opacity:.7}";
|
|
28
27
|
styleInject(css_248z);
|
|
29
28
|
|
|
29
|
+
const findHeaderByIndexStack = (data, indexStack) => {
|
|
30
|
+
var _data$currentIndex;
|
|
31
|
+
if (!data || !Array.isArray(data) || data.length === 0) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const [currentIndex, ...nextIndexStack] = indexStack;
|
|
35
|
+
const nextData = (_data$currentIndex = data[currentIndex]) === null || _data$currentIndex === void 0 ? void 0 : _data$currentIndex.children;
|
|
36
|
+
return indexStack.length === 1 ? data[currentIndex] : findHeaderByIndexStack(nextData, nextIndexStack);
|
|
37
|
+
};
|
|
30
38
|
const Menu = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
31
39
|
var _activeElementRef$cur2;
|
|
32
40
|
let {
|
|
@@ -72,18 +80,16 @@ const Menu = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
72
80
|
setIsScrolled(true);
|
|
73
81
|
}
|
|
74
82
|
});
|
|
75
|
-
const [prevHeader, setPrevHeader] = useState([]);
|
|
76
83
|
const handleClick = useCallback((e, item, isHeader, index) => {
|
|
77
84
|
setWithSmoothScroll(false);
|
|
78
85
|
setAllowScroll(true);
|
|
79
86
|
setHoverIndex(null);
|
|
80
87
|
setScrollTopGap(item !== null && item !== void 0 && item.scrollTopGap ? item === null || item === void 0 ? void 0 : item.scrollTopGap : 0);
|
|
88
|
+
const newIndexStack = indexStack.slice(0, -1);
|
|
81
89
|
if (isHeader) {
|
|
82
|
-
setIndexStack(
|
|
83
|
-
setPrevHeader(prev => prev.slice(0, -1));
|
|
84
|
-
!(indexStack.length - 1) && setHeader(null);
|
|
90
|
+
setIndexStack(newIndexStack);
|
|
85
91
|
onBack && onBack(e, item);
|
|
86
|
-
setHeader(
|
|
92
|
+
setHeader(findHeaderByIndexStack(data, newIndexStack));
|
|
87
93
|
} else {
|
|
88
94
|
const {
|
|
89
95
|
onClick,
|
|
@@ -92,7 +98,6 @@ const Menu = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
92
98
|
if (children) {
|
|
93
99
|
setIndexStack([...indexStack, index]);
|
|
94
100
|
setHeader(item);
|
|
95
|
-
setPrevHeader(prev => [...prev, item]);
|
|
96
101
|
onNext && onNext(e, item);
|
|
97
102
|
} else {
|
|
98
103
|
onSelect && onSelect(e, item);
|
|
@@ -240,38 +245,38 @@ Menu.propTypes = {
|
|
|
240
245
|
* used for the atoms/Option component.<br/>
|
|
241
246
|
* Add <code>maxHeight</code> to data to add scrollbar with maxHeight(px)
|
|
242
247
|
*/
|
|
243
|
-
data:
|
|
244
|
-
component:
|
|
245
|
-
maxHeight:
|
|
248
|
+
data: PropTypes.arrayOf(PropTypes.shape({
|
|
249
|
+
component: PropTypes.node,
|
|
250
|
+
maxHeight: PropTypes.number,
|
|
246
251
|
...Option.propTypes
|
|
247
252
|
})),
|
|
248
253
|
/**
|
|
249
254
|
* Fires event when user click on header elements;
|
|
250
255
|
* (event: Event, item: Object) => void
|
|
251
256
|
*/
|
|
252
|
-
onBack:
|
|
257
|
+
onBack: PropTypes.func,
|
|
253
258
|
/**
|
|
254
259
|
* Fires event when user click on option elements;
|
|
255
260
|
* (event: Event, item: Object) => void
|
|
256
261
|
*/
|
|
257
|
-
onNext:
|
|
262
|
+
onNext: PropTypes.func,
|
|
258
263
|
/**
|
|
259
264
|
* Fires event when user click on elements;
|
|
260
265
|
* (event: Event, item: Object) => void
|
|
261
266
|
*/
|
|
262
|
-
onSelect:
|
|
267
|
+
onSelect: PropTypes.func,
|
|
263
268
|
/**
|
|
264
269
|
* Controls screen type
|
|
265
270
|
*/
|
|
266
|
-
screenType:
|
|
271
|
+
screenType: PropTypes.oneOf(screenTypes),
|
|
267
272
|
/**
|
|
268
273
|
* auto scroll to activeElement
|
|
269
274
|
*/
|
|
270
|
-
scrollToActiveElement:
|
|
275
|
+
scrollToActiveElement: PropTypes.bool,
|
|
271
276
|
/**
|
|
272
277
|
* Initial selected options indexes array
|
|
273
278
|
*/
|
|
274
|
-
initialIndexStack:
|
|
279
|
+
initialIndexStack: PropTypes.arrayOf(PropTypes.string)
|
|
275
280
|
};
|
|
276
281
|
|
|
277
282
|
export { Menu as default };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { c as classnames } from '
|
|
5
|
-
import Badge from '
|
|
6
|
-
import Icon from '
|
|
7
|
-
import '
|
|
8
|
-
import
|
|
9
|
-
import './configs.js';
|
|
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';
|
|
10
9
|
|
|
11
|
-
var css_248z = "[data-gene-ui-version=\"2.
|
|
10
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .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.1\"] .mob-navigation-bar>ul{display:table;table-layout:fixed;width:100%}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .mob-navigation-bar>ul>li .badge{margin:0 auto;position:absolute;top:.8rem;width:5.2rem}[data-gene-ui-version=\"2.12.1\"] .mob-navigation-bar>ul>li .badge-right .badge{right:calc(50% - 2.5rem)}[data-gene-ui-version=\"2.12.1\"] .mob-navigation-bar>ul>li .badge-left .badge{left:calc(50% - 2.5rem)}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .mob-navigation-bar>ul>li.active{color:var(--hero)}[data-gene-ui-version=\"2.12.1\"] .mob-navigation-bar>ul>li.active:before{transform:translateY(0)}[data-gene-ui-version=\"2.12.1\"] .mob-navigation-bar>ul>li.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.12.1\"] .mob-navigation-bar .icon{margin:0 0 .2rem}";
|
|
12
11
|
styleInject(css_248z);
|
|
13
12
|
|
|
14
13
|
function MobileNavigation(_ref) {
|
|
@@ -52,44 +51,44 @@ MobileNavigation.propTypes = {
|
|
|
52
51
|
/**
|
|
53
52
|
* Array of menu items data
|
|
54
53
|
*/
|
|
55
|
-
list:
|
|
54
|
+
list: PropTypes.arrayOf(PropTypes.shape({
|
|
56
55
|
/**
|
|
57
56
|
* Title for navigation item
|
|
58
57
|
*/
|
|
59
|
-
title:
|
|
58
|
+
title: PropTypes.string,
|
|
60
59
|
/**
|
|
61
60
|
*
|
|
62
61
|
*/
|
|
63
|
-
slug:
|
|
62
|
+
slug: PropTypes.string,
|
|
64
63
|
/**
|
|
65
64
|
* Icon for navigation item
|
|
66
65
|
*/
|
|
67
|
-
icon:
|
|
66
|
+
icon: PropTypes.string,
|
|
68
67
|
/**
|
|
69
68
|
* Notification Badge
|
|
70
69
|
* count - the value of badge
|
|
71
70
|
* maxCount - if the count is greater than the max count, the Badge shows maxCount+
|
|
72
71
|
* position - position of Badge
|
|
73
72
|
*/
|
|
74
|
-
badge:
|
|
75
|
-
count:
|
|
76
|
-
maxCount:
|
|
77
|
-
position:
|
|
73
|
+
badge: PropTypes.shape({
|
|
74
|
+
count: PropTypes.number,
|
|
75
|
+
maxCount: PropTypes.number,
|
|
76
|
+
position: PropTypes.oneOf(['left', 'right'])
|
|
78
77
|
})
|
|
79
78
|
}).isRequired),
|
|
80
79
|
/**
|
|
81
80
|
* Initially selected item
|
|
82
81
|
*/
|
|
83
|
-
activeSlug:
|
|
82
|
+
activeSlug: PropTypes.string,
|
|
84
83
|
/**
|
|
85
84
|
* CSS class name for element
|
|
86
85
|
*/
|
|
87
|
-
className:
|
|
86
|
+
className: PropTypes.string,
|
|
88
87
|
/**
|
|
89
88
|
* Fires event when user click on one of the items
|
|
90
89
|
* (item: Object) => void
|
|
91
90
|
*/
|
|
92
|
-
onChange:
|
|
91
|
+
onChange: PropTypes.func
|
|
93
92
|
};
|
|
94
93
|
|
|
95
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=\"2.
|
|
61
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .m-popup-holder{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:400}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .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.1\"] .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.1\"] .m-popup-head>li{align-items:center;display:flex;overflow:hidden}[data-gene-ui-version=\"2.12.1\"] .m-popup-head>li:first-child .mp-action .icon{margin-inline-end:1rem}[data-gene-ui-version=\"2.12.1\"] .m-popup-head>li:last-child .mp-action{flex-direction:row-reverse}[data-gene-ui-version=\"2.12.1\"] .m-popup-head>li:last-child .mp-action .icon{margin-inline-start:1rem}[data-gene-ui-version=\"2.12.1\"] .m-popup-head>li:nth-child(2){padding:0 1rem}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .m-popup-head>li:nth-child(3){justify-content:flex-end}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .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=\"2.
|
|
17
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .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.1\"] .modal-splash.p-top{padding-top:0}[data-gene-ui-version=\"2.12.1\"] .modal-splash.p-bottom{padding-bottom:0}[data-gene-ui-version=\"2.12.1\"] .modal-splash.light-background{background:#fff9}[data-gene-ui-version=\"2.12.1\"] .modal-splash.dark-background{background:#0006}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .modal-content.s-default{width:35rem}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .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.1\"] .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.1\"] .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.1\"] .modal-head .modal-close{top:50%;transform:translateY(-50%)}[data-gene-ui-version=\"2.12.1\"] .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.1\"] .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.1\"] .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.1\"] .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,
|