@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
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { c as classnames } from '
|
|
5
|
-
import { c as createSliderWithTooltip, S as Slider } from '
|
|
6
|
-
import
|
|
7
|
-
import '
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { c as createSliderWithTooltip, S as Slider } from '../rangeAndSlider-0301a458.js';
|
|
6
|
+
import useWidth from '../hooks/useWidth.js';
|
|
7
|
+
import '../dateValidation-67caec66.js';
|
|
8
8
|
import 'react-dom';
|
|
9
|
-
import '
|
|
10
|
-
import Icon from '
|
|
11
|
-
import NumberInput from '
|
|
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 '
|
|
9
|
+
import '../configs-fed6ac34.js';
|
|
10
|
+
import Icon from '../Icon/index.js';
|
|
11
|
+
import NumberInput from '../ValidatableNumberInput/index.js';
|
|
12
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
13
|
+
import '../index-45eafea6.js';
|
|
14
|
+
import '../react-lifecycles-compat.es-6e1f3768.js';
|
|
15
|
+
import '../style-inject.es-746bb8ed.js';
|
|
16
|
+
import '../hooks/useWindowSize.js';
|
|
17
|
+
import '../index-a0e4e333.js';
|
|
18
|
+
import '../hooks/useMount.js';
|
|
19
|
+
import '../ExtendedInput/index.js';
|
|
20
|
+
import '../hooks/useDeviceType.js';
|
|
21
|
+
import '../hooks/useEllipsisDetection.js';
|
|
22
|
+
import '../SuggestionList/index.js';
|
|
23
|
+
import '../hooks/useKeyDown.js';
|
|
24
|
+
import '../hooks/useClickOutside.js';
|
|
25
|
+
import '../config-0ca92874.js';
|
|
26
|
+
import '../Scrollbar/index.js';
|
|
27
|
+
import '../Tooltip/index.js';
|
|
28
|
+
import '../Popover-f4d1cac0.js';
|
|
29
|
+
import '../GeneUIProvider/index.js';
|
|
27
30
|
|
|
28
31
|
const SliderWithTooltip = createSliderWithTooltip(Slider);
|
|
29
32
|
function tipFormatter(value, tooltipType) {
|
|
@@ -165,79 +168,79 @@ SliderMolecule.propTypes = {
|
|
|
165
168
|
/**
|
|
166
169
|
* Controlled value.
|
|
167
170
|
*/
|
|
168
|
-
value:
|
|
171
|
+
value: PropTypes.number,
|
|
169
172
|
/**
|
|
170
173
|
* Disabled state.
|
|
171
174
|
*/
|
|
172
|
-
disabled:
|
|
175
|
+
disabled: PropTypes.bool,
|
|
173
176
|
/**
|
|
174
177
|
* Fires an event when 'Slider' changes checked state((event: Event) => void).
|
|
175
178
|
*/
|
|
176
|
-
onChange:
|
|
179
|
+
onChange: PropTypes.func,
|
|
177
180
|
/**
|
|
178
181
|
* Additional view to choose step.
|
|
179
182
|
*/
|
|
180
|
-
withInput:
|
|
183
|
+
withInput: PropTypes.bool,
|
|
181
184
|
/**
|
|
182
185
|
* Show/hide 'Slider' tooltip.
|
|
183
186
|
*/
|
|
184
|
-
withTooltip:
|
|
187
|
+
withTooltip: PropTypes.bool,
|
|
185
188
|
/**
|
|
186
189
|
* Switch on/off small size.
|
|
187
190
|
*/
|
|
188
|
-
isSmallHandler:
|
|
191
|
+
isSmallHandler: PropTypes.bool,
|
|
189
192
|
/**
|
|
190
193
|
* External/Additional className that can be added to 'Range' component.
|
|
191
194
|
*/
|
|
192
|
-
className:
|
|
195
|
+
className: PropTypes.string,
|
|
193
196
|
/**
|
|
194
197
|
* Initial value.
|
|
195
198
|
*/
|
|
196
|
-
defaultValue:
|
|
199
|
+
defaultValue: PropTypes.number,
|
|
197
200
|
/**
|
|
198
201
|
* Show/hide actions with (+/-) icons
|
|
199
202
|
*/
|
|
200
|
-
plusMinusIcons:
|
|
203
|
+
plusMinusIcons: PropTypes.bool,
|
|
201
204
|
/**
|
|
202
205
|
* Show/hide actions with (like/dislike) icons
|
|
203
206
|
*/
|
|
204
|
-
likeDislikeIcons:
|
|
207
|
+
likeDislikeIcons: PropTypes.bool,
|
|
205
208
|
/**
|
|
206
209
|
* Show/hide circles.
|
|
207
210
|
*/
|
|
208
|
-
showCircleOnDrag:
|
|
211
|
+
showCircleOnDrag: PropTypes.bool,
|
|
209
212
|
/**
|
|
210
213
|
* Max value.
|
|
211
214
|
*/
|
|
212
|
-
max:
|
|
215
|
+
max: PropTypes.number.isRequired,
|
|
213
216
|
/**
|
|
214
217
|
* Min value.
|
|
215
218
|
*/
|
|
216
|
-
min:
|
|
219
|
+
min: PropTypes.number.isRequired,
|
|
217
220
|
/**
|
|
218
221
|
* Skip steps count.
|
|
219
222
|
*/
|
|
220
|
-
step:
|
|
223
|
+
step: PropTypes.number.isRequired,
|
|
221
224
|
/**
|
|
222
225
|
* Change circle size based on range
|
|
223
226
|
*/
|
|
224
|
-
circleSizeBasedOnRange:
|
|
227
|
+
circleSizeBasedOnRange: PropTypes.bool,
|
|
225
228
|
/**
|
|
226
229
|
* Show/hide action button.
|
|
227
230
|
*/
|
|
228
|
-
withActionButtons:
|
|
231
|
+
withActionButtons: PropTypes.bool,
|
|
229
232
|
/**
|
|
230
233
|
* Various circle type.
|
|
231
234
|
*/
|
|
232
|
-
circleType:
|
|
235
|
+
circleType: PropTypes.oneOf(['c-type-1', 'c-type-2', 'c-type-3']),
|
|
233
236
|
/**
|
|
234
237
|
* Various tooltip type.
|
|
235
238
|
*/
|
|
236
|
-
tooltipType:
|
|
239
|
+
tooltipType: PropTypes.oneOf(['default', 'percentage', 'currency', 'pixel']),
|
|
237
240
|
/**
|
|
238
241
|
* Various themes/colors for component.
|
|
239
242
|
*/
|
|
240
|
-
coloring:
|
|
243
|
+
coloring: PropTypes.oneOf(['primary', 'positive-value', 'negative-value', 'gradient-value'])
|
|
241
244
|
};
|
|
242
245
|
SliderMolecule.defaultProps = {
|
|
243
246
|
disabled: false,
|
package/Status/index.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
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 Icon from '../Icon/index.js';
|
|
6
|
+
import Tooltip from '../Tooltip/index.js';
|
|
7
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
8
|
+
import '../Popover-f4d1cac0.js';
|
|
9
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
10
|
+
import 'react-dom';
|
|
11
|
+
import '../configs-fed6ac34.js';
|
|
12
|
+
import '../index-a0e4e333.js';
|
|
13
|
+
import '../dateValidation-67caec66.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.2\"] .static-title-holder{align-items:flex-start;display:inline-flex;flex-direction:column;max-width:100%;vertical-align:top}[data-gene-ui-version=\"2.12.2\"] .static-title-holder .st-t{font:600 1.4rem/1.8rem var(--font-family);margin:0 0 .4rem;opacity:.5;padding:0 var(--static-title-padding,0)}[data-gene-ui-version=\"2.12.2\"] .static-title-holder .st-c{max-width:100%}[data-gene-ui-version=\"2.12.2\"] .static-title-holder .st-c:nth-child(2){align-items:center;display:flex;min-height:3.2rem}[data-gene-ui-version=\"2.12.2\"] .static-title-holder.f-full-width,[data-gene-ui-version=\"2.12.2\"] .static-title-holder.f-full-width .st-c{width:100%}[data-gene-ui-version=\"2.12.2\"] .status-holder{align-items:center;display:flex;font:600 1.4rem/2.4rem var(--font-family)}[data-gene-ui-version=\"2.12.2\"] .status-holder p{height:2.4rem;overflow:hidden}[data-gene-ui-version=\"2.12.2\"] .status-holder span{display:block;overflow:hidden}[data-gene-ui-version=\"2.12.2\"] .status-holder>*+*{margin:0 0 0 .7rem}html[dir=rtl] .status-holder>*+*{margin:0 .7rem 0 0}[data-gene-ui-version=\"2.12.2\"] .status-holder .status-icon{align-items:center;color:var(--hero);display:flex;height:3rem;justify-content:center;position:relative;transition:color .3s,opacity .3s;width:3rem}[data-gene-ui-version=\"2.12.2\"] .status-holder .status-icon:after,[data-gene-ui-version=\"2.12.2\"] .status-holder .status-icon:before{border-radius:100%;content:\"\";display:block;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .3s,background .3s,border-color .3s;width:100%}[data-gene-ui-version=\"2.12.2\"] .status-holder .status-icon:before{background:var(--hero)}[data-gene-ui-version=\"2.12.2\"] .status-holder .status-icon:after{border:1px solid var(--hero)}[data-gene-ui-version=\"2.12.2\"] .status-holder .status-icon .icon{position:relative;z-index:2}[data-gene-ui-version=\"2.12.2\"] .status-holder:hover .hover-text+span,[data-gene-ui-version=\"2.12.2\"] .status-holder:not(:hover) .hover-text{height:0}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .status-holder.clickable:hover .status-icon:before{opacity:.05}[data-gene-ui-version=\"2.12.2\"] .status-holder.clickable:hover .status-icon:after{opacity:.66}}";
|
|
19
|
+
styleInject(css_248z);
|
|
20
|
+
|
|
21
|
+
const statusIconTypes = ['dot', 'play', 'stop', 'circle', 'circle-outline'];
|
|
22
|
+
const statusEnums = {
|
|
23
|
+
dot: 'bc-icon-dot',
|
|
24
|
+
play: 'bc-icon-status-play',
|
|
25
|
+
stop: 'bc-icon-status-stop',
|
|
26
|
+
circle: 'bc-icon-status-circle',
|
|
27
|
+
'circle-outline': 'bc-icon-status-circle-outline'
|
|
28
|
+
};
|
|
29
|
+
function Status(_ref) {
|
|
30
|
+
let {
|
|
31
|
+
label,
|
|
32
|
+
color,
|
|
33
|
+
title,
|
|
34
|
+
onClick,
|
|
35
|
+
iconType,
|
|
36
|
+
hoverTitle,
|
|
37
|
+
className,
|
|
38
|
+
tooltipText,
|
|
39
|
+
...restProps
|
|
40
|
+
} = _ref;
|
|
41
|
+
const Content = /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
42
|
+
className: "static-title-holder"
|
|
43
|
+
}, restProps), label && /*#__PURE__*/React__default.createElement("li", {
|
|
44
|
+
className: "st-t"
|
|
45
|
+
}, label), /*#__PURE__*/React__default.createElement("li", {
|
|
46
|
+
className: "st-c"
|
|
47
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
48
|
+
className: classnames('status-holder', "c-".concat(color), className, {
|
|
49
|
+
clickable: !!hoverTitle,
|
|
50
|
+
'cursor-pointer': !!onClick
|
|
51
|
+
}),
|
|
52
|
+
onClick: onClick,
|
|
53
|
+
style: {
|
|
54
|
+
'--hero': color
|
|
55
|
+
}
|
|
56
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
57
|
+
className: "status-icon"
|
|
58
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
59
|
+
type: statusEnums[iconType]
|
|
60
|
+
})), title && /*#__PURE__*/React__default.createElement("p", null, hoverTitle && /*#__PURE__*/React__default.createElement("span", {
|
|
61
|
+
className: "hover-text"
|
|
62
|
+
}, hoverTitle), /*#__PURE__*/React__default.createElement("span", null, title)))));
|
|
63
|
+
return tooltipText ? /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
64
|
+
position: "auto",
|
|
65
|
+
title: tooltipText
|
|
66
|
+
}, Content) : Content;
|
|
67
|
+
}
|
|
68
|
+
Status.propTypes = {
|
|
69
|
+
/**
|
|
70
|
+
* Label for 'Status'.
|
|
71
|
+
*/
|
|
72
|
+
label: PropTypes.string,
|
|
73
|
+
/**
|
|
74
|
+
* Title for 'Status'.
|
|
75
|
+
*/
|
|
76
|
+
title: PropTypes.string,
|
|
77
|
+
/**
|
|
78
|
+
* Fires an event on 'Status' change((event: Event) => void).
|
|
79
|
+
*/
|
|
80
|
+
onClick: PropTypes.func,
|
|
81
|
+
/**
|
|
82
|
+
* External/Additional className that can be added to 'Status' component.
|
|
83
|
+
*/
|
|
84
|
+
className: PropTypes.string,
|
|
85
|
+
/**
|
|
86
|
+
* Title for hovered state 'Status'.
|
|
87
|
+
*/
|
|
88
|
+
hoverTitle: PropTypes.string,
|
|
89
|
+
/**
|
|
90
|
+
* Text for tooltip.
|
|
91
|
+
*/
|
|
92
|
+
tooltipText: PropTypes.string,
|
|
93
|
+
/**
|
|
94
|
+
* External color className
|
|
95
|
+
*/
|
|
96
|
+
color: PropTypes.string,
|
|
97
|
+
/**
|
|
98
|
+
* Various types for icon
|
|
99
|
+
*/
|
|
100
|
+
iconType: PropTypes.oneOf(statusIconTypes)
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export { Status as default, statusIconTypes };
|
package/Steps/index.js
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import React__default, { useRef, useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
4
|
+
import { r as stepsConfig } from '../configs-fed6ac34.js';
|
|
5
|
+
import Icon from '../Icon/index.js';
|
|
6
|
+
import Tooltip from '../Tooltip/index.js';
|
|
7
|
+
import '../dateValidation-67caec66.js';
|
|
8
|
+
import { d as debounce } from '../debounce-4419bc2f.js';
|
|
9
|
+
import 'react-dom';
|
|
10
|
+
import Popover from '../Popover/index.js';
|
|
11
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
12
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
13
|
+
import { c as childrenOf } from '../index-a0e4e333.js';
|
|
14
|
+
import '../Popover-f4d1cac0.js';
|
|
15
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
16
|
+
import '../hooks/useDeviceType.js';
|
|
17
|
+
import '../hooks/useWindowSize.js';
|
|
18
|
+
import '../GeneUIProvider/index.js';
|
|
19
|
+
import '../index-122432cd.js';
|
|
20
|
+
import '../hooks/useUpdatableRef.js';
|
|
21
|
+
import '../hooks/useForceUpdate.js';
|
|
22
|
+
import '../Portal/index.js';
|
|
23
|
+
import '../Scrollbar/index.js';
|
|
24
|
+
import '../guid-8ddf77b3.js';
|
|
25
|
+
|
|
26
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .steps-holder{--circle-font-size:1.2rem;--font-size:1.2rem;--circle-size:2.6rem;--min-height:8.8rem;display:flex;-webkit-user-select:none;user-select:none}[data-gene-ui-version=\"2.12.2\"] .steps-holder.s-big{--circle-font-size:1.6rem;--font-size:1.4rem;--circle-size:3.6rem;--min-height:9.8rem}[data-gene-ui-version=\"2.12.2\"] .steps-holder.s-big .bc-icon-selected{font-size:var(--circle-size)}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-horizontal{align-items:center;min-height:var(--min-height);text-align:center;width:100%}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-horizontal>li:not(:first-child){margin:0 0 0 1rem}html[dir=rtl] .steps-holder.d-horizontal>li:not(:first-child){margin:0 1rem 0 0}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-horizontal .line{height:1px;width:100%}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-horizontal .line:before{height:inherit;width:0}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-horizontal .line.active:before{width:100%}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-vertical{align-items:flex-start;flex-direction:column;height:100%}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-vertical>li:not(:first-child){margin:.8rem 0 0}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-vertical .line-box{display:flex;justify-content:center;width:var(--circle-size)}[data-gene-ui-version=\"2.12.2\"] .a-dots.steps-holder.d-vertical .line-box{width:1.9rem}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-vertical .line{height:100%;min-height:3.4rem;width:1px}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-vertical .line:before{height:0;width:inherit}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-vertical .line.active:before{height:100%}[data-gene-ui-version=\"2.12.2\"] .steps-holder.d-vertical .step-texts{margin:0 0 0 1.5rem}html[dir=rtl] .steps-holder.d-vertical .step-texts{margin:0 1.5rem 0 0}[data-gene-ui-version=\"2.12.2\"] .steps-holder .line{background:rgba(var(--background-sc-rgb),.04)}[data-gene-ui-version=\"2.12.2\"] .steps-holder .line:before{background:var(--hero);content:\"\";display:block;transition:width .4s,height .4s}[data-gene-ui-version=\"2.12.2\"] .steps-holder.a-dots .line{background:var(--hero)}[data-gene-ui-version=\"2.12.2\"] .steps-holder .s-success{--hero:var(--confirm);--hero-hover:var(--confirm-hover);--hero-sc:var(--confirm-sc);--hero-rgb:var(--confirm-rgb);--hero-sc-rgb:var(--confirm-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .steps-holder .s-fail{--hero:var(--danger);--hero-hover:var(--danger-hover);--hero-sc:var(--danger-sc);--hero-rgb:var(--danger-rgb);--hero-sc-rgb:var(--danger-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .step{align-items:center;display:flex;flex-shrink:0;font:600 var(--font-size)/1.8rem var(--font-family);position:relative}[data-gene-ui-version=\"2.12.2\"] .step.clickable{cursor:pointer}[data-gene-ui-version=\"2.12.2\"] .step.clickable .step-circle:before{border:1px solid var(--hero);border-radius:100%;bottom:-.4rem;content:\"\";display:block;left:-.4rem;position:absolute;right:-.4rem;top:-.4rem;transform:scale(0);transition:transform .4s,border-color .4s}[data-gene-ui-version=\"2.12.2\"] .s-initial.step.clickable .step-circle:before,[data-gene-ui-version=\"2.12.2\"] .steps-holder:not(.highlight-current) .s-current.step.clickable .step-circle:before{border-color:rgba(var(--background-sc-rgb),.06)}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .step.clickable:hover .step-circle:before{transform:scale(1)}}[data-gene-ui-version=\"2.12.2\"] .step.clickable.s-activated .step-circle:before{transform:scale(1)}[data-gene-ui-version=\"2.12.2\"] .line-box{flex:auto}[data-gene-ui-version=\"2.12.2\"] .d-horizontal .step-label,[data-gene-ui-version=\"2.12.2\"] .d-horizontal .step-title{bottom:100%;left:50%;position:absolute;transform:translateX(-50%);white-space:nowrap;width:auto}[data-gene-ui-version=\"2.12.2\"] .d-horizontal .step-title{margin:0 0 1rem}[data-gene-ui-version=\"2.12.2\"] .d-horizontal .step-title:nth-last-child(2){bottom:auto;margin:1rem 0 0;top:100%}[data-gene-ui-version=\"2.12.2\"] .step-label{opacity:.5}[data-gene-ui-version=\"2.12.2\"] .d-horizontal .step-label{margin:0 0 1.6rem}[data-gene-ui-version=\"2.12.2\"] .step-texts{align-items:flex-start;display:flex;flex-direction:column;pointer-events:none}[data-gene-ui-version=\"2.12.2\"] .step-texts.both{font-size:1.4rem}[data-gene-ui-version=\"2.12.2\"] .step-circle{align-items:center;background:rgba(var(--background-sc-rgb),.04);border-radius:100%;display:flex;font-size:var(--circle-font-size);height:var(--circle-size);justify-content:center;position:relative;transition:color .3s,background .3s;width:var(--circle-size)}[data-gene-ui-version=\"2.12.2\"] .highlight-current .s-current .step-circle,[data-gene-ui-version=\"2.12.2\"] .passed .step-circle,[data-gene-ui-version=\"2.12.2\"] .s-activated .step-circle{background:var(--hero);color:var(--hero-sc)}[data-gene-ui-version=\"2.12.2\"] .step-layer{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;transition:transform .4s;width:100%}[data-gene-ui-version=\"2.12.2\"] .passed .step-layer.layer-1,[data-gene-ui-version=\"2.12.2\"] .step-layer.layer-2{transform:scale(0)}[data-gene-ui-version=\"2.12.2\"] .passed .step-layer.layer-2{transform:scale(1)}[data-gene-ui-version=\"2.12.2\"] .step-dot{--size:1.9rem;--inner-size:0.9rem;align-items:center;display:flex;height:var(--size);justify-content:center;position:relative;width:var(--size)}[data-gene-ui-version=\"2.12.2\"] .view-normal .step-dot{--size:15px;--inner-size:7px}[data-gene-ui-version=\"2.12.2\"] .view-small .step-dot{--size:11px;--inner-size:5px}[data-gene-ui-version=\"2.12.2\"] .step-dot:after,[data-gene-ui-version=\"2.12.2\"] .step-dot:before{border-radius:100%;box-shadow:inset 0 0 0 .2rem var(--hero);content:\"\";display:block}[data-gene-ui-version=\"2.12.2\"] .step-dot:before{content:\"\";height:var(--inner-size);transition:box-shadow .3s;width:var(--inner-size)}[data-gene-ui-version=\"2.12.2\"] .passed .step-dot:before,[data-gene-ui-version=\"2.12.2\"] .s-activated .step-dot:before,[data-gene-ui-version=\"2.12.2\"] .s-current .step-dot:before{box-shadow:inset 0 0 0 .9rem var(--hero)}[data-gene-ui-version=\"2.12.2\"] .step-dot:after{height:100%;left:0;position:absolute;top:0;transform:scale(0);transition:transform .3s;width:100%}[data-gene-ui-version=\"2.12.2\"] .s-activated .step-dot:after,[data-gene-ui-version=\"2.12.2\"] .s-current .step-dot:after{transform:scale(1)}[data-gene-ui-version=\"2.12.2\"] .detailed-value-popover-container{padding:16px}";
|
|
27
|
+
styleInject(css_248z);
|
|
28
|
+
|
|
29
|
+
const positionMap = {
|
|
30
|
+
vertical: 'left',
|
|
31
|
+
horizontal: 'bottom'
|
|
32
|
+
};
|
|
33
|
+
function DetailedView(_ref) {
|
|
34
|
+
let {
|
|
35
|
+
content,
|
|
36
|
+
children,
|
|
37
|
+
direction
|
|
38
|
+
} = _ref;
|
|
39
|
+
const isHoveredOnContent = useRef(false);
|
|
40
|
+
const isHoveredOnStep = useRef(false);
|
|
41
|
+
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
42
|
+
const closePopover = () => {
|
|
43
|
+
debounce(() => {
|
|
44
|
+
if (!isHoveredOnContent.current && !isHoveredOnStep.current) {
|
|
45
|
+
setIsPopoverOpen(false);
|
|
46
|
+
}
|
|
47
|
+
}, 250)();
|
|
48
|
+
};
|
|
49
|
+
const stepOnMouseEnterHandler = () => {
|
|
50
|
+
isHoveredOnStep.current = true;
|
|
51
|
+
setIsPopoverOpen(true);
|
|
52
|
+
};
|
|
53
|
+
const stepOnMouseLeaveHandler = () => {
|
|
54
|
+
isHoveredOnStep.current = false;
|
|
55
|
+
closePopover();
|
|
56
|
+
};
|
|
57
|
+
const contentOnMouseEnterHandler = () => isHoveredOnContent.current = true;
|
|
58
|
+
const contentOnMouseLeaveHandler = () => {
|
|
59
|
+
isHoveredOnContent.current = false;
|
|
60
|
+
closePopover();
|
|
61
|
+
};
|
|
62
|
+
return /*#__PURE__*/React__default.createElement(Popover, {
|
|
63
|
+
swipeable: true,
|
|
64
|
+
align: "center",
|
|
65
|
+
position: positionMap[direction],
|
|
66
|
+
isOpen: isPopoverOpen,
|
|
67
|
+
onClickOutside: () => setIsPopoverOpen(false),
|
|
68
|
+
extendTargetWidth: false,
|
|
69
|
+
onSwipedDown: () => setIsPopoverOpen(false),
|
|
70
|
+
Content: /*#__PURE__*/React__default.createElement("div", {
|
|
71
|
+
onMouseEnter: contentOnMouseEnterHandler,
|
|
72
|
+
onMouseLeave: contentOnMouseLeaveHandler,
|
|
73
|
+
className: "detailed-value-popover-container"
|
|
74
|
+
}, content)
|
|
75
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
76
|
+
onMouseEnter: stepOnMouseEnterHandler,
|
|
77
|
+
onMouseLeave: stepOnMouseLeaveHandler
|
|
78
|
+
}, children));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function WithTooltip(_ref) {
|
|
82
|
+
let {
|
|
83
|
+
tooltip,
|
|
84
|
+
children
|
|
85
|
+
} = _ref;
|
|
86
|
+
if (!tooltip) return children;
|
|
87
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
88
|
+
title: tooltip
|
|
89
|
+
}, children);
|
|
90
|
+
}
|
|
91
|
+
function Step(_ref2) {
|
|
92
|
+
let {
|
|
93
|
+
title,
|
|
94
|
+
label,
|
|
95
|
+
onClick,
|
|
96
|
+
icon,
|
|
97
|
+
status,
|
|
98
|
+
appearance,
|
|
99
|
+
failColor,
|
|
100
|
+
successColor,
|
|
101
|
+
heroColor,
|
|
102
|
+
style,
|
|
103
|
+
extraLines,
|
|
104
|
+
stepsCount,
|
|
105
|
+
current,
|
|
106
|
+
tooltip,
|
|
107
|
+
direction,
|
|
108
|
+
detailedView,
|
|
109
|
+
__index
|
|
110
|
+
} = _ref2;
|
|
111
|
+
const stepBody = /*#__PURE__*/React__default.createElement("li", {
|
|
112
|
+
className: classnames('step', "s-".concat(status), {
|
|
113
|
+
clickable: !!onClick,
|
|
114
|
+
passed: status === 'fail' || status === 'success'
|
|
115
|
+
}),
|
|
116
|
+
onClick: onClick,
|
|
117
|
+
style: {
|
|
118
|
+
'--danger': failColor,
|
|
119
|
+
'--confirm': successColor,
|
|
120
|
+
'--hero': heroColor,
|
|
121
|
+
...style
|
|
122
|
+
}
|
|
123
|
+
}, appearance === stepsConfig.appearance[1] ? /*#__PURE__*/React__default.createElement("div", {
|
|
124
|
+
className: "step-dot"
|
|
125
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
126
|
+
className: "step-circle"
|
|
127
|
+
}, icon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
128
|
+
type: icon
|
|
129
|
+
}) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
130
|
+
className: "step-layer layer-1"
|
|
131
|
+
}, __index), /*#__PURE__*/React__default.createElement("div", {
|
|
132
|
+
className: "step-layer layer-2"
|
|
133
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
134
|
+
type: status === 'fail' ? 'bc-icon-clear' : 'bc-icon-selected'
|
|
135
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
136
|
+
className: classnames('step-texts', {
|
|
137
|
+
both: !!title && !!label
|
|
138
|
+
})
|
|
139
|
+
}, title && /*#__PURE__*/React__default.createElement("div", {
|
|
140
|
+
className: "step-title"
|
|
141
|
+
}, title), label && /*#__PURE__*/React__default.createElement("div", {
|
|
142
|
+
className: "step-label"
|
|
143
|
+
}, label)));
|
|
144
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (__index !== 1 || extraLines) && /*#__PURE__*/React__default.createElement("li", {
|
|
145
|
+
className: "line-box"
|
|
146
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
147
|
+
className: classnames('line', "s-".concat(status), {
|
|
148
|
+
active: current >= __index
|
|
149
|
+
}),
|
|
150
|
+
style: {
|
|
151
|
+
'--danger': failColor,
|
|
152
|
+
'--confirm': successColor,
|
|
153
|
+
'--hero': heroColor
|
|
154
|
+
}
|
|
155
|
+
})), detailedView ? /*#__PURE__*/React__default.createElement(DetailedView, {
|
|
156
|
+
direction: direction,
|
|
157
|
+
content: detailedView
|
|
158
|
+
}, stepBody) : /*#__PURE__*/React__default.createElement(WithTooltip, {
|
|
159
|
+
tooltip: tooltip
|
|
160
|
+
}, stepBody), __index === stepsCount && extraLines && /*#__PURE__*/React__default.createElement("li", {
|
|
161
|
+
className: "line-box"
|
|
162
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
163
|
+
className: classnames('line', "s-".concat(status), {
|
|
164
|
+
active: current === stepsCount
|
|
165
|
+
}),
|
|
166
|
+
style: {
|
|
167
|
+
'--danger': failColor,
|
|
168
|
+
'--confirm': successColor,
|
|
169
|
+
'--hero': heroColor
|
|
170
|
+
}
|
|
171
|
+
})));
|
|
172
|
+
}
|
|
173
|
+
Step.propTypes = {
|
|
174
|
+
/**
|
|
175
|
+
* Title of Step
|
|
176
|
+
*/
|
|
177
|
+
title: PropTypes.string,
|
|
178
|
+
/**
|
|
179
|
+
* Label of Step
|
|
180
|
+
*/
|
|
181
|
+
label: PropTypes.string,
|
|
182
|
+
/**
|
|
183
|
+
* Tooltip of Step
|
|
184
|
+
*/
|
|
185
|
+
tooltip: PropTypes.string,
|
|
186
|
+
/**
|
|
187
|
+
* Fires an event on ExtendedInput change((event: Event) => void).
|
|
188
|
+
*/
|
|
189
|
+
onClick: PropTypes.func,
|
|
190
|
+
/**
|
|
191
|
+
* Icon for current step
|
|
192
|
+
*/
|
|
193
|
+
icon: PropTypes.string,
|
|
194
|
+
/**
|
|
195
|
+
* Current step status
|
|
196
|
+
*/
|
|
197
|
+
status: PropTypes.oneOf(stepsConfig.status),
|
|
198
|
+
/**
|
|
199
|
+
* View/style for step
|
|
200
|
+
*/
|
|
201
|
+
appearance: PropTypes.oneOf(stepsConfig.appearance),
|
|
202
|
+
/**
|
|
203
|
+
* style for step
|
|
204
|
+
*/
|
|
205
|
+
style: PropTypes.object,
|
|
206
|
+
/**
|
|
207
|
+
* Color for failed step
|
|
208
|
+
*/
|
|
209
|
+
failColor: PropTypes.string,
|
|
210
|
+
/**
|
|
211
|
+
* Color for success step
|
|
212
|
+
*/
|
|
213
|
+
successColor: PropTypes.string,
|
|
214
|
+
/**
|
|
215
|
+
* Default color for step
|
|
216
|
+
*/
|
|
217
|
+
heroColor: PropTypes.string
|
|
218
|
+
};
|
|
219
|
+
Step.defaultProps = {
|
|
220
|
+
appearance: stepsConfig.appearance[0]
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
function getStepStatus(current, index, statusProp) {
|
|
224
|
+
if (current > index) return 'success';
|
|
225
|
+
if (current < index) return 'initial';
|
|
226
|
+
return statusProp || 'current';
|
|
227
|
+
}
|
|
228
|
+
function Steps(_ref) {
|
|
229
|
+
let {
|
|
230
|
+
direction,
|
|
231
|
+
size,
|
|
232
|
+
appearance,
|
|
233
|
+
highlightCurrent,
|
|
234
|
+
extraLines,
|
|
235
|
+
children,
|
|
236
|
+
current,
|
|
237
|
+
status,
|
|
238
|
+
failColor,
|
|
239
|
+
successColor,
|
|
240
|
+
heroColor,
|
|
241
|
+
className,
|
|
242
|
+
...rest
|
|
243
|
+
} = _ref;
|
|
244
|
+
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
245
|
+
className: classnames('steps-holder', "s-".concat(size), "d-".concat(direction), "a-".concat(appearance), {
|
|
246
|
+
'highlight-current': highlightCurrent
|
|
247
|
+
}, className),
|
|
248
|
+
style: {
|
|
249
|
+
'--danger': failColor,
|
|
250
|
+
'--confirm': successColor,
|
|
251
|
+
'--hero': heroColor
|
|
252
|
+
}
|
|
253
|
+
}, rest), React__default.Children.map(children, (child, i) => {
|
|
254
|
+
const stepStatus = child.props.status || getStepStatus(current, i, status);
|
|
255
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.cloneElement(child, {
|
|
256
|
+
__index: i + 1,
|
|
257
|
+
status: stepStatus,
|
|
258
|
+
appearance,
|
|
259
|
+
extraLines,
|
|
260
|
+
stepsCount: children.length,
|
|
261
|
+
current,
|
|
262
|
+
direction
|
|
263
|
+
}));
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
Steps.propTypes = {
|
|
267
|
+
/**
|
|
268
|
+
* View of 'Steps'.
|
|
269
|
+
*/
|
|
270
|
+
direction: PropTypes.oneOf(stepsConfig.direction),
|
|
271
|
+
/**
|
|
272
|
+
* Size of 'Steps'.
|
|
273
|
+
*/
|
|
274
|
+
size: PropTypes.oneOf(stepsConfig.size),
|
|
275
|
+
/**
|
|
276
|
+
* View type of 'Steps'.
|
|
277
|
+
*/
|
|
278
|
+
appearance: PropTypes.oneOf(stepsConfig.appearance),
|
|
279
|
+
/**
|
|
280
|
+
* Turn on/off highlighted view of current step.
|
|
281
|
+
*/
|
|
282
|
+
highlightCurrent: PropTypes.bool,
|
|
283
|
+
/**
|
|
284
|
+
* Show/hide extra lines in 'Steps'.
|
|
285
|
+
*/
|
|
286
|
+
extraLines: PropTypes.bool,
|
|
287
|
+
/**
|
|
288
|
+
* The child or children of 'Steps' molecule
|
|
289
|
+
*/
|
|
290
|
+
children: childrenOf([Step]),
|
|
291
|
+
/**
|
|
292
|
+
* Initial/current step
|
|
293
|
+
*/
|
|
294
|
+
current: PropTypes.number,
|
|
295
|
+
/**
|
|
296
|
+
* Status of current step
|
|
297
|
+
*/
|
|
298
|
+
status: PropTypes.oneOf(stepsConfig.status),
|
|
299
|
+
/**
|
|
300
|
+
* Additional classname
|
|
301
|
+
*/
|
|
302
|
+
className: PropTypes.string
|
|
303
|
+
};
|
|
304
|
+
Steps.defaultProps = {
|
|
305
|
+
direction: stepsConfig.direction[0],
|
|
306
|
+
size: stepsConfig.size[0],
|
|
307
|
+
appearance: stepsConfig.appearance[0],
|
|
308
|
+
highlightCurrent: false,
|
|
309
|
+
extraLines: false,
|
|
310
|
+
current: 0
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export { Step, Steps };
|
|
@@ -1,40 +1,17 @@
|
|
|
1
1
|
import React__default, { useMemo, useState, useRef, useCallback, useEffect } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
callBack();
|
|
16
|
-
});
|
|
17
|
-
}, time);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const actionTypes = {
|
|
21
|
-
add: 'add',
|
|
22
|
-
edit: 'edit',
|
|
23
|
-
delete: 'delete'
|
|
24
|
-
};
|
|
25
|
-
const keyDownKeys = {
|
|
26
|
-
space: ' ',
|
|
27
|
-
enter: 'Enter',
|
|
28
|
-
escape: 'Escape',
|
|
29
|
-
arrowDown: 'ArrowDown',
|
|
30
|
-
arrowUp: 'ArrowUp',
|
|
31
|
-
arrowLeft: 'ArrowLeft',
|
|
32
|
-
arrowRight: 'ArrowRight',
|
|
33
|
-
backspace: 'Backspace',
|
|
34
|
-
delete: 'Delete',
|
|
35
|
-
tab: 'Tab'
|
|
36
|
-
};
|
|
37
|
-
const SPACE_HEIGHT = 8;
|
|
2
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
3
|
+
import { s as stopEvent } from '../index-a0e4e333.js';
|
|
4
|
+
import useKeyDown from '../hooks/useKeyDown.js';
|
|
5
|
+
import '../configs-fed6ac34.js';
|
|
6
|
+
import useClickOutside from '../hooks/useClickOutside.js';
|
|
7
|
+
import { c as callAfterDelay, k as keyDownKeys } from '../config-0ca92874.js';
|
|
8
|
+
import CustomScrollbar from '../Scrollbar/index.js';
|
|
9
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
10
|
+
import 'prop-types';
|
|
11
|
+
import '../dateValidation-67caec66.js';
|
|
12
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
13
|
+
import 'react-dom';
|
|
14
|
+
import '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
38
15
|
|
|
39
16
|
const getCaretPos = (e, textarea, index, key) => {
|
|
40
17
|
textarea.insertAdjacentHTML('afterend', "<div id='dummy'></div>");
|
|
@@ -105,7 +82,7 @@ const getCursorPos = input => {
|
|
|
105
82
|
return -1;
|
|
106
83
|
};
|
|
107
84
|
|
|
108
|
-
var css_248z = "[data-gene-ui-version=\"
|
|
85
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .suggestion-list{background:var(--background);border:1px solid #0000000d;border-radius:1rem;box-shadow:0 .2rem .4rem 0 #0000000d,0 0 0 1px #ffffff14;overflow:hidden;position:fixed;width:200px;z-index:400}[data-gene-ui-version=\"2.12.2\"] .suggestion-list .suggestion-rows{font:600 1.4rem/1.8rem var(--font-family);width:100%}[data-gene-ui-version=\"2.12.2\"] .suggestion-list .suggestion-rows ul{width:100%}[data-gene-ui-version=\"2.12.2\"] .suggestion-list .suggestion-rows ul li{align-items:center;cursor:pointer;display:flex;height:4rem;padding-left:16px;transition:background .4s,color .4s;width:100%}[data-gene-ui-version=\"2.12.2\"] .suggestion-list .suggestion-rows ul li.hover{background:rgba(var(--background-sc-rgb),.05)}";
|
|
109
86
|
styleInject(css_248z);
|
|
110
87
|
|
|
111
88
|
const ROW_WIDTH = 300;
|
|
@@ -404,4 +381,4 @@ function SuggestionList(_ref) {
|
|
|
404
381
|
}, /*#__PURE__*/React__default.createElement("span", null, i.label))))))));
|
|
405
382
|
}
|
|
406
383
|
|
|
407
|
-
export { SuggestionList as
|
|
384
|
+
export { SuggestionList as default };
|