@luminati-io/uikit 3.5.14 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -31557,12 +31557,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
31557
31557
|
/* harmony export */ Table: () => (/* reexport safe */ _table__WEBPACK_IMPORTED_MODULE_19__.Table),
|
31558
31558
|
/* harmony export */ TagGroup: () => (/* reexport safe */ _tag__WEBPACK_IMPORTED_MODULE_20__.TagGroup),
|
31559
31559
|
/* harmony export */ Toast: () => (/* reexport safe */ _toast__WEBPACK_IMPORTED_MODULE_21__.Toast),
|
31560
|
-
/* harmony export */
|
31560
|
+
/* harmony export */ Toaster: () => (/* reexport safe */ _toast__WEBPACK_IMPORTED_MODULE_21__.Toaster),
|
31561
31561
|
/* harmony export */ Tooltip: () => (/* reexport safe */ _tooltip__WEBPACK_IMPORTED_MODULE_24__.Tooltip),
|
31562
31562
|
/* harmony export */ Typography: () => (/* reexport module object */ _typography__WEBPACK_IMPORTED_MODULE_9__),
|
31563
31563
|
/* harmony export */ theme: () => (/* reexport safe */ _theme__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
31564
31564
|
/* harmony export */ translation: () => (/* reexport safe */ _translation__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
31565
|
-
/* harmony export */
|
31565
|
+
/* harmony export */ useToaster: () => (/* reexport safe */ _toast__WEBPACK_IMPORTED_MODULE_21__.useToaster),
|
31566
31566
|
/* harmony export */ withPopover: () => (/* reexport safe */ _hoc__WEBPACK_IMPORTED_MODULE_14__.withPopover),
|
31567
31567
|
/* harmony export */ withTooltip: () => (/* reexport safe */ _tooltip__WEBPACK_IMPORTED_MODULE_24__.withTooltip)
|
31568
31568
|
/* harmony export */ });
|
@@ -40369,11 +40369,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
40369
40369
|
|
40370
40370
|
/*jslint react:true*/
|
40371
40371
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
40372
|
+
var _excluded = ["onClick", "keepPopover"];
|
40372
40373
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
40373
40374
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
40374
40375
|
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; }
|
40375
40376
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
40376
40377
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
40378
|
+
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; }
|
40379
|
+
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; }
|
40377
40380
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
40378
40381
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
40379
40382
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -40411,6 +40414,7 @@ var RowMenuCell = function RowMenuCell(_ref) {
|
|
40411
40414
|
RowMenuCell.displayName = 'RowMenuCell';
|
40412
40415
|
var RowMenuCellPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_2__.withPopover)(function (p) {
|
40413
40416
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_3__.IconButton, {
|
40417
|
+
"data-testid": "row-actions-toggle",
|
40414
40418
|
onClick: p.popover.toggle,
|
40415
40419
|
icon: "DotsHorizontal",
|
40416
40420
|
variant: "ghost",
|
@@ -40430,14 +40434,16 @@ var PopoverMenu = function PopoverMenu(props) {
|
|
40430
40434
|
row = props.row,
|
40431
40435
|
togglePopover = props.togglePopover;
|
40432
40436
|
var items = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
40433
|
-
return allActions.map(function (
|
40434
|
-
var
|
40435
|
-
|
40436
|
-
|
40437
|
-
|
40437
|
+
return allActions.map(function (_ref2) {
|
40438
|
+
var onClick = _ref2.onClick,
|
40439
|
+
keepPopover = _ref2.keepPopover,
|
40440
|
+
item = _objectWithoutProperties(_ref2, _excluded);
|
40441
|
+
var onItemClick = function onItemClick(evt) {
|
40442
|
+
if (!keepPopover) togglePopover();
|
40443
|
+
onClick === null || onClick === void 0 || onClick(row, evt);
|
40438
40444
|
};
|
40439
40445
|
return _objectSpread(_objectSpread({}, item), {}, {
|
40440
|
-
onClick:
|
40446
|
+
onClick: onItemClick
|
40441
40447
|
});
|
40442
40448
|
});
|
40443
40449
|
}, [allActions]);
|
@@ -40460,8 +40466,8 @@ var rowMenuStyle = {
|
|
40460
40466
|
right: 0,
|
40461
40467
|
overflow: 'visible'
|
40462
40468
|
};
|
40463
|
-
var getRowMenuCellProps = function getRowMenuCellProps(props,
|
40464
|
-
var cell =
|
40469
|
+
var getRowMenuCellProps = function getRowMenuCellProps(props, _ref3) {
|
40470
|
+
var cell = _ref3.cell;
|
40465
40471
|
if (cell.column.id == 'row_menu') return [props, {
|
40466
40472
|
style: rowMenuStyle
|
40467
40473
|
}];
|
@@ -41741,6 +41747,32 @@ var theme = {
|
|
41741
41747
|
|
41742
41748
|
/***/ }),
|
41743
41749
|
|
41750
|
+
/***/ "./src/toast/context.js":
|
41751
|
+
/*!******************************!*\
|
41752
|
+
!*** ./src/toast/context.js ***!
|
41753
|
+
\******************************/
|
41754
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
41755
|
+
|
41756
|
+
"use strict";
|
41757
|
+
__webpack_require__.r(__webpack_exports__);
|
41758
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
41759
|
+
/* harmony export */ ToastContext: () => (/* binding */ ToastContext)
|
41760
|
+
/* harmony export */ });
|
41761
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
41762
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
41763
|
+
// LICENSE_CODE ZON
|
41764
|
+
|
41765
|
+
|
41766
|
+
/*jslint react:true*/
|
41767
|
+
|
41768
|
+
var defaultContextValue = {
|
41769
|
+
maxToasts: 2,
|
41770
|
+
position: 'bottom-left'
|
41771
|
+
};
|
41772
|
+
var ToastContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(defaultContextValue);
|
41773
|
+
|
41774
|
+
/***/ }),
|
41775
|
+
|
41744
41776
|
/***/ "./src/toast/index.js":
|
41745
41777
|
/*!****************************!*\
|
41746
41778
|
!*** ./src/toast/index.js ***!
|
@@ -41751,11 +41783,12 @@ var theme = {
|
|
41751
41783
|
__webpack_require__.r(__webpack_exports__);
|
41752
41784
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
41753
41785
|
/* harmony export */ Toast: () => (/* reexport safe */ _toast__WEBPACK_IMPORTED_MODULE_0__.Toast),
|
41754
|
-
/* harmony export */
|
41755
|
-
/* harmony export */
|
41786
|
+
/* harmony export */ Toaster: () => (/* reexport safe */ _toaster__WEBPACK_IMPORTED_MODULE_1__.Toaster),
|
41787
|
+
/* harmony export */ useToaster: () => (/* reexport safe */ _use_toaster__WEBPACK_IMPORTED_MODULE_2__.useToaster)
|
41756
41788
|
/* harmony export */ });
|
41757
41789
|
/* harmony import */ var _toast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toast */ "./src/toast/toast.js");
|
41758
|
-
/* harmony import */ var
|
41790
|
+
/* harmony import */ var _toaster__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toaster */ "./src/toast/toaster.js");
|
41791
|
+
/* harmony import */ var _use_toaster__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use_toaster */ "./src/toast/use_toaster.js");
|
41759
41792
|
// LICENSE_CODE ZON
|
41760
41793
|
|
41761
41794
|
|
@@ -41763,6 +41796,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
41763
41796
|
|
41764
41797
|
|
41765
41798
|
|
41799
|
+
|
41766
41800
|
/***/ }),
|
41767
41801
|
|
41768
41802
|
/***/ "./src/toast/toast.js":
|
@@ -41791,7 +41825,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
41791
41825
|
|
41792
41826
|
|
41793
41827
|
/*jslint react:true*/
|
41794
|
-
var _excluded = ["type", "children", "onClose"];
|
41828
|
+
var _excluded = ["type", "children", "onClose", "dismissible", "notDismissible"];
|
41795
41829
|
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); }
|
41796
41830
|
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; }
|
41797
41831
|
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; }
|
@@ -41808,7 +41842,11 @@ var Toast = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef
|
|
41808
41842
|
var type = props.type,
|
41809
41843
|
children = props.children,
|
41810
41844
|
onClose = props.onClose,
|
41845
|
+
dismissible = props.dismissible,
|
41846
|
+
notDismissible = props.notDismissible,
|
41811
41847
|
rest = _objectWithoutProperties(props, _excluded);
|
41848
|
+
var _dismissible = dismissible || type == 'error' || type == 'warning';
|
41849
|
+
var _notDismissible = notDismissible;
|
41812
41850
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Wrapper, _extends({
|
41813
41851
|
ref: ref,
|
41814
41852
|
$type: type
|
@@ -41818,15 +41856,17 @@ var Toast = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef
|
|
41818
41856
|
variant: "sm",
|
41819
41857
|
color: "gray_11_50"
|
41820
41858
|
}, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(RemoveButton, {
|
41821
|
-
|
41822
|
-
|
41859
|
+
onClick: onClose,
|
41860
|
+
dismissible: _dismissible && !_notDismissible
|
41823
41861
|
}));
|
41824
41862
|
});
|
41825
41863
|
Toast.displayName = 'Toast';
|
41826
41864
|
Toast.defaultProps = {};
|
41827
41865
|
Toast.propTypes = {
|
41828
41866
|
type: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['success', 'error', 'warning', 'info', 'generic']),
|
41829
|
-
onClose: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
41867
|
+
onClose: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
41868
|
+
dismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
41869
|
+
notDismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
|
41830
41870
|
};
|
41831
41871
|
var Wrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
41832
41872
|
displayName: "Wrapper",
|
@@ -41863,15 +41903,20 @@ var ToastIcon = function ToastIcon(props) {
|
|
41863
41903
|
});
|
41864
41904
|
};
|
41865
41905
|
var RemoveButton = function RemoveButton(props) {
|
41866
|
-
var
|
41867
|
-
|
41868
|
-
if (
|
41906
|
+
var onClick = props.onClick,
|
41907
|
+
dismissible = props.dismissible;
|
41908
|
+
if (!dismissible) return null;
|
41869
41909
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledRemoveButton, {
|
41870
41910
|
variant: "icon",
|
41871
41911
|
icon: "CloseSmall",
|
41872
|
-
onClick:
|
41912
|
+
onClick: onClick
|
41873
41913
|
});
|
41874
41914
|
};
|
41915
|
+
RemoveButton.defaultProps = {};
|
41916
|
+
RemoveButton.propTypes = {
|
41917
|
+
onClick: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
41918
|
+
dismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
|
41919
|
+
};
|
41875
41920
|
var StyledRemoveButton = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_icon_button__WEBPACK_IMPORTED_MODULE_5__.IconButton).withConfig({
|
41876
41921
|
displayName: "StyledRemoveButton",
|
41877
41922
|
componentId: "sc-tn2lqb-1"
|
@@ -41879,310 +41924,290 @@ var StyledRemoveButton = styled_components__WEBPACK_IMPORTED_MODULE_2___default(
|
|
41879
41924
|
|
41880
41925
|
/***/ }),
|
41881
41926
|
|
41882
|
-
/***/ "./src/toast/
|
41883
|
-
|
41884
|
-
!*** ./src/toast/
|
41885
|
-
|
41927
|
+
/***/ "./src/toast/toast_item.js":
|
41928
|
+
/*!*********************************!*\
|
41929
|
+
!*** ./src/toast/toast_item.js ***!
|
41930
|
+
\*********************************/
|
41886
41931
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
41887
41932
|
|
41888
41933
|
"use strict";
|
41889
41934
|
__webpack_require__.r(__webpack_exports__);
|
41890
41935
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
41891
|
-
/* harmony export */
|
41936
|
+
/* harmony export */ ToastItem: () => (/* binding */ ToastItem)
|
41892
41937
|
/* harmony export */ });
|
41893
|
-
/* harmony import */ var
|
41894
|
-
/* harmony import */ var
|
41895
|
-
/* harmony import */ var
|
41896
|
-
/* harmony import */ var
|
41938
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js");
|
41939
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_0__);
|
41940
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
|
41941
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
41942
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
41943
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
41944
|
+
/* harmony import */ var react_hot_toast__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-hot-toast */ "./node_modules/react-hot-toast/dist/index.mjs");
|
41945
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! styled-components */ "styled-components");
|
41946
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_4__);
|
41947
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
41948
|
+
/* harmony import */ var _toast__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./toast */ "./src/toast/toast.js");
|
41949
|
+
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./context */ "./src/toast/context.js");
|
41897
41950
|
// LICENSE_CODE ZON
|
41898
41951
|
|
41899
41952
|
|
41900
41953
|
/*jslint react:true*/
|
41901
41954
|
|
41902
41955
|
|
41903
|
-
|
41904
|
-
|
41905
|
-
|
41906
|
-
|
41907
|
-
|
41956
|
+
|
41957
|
+
|
41958
|
+
|
41959
|
+
|
41960
|
+
|
41961
|
+
|
41962
|
+
var enterAnimation = function enterAnimation(factor) {
|
41963
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_4__.keyframes)(["0%{transform:translate3d(0,", "%,0) scale(.6);opacity:.5;}100%{transform:translate3d(0,0,0) scale(1);opacity:1;}"], factor * -200);
|
41964
|
+
};
|
41965
|
+
var exitAnimation = function exitAnimation(factor) {
|
41966
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_4__.keyframes)(["0%{transform:translate3d(0,0,-1px) scale(1);opacity:1;}100%{transform:translate3d(0,", "%,-1px) scale(.6);opacity:0;}"], factor * -150);
|
41967
|
+
};
|
41968
|
+
var ToastAnimatedComp = styled_components__WEBPACK_IMPORTED_MODULE_4___default().div.withConfig({
|
41969
|
+
displayName: "ToastAnimatedComp",
|
41970
|
+
componentId: "sc-1whlqk5-0"
|
41971
|
+
})(["display:flex;align-items:center;will-change:transform;max-width:350px;", ";"], function (props) {
|
41972
|
+
var $position = props.$position,
|
41973
|
+
$visible = props.$visible;
|
41974
|
+
var top = $position.includes('top');
|
41975
|
+
var factor = top ? 1 : -1;
|
41976
|
+
return $visible ? (0,styled_components__WEBPACK_IMPORTED_MODULE_4__.css)(["animation:", " 0.35s cubic-bezier(.21,1.02,.73,1) forwards;"], enterAnimation(factor)) : (0,styled_components__WEBPACK_IMPORTED_MODULE_4__.css)(["animation:", " 0.4s forwards cubic-bezier(.06,.71,.55,1)"], exitAnimation(factor));
|
41908
41977
|
});
|
41909
|
-
|
41910
|
-
|
41911
|
-
|
41912
|
-
|
41913
|
-
|
41914
|
-
|
41978
|
+
ToastAnimatedComp.defaultProps = {
|
41979
|
+
$position: 'bottom-left'
|
41980
|
+
};
|
41981
|
+
ToastAnimatedComp.propTypes = {
|
41982
|
+
$position: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_5__.toastPositions),
|
41983
|
+
$visible: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
|
41984
|
+
};
|
41985
|
+
var ToastComp = function ToastComp(props) {
|
41986
|
+
var toast = props.toast;
|
41987
|
+
var id = toast.id,
|
41988
|
+
type = toast.type,
|
41989
|
+
onClose = toast.onClose,
|
41990
|
+
dismissToast = toast.dismissToast,
|
41991
|
+
message = toast.message,
|
41992
|
+
dismissible = toast.dismissible,
|
41993
|
+
notDismissible = toast.notDismissible;
|
41994
|
+
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(_context__WEBPACK_IMPORTED_MODULE_7__.ToastContext),
|
41995
|
+
position = _useContext.position;
|
41996
|
+
var onCloseHandler = react__WEBPACK_IMPORTED_MODULE_2___default().useCallback(function () {
|
41997
|
+
dismissToast(id);
|
41998
|
+
if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_0___default()(onClose)) onClose(id);
|
41999
|
+
}, [id]);
|
42000
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ToastAnimatedComp, {
|
42001
|
+
$position: toast.position || position || 'bottom-left',
|
42002
|
+
$visible: toast.visible
|
42003
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_toast__WEBPACK_IMPORTED_MODULE_6__.Toast, {
|
42004
|
+
onClose: onCloseHandler,
|
42005
|
+
type: type,
|
42006
|
+
dismissible: dismissible,
|
42007
|
+
notDismissible: notDismissible
|
42008
|
+
}, (0,react_hot_toast__WEBPACK_IMPORTED_MODULE_3__.resolveValue)(message, toast)));
|
42009
|
+
};
|
42010
|
+
var ToastItem = function ToastItem() {
|
42011
|
+
var toast = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
42012
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ToastComp, {
|
42013
|
+
toast: toast
|
42014
|
+
});
|
42015
|
+
};
|
41915
42016
|
|
41916
42017
|
/***/ }),
|
41917
42018
|
|
41918
|
-
/***/ "./src/toast/
|
41919
|
-
|
41920
|
-
!*** ./src/toast/
|
41921
|
-
|
42019
|
+
/***/ "./src/toast/toaster.js":
|
42020
|
+
/*!******************************!*\
|
42021
|
+
!*** ./src/toast/toaster.js ***!
|
42022
|
+
\******************************/
|
41922
42023
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
41923
42024
|
|
41924
42025
|
"use strict";
|
41925
42026
|
__webpack_require__.r(__webpack_exports__);
|
41926
42027
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
41927
|
-
/* harmony export */
|
42028
|
+
/* harmony export */ Toaster: () => (/* binding */ Toaster)
|
41928
42029
|
/* harmony export */ });
|
41929
|
-
/* harmony import */ var
|
41930
|
-
/* harmony import */ var
|
42030
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types");
|
42031
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
41931
42032
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
41932
42033
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
42034
|
+
/* harmony import */ var react_hot_toast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-hot-toast */ "./node_modules/react-hot-toast/dist/index.mjs");
|
42035
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
42036
|
+
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./src/toast/context.js");
|
42037
|
+
/* harmony import */ var _toast_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./toast_item */ "./src/toast/toast_item.js");
|
41933
42038
|
// LICENSE_CODE ZON
|
41934
42039
|
|
41935
42040
|
|
41936
42041
|
/*jslint react:true*/
|
41937
42042
|
|
41938
42043
|
|
41939
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createContext({
|
41940
|
-
enqueueToast: (lodash_noop__WEBPACK_IMPORTED_MODULE_0___default()),
|
41941
|
-
closeToast: (lodash_noop__WEBPACK_IMPORTED_MODULE_0___default())
|
41942
|
-
}));
|
41943
|
-
|
41944
|
-
/***/ }),
|
41945
|
-
|
41946
|
-
/***/ "./src/toast/toast_item.js":
|
41947
|
-
/*!*********************************!*\
|
41948
|
-
!*** ./src/toast/toast_item.js ***!
|
41949
|
-
\*********************************/
|
41950
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
41951
|
-
|
41952
|
-
"use strict";
|
41953
|
-
__webpack_require__.r(__webpack_exports__);
|
41954
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
41955
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
41956
|
-
/* harmony export */ });
|
41957
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
41958
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
41959
|
-
/* harmony import */ var _toast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toast */ "./src/toast/toast.js");
|
41960
|
-
// LICENSE_CODE ZON
|
41961
42044
|
|
41962
42045
|
|
41963
|
-
/*jslint react:true*/
|
41964
42046
|
|
41965
42047
|
|
41966
|
-
var
|
41967
|
-
var
|
41968
|
-
|
41969
|
-
|
41970
|
-
|
41971
|
-
|
41972
|
-
|
41973
|
-
|
41974
|
-
|
41975
|
-
|
41976
|
-
|
41977
|
-
|
41978
|
-
|
41979
|
-
|
41980
|
-
|
41981
|
-
|
41982
|
-
},
|
41983
|
-
}
|
41984
|
-
|
41985
|
-
|
42048
|
+
var Toaster = function Toaster(props) {
|
42049
|
+
var position = props.position,
|
42050
|
+
gap = props.gap,
|
42051
|
+
maxToasts = props.maxToasts,
|
42052
|
+
children = props.children;
|
42053
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_context__WEBPACK_IMPORTED_MODULE_4__.ToastContext.Provider, {
|
42054
|
+
value: {
|
42055
|
+
maxToasts: maxToasts,
|
42056
|
+
position: position
|
42057
|
+
}
|
42058
|
+
}, children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_hot_toast__WEBPACK_IMPORTED_MODULE_2__.Toaster, {
|
42059
|
+
position: position,
|
42060
|
+
gutter: gap,
|
42061
|
+
toastOptions: {
|
42062
|
+
duration: 5000
|
42063
|
+
}
|
42064
|
+
}, _toast_item__WEBPACK_IMPORTED_MODULE_5__.ToastItem));
|
42065
|
+
};
|
42066
|
+
Toaster.defaultProps = {
|
42067
|
+
position: 'bottom-left',
|
42068
|
+
gap: 8,
|
42069
|
+
maxToasts: 2
|
42070
|
+
};
|
42071
|
+
Toaster.propTypes = {
|
42072
|
+
position: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_3__.toastPositions),
|
42073
|
+
gap: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
42074
|
+
maxToasts: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
42075
|
+
};
|
41986
42076
|
|
41987
42077
|
/***/ }),
|
41988
42078
|
|
41989
|
-
/***/ "./src/toast/
|
41990
|
-
|
41991
|
-
!*** ./src/toast/
|
41992
|
-
|
42079
|
+
/***/ "./src/toast/use_toaster.js":
|
42080
|
+
/*!**********************************!*\
|
42081
|
+
!*** ./src/toast/use_toaster.js ***!
|
42082
|
+
\**********************************/
|
41993
42083
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
41994
42084
|
|
41995
42085
|
"use strict";
|
41996
42086
|
__webpack_require__.r(__webpack_exports__);
|
41997
42087
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
41998
|
-
/* harmony export */
|
41999
|
-
/* harmony export */ useToast: () => (/* binding */ useToast)
|
42088
|
+
/* harmony export */ useToaster: () => (/* binding */ useToaster)
|
42000
42089
|
/* harmony export */ });
|
42001
42090
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
42002
42091
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
42003
|
-
/* harmony import */ var
|
42004
|
-
/* harmony import */ var
|
42005
|
-
/* harmony import */ var _toast_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toast_item */ "./src/toast/toast_item.js");
|
42092
|
+
/* harmony import */ var react_hot_toast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-hot-toast */ "./node_modules/react-hot-toast/dist/index.mjs");
|
42093
|
+
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./context */ "./src/toast/context.js");
|
42006
42094
|
// LICENSE_CODE ZON
|
42007
42095
|
|
42008
42096
|
|
42009
42097
|
/*jslint react:true*/
|
42010
42098
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
42011
|
-
var _excluded = ["key"];
|
42012
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
42013
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
42014
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
42015
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
42016
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
42017
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
42018
42099
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
42019
42100
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
42020
42101
|
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; }
|
42021
|
-
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; }
|
42022
|
-
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; }
|
42023
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
42024
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
42025
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
42026
42102
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
42027
42103
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
42028
|
-
function
|
42029
|
-
function
|
42030
|
-
function
|
42031
|
-
function
|
42032
|
-
function
|
42033
|
-
function
|
42034
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
42035
|
-
|
42104
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
42105
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
42106
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
42107
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
42108
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
42109
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
42036
42110
|
|
42037
42111
|
|
42038
42112
|
|
42039
|
-
var
|
42040
|
-
|
42041
|
-
|
42042
|
-
|
42043
|
-
|
42044
|
-
|
42045
|
-
|
42046
|
-
|
42047
|
-
|
42048
|
-
|
42049
|
-
|
42050
|
-
|
42051
|
-
|
42052
|
-
|
42053
|
-
|
42054
|
-
|
42055
|
-
|
42056
|
-
|
42057
|
-
|
42058
|
-
|
42059
|
-
|
42060
|
-
|
42061
|
-
|
42062
|
-
|
42063
|
-
|
42064
|
-
|
42065
|
-
|
42066
|
-
|
42067
|
-
|
42068
|
-
|
42069
|
-
|
42070
|
-
|
42071
|
-
|
42072
|
-
|
42073
|
-
|
42074
|
-
|
42075
|
-
|
42076
|
-
|
42077
|
-
|
42078
|
-
|
42079
|
-
|
42080
|
-
|
42081
|
-
|
42082
|
-
|
42083
|
-
|
42084
|
-
|
42113
|
+
var DEFAULT_TYPE_CONFIG = {
|
42114
|
+
'error': {
|
42115
|
+
duration: Infinity
|
42116
|
+
},
|
42117
|
+
'warning': {
|
42118
|
+
duration: Infinity
|
42119
|
+
},
|
42120
|
+
'success': {
|
42121
|
+
duration: 5000
|
42122
|
+
},
|
42123
|
+
'info': {
|
42124
|
+
duration: 5000
|
42125
|
+
},
|
42126
|
+
'generic': {
|
42127
|
+
duration: 5000
|
42128
|
+
}
|
42129
|
+
};
|
42130
|
+
var queue = [];
|
42131
|
+
var dismissToast = function dismissToast(id) {
|
42132
|
+
if (!id) queue.length = 0;
|
42133
|
+
return react_hot_toast__WEBPACK_IMPORTED_MODULE_1__["default"].dismiss(id);
|
42134
|
+
};
|
42135
|
+
var _useToaster = function _useToaster() {
|
42136
|
+
var _useHotToaster = (0,react_hot_toast__WEBPACK_IMPORTED_MODULE_1__.useToaster)(),
|
42137
|
+
toasts = _useHotToaster.toasts;
|
42138
|
+
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context__WEBPACK_IMPORTED_MODULE_2__.ToastContext);
|
42139
|
+
var processQueue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
42140
|
+
var visibleToasts = toasts.filter(function (t) {
|
42141
|
+
return t.visible;
|
42142
|
+
});
|
42143
|
+
if (visibleToasts.length >= context.maxToasts || queue.length == 0) return;
|
42144
|
+
var _queue$shift = queue.shift(),
|
42145
|
+
_queue$shift2 = _slicedToArray(_queue$shift, 2),
|
42146
|
+
message = _queue$shift2[0],
|
42147
|
+
opt = _queue$shift2[1];
|
42148
|
+
react_hot_toast__WEBPACK_IMPORTED_MODULE_1__["default"].custom(message, opt);
|
42149
|
+
}, [toasts]);
|
42150
|
+
var processQueueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(processQueue);
|
42151
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
42152
|
+
processQueueRef.current = processQueue;
|
42153
|
+
}, [processQueue]);
|
42154
|
+
var enqueueToast = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (message, opt) {
|
42155
|
+
var id = Date.now() + Math.random();
|
42156
|
+
var type = opt.type || 'generic';
|
42157
|
+
var config = DEFAULT_TYPE_CONFIG[type] || DEFAULT_TYPE_CONFIG.generic;
|
42158
|
+
queue.push([message, _objectSpread(_objectSpread(_objectSpread({
|
42159
|
+
id: id,
|
42160
|
+
type: type
|
42161
|
+
}, config), opt), {}, {
|
42162
|
+
dismissToast: dismissToast
|
42163
|
+
})]);
|
42164
|
+
processQueueRef.current();
|
42165
|
+
return opt.id || id;
|
42166
|
+
}, []);
|
42167
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
42168
|
+
processQueue();
|
42169
|
+
}, [processQueue]);
|
42170
|
+
var _toast = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
42171
|
+
return {
|
42172
|
+
error: function error(message, opt) {
|
42173
|
+
return enqueueToast(message, _objectSpread(_objectSpread({}, opt), {}, {
|
42174
|
+
type: 'error'
|
42085
42175
|
}));
|
42086
|
-
}
|
42087
|
-
|
42088
|
-
|
42089
|
-
|
42090
|
-
key: "processQueue",
|
42091
|
-
value: function processQueue(state) {
|
42092
|
-
var queue = state.queue,
|
42093
|
-
toasts = state.toasts;
|
42094
|
-
if (toasts.length >= this.maxToasts) return state;
|
42095
|
-
if (queue.length > 0) {
|
42096
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
42097
|
-
toasts: [].concat(_toConsumableArray(toasts), [queue[0]]),
|
42098
|
-
queue: queue.slice(1, queue.length)
|
42099
|
-
});
|
42100
|
-
}
|
42101
|
-
return state;
|
42102
|
-
}
|
42103
|
-
}, {
|
42104
|
-
key: "handleCloseToast",
|
42105
|
-
value: function handleCloseToast(id) {
|
42106
|
-
if (this.props.onClose) this.props.onClose(id);
|
42107
|
-
this.setState(function (_ref) {
|
42108
|
-
var toasts = _ref.toasts,
|
42109
|
-
queue = _ref.queue;
|
42110
|
-
return {
|
42111
|
-
toasts: toasts.map(function (t) {
|
42112
|
-
if (t.id !== id) return _objectSpread({}, t);
|
42113
|
-
return t.entered ? _objectSpread(_objectSpread({}, t), {}, {
|
42114
|
-
open: false
|
42115
|
-
}) : _objectSpread(_objectSpread({}, t), {}, {
|
42116
|
-
requestClose: true
|
42117
|
-
});
|
42118
|
-
}),
|
42119
|
-
queue: queue.filter(function (t) {
|
42120
|
-
return t.id !== id;
|
42121
|
-
})
|
42122
|
-
};
|
42123
|
-
});
|
42124
|
-
}
|
42125
|
-
}, {
|
42126
|
-
key: "closeToast",
|
42127
|
-
value: function closeToast(id) {
|
42128
|
-
var toBeClosed = this.state.toasts.find(function (t) {
|
42129
|
-
return t.id === id;
|
42130
|
-
});
|
42131
|
-
if (id && toBeClosed && toBeClosed.onClose) toBeClosed.onClose(id);
|
42132
|
-
this.handleCloseToast(id);
|
42133
|
-
}
|
42134
|
-
}, {
|
42135
|
-
key: "handleEnteredToast",
|
42136
|
-
value: function handleEnteredToast(id) {
|
42137
|
-
if (!id) return;
|
42138
|
-
this.setState(function (_ref2) {
|
42139
|
-
var toasts = _ref2.toasts;
|
42140
|
-
return {
|
42141
|
-
toasts: toasts.map(function (t) {
|
42142
|
-
if (t.id !== id) return _objectSpread({}, t);
|
42143
|
-
return _objectSpread(_objectSpread({}, t), {}, {
|
42144
|
-
entered: true
|
42145
|
-
});
|
42146
|
-
})
|
42147
|
-
};
|
42148
|
-
});
|
42149
|
-
}
|
42150
|
-
}, {
|
42151
|
-
key: "handleExitedToast",
|
42152
|
-
value: function handleExitedToast(id) {
|
42153
|
-
var _this3 = this;
|
42154
|
-
if (!id) return;
|
42155
|
-
this.setState(function (state) {
|
42156
|
-
return _this3.processQueue(_objectSpread(_objectSpread({}, state), {}, {
|
42157
|
-
toasts: state.toasts.filter(function (t) {
|
42158
|
-
return t.id !== id;
|
42159
|
-
})
|
42176
|
+
},
|
42177
|
+
warning: function warning(message, opt) {
|
42178
|
+
return enqueueToast(message, _objectSpread(_objectSpread({}, opt), {}, {
|
42179
|
+
type: 'warning'
|
42160
42180
|
}));
|
42161
|
-
}
|
42162
|
-
|
42163
|
-
|
42164
|
-
|
42165
|
-
|
42166
|
-
|
42167
|
-
|
42168
|
-
|
42169
|
-
|
42170
|
-
|
42171
|
-
},
|
42172
|
-
|
42173
|
-
|
42174
|
-
|
42175
|
-
|
42176
|
-
|
42177
|
-
|
42178
|
-
|
42179
|
-
|
42180
|
-
|
42181
|
-
|
42182
|
-
|
42183
|
-
}
|
42184
|
-
|
42185
|
-
|
42181
|
+
},
|
42182
|
+
success: function success(message, opt) {
|
42183
|
+
return enqueueToast(message, _objectSpread(_objectSpread({}, opt), {}, {
|
42184
|
+
type: 'success'
|
42185
|
+
}));
|
42186
|
+
},
|
42187
|
+
info: function info(message, opt) {
|
42188
|
+
return enqueueToast(message, _objectSpread(_objectSpread({}, opt), {}, {
|
42189
|
+
type: 'info'
|
42190
|
+
}));
|
42191
|
+
},
|
42192
|
+
generic: function generic(message, opt) {
|
42193
|
+
return enqueueToast(message, _objectSpread(_objectSpread({}, opt), {}, {
|
42194
|
+
type: 'generic'
|
42195
|
+
}));
|
42196
|
+
}
|
42197
|
+
};
|
42198
|
+
}, [enqueueToast]);
|
42199
|
+
return {
|
42200
|
+
enqueueToast: enqueueToast,
|
42201
|
+
dismissToast: dismissToast,
|
42202
|
+
toast: _toast
|
42203
|
+
};
|
42204
|
+
};
|
42205
|
+
var useToaster = function useToaster() {
|
42206
|
+
var toasterHook = _useToaster();
|
42207
|
+
var memoizedHook = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
42208
|
+
return toasterHook;
|
42209
|
+
}, []);
|
42210
|
+
return memoizedHook;
|
42186
42211
|
};
|
42187
42212
|
|
42188
42213
|
/***/ }),
|
@@ -43761,7 +43786,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
43761
43786
|
/* harmony export */ iconNames: () => (/* binding */ iconNames),
|
43762
43787
|
/* harmony export */ toIconSize: () => (/* binding */ toIconSize),
|
43763
43788
|
/* harmony export */ toPixel: () => (/* binding */ toPixel),
|
43764
|
-
/* harmony export */ toSize: () => (/* binding */ toSize)
|
43789
|
+
/* harmony export */ toSize: () => (/* binding */ toSize),
|
43790
|
+
/* harmony export */ toastPositions: () => (/* binding */ toastPositions)
|
43765
43791
|
/* harmony export */ });
|
43766
43792
|
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @icons */ "./assets/icons/index.js");
|
43767
43793
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
@@ -43831,6 +43857,7 @@ var toIconSize = function toIconSize(size) {
|
|
43831
43857
|
if (size == 'xxs') return toSize(12);
|
43832
43858
|
return toSize(24);
|
43833
43859
|
};
|
43860
|
+
var toastPositions = ['top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right'];
|
43834
43861
|
|
43835
43862
|
/***/ }),
|
43836
43863
|
|
@@ -55843,33 +55870,6 @@ memoize.Cache = MapCache;
|
|
55843
55870
|
module.exports = memoize;
|
55844
55871
|
|
55845
55872
|
|
55846
|
-
/***/ }),
|
55847
|
-
|
55848
|
-
/***/ "./node_modules/lodash/noop.js":
|
55849
|
-
/*!*************************************!*\
|
55850
|
-
!*** ./node_modules/lodash/noop.js ***!
|
55851
|
-
\*************************************/
|
55852
|
-
/***/ ((module) => {
|
55853
|
-
|
55854
|
-
/**
|
55855
|
-
* This method returns `undefined`.
|
55856
|
-
*
|
55857
|
-
* @static
|
55858
|
-
* @memberOf _
|
55859
|
-
* @since 2.3.0
|
55860
|
-
* @category Util
|
55861
|
-
* @example
|
55862
|
-
*
|
55863
|
-
* _.times(2, _.noop);
|
55864
|
-
* // => [undefined, undefined]
|
55865
|
-
*/
|
55866
|
-
function noop() {
|
55867
|
-
// No operation performed.
|
55868
|
-
}
|
55869
|
-
|
55870
|
-
module.exports = noop;
|
55871
|
-
|
55872
|
-
|
55873
55873
|
/***/ }),
|
55874
55874
|
|
55875
55875
|
/***/ "./node_modules/lodash/now.js":
|
@@ -116737,6 +116737,27 @@ function transpose(fromDate, constructor) {
|
|
116737
116737
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (transpose);
|
116738
116738
|
|
116739
116739
|
|
116740
|
+
/***/ }),
|
116741
|
+
|
116742
|
+
/***/ "./node_modules/goober/dist/goober.modern.js":
|
116743
|
+
/*!***************************************************!*\
|
116744
|
+
!*** ./node_modules/goober/dist/goober.modern.js ***!
|
116745
|
+
\***************************************************/
|
116746
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
116747
|
+
|
116748
|
+
"use strict";
|
116749
|
+
__webpack_require__.r(__webpack_exports__);
|
116750
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
116751
|
+
/* harmony export */ css: () => (/* binding */ u),
|
116752
|
+
/* harmony export */ extractCss: () => (/* binding */ r),
|
116753
|
+
/* harmony export */ glob: () => (/* binding */ b),
|
116754
|
+
/* harmony export */ keyframes: () => (/* binding */ h),
|
116755
|
+
/* harmony export */ setup: () => (/* binding */ m),
|
116756
|
+
/* harmony export */ styled: () => (/* binding */ j)
|
116757
|
+
/* harmony export */ });
|
116758
|
+
let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,r=e=>{let r=t(e),l=r.data;return r.data="",l},l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";")}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d)}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g,b=u.bind({g:1}),h=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=u.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}
|
116759
|
+
|
116760
|
+
|
116740
116761
|
/***/ }),
|
116741
116762
|
|
116742
116763
|
/***/ "./node_modules/internmap/src/index.js":
|
@@ -116814,6 +116835,211 @@ function keyof(value) {
|
|
116814
116835
|
}
|
116815
116836
|
|
116816
116837
|
|
116838
|
+
/***/ }),
|
116839
|
+
|
116840
|
+
/***/ "./node_modules/react-hot-toast/dist/index.mjs":
|
116841
|
+
/*!*****************************************************!*\
|
116842
|
+
!*** ./node_modules/react-hot-toast/dist/index.mjs ***!
|
116843
|
+
\*****************************************************/
|
116844
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
116845
|
+
|
116846
|
+
"use strict";
|
116847
|
+
__webpack_require__.r(__webpack_exports__);
|
116848
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
116849
|
+
/* harmony export */ CheckmarkIcon: () => (/* binding */ w),
|
116850
|
+
/* harmony export */ ErrorIcon: () => (/* binding */ _),
|
116851
|
+
/* harmony export */ LoaderIcon: () => (/* binding */ V),
|
116852
|
+
/* harmony export */ ToastBar: () => (/* binding */ F),
|
116853
|
+
/* harmony export */ ToastIcon: () => (/* binding */ M),
|
116854
|
+
/* harmony export */ Toaster: () => (/* binding */ Ie),
|
116855
|
+
/* harmony export */ "default": () => (/* binding */ _t),
|
116856
|
+
/* harmony export */ resolveValue: () => (/* binding */ T),
|
116857
|
+
/* harmony export */ toast: () => (/* binding */ n),
|
116858
|
+
/* harmony export */ useToaster: () => (/* binding */ D),
|
116859
|
+
/* harmony export */ useToasterStore: () => (/* binding */ I)
|
116860
|
+
/* harmony export */ });
|
116861
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
116862
|
+
/* harmony import */ var goober__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! goober */ "./node_modules/goober/dist/goober.modern.js");
|
116863
|
+
"use client";
|
116864
|
+
var W=e=>typeof e=="function",T=(e,t)=>W(e)?e(t):e;var U=(()=>{let e=0;return()=>(++e).toString()})(),b=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})();var Q=20;var S=new Map,X=1e3,$=e=>{if(S.has(e))return;let t=setTimeout(()=>{S.delete(e),u({type:4,toastId:e})},X);S.set(e,t)},J=e=>{let t=S.get(e);t&&clearTimeout(t)},v=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Q)};case 1:return t.toast.id&&J(t.toast.id),{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case 2:let{toast:o}=t;return e.toasts.find(r=>r.id===o.id)?v(e,{type:1,toast:o}):v(e,{type:0,toast:o});case 3:let{toastId:s}=t;return s?$(s):e.toasts.forEach(r=>{$(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===s||s===void 0?{...r,visible:!1}:r)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(r=>({...r,pauseDuration:r.pauseDuration+a}))}}},A=[],P={toasts:[],pausedAt:void 0},u=e=>{P=v(P,e),A.forEach(t=>{t(P)})},Y={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},I=(e={})=>{let[t,o]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(P);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>(A.push(o),()=>{let a=A.indexOf(o);a>-1&&A.splice(a,1)}),[t]);let s=t.toasts.map(a=>{var r,c;return{...e,...e[a.type],...a,duration:a.duration||((r=e[a.type])==null?void 0:r.duration)||(e==null?void 0:e.duration)||Y[a.type],style:{...e.style,...(c=e[a.type])==null?void 0:c.style,...a.style}}});return{...t,toasts:s}};var G=(e,t="blank",o)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...o,id:(o==null?void 0:o.id)||U()}),h=e=>(t,o)=>{let s=G(t,e,o);return u({type:2,toast:s}),s.id},n=(e,t)=>h("blank")(e,t);n.error=h("error");n.success=h("success");n.loading=h("loading");n.custom=h("custom");n.dismiss=e=>{u({type:3,toastId:e})};n.remove=e=>u({type:4,toastId:e});n.promise=(e,t,o)=>{let s=n.loading(t.loading,{...o,...o==null?void 0:o.loading});return e.then(a=>(n.success(T(t.success,a),{id:s,...o,...o==null?void 0:o.success}),a)).catch(a=>{n.error(T(t.error,a),{id:s,...o,...o==null?void 0:o.error})}),e};var Z=(e,t)=>{u({type:1,toast:{id:e,height:t}})},ee=()=>{u({type:5,time:Date.now()})},D=e=>{let{toasts:t,pausedAt:o}=I(e);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{if(o)return;let r=Date.now(),c=t.map(i=>{if(i.duration===1/0)return;let d=(i.duration||0)+i.pauseDuration-(r-i.createdAt);if(d<0){i.visible&&n.dismiss(i.id);return}return setTimeout(()=>n.dismiss(i.id),d)});return()=>{c.forEach(i=>i&&clearTimeout(i))}},[t,o]);let s=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{o&&u({type:6,time:Date.now()})},[o]),a=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((r,c)=>{let{reverseOrder:i=!1,gutter:d=8,defaultPosition:p}=c||{},g=t.filter(m=>(m.position||p)===(r.position||p)&&m.height),E=g.findIndex(m=>m.id===r.id),x=g.filter((m,R)=>R<E&&m.visible).length;return g.filter(m=>m.visible).slice(...i?[x+1]:[0,x]).reduce((m,R)=>m+(R.height||0)+d,0)},[t]);return{toasts:t,handlers:{updateHeight:Z,startPause:ee,endPause:s,calculateOffset:a}}};var oe=(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)`
|
116865
|
+
from {
|
116866
|
+
transform: scale(0) rotate(45deg);
|
116867
|
+
opacity: 0;
|
116868
|
+
}
|
116869
|
+
to {
|
116870
|
+
transform: scale(1) rotate(45deg);
|
116871
|
+
opacity: 1;
|
116872
|
+
}`,re=(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)`
|
116873
|
+
from {
|
116874
|
+
transform: scale(0);
|
116875
|
+
opacity: 0;
|
116876
|
+
}
|
116877
|
+
to {
|
116878
|
+
transform: scale(1);
|
116879
|
+
opacity: 1;
|
116880
|
+
}`,se=(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)`
|
116881
|
+
from {
|
116882
|
+
transform: scale(0) rotate(90deg);
|
116883
|
+
opacity: 0;
|
116884
|
+
}
|
116885
|
+
to {
|
116886
|
+
transform: scale(1) rotate(90deg);
|
116887
|
+
opacity: 1;
|
116888
|
+
}`,_=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
116889
|
+
width: 20px;
|
116890
|
+
opacity: 0;
|
116891
|
+
height: 20px;
|
116892
|
+
border-radius: 10px;
|
116893
|
+
background: ${e=>e.primary||"#ff4b4b"};
|
116894
|
+
position: relative;
|
116895
|
+
transform: rotate(45deg);
|
116896
|
+
|
116897
|
+
animation: ${oe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
116898
|
+
forwards;
|
116899
|
+
animation-delay: 100ms;
|
116900
|
+
|
116901
|
+
&:after,
|
116902
|
+
&:before {
|
116903
|
+
content: '';
|
116904
|
+
animation: ${re} 0.15s ease-out forwards;
|
116905
|
+
animation-delay: 150ms;
|
116906
|
+
position: absolute;
|
116907
|
+
border-radius: 3px;
|
116908
|
+
opacity: 0;
|
116909
|
+
background: ${e=>e.secondary||"#fff"};
|
116910
|
+
bottom: 9px;
|
116911
|
+
left: 4px;
|
116912
|
+
height: 2px;
|
116913
|
+
width: 12px;
|
116914
|
+
}
|
116915
|
+
|
116916
|
+
&:before {
|
116917
|
+
animation: ${se} 0.15s ease-out forwards;
|
116918
|
+
animation-delay: 180ms;
|
116919
|
+
transform: rotate(90deg);
|
116920
|
+
}
|
116921
|
+
`;var ne=(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)`
|
116922
|
+
from {
|
116923
|
+
transform: rotate(0deg);
|
116924
|
+
}
|
116925
|
+
to {
|
116926
|
+
transform: rotate(360deg);
|
116927
|
+
}
|
116928
|
+
`,V=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
116929
|
+
width: 12px;
|
116930
|
+
height: 12px;
|
116931
|
+
box-sizing: border-box;
|
116932
|
+
border: 2px solid;
|
116933
|
+
border-radius: 100%;
|
116934
|
+
border-color: ${e=>e.secondary||"#e0e0e0"};
|
116935
|
+
border-right-color: ${e=>e.primary||"#616161"};
|
116936
|
+
animation: ${ne} 1s linear infinite;
|
116937
|
+
`;var pe=(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)`
|
116938
|
+
from {
|
116939
|
+
transform: scale(0) rotate(45deg);
|
116940
|
+
opacity: 0;
|
116941
|
+
}
|
116942
|
+
to {
|
116943
|
+
transform: scale(1) rotate(45deg);
|
116944
|
+
opacity: 1;
|
116945
|
+
}`,de=(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)`
|
116946
|
+
0% {
|
116947
|
+
height: 0;
|
116948
|
+
width: 0;
|
116949
|
+
opacity: 0;
|
116950
|
+
}
|
116951
|
+
40% {
|
116952
|
+
height: 0;
|
116953
|
+
width: 6px;
|
116954
|
+
opacity: 1;
|
116955
|
+
}
|
116956
|
+
100% {
|
116957
|
+
opacity: 1;
|
116958
|
+
height: 10px;
|
116959
|
+
}`,w=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
116960
|
+
width: 20px;
|
116961
|
+
opacity: 0;
|
116962
|
+
height: 20px;
|
116963
|
+
border-radius: 10px;
|
116964
|
+
background: ${e=>e.primary||"#61d345"};
|
116965
|
+
position: relative;
|
116966
|
+
transform: rotate(45deg);
|
116967
|
+
|
116968
|
+
animation: ${pe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
116969
|
+
forwards;
|
116970
|
+
animation-delay: 100ms;
|
116971
|
+
&:after {
|
116972
|
+
content: '';
|
116973
|
+
box-sizing: border-box;
|
116974
|
+
animation: ${de} 0.2s ease-out forwards;
|
116975
|
+
opacity: 0;
|
116976
|
+
animation-delay: 200ms;
|
116977
|
+
position: absolute;
|
116978
|
+
border-right: 2px solid;
|
116979
|
+
border-bottom: 2px solid;
|
116980
|
+
border-color: ${e=>e.secondary||"#fff"};
|
116981
|
+
bottom: 6px;
|
116982
|
+
left: 6px;
|
116983
|
+
height: 10px;
|
116984
|
+
width: 6px;
|
116985
|
+
}
|
116986
|
+
`;var ue=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
116987
|
+
position: absolute;
|
116988
|
+
`,le=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
116989
|
+
position: relative;
|
116990
|
+
display: flex;
|
116991
|
+
justify-content: center;
|
116992
|
+
align-items: center;
|
116993
|
+
min-width: 20px;
|
116994
|
+
min-height: 20px;
|
116995
|
+
`,Te=(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)`
|
116996
|
+
from {
|
116997
|
+
transform: scale(0.6);
|
116998
|
+
opacity: 0.4;
|
116999
|
+
}
|
117000
|
+
to {
|
117001
|
+
transform: scale(1);
|
117002
|
+
opacity: 1;
|
117003
|
+
}`,fe=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
117004
|
+
position: relative;
|
117005
|
+
transform: scale(0.6);
|
117006
|
+
opacity: 0.4;
|
117007
|
+
min-width: 20px;
|
117008
|
+
animation: ${Te} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
117009
|
+
forwards;
|
117010
|
+
`,M=({toast:e})=>{let{icon:t,type:o,iconTheme:s}=e;return t!==void 0?typeof t=="string"?react__WEBPACK_IMPORTED_MODULE_0__.createElement(fe,null,t):t:o==="blank"?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement(le,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(V,{...s}),o!=="loading"&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(ue,null,o==="error"?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_,{...s}):react__WEBPACK_IMPORTED_MODULE_0__.createElement(w,{...s})))};var ye=e=>`
|
117011
|
+
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
117012
|
+
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
117013
|
+
`,ge=e=>`
|
117014
|
+
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
117015
|
+
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
117016
|
+
`,he="0%{opacity:0;} 100%{opacity:1;}",xe="0%{opacity:1;} 100%{opacity:0;}",be=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
117017
|
+
display: flex;
|
117018
|
+
align-items: center;
|
117019
|
+
background: #fff;
|
117020
|
+
color: #363636;
|
117021
|
+
line-height: 1.3;
|
117022
|
+
will-change: transform;
|
117023
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
117024
|
+
max-width: 350px;
|
117025
|
+
pointer-events: auto;
|
117026
|
+
padding: 8px 10px;
|
117027
|
+
border-radius: 8px;
|
117028
|
+
`,Se=(0,goober__WEBPACK_IMPORTED_MODULE_1__.styled)("div")`
|
117029
|
+
display: flex;
|
117030
|
+
justify-content: center;
|
117031
|
+
margin: 4px 10px;
|
117032
|
+
color: inherit;
|
117033
|
+
flex: 1 1 auto;
|
117034
|
+
white-space: pre-line;
|
117035
|
+
`,Ae=(e,t)=>{let s=e.includes("top")?1:-1,[a,r]=b()?[he,xe]:[ye(s),ge(s)];return{animation:t?`${(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)(a)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${(0,goober__WEBPACK_IMPORTED_MODULE_1__.keyframes)(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},F=react__WEBPACK_IMPORTED_MODULE_0__.memo(({toast:e,position:t,style:o,children:s})=>{let a=e.height?Ae(e.position||t||"top-center",e.visible):{opacity:0},r=react__WEBPACK_IMPORTED_MODULE_0__.createElement(M,{toast:e}),c=react__WEBPACK_IMPORTED_MODULE_0__.createElement(Se,{...e.ariaProps},T(e.message,e));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(be,{className:e.className,style:{...a,...o,...e.style}},typeof s=="function"?s({icon:r,message:c}):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,r,c))});(0,goober__WEBPACK_IMPORTED_MODULE_1__.setup)(react__WEBPACK_IMPORTED_MODULE_0__.createElement);var Ee=({id:e,className:t,style:o,onHeightUpdate:s,children:a})=>{let r=react__WEBPACK_IMPORTED_MODULE_0__.useCallback(c=>{if(c){let i=()=>{let d=c.getBoundingClientRect().height;s(e,d)};i(),new MutationObserver(i).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[e,s]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{ref:r,className:t,style:o},a)},Re=(e,t)=>{let o=e.includes("top"),s=o?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:b()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(o?1:-1)}px)`,...s,...a}},ve=(0,goober__WEBPACK_IMPORTED_MODULE_1__.css)`
|
117036
|
+
z-index: 9999;
|
117037
|
+
> * {
|
117038
|
+
pointer-events: auto;
|
117039
|
+
}
|
117040
|
+
`,O=16,Ie=({reverseOrder:e,position:t="top-center",toastOptions:o,gutter:s,children:a,containerStyle:r,containerClassName:c})=>{let{toasts:i,handlers:d}=D(o);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{style:{position:"fixed",zIndex:9999,top:O,left:O,right:O,bottom:O,pointerEvents:"none",...r},className:c,onMouseEnter:d.startPause,onMouseLeave:d.endPause},i.map(p=>{let g=p.position||t,E=d.calculateOffset(p,{reverseOrder:e,gutter:s,defaultPosition:t}),x=Re(g,E);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ee,{id:p.id,key:p.id,onHeightUpdate:d.updateHeight,className:p.visible?ve:"",style:x},p.type==="custom"?T(p.message,p):a?a(p):react__WEBPACK_IMPORTED_MODULE_0__.createElement(F,{toast:p,position:g}))}))};var _t=n;
|
117041
|
+
//# sourceMappingURL=index.mjs.map
|
117042
|
+
|
116817
117043
|
/***/ }),
|
116818
117044
|
|
116819
117045
|
/***/ "./node_modules/stylis/src/Enum.js":
|
@@ -118015,13 +118241,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
118015
118241
|
/* harmony export */ Table: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Table),
|
118016
118242
|
/* harmony export */ TagGroup: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.TagGroup),
|
118017
118243
|
/* harmony export */ Toast: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Toast),
|
118018
|
-
/* harmony export */
|
118244
|
+
/* harmony export */ Toaster: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Toaster),
|
118019
118245
|
/* harmony export */ Tooltip: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Tooltip),
|
118020
118246
|
/* harmony export */ Typography: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Typography),
|
118021
118247
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
118022
118248
|
/* harmony export */ theme: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.theme),
|
118023
118249
|
/* harmony export */ translation: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.translation),
|
118024
|
-
/* harmony export */
|
118250
|
+
/* harmony export */ useToaster: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.useToaster),
|
118025
118251
|
/* harmony export */ withPopover: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.withPopover),
|
118026
118252
|
/* harmony export */ withTooltip: () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.withTooltip)
|
118027
118253
|
/* harmony export */ });
|