@luminati-io/uikit 3.9.2 → 4.0.0

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,16 +39542,15 @@ __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");
39561
- /* harmony import */ var _progress_bar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./progress_bar */ "./src/progress/progress_bar.js");
39552
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
39553
+ /* harmony import */ var _progress_bar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./progress_bar */ "./src/progress/progress_bar.js");
39562
39554
  // LICENSE_CODE ZON
39563
39555
 
39564
39556
 
@@ -39568,50 +39560,33 @@ __webpack_require__.r(__webpack_exports__);
39568
39560
 
39569
39561
 
39570
39562
 
39571
-
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;
39563
+ var Progress = function Progress(_ref) {
39564
+ var progress = _ref.progress,
39565
+ leftText = _ref.leftText,
39566
+ rightText = _ref.rightText;
39567
+ var hasText = !!leftText || !!rightText;
39568
+ if (!hasText) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_progress_bar__WEBPACK_IMPORTED_MODULE_4__.ProgressBar, {
39569
+ progress: progress
39570
+ });
39593
39571
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
39594
39572
  flex_direction: "column",
39595
- gap: _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing['03']
39573
+ gap: "03"
39596
39574
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
39597
39575
  align_items: "flex-end",
39598
39576
  justify_content: "space-between"
39599
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
39577
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__.Label, {
39578
+ color: "gray_11_50"
39579
+ }, leftText), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__.Label, {
39600
39580
  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
39581
+ }, rightText)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_progress_bar__WEBPACK_IMPORTED_MODULE_4__.ProgressBar, {
39582
+ progress: progress
39607
39583
  }));
39608
39584
  };
39609
39585
  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)
39586
+ progress: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired,
39587
+ leftText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
39588
+ rightText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)
39613
39589
  };
39614
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Progress);
39615
39590
 
39616
39591
  /***/ }),
39617
39592
 
@@ -39624,7 +39599,7 @@ Progress.propTypes = {
39624
39599
  "use strict";
39625
39600
  __webpack_require__.r(__webpack_exports__);
39626
39601
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39627
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39602
+ /* harmony export */ ProgressBar: () => (/* binding */ ProgressBar)
39628
39603
  /* harmony export */ });
39629
39604
  /* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/clamp */ "./node_modules/lodash/clamp.js");
39630
39605
  /* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_clamp__WEBPACK_IMPORTED_MODULE_0__);
@@ -39644,6 +39619,17 @@ __webpack_require__.r(__webpack_exports__);
39644
39619
 
39645
39620
 
39646
39621
 
39622
+ var ProgressBar = function ProgressBar(_ref) {
39623
+ var progress = _ref.progress;
39624
+ var percentage = lodash_clamp__WEBPACK_IMPORTED_MODULE_0___default()(progress, 0, 100);
39625
+ var percentageFmt = percentage.toFixed(2);
39626
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ProgressBarWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ProgressBarFill, {
39627
+ $width: percentageFmt
39628
+ }));
39629
+ };
39630
+ ProgressBar.propTypes = {
39631
+ progress: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number).isRequired
39632
+ };
39647
39633
  var ProgressBarWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
39648
39634
  displayName: "ProgressBarWrapper",
39649
39635
  componentId: "sc-k8bgfd-0"
@@ -39652,22 +39638,8 @@ var ProgressBarFill = styled_components__WEBPACK_IMPORTED_MODULE_2___default().d
39652
39638
  displayName: "ProgressBarFill",
39653
39639
  componentId: "sc-k8bgfd-1"
39654
39640
  })(["background-color:", ";border-radius:30px;width:", "%;height:100%;"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.blue_11, function (props) {
39655
- return props.width;
39641
+ return props.$width;
39656
39642
  });
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
39643
 
39672
39644
  /***/ }),
39673
39645