@geneui/components 2.11.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.
Files changed (154) hide show
  1. package/ActionableList.js +1761 -0
  2. package/AdvancedSearch.js +872 -0
  3. package/Alert.js +98 -0
  4. package/Avatar.js +77 -0
  5. package/Badge.js +76 -0
  6. package/Breadcrumb.js +128 -0
  7. package/BusyLoader.js +69 -0
  8. package/Button.js +130 -0
  9. package/CHANGELOG.md +424 -0
  10. package/Card.js +513 -0
  11. package/CardList.js +705 -0
  12. package/CellMeasurerCache-c11cec83.js +229 -0
  13. package/Charts.js +99 -0
  14. package/Checkbox.js +232 -0
  15. package/CheckboxGroup.js +206 -0
  16. package/CheckboxGroupWithSearch.js +279 -0
  17. package/Collapse.js +196 -0
  18. package/ColorPicker.js +210 -0
  19. package/ComboBox.js +99 -0
  20. package/Counter.js +99 -0
  21. package/DateFilter.js +179 -0
  22. package/DatePicker.js +1231 -0
  23. package/DatePickerInput.js +30 -0
  24. package/Divider.js +56 -0
  25. package/Drawer.js +264 -0
  26. package/Dropdown.js +99 -0
  27. package/Editor.js +22965 -0
  28. package/Empty.js +132 -0
  29. package/ExtendedInput.js +578 -0
  30. package/Form.js +116 -0
  31. package/FormContainer.js +189 -0
  32. package/FormableCheckbox.js +27 -0
  33. package/FormableDatePicker.js +39 -0
  34. package/FormableDropdown.js +105 -0
  35. package/FormableEditor.js +24 -0
  36. package/FormableHOC-21051057.js +83 -0
  37. package/FormableMultiSelectDropdown.js +105 -0
  38. package/FormableNumberInput.js +31 -0
  39. package/FormableRadio.js +23 -0
  40. package/FormableSwitcher.js +23 -0
  41. package/FormableTextInput.js +31 -0
  42. package/FormableUploader.js +40 -0
  43. package/GeneUIProvider.js +256 -0
  44. package/Grid.js +166 -0
  45. package/Holder.js +99 -0
  46. package/Icon.js +63 -0
  47. package/Image.js +130 -0
  48. package/ImagePreview.js +99 -0
  49. package/KeyValue.js +63 -0
  50. package/Label.js +58 -0
  51. package/LinkButton.js +104 -0
  52. package/Menu.js +277 -0
  53. package/MobileNavigation.js +95 -0
  54. package/MobilePopup.js +180 -0
  55. package/Modal.js +251 -0
  56. package/ModuleTitle.js +99 -0
  57. package/NavigationMenu.js +212 -0
  58. package/Notification.js +120 -0
  59. package/Option.js +186 -0
  60. package/Overlay.js +99 -0
  61. package/Overspread.js +343 -0
  62. package/Pagination.js +258 -0
  63. package/Paper.js +97 -0
  64. package/Popover-f4d1cac0.js +411 -0
  65. package/Popover.js +20 -0
  66. package/PopoverV2.js +19 -0
  67. package/Portal.js +58 -0
  68. package/Products.js +115 -0
  69. package/Profile.js +99 -0
  70. package/Progress.js +200 -0
  71. package/QRCode.js +816 -0
  72. package/README.md +90 -0
  73. package/Radio.js +152 -0
  74. package/RadioGroup.js +105 -0
  75. package/Range.js +14 -0
  76. package/RichEditor-b7928765.js +228 -0
  77. package/RichEditor.js +13 -0
  78. package/Scrollbar.js +1587 -0
  79. package/Search.js +72 -0
  80. package/SearchWithDropdown.js +195 -0
  81. package/Section.js +62 -0
  82. package/SkeletonLoader.js +82 -0
  83. package/Slider.js +256 -0
  84. package/Status.js +104 -0
  85. package/Steps.js +312 -0
  86. package/SuggestionList.js +15 -0
  87. package/Switcher.js +194 -0
  88. package/Table.js +102 -0
  89. package/TableCompositions.js +17028 -0
  90. package/Tabs.js +236 -0
  91. package/Tag.js +103 -0
  92. package/TextLink.js +22 -0
  93. package/Textarea.js +239 -0
  94. package/Time.js +63 -0
  95. package/TimePicker.js +99 -0
  96. package/Timeline.js +114 -0
  97. package/Title.js +66 -0
  98. package/Toaster.js +116 -0
  99. package/Tooltip.js +157 -0
  100. package/TransferList.js +502 -0
  101. package/Uploader.js +32 -0
  102. package/ValidatableCheckbox.js +126 -0
  103. package/ValidatableDatePicker.js +312 -0
  104. package/ValidatableDropdown.js +99 -0
  105. package/ValidatableElements.js +99 -0
  106. package/ValidatableMultiSelectDropdown.js +99 -0
  107. package/ValidatableNumberInput.js +194 -0
  108. package/ValidatableRadio.js +117 -0
  109. package/ValidatableSwitcher.js +94 -0
  110. package/ValidatableTextInput.js +164 -0
  111. package/ValidatableTimeInput.js +171 -0
  112. package/ValidatableUploader.js +94 -0
  113. package/Widget.js +99 -0
  114. package/_commonjsHelpers-24198af3.js +35 -0
  115. package/_rollupPluginBabelHelpers-e8fb2e5c.js +16 -0
  116. package/checkTimeValidation-e56771be.js +16 -0
  117. package/checkboxRadioSwitcher-5b69d7bd.js +4 -0
  118. package/clsx.m-2bb6df4b.js +3 -0
  119. package/configs-91c86664.js +96 -0
  120. package/configs.js +131 -0
  121. package/dateValidation-67caec66.js +225 -0
  122. package/debounce-4419bc2f.js +17 -0
  123. package/globalStyling-9c60a159.js +4 -0
  124. package/guid-8ddf77b3.js +16 -0
  125. package/index-00fe8887.js +193 -0
  126. package/index-0cf65939.js +30991 -0
  127. package/index-122432cd.js +270 -0
  128. package/index-262edd7a.js +77 -0
  129. package/index-5cea9a7d.js +407 -0
  130. package/index-5e722d91.js +867 -0
  131. package/index-67f4d4d1.js +6568 -0
  132. package/index-6ff23041.js +66 -0
  133. package/index-702bf24a.js +1938 -0
  134. package/index-a4635754.js +329 -0
  135. package/index-a59530cd.js +4 -0
  136. package/index-ac59cb10.js +169 -0
  137. package/index-b7a33c58.js +11 -0
  138. package/index-d9e8a888.js +987 -0
  139. package/index-e0af0caf.js +1182 -0
  140. package/index-e8776f3d.js +807 -0
  141. package/index.js +128 -0
  142. package/localization-4ba17032.js +46 -0
  143. package/objectWithoutPropertiesLoose-299691d8.js +78 -0
  144. package/package.json +190 -0
  145. package/rangeAndSlider-20599da4.js +8839 -0
  146. package/react-beautiful-dnd.esm-38c37304.js +10117 -0
  147. package/style-inject.es-746bb8ed.js +28 -0
  148. package/useClickOutside-5183e396.js +25 -0
  149. package/useDeviceType-dd51db38.js +15 -0
  150. package/useEllipsisDetection-ef536015.js +23 -0
  151. package/useKeyDown-38102ae7.js +21 -0
  152. package/useMount-6fef51a5.js +9 -0
  153. package/useWidth-9f4647f8.js +15 -0
  154. package/useWindowSize-80369d76.js +33 -0
package/Profile.js ADDED
@@ -0,0 +1,99 @@
1
+ import './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import 'react';
3
+ import './index-e0af0caf.js';
4
+ import './configs-91c86664.js';
5
+ import './index-ac59cb10.js';
6
+ import './index-00fe8887.js';
7
+ import './useDeviceType-dd51db38.js';
8
+ import './useClickOutside-5183e396.js';
9
+ import './index-6ff23041.js';
10
+ import './Icon.js';
11
+ import './Avatar.js';
12
+ import './index-702bf24a.js';
13
+ import './Tooltip.js';
14
+ import './Menu.js';
15
+ export { P as default } from './index-0cf65939.js';
16
+ import './globalStyling-9c60a159.js';
17
+ import './ExtendedInput.js';
18
+ import './Search.js';
19
+ import './TextLink.js';
20
+ import './Button.js';
21
+ import './Label.js';
22
+ import './Switcher.js';
23
+ import './Divider.js';
24
+ import './Radio.js';
25
+ import './Paper.js';
26
+ import './Portal.js';
27
+ import './Badge.js';
28
+ import './BusyLoader.js';
29
+ import './SkeletonLoader.js';
30
+ import './Scrollbar.js';
31
+ import './Time.js';
32
+ import './Empty.js';
33
+ import './index-a4635754.js';
34
+ import './Title.js';
35
+ import './Image.js';
36
+ import './KeyValue.js';
37
+ import './Option.js';
38
+ import './QRCode.js';
39
+ import './dateValidation-67caec66.js';
40
+ import './_commonjsHelpers-24198af3.js';
41
+ import 'react-dom';
42
+ import './rangeAndSlider-20599da4.js';
43
+ import './style-inject.es-746bb8ed.js';
44
+ import './useWidth-9f4647f8.js';
45
+ import './useWindowSize-80369d76.js';
46
+ import './index-122432cd.js';
47
+ import './GeneUIProvider.js';
48
+ import './debounce-4419bc2f.js';
49
+ import './Popover-f4d1cac0.js';
50
+ import './useEllipsisDetection-ef536015.js';
51
+ import './Editor.js';
52
+ import './useMount-6fef51a5.js';
53
+ import './ValidatableUploader.js';
54
+ import './index-d9e8a888.js';
55
+ import './Grid.js';
56
+ import './useKeyDown-38102ae7.js';
57
+ import './Checkbox.js';
58
+ import './checkboxRadioSwitcher-5b69d7bd.js';
59
+ import './guid-8ddf77b3.js';
60
+ import './index-5cea9a7d.js';
61
+ import './ValidatableRadio.js';
62
+ import './RadioGroup.js';
63
+ import './ValidatableCheckbox.js';
64
+ import './ValidatableSwitcher.js';
65
+ import './ValidatableNumberInput.js';
66
+ import './ValidatableTextInput.js';
67
+ import './ValidatableDatePicker.js';
68
+ import './index-5e722d91.js';
69
+ import './DatePicker.js';
70
+ import './localization-4ba17032.js';
71
+ import './checkTimeValidation-e56771be.js';
72
+ import './Tabs.js';
73
+ import './Steps.js';
74
+ import './Timeline.js';
75
+ import './Card.js';
76
+ import './MobilePopup.js';
77
+ import './configs.js';
78
+ import './Tag.js';
79
+ import './Alert.js';
80
+ import './Slider.js';
81
+ import './Pagination.js';
82
+ import './objectWithoutPropertiesLoose-299691d8.js';
83
+ import './clsx.m-2bb6df4b.js';
84
+ import './index-a59530cd.js';
85
+ import './Notification.js';
86
+ import './Modal.js';
87
+ import './Collapse.js';
88
+ import './Status.js';
89
+ import './index-b7a33c58.js';
90
+ import './Progress.js';
91
+ import './MobileNavigation.js';
92
+ import './Products.js';
93
+ import './Breadcrumb.js';
94
+ import './Section.js';
95
+ import './ColorPicker.js';
96
+ import './NavigationMenu.js';
97
+ import './Textarea.js';
98
+ import './AdvancedSearch.js';
99
+ import './LinkButton.js';
package/Progress.js ADDED
@@ -0,0 +1,200 @@
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 { p as propTypesExports } from './index-e0af0caf.js';
5
+ import { f as fileSizeDisplay, n as noop } from './index-ac59cb10.js';
6
+ import Icon from './Icon.js';
7
+ import Button from './Button.js';
8
+ import './globalStyling-9c60a159.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
+
14
+ var css_248z = "[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .progress-holder:not(.a-circular){width:100%}[data-gene-ui-version=\"2.11.0\"] .progress-holder.a-default.s-medium{font-size:1.4rem}[data-gene-ui-version=\"2.11.0\"] .progress-holder.a-default.s-small{font-size:1.2rem}[data-gene-ui-version=\"2.11.0\"] .progress-holder.a-default .progress-line{margin:.5rem 0 0}[data-gene-ui-version=\"2.11.0\"] .progress-holder:not(.a-default){font:700 1.2rem/1.6rem var(--font-family)}[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .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.11.0\"] .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.11.0\"] .progress-holder .to-be-colored{color:var(--hero)}[data-gene-ui-version=\"2.11.0\"] .progress-holder.a-box-bar,[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .progress-holder.a-box-circular{border-radius:2rem}[data-gene-ui-version=\"2.11.0\"] .progress-line{background:rgba(var(--background-sc-rgb),.06);border-radius:1rem;display:flex;height:.8rem;width:100%}[data-gene-ui-version=\"2.11.0\"] .a-box-bar>.progress-line{background:none;border-radius:0;height:.5rem}[data-gene-ui-version=\"2.11.0\"] .s-medium .progress-line{height:.6rem}[data-gene-ui-version=\"2.11.0\"] .s-small .progress-line{height:.3rem}[data-gene-ui-version=\"2.11.0\"] .progress-line .progress-line-fill{background:var(--hero);border-radius:inherit;max-width:100%;transition:width .3s}[data-gene-ui-version=\"2.11.0\"] .a-linear .progress-line{background:rgba(var(--background-sc-rgb),.19);height:1.6rem}[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .a-linear.s-small .progress-line{height:.8rem}[data-gene-ui-version=\"2.11.0\"] .progress-structure{align-items:center;display:flex}[data-gene-ui-version=\"2.11.0\"] .a-detailed>.progress-structure{min-height:5.2rem}[data-gene-ui-version=\"2.11.0\"] .a-box-bar>.progress-structure,[data-gene-ui-version=\"2.11.0\"] .a-box-circular>.progress-structure{min-height:7.3rem;padding:0 2rem}[data-gene-ui-version=\"2.11.0\"] .a-box-circular>.progress-structure{min-height:7.8rem}[data-gene-ui-version=\"2.11.0\"] .progress-structure .left-info{flex:auto;overflow:hidden}[data-gene-ui-version=\"2.11.0\"] .progress-structure .right-info{flex-shrink:0}[data-gene-ui-version=\"2.11.0\"] .progress-structure .blended{color:rgba(var(--background-sc-rgb),.06)}[data-gene-ui-version=\"2.11.0\"] .progress-structure .bc-icon-success{color:var(--confirm);margin:0 .8rem}[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .progress-actions{align-items:center;display:flex}[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .circular-progress-inner:hover .layer-text,[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner:not(:hover) .layer-action{opacity:0}[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner .icon{cursor:pointer}[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner:not(.s-very-small) .icon{font-size:3.6rem}[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner.s-medium{--size:10rem;--borderSize:0.6rem;font-size:2rem}[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner.s-small{--size:8rem;--borderSize:0.5rem;font-size:1.8rem}[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner.s-small .icon{font-size:3rem}[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner.s-very-small{--size:5rem;--borderSize:0.4rem;font-size:1.2rem;font-weight:700}[data-gene-ui-version=\"2.11.0\"] .circular-progress-inner svg{display:block;height:100%;left:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .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.11.0\"] .circular-progress-layer{display:flex;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%}[data-gene-ui-version=\"2.11.0\"] .circular-progress-layer>div{transition:opacity .3s}[data-gene-ui-version=\"2.11.0\"] .circular-progress-layer .layer-action{left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}[data-gene-ui-version=\"2.11.0\"] .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.11.0\"] .on-hover-layers{align-items:center;display:flex;justify-content:center;min-height:4rem;min-width:4rem;position:relative}[data-gene-ui-version=\"2.11.0\"] .on-hover-layers>li{transition:opacity .3s}[data-gene-ui-version=\"2.11.0\"] .on-hover-layers>li:nth-child(2){height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.11.0\"] .progress-holder:hover .on-hover-layers>li:nth-child(2){opacity:1}[data-gene-ui-version=\"2.11.0\"] .progress-holder:hover .on-hover-layers>li:nth-last-child(2){opacity:0}";
15
+ styleInject(css_248z);
16
+
17
+ function Progress(_ref) {
18
+ let {
19
+ title,
20
+ selectedAppearance,
21
+ selectedSize,
22
+ fileName,
23
+ fullFileSize,
24
+ selectedCircularAppearance,
25
+ percentage,
26
+ loaderStatuses,
27
+ color,
28
+ showCancel,
29
+ showRestart,
30
+ onCancel,
31
+ onRestart,
32
+ pathStyle,
33
+ ...restProps
34
+ } = _ref;
35
+ const [percentageUpdated, setPercentageUpdated] = useState(percentage);
36
+ useEffect(() => {
37
+ const flooredPercentage = percentage >= 100 ? 100 : percentage || 0;
38
+ setPercentageUpdated(flooredPercentage);
39
+ }, [percentage]);
40
+ const currentFileSize = fullFileSize * percentageUpdated / 100;
41
+ const percentageStyle = "".concat(percentageUpdated, "%");
42
+ const restartHandler = useCallback(e => {
43
+ onRestart(e);
44
+ }, [onRestart]);
45
+ const cancelHandler = useCallback(e => {
46
+ onCancel && onCancel(e);
47
+ }, [onCancel]);
48
+ const statusExternal = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "(", percentageStyle, " ", color === 'default' || color === 'success' ? loaderStatuses[0] : loaderStatuses[1], ")");
49
+ const circularProgress = size => /*#__PURE__*/React__default.createElement("div", {
50
+ className: classnames('circular-progress-inner', "s-".concat(size || selectedSize))
51
+ }, /*#__PURE__*/React__default.createElement("div", {
52
+ className: "circular-progress-back"
53
+ }), /*#__PURE__*/React__default.createElement("svg", {
54
+ viewBox: "0 0 100 100"
55
+ }, percentageUpdated && /*#__PURE__*/React__default.createElement("path", {
56
+ d: "M 50,50 m 0,-47a 47,47 0 1 1 0,94a 47,47 0 1 1 0,-94",
57
+ style: {
58
+ strokeDasharray: "".concat(300 * percentageUpdated / 100, "px, 300px"),
59
+ ...pathStyle
60
+ }
61
+ })), /*#__PURE__*/React__default.createElement("div", {
62
+ className: "circular-progress-layer"
63
+ }, /*#__PURE__*/React__default.createElement("div", {
64
+ className: classnames({
65
+ 'layer-text': selectedAppearance === 'circular',
66
+ 'to-be-colored': selectedAppearance === 'circular' && color !== 'default'
67
+ })
68
+ }, selectedCircularAppearance === 'show-percentage' ? percentageStyle : fileName), selectedAppearance === 'circular' && showCancel && /*#__PURE__*/React__default.createElement("div", {
69
+ className: "layer-action"
70
+ }, /*#__PURE__*/React__default.createElement(Icon, {
71
+ type: "bc-icon-clear"
72
+ }))));
73
+ const progressActions = /*#__PURE__*/React__default.createElement("div", {
74
+ className: "progress-actions"
75
+ }, color === 'fail' && showRestart && /*#__PURE__*/React__default.createElement(Button, {
76
+ size: "big",
77
+ color: "danger",
78
+ onClick: restartHandler,
79
+ appearance: "minimal",
80
+ icon: "bc-icon-reset"
81
+ }), showCancel && /*#__PURE__*/React__default.createElement("ul", {
82
+ className: "on-hover-layers"
83
+ }, color === 'success' && percentage === 100 && /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(Icon, {
84
+ type: "bc-icon-success"
85
+ })), /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(Button, {
86
+ size: "big",
87
+ color: "default",
88
+ onClick: cancelHandler,
89
+ appearance: "minimal",
90
+ icon: "bc-icon-clear"
91
+ }))));
92
+ return /*#__PURE__*/React__default.createElement("div", _extends({
93
+ className: classnames('progress-holder', "a-".concat(selectedAppearance), "s-".concat(selectedSize), "c-".concat(color))
94
+ }, restProps), selectedAppearance === 'circular' ? circularProgress() : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, selectedAppearance !== 'linear' && /*#__PURE__*/React__default.createElement("ul", {
95
+ className: "progress-structure"
96
+ }, selectedAppearance === 'box-circular' && /*#__PURE__*/React__default.createElement("li", {
97
+ className: "left-additional-info"
98
+ }, circularProgress('very-small')), selectedAppearance === 'box-bar' && /*#__PURE__*/React__default.createElement("li", {
99
+ className: "left-additional-info"
100
+ }, percentageStyle), /*#__PURE__*/React__default.createElement("li", {
101
+ className: "left-info"
102
+ }, /*#__PURE__*/React__default.createElement("div", {
103
+ className: "progress-title ellipsis-text"
104
+ }, title), selectedAppearance !== 'default' && /*#__PURE__*/React__default.createElement("div", {
105
+ className: classnames('progress-sub-title', {
106
+ 'to-be-colored': color !== 'default' && selectedAppearance !== 'box-circular' && selectedAppearance !== 'box-bar'
107
+ })
108
+ }, fileSizeDisplay(currentFileSize), " / ", fileSizeDisplay(fullFileSize), " ", selectedAppearance === 'detailed' && statusExternal)), /*#__PURE__*/React__default.createElement("li", {
109
+ className: "right-info"
110
+ }, selectedAppearance === 'default' ? /*#__PURE__*/React__default.createElement("div", {
111
+ className: classnames({
112
+ 'to-be-colored': color !== 'default',
113
+ blended: percentageUpdated === 0
114
+ })
115
+ }, percentageStyle) : progressActions)), selectedAppearance !== 'box-circular' && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
116
+ className: "progress-line"
117
+ }, /*#__PURE__*/React__default.createElement("div", {
118
+ className: "progress-line-fill",
119
+ style: {
120
+ width: percentageStyle
121
+ }
122
+ })), selectedAppearance === 'linear' && /*#__PURE__*/React__default.createElement("div", {
123
+ className: "linear-progress-text"
124
+ }, title))));
125
+ }
126
+ Progress.propTypes = {
127
+ /**
128
+ * Text title for component
129
+ */
130
+ title: propTypesExports.string,
131
+ /**
132
+ * displays filename when selectedCircularAppearance's value is [show-percentage]
133
+ */
134
+ fileName: propTypesExports.string,
135
+ /**
136
+ * Displays cancel button
137
+ */
138
+ showCancel: propTypesExports.bool,
139
+ /**
140
+ * Displays reset button
141
+ */
142
+ showRestart: propTypesExports.bool,
143
+ /**
144
+ * The value of the progress indicator
145
+ */
146
+ percentage: propTypesExports.number,
147
+ /**
148
+ * Size of current file
149
+ */
150
+ fullFileSize: propTypesExports.number,
151
+ /**
152
+ * Style for path
153
+ */
154
+ pathStyle: propTypesExports.object,
155
+ /**
156
+ * Array of text with length of two.
157
+ * If selectedAppearance value is not default
158
+ * It will display either first of second item from array based on color value
159
+ */
160
+ loaderStatuses: propTypesExports.array.isRequired,
161
+ /**
162
+ * Controls color of progress bar
163
+ */
164
+ color: propTypesExports.oneOf(['default', 'fail', 'success']),
165
+ /**
166
+ * Controls size of progress bar
167
+ */
168
+ selectedSize: propTypesExports.oneOf(['big', 'medium', 'small', 'very-small']),
169
+ /**
170
+ * Displays either percent value or file value inside circular progress bar
171
+ */
172
+ selectedCircularAppearance: propTypesExports.oneOf(['show-percentage', 'show-file-name']),
173
+ /**
174
+ * Controls appearance of progress bar
175
+ */
176
+ selectedAppearance: propTypesExports.oneOf(['default', 'detailed', 'circular', 'box-bar', 'box-circular', 'linear']),
177
+ /**
178
+ * Fires event when user clicks on cancel button
179
+ * (event: Event) => void
180
+ */
181
+ onCancel: propTypesExports.func,
182
+ /**
183
+ * Fires event when user clicks on restart button
184
+ * (event: Event) => void
185
+ */
186
+ onRestart: propTypesExports.func
187
+ };
188
+ Progress.defaultProps = {
189
+ onRestart: noop,
190
+ onCancel: noop,
191
+ percentage: 0,
192
+ color: 'default',
193
+ showCancel: true,
194
+ showRestart: true,
195
+ selectedSize: 'small',
196
+ selectedAppearance: 'default',
197
+ selectedCircularAppearance: 'show-percentage'
198
+ };
199
+
200
+ export { Progress as default };