@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,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
/* eslint-disable no-unused-vars */
|
|
7
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
9
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
|
|
11
|
+
function toObject(val) {
|
|
12
|
+
if (val === null || val === undefined) {
|
|
13
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return Object(val);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function shouldUseNative() {
|
|
20
|
+
try {
|
|
21
|
+
if (!Object.assign) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
26
|
+
|
|
27
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
28
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
29
|
+
test1[5] = 'de';
|
|
30
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
35
|
+
var test2 = {};
|
|
36
|
+
for (var i = 0; i < 10; i++) {
|
|
37
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
38
|
+
}
|
|
39
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
40
|
+
return test2[n];
|
|
41
|
+
});
|
|
42
|
+
if (order2.join('') !== '0123456789') {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
47
|
+
var test3 = {};
|
|
48
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
49
|
+
test3[letter] = letter;
|
|
50
|
+
});
|
|
51
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
52
|
+
'abcdefghijklmnopqrst') {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return true;
|
|
57
|
+
} catch (err) {
|
|
58
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
64
|
+
var from;
|
|
65
|
+
var to = toObject(target);
|
|
66
|
+
var symbols;
|
|
67
|
+
|
|
68
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
69
|
+
from = Object(arguments[s]);
|
|
70
|
+
|
|
71
|
+
for (var key in from) {
|
|
72
|
+
if (hasOwnProperty.call(from, key)) {
|
|
73
|
+
to[key] = from[key];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (getOwnPropertySymbols) {
|
|
78
|
+
symbols = getOwnPropertySymbols(from);
|
|
79
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
80
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
81
|
+
to[symbols[i]] = from[symbols[i]];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return to;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export { objectAssign as o };
|
|
@@ -4,15 +4,14 @@ import { c as commonjsGlobal } from './_commonjsHelpers-24198af3.js';
|
|
|
4
4
|
import ReactDOM__default from 'react-dom';
|
|
5
5
|
import { u as useSwipeable } from './index-122432cd.js';
|
|
6
6
|
import { c as classnames } from './index-6ff23041.js';
|
|
7
|
-
import
|
|
8
|
-
import { n as noop, s as stopEvent } from './index-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import CustomScrollbar from './Scrollbar.js';
|
|
13
|
-
import './
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { n as noop, s as stopEvent } from './index-a0e4e333.js';
|
|
9
|
+
import useDeviceType from './hooks/useDeviceType.js';
|
|
10
|
+
import useClickOutside from './hooks/useClickOutside.js';
|
|
11
|
+
import { g as popoverV2Config, s as screenTypes } from './configs-fed6ac34.js';
|
|
12
|
+
import CustomScrollbar from './Scrollbar/index.js';
|
|
13
|
+
import { GeneUIDesignSystemContext } from './GeneUIProvider/index.js';
|
|
14
14
|
import { s as styleInject } from './style-inject.es-746bb8ed.js';
|
|
15
|
-
import { GeneUIDesignSystemContext } from './GeneUIProvider.js';
|
|
16
15
|
import { d as debounce } from './debounce-4419bc2f.js';
|
|
17
16
|
|
|
18
17
|
var Popover = {};
|
|
@@ -1593,11 +1592,11 @@ ArrowContainer$1.ArrowContainer = ArrowContainer;
|
|
|
1593
1592
|
|
|
1594
1593
|
} (Popover));
|
|
1595
1594
|
|
|
1596
|
-
var css_248z = "[data-gene-ui-version=\"
|
|
1595
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .popover-positioner{--popover-border-radius:1rem;--popover-shadow:0 0.2rem 0.4rem 0 #0000000d,0 0 0 1px rgba(var(--background-sc-rgb),0.08);z-index:400}[data-gene-ui-version=\"2.12.2\"] .popover-positioner.cr-smooth-radius{--popover-border-radius:0.4rem}[data-gene-ui-version=\"2.12.2\"] .popover-positioner.mobile-view{--popover-border-radius:0.8rem 0.8rem 0 0;--popover-shadow:0 -1px 0.2rem 0 #0000000d;bottom:0;left:0!important;overflow:hidden;position:fixed!important;top:0!important;transform:translate(0)!important;width:100%}[data-gene-ui-version=\"2.12.2\"] .popover-positioner .popover-top-bottom-padding{padding:1rem 0;width:100%}[data-gene-ui-version=\"2.12.2\"] .popover-positioner .popover-top-bottom-padding>div[style*=width]{width:100%!important}[data-gene-ui-version=\"2.12.2\"] .popover{width:100%}[data-gene-ui-version=\"2.12.2\"] .popover-positioner.mobile-view .popover{height:100%;position:relative}[data-gene-ui-version=\"2.12.2\"] .popover-positioner-disable{margin-top:5px;position:inherit!important;transform:none!important}[data-gene-ui-version=\"2.12.2\"] .popover-track{width:100%}[data-gene-ui-version=\"2.12.2\"] .popover-content{background:var(--background);border-radius:var(--popover-border-radius);box-shadow:var(--popover-shadow);overflow:hidden;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s;width:100%}[data-gene-ui-version=\"2.12.2\"] .popover-positioner.mobile-view .popover-content{-webkit-overflow-scrolling:auto;bottom:0;left:0;max-height:calc(100% - 10rem);overflow-x:hidden;overflow-y:auto;position:absolute;z-index:1}[data-gene-ui-version=\"2.12.2\"] .popover-positioner.mobile-view[style*=\"opacity: 0\"] .popover-content{transform:translateY(100%)}[data-gene-ui-version=\"2.12.2\"] .popover-positioner.mobile-view .popover-content{transform:translateY(0)}[data-gene-ui-version=\"2.12.2\"] .popover-mobile-backdrop{background:#0003;height:100%;left:0;opacity:1;position:absolute;top:0;width:100%;z-index:0}[data-gene-ui-version=\"2.12.2\"] .popover-footer,[data-gene-ui-version=\"2.12.2\"] .popover-header{background:var(--background);position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"2.12.2\"] .popover-header{border-bottom:1px solid rgba(var(--background-sc-rgb),.1);top:0}[data-gene-ui-version=\"2.12.2\"] .popover-footer{align-items:stretch;border-top:1px solid rgba(var(--background-sc-rgb),.1);bottom:calc(env(safe-area-inset-bottom)*-1);display:flex;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s}[data-gene-ui-version=\"2.12.2\"] .popover-body{position:relative;z-index:0}[data-gene-ui-version=\"2.12.2\"] .popover-search{padding:1.4rem 1.5rem}[data-gene-ui-version=\"2.12.2\"] .empty-data-holder{align-items:center;display:flex;height:19rem;justify-content:center;width:100%}[data-gene-ui-version=\"2.12.2\"] .popover-disabled{opacity:.5;pointer-events:none;transition:opacity .5s}";
|
|
1597
1596
|
styleInject(css_248z);
|
|
1598
1597
|
|
|
1599
1598
|
const PopoverV2 = /*#__PURE__*/forwardRef((props, ref) => {
|
|
1600
|
-
var _popoverRef$
|
|
1599
|
+
var _popoverRef$current4;
|
|
1601
1600
|
const {
|
|
1602
1601
|
nativeOutsideClick,
|
|
1603
1602
|
extendTargetWidth,
|
|
@@ -1653,15 +1652,18 @@ const PopoverV2 = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1653
1652
|
setUpdateKey(Date.now());
|
|
1654
1653
|
}, [isMobile, cornerRadius]);
|
|
1655
1654
|
useEffect(() => {
|
|
1656
|
-
|
|
1657
|
-
|
|
1655
|
+
var _popoverRef$current;
|
|
1656
|
+
if (popoverRef.current && (_popoverRef$current = popoverRef.current) !== null && _popoverRef$current !== void 0 && _popoverRef$current.offsetWidth) {
|
|
1657
|
+
var _popoverRef$current2;
|
|
1658
|
+
setTargetWidth((_popoverRef$current2 = popoverRef.current) === null || _popoverRef$current2 === void 0 ? void 0 : _popoverRef$current2.offsetWidth);
|
|
1658
1659
|
const debouncedHandleResize = debounce(() => {
|
|
1659
|
-
|
|
1660
|
+
var _popoverRef$current3;
|
|
1661
|
+
setTargetWidth((_popoverRef$current3 = popoverRef.current) === null || _popoverRef$current3 === void 0 ? void 0 : _popoverRef$current3.offsetWidth);
|
|
1660
1662
|
}, 20);
|
|
1661
1663
|
window.addEventListener('resize', debouncedHandleResize);
|
|
1662
1664
|
return () => window.removeEventListener('resize', debouncedHandleResize);
|
|
1663
1665
|
}
|
|
1664
|
-
}, [(_popoverRef$
|
|
1666
|
+
}, [(_popoverRef$current4 = popoverRef.current) === null || _popoverRef$current4 === void 0 ? void 0 : _popoverRef$current4.offsetWidth]);
|
|
1665
1667
|
|
|
1666
1668
|
/* *** START SWIPE FUNCTIONALITY *** */
|
|
1667
1669
|
const checkBodyContains = event => popoverBodyRef.current.contains(event.target);
|
|
@@ -1764,12 +1766,12 @@ const PopoverV2 = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1764
1766
|
'popover-disabled': disabled
|
|
1765
1767
|
})
|
|
1766
1768
|
}, children), [popoverTrackRef, children, trackClassName, popoverState, disabled, handleTrackClick]);
|
|
1767
|
-
if (!Content) {
|
|
1768
|
-
return childElement;
|
|
1769
|
-
}
|
|
1770
1769
|
const containerParentMemo = useMemo(() => ({
|
|
1771
1770
|
containerParent: containerParent || geneUIProviderRef.current
|
|
1772
1771
|
}), [containerParent]);
|
|
1772
|
+
if (!Content) {
|
|
1773
|
+
return childElement;
|
|
1774
|
+
}
|
|
1773
1775
|
return /*#__PURE__*/React__default.createElement(Popover.Popover, _extends({
|
|
1774
1776
|
key: updateKey,
|
|
1775
1777
|
ref: generatePopoverRef,
|
|
@@ -1794,126 +1796,126 @@ PopoverV2.propTypes = {
|
|
|
1794
1796
|
/**
|
|
1795
1797
|
* The component that need to be displayed in the Popover. Any valid React node
|
|
1796
1798
|
*/
|
|
1797
|
-
Content:
|
|
1799
|
+
Content: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
1798
1800
|
/**
|
|
1799
1801
|
* The component that need to be displayed as Popover header. Any valid React node
|
|
1800
1802
|
*/
|
|
1801
|
-
Header:
|
|
1803
|
+
Header: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
1802
1804
|
/**
|
|
1803
1805
|
* The component that need to be displayed as Popover footer. Any valid React node
|
|
1804
1806
|
*/
|
|
1805
|
-
Footer:
|
|
1807
|
+
Footer: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
1806
1808
|
/**
|
|
1807
1809
|
* The component which click needs to trigger the Popover to open. Need to passed as child to Popover. Any valid React node
|
|
1808
1810
|
*/
|
|
1809
|
-
children:
|
|
1811
|
+
children: PropTypes.node,
|
|
1810
1812
|
/**
|
|
1811
1813
|
* The Popover will get the width of its child. The property will not work when "width" prop is specified
|
|
1812
1814
|
*/
|
|
1813
|
-
extendTargetWidth:
|
|
1815
|
+
extendTargetWidth: PropTypes.bool,
|
|
1814
1816
|
/**
|
|
1815
1817
|
* The Popover "Content" minimum scroll height
|
|
1816
1818
|
*/
|
|
1817
|
-
minHeight:
|
|
1819
|
+
minHeight: PropTypes.number,
|
|
1818
1820
|
/**
|
|
1819
1821
|
* The Popover "Content" maximum scroll height. Will not work when the "screenType" is "mobile"
|
|
1820
1822
|
*/
|
|
1821
|
-
maxHeight:
|
|
1823
|
+
maxHeight: PropTypes.number,
|
|
1822
1824
|
/**
|
|
1823
1825
|
* Use this prop to control the Popover. Note the component will start not to open and close automatically
|
|
1824
1826
|
*/
|
|
1825
|
-
isOpen:
|
|
1827
|
+
isOpen: PropTypes.bool,
|
|
1826
1828
|
/**
|
|
1827
1829
|
* Popover position to be displayed
|
|
1828
1830
|
*/
|
|
1829
|
-
position:
|
|
1831
|
+
position: PropTypes.oneOfType([PropTypes.oneOf(popoverV2Config.position), PropTypes.arrayOf(PropTypes.oneOf(popoverV2Config.position))]),
|
|
1830
1832
|
/**
|
|
1831
1833
|
* Will called each time the popover need to be toggled(child click, close button click, backdrop click).
|
|
1832
1834
|
* (event: Event, isOpen: bool) => void
|
|
1833
1835
|
*/
|
|
1834
|
-
toggleHandler:
|
|
1836
|
+
toggleHandler: PropTypes.func,
|
|
1835
1837
|
/**
|
|
1836
1838
|
* Possible values are start, center, and end.
|
|
1837
1839
|
* If start is specified, the popover content's top or left location is aligned with its target's.
|
|
1838
1840
|
* With end specified, the content's bottom or right location is aligned with its target's.
|
|
1839
1841
|
* If center is specified, the popover content and target's centers are aligned.
|
|
1840
1842
|
*/
|
|
1841
|
-
align:
|
|
1843
|
+
align: PropTypes.oneOf(popoverV2Config.align),
|
|
1842
1844
|
/**
|
|
1843
1845
|
* If you'd like to apply styles to the single container div that your popover content is rendered within via stylesheets,
|
|
1844
1846
|
* you can specify a custom className for the container here.
|
|
1845
1847
|
*/
|
|
1846
|
-
className:
|
|
1848
|
+
className: PropTypes.string,
|
|
1847
1849
|
/**
|
|
1848
1850
|
* This number determines the gap, in pixels, between your target content and your popover content
|
|
1849
1851
|
*/
|
|
1850
|
-
padding:
|
|
1852
|
+
padding: PropTypes.number,
|
|
1851
1853
|
/**
|
|
1852
1854
|
* If this property is enabled, rather than the popover content repositioning on a boundary collision,
|
|
1853
1855
|
* the popover content container will move beyond the window's bounds.
|
|
1854
1856
|
* You are, however, supplied with nudgedLeft and nudgedTop values, so you may choose to handle content overflow as you wish.
|
|
1855
1857
|
*/
|
|
1856
|
-
disableReposition:
|
|
1858
|
+
disableReposition: PropTypes.bool,
|
|
1857
1859
|
/**
|
|
1858
1860
|
* Popover corner radius
|
|
1859
1861
|
*/
|
|
1860
|
-
cornerRadius:
|
|
1862
|
+
cornerRadius: PropTypes.oneOf(popoverV2Config.cornerRadius),
|
|
1861
1863
|
/**
|
|
1862
1864
|
* The switch between mobile and desktop version of Popover will be applied automatically, when the prop is not specified.
|
|
1863
1865
|
* When the prop is present it must be changed from outside.
|
|
1864
1866
|
*/
|
|
1865
|
-
screenType:
|
|
1867
|
+
screenType: PropTypes.oneOf(screenTypes),
|
|
1866
1868
|
/**
|
|
1867
1869
|
* Specify does Popover needs to be toggled on child click
|
|
1868
1870
|
*/
|
|
1869
|
-
behave:
|
|
1871
|
+
behave: PropTypes.oneOf(popoverV2Config.behave),
|
|
1870
1872
|
/**
|
|
1871
1873
|
* Given content prop can have its own scroll, and with this props we can use/not use default scroll that has popover
|
|
1872
1874
|
*/
|
|
1873
|
-
scrollbarNeeded:
|
|
1875
|
+
scrollbarNeeded: PropTypes.bool,
|
|
1874
1876
|
/**
|
|
1875
1877
|
* Popover content ref
|
|
1876
1878
|
*/
|
|
1877
|
-
contentRef:
|
|
1878
|
-
current:
|
|
1879
|
+
contentRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
1880
|
+
current: PropTypes.any
|
|
1879
1881
|
})]),
|
|
1880
|
-
disabled:
|
|
1881
|
-
getScrollRef:
|
|
1882
|
+
disabled: PropTypes.bool,
|
|
1883
|
+
getScrollRef: PropTypes.func,
|
|
1882
1884
|
/**
|
|
1883
1885
|
* This number specifies the inset around your containerParent's border
|
|
1884
1886
|
* that boundary violations are determined at. Defaults to 0. Can be negative.
|
|
1885
1887
|
*/
|
|
1886
|
-
boundaryInset:
|
|
1888
|
+
boundaryInset: PropTypes.number,
|
|
1887
1889
|
/**
|
|
1888
1890
|
* If you want to apply styles to the popup tracker div where your children are using
|
|
1889
1891
|
* stylesheets, you can provide a custom class name for the container here.
|
|
1890
1892
|
*/
|
|
1891
|
-
trackClassName:
|
|
1893
|
+
trackClassName: PropTypes.string,
|
|
1892
1894
|
/*
|
|
1893
1895
|
* After DOWN swipe (SwipeEventData) => void
|
|
1894
1896
|
*/
|
|
1895
|
-
onSwipedDown:
|
|
1896
|
-
swipeable:
|
|
1897
|
+
onSwipedDown: PropTypes.func,
|
|
1898
|
+
swipeable: PropTypes.bool,
|
|
1897
1899
|
/*
|
|
1898
1900
|
* If react-tiny-popover detects a click event outside of the target and outside
|
|
1899
1901
|
* of the popover, you may handle this event here, in the form of (e: MouseEvent) => void.
|
|
1900
1902
|
*/
|
|
1901
|
-
onClickOutside:
|
|
1902
|
-
nativeOutsideClick:
|
|
1903
|
+
onClickOutside: PropTypes.func,
|
|
1904
|
+
nativeOutsideClick: PropTypes.func,
|
|
1903
1905
|
/*
|
|
1904
1906
|
* props for scrollbar
|
|
1905
1907
|
*/
|
|
1906
|
-
scrollbarProps:
|
|
1908
|
+
scrollbarProps: PropTypes.shape({
|
|
1907
1909
|
...CustomScrollbar.propTypes
|
|
1908
1910
|
}),
|
|
1909
1911
|
/*
|
|
1910
1912
|
* When disableTransform is true and containerParent has ref.current, the popover generates in a dropdown wrapper instead of closing the body tag, and the position will not calculate.
|
|
1911
1913
|
*/
|
|
1912
|
-
disableTransform:
|
|
1914
|
+
disableTransform: PropTypes.bool,
|
|
1913
1915
|
/*
|
|
1914
1916
|
* Provide an HTML element ref here to have your popover content appended to that element rather than document.body. This is useful if you'd like your popover to sit at a particular place within the DOM.
|
|
1915
1917
|
*/
|
|
1916
|
-
containerParent:
|
|
1918
|
+
containerParent: PropTypes.object
|
|
1917
1919
|
};
|
|
1918
1920
|
PopoverV2.defaultProps = {
|
|
1919
1921
|
cornerRadius: popoverV2Config.cornerRadius[0],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
2
|
import { a as dayjs } from './dateValidation-67caec66.js';
|
|
3
3
|
import 'react-dom';
|
|
4
4
|
|
|
@@ -39,10 +39,10 @@ const keyboardHandler = (e, keys) => keys.some(key => key === e.which || key ===
|
|
|
39
39
|
* PropTypes.instanceOf works only for class components
|
|
40
40
|
*/
|
|
41
41
|
const childrenOf = types => {
|
|
42
|
-
const type =
|
|
43
|
-
type:
|
|
42
|
+
const type = PropTypes.shape({
|
|
43
|
+
type: PropTypes.oneOf(types)
|
|
44
44
|
});
|
|
45
|
-
return
|
|
45
|
+
return PropTypes.oneOfType([type, PropTypes.arrayOf(type)]);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
/*
|
|
@@ -56,7 +56,7 @@ const oneIsRequired = properties => {
|
|
|
56
56
|
if (keys.every(key => !props.hasOwnProperty(key))) {
|
|
57
57
|
return new Error("".concat(keys.join(' or '), " must be specified for ").concat(componentName));
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
PropTypes.checkPropTypes({
|
|
60
60
|
[propName]: properties[propName]
|
|
61
61
|
}, props, propName, componentName);
|
|
62
62
|
};
|
|
@@ -166,4 +166,4 @@ const isLastMonthToDate = (startDate, endDate) => {
|
|
|
166
166
|
const noop = () => {};
|
|
167
167
|
const getInitials = name => name.match(/\b(\w)/g).join('').substr(0, 2).toUpperCase();
|
|
168
168
|
|
|
169
|
-
export { Logger$1 as L, conflictPropsLog as a, isToday as b, childrenOf as c, isYesterday as d, isThisWeek as e, fileSizeDisplay as f,
|
|
169
|
+
export { Logger$1 as L, conflictPropsLog as a, isToday as b, childrenOf as c, isYesterday as d, isThisWeek as e, fileSizeDisplay as f, isLastWeek as g, isThisMonth as h, interceptValue as i, isLastMonth as j, keyboardHandler as k, isLastMonthToDate as l, getLMTD as m, noop as n, oneIsRequired as o, getImageDimensions as p, chunk as q, getInitials as r, stopEvent as s };
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export { default as TextLink } from './lib/atoms/TextLink';
|
|
2
|
+
export { default as Button } from './lib/atoms/Button';
|
|
3
|
+
export { default as Label } from './lib/atoms/Label';
|
|
4
|
+
export { default as Icon } from './lib/atoms/Icon';
|
|
5
|
+
export { default as Switcher } from './lib/atoms/Switcher';
|
|
6
|
+
export { default as Divider } from './lib/atoms/Divider';
|
|
7
|
+
export { default as Radio } from './lib/atoms/Radio';
|
|
8
|
+
export { default as Portal } from './lib/atoms/Portal';
|
|
9
|
+
export { default as Badge } from './lib/atoms/Badge';
|
|
10
|
+
export { default as BusyLoader } from './lib/atoms/BusyLoader';
|
|
11
|
+
export { default as ModuleTitle } from './lib/atoms/ModuleTitle';
|
|
12
|
+
export { default as SkeletonLoader } from './lib/atoms/SkeletonLoader';
|
|
13
|
+
export { default as Scrollbar } from './lib/atoms/Scrollbar';
|
|
14
|
+
export { default as Time } from './lib/atoms/Time';
|
|
15
|
+
export { default as Empty } from './lib/atoms/Empty';
|
|
16
|
+
export { default as Popover } from './lib/atoms/Popover';
|
|
17
|
+
export { default as PopoverV2 } from './lib/atoms/PopoverV2';
|
|
18
|
+
export { default as Title } from './lib/atoms/Title';
|
|
19
|
+
export { default as Image } from './lib/atoms/Image';
|
|
20
|
+
export { default as KeyValue } from './lib/atoms/KeyValue';
|
|
21
|
+
export { default as Option } from './lib/atoms/Option';
|
|
22
|
+
export { default as ImagePreview } from './lib/atoms/ImagePreview';
|
|
23
|
+
export { default as QRCode } from './lib/atoms/QRCode';
|
|
24
|
+
export { default as Paper, paperWraps, alignItems, justifyContents, paperDirections, cornersRadius } from './lib/atoms/Paper';
|
|
25
|
+
export { default as Avatar } from './lib/atoms/Avatar/index';
|
|
26
|
+
export { default as LinkButton } from './lib/atoms/LinkButton/index';
|
|
27
|
+
export { Row, Col } from './lib/molecules/Grid';
|
|
28
|
+
export { Tab, Tabs } from './lib/molecules/Tabs';
|
|
29
|
+
export { Step, Steps } from './lib/molecules/Steps';
|
|
30
|
+
export { Timeline, TimelineItem, timelineColors, timelineAppearances } from './lib/molecules/Timeline';
|
|
31
|
+
export { default as RadioGroup } from './lib/molecules/RadioGroup';
|
|
32
|
+
export { default as Checkbox } from './lib/molecules/Checkbox';
|
|
33
|
+
export { default as Card } from './lib/molecules/Card';
|
|
34
|
+
export { default as Tag } from './lib/molecules/Tag';
|
|
35
|
+
export { default as Alert, alertTypes } from './lib/molecules/Alert';
|
|
36
|
+
export { default as Tooltip } from './lib/molecules/Tooltip';
|
|
37
|
+
export { default as Range } from './lib/molecules/Range';
|
|
38
|
+
export { default as Slider } from './lib/molecules/Slider';
|
|
39
|
+
export { default as Pagination } from './lib/molecules/Pagination';
|
|
40
|
+
export { default as ExtendedInput } from './lib/molecules/ExtendedInput';
|
|
41
|
+
export { ValidatableDropdown, MultiSelectDropdownField, ValidatableEditor, ValidatableUploader, ValidatableRadio, ValidatableCheckbox, ValidatableSwitcher, ValidatableNumberInput, ValidatableTextInput, ValidatableDatePicker } from './lib/molecules/ValidatableElements';
|
|
42
|
+
export { default as Notification, notificationTypes } from './lib/molecules/Notification';
|
|
43
|
+
export { default as Modal } from './lib/molecules/Modal';
|
|
44
|
+
export { Collapse, Panel } from './lib/molecules/Collapse';
|
|
45
|
+
export { default as Status, statusIconTypes } from './lib/molecules/Status';
|
|
46
|
+
export { default as Menu } from './lib/molecules/Menu';
|
|
47
|
+
export { default as Overlay } from './lib/molecules/Overlay';
|
|
48
|
+
export { default as Profile } from './lib/molecules/Profile';
|
|
49
|
+
export { LineChart, FunnelChart, MapChart, TreeMapChart, BarChart, ColumnChart, DalColumnChart, StackedBarChart, StackedColumnChart, AreaChart, PieChart, DonutChart, ScatterChart, HeatMapChart, ColumnRangeChart } from './lib/molecules/Charts';
|
|
50
|
+
export { default as Widget } from './lib/molecules/Widget';
|
|
51
|
+
export { default as Progress } from './lib/molecules/Progress';
|
|
52
|
+
export { default as MobileNavigation } from './lib/molecules/MobileNavigation';
|
|
53
|
+
export { default as MobilePopup } from './lib/molecules/MobilePopup';
|
|
54
|
+
export { default as Uploader } from './lib/molecules/Uploader';
|
|
55
|
+
export { default as Products } from './lib/molecules/Products';
|
|
56
|
+
export { default as Search } from './lib/molecules/Search';
|
|
57
|
+
export { default as DatePickerInput } from './lib/molecules/DatePickerInput';
|
|
58
|
+
export { default as Holder } from './lib/molecules/Holder';
|
|
59
|
+
export { default as Breadcrumb } from './lib/molecules/Breadcrumb';
|
|
60
|
+
export { default as Section } from './lib/molecules/Section';
|
|
61
|
+
export { default as TimePicker } from './lib/molecules/TimePicker';
|
|
62
|
+
export { default as ColorPicker } from './lib/molecules/ColorPicker';
|
|
63
|
+
export { default as NavigationMenu } from './lib/molecules/NavigationMenu';
|
|
64
|
+
export { default as ComboBox } from './lib/molecules/ComboBox';
|
|
65
|
+
export { default as Textarea } from './lib/molecules/Textarea';
|
|
66
|
+
export { default as Counter } from './lib/molecules/Counter';
|
|
67
|
+
export { default as AdvancedSearch } from './lib/molecules/AdvancedSearch';
|
|
68
|
+
export { default as FormableMultiSelectDropdown } from './lib/organisms/Form/Formables/FormableMultiSelectDropdown';
|
|
69
|
+
export { default as FormableNumberInput } from './lib/organisms/Form/Formables/FormableNumberInput';
|
|
70
|
+
export { default as FormableDatePicker } from './lib/organisms/Form/Formables/FormableDatePicker';
|
|
71
|
+
export { default as FormableTextInput } from './lib/organisms/Form/Formables/FormableTextInput';
|
|
72
|
+
export { default as FormableDropdown } from './lib/organisms/Form/Formables/FormableDropdown';
|
|
73
|
+
export { default as FormableCheckbox } from './lib/organisms/Form/Formables/FormableCheckbox';
|
|
74
|
+
export { default as FormableUploader } from './lib/organisms/Form/Formables/FormableUploader';
|
|
75
|
+
export { default as FormableSwitcher } from './lib/organisms/Form/Formables/FormableSwitcher';
|
|
76
|
+
export { default as FormableEditor } from './lib/organisms/Form/Formables/FormableEditor';
|
|
77
|
+
export { default as FormableRadio } from './lib/organisms/Form/Formables/FormableRadio';
|
|
78
|
+
export { default as FormableHOC } from './lib/organisms/Form/FormableHOC';
|
|
79
|
+
export { default as Toaster, toasterPositions } from './lib/organisms/Toaster';
|
|
80
|
+
export { default as SearchWithDropdown } from './lib/organisms/SearchWithDropdown';
|
|
81
|
+
export { default as CheckboxGroupWithSearch } from './lib/organisms/CheckboxGroupWithSearch';
|
|
82
|
+
export { default as CheckboxGroup } from './lib/organisms/CheckboxGroup';
|
|
83
|
+
export { default as Overspread } from './lib/organisms/Overspread';
|
|
84
|
+
export { default as DatePicker } from './lib/organisms/DatePicker';
|
|
85
|
+
export { default as DateFilter } from './lib/organisms/DateFilter';
|
|
86
|
+
export { ComboTable, TableHeader, TableTitle, TablePagination, TableContainer, WithTitle, WithHeader, PaperWrapper, PaginationSelector } from './lib/organisms/TableCompositions';
|
|
87
|
+
export { default as Dropdown } from './lib/organisms/Dropdown';
|
|
88
|
+
export { default as Editor } from './lib/organisms/Editor';
|
|
89
|
+
export { default as Table } from './lib/organisms/Table';
|
|
90
|
+
export { WrappedCardList, CardList } from './lib/organisms/CardList';
|
|
91
|
+
export { default as Form } from './lib/organisms/Form';
|
|
92
|
+
export { default as TransferList } from './lib/organisms/TransferList';
|
|
93
|
+
export { default as RichEditor } from './lib/organisms/RichEditor';
|
|
94
|
+
export { default as Drawer } from './lib/organisms/Drawer';
|
|
95
|
+
export { default as ActionableList } from './lib/organisms/ActionableList';
|
|
96
|
+
export { default as GeneUIProvider, GeneUIDesignSystemContext } from './lib/providers/GeneUIProvider';
|
|
97
|
+
export { default as useWidth } from './hooks/useWidth';
|
|
98
|
+
export { default as useMount } from './hooks/useMount';
|
|
99
|
+
export { default as useClick } from './hooks/useClick';
|
|
100
|
+
export { default as useToggle } from './hooks/useToggle';
|
|
101
|
+
export { default as useUpdate } from './hooks/useUpdate';
|
|
102
|
+
export { default as usePrevious } from './hooks/usePrevious';
|
|
103
|
+
export { default as useKeyDown } from './hooks/useKeyDown';
|
|
104
|
+
export { default as useForceUpdate } from './hooks/useForceUpdate';
|
|
105
|
+
export { default as useDeviceType } from './hooks/useDeviceType';
|
|
106
|
+
export { default as useWindowSize } from './hooks/useWindowSize';
|
|
107
|
+
export { default as useClickOutside } from './hooks/useClickOutside';
|
|
108
|
+
export { default as useDebounce } from './hooks/useDebounceHook';
|
|
109
|
+
export { default as useThrottle } from './hooks/useThrottle';
|
|
110
|
+
export { default as useMutationObserver } from './hooks/useMutationObserver';
|
|
111
|
+
export { default as useUpdatableRef } from './hooks/useUpdatableRef';
|
|
112
|
+
export { default as useDidMount } from './hooks/useDidMount';
|
|
113
|
+
export { default as useBodyScroll } from './hooks/useBodyScroll';
|
|
114
|
+
export { default as useImgDownload } from './hooks/useImgDownload';
|
|
115
|
+
export { default as useEllipsisDetection } from './hooks/useEllipsisDetection';
|