@luminati-io/uikit 3.7.7 → 3.7.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -38477,7 +38477,7 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(fu
38477
38477
  tooltip: tooltip,
38478
38478
  noWrap: true
38479
38479
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(MenuItemComp, _extends({}, lodash_omit__WEBPACK_IMPORTED_MODULE_0___default()(rest, 'icon', 'iconPlacement'), {
38480
- "aria-disabled": disabled ? '' : undefined,
38480
+ "aria-disabled": disabled ? true : undefined,
38481
38481
  size: size,
38482
38482
  role: "button",
38483
38483
  subItems: subItems
@@ -42344,6 +42344,7 @@ var PopoverMenu = function PopoverMenu(props) {
42344
42344
  keepPopover = _ref2.keepPopover,
42345
42345
  item = _objectWithoutProperties(_ref2, _excluded);
42346
42346
  var onItemClick = function onItemClick(evt) {
42347
+ if (item.disabled) return;
42347
42348
  if (!keepPopover) togglePopover();
42348
42349
  onClick === null || onClick === void 0 || onClick(row, evt);
42349
42350
  };
@@ -43776,7 +43777,7 @@ __webpack_require__.r(__webpack_exports__);
43776
43777
 
43777
43778
 
43778
43779
  /*jslint react:true*/
43779
- var _excluded = ["type", "children", "onClose", "dismissible", "notDismissible"];
43780
+ var _excluded = ["type", "children", "onClose", "dismissible", "notDismissible", "classNamePrefix"];
43780
43781
  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); }
43781
43782
  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; }
43782
43783
  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; }
@@ -43795,29 +43796,38 @@ var Toast = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef
43795
43796
  onClose = props.onClose,
43796
43797
  dismissible = props.dismissible,
43797
43798
  notDismissible = props.notDismissible,
43799
+ classNamePrefix = props.classNamePrefix,
43798
43800
  rest = _objectWithoutProperties(props, _excluded);
43799
43801
  var _dismissible = dismissible || type == 'error' || type == 'warning';
43800
43802
  var _notDismissible = notDismissible;
43801
43803
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Wrapper, _extends({
43802
43804
  ref: ref,
43803
43805
  $type: type
43804
- }, (0,_util__WEBPACK_IMPORTED_MODULE_3__.getCommonProps)(rest)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToastIcon, {
43805
- type: type
43806
+ }, (0,_util__WEBPACK_IMPORTED_MODULE_3__.getCommonProps)(rest), {
43807
+ className: classNamePrefix + 'wrapper'
43808
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToastIcon, {
43809
+ type: type,
43810
+ classNamePrefix: classNamePrefix
43806
43811
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_6__.Paragraph, {
43807
43812
  variant: "sm",
43808
- color: "gray_11_50"
43813
+ color: "gray_11_50",
43814
+ className: classNamePrefix + 'body'
43809
43815
  }, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(RemoveButton, {
43810
43816
  onClick: onClose,
43817
+ classNamePrefix: classNamePrefix,
43811
43818
  dismissible: _dismissible && !_notDismissible
43812
43819
  }));
43813
43820
  });
43814
43821
  Toast.displayName = 'Toast';
43815
- Toast.defaultProps = {};
43822
+ Toast.defaultProps = {
43823
+ classNamePrefix: ''
43824
+ };
43816
43825
  Toast.propTypes = {
43817
43826
  type: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['success', 'error', 'warning', 'info', 'generic']),
43818
43827
  onClose: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
43819
43828
  dismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
43820
- notDismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
43829
+ notDismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
43830
+ classNamePrefix: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
43821
43831
  };
43822
43832
  var Wrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
43823
43833
  displayName: "Wrapper",
@@ -43832,7 +43842,8 @@ var Wrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withC
43832
43842
  }[props.$type] || color.gray_4;
43833
43843
  });
43834
43844
  var ToastIcon = function ToastIcon(props) {
43835
- var type = props.type;
43845
+ var type = props.type,
43846
+ classNamePrefix = props.classNamePrefix;
43836
43847
  var name = {
43837
43848
  success: 'CheckCircle',
43838
43849
  error: 'Warning',
@@ -43850,21 +43861,25 @@ var ToastIcon = function ToastIcon(props) {
43850
43861
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon, {
43851
43862
  name: name,
43852
43863
  color: _color,
43864
+ className: classNamePrefix + 'icon',
43853
43865
  size: "xs"
43854
43866
  });
43855
43867
  };
43856
43868
  var RemoveButton = function RemoveButton(props) {
43857
43869
  var onClick = props.onClick,
43858
- dismissible = props.dismissible;
43870
+ dismissible = props.dismissible,
43871
+ classNamePrefix = props.classNamePrefix;
43859
43872
  if (!dismissible) return null;
43860
43873
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledRemoveButton, {
43861
43874
  variant: "icon",
43862
43875
  icon: "CloseSmall",
43863
- onClick: onClick
43876
+ onClick: onClick,
43877
+ className: classNamePrefix + 'dismissButton'
43864
43878
  });
43865
43879
  };
43866
43880
  RemoveButton.defaultProps = {};
43867
43881
  RemoveButton.propTypes = {
43882
+ classNamePrefix: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
43868
43883
  onClick: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
43869
43884
  dismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
43870
43885
  };
@@ -43946,7 +43961,11 @@ var ToastComp = function ToastComp(props) {
43946
43961
  onDismiss = toast.onDismiss,
43947
43962
  visible = toast.visible;
43948
43963
  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(_context__WEBPACK_IMPORTED_MODULE_7__.ToastContext),
43949
- position = _useContext.position;
43964
+ position = _useContext.position,
43965
+ idPrefix = _useContext.idPrefix,
43966
+ classNamePrefix = _useContext.classNamePrefix;
43967
+ var classPref = toast.classNamePrefix || classNamePrefix;
43968
+ var idPref = toast.idPrefix || idPrefix;
43950
43969
  var onCloseHandler = react__WEBPACK_IMPORTED_MODULE_2___default().useCallback(function () {
43951
43970
  dismissToast(id);
43952
43971
  if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_0___default()(onClose)) onClose(toast);
@@ -43960,12 +43979,15 @@ var ToastComp = function ToastComp(props) {
43960
43979
  }, [visible]);
43961
43980
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ToastAnimatedComp, {
43962
43981
  $position: toast.position || position || 'bottom-left',
43963
- $visible: visible
43982
+ $visible: visible,
43983
+ id: idPref + id,
43984
+ className: classPref + 'toast'
43964
43985
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_toast__WEBPACK_IMPORTED_MODULE_6__.Toast, {
43965
43986
  onClose: onCloseHandler,
43966
43987
  type: type,
43967
43988
  dismissible: dismissible,
43968
- notDismissible: notDismissible
43989
+ notDismissible: notDismissible,
43990
+ classNamePrefix: classPref
43969
43991
  }, (0,react_hot_toast__WEBPACK_IMPORTED_MODULE_3__.resolveValue)(message, toast)));
43970
43992
  };
43971
43993
  var ToastItem = function ToastItem() {
@@ -44012,12 +44034,16 @@ var defaultContainerStyle = {
44012
44034
  var Toaster = function Toaster(props) {
44013
44035
  var position = props.position,
44014
44036
  maxToasts = props.maxToasts,
44037
+ idPrefix = props.idPrefix,
44038
+ classNamePrefix = props.classNamePrefix,
44015
44039
  containerStyle = props.containerStyle,
44016
44040
  children = props.children;
44017
44041
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_context__WEBPACK_IMPORTED_MODULE_4__.ToastContext.Provider, {
44018
44042
  value: {
44019
44043
  maxToasts: maxToasts,
44020
- position: position
44044
+ position: position,
44045
+ idPrefix: idPrefix,
44046
+ classNamePrefix: classNamePrefix
44021
44047
  }
44022
44048
  }, children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_hot_toast__WEBPACK_IMPORTED_MODULE_2__.Toaster, {
44023
44049
  position: position,
@@ -44029,7 +44055,9 @@ var Toaster = function Toaster(props) {
44029
44055
  };
44030
44056
  Toaster.defaultProps = {
44031
44057
  position: 'bottom-left',
44032
- maxToasts: 2
44058
+ maxToasts: 2,
44059
+ idPrefix: 'toast',
44060
+ classNamePrefix: 'toast'
44033
44061
  };
44034
44062
  Toaster.propTypes = {
44035
44063
  position: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_3__.toastPositions),