@luminati-io/uikit 3.9.2-beta.0 → 3.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -32755,7 +32755,7 @@ __webpack_require__.r(__webpack_exports__);
32755
32755
 
32756
32756
 
32757
32757
  /*jslint react:true*/
32758
- var _excluded = ["variant", "disabled", "active", "icon", "tooltip", "tooltipPlacement", "size", "noBackColor"];
32758
+ var _excluded = ["variant", "disabled", "active", "icon", "tooltip", "tooltipPlacement", "size", "noBackColor", "noBorder"];
32759
32759
  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); }
32760
32760
  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; }
32761
32761
  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; }
@@ -32777,6 +32777,7 @@ var IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwa
32777
32777
  _ref$size = _ref.size,
32778
32778
  size = _ref$size === void 0 ? 'md' : _ref$size,
32779
32779
  noBackColor = _ref.noBackColor,
32780
+ noBorder = _ref.noBorder,
32780
32781
  rest = _objectWithoutProperties(_ref, _excluded);
32781
32782
  size = calcSize(variant, size);
32782
32783
  noBackColor = variant == 'ghost' || noBackColor;
@@ -32791,6 +32792,7 @@ var IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwa
32791
32792
  }, rest, {
32792
32793
  disabled: disabled,
32793
32794
  $size: size,
32795
+ $noBorder: noBorder,
32794
32796
  $noBackColor: noBackColor,
32795
32797
  $active: active
32796
32798
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledSvg, {
@@ -32809,7 +32811,8 @@ IconButton.propTypes = {
32809
32811
  tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node),
32810
32812
  tooltipPlacement: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(_util__WEBPACK_IMPORTED_MODULE_4__.tooltipPlacement),
32811
32813
  size: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['xs', 'sm', 'md', 'lg']),
32812
- noBackColor: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool)
32814
+ noBackColor: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
32815
+ noBorder: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool)
32813
32816
  };
32814
32817
  var StyledIconButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().button.withConfig({
32815
32818
  displayName: "StyledIconButton",
@@ -32838,7 +32841,7 @@ var StyledIconButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().
32838
32841
  hoverBackColor = 'transparent';
32839
32842
  activeBackColor = 'transparent';
32840
32843
  }
32841
- if (props.$size == 'xs') {
32844
+ if (props.$size == 'xs' || props.$noBorder) {
32842
32845
  hoverBorder = '0 none';
32843
32846
  activeBorder = '0 none';
32844
32847
  disabledBorder = '0 none';
@@ -34075,15 +34078,17 @@ var addItem = function addItem(matrix, i, j, item) {
34075
34078
  var noop = function noop() {
34076
34079
  return 0;
34077
34080
  };
34081
+ var defaultValue = [[]];
34082
+ var emptyArray = [];
34078
34083
  var DragDrop = function DragDrop(_ref) {
34079
34084
  var _ref$value = _ref.value,
34080
- value = _ref$value === void 0 ? [[]] : _ref$value,
34085
+ value = _ref$value === void 0 ? defaultValue : _ref$value,
34081
34086
  _ref$onChange = _ref.onChange,
34082
34087
  onChange = _ref$onChange === void 0 ? noop : _ref$onChange,
34083
34088
  _ref$items = _ref.items,
34084
- items = _ref$items === void 0 ? [] : _ref$items,
34089
+ items = _ref$items === void 0 ? emptyArray : _ref$items,
34085
34090
  _ref$sections = _ref.sections,
34086
- sections = _ref$sections === void 0 ? [] : _ref$sections,
34091
+ sections = _ref$sections === void 0 ? emptyArray : _ref$sections,
34087
34092
  _ref$direction = _ref.direction,
34088
34093
  direction = _ref$direction === void 0 ? 'row' : _ref$direction,
34089
34094
  CustomDrop = _ref.CustomDrop,
@@ -38656,7 +38661,7 @@ __webpack_require__.r(__webpack_exports__);
38656
38661
 
38657
38662
  /*jslint react:true*/
38658
38663
 
38659
- var _excluded = ["type", "text", "secondaryText", "tertiaryText", "description", "size", "children", "variant", "tag", "disabled", "selected", "subMenu", "tooltip", "isFirstItem", "icon", "iconPlacement"],
38664
+ var _excluded = ["type", "text", "secondaryText", "tertiaryText", "description", "size", "children", "variant", "tag", "disabled", "selected", "subMenu", "tooltip", "isFirstItem", "icon", "iconPlacement", "Comp"],
38660
38665
  _excluded2 = ["isLeft"],
38661
38666
  _excluded3 = ["subItems", "children"],
38662
38667
  _excluded4 = ["popover", "onClick"];
@@ -38696,10 +38701,14 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(fu
38696
38701
  isFirstItem = _ref.isFirstItem,
38697
38702
  icon = _ref.icon,
38698
38703
  iconPlacement = _ref.iconPlacement,
38704
+ Comp = _ref.Comp,
38699
38705
  rest = _objectWithoutProperties(_ref, _excluded);
38700
38706
  if (type == 'divider') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_menu_item_divider__WEBPACK_IMPORTED_MODULE_11__["default"], {
38701
38707
  ref: ref
38702
38708
  });
38709
+ if (type == 'comp' && Comp) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Comp, _extends({
38710
+ ref: ref
38711
+ }, rest));
38703
38712
  var subItems = buildSubItems(children, {
38704
38713
  size: size
38705
38714
  });
@@ -38753,7 +38762,7 @@ MenuItem.propTypes = {
38753
38762
  secondaryText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
38754
38763
  tertiaryText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
38755
38764
  description: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
38756
- type: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['item', 'divider', 'group']),
38765
+ type: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['item', 'divider', 'group', 'comp']),
38757
38766
  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
38758
38767
  icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_9__.iconNames),
38759
38768
  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape(MenuItem.propTypes)),
@@ -38761,7 +38770,8 @@ MenuItem.propTypes = {
38761
38770
  disabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38762
38771
  selected: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38763
38772
  subMenu: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38764
- tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
38773
+ tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
38774
+ Comp: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
38765
38775
  };
38766
38776
  var MenuItemComp = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(function (props, ref) {
38767
38777
  var subItems = props.subItems,
@@ -40191,6 +40201,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
40191
40201
 
40192
40202
 
40193
40203
  var assign = Object.assign;
40204
+ var defaultContextValue = {};
40205
+ var TableContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createContext(defaultContextValue);
40206
+ TableContext.displayName = 'TableContext';
40194
40207
  var defaultPropGetter = function defaultPropGetter() {
40195
40208
  return {};
40196
40209
  };
@@ -40198,9 +40211,7 @@ var defaultIsCellEditable = function defaultIsCellEditable(_ref) {
40198
40211
  var column = _ref.column;
40199
40212
  return column.canEdit;
40200
40213
  };
40201
- var defaultContextValue = {};
40202
- var TableContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createContext(defaultContextValue);
40203
- TableContext.displayName = 'TableContext';
40214
+ var defaultPageSizes = [5, 10, 20, 30];
40204
40215
  var Cell = function Cell(_ref2) {
40205
40216
  var value = _ref2.value;
40206
40217
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_5__.Paragraph, {
@@ -40208,18 +40219,24 @@ var Cell = function Cell(_ref2) {
40208
40219
  color: "gray-11-50"
40209
40220
  }, String(value));
40210
40221
  };
40222
+ var defaultColumn = {
40223
+ minWidth: 100,
40224
+ Cell: Cell
40225
+ };
40226
+ var emptyArray = [];
40227
+ var emptyObject = {};
40211
40228
  var Provider = function Provider(_ref3) {
40212
40229
  var _columns$;
40213
40230
  var columns = _ref3.columns,
40214
40231
  _ref3$data = _ref3.data,
40215
- data = _ref3$data === void 0 ? [] : _ref3$data,
40232
+ data = _ref3$data === void 0 ? emptyArray : _ref3$data,
40216
40233
  pageSize = _ref3.pageSize,
40217
40234
  _ref3$pageSizes = _ref3.pageSizes,
40218
- pageSizes = _ref3$pageSizes === void 0 ? [5, 10, 20, 30] : _ref3$pageSizes,
40235
+ pageSizes = _ref3$pageSizes === void 0 ? defaultPageSizes : _ref3$pageSizes,
40219
40236
  children = _ref3.children,
40220
40237
  stateManager = _ref3.stateManager,
40221
40238
  _ref3$hooks = _ref3.hooks,
40222
- hooks = _ref3$hooks === void 0 ? [] : _ref3$hooks,
40239
+ hooks = _ref3$hooks === void 0 ? emptyArray : _ref3$hooks,
40223
40240
  NoDataComp = _ref3.NoDataComp,
40224
40241
  LoadingComp = _ref3.LoadingComp,
40225
40242
  _ref3$ExpandHandleCom = _ref3.ExpandHandleComp,
@@ -40251,7 +40268,7 @@ var Provider = function Provider(_ref3) {
40251
40268
  canOrderColumns = _ref3$canOrderColumns === void 0 ? false : _ref3$canOrderColumns,
40252
40269
  rowActions = _ref3.rowActions,
40253
40270
  _ref3$columnSort = _ref3.columnSort,
40254
- columnSort = _ref3$columnSort === void 0 ? {} : _ref3$columnSort,
40271
+ columnSort = _ref3$columnSort === void 0 ? emptyObject : _ref3$columnSort,
40255
40272
  onColumnSortChanged = _ref3.onColumnSortChanged,
40256
40273
  _ref3$isCellEditable = _ref3.isCellEditable,
40257
40274
  isCellEditable = _ref3$isCellEditable === void 0 ? defaultIsCellEditable : _ref3$isCellEditable,
@@ -40274,12 +40291,6 @@ var Provider = function Provider(_ref3) {
40274
40291
  _ref3$rowDensity = _ref3.rowDensity,
40275
40292
  rowDensity = _ref3$rowDensity === void 0 ? 'busy_bee' : _ref3$rowDensity,
40276
40293
  rest = _objectWithoutProperties(_ref3, _excluded);
40277
- var defaultColumn = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
40278
- return {
40279
- minWidth: 100,
40280
- Cell: Cell
40281
- };
40282
- }, []);
40283
40294
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0),
40284
40295
  _useState2 = _slicedToArray(_useState, 2),
40285
40296
  pageCount = _useState2[0],