@geneui/components 2.11.2 → 2.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{ActionableList.js → ActionableList/index.js} +83 -152
- package/{AdvancedSearch.js → AdvancedSearch/index.js} +290 -304
- package/Alert/index.js +97 -0
- package/Avatar/index.js +30 -0
- package/Badge/index.js +75 -0
- package/{Breadcrumb.js → Breadcrumb/index.js} +32 -31
- package/BusyLoader/index.js +68 -0
- package/Button/index.js +129 -0
- package/CHANGELOG.md +53 -0
- package/{Card.js → Card/index.js} +82 -94
- package/{CardList.js → CardList/index.js} +120 -165
- package/{CellMeasurerCache-b786dd93.js → CellMeasurerCache-3741d716.js} +2 -2
- package/{index-9164a86d.js → Charts/index.js} +17103 -30447
- package/{Checkbox.js → Checkbox/index.js} +37 -38
- package/{CheckboxGroup.js → CheckboxGroup/index.js} +41 -42
- package/{CheckboxGroupWithSearch.js → CheckboxGroupWithSearch/index.js} +64 -65
- package/{Collapse.js → Collapse/index.js} +28 -29
- package/{ColorPicker.js → ColorPicker/index.js} +16 -16
- package/ComboBox/index.js +525 -0
- package/Counter/index.js +310 -0
- package/{DateFilter.js → DateFilter/index.js} +45 -43
- package/{DatePicker.js → DatePicker/index.js} +106 -108
- package/{index-0199942c.js → DatePickerInput/index.js} +114 -100
- package/{Divider.js → Divider/index.js} +9 -10
- package/{Drawer.js → Drawer/index.js} +40 -41
- package/Dropdown/index.js +41 -0
- package/{Editor.js → Editor/index.js} +165 -164
- package/{Empty.js → Empty/index.js} +12 -13
- package/{ExtendedInput.js → ExtendedInput/index.js} +81 -71
- package/Form/index.js +83 -0
- package/{FormContainer.js → FormContainer/index.js} +25 -26
- package/FormableCheckbox/index.js +26 -0
- package/FormableDatePicker/index.js +41 -0
- package/FormableDropdown/index.js +48 -0
- package/FormableEditor/index.js +24 -0
- package/{FormableHOC-21051057.js → FormableHOC-55263162.js} +3 -3
- package/FormableMultiSelectDropdown/index.js +48 -0
- package/FormableNumberInput/index.js +32 -0
- package/FormableRadio/index.js +22 -0
- package/FormableSwitcher/index.js +22 -0
- package/FormableTextInput/index.js +32 -0
- package/FormableUploader/index.js +42 -0
- package/GeneUIProvider/index.js +282 -0
- package/{Grid.js → Grid/index.js} +27 -27
- package/Holder/index.js +261 -0
- package/{Icon.js → Icon/index.js} +9 -10
- package/Image/index.js +129 -0
- package/ImagePreview/index.js +481 -0
- package/{KeyValue.js → KeyValue/index.js} +11 -12
- package/LICENSE +21 -0
- package/Label/index.js +57 -0
- package/LinkButton/index.js +67 -0
- package/{Menu.js → Menu/index.js} +27 -28
- package/MobileNavigation/index.js +94 -0
- package/{MobilePopup.js → MobilePopup/index.js} +42 -41
- package/{Modal.js → Modal/index.js} +39 -40
- package/ModuleTitle/index.js +143 -0
- package/{NavigationMenu.js → NavigationMenu/index.js} +30 -29
- package/Notification/index.js +119 -0
- package/Option/index.js +184 -0
- package/Overlay/index.js +189 -0
- package/Overspread/index.js +289 -0
- package/{Pagination.js → Pagination/index.js} +35 -34
- package/Paper/index.js +96 -0
- package/{index-084588e9.js → Popover/index.js} +48 -58
- package/PopoverV2/index.js +18 -0
- package/{Portal.js → Portal/index.js} +7 -8
- package/{Products.js → Products/index.js} +20 -21
- package/Profile/index.js +585 -0
- package/Progress/index.js +199 -0
- package/{QRCode.js → QRCode/index.js} +4 -6
- package/{Radio.js → Radio/index.js} +25 -26
- package/{RadioGroup.js → RadioGroup/index.js} +17 -18
- package/{index-00fe8887.js → Range/index.js} +29 -32
- package/RichEditor/index.js +13 -0
- package/{RichEditor-98accead.js → RichEditor-8b0f7ccd.js} +18 -18
- package/{Scrollbar.js → Scrollbar/index.js} +15 -17
- package/{Search.js → Search/index.js} +25 -24
- package/SearchWithDropdown/index.js +138 -0
- package/Section/index.js +61 -0
- package/{SkeletonLoader.js → SkeletonLoader/index.js} +13 -14
- package/{Slider.js → Slider/index.js} +46 -43
- package/Status/index.js +103 -0
- package/Steps/index.js +313 -0
- package/{index-897d8240.js → SuggestionList/index.js} +15 -38
- package/{Switcher.js → Switcher/index.js} +30 -31
- package/Table/index.js +53 -0
- package/{TableCompositions.js → TableCompositions/index.js} +131 -168
- package/Tabs/index.js +235 -0
- package/Tag/index.js +102 -0
- package/{TextLink.js → TextLink/index.js} +3 -3
- package/{Textarea.js → Textarea/index.js} +66 -65
- package/{Time.js → Time/index.js} +13 -14
- package/TimePicker/index.js +555 -0
- package/Timeline/index.js +113 -0
- package/Title/index.js +65 -0
- package/{Toaster.js → Toaster/index.js} +19 -20
- package/{Tooltip.js → Tooltip/index.js} +27 -28
- package/{TransferList.js → TransferList/index.js} +44 -55
- package/{index-135b9d17.js → Uploader/index.js} +119 -116
- package/{ValidatableCheckbox.js → ValidatableCheckbox/index.js} +23 -24
- package/{ValidatableDatePicker.js → ValidatableDatePicker/index.js} +44 -42
- package/ValidatableDropdown/index.js +139 -0
- package/ValidatableElements/index.js +65 -0
- package/ValidatableMultiSelectDropdown/index.js +150 -0
- package/{ValidatableNumberInput.js → ValidatableNumberInput/index.js} +41 -33
- package/{ValidatableRadio.js → ValidatableRadio/index.js} +19 -20
- package/{ValidatableSwitcher.js → ValidatableSwitcher/index.js} +19 -20
- package/{ValidatableTextInput.js → ValidatableTextInput/index.js} +32 -31
- package/{ValidatableTimeInput.js → ValidatableTimeInput/index.js} +31 -30
- package/{ValidatableUploader.js → ValidatableUploader/index.js} +36 -34
- package/Widget/index.js +227 -0
- package/config-0ca92874.js +31 -0
- package/{configs-91c86664.js → configs-fed6ac34.js} +28 -1
- package/hooks/useBodyScroll.js +16 -0
- package/hooks/useClick.js +18 -0
- package/{useClickOutside-5183e396.js → hooks/useClickOutside.js} +1 -1
- package/hooks/useDebounceHook.js +16 -0
- package/{useDeviceType-dd51db38.js → hooks/useDeviceType.js} +4 -3
- package/hooks/useDidMount.js +15 -0
- package/{useEllipsisDetection-ef536015.js → hooks/useEllipsisDetection.js} +1 -1
- package/hooks/useForceUpdate.js +8 -0
- package/hooks/useImgDownload.js +18 -0
- package/{useKeyDown-38102ae7.js → hooks/useKeyDown.js} +1 -1
- package/hooks/useMount.js +13 -0
- package/hooks/useMutationObserver.js +21 -0
- package/hooks/usePrevious.js +10 -0
- package/hooks/useThrottle.js +16 -0
- package/hooks/useToggle.js +11 -0
- package/hooks/useUpdatableRef.js +14 -0
- package/hooks/useUpdate.js +10 -0
- package/{useWidth-9f4647f8.js → hooks/useWidth.js} +2 -2
- package/{useWindowSize-80369d76.js → hooks/useWindowSize.js} +1 -1
- package/{index-8c98317a.js → index-11eea761.js} +678 -752
- package/index-2ad83e03.js +4 -0
- package/index-34e47647.js +10054 -0
- package/index-45eafea6.js +90 -0
- package/{index-5e96cb4d.js → index-462461c0.js} +50 -48
- package/{index-ac59cb10.js → index-a0e4e333.js} +6 -6
- package/{index-e8776f3d.js → index-b1e429a7.js} +1 -1
- package/index.d.ts +115 -0
- package/index.js +137 -113
- package/index.mobile.d.ts +16 -0
- package/lib/atoms/Avatar/Avatar.d.ts +34 -0
- package/lib/atoms/Avatar/index.d.ts +1 -0
- package/lib/atoms/LinkButton/LinkButton.d.ts +46 -0
- package/lib/atoms/LinkButton/index.d.ts +1 -0
- package/{objectWithoutPropertiesLoose-299691d8.js → objectWithoutPropertiesLoose-d8a4a68c.js} +12 -12
- package/package.json +42 -22
- package/{rangeAndSlider-20599da4.js → rangeAndSlider-0301a458.js} +220 -375
- package/{react-beautiful-dnd.esm-38c37304.js → react-beautiful-dnd.esm-04c14563.js} +9 -9
- package/react-lifecycles-compat.es-6e1f3768.js +158 -0
- package/Alert.js +0 -98
- package/Avatar.js +0 -77
- package/Badge.js +0 -76
- package/BusyLoader.js +0 -69
- package/Button.js +0 -130
- package/Charts.js +0 -99
- package/ComboBox.js +0 -99
- package/Counter.js +0 -99
- package/DatePickerInput.js +0 -30
- package/Dropdown.js +0 -99
- package/Form.js +0 -116
- package/FormableCheckbox.js +0 -27
- package/FormableDatePicker.js +0 -39
- package/FormableDropdown.js +0 -105
- package/FormableEditor.js +0 -24
- package/FormableMultiSelectDropdown.js +0 -105
- package/FormableNumberInput.js +0 -31
- package/FormableRadio.js +0 -23
- package/FormableSwitcher.js +0 -23
- package/FormableTextInput.js +0 -31
- package/FormableUploader.js +0 -40
- package/GeneUIProvider.js +0 -256
- package/Holder.js +0 -99
- package/Image.js +0 -130
- package/ImagePreview.js +0 -99
- package/Label.js +0 -58
- package/LinkButton.js +0 -104
- package/MobileNavigation.js +0 -95
- package/ModuleTitle.js +0 -99
- package/Notification.js +0 -120
- package/Option.js +0 -186
- package/Overlay.js +0 -99
- package/Overspread.js +0 -343
- package/Paper.js +0 -97
- package/Popover.js +0 -20
- package/PopoverV2.js +0 -19
- package/Profile.js +0 -99
- package/Progress.js +0 -200
- package/Range.js +0 -14
- package/RichEditor.js +0 -13
- package/SearchWithDropdown.js +0 -195
- package/Section.js +0 -62
- package/Status.js +0 -104
- package/Steps.js +0 -312
- package/SuggestionList.js +0 -15
- package/Table.js +0 -102
- package/Tabs.js +0 -236
- package/Tag.js +0 -103
- package/TimePicker.js +0 -99
- package/Timeline.js +0 -114
- package/Title.js +0 -66
- package/Uploader.js +0 -32
- package/ValidatableDropdown.js +0 -99
- package/ValidatableElements.js +0 -99
- package/ValidatableMultiSelectDropdown.js +0 -99
- package/Widget.js +0 -99
- package/globalStyling-9c60a159.js +0 -4
- package/index-2030e31c.js +0 -4
- package/index-b7a33c58.js +0 -11
- package/index-e0af0caf.js +0 -1182
- package/useMount-6fef51a5.js +0 -9
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { useState, useEffect, useCallback } from 'react';
|
|
3
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { f as fileSizeDisplay, n as noop } from '../index-a0e4e333.js';
|
|
6
|
+
import Icon from '../Icon/index.js';
|
|
7
|
+
import Button from '../Button/index.js';
|
|
8
|
+
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
|
|
9
|
+
import '../dateValidation-67caec66.js';
|
|
10
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
11
|
+
import 'react-dom';
|
|
12
|
+
|
|
13
|
+
var css_248z = "[data-gene-ui-version=\"2.12.2\"] .progress-holder{color:rgba(var(--background-sc-rgb),.64);display:flex;flex-direction:column;font:600 1.6rem/2rem var(--font-family)}[data-gene-ui-version=\"2.12.2\"] .progress-holder:not(.a-circular){width:100%}[data-gene-ui-version=\"2.12.2\"] .progress-holder.a-default.s-medium{font-size:1.4rem}[data-gene-ui-version=\"2.12.2\"] .progress-holder.a-default.s-small{font-size:1.2rem}[data-gene-ui-version=\"2.12.2\"] .progress-holder.a-default .progress-line{margin:.5rem 0 0}[data-gene-ui-version=\"2.12.2\"] .progress-holder:not(.a-default){font:700 1.2rem/1.6rem var(--font-family)}[data-gene-ui-version=\"2.12.2\"] .progress-holder:not(.a-default) .progress-sub-title{font:600 1rem/1.4rem var(--font-family);margin:.5rem 0 0;text-transform:capitalize}[data-gene-ui-version=\"2.12.2\"] .progress-holder.c-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\"] .progress-holder.c-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\"] .progress-holder .to-be-colored{color:var(--hero)}[data-gene-ui-version=\"2.12.2\"] .progress-holder.a-box-bar,[data-gene-ui-version=\"2.12.2\"] .progress-holder.a-box-circular{background:var(--background);border:1px solid rgba(var(--background-sc-rgb),.1);box-shadow:0 .6rem .9rem 0 #0000000d}[data-gene-ui-version=\"2.12.2\"] .progress-holder.a-box-circular{border-radius:2rem}[data-gene-ui-version=\"2.12.2\"] .progress-line{background:rgba(var(--background-sc-rgb),.06);border-radius:1rem;display:flex;height:.8rem;width:100%}[data-gene-ui-version=\"2.12.2\"] .a-box-bar>.progress-line{background:none;border-radius:0;height:.5rem}[data-gene-ui-version=\"2.12.2\"] .s-medium .progress-line{height:.6rem}[data-gene-ui-version=\"2.12.2\"] .s-small .progress-line{height:.3rem}[data-gene-ui-version=\"2.12.2\"] .progress-line .progress-line-fill{background:var(--hero);border-radius:inherit;max-width:100%;transition:width .3s}[data-gene-ui-version=\"2.12.2\"] .a-linear .progress-line{background:rgba(var(--background-sc-rgb),.19);height:1.6rem}[data-gene-ui-version=\"2.12.2\"] .a-linear .progress-line .progress-line-fill{animation:linear-animation .8s linear infinite;background:repeating-linear-gradient(-45deg,rgba(var(--background-sc-rgb),.34),rgba(var(--background-sc-rgb),.34) 1rem,#0000 1rem,#0000 2rem) 0 0/11.3rem 10rem}@keyframes linear-animation{to{background-position:11.3rem 0}}[data-gene-ui-version=\"2.12.2\"] .a-linear.s-small .progress-line{height:.8rem}[data-gene-ui-version=\"2.12.2\"] .progress-structure{align-items:center;display:flex}[data-gene-ui-version=\"2.12.2\"] .a-detailed>.progress-structure{min-height:5.2rem}[data-gene-ui-version=\"2.12.2\"] .a-box-bar>.progress-structure,[data-gene-ui-version=\"2.12.2\"] .a-box-circular>.progress-structure{min-height:7.3rem;padding:0 2rem}[data-gene-ui-version=\"2.12.2\"] .a-box-circular>.progress-structure{min-height:7.8rem}[data-gene-ui-version=\"2.12.2\"] .progress-structure .left-info{flex:auto;overflow:hidden}[data-gene-ui-version=\"2.12.2\"] .progress-structure .right-info{flex-shrink:0}[data-gene-ui-version=\"2.12.2\"] .progress-structure .blended{color:rgba(var(--background-sc-rgb),.06)}[data-gene-ui-version=\"2.12.2\"] .progress-structure .bc-icon-success{color:var(--confirm);margin:0 .8rem}[data-gene-ui-version=\"2.12.2\"] .progress-structure .left-additional-info{font:600 1.6rem/2rem var(--font-family);margin:0 4rem 0 0;width:5rem}html[dir=rtl] .progress-structure .left-additional-info{margin:0 0 0 4rem}[data-gene-ui-version=\"2.12.2\"] .progress-actions{align-items:center;display:flex}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner{--size:12rem;--borderSize:0.8rem;font:600 2.2rem/2.6rem var(--font-family);height:var(--size);position:relative;width:var(--size)}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner:hover .layer-text,[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner:not(:hover) .layer-action{opacity:0}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner .icon{cursor:pointer}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner:not(.s-very-small) .icon{font-size:3.6rem}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner.s-medium{--size:10rem;--borderSize:0.6rem;font-size:2rem}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner.s-small{--size:8rem;--borderSize:0.5rem;font-size:1.8rem}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner.s-small .icon{font-size:3rem}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner.s-very-small{--size:5rem;--borderSize:0.4rem;font-size:1.2rem;font-weight:700}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner svg{display:block;height:100%;left:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.12.2\"] .circular-progress-inner svg path{stroke:var(--hero);stroke-dasharray:0,30rem;stroke-dashoffset:0;stroke-linecap:round;stroke-width:6;fill-opacity:0}[data-gene-ui-version=\"2.12.2\"] .circular-progress-back{border:var(--borderSize) solid rgba(var(--background-sc-rgb),.06);border-radius:100%;height:100%;width:100%}[data-gene-ui-version=\"2.12.2\"] .circular-progress-layer{display:flex;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%}[data-gene-ui-version=\"2.12.2\"] .circular-progress-layer>div{transition:opacity .3s}[data-gene-ui-version=\"2.12.2\"] .circular-progress-layer .layer-action{left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}[data-gene-ui-version=\"2.12.2\"] .linear-progress-text{font:600 1.8rem/2.2rem var(--font-family);margin:.5rem 0 0;text-align:center;width:100%}[data-gene-ui-version=\"2.12.2\"] .on-hover-layers{align-items:center;display:flex;justify-content:center;min-height:4rem;min-width:4rem;position:relative}[data-gene-ui-version=\"2.12.2\"] .on-hover-layers>li{transition:opacity .3s}[data-gene-ui-version=\"2.12.2\"] .on-hover-layers>li:nth-child(2){height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.12.2\"] .progress-holder:hover .on-hover-layers>li:nth-child(2){opacity:1}[data-gene-ui-version=\"2.12.2\"] .progress-holder:hover .on-hover-layers>li:nth-last-child(2){opacity:0}";
|
|
14
|
+
styleInject(css_248z);
|
|
15
|
+
|
|
16
|
+
function Progress(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
title,
|
|
19
|
+
selectedAppearance,
|
|
20
|
+
selectedSize,
|
|
21
|
+
fileName,
|
|
22
|
+
fullFileSize,
|
|
23
|
+
selectedCircularAppearance,
|
|
24
|
+
percentage,
|
|
25
|
+
loaderStatuses,
|
|
26
|
+
color,
|
|
27
|
+
showCancel,
|
|
28
|
+
showRestart,
|
|
29
|
+
onCancel,
|
|
30
|
+
onRestart,
|
|
31
|
+
pathStyle,
|
|
32
|
+
...restProps
|
|
33
|
+
} = _ref;
|
|
34
|
+
const [percentageUpdated, setPercentageUpdated] = useState(percentage);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const flooredPercentage = percentage >= 100 ? 100 : percentage || 0;
|
|
37
|
+
setPercentageUpdated(flooredPercentage);
|
|
38
|
+
}, [percentage]);
|
|
39
|
+
const currentFileSize = fullFileSize * percentageUpdated / 100;
|
|
40
|
+
const percentageStyle = "".concat(percentageUpdated, "%");
|
|
41
|
+
const restartHandler = useCallback(e => {
|
|
42
|
+
onRestart(e);
|
|
43
|
+
}, [onRestart]);
|
|
44
|
+
const cancelHandler = useCallback(e => {
|
|
45
|
+
onCancel && onCancel(e);
|
|
46
|
+
}, [onCancel]);
|
|
47
|
+
const statusExternal = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "(", percentageStyle, " ", color === 'default' || color === 'success' ? loaderStatuses[0] : loaderStatuses[1], ")");
|
|
48
|
+
const circularProgress = size => /*#__PURE__*/React__default.createElement("div", {
|
|
49
|
+
className: classnames('circular-progress-inner', "s-".concat(size || selectedSize))
|
|
50
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
51
|
+
className: "circular-progress-back"
|
|
52
|
+
}), /*#__PURE__*/React__default.createElement("svg", {
|
|
53
|
+
viewBox: "0 0 100 100"
|
|
54
|
+
}, percentageUpdated && /*#__PURE__*/React__default.createElement("path", {
|
|
55
|
+
d: "M 50,50 m 0,-47a 47,47 0 1 1 0,94a 47,47 0 1 1 0,-94",
|
|
56
|
+
style: {
|
|
57
|
+
strokeDasharray: "".concat(300 * percentageUpdated / 100, "px, 300px"),
|
|
58
|
+
...pathStyle
|
|
59
|
+
}
|
|
60
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
61
|
+
className: "circular-progress-layer"
|
|
62
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
63
|
+
className: classnames({
|
|
64
|
+
'layer-text': selectedAppearance === 'circular',
|
|
65
|
+
'to-be-colored': selectedAppearance === 'circular' && color !== 'default'
|
|
66
|
+
})
|
|
67
|
+
}, selectedCircularAppearance === 'show-percentage' ? percentageStyle : fileName), selectedAppearance === 'circular' && showCancel && /*#__PURE__*/React__default.createElement("div", {
|
|
68
|
+
className: "layer-action"
|
|
69
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
70
|
+
type: "bc-icon-clear"
|
|
71
|
+
}))));
|
|
72
|
+
const progressActions = /*#__PURE__*/React__default.createElement("div", {
|
|
73
|
+
className: "progress-actions"
|
|
74
|
+
}, color === 'fail' && showRestart && /*#__PURE__*/React__default.createElement(Button, {
|
|
75
|
+
size: "big",
|
|
76
|
+
color: "danger",
|
|
77
|
+
onClick: restartHandler,
|
|
78
|
+
appearance: "minimal",
|
|
79
|
+
icon: "bc-icon-reset"
|
|
80
|
+
}), showCancel && /*#__PURE__*/React__default.createElement("ul", {
|
|
81
|
+
className: "on-hover-layers"
|
|
82
|
+
}, color === 'success' && percentage === 100 && /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
83
|
+
type: "bc-icon-success"
|
|
84
|
+
})), /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
85
|
+
size: "big",
|
|
86
|
+
color: "default",
|
|
87
|
+
onClick: cancelHandler,
|
|
88
|
+
appearance: "minimal",
|
|
89
|
+
icon: "bc-icon-clear"
|
|
90
|
+
}))));
|
|
91
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
92
|
+
className: classnames('progress-holder', "a-".concat(selectedAppearance), "s-".concat(selectedSize), "c-".concat(color))
|
|
93
|
+
}, restProps), selectedAppearance === 'circular' ? circularProgress() : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, selectedAppearance !== 'linear' && /*#__PURE__*/React__default.createElement("ul", {
|
|
94
|
+
className: "progress-structure"
|
|
95
|
+
}, selectedAppearance === 'box-circular' && /*#__PURE__*/React__default.createElement("li", {
|
|
96
|
+
className: "left-additional-info"
|
|
97
|
+
}, circularProgress('very-small')), selectedAppearance === 'box-bar' && /*#__PURE__*/React__default.createElement("li", {
|
|
98
|
+
className: "left-additional-info"
|
|
99
|
+
}, percentageStyle), /*#__PURE__*/React__default.createElement("li", {
|
|
100
|
+
className: "left-info"
|
|
101
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
102
|
+
className: "progress-title ellipsis-text"
|
|
103
|
+
}, title), selectedAppearance !== 'default' && /*#__PURE__*/React__default.createElement("div", {
|
|
104
|
+
className: classnames('progress-sub-title', {
|
|
105
|
+
'to-be-colored': color !== 'default' && selectedAppearance !== 'box-circular' && selectedAppearance !== 'box-bar'
|
|
106
|
+
})
|
|
107
|
+
}, fileSizeDisplay(currentFileSize), " / ", fileSizeDisplay(fullFileSize), " ", selectedAppearance === 'detailed' && statusExternal)), /*#__PURE__*/React__default.createElement("li", {
|
|
108
|
+
className: "right-info"
|
|
109
|
+
}, selectedAppearance === 'default' ? /*#__PURE__*/React__default.createElement("div", {
|
|
110
|
+
className: classnames({
|
|
111
|
+
'to-be-colored': color !== 'default',
|
|
112
|
+
blended: percentageUpdated === 0
|
|
113
|
+
})
|
|
114
|
+
}, percentageStyle) : progressActions)), selectedAppearance !== 'box-circular' && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
115
|
+
className: "progress-line"
|
|
116
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
117
|
+
className: "progress-line-fill",
|
|
118
|
+
style: {
|
|
119
|
+
width: percentageStyle
|
|
120
|
+
}
|
|
121
|
+
})), selectedAppearance === 'linear' && /*#__PURE__*/React__default.createElement("div", {
|
|
122
|
+
className: "linear-progress-text"
|
|
123
|
+
}, title))));
|
|
124
|
+
}
|
|
125
|
+
Progress.propTypes = {
|
|
126
|
+
/**
|
|
127
|
+
* Text title for component
|
|
128
|
+
*/
|
|
129
|
+
title: PropTypes.string,
|
|
130
|
+
/**
|
|
131
|
+
* displays filename when selectedCircularAppearance's value is [show-percentage]
|
|
132
|
+
*/
|
|
133
|
+
fileName: PropTypes.string,
|
|
134
|
+
/**
|
|
135
|
+
* Displays cancel button
|
|
136
|
+
*/
|
|
137
|
+
showCancel: PropTypes.bool,
|
|
138
|
+
/**
|
|
139
|
+
* Displays reset button
|
|
140
|
+
*/
|
|
141
|
+
showRestart: PropTypes.bool,
|
|
142
|
+
/**
|
|
143
|
+
* The value of the progress indicator
|
|
144
|
+
*/
|
|
145
|
+
percentage: PropTypes.number,
|
|
146
|
+
/**
|
|
147
|
+
* Size of current file
|
|
148
|
+
*/
|
|
149
|
+
fullFileSize: PropTypes.number,
|
|
150
|
+
/**
|
|
151
|
+
* Style for path
|
|
152
|
+
*/
|
|
153
|
+
pathStyle: PropTypes.object,
|
|
154
|
+
/**
|
|
155
|
+
* Array of text with length of two.
|
|
156
|
+
* If selectedAppearance value is not default
|
|
157
|
+
* It will display either first of second item from array based on color value
|
|
158
|
+
*/
|
|
159
|
+
loaderStatuses: PropTypes.array.isRequired,
|
|
160
|
+
/**
|
|
161
|
+
* Controls color of progress bar
|
|
162
|
+
*/
|
|
163
|
+
color: PropTypes.oneOf(['default', 'fail', 'success']),
|
|
164
|
+
/**
|
|
165
|
+
* Controls size of progress bar
|
|
166
|
+
*/
|
|
167
|
+
selectedSize: PropTypes.oneOf(['big', 'medium', 'small', 'very-small']),
|
|
168
|
+
/**
|
|
169
|
+
* Displays either percent value or file value inside circular progress bar
|
|
170
|
+
*/
|
|
171
|
+
selectedCircularAppearance: PropTypes.oneOf(['show-percentage', 'show-file-name']),
|
|
172
|
+
/**
|
|
173
|
+
* Controls appearance of progress bar
|
|
174
|
+
*/
|
|
175
|
+
selectedAppearance: PropTypes.oneOf(['default', 'detailed', 'circular', 'box-bar', 'box-circular', 'linear']),
|
|
176
|
+
/**
|
|
177
|
+
* Fires event when user clicks on cancel button
|
|
178
|
+
* (event: Event) => void
|
|
179
|
+
*/
|
|
180
|
+
onCancel: PropTypes.func,
|
|
181
|
+
/**
|
|
182
|
+
* Fires event when user clicks on restart button
|
|
183
|
+
* (event: Event) => void
|
|
184
|
+
*/
|
|
185
|
+
onRestart: PropTypes.func
|
|
186
|
+
};
|
|
187
|
+
Progress.defaultProps = {
|
|
188
|
+
onRestart: noop,
|
|
189
|
+
onCancel: noop,
|
|
190
|
+
percentage: 0,
|
|
191
|
+
color: 'default',
|
|
192
|
+
showCancel: true,
|
|
193
|
+
showRestart: true,
|
|
194
|
+
selectedSize: 'small',
|
|
195
|
+
selectedAppearance: 'default',
|
|
196
|
+
selectedCircularAppearance: 'show-percentage'
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export { Progress as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import
|
|
3
|
-
import './globalStyling-9c60a159.js';
|
|
4
|
-
import './style-inject.es-746bb8ed.js';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
5
3
|
|
|
6
4
|
var __defProp = Object.defineProperty;
|
|
7
5
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -794,19 +792,19 @@ QRCode.propTypes = {
|
|
|
794
792
|
/**
|
|
795
793
|
* If you'd like to apply styles to the single container div that your popover content is rendered within via stylesheets
|
|
796
794
|
*/
|
|
797
|
-
value:
|
|
795
|
+
value: PropTypes.string.isRequired,
|
|
798
796
|
/**
|
|
799
797
|
* Specifies the maximum size of QRCode component in pixels.
|
|
800
798
|
* The component behaves adaptively and listens to the parent wrapper.
|
|
801
799
|
*/
|
|
802
|
-
maxSize:
|
|
800
|
+
maxSize: PropTypes.number,
|
|
803
801
|
/**
|
|
804
802
|
* Level L (Low) 7% of data bytes can be restored.
|
|
805
803
|
* Level M (Medium) 15% of data bytes can be restored.
|
|
806
804
|
* Level Q (Quartile)[76] 25% of data bytes can be restored.
|
|
807
805
|
* Level H (High) 30% of data bytes can be restored.
|
|
808
806
|
*/
|
|
809
|
-
level:
|
|
807
|
+
level: PropTypes.oneOf(Object.keys(QRConfig.levels))
|
|
810
808
|
};
|
|
811
809
|
QRCode.defaultProps = {
|
|
812
810
|
maxSize: 400,
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { forwardRef, useMemo } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { c as classnames } from '
|
|
5
|
-
import { c as checkboxRadioSwitcherConfig } from '
|
|
6
|
-
import { i as interceptValue } from '
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import
|
|
10
|
-
import '
|
|
11
|
-
import './_commonjsHelpers-24198af3.js';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { c as checkboxRadioSwitcherConfig } from '../configs-fed6ac34.js';
|
|
6
|
+
import { i as interceptValue } from '../index-a0e4e333.js';
|
|
7
|
+
import '../checkboxRadioSwitcher-5b69d7bd.js';
|
|
8
|
+
import { g as guid } from '../guid-8ddf77b3.js';
|
|
9
|
+
import '../dateValidation-67caec66.js';
|
|
10
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
12
11
|
import 'react-dom';
|
|
13
|
-
import '
|
|
12
|
+
import '../style-inject.es-746bb8ed.js';
|
|
14
13
|
|
|
15
14
|
const Radio = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
16
15
|
let {
|
|
@@ -76,63 +75,63 @@ Radio.propTypes = {
|
|
|
76
75
|
/**
|
|
77
76
|
* Radio size
|
|
78
77
|
*/
|
|
79
|
-
size:
|
|
78
|
+
size: PropTypes.oneOf(checkboxRadioSwitcherConfig.size),
|
|
80
79
|
/**
|
|
81
80
|
* A label will be added to the Radio
|
|
82
81
|
*/
|
|
83
|
-
label:
|
|
82
|
+
label: PropTypes.string,
|
|
84
83
|
/**
|
|
85
84
|
* Specify the label position
|
|
86
85
|
*/
|
|
87
|
-
labelPosition:
|
|
86
|
+
labelPosition: PropTypes.oneOf(checkboxRadioSwitcherConfig.labelPosition),
|
|
88
87
|
/**
|
|
89
88
|
* Specify the label alignment
|
|
90
89
|
*/
|
|
91
|
-
labelAlignment:
|
|
90
|
+
labelAlignment: PropTypes.oneOf(checkboxRadioSwitcherConfig.labelAlignment),
|
|
92
91
|
/**
|
|
93
92
|
* Optional description field
|
|
94
93
|
*/
|
|
95
|
-
description:
|
|
94
|
+
description: PropTypes.string,
|
|
96
95
|
/**
|
|
97
96
|
* Will make Radio readonly when set to "true"
|
|
98
97
|
*/
|
|
99
|
-
readOnly:
|
|
98
|
+
readOnly: PropTypes.bool,
|
|
100
99
|
/**
|
|
101
100
|
* Will make Radio disabled when set to "true"
|
|
102
101
|
*/
|
|
103
|
-
disabled:
|
|
102
|
+
disabled: PropTypes.bool,
|
|
104
103
|
/**
|
|
105
104
|
* Radio will add an extra asterix to the "label". For more info see "ValidatableRadio"(integrated Radio with "Form" organism).
|
|
106
105
|
*/
|
|
107
|
-
required:
|
|
106
|
+
required: PropTypes.bool,
|
|
108
107
|
/**
|
|
109
108
|
* Control Radio validation. For more info see "ValidatableRadio"(integrated Radio with "Form" organism).
|
|
110
109
|
*/
|
|
111
|
-
isValid:
|
|
110
|
+
isValid: PropTypes.bool,
|
|
112
111
|
/**
|
|
113
112
|
* Shows error text when "isValid" is set to "false".
|
|
114
113
|
*/
|
|
115
|
-
errorText:
|
|
114
|
+
errorText: PropTypes.string,
|
|
116
115
|
/**
|
|
117
116
|
* Use this prop to get specified value when "onChange" is fired
|
|
118
117
|
*/
|
|
119
|
-
value:
|
|
118
|
+
value: PropTypes.any,
|
|
120
119
|
/**
|
|
121
120
|
* Fires an event when Radio is clicked((event: Event) => void).
|
|
122
121
|
*/
|
|
123
|
-
onChange:
|
|
122
|
+
onChange: PropTypes.func,
|
|
124
123
|
/**
|
|
125
124
|
* Specifies does the Radio checked or not.
|
|
126
125
|
*/
|
|
127
|
-
checked:
|
|
126
|
+
checked: PropTypes.bool,
|
|
128
127
|
/**
|
|
129
128
|
* Needed for "RadioGroup" molecule
|
|
130
129
|
*/
|
|
131
|
-
name:
|
|
130
|
+
name: PropTypes.string,
|
|
132
131
|
/**
|
|
133
132
|
* Type defines the appearance of the radio
|
|
134
133
|
*/
|
|
135
|
-
type:
|
|
134
|
+
type: PropTypes.oneOf(['default', 'tab'])
|
|
136
135
|
};
|
|
137
136
|
Radio.defaultProps = {
|
|
138
137
|
size: checkboxRadioSwitcherConfig.size[0],
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
2
|
import React__default, { useState, useCallback } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { c as classnames } from '
|
|
5
|
-
import { c as childrenOf } from '
|
|
6
|
-
import Radio from '
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import './_commonjsHelpers-24198af3.js';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { c as childrenOf } from '../index-a0e4e333.js';
|
|
6
|
+
import Radio from '../Radio/index.js';
|
|
7
|
+
import '../dateValidation-67caec66.js';
|
|
8
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
10
9
|
import 'react-dom';
|
|
11
|
-
import '
|
|
12
|
-
import '
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
10
|
+
import '../configs-fed6ac34.js';
|
|
11
|
+
import '../checkboxRadioSwitcher-5b69d7bd.js';
|
|
12
|
+
import '../style-inject.es-746bb8ed.js';
|
|
13
|
+
import '../guid-8ddf77b3.js';
|
|
15
14
|
|
|
16
15
|
function RadioGroup(props) {
|
|
17
16
|
const {
|
|
@@ -56,15 +55,15 @@ RadioGroup.propTypes = {
|
|
|
56
55
|
/**
|
|
57
56
|
* Disabled state
|
|
58
57
|
*/
|
|
59
|
-
disabled:
|
|
58
|
+
disabled: PropTypes.bool,
|
|
60
59
|
/**
|
|
61
60
|
* Validation state
|
|
62
61
|
*/
|
|
63
|
-
required:
|
|
62
|
+
required: PropTypes.bool,
|
|
64
63
|
/**
|
|
65
64
|
* Options/items for radio group
|
|
66
65
|
*/
|
|
67
|
-
options:
|
|
66
|
+
options: PropTypes.arrayOf(PropTypes.oneOfType([childrenOf([Radio]), PropTypes.shape({
|
|
68
67
|
label: Radio.propTypes.label,
|
|
69
68
|
value: Radio.propTypes.value,
|
|
70
69
|
disabled: Radio.propTypes.disabled
|
|
@@ -84,15 +83,15 @@ RadioGroup.propTypes = {
|
|
|
84
83
|
/**
|
|
85
84
|
* Fires an event on change((event: Event) => void)
|
|
86
85
|
*/
|
|
87
|
-
onChange:
|
|
86
|
+
onChange: PropTypes.func,
|
|
88
87
|
/**
|
|
89
88
|
* Type defines the appearance of the radio
|
|
90
89
|
*/
|
|
91
|
-
type:
|
|
90
|
+
type: PropTypes.oneOf(['default', 'tab']),
|
|
92
91
|
/**
|
|
93
92
|
* Description definer: one of keys from your object
|
|
94
93
|
*/
|
|
95
|
-
descriptionKey:
|
|
94
|
+
descriptionKey: PropTypes.string
|
|
96
95
|
};
|
|
97
96
|
RadioGroup.defaultProps = {
|
|
98
97
|
disabled: false,
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { _ as _extends } from '
|
|
2
|
-
import React__default, { useState,
|
|
3
|
-
import
|
|
4
|
-
import { c as classnames } from '
|
|
5
|
-
import { c as createSliderWithTooltip, R as Range } from '
|
|
6
|
-
import
|
|
7
|
-
import '
|
|
1
|
+
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
|
|
2
|
+
import React__default, { useState, useRef, useCallback } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { c as classnames } from '../index-6ff23041.js';
|
|
5
|
+
import { c as createSliderWithTooltip, R as Range } 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 '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, []);
|
|
17
|
-
return [state, toggle];
|
|
18
|
-
}
|
|
9
|
+
import useToggle from '../hooks/useToggle.js';
|
|
10
|
+
import '../configs-fed6ac34.js';
|
|
11
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
12
|
+
import '../index-45eafea6.js';
|
|
13
|
+
import '../react-lifecycles-compat.es-6e1f3768.js';
|
|
14
|
+
import '../style-inject.es-746bb8ed.js';
|
|
15
|
+
import '../hooks/useWindowSize.js';
|
|
19
16
|
|
|
20
17
|
function formatter(value, tooltipType) {
|
|
21
18
|
switch (tooltipType) {
|
|
@@ -119,48 +116,48 @@ RangeMolecule.propTypes = {
|
|
|
119
116
|
/**
|
|
120
117
|
* Controlled value.
|
|
121
118
|
*/
|
|
122
|
-
value:
|
|
119
|
+
value: PropTypes.array,
|
|
123
120
|
/**
|
|
124
121
|
* Disabled state.
|
|
125
122
|
*/
|
|
126
|
-
disabled:
|
|
123
|
+
disabled: PropTypes.bool,
|
|
127
124
|
/**
|
|
128
125
|
* External/Additional className that can be added to 'Range' component.
|
|
129
126
|
*/
|
|
130
|
-
className:
|
|
127
|
+
className: PropTypes.string,
|
|
131
128
|
/**
|
|
132
129
|
* Fires an event on ExtendedInput change((event: Event) => void).
|
|
133
130
|
*/
|
|
134
|
-
onChange:
|
|
131
|
+
onChange: PropTypes.func,
|
|
135
132
|
/**
|
|
136
133
|
* Show/Hide tooltips on 'Range'.
|
|
137
134
|
*/
|
|
138
|
-
withTooltip:
|
|
135
|
+
withTooltip: PropTypes.bool,
|
|
139
136
|
/**
|
|
140
137
|
* Switch on/off small size.
|
|
141
138
|
*/
|
|
142
|
-
isSmallHandler:
|
|
139
|
+
isSmallHandler: PropTypes.bool,
|
|
143
140
|
/**
|
|
144
141
|
* Initial value.
|
|
145
142
|
*/
|
|
146
|
-
defaultValue:
|
|
143
|
+
defaultValue: PropTypes.array,
|
|
147
144
|
/**
|
|
148
145
|
* Show/hide circles.
|
|
149
146
|
*/
|
|
150
|
-
showCircleOnDrag:
|
|
147
|
+
showCircleOnDrag: PropTypes.bool,
|
|
151
148
|
/**
|
|
152
149
|
* Max value.
|
|
153
150
|
*/
|
|
154
|
-
max:
|
|
151
|
+
max: PropTypes.number.isRequired,
|
|
155
152
|
/**
|
|
156
153
|
* Min value.
|
|
157
154
|
*/
|
|
158
|
-
min:
|
|
155
|
+
min: PropTypes.number.isRequired,
|
|
159
156
|
/**
|
|
160
157
|
* Skip steps count.
|
|
161
158
|
*/
|
|
162
|
-
step:
|
|
163
|
-
circleSizeBasedOnRange:
|
|
159
|
+
step: PropTypes.number.isRequired,
|
|
160
|
+
circleSizeBasedOnRange: PropTypes.bool,
|
|
164
161
|
/**
|
|
165
162
|
* Various circle type.
|
|
166
163
|
*/
|
|
@@ -174,11 +171,11 @@ RangeMolecule.propTypes = {
|
|
|
174
171
|
/**
|
|
175
172
|
* Various tooltip types.
|
|
176
173
|
*/
|
|
177
|
-
tooltipType:
|
|
174
|
+
tooltipType: PropTypes.oneOf(['default', 'percentage', 'currency', 'pixel']),
|
|
178
175
|
/**
|
|
179
176
|
* Various themes/colors for component.
|
|
180
177
|
*/
|
|
181
|
-
coloring:
|
|
178
|
+
coloring: PropTypes.oneOf(['primary', 'positive-value', 'negative-value', 'gradient-value'])
|
|
182
179
|
};
|
|
183
180
|
RangeMolecule.defaultProps = {
|
|
184
181
|
disabled: false,
|
|
@@ -190,4 +187,4 @@ RangeMolecule.defaultProps = {
|
|
|
190
187
|
circleSizeBasedOnRange: true
|
|
191
188
|
};
|
|
192
189
|
|
|
193
|
-
export { RangeMolecule as
|
|
190
|
+
export { RangeMolecule as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { R as RichEditor } from '../RichEditor-8b0f7ccd.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'prop-types';
|
|
4
|
+
import '../index-6ff23041.js';
|
|
5
|
+
import '../_commonjsHelpers-24198af3.js';
|
|
6
|
+
import '../index-a0e4e333.js';
|
|
7
|
+
import '../dateValidation-67caec66.js';
|
|
8
|
+
import 'react-dom';
|
|
9
|
+
import '../style-inject.es-746bb8ed.js';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export { RichEditor as default };
|