@luminati-io/uikit 3.9.2 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -35682,8 +35682,7 @@ var UploadItemState = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().
35682
35682
  size = props.size,
35683
35683
  antiVirusScanText = props.antiVirusScanText;
35684
35684
  if (status == _constants__WEBPACK_IMPORTED_MODULE_4__.FILE_STATUS.UPLOADING) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_progress__WEBPACK_IMPORTED_MODULE_3__.ProgressBar, {
35685
- amount: progress,
35686
- capacity: 100
35685
+ progress: progress
35687
35686
  });
35688
35687
  if (status == _constants__WEBPACK_IMPORTED_MODULE_4__.FILE_STATUS.SUCCESS) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_2__.Label, {
35689
35688
  variant: "xs",
@@ -38661,7 +38660,7 @@ __webpack_require__.r(__webpack_exports__);
38661
38660
 
38662
38661
  /*jslint react:true*/
38663
38662
 
38664
- var _excluded = ["type", "text", "secondaryText", "tertiaryText", "description", "size", "children", "variant", "tag", "disabled", "selected", "subMenu", "tooltip", "isFirstItem", "icon", "iconPlacement", "Comp"],
38663
+ var _excluded = ["type", "text", "secondaryText", "tertiaryText", "description", "size", "children", "variant", "tag", "disabled", "selected", "subMenu", "tooltip", "isFirstItem", "icon", "iconPlacement"],
38665
38664
  _excluded2 = ["isLeft"],
38666
38665
  _excluded3 = ["subItems", "children"],
38667
38666
  _excluded4 = ["popover", "onClick"];
@@ -38701,14 +38700,10 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(fu
38701
38700
  isFirstItem = _ref.isFirstItem,
38702
38701
  icon = _ref.icon,
38703
38702
  iconPlacement = _ref.iconPlacement,
38704
- Comp = _ref.Comp,
38705
38703
  rest = _objectWithoutProperties(_ref, _excluded);
38706
38704
  if (type == 'divider') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_menu_item_divider__WEBPACK_IMPORTED_MODULE_11__["default"], {
38707
38705
  ref: ref
38708
38706
  });
38709
- if (type == 'comp' && Comp) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Comp, _extends({
38710
- ref: ref
38711
- }, rest));
38712
38707
  var subItems = buildSubItems(children, {
38713
38708
  size: size
38714
38709
  });
@@ -38762,7 +38757,7 @@ MenuItem.propTypes = {
38762
38757
  secondaryText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
38763
38758
  tertiaryText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
38764
38759
  description: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
38765
- type: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['item', 'divider', 'group', 'comp']),
38760
+ type: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['item', 'divider', 'group']),
38766
38761
  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
38767
38762
  icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_9__.iconNames),
38768
38763
  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape(MenuItem.propTypes)),
@@ -38770,8 +38765,7 @@ MenuItem.propTypes = {
38770
38765
  disabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38771
38766
  selected: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38772
38767
  subMenu: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38773
- tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
38774
- Comp: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
38768
+ tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
38775
38769
  };
38776
38770
  var MenuItemComp = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(function (props, ref) {
38777
38771
  var subItems = props.subItems,
@@ -39525,8 +39519,8 @@ var CompContainer = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_la
39525
39519
  "use strict";
39526
39520
  __webpack_require__.r(__webpack_exports__);
39527
39521
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39528
- /* harmony export */ Progress: () => (/* reexport safe */ _progess__WEBPACK_IMPORTED_MODULE_0__["default"]),
39529
- /* harmony export */ ProgressBar: () => (/* reexport safe */ _progress_bar__WEBPACK_IMPORTED_MODULE_1__["default"])
39522
+ /* harmony export */ Progress: () => (/* reexport safe */ _progess__WEBPACK_IMPORTED_MODULE_0__.Progress),
39523
+ /* harmony export */ ProgressBar: () => (/* reexport safe */ _progress_bar__WEBPACK_IMPORTED_MODULE_1__.ProgressBar)
39530
39524
  /* harmony export */ });
39531
39525
  /* harmony import */ var _progess__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./progess */ "./src/progress/progess.js");
39532
39526
  /* harmony import */ var _progress_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./progress_bar */ "./src/progress/progress_bar.js");
@@ -39537,7 +39531,6 @@ __webpack_require__.r(__webpack_exports__);
39537
39531
 
39538
39532
 
39539
39533
 
39540
-
39541
39534
  /***/ }),
39542
39535
 
39543
39536
  /***/ "./src/progress/progess.js":
@@ -39549,69 +39542,58 @@ __webpack_require__.r(__webpack_exports__);
39549
39542
  "use strict";
39550
39543
  __webpack_require__.r(__webpack_exports__);
39551
39544
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39552
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39545
+ /* harmony export */ Progress: () => (/* binding */ Progress)
39553
39546
  /* harmony export */ });
39554
39547
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types");
39555
39548
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
39556
39549
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
39557
39550
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
39558
39551
  /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
39559
- /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
39560
- /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
39552
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
39553
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
39561
39554
  /* harmony import */ var _progress_bar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./progress_bar */ "./src/progress/progress_bar.js");
39562
39555
  // LICENSE_CODE ZON
39563
39556
 
39564
39557
 
39565
39558
  /*jslint react:true*/
39559
+ var _excluded = ["progress", "leftText", "rightText"];
39560
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
39561
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
39562
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
39566
39563
 
39567
39564
 
39568
39565
 
39569
39566
 
39570
39567
 
39571
39568
 
39572
- var ProgressFraction = function ProgressFraction(props) {
39573
- var amount = props.amount,
39574
- capacity = props.capacity;
39575
- // XXX davidg: implement number formatting by $, bytes, etc.
39576
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
39577
- align_items: "center"
39578
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
39579
- color: "gray_11_50"
39580
- }, amount), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
39581
- color: "gray_11"
39582
- }, "/", capacity));
39583
- };
39584
- ProgressFraction.propTypes = {
39585
- amount: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired,
39586
- capacity: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired
39587
- // unit: PT.string,
39588
- };
39589
- var Progress = function Progress(props) {
39590
- var amount = props.amount,
39591
- capacity = props.capacity,
39592
- label = props.label;
39593
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
39569
+ var Progress = function Progress(_ref) {
39570
+ var progress = _ref.progress,
39571
+ leftText = _ref.leftText,
39572
+ rightText = _ref.rightText,
39573
+ rest = _objectWithoutProperties(_ref, _excluded);
39574
+ var hasText = !!leftText || !!rightText;
39575
+ if (!hasText) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_progress_bar__WEBPACK_IMPORTED_MODULE_5__.ProgressBar, _extends({}, rest, {
39576
+ progress: progress
39577
+ }));
39578
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, _extends({}, (0,_util__WEBPACK_IMPORTED_MODULE_4__.getCommonProps)(rest), {
39594
39579
  flex_direction: "column",
39595
- gap: _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing['03']
39596
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
39580
+ gap: "03"
39581
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
39597
39582
  align_items: "flex-end",
39598
39583
  justify_content: "space-between"
39599
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
39584
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__.Label, {
39600
39585
  color: "gray_11_50"
39601
- }, label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ProgressFraction, {
39602
- amount: amount,
39603
- capacity: capacity
39604
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_progress_bar__WEBPACK_IMPORTED_MODULE_5__["default"], {
39605
- amount: amount,
39606
- capacity: capacity
39586
+ }, leftText), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__.Label, {
39587
+ color: "gray_11_50"
39588
+ }, rightText)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_progress_bar__WEBPACK_IMPORTED_MODULE_5__.ProgressBar, {
39589
+ progress: progress
39607
39590
  }));
39608
39591
  };
39609
39592
  Progress.propTypes = {
39610
- amount: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired,
39611
- capacity: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired,
39612
- label: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
39593
+ progress: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired,
39594
+ leftText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
39595
+ rightText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)
39613
39596
  };
39614
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Progress);
39615
39597
 
39616
39598
  /***/ }),
39617
39599
 
@@ -39624,7 +39606,7 @@ Progress.propTypes = {
39624
39606
  "use strict";
39625
39607
  __webpack_require__.r(__webpack_exports__);
39626
39608
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39627
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39609
+ /* harmony export */ ProgressBar: () => (/* binding */ ProgressBar)
39628
39610
  /* harmony export */ });
39629
39611
  /* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/clamp */ "./node_modules/lodash/clamp.js");
39630
39612
  /* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_clamp__WEBPACK_IMPORTED_MODULE_0__);
@@ -39635,15 +39617,32 @@ __webpack_require__.r(__webpack_exports__);
39635
39617
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types");
39636
39618
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
39637
39619
  /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
39620
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
39638
39621
  // LICENSE_CODE ZON
39639
39622
 
39640
39623
 
39641
39624
  /*jslint react:true*/
39642
39625
 
39626
+ var _excluded = ["progress"];
39627
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
39628
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
39629
+
39643
39630
 
39644
39631
 
39645
39632
 
39646
39633
 
39634
+ var ProgressBar = function ProgressBar(_ref) {
39635
+ var progress = _ref.progress,
39636
+ rest = _objectWithoutProperties(_ref, _excluded);
39637
+ var percentage = lodash_clamp__WEBPACK_IMPORTED_MODULE_0___default()(progress, 0, 100);
39638
+ var percentageFmt = percentage.toFixed(2);
39639
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ProgressBarWrapper, (0,_util__WEBPACK_IMPORTED_MODULE_5__.getCommonProps)(rest), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ProgressBarFill, {
39640
+ $width: percentageFmt
39641
+ }));
39642
+ };
39643
+ ProgressBar.propTypes = {
39644
+ progress: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number).isRequired
39645
+ };
39647
39646
  var ProgressBarWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
39648
39647
  displayName: "ProgressBarWrapper",
39649
39648
  componentId: "sc-k8bgfd-0"
@@ -39652,22 +39651,8 @@ var ProgressBarFill = styled_components__WEBPACK_IMPORTED_MODULE_2___default().d
39652
39651
  displayName: "ProgressBarFill",
39653
39652
  componentId: "sc-k8bgfd-1"
39654
39653
  })(["background-color:", ";border-radius:30px;width:", "%;height:100%;"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.blue_11, function (props) {
39655
- return props.width;
39654
+ return props.$width;
39656
39655
  });
39657
- var ProgressBar = function ProgressBar(props) {
39658
- var amount = props.amount,
39659
- capacity = props.capacity;
39660
- var percentage = lodash_clamp__WEBPACK_IMPORTED_MODULE_0___default()(amount / capacity * 100, 0, 100);
39661
- var percentageFmt = percentage.toFixed(2);
39662
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ProgressBarWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ProgressBarFill, {
39663
- width: percentageFmt
39664
- }));
39665
- };
39666
- ProgressBar.propTypes = {
39667
- amount: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number).isRequired,
39668
- capacity: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number).isRequired
39669
- };
39670
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProgressBar);
39671
39656
 
39672
39657
  /***/ }),
39673
39658
 
@@ -44871,7 +44856,7 @@ var Tooltip = function Tooltip(_ref) {
44871
44856
  closeTimmer.current = setTimeout(function () {
44872
44857
  return setVisible(false);
44873
44858
  }, interactive ? CLOSE_DELAY : 0);
44874
- }, []);
44859
+ }, [interactive]);
44875
44860
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
44876
44861
  return function () {
44877
44862
  clearTimeout(closeTimmer.current);