@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
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { d as moduleTitleConfig } from '../configs-fed6ac34.js';
|
|
6
|
+
import { n as noop } from '../index-a0e4e333.js';
|
|
7
|
+
import Icon from '../Icon/index.js';
|
|
8
|
+
import Tooltip from '../Tooltip/index.js';
|
|
9
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
10
|
+
import '../dateValidation-67caec66.js';
|
|
11
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import '../Popover-f4d1cac0.js';
|
|
14
|
+
import '../hooks/useDeviceType.js';
|
|
15
|
+
import '../hooks/useWindowSize.js';
|
|
16
|
+
import '../GeneUIProvider/index.js';
|
|
17
|
+
|
|
18
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .module-header{background:var(--background);display:flex;flex-shrink:0;height:5rem;padding:0 .5rem 0 2rem;width:100%}html[dir=rtl] .module-header{padding:0 2rem 0 .5rem}[data-gene-ui-version=\"2.12.1\"] .module-header.headerBorder.p-top{border-bottom:1px solid rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.12.1\"] .module-header.headerBorder.p-top.cr-position-radius{border-radius:2rem 2rem 0 0}[data-gene-ui-version=\"2.12.1\"] .module-header.headerBorder.p-bottom{border-top:1px solid rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.12.1\"] .module-header.headerBorder.p-bottom.cr-position-radius{border-radius:0 0 2rem 2rem}[data-gene-ui-version=\"2.12.1\"] .module-header.cr-full-radius{border-radius:2rem}[data-gene-ui-version=\"2.12.1\"] .module-header>li{align-items:center;display:flex}[data-gene-ui-version=\"2.12.1\"] .module-header>li.left-content{flex:auto;overflow:hidden;position:relative}[data-gene-ui-version=\"2.12.1\"] .module-header>li.left-content .left-inner{max-width:100%}[data-gene-ui-version=\"2.12.1\"] .module-header>li.left-content .left-inner:nth-last-child(2){max-width:calc(100% - 3.2rem)}[data-gene-ui-version=\"2.12.1\"] .module-header>li.left-content .left-inner-icon{margin-inline-start:.8rem}[data-gene-ui-version=\"2.12.1\"] .module-header>li.right-content{flex-shrink:0}[data-gene-ui-version=\"2.12.1\"] .module-header.s-small{height:3rem}[data-gene-ui-version=\"2.12.1\"] .module-header.s-small .module-description-title .m-title,[data-gene-ui-version=\"2.12.1\"] .module-header.s-small .module-title{font-size:1.2rem;line-height:normal}[data-gene-ui-version=\"2.12.1\"] .module-header.s-medium{height:4rem}[data-gene-ui-version=\"2.12.1\"] .module-header.s-extra-big{height:6rem}[data-gene-ui-version=\"2.12.1\"] .module-title{font:600 1.4rem/1.8rem var(--font-family)}[data-gene-ui-version=\"2.12.1\"] .module-title:before{background:var(--hero);content:\"\";display:block;height:.3rem;position:absolute;width:3.4rem}html:not([dir=rtl]) .module-title:before{left:0}html[dir=rtl] .module-title:before{right:0}[data-gene-ui-version=\"2.12.1\"] .p-top .module-title:before{bottom:0}[data-gene-ui-version=\"2.12.1\"] .p-bottom .module-title:before{top:0}[data-gene-ui-version=\"2.12.1\"] .module-title-without-border{font:600 1.4rem/1.8rem var(--font-family)}[data-gene-ui-version=\"2.12.1\"] .module-description-title{width:100%}[data-gene-ui-version=\"2.12.1\"] .module-description-title .m-description{font:600 1.2rem/1.6rem var(--font-family)}[data-gene-ui-version=\"2.12.1\"] .module-description-title .m-title{font:600 1.6rem/2.8rem var(--font-family)}";
|
|
19
|
+
styleInject(css_248z);
|
|
20
|
+
|
|
21
|
+
function IconWithTooltip(_ref) {
|
|
22
|
+
let {
|
|
23
|
+
toolTip,
|
|
24
|
+
children
|
|
25
|
+
} = _ref;
|
|
26
|
+
return toolTip ? /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
27
|
+
title: toolTip
|
|
28
|
+
}, children) : children;
|
|
29
|
+
}
|
|
30
|
+
function ModuleTitle(_ref2) {
|
|
31
|
+
let {
|
|
32
|
+
size,
|
|
33
|
+
title,
|
|
34
|
+
color,
|
|
35
|
+
hideBeforeBorder,
|
|
36
|
+
position,
|
|
37
|
+
children,
|
|
38
|
+
className,
|
|
39
|
+
description,
|
|
40
|
+
cornerRadius,
|
|
41
|
+
headerBorder,
|
|
42
|
+
titleIcon,
|
|
43
|
+
titleIconTooltip,
|
|
44
|
+
onTitleIconClick,
|
|
45
|
+
...restProps
|
|
46
|
+
} = _ref2;
|
|
47
|
+
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
48
|
+
className: classnames('module-header', "cr-".concat(cornerRadius), "p-".concat(position), "s-".concat(size), className, {
|
|
49
|
+
headerBorder
|
|
50
|
+
})
|
|
51
|
+
}, restProps), /*#__PURE__*/React__default.createElement("li", {
|
|
52
|
+
className: "left-content",
|
|
53
|
+
style: {
|
|
54
|
+
'--hero': color || ''
|
|
55
|
+
}
|
|
56
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
57
|
+
className: "left-inner"
|
|
58
|
+
}, description ? /*#__PURE__*/React__default.createElement("div", {
|
|
59
|
+
className: "module-description-title"
|
|
60
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
61
|
+
className: "m-description ellipsis-text"
|
|
62
|
+
}, description), /*#__PURE__*/React__default.createElement("div", {
|
|
63
|
+
className: "m-title ellipsis-text"
|
|
64
|
+
}, title)) : title && /*#__PURE__*/React__default.createElement("div", {
|
|
65
|
+
className: classnames('ellipsis-text', {
|
|
66
|
+
'module-title-without-border': hideBeforeBorder,
|
|
67
|
+
'module-title': !hideBeforeBorder
|
|
68
|
+
}),
|
|
69
|
+
title: typeof title === 'string' ? title : ''
|
|
70
|
+
}, title)), titleIcon && /*#__PURE__*/React__default.createElement(IconWithTooltip, {
|
|
71
|
+
toolTip: titleIconTooltip
|
|
72
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
73
|
+
className: "left-inner-icon"
|
|
74
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
75
|
+
type: titleIcon,
|
|
76
|
+
onClick: onTitleIconClick
|
|
77
|
+
})))), /*#__PURE__*/React__default.createElement("li", {
|
|
78
|
+
className: "right-content"
|
|
79
|
+
}, children));
|
|
80
|
+
}
|
|
81
|
+
ModuleTitle.propTypes = {
|
|
82
|
+
/**
|
|
83
|
+
* Title property. Any valid React node.
|
|
84
|
+
*/
|
|
85
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
86
|
+
/**
|
|
87
|
+
* Additonal description. Any valid React node
|
|
88
|
+
*/
|
|
89
|
+
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
90
|
+
/**
|
|
91
|
+
* ModuleTitle sizing
|
|
92
|
+
*/
|
|
93
|
+
size: PropTypes.oneOf(moduleTitleConfig.size),
|
|
94
|
+
/**
|
|
95
|
+
* Addional className
|
|
96
|
+
*/
|
|
97
|
+
className: PropTypes.string,
|
|
98
|
+
/**
|
|
99
|
+
* Hide border after title
|
|
100
|
+
*/
|
|
101
|
+
hideBeforeBorder: PropTypes.bool,
|
|
102
|
+
/**
|
|
103
|
+
* Hide header main border
|
|
104
|
+
*/
|
|
105
|
+
headerBorder: PropTypes.bool,
|
|
106
|
+
/**
|
|
107
|
+
* ModuleTitle positioning
|
|
108
|
+
*/
|
|
109
|
+
position: PropTypes.oneOf(moduleTitleConfig.position),
|
|
110
|
+
/**
|
|
111
|
+
* ModuleTitle corner radius
|
|
112
|
+
*/
|
|
113
|
+
cornerRadius: PropTypes.oneOf(moduleTitleConfig.cornerRadius),
|
|
114
|
+
/**
|
|
115
|
+
* Module title content can be passed as child. Any valid React node.
|
|
116
|
+
*/
|
|
117
|
+
children: PropTypes.node,
|
|
118
|
+
/**
|
|
119
|
+
* Use this prop to override ModuleTitle's underline color. Will not work when "descroiption" prop is specified
|
|
120
|
+
*/
|
|
121
|
+
color: PropTypes.string,
|
|
122
|
+
/**
|
|
123
|
+
* Will add an "Icon" atom to the left side of ModuleTitle. Valid values are the same as "type" prop for "Icon" atom
|
|
124
|
+
*/
|
|
125
|
+
titleIcon: PropTypes.string,
|
|
126
|
+
/**
|
|
127
|
+
* Tooltip for icon
|
|
128
|
+
*/
|
|
129
|
+
titleIconTooltip: PropTypes.string,
|
|
130
|
+
/**
|
|
131
|
+
* Title Icon onClick event
|
|
132
|
+
*/
|
|
133
|
+
onTitleIconClick: PropTypes.func
|
|
134
|
+
};
|
|
135
|
+
ModuleTitle.defaultProps = {
|
|
136
|
+
onTitleIconClick: noop,
|
|
137
|
+
headerBorder: true,
|
|
138
|
+
size: moduleTitleConfig.size[2],
|
|
139
|
+
position: moduleTitleConfig.position[0],
|
|
140
|
+
cornerRadius: moduleTitleConfig.cornerRadius[0]
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export { ModuleTitle as default };
|
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import React__default, { memo, useState, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { n as noop } from '
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import '
|
|
9
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { n as noop } from '../index-a0e4e333.js';
|
|
4
|
+
import useDeviceType from '../hooks/useDeviceType.js';
|
|
5
|
+
import Icon from '../Icon/index.js';
|
|
6
|
+
import Option from '../Option/index.js';
|
|
7
|
+
import Popover from '../Popover/index.js';
|
|
8
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
9
|
+
import '../dateValidation-67caec66.js';
|
|
10
|
+
import { d as debounce } from '../debounce-4419bc2f.js';
|
|
10
11
|
import 'react-dom';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import '
|
|
20
|
-
import '
|
|
21
|
-
import '
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
24
|
-
import '
|
|
25
|
-
import '
|
|
26
|
-
import '
|
|
12
|
+
import Menu from '../Menu/index.js';
|
|
13
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
14
|
+
import '../configs-fed6ac34.js';
|
|
15
|
+
import '../hooks/useWindowSize.js';
|
|
16
|
+
import '../index-6ff23041.js';
|
|
17
|
+
import '../hooks/useEllipsisDetection.js';
|
|
18
|
+
import '../Tooltip/index.js';
|
|
19
|
+
import '../Popover-f4d1cac0.js';
|
|
20
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
21
|
+
import '../GeneUIProvider/index.js';
|
|
22
|
+
import '../index-122432cd.js';
|
|
23
|
+
import '../hooks/useUpdatableRef.js';
|
|
24
|
+
import '../hooks/useForceUpdate.js';
|
|
25
|
+
import '../Portal/index.js';
|
|
26
|
+
import '../Scrollbar/index.js';
|
|
27
|
+
import '../guid-8ddf77b3.js';
|
|
27
28
|
|
|
28
29
|
const getTitle = (id, data) => {
|
|
29
30
|
if (data) {
|
|
30
31
|
const matchedDatum = data.find(datum => datum.id === id);
|
|
31
|
-
return matchedDatum && matchedDatum.title ? matchedDatum
|
|
32
|
+
return matchedDatum && matchedDatum.title ? matchedDatum : data.map(datum => getTitle(id, datum.data)).filter(Boolean)[0];
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
const getTitlesArray = (ids, data) => ids.map(id => getTitle(id, data)).filter(Boolean);
|
|
35
|
-
const
|
|
36
|
+
const navigationOptionsToMenu = (navigationOptions, optionId) => navigationOptions.map(_ref => {
|
|
36
37
|
let {
|
|
37
38
|
data,
|
|
38
39
|
...rest
|
|
39
40
|
} = _ref;
|
|
40
41
|
return {
|
|
41
42
|
...rest,
|
|
43
|
+
active: (optionId === null || optionId === void 0 ? void 0 : optionId.toString()) === rest.id.toString(),
|
|
42
44
|
...(data ? {
|
|
43
|
-
children:
|
|
45
|
+
children: navigationOptionsToMenu(data, optionId)
|
|
44
46
|
} : {})
|
|
45
47
|
};
|
|
46
48
|
});
|
|
@@ -76,7 +78,7 @@ function NavigationMenuContent(_ref) {
|
|
|
76
78
|
const isHovered = useRef(true);
|
|
77
79
|
const optionId = useMemo(() => splitedValue === null || splitedValue === void 0 ? void 0 : splitedValue[depth], [depth, splitedValue]);
|
|
78
80
|
const isActiveItem = useMemo(() => (activeItem === null || activeItem === void 0 ? void 0 : activeItem.id) && optionId === activeItem.id, [activeItem, optionId]);
|
|
79
|
-
const mobileOptions = useMemo(() => options ?
|
|
81
|
+
const mobileOptions = useMemo(() => options ? navigationOptionsToMenu(options, optionId) : undefined, [options, optionId]);
|
|
80
82
|
const initialIndexStack = useMemo(() => indexStackFromItems([], mobileOptions, optionId), [mobileOptions, activeItem]);
|
|
81
83
|
const {
|
|
82
84
|
isMobile
|
|
@@ -137,7 +139,7 @@ NavigationMenuContent.defaultProps = {
|
|
|
137
139
|
};
|
|
138
140
|
var NavigationMenuContent$1 = /*#__PURE__*/memo(NavigationMenuContent);
|
|
139
141
|
|
|
140
|
-
var css_248z = "[data-gene-ui-version=\"2.
|
|
142
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu{--size:3.6rem;align-items:center;border:1px solid #0000;border-radius:var(--button-external-size,var(--size));color:#fff;cursor:pointer;display:flex;font:600 1.4rem/2rem var(--font-family);justify-content:center;min-height:var(--button-external-size,var(--size));min-width:var(--button-external-size,var(--size));padding:0 1rem;position:relative;transition:color .3s,background .3s,opacity .2s;-webkit-user-select:none;user-select:none}@media (hover:hover){[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu:hover{background:#ffffff1a}}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu.active{background:#ffffff1a}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu:disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_head{align-items:center;display:flex;justify-content:center;pointer-events:none}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_layer{align-items:center;display:flex;margin:0 .8rem;opacity:.7}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_layer.active,[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_layer:last-child{opacity:1}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_content{display:flex;padding:1rem 0}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_content-menu{width:25.8rem}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_content-menu:not(.bc-navigation-menu_content-menu:last-child){border-right:1px solid #0000001a}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_title-wrapper{align-items:center;display:flex;justify-content:center}[data-gene-ui-version=\"2.12.1\"] .bc-navigation-menu_title-wrapper:not(.bc-navigation-menu_title-wrapper:last-child):after{background-color:#fff;content:\"\";display:block;height:2.3rem;margin-inline:.6rem;transform:rotate(15deg);width:1px}";
|
|
141
143
|
styleInject(css_248z);
|
|
142
144
|
|
|
143
145
|
function NavigationMenu(_ref) {
|
|
@@ -148,6 +150,9 @@ function NavigationMenu(_ref) {
|
|
|
148
150
|
disabled
|
|
149
151
|
} = _ref;
|
|
150
152
|
const [isOpen, setIsOpen] = useState(false);
|
|
153
|
+
const {
|
|
154
|
+
isMobile
|
|
155
|
+
} = useDeviceType();
|
|
151
156
|
const splitedValue = useMemo(() => value && value.split('/').filter(Boolean), [value]);
|
|
152
157
|
const title = useMemo(() => getTitlesArray(splitedValue, data), [splitedValue, data]);
|
|
153
158
|
const handleChange = useCallback(function () {
|
|
@@ -165,10 +170,14 @@ function NavigationMenu(_ref) {
|
|
|
165
170
|
disabled: disabled
|
|
166
171
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
167
172
|
className: "bc-navigation-menu_head"
|
|
168
|
-
}, title.map((item, index) => /*#__PURE__*/React__default.createElement("
|
|
173
|
+
}, title.map((item, index) => /*#__PURE__*/React__default.createElement("div", {
|
|
174
|
+
className: "bc-navigation-menu_title-wrapper"
|
|
175
|
+
}, (item === null || item === void 0 ? void 0 : item.icon) && isMobile && /*#__PURE__*/React__default.createElement(Icon, {
|
|
176
|
+
type: item.icon
|
|
177
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
169
178
|
key: index,
|
|
170
179
|
className: "bc-navigation-menu_layer"
|
|
171
|
-
}, item))), /*#__PURE__*/React__default.createElement(Icon, {
|
|
180
|
+
}, item.title)))), /*#__PURE__*/React__default.createElement(Icon, {
|
|
172
181
|
type: "bc-icon-arrow-down"
|
|
173
182
|
})),
|
|
174
183
|
Content: /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -186,24 +195,24 @@ NavigationMenu.propTypes = {
|
|
|
186
195
|
* nested options, send the date to the option in the same structure as the options.
|
|
187
196
|
* example => data={[{ id: 'item_1', title: 'Item 1', isHidden: false, data: [ { id: 'item_1_1', title: 'Item 1.1', isHidden: false } ]}]}
|
|
188
197
|
*/
|
|
189
|
-
data:
|
|
198
|
+
data: PropTypes.arrayOf(PropTypes.shape(Option.propTypes)).isRequired,
|
|
190
199
|
/**
|
|
191
200
|
* For value you need to send id selectable options id,
|
|
192
201
|
* and if you select the nested option, then you need to send the id to the hierarchy.
|
|
193
202
|
* example => 'item_1/item_1_1'
|
|
194
203
|
*/
|
|
195
|
-
value:
|
|
204
|
+
value: PropTypes.string.isRequired,
|
|
196
205
|
/**
|
|
197
206
|
* onChange handler is called by clicking on the option
|
|
198
207
|
* This callback gives you the option you clicked on and its id and
|
|
199
208
|
* if it is nested then the give and parent option id are associated with a forward slash.
|
|
200
209
|
* (id: NavigationMenu.value, item: Option) => void
|
|
201
210
|
*/
|
|
202
|
-
onChange:
|
|
211
|
+
onChange: PropTypes.func,
|
|
203
212
|
/**
|
|
204
213
|
* Disabled status for the navigation menu button
|
|
205
214
|
*/
|
|
206
|
-
disabled:
|
|
215
|
+
disabled: PropTypes.bool
|
|
207
216
|
};
|
|
208
217
|
NavigationMenu.defaultProps = {
|
|
209
218
|
onChange: noop
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { c as classnames } from '
|
|
4
|
-
import
|
|
5
|
-
import '
|
|
3
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import '../dateValidation-67caec66.js';
|
|
6
6
|
import 'react-dom';
|
|
7
|
-
import
|
|
8
|
-
import { s as screenTypes } from '
|
|
9
|
-
import Icon from '
|
|
10
|
-
import '
|
|
11
|
-
import
|
|
12
|
-
import '
|
|
13
|
-
import './useWindowSize-80369d76.js';
|
|
7
|
+
import useDeviceType from '../hooks/useDeviceType.js';
|
|
8
|
+
import { s as screenTypes } from '../configs-fed6ac34.js';
|
|
9
|
+
import Icon from '../Icon/index.js';
|
|
10
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
11
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
12
|
+
import '../hooks/useWindowSize.js';
|
|
14
13
|
|
|
15
|
-
var css_248z = "[data-gene-ui-version=\"2.
|
|
14
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .notifier-block{align-items:flex-start;background:var(--background);border:1px solid rgba(var(--background-sc-rgb),.1);border-radius:1rem;box-shadow:0 .2rem .4rem 0 #0000001a;cursor:pointer;display:flex;height:8.5rem;transition:border-color .3s;width:100%}[data-gene-ui-version=\"2.12.1\"] .notifier-block.mobile-view{border-radius:0;border-width:0 0 1px;box-shadow:none}[data-gene-ui-version=\"2.12.1\"] .notifier-block>li{flex-shrink:0}[data-gene-ui-version=\"2.12.1\"] .notifier-block>li.notifier-icon{align-self:stretch}[data-gene-ui-version=\"2.12.1\"] .notifier-block>li.notifier-content{flex:auto;overflow:hidden;padding:1.2rem 1.4rem;width:10rem}[data-gene-ui-version=\"2.12.1\"] .notifier-block>li.notifier-action{padding:1rem 1.5rem 0 0}html[dir=rtl] .notifier-block>li.notifier-action{padding:1rem 0 0 1.5rem}[data-gene-ui-version=\"2.12.1\"] .notifier-block>li.notifier-action .icon{cursor:pointer}@media (hover:hover){[data-gene-ui-version=\"2.12.1\"] .notifier-block>li.notifier-action .icon:hover{color:var(--hero)}[data-gene-ui-version=\"2.12.1\"] .notifier-block:hover{border-color:var(--hero)}}[data-gene-ui-version=\"2.12.1\"] .notifier-icon{align-items:center;background:rgba(var(--hero-rgb),.28);border-radius:.9rem 0 0 .9rem;color:var(--background);display:flex;font-size:4.2rem;justify-content:center;width:8.5rem}html[dir=rtl] .notifier-icon{border-radius:0 .9rem .9rem 0}[data-gene-ui-version=\"2.12.1\"] .notifier-block.mobile-view .notifier-icon{border-radius:0}[data-gene-ui-version=\"2.12.1\"] .type-clean .notifier-icon{background:none;color:rgba(var(--hero-rgb),.48)}html:not([dir=rtl]) .type-clean .notifier-icon{border-right:1px solid rgba(var(--background-sc-rgb),.1)}html[dir=rtl] .type-clean .notifier-icon{border-left:1px solid rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.12.1\"] .notifier-title{font:600 1.4rem/1.36 var(--font-family);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-gene-ui-version=\"2.12.1\"] .notifier-c-t{margin:.8rem 0 0}[data-gene-ui-version=\"2.12.1\"] .notifier-c-t>ul{display:grid;font:600 1.2rem/1.42 var(--font-family);grid-template-areas:\"c1 c2\";grid-template-columns:auto 1fr}[data-gene-ui-version=\"2.12.1\"] .notifier-c-t>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-gene-ui-version=\"2.12.1\"] .notifier-c-t>ul>li:first-child{grid-area:c1;opacity:.5;width:6.4rem}[data-gene-ui-version=\"2.12.1\"] .notifier-c-t>ul>li:nth-child(2){grid-area:c2}";
|
|
16
15
|
styleInject(css_248z);
|
|
17
16
|
|
|
18
17
|
const notificationTypes = ['default', 'clean'];
|
|
@@ -60,57 +59,57 @@ Notification.propTypes = {
|
|
|
60
59
|
/**
|
|
61
60
|
* Type of the Notification component.
|
|
62
61
|
*/
|
|
63
|
-
type:
|
|
62
|
+
type: PropTypes.oneOf(notificationTypes),
|
|
64
63
|
/**
|
|
65
64
|
* If true displays close button
|
|
66
65
|
*/
|
|
67
|
-
closable:
|
|
66
|
+
closable: PropTypes.bool,
|
|
68
67
|
/**
|
|
69
68
|
* CSS class name for element
|
|
70
69
|
*/
|
|
71
|
-
className:
|
|
70
|
+
className: PropTypes.string,
|
|
72
71
|
/**
|
|
73
72
|
* Fires event when user clicks on close button
|
|
74
73
|
* (event: Event) => void
|
|
75
74
|
*/
|
|
76
|
-
onClose:
|
|
75
|
+
onClose: PropTypes.func,
|
|
77
76
|
/**
|
|
78
77
|
* Custom content form notification
|
|
79
78
|
*/
|
|
80
|
-
content:
|
|
79
|
+
content: PropTypes.element,
|
|
81
80
|
/**
|
|
82
81
|
* Fires when user click on notification modal
|
|
83
82
|
* (event: Event) => void
|
|
84
83
|
*/
|
|
85
|
-
onContentClick:
|
|
84
|
+
onContentClick: PropTypes.func,
|
|
86
85
|
/**
|
|
87
86
|
* Heading text for notification modal
|
|
88
87
|
*/
|
|
89
|
-
heading:
|
|
88
|
+
heading: PropTypes.string,
|
|
90
89
|
/**
|
|
91
90
|
* Descriptions text fro notification
|
|
92
91
|
*/
|
|
93
|
-
description:
|
|
92
|
+
description: PropTypes.string,
|
|
94
93
|
/**
|
|
95
94
|
* Controls screen type
|
|
96
95
|
*/
|
|
97
|
-
screenType:
|
|
96
|
+
screenType: PropTypes.oneOf(screenTypes),
|
|
98
97
|
/**
|
|
99
98
|
* Additional heading text for notification
|
|
100
99
|
*/
|
|
101
|
-
additionalHeading:
|
|
100
|
+
additionalHeading: PropTypes.string,
|
|
102
101
|
/**
|
|
103
102
|
* Notification icon
|
|
104
103
|
*/
|
|
105
|
-
notificationIcon:
|
|
104
|
+
notificationIcon: PropTypes.string.isRequired,
|
|
106
105
|
/**
|
|
107
106
|
* Additional info for notification
|
|
108
107
|
*/
|
|
109
|
-
additionalDescription:
|
|
108
|
+
additionalDescription: PropTypes.string,
|
|
110
109
|
/**
|
|
111
110
|
* Title for notification
|
|
112
111
|
*/
|
|
113
|
-
title:
|
|
112
|
+
title: PropTypes.string.isRequired
|
|
114
113
|
};
|
|
115
114
|
Notification.defaultProps = {
|
|
116
115
|
type: notificationTypes[0],
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { useRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { c as classnames } from '
|
|
5
|
-
import { o as optionConfig, s as screenTypes } from '
|
|
6
|
-
import '
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { o as optionConfig, s as screenTypes } from '../configs-fed6ac34.js';
|
|
6
|
+
import '../dateValidation-67caec66.js';
|
|
7
7
|
import 'react-dom';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import '
|
|
13
|
-
import
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import './GeneUIProvider.js';
|
|
8
|
+
import useDeviceType from '../hooks/useDeviceType.js';
|
|
9
|
+
import useEllipsisDetection from '../hooks/useEllipsisDetection.js';
|
|
10
|
+
import Icon from '../Icon/index.js';
|
|
11
|
+
import Tooltip from '../Tooltip/index.js';
|
|
12
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
13
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
14
|
+
import '../hooks/useWindowSize.js';
|
|
15
|
+
import '../Popover-f4d1cac0.js';
|
|
16
|
+
import '../index-a0e4e333.js';
|
|
17
|
+
import '../GeneUIProvider/index.js';
|
|
19
18
|
|
|
20
|
-
var css_248z = "[data-gene-ui-version=\"2.
|
|
19
|
+
var css_248z = "[data-gene-ui-version=\"2.12.1\"] .option-container{align-items:center;cursor:pointer;display:flex;min-height:4rem;overflow:hidden;padding:0 1.4rem;position:relative;transition:background .4s;-webkit-user-select:none;user-select:none;width:100%;z-index:0}[data-gene-ui-version=\"2.12.1\"] .option-container>*{transition:color .4s}[data-gene-ui-version=\"2.12.1\"] .option-container.mobile-view{min-height:4.8rem;padding:0 2rem}[data-gene-ui-version=\"2.12.1\"] .option-container.border-top{border-top:1px solid}[data-gene-ui-version=\"2.12.1\"] .option-container.border-bottom{border-bottom:1px solid}[data-gene-ui-version=\"2.12.1\"] .option-container.border-bottom,[data-gene-ui-version=\"2.12.1\"] .option-container.border-top{border-color:rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.12.1\"] .option-container.sticky-bottom,[data-gene-ui-version=\"2.12.1\"] .option-container.sticky-top{position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"2.12.1\"] .option-container.sticky-top{top:0}[data-gene-ui-version=\"2.12.1\"] .option-container.sticky-bottom{bottom:0}@media (hover:hover){[data-gene-ui-version=\"2.12.1\"] .option-container.hovered:hover,[data-gene-ui-version=\"2.12.1\"] .option-container:hover:hover{background:rgba(var(--background-sc-rgb),.05)}}[data-gene-ui-version=\"2.12.1\"] .option-container.hovered{background:rgba(var(--background-sc-rgb),.05)}[data-gene-ui-version=\"2.12.1\"] .option-container.active,[data-gene-ui-version=\"2.12.1\"] .option-container.c-hero{color:var(--hero)}[data-gene-ui-version=\"2.12.1\"] .option-container.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.12.1\"] .option-container a{display:block;line-height:4rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-gene-ui-version=\"2.12.1\"] .option-container a.active~*{color:var(--hero)}[data-gene-ui-version=\"2.12.1\"] .option-container-relative{position:relative}[data-gene-ui-version=\"2.12.1\"] .option-left-elements{align-items:center;display:flex;flex-shrink:0;justify-content:center;margin-inline-end:1.2rem;min-height:2.4rem;min-width:2.4rem}[data-gene-ui-version=\"2.12.1\"] .option-right-elements{flex-shrink:0;margin-inline-start:1.2rem}[data-gene-ui-version=\"2.12.1\"] .option-right-elements .bc-icon-selected{transition:transform .4s}[data-gene-ui-version=\"2.12.1\"] .option-container:not(.mobile-view) .option-right-elements .bc-icon-selected{margin-inline-end:-.4rem}[data-gene-ui-version=\"2.12.1\"] .option-container:not(.active) .option-right-elements .bc-icon-selected{transform:scale(0)}[data-gene-ui-version=\"2.12.1\"] .mobile-view .bc-icon-selected{margin-inline-end:.8rem!important}[data-gene-ui-version=\"2.12.1\"] .option-texts{align-items:center;display:flex;flex:auto;font:600 1.4rem/2rem var(--font-family);overflow:hidden}[data-gene-ui-version=\"2.12.1\"] .option-texts>li{flex-shrink:0}[data-gene-ui-version=\"2.12.1\"] .option-texts>li:first-child{flex:auto;overflow:hidden}[data-gene-ui-version=\"2.12.1\"] .option-texts>li.assigned-value{margin-inline-start:1rem;opacity:.7}[data-gene-ui-version=\"2.12.1\"] .option-description{font:600 1.2rem/1.6rem var(--font-family);opacity:.7}[data-gene-ui-version=\"2.12.1\"] .option-title-center{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}[data-gene-ui-version=\"2.12.1\"] .option-title-end{text-align:end}";
|
|
21
20
|
styleInject(css_248z);
|
|
22
21
|
|
|
23
22
|
function Option(props) {
|
|
@@ -101,86 +100,85 @@ Option.propTypes = {
|
|
|
101
100
|
/**
|
|
102
101
|
* Title of the option
|
|
103
102
|
*/
|
|
104
|
-
title:
|
|
103
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
105
104
|
/**
|
|
106
105
|
* Description of the option which is displayed on the bottom of the title with small caps
|
|
107
106
|
*/
|
|
108
|
-
description:
|
|
107
|
+
description: PropTypes.string,
|
|
109
108
|
/**
|
|
110
109
|
* Adds additional className to the option
|
|
111
110
|
*/
|
|
112
|
-
className:
|
|
111
|
+
className: PropTypes.string,
|
|
113
112
|
/**
|
|
114
113
|
* Adds icon on the right side of the option
|
|
115
114
|
*/
|
|
116
|
-
icon:
|
|
115
|
+
icon: PropTypes.string,
|
|
117
116
|
/**
|
|
118
117
|
* Changes text colors
|
|
119
118
|
*/
|
|
120
|
-
color:
|
|
119
|
+
color: PropTypes.oneOf(optionConfig.color),
|
|
121
120
|
/**
|
|
122
121
|
* Changes color to hero
|
|
123
122
|
*/
|
|
124
|
-
active:
|
|
123
|
+
active: PropTypes.bool,
|
|
125
124
|
/**
|
|
126
125
|
* Adds check icon and displays it when the option is active
|
|
127
126
|
*/
|
|
128
|
-
checkMark:
|
|
127
|
+
checkMark: PropTypes.bool,
|
|
129
128
|
/**
|
|
130
129
|
* Adds to right arrow icon
|
|
131
130
|
*/
|
|
132
|
-
forwardMark:
|
|
131
|
+
forwardMark: PropTypes.bool,
|
|
133
132
|
/**
|
|
134
133
|
* Any element you can add to the left side
|
|
135
134
|
*/
|
|
136
|
-
leftCustomElement:
|
|
135
|
+
leftCustomElement: PropTypes.any,
|
|
137
136
|
/**
|
|
138
137
|
* Any element you can add to the right side
|
|
139
138
|
*/
|
|
140
|
-
rightCustomElement:
|
|
139
|
+
rightCustomElement: PropTypes.any,
|
|
141
140
|
/**
|
|
142
141
|
* Information you can display on the right side of the option
|
|
143
142
|
*/
|
|
144
|
-
assignedValue:
|
|
143
|
+
assignedValue: PropTypes.string,
|
|
145
144
|
/**
|
|
146
145
|
* Adds border to the option
|
|
147
146
|
*/
|
|
148
|
-
border:
|
|
147
|
+
border: PropTypes.oneOf(optionConfig.border),
|
|
149
148
|
/**
|
|
150
149
|
* Makes item sticky to scrolling element based on the position you choose
|
|
151
150
|
*/
|
|
152
|
-
sticky:
|
|
151
|
+
sticky: PropTypes.oneOf(optionConfig.sticky),
|
|
153
152
|
/**
|
|
154
153
|
* Additional elements for rendering in option
|
|
155
154
|
*/
|
|
156
|
-
content:
|
|
155
|
+
content: PropTypes.any,
|
|
157
156
|
/**
|
|
158
157
|
* Fires event when user click on one of the menu items;
|
|
159
158
|
* (event: Event, item: Object) => void
|
|
160
159
|
*/
|
|
161
|
-
onClick:
|
|
160
|
+
onClick: PropTypes.func,
|
|
162
161
|
/**
|
|
163
162
|
* Controls screen type
|
|
164
163
|
*/
|
|
165
|
-
screenType:
|
|
164
|
+
screenType: PropTypes.oneOf(screenTypes),
|
|
166
165
|
/**
|
|
167
166
|
* Controls button disable state
|
|
168
167
|
*/
|
|
169
|
-
disabled:
|
|
168
|
+
disabled: PropTypes.bool,
|
|
170
169
|
/**
|
|
171
170
|
* ref for label
|
|
172
171
|
*/
|
|
173
|
-
forwardedRef:
|
|
172
|
+
forwardedRef: PropTypes.oneOfType([PropTypes.func,
|
|
174
173
|
// for callback ref
|
|
175
|
-
|
|
176
|
-
current:
|
|
174
|
+
PropTypes.shape({
|
|
175
|
+
current: PropTypes.instanceOf(Element)
|
|
177
176
|
}) // for createRef() object
|
|
178
177
|
]),
|
|
179
|
-
|
|
180
178
|
/**
|
|
181
179
|
* Chose position for title
|
|
182
180
|
*/
|
|
183
|
-
titlePosition:
|
|
181
|
+
titlePosition: PropTypes.oneOf(['start', 'center', 'end'])
|
|
184
182
|
};
|
|
185
183
|
|
|
186
184
|
export { Option as default };
|