@luminati-io/uikit 3.0.8 → 3.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -22194,14 +22194,17 @@ __webpack_require__.r(__webpack_exports__);
22194
22194
 
22195
22195
 
22196
22196
  var CodeBlock = function CodeBlock(props) {
22197
- var header = props.header,
22197
+ var className = props.className,
22198
+ header = props.header,
22198
22199
  code = props.code,
22199
22200
  lang = props.lang,
22200
22201
  max_height = props.max_height,
22201
22202
  themeProp = props.theme,
22202
22203
  lineNumbers = props.lineNumbers,
22203
- copyButton = props.copyButton;
22204
+ copyButton = props.copyButton,
22205
+ onCopy = props.onCopy;
22204
22206
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockWrapper, {
22207
+ className: className,
22205
22208
  "data-testid": "code_block"
22206
22209
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockHeader, {
22207
22210
  $theme: themeProp
@@ -22211,7 +22214,8 @@ var CodeBlock = function CodeBlock(props) {
22211
22214
  code: code,
22212
22215
  theme: themeProp,
22213
22216
  lineNumbers: lineNumbers,
22214
- copyButton: copyButton
22217
+ copyButton: copyButton,
22218
+ onCopy: onCopy
22215
22219
  }));
22216
22220
  };
22217
22221
  CodeBlock.displayName = 'CodeBlock';
@@ -22291,7 +22295,8 @@ var CodeSnippet = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
22291
22295
  themeProp = props.theme,
22292
22296
  lineNumbers = props.lineNumbers,
22293
22297
  copyButton = props.copyButton,
22294
- loading = props.loading;
22298
+ loading = props.loading,
22299
+ onCopy = props.onCopy;
22295
22300
  var codeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
22296
22301
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockBody, {
22297
22302
  ref: ref,
@@ -22307,7 +22312,8 @@ var CodeSnippet = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
22307
22312
  }), !!copyButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_copy_button__WEBPACK_IMPORTED_MODULE_6__["default"], {
22308
22313
  code: code,
22309
22314
  theme: themeProp,
22310
- codeRef: codeRef
22315
+ codeRef: codeRef,
22316
+ onCopy: onCopy
22311
22317
  })), !!loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_skeleton__WEBPACK_IMPORTED_MODULE_7__["default"], {
22312
22318
  theme: themeProp
22313
22319
  }));
@@ -22334,15 +22340,13 @@ var CodeBlockBody = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_la
22334
22340
  }).withConfig({
22335
22341
  displayName: "CodeBlockBody",
22336
22342
  componentId: "sc-13u859f-0"
22337
- })(["background-color:", ";overflow-y:auto;::-webkit-scrollbar{height:10px;width:10px;}::-webkit-scrollbar-thumb{background-color:", ";border-radius:10px;border:0 solid transparent;background-clip:content-box;}::-webkit-scrollbar-track-piece{background:", ";}position:relative;", ""], function (props) {
22343
+ })(["background-color:", ";overflow-y:auto;::-webkit-scrollbar{height:10px;width:10px;}::-webkit-scrollbar-thumb{background-color:", ";border-radius:10px;border:0 solid transparent;background-clip:content-box;}::-webkit-scrollbar-track-piece{background:", ";}position:relative;"], function (props) {
22338
22344
  return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_2' : 'gray_12'];
22339
- }, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11, function (props) {
22340
- return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_8' : 'gray_11_50'];
22341
- }, '' /* ${CodeBlockCopyBtn} {
22342
- position: sticky;
22343
- top: 0;
22344
- } */);
22345
-
22345
+ }, function (props) {
22346
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_3' : 'gray_11_50'];
22347
+ }, function (props) {
22348
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_8' : 'gray_10'];
22349
+ });
22346
22350
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CodeSnippet);
22347
22351
 
22348
22352
  /***/ }),
@@ -22395,7 +22399,8 @@ var icon = _icons__WEBPACK_IMPORTED_MODULE_2__["default"].Copy;
22395
22399
  var CopyButton = function CopyButton(props) {
22396
22400
  var code = props.code,
22397
22401
  themeProp = props.theme,
22398
- codeRef = props.codeRef;
22402
+ codeRef = props.codeRef,
22403
+ onCopy = props.onCopy;
22399
22404
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(STATE.READY),
22400
22405
  _useState2 = _slicedToArray(_useState, 2),
22401
22406
  state = _useState2[0],
@@ -22413,6 +22418,7 @@ var CopyButton = function CopyButton(props) {
22413
22418
  success: function success() {
22414
22419
  setState(STATE.SUCCESS);
22415
22420
  resetText();
22421
+ onCopy === null || onCopy === void 0 ? void 0 : onCopy();
22416
22422
  },
22417
22423
  error: function error() {
22418
22424
  setState(STATE.ERROR);
@@ -23444,7 +23450,7 @@ __webpack_require__.r(__webpack_exports__);
23444
23450
 
23445
23451
 
23446
23452
  /*jslint react:true*/
23447
- var _excluded = ["variant", "disabled", "active", "icon", "tooltip", "tooltipPlacement"];
23453
+ var _excluded = ["variant", "disabled", "active", "icon", "tooltip", "tooltipPlacement", "size", "noBackColor"];
23448
23454
  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); }
23449
23455
  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; }
23450
23456
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -23462,10 +23468,14 @@ var IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwa
23462
23468
  icon = props.icon,
23463
23469
  tooltip = props.tooltip,
23464
23470
  tooltipPlacement = props.tooltipPlacement,
23471
+ size = props.size,
23472
+ noBackColor = props.noBackColor,
23465
23473
  rest = _objectWithoutProperties(props, _excluded);
23474
+ size = calcSize(variant, size);
23475
+ noBackColor = variant == 'ghost' || noBackColor;
23466
23476
  var ic = _icons__WEBPACK_IMPORTED_MODULE_3__["default"][icon];
23467
23477
  if (!ic) return null;
23468
- var iconSize = variant == 'icon-button' ? 18 : 16;
23478
+ var iconSize = size == 'lg' || size == 'md' ? 18 : 16;
23469
23479
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_5__["default"], {
23470
23480
  tooltip: tooltip,
23471
23481
  placement: tooltipPlacement
@@ -23473,7 +23483,8 @@ var IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwa
23473
23483
  ref: ref
23474
23484
  }, rest, {
23475
23485
  disabled: disabled,
23476
- $variant: variant,
23486
+ $size: size,
23487
+ $noBackColor: noBackColor,
23477
23488
  $active: active
23478
23489
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledSvg, {
23479
23490
  viewBox: ic.viewBox,
@@ -23485,21 +23496,28 @@ var IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwa
23485
23496
  });
23486
23497
  IconButton.displayName = 'IconButton';
23487
23498
  IconButton.defaultProps = {
23488
- variant: 'icon-button'
23499
+ size: 'md'
23489
23500
  };
23490
23501
  IconButton.propTypes = {
23491
- variant: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['icon', 'icon-button', 'ghost']),
23502
+ // variant: PT.oneOf(['icon', 'icon-button', 'ghost']),
23492
23503
  icon: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_4__.iconNames).isRequired,
23493
23504
  disabled: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
23494
23505
  active: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
23495
23506
  tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node),
23496
- tooltipPlacement: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_4__.tooltipPlacements)
23507
+ tooltipPlacement: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_4__.tooltipPlacements),
23508
+ size: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['xs', 'sm', 'md', 'lg']),
23509
+ noBackColor: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool)
23497
23510
  };
23498
23511
  var StyledIconButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().button.withConfig({
23499
23512
  displayName: "StyledIconButton",
23500
23513
  componentId: "sc-114c1w5-0"
23501
23514
  })(["display:flex;align-items:center;justify-content:center;border-radius:4px;padding:0;box-sizing:border-box;", " cursor:pointer;", ""], function (props) {
23502
- return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.toSize)(props.$variant == 'icon-button' ? 36 : 24);
23515
+ return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.toSize)({
23516
+ lg: 40,
23517
+ md: 36,
23518
+ sm: 28,
23519
+ xs: 24
23520
+ }[props.$size] || 36);
23503
23521
  }, function (props) {
23504
23522
  var backColor = 'transparent';
23505
23523
  var border = "1px solid ".concat(_theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.gray_6);
@@ -23512,12 +23530,12 @@ var StyledIconButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().
23512
23530
  backColor = _theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.blue_4;
23513
23531
  border = "1px solid ".concat(_theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.blue_4);
23514
23532
  }
23515
- if (props.$variant == 'ghost') {
23533
+ if (props.$noBackColor) {
23516
23534
  backColor = 'transparent';
23517
23535
  hoverBackColor = 'transparent';
23518
23536
  activeBackColor = 'transparent';
23519
23537
  }
23520
- if (props.$variant == 'icon' || props.$variant == 'ghost') {
23538
+ if (props.$size == 'xs') {
23521
23539
  hoverBorder = '0 none';
23522
23540
  activeBorder = '0 none';
23523
23541
  disabledBorder = '0 none';
@@ -23533,6 +23551,10 @@ var StyledSvg = styled_components__WEBPACK_IMPORTED_MODULE_1___default().svg.wit
23533
23551
  }, function (props) {
23534
23552
  return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.toSize)(props.$size);
23535
23553
  }, StyledIconButton, _theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.gray_11_25, StyledIconButton, _theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.blue_11, StyledIconButton, _theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.gray_7);
23554
+ var calcSize = function calcSize(variant, size) {
23555
+ if (!variant) return size;
23556
+ return variant == 'icon-button' ? 'md' : 'xs';
23557
+ };
23536
23558
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconButton);
23537
23559
 
23538
23560
  /***/ }),
@@ -23829,7 +23851,10 @@ CompareTo.defaultProps = {
23829
23851
  };
23830
23852
  CompareTo.propTypes = {
23831
23853
  value: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any),
23832
- options: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().any))
23854
+ options: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().any)),
23855
+ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
23856
+ format: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
23857
+ placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
23833
23858
  };
23834
23859
  var CompareToMenuList = function CompareToMenuList(props) {
23835
23860
  var className = props.className,
@@ -24006,7 +24031,7 @@ DatePicker.propTypes = {
24006
24031
  label: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
24007
24032
  labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
24008
24033
  helperText: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
24009
- size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg']),
24034
+ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['xs', 'sm', 'md', 'lg']),
24010
24035
  disabledDays: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
24011
24036
  renderPopover: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
24012
24037
  isRange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
@@ -25245,6 +25270,7 @@ var Number = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRe
25245
25270
  }, [onChange, minValue, maxValue]);
25246
25271
  var heightCalculationCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
25247
25272
  var sizes = {
25273
+ 'xs': 28,
25248
25274
  'sm': 36,
25249
25275
  'md': 40,
25250
25276
  'lg': 48
@@ -25291,7 +25317,7 @@ Number.propTypes = {
25291
25317
  label: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
25292
25318
  labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
25293
25319
  helperText: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
25294
- size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg'])
25320
+ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg'])
25295
25321
  };
25296
25322
  var NumberField = styled_components__WEBPACK_IMPORTED_MODULE_2___default().input.attrs({
25297
25323
  type: 'number'
@@ -25839,6 +25865,7 @@ HelperText.propTypes = {
25839
25865
  var useHeightCalculationCallback = function useHeightCalculationCallback(size) {
25840
25866
  return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
25841
25867
  var height = {
25868
+ xs: 28,
25842
25869
  sm: 36,
25843
25870
  md: 40,
25844
25871
  lg: 48
@@ -26000,7 +26027,7 @@ Textbox.propTypes = {
26000
26027
  label: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
26001
26028
  labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
26002
26029
  helperText: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
26003
- size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
26030
+ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
26004
26031
  autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
26005
26032
  };
26006
26033
  Textbox.defaultProps = {
@@ -27937,7 +27964,7 @@ __webpack_require__.r(__webpack_exports__);
27937
27964
 
27938
27965
  /*jslint react:true*/
27939
27966
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
27940
- var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "isLoading", "onPageChange", "manualPagination", "totalCount", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps"];
27967
+ var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "noDataText", "loadingText", "isLoading", "onPageChange", "manualPagination", "totalCount", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps"];
27941
27968
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
27942
27969
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
27943
27970
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -27994,10 +28021,12 @@ var Provider = function Provider(props) {
27994
28021
  stateManager = props.stateManager,
27995
28022
  _props$hooks = props.hooks,
27996
28023
  hooks = _props$hooks === void 0 ? [] : _props$hooks,
27997
- _props$NoDataComp = props.NoDataComp,
27998
- NoDataComp = _props$NoDataComp === void 0 ? NoDataBody : _props$NoDataComp,
27999
- _props$LoadingComp = props.LoadingComp,
28000
- LoadingComp = _props$LoadingComp === void 0 ? LoadingBody : _props$LoadingComp,
28024
+ NoDataComp = props.NoDataComp,
28025
+ LoadingComp = props.LoadingComp,
28026
+ _props$noDataText = props.noDataText,
28027
+ noDataText = _props$noDataText === void 0 ? 'No data' : _props$noDataText,
28028
+ _props$loadingText = props.loadingText,
28029
+ loadingText = _props$loadingText === void 0 ? 'Loading...' : _props$loadingText,
28001
28030
  _props$isLoading = props.isLoading,
28002
28031
  isLoading = _props$isLoading === void 0 ? false : _props$isLoading,
28003
28032
  onPageChange = props.onPageChange,
@@ -28060,12 +28089,17 @@ var Provider = function Provider(props) {
28060
28089
  pageSize: _pageSize
28061
28090
  });
28062
28091
  }, [manualPagination, totalCount, pageIndex, _pageSize]);
28092
+ var _LoadingComp = useComp(loadingText, LoadingComp);
28093
+ var _NoDataComp = useComp(noDataText, NoDataComp);
28094
+ console.log(_NoDataComp);
28095
+ var value = _objectSpread(_objectSpread({
28096
+ columnsSort: columnsSort
28097
+ }, table), {}, {
28098
+ LoadingComp: _LoadingComp,
28099
+ NoDataComp: _NoDataComp
28100
+ });
28063
28101
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(TableContext.Provider, {
28064
- value: _objectSpread({
28065
- columnsSort: columnsSort,
28066
- NoDataComp: NoDataComp,
28067
- LoadingComp: LoadingComp
28068
- }, table)
28102
+ value: value
28069
28103
  }, children);
28070
28104
  };
28071
28105
  Provider.displayName = 'Table.Provider';
@@ -28110,7 +28144,9 @@ Provider.propTypes = {
28110
28144
  getColumnProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
28111
28145
  getRowProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
28112
28146
  getCellProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
28113
- getFooterProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
28147
+ getFooterProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
28148
+ noDataText: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
28149
+ loadingText: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)])
28114
28150
  };
28115
28151
  var calcPageCount = function calcPageCount(totalCount, pageSize) {
28116
28152
  return Math.ceil(totalCount / pageSize);
@@ -28131,6 +28167,13 @@ var useCanHideColumns = function useCanHideColumns(hooks) {
28131
28167
  });
28132
28168
  };
28133
28169
  useCanHideColumns.pluginName = 'useCanHideColumns';
28170
+ var useComp = function useComp(text, Comp) {
28171
+ return (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
28172
+ if (Comp) return Comp;
28173
+ if (!text || typeof text != 'string' || text.trim() == '') return text;
28174
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(EmptyBody, null, text);
28175
+ }, [text, Comp]);
28176
+ };
28134
28177
  var EmptyBody = function EmptyBody(_ref) {
28135
28178
  var children = _ref.children;
28136
28179
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_3__.Flex, {
@@ -28141,12 +28184,6 @@ var EmptyBody = function EmptyBody(_ref) {
28141
28184
  color: "gray_11_50"
28142
28185
  }, children));
28143
28186
  };
28144
- var NoDataBody = function NoDataBody() {
28145
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(EmptyBody, null, "No data");
28146
- };
28147
- var LoadingBody = function LoadingBody() {
28148
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(EmptyBody, null, "Loading...");
28149
- };
28150
28187
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Provider);
28151
28188
 
28152
28189
  /***/ }),
@@ -28471,6 +28508,45 @@ useEditableColumns.pluginName = 'useEditableColumns';
28471
28508
 
28472
28509
  /***/ }),
28473
28510
 
28511
+ /***/ "./src/table/flex_renderer.js":
28512
+ /*!************************************!*\
28513
+ !*** ./src/table/flex_renderer.js ***!
28514
+ \************************************/
28515
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28516
+
28517
+ "use strict";
28518
+ __webpack_require__.r(__webpack_exports__);
28519
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28520
+ /* harmony export */ flexRender: () => (/* binding */ flexRender)
28521
+ /* harmony export */ });
28522
+ // LICENSE_CODE ZON
28523
+
28524
+
28525
+ /*jslint react:true*/
28526
+
28527
+ /**
28528
+ * If rendering headers, cells, or footers with custom markup,
28529
+ * use flexRender instead of `cell.getValue()` or `cell.renderValue()`.
28530
+ */
28531
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
28532
+ var flexRender = function flexRender(Comp, props) {
28533
+ return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React.createElement(Comp, props) : Comp;
28534
+ };
28535
+ var isReactComponent = function isReactComponent(component) {
28536
+ return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);
28537
+ };
28538
+ var isClassComponent = function isClassComponent(component) {
28539
+ return typeof component === 'function' && function () {
28540
+ var proto = Object.getPrototypeOf(component);
28541
+ return proto.prototype && proto.prototype.isReactComponent;
28542
+ }();
28543
+ };
28544
+ var isExoticComponent = function isExoticComponent(component) {
28545
+ return _typeof(component) === 'object' && _typeof(component.$$typeof) === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);
28546
+ };
28547
+
28548
+ /***/ }),
28549
+
28474
28550
  /***/ "./src/table/footer.js":
28475
28551
  /*!*****************************!*\
28476
28552
  !*** ./src/table/footer.js ***!
@@ -29931,6 +30007,7 @@ __webpack_require__.r(__webpack_exports__);
29931
30007
  /* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./header */ "./src/table/header.js");
29932
30008
  /* harmony import */ var _render_row__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./render_row */ "./src/table/render_row.js");
29933
30009
  /* harmony import */ var _sticky_header__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./sticky_header */ "./src/table/sticky_header.js");
30010
+ /* harmony import */ var _flex_renderer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./flex_renderer */ "./src/table/flex_renderer.js");
29934
30011
  // LICENSE_CODE ZON
29935
30012
 
29936
30013
 
@@ -29947,6 +30024,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
29947
30024
 
29948
30025
 
29949
30026
 
30027
+
29950
30028
  var Table = function Table(props) {
29951
30029
  var className = props.className,
29952
30030
  rowDensity = props.rowDensity,
@@ -29969,8 +30047,8 @@ var Table = function Table(props) {
29969
30047
  var wrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
29970
30048
  var tableRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
29971
30049
  var body = function () {
29972
- if (isLoading) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(LoadingComp, null);
29973
- if (!page.length) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(NoDataComp, null);
30050
+ if (isLoading) return (0,_flex_renderer__WEBPACK_IMPORTED_MODULE_11__.flexRender)(LoadingComp);
30051
+ if (!page.length) return (0,_flex_renderer__WEBPACK_IMPORTED_MODULE_11__.flexRender)(NoDataComp);
29974
30052
  return page.map(function (row, i, arr) {
29975
30053
  prepareRow(row);
29976
30054
  if (row.isPinned) return null;
@@ -31193,14 +31271,16 @@ var Style = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef
31193
31271
  italic_sm: 'sm',
31194
31272
  italic_xs: 'xs',
31195
31273
  code: 'sm',
31274
+ code_sm: 'sm',
31196
31275
  code_xxs: 'xxs',
31197
31276
  capitals: 'xs',
31277
+ capitals_xs: 'xs',
31198
31278
  capitals_xxs: 'xxs'
31199
31279
  }[props.variant] || 'md',
31200
31280
  line_height: ['italic_lg', 'italic_sm'].includes(props.variant) ? 'snug' : 'none',
31201
- font_family: ['code', 'code_xxs'].includes(props.variant) ? 'mono' : 'sans',
31281
+ font_family: ['code', 'code_sm', 'code_xxs'].includes(props.variant) ? 'mono' : 'sans',
31202
31282
  italic: ['italic_lg', 'italic_sm', 'italic_xs'].includes(props.variant),
31203
- uppercase: ['capitals', 'capitals_xxs'].includes(props.variant)
31283
+ uppercase: ['capitals', 'capitals_xs', 'capitals_xxs'].includes(props.variant)
31204
31284
  });
31205
31285
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({
31206
31286
  ref: ref
@@ -31211,7 +31291,7 @@ Style.defaultProps = {
31211
31291
  variant: 'italic_lg'
31212
31292
  };
31213
31293
  Style.propTypes = {
31214
- variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['italic_lg', 'italic_sm', 'italic_xs', 'code', 'code_xxs', 'capitals', 'capitals_xxs']),
31294
+ variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['italic_lg', 'italic_sm', 'italic_xs', 'code_sm', 'code_xxs', 'capitals_xs', 'capitals_xxs']),
31215
31295
  whiteSpace: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_2__.whiteSpaces)
31216
31296
  };
31217
31297
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Style);