@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
package/Paper/index.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
5
|
+
|
|
6
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .paper{align-content:flex-start;display:flex;width:100%}[data-gene-ui-version=\"2.12.2\"] .paper:not(.bg-transparent){background:var(--background)}[data-gene-ui-version=\"2.12.2\"] .paper.with-shadow{box-shadow:0 .3rem .6rem 0 #0000000d}[data-gene-ui-version=\"2.12.2\"] .paper.top-radius{border-radius:2rem 2rem 0 0}[data-gene-ui-version=\"2.12.2\"] .paper.bottom-radius{border-radius:0 0 2rem 2rem}[data-gene-ui-version=\"2.12.2\"] .paper.full-radius{border-radius:2rem}[data-gene-ui-version=\"2.12.2\"] .paper.with-border{border:1px solid rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.12.2\"] .pd-row{flex-direction:row}[data-gene-ui-version=\"2.12.2\"] .pd-row-reverse{flex-direction:row-reverse}[data-gene-ui-version=\"2.12.2\"] .pd-column{flex-direction:column}[data-gene-ui-version=\"2.12.2\"] .pd-column-reverse{flex-direction:column-reverse}[data-gene-ui-version=\"2.12.2\"] .pw-nowrap{flex-wrap:nowrap}[data-gene-ui-version=\"2.12.2\"] .pw-wrap{flex-wrap:wrap}[data-gene-ui-version=\"2.12.2\"] .pw-wrap-reverse{flex-wrap:wrap-reverse}[data-gene-ui-version=\"2.12.2\"] .jc-paper-start{justify-content:flex-start}[data-gene-ui-version=\"2.12.2\"] .jc-paper-end{justify-content:flex-end}[data-gene-ui-version=\"2.12.2\"] .jc-center{justify-content:center}[data-gene-ui-version=\"2.12.2\"] .jc-start{justify-content:start}[data-gene-ui-version=\"2.12.2\"] .jc-end{justify-content:end}[data-gene-ui-version=\"2.12.2\"] .jc-left{justify-content:left}[data-gene-ui-version=\"2.12.2\"] .jc-right{justify-content:right}[data-gene-ui-version=\"2.12.2\"] .jc-normal{justify-content:normal}[data-gene-ui-version=\"2.12.2\"] .jc-space-between{justify-content:space-between}[data-gene-ui-version=\"2.12.2\"] .jc-space-around{justify-content:space-around}[data-gene-ui-version=\"2.12.2\"] .jc-space-evenly{justify-content:space-evenly}[data-gene-ui-version=\"2.12.2\"] .jc-stretch{justify-content:stretch}[data-gene-ui-version=\"2.12.2\"] .jc-inherit{justify-content:inherit}[data-gene-ui-version=\"2.12.2\"] .jc-initial{justify-content:normal}[data-gene-ui-version=\"2.12.2\"] .jc-unset{justify-content:unset}[data-gene-ui-version=\"2.12.2\"] .ai-normal{align-items:normal}[data-gene-ui-version=\"2.12.2\"] .ai-stretch{align-items:stretch}[data-gene-ui-version=\"2.12.2\"] .ai-center{align-items:center}[data-gene-ui-version=\"2.12.2\"] .ai-start{align-items:start}[data-gene-ui-version=\"2.12.2\"] .ai-end{align-items:end}[data-gene-ui-version=\"2.12.2\"] .ai-paper-start{align-items:flex-start}[data-gene-ui-version=\"2.12.2\"] .ai-paper-end{align-items:flex-end}[data-gene-ui-version=\"2.12.2\"] .ai-self-start{align-items:self-start}[data-gene-ui-version=\"2.12.2\"] .ai-self-end{align-items:self-end}[data-gene-ui-version=\"2.12.2\"] .ai-baseline{align-items:baseline}[data-gene-ui-version=\"2.12.2\"] .ai-inherit{align-items:inherit}[data-gene-ui-version=\"2.12.2\"] .ai-initial{align-items:normal}[data-gene-ui-version=\"2.12.2\"] .ai-unset{align-items:unset}";
|
|
7
|
+
styleInject(css_248z);
|
|
8
|
+
|
|
9
|
+
const paperDirections = ['row', 'row-reverse', 'column', 'column-reverse'];
|
|
10
|
+
const paperWraps = ['nowrap', 'wrap', 'wrap-reverse'];
|
|
11
|
+
const justifyContents = ['paper-start', 'paper-end', 'center', 'start', 'end', 'left', 'right', 'normal', 'space-between', 'space-around', 'space-evenly', 'stretch', 'inherit', 'initial', 'unset'];
|
|
12
|
+
const alignItems = ['stretch', 'normal', 'center', 'start', 'end', 'paper-start', 'paper-end', 'self-start', 'self-end', 'baseline', 'inherit', 'initial', 'unset'];
|
|
13
|
+
const cornersRadius = ['none', 'top-radius', 'bottom-radius', 'full-radius'];
|
|
14
|
+
const Paper = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
15
|
+
let {
|
|
16
|
+
padding,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
paperDirection,
|
|
20
|
+
paperWrap,
|
|
21
|
+
justifyContent,
|
|
22
|
+
alignItems,
|
|
23
|
+
cornerRadius,
|
|
24
|
+
shadow,
|
|
25
|
+
border,
|
|
26
|
+
isTransparent,
|
|
27
|
+
...restProps
|
|
28
|
+
} = _ref;
|
|
29
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
30
|
+
ref: ref,
|
|
31
|
+
className: "paper bg-".concat(isTransparent ? 'transparent' : 'color', "\n ").concat(border ? 'with-border' : '', "\n ").concat(className, "\n pd-").concat(paperDirection, "\n pw-").concat(paperWrap, "\n jc-").concat(justifyContent, "\n ai-").concat(alignItems, "\n ").concat(cornerRadius, "\n ").concat(shadow ? 'with-shadow' : ''),
|
|
32
|
+
style: {
|
|
33
|
+
padding: typeof padding === 'number' ? "".concat(padding / 10, "rem") : padding
|
|
34
|
+
}
|
|
35
|
+
}, restProps), children);
|
|
36
|
+
});
|
|
37
|
+
Paper.propTypes = {
|
|
38
|
+
/**
|
|
39
|
+
* Paper padding. Any padding value valid in css
|
|
40
|
+
*/
|
|
41
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
42
|
+
/**
|
|
43
|
+
* Additional className
|
|
44
|
+
*/
|
|
45
|
+
className: PropTypes.string,
|
|
46
|
+
/**
|
|
47
|
+
* Wrapping with paper anything passed as child. Any valid React node
|
|
48
|
+
*/
|
|
49
|
+
children: PropTypes.node,
|
|
50
|
+
/**
|
|
51
|
+
* Paper direction
|
|
52
|
+
*/
|
|
53
|
+
paperDirection: PropTypes.oneOf(paperDirections),
|
|
54
|
+
/**
|
|
55
|
+
* Paper wrapping
|
|
56
|
+
*/
|
|
57
|
+
paperWrap: PropTypes.oneOf(paperWraps),
|
|
58
|
+
/**
|
|
59
|
+
* Paper justify content
|
|
60
|
+
*/
|
|
61
|
+
justifyContent: PropTypes.oneOf(justifyContents),
|
|
62
|
+
/**
|
|
63
|
+
* Paper align items
|
|
64
|
+
*/
|
|
65
|
+
alignItems: PropTypes.oneOf(alignItems),
|
|
66
|
+
/**
|
|
67
|
+
* Paper corner radius
|
|
68
|
+
*/
|
|
69
|
+
cornerRadius: PropTypes.oneOf(cornersRadius),
|
|
70
|
+
/**
|
|
71
|
+
* Will add transparency to the Paper when set to "true"
|
|
72
|
+
*/
|
|
73
|
+
isTransparent: PropTypes.bool,
|
|
74
|
+
/**
|
|
75
|
+
* Will add borders to the Paper when set to "true"
|
|
76
|
+
*/
|
|
77
|
+
border: PropTypes.bool,
|
|
78
|
+
/**
|
|
79
|
+
* Will add shadow to the Paper when set to "true"
|
|
80
|
+
*/
|
|
81
|
+
shadow: PropTypes.bool
|
|
82
|
+
};
|
|
83
|
+
Paper.defaultProps = {
|
|
84
|
+
padding: 0,
|
|
85
|
+
className: '',
|
|
86
|
+
paperDirection: paperDirections[0],
|
|
87
|
+
paperWrap: paperWraps[0],
|
|
88
|
+
justifyContent: justifyContents[0],
|
|
89
|
+
alignItems: alignItems[0],
|
|
90
|
+
cornerRadius: cornersRadius[0],
|
|
91
|
+
shadow: false,
|
|
92
|
+
border: false,
|
|
93
|
+
isTransparent: false
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export { alignItems, cornersRadius, Paper as default, justifyContents, paperDirections, paperWraps };
|
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
2
|
-
import React__default, {
|
|
3
|
-
import { _ as _default } from '
|
|
4
|
-
import { u as useSwipeable } from '
|
|
5
|
-
import { c as classnames } from '
|
|
6
|
-
import
|
|
7
|
-
import { n as noop, s as stopEvent } from '
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import '
|
|
14
|
-
import { s as styleInject } from '
|
|
15
|
-
import { g as guid } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { forwardRef, useRef, useState, useContext, useCallback, useMemo, Children, useEffect } from 'react';
|
|
3
|
+
import { _ as _default } from '../Popover-f4d1cac0.js';
|
|
4
|
+
import { u as useSwipeable } from '../index-122432cd.js';
|
|
5
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { n as noop, s as stopEvent } from '../index-a0e4e333.js';
|
|
8
|
+
import useDeviceType from '../hooks/useDeviceType.js';
|
|
9
|
+
import useUpdatableRef from '../hooks/useUpdatableRef.js';
|
|
10
|
+
import { e as popoverConfig, s as screenTypes } from '../configs-fed6ac34.js';
|
|
11
|
+
import { GeneUIDesignSystemContext } from '../GeneUIProvider/index.js';
|
|
12
|
+
import Portal from '../Portal/index.js';
|
|
13
|
+
import CustomScrollbar from '../Scrollbar/index.js';
|
|
14
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
15
|
+
import { g as guid } from '../guid-8ddf77b3.js';
|
|
16
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
17
|
+
import 'react-dom';
|
|
18
|
+
import '../dateValidation-67caec66.js';
|
|
19
|
+
import '../hooks/useWindowSize.js';
|
|
20
|
+
import '../hooks/useForceUpdate.js';
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
|
|
19
|
-
return forceUpdate;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const useUpdatableRef = initial => {
|
|
23
|
-
const ref = useRef(initial);
|
|
24
|
-
const forceUpdate = useForceUpdate();
|
|
25
|
-
const update = useCallback(value => {
|
|
26
|
-
if (ref.current !== value) forceUpdate();
|
|
27
|
-
ref.current = value;
|
|
28
|
-
}, []);
|
|
29
|
-
return [ref, update];
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var css_248z = "[data-gene-ui-version=\"1.0.0\"] .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=\"1.0.0\"] .popover-positioner.cr-smooth-radius{--popover-border-radius:0.4rem}[data-gene-ui-version=\"1.0.0\"] .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;width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-positioner .popover-top-bottom-padding{padding:1rem 0;width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-positioner .popover-top-bottom-padding>div[style*=width]{width:100%!important}[data-gene-ui-version=\"1.0.0\"] .popover{width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.mobile-view .popover{height:100%;position:relative}[data-gene-ui-version=\"1.0.0\"] .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=\"1.0.0\"] .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=\"1.0.0\"] .popover-positioner.mobile-view[style*=\"opacity: 0\"] .popover-content{transform:translateY(100%)}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.mobile-view .popover-content{transform:translateY(0)}[data-gene-ui-version=\"1.0.0\"] .fullHeight{height:100%}[data-gene-ui-version=\"1.0.0\"] .popover-mobile-backdrop{background:#0003;height:100%;left:0;opacity:1;position:absolute;top:0;width:100%;z-index:0}[data-gene-ui-version=\"1.0.0\"] .popover-footer,[data-gene-ui-version=\"1.0.0\"] .popover-header{background:var(--background);position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"1.0.0\"] .popover-header{border-bottom:1px solid rgba(var(--background-sc-rgb),.1);top:0}[data-gene-ui-version=\"1.0.0\"] .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=\"1.0.0\"] .popover-body{position:relative;z-index:0}[data-gene-ui-version=\"1.0.0\"] .popover-search{padding:1.4rem 1.5rem}[data-gene-ui-version=\"1.0.0\"] .empty-data-holder{align-items:center;display:flex;height:19rem;justify-content:center;width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-disabled{opacity:.5;pointer-events:none;transition:opacity .5s}";
|
|
22
|
+
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;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-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\"] .fullHeight{height:100%}[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}";
|
|
33
23
|
styleInject(css_248z);
|
|
34
24
|
|
|
35
25
|
const setRef = (ref, currentRef) => {
|
|
@@ -207,106 +197,106 @@ Popover.propTypes = {
|
|
|
207
197
|
/**
|
|
208
198
|
* The component that need to be displayed in the Popover. Any valid React node
|
|
209
199
|
*/
|
|
210
|
-
Content:
|
|
200
|
+
Content: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
211
201
|
/**
|
|
212
202
|
* The component that need to be displayed as Popover header. Any valid React node
|
|
213
203
|
*/
|
|
214
|
-
Header:
|
|
204
|
+
Header: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
215
205
|
/**
|
|
216
206
|
* The component that need to be displayed as Popover footer. Any valid React node
|
|
217
207
|
*/
|
|
218
|
-
Footer:
|
|
208
|
+
Footer: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
219
209
|
/**
|
|
220
210
|
* The component which click needs to trigger the Popover to open. Need to passed as child to Popover. Any valid React node
|
|
221
211
|
*/
|
|
222
|
-
children:
|
|
212
|
+
children: PropTypes.node,
|
|
223
213
|
/**
|
|
224
214
|
* The Popover will get the width of its child. The property will not work when "width" prop is specified
|
|
225
215
|
*/
|
|
226
|
-
extendTargetWidth:
|
|
216
|
+
extendTargetWidth: PropTypes.bool,
|
|
227
217
|
/**
|
|
228
218
|
* The Popover "Content" minimum scroll height
|
|
229
219
|
*/
|
|
230
|
-
minHeight:
|
|
220
|
+
minHeight: PropTypes.number,
|
|
231
221
|
/**
|
|
232
222
|
* The Popover "Content" maximum scroll height. Will not work when the "screenType" is "mobile"
|
|
233
223
|
*/
|
|
234
|
-
maxHeight:
|
|
224
|
+
maxHeight: PropTypes.number,
|
|
235
225
|
/**
|
|
236
226
|
* Use this prop to control the Popover. Note the component will start not to open and close automatically
|
|
237
227
|
*/
|
|
238
|
-
isOpen:
|
|
228
|
+
isOpen: PropTypes.bool,
|
|
239
229
|
/**
|
|
240
230
|
* Popover position to be displayed
|
|
241
231
|
*/
|
|
242
|
-
position:
|
|
232
|
+
position: PropTypes.oneOfType([PropTypes.oneOf(popoverConfig.position), PropTypes.arrayOf(PropTypes.oneOf(popoverConfig.position))]),
|
|
243
233
|
/**
|
|
244
234
|
* Will called each time the popover need to be toggled(child click, close button click, backdrop click).
|
|
245
235
|
* (event: Event, isOpen: bool) => void
|
|
246
236
|
*/
|
|
247
|
-
toggleHandler:
|
|
237
|
+
toggleHandler: PropTypes.func,
|
|
248
238
|
/**
|
|
249
239
|
* Possible values are start, center, and end.
|
|
250
240
|
* If start is specified, the popover content's top or left location is aligned with its target's.
|
|
251
241
|
* With end specified, the content's bottom or right location is aligned with its target's.
|
|
252
242
|
* If center is specified, the popover content and target's centers are aligned.
|
|
253
243
|
*/
|
|
254
|
-
align:
|
|
244
|
+
align: PropTypes.oneOf(popoverConfig.align),
|
|
255
245
|
/**
|
|
256
246
|
* If you'd like to apply styles to the single container div that your popover content is rendered within via stylesheets,
|
|
257
247
|
* you can specify a custom className for the container here.
|
|
258
248
|
*/
|
|
259
|
-
className:
|
|
249
|
+
className: PropTypes.string,
|
|
260
250
|
/**
|
|
261
251
|
* This number determines the gap, in pixels, between your target content and your popover content
|
|
262
252
|
*/
|
|
263
|
-
padding:
|
|
253
|
+
padding: PropTypes.number,
|
|
264
254
|
/**
|
|
265
255
|
* If this property is enabled, rather than the popover content repositioning on a boundary collision,
|
|
266
256
|
* the popover content container will move beyond the window's bounds.
|
|
267
257
|
* You are, however, supplied with nudgedLeft and nudgedTop values, so you may choose to handle content overflow as you wish.
|
|
268
258
|
*/
|
|
269
|
-
disableReposition:
|
|
259
|
+
disableReposition: PropTypes.bool,
|
|
270
260
|
/**
|
|
271
261
|
* Popover corner radius
|
|
272
262
|
*/
|
|
273
|
-
cornerRadius:
|
|
263
|
+
cornerRadius: PropTypes.oneOf(popoverConfig.cornerRadius),
|
|
274
264
|
/**
|
|
275
265
|
* The switch between mobile and desktop version of Popover will be applied automatically, when the prop is not specified.
|
|
276
266
|
* When the prop is present it must be changed from outside.
|
|
277
267
|
*/
|
|
278
|
-
screenType:
|
|
268
|
+
screenType: PropTypes.oneOf(screenTypes),
|
|
279
269
|
/**
|
|
280
270
|
* Specify does Popover needs to be toggled on child click
|
|
281
271
|
*/
|
|
282
|
-
behave:
|
|
272
|
+
behave: PropTypes.oneOf(popoverConfig.behave),
|
|
283
273
|
/**
|
|
284
274
|
* Given content prop can have its own scroll, and with this props we can use/not use default scroll that has popover
|
|
285
275
|
*/
|
|
286
|
-
scrollbarNeeded:
|
|
276
|
+
scrollbarNeeded: PropTypes.bool,
|
|
287
277
|
/**
|
|
288
278
|
* Popover content ref
|
|
289
279
|
*/
|
|
290
|
-
contentRef:
|
|
291
|
-
current:
|
|
280
|
+
contentRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
281
|
+
current: PropTypes.any
|
|
292
282
|
})]),
|
|
293
|
-
disabled:
|
|
294
|
-
getScrollRef:
|
|
283
|
+
disabled: PropTypes.bool,
|
|
284
|
+
getScrollRef: PropTypes.func,
|
|
295
285
|
/*
|
|
296
286
|
* After DOWN swipe (SwipeEventData) => void
|
|
297
287
|
*/
|
|
298
|
-
onSwipedDown:
|
|
288
|
+
onSwipedDown: PropTypes.func,
|
|
299
289
|
/*
|
|
300
290
|
* props for scrollbar
|
|
301
291
|
*/
|
|
302
|
-
scrollbarProps:
|
|
292
|
+
scrollbarProps: PropTypes.shape({
|
|
303
293
|
...CustomScrollbar.propTypes
|
|
304
294
|
}),
|
|
305
295
|
/*
|
|
306
296
|
* Popup content opens with full height. Mobile only property.
|
|
307
297
|
*/
|
|
308
|
-
fullHeight:
|
|
309
|
-
swipeable:
|
|
298
|
+
fullHeight: PropTypes.bool,
|
|
299
|
+
swipeable: PropTypes.bool
|
|
310
300
|
};
|
|
311
301
|
Popover.defaultProps = {
|
|
312
302
|
cornerRadius: popoverConfig.cornerRadius[0],
|
|
@@ -326,4 +316,4 @@ Popover.defaultProps = {
|
|
|
326
316
|
onSwipedDown: noop
|
|
327
317
|
};
|
|
328
318
|
|
|
329
|
-
export { Popover as
|
|
319
|
+
export { Popover as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
export { P as default } from '../index-462461c0.js';
|
|
4
|
+
import '../index-122432cd.js';
|
|
5
|
+
import '../index-6ff23041.js';
|
|
6
|
+
import 'prop-types';
|
|
7
|
+
import '../index-a0e4e333.js';
|
|
8
|
+
import '../hooks/useDeviceType.js';
|
|
9
|
+
import '../hooks/useClickOutside.js';
|
|
10
|
+
import '../configs-fed6ac34.js';
|
|
11
|
+
import '../Scrollbar/index.js';
|
|
12
|
+
import '../GeneUIProvider/index.js';
|
|
13
|
+
import '../debounce-4419bc2f.js';
|
|
14
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
15
|
+
import 'react-dom';
|
|
16
|
+
import '../style-inject.es-746bb8ed.js';
|
|
17
|
+
import '../dateValidation-67caec66.js';
|
|
18
|
+
import '../hooks/useWindowSize.js';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { memo, useState, useContext, useEffect } from 'react';
|
|
2
2
|
import ReactDOM__default from 'react-dom';
|
|
3
|
-
import
|
|
4
|
-
import '
|
|
5
|
-
import
|
|
6
|
-
import './style-inject.es-746bb8ed.js';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { GeneUIDesignSystemContext } from '../GeneUIProvider/index.js';
|
|
5
|
+
import '../style-inject.es-746bb8ed.js';
|
|
7
6
|
|
|
8
7
|
function Portal(_ref) {
|
|
9
8
|
let {
|
|
@@ -36,19 +35,19 @@ Portal.propTypes = {
|
|
|
36
35
|
/**
|
|
37
36
|
* Specify Portal visibility
|
|
38
37
|
*/
|
|
39
|
-
isOpen:
|
|
38
|
+
isOpen: PropTypes.bool,
|
|
40
39
|
/**
|
|
41
40
|
* A DOM element for Portal to be appended. When not specified the Portal will create a "div" element and append in body
|
|
42
41
|
*/
|
|
43
|
-
container:
|
|
42
|
+
container: PropTypes.instanceOf(Element),
|
|
44
43
|
/**
|
|
45
44
|
* Additional className
|
|
46
45
|
*/
|
|
47
|
-
className:
|
|
46
|
+
className: PropTypes.string,
|
|
48
47
|
/**
|
|
49
48
|
* Anything passed to the Portal as child will be rendered in "container". Any valid React node
|
|
50
49
|
*/
|
|
51
|
-
children:
|
|
50
|
+
children: PropTypes.node
|
|
52
51
|
};
|
|
53
52
|
Portal.defaultProps = {
|
|
54
53
|
isOpen: false
|
|
@@ -1,19 +1,18 @@
|
|
|
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 { s as screenTypes } from '
|
|
6
|
-
import '
|
|
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 '../dateValidation-67caec66.js';
|
|
7
7
|
import 'react-dom';
|
|
8
|
-
import
|
|
9
|
-
import Icon from '
|
|
10
|
-
import Divider from '
|
|
11
|
-
import { s as styleInject } from '
|
|
12
|
-
import '
|
|
13
|
-
import '
|
|
14
|
-
import './globalStyling-9c60a159.js';
|
|
8
|
+
import useDeviceType from '../hooks/useDeviceType.js';
|
|
9
|
+
import Icon from '../Icon/index.js';
|
|
10
|
+
import Divider from '../Divider/index.js';
|
|
11
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
12
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
13
|
+
import '../hooks/useWindowSize.js';
|
|
15
14
|
|
|
16
|
-
var css_248z = "[data-gene-ui-version=\"
|
|
15
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .products-switcher-holder{display:flex;flex-wrap:wrap;justify-content:flex-start;padding:.5rem 2rem;text-align:center;width:100%}[data-gene-ui-version=\"2.12.2\"] .products-switcher-holder .divider{margin-left:auto;margin-right:auto}[data-gene-ui-version=\"2.12.2\"] .product-item{border:1px solid #0000;border-radius:1rem;cursor:pointer;display:flex;flex-wrap:wrap;font:600 1.2rem/1.42 var(--font-family);justify-content:center;margin:.5rem 0;padding:1rem .5rem;text-align:center;width:33.3333333333%}[data-gene-ui-version=\"2.12.2\"] .product-item .icon{align-items:center;background:rgba(var(--background-sc-rgb),.05);border-radius:100%;display:flex;height:5rem;justify-content:center;margin:0 0 .5rem;transition:color .2s,background .2s;width:5rem}[data-gene-ui-version=\"2.12.2\"] .product-item p{width:100%}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .product-item:hover .icon{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.12.2\"] .product-item.active .icon{background:var(--hero);color:var(--hero-sc)}[data-gene-ui-version=\"2.12.2\"] .product-item.active{pointer-events:none}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .product-item:hover{border-color:rgba(var(--background-sc-rgb),.11)}}";
|
|
17
16
|
styleInject(css_248z);
|
|
18
17
|
|
|
19
18
|
function Products(_ref) {
|
|
@@ -68,19 +67,19 @@ function Products(_ref) {
|
|
|
68
67
|
className: "ellipsis-text"
|
|
69
68
|
}, item.title))));
|
|
70
69
|
}
|
|
71
|
-
const propShape =
|
|
70
|
+
const propShape = PropTypes.arrayOf(PropTypes.shape({
|
|
72
71
|
/**
|
|
73
72
|
* Product title
|
|
74
73
|
*/
|
|
75
|
-
title:
|
|
74
|
+
title: PropTypes.string,
|
|
76
75
|
/**
|
|
77
76
|
* Product slug
|
|
78
77
|
*/
|
|
79
|
-
slug:
|
|
78
|
+
slug: PropTypes.string,
|
|
80
79
|
/**
|
|
81
80
|
* Product icon
|
|
82
81
|
*/
|
|
83
|
-
icon:
|
|
82
|
+
icon: PropTypes.string
|
|
84
83
|
}));
|
|
85
84
|
Products.propTypes = {
|
|
86
85
|
/**
|
|
@@ -94,19 +93,19 @@ Products.propTypes = {
|
|
|
94
93
|
/**
|
|
95
94
|
* Selected item
|
|
96
95
|
*/
|
|
97
|
-
activeSlug:
|
|
96
|
+
activeSlug: PropTypes.string,
|
|
98
97
|
/**
|
|
99
98
|
* CSS class name for element
|
|
100
99
|
*/
|
|
101
|
-
className:
|
|
100
|
+
className: PropTypes.string,
|
|
102
101
|
/**
|
|
103
102
|
* Callback fires when click on product
|
|
104
103
|
*/
|
|
105
|
-
onClick:
|
|
104
|
+
onClick: PropTypes.func,
|
|
106
105
|
/**
|
|
107
106
|
* Pass screenType to control appearance, weather it should be mobile version etc.
|
|
108
107
|
*/
|
|
109
|
-
screenType:
|
|
108
|
+
screenType: PropTypes.oneOf(screenTypes)
|
|
110
109
|
};
|
|
111
110
|
Products.defaultProps = {
|
|
112
111
|
favorites: []
|