@luminati-io/uikit 6.1.1 → 6.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -45212,7 +45212,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
45212
45212
|
|
45213
45213
|
|
45214
45214
|
/*jslint react:true*/
|
45215
|
-
var _excluded = ["type", "children", "onClose", "dismissible", "
|
45215
|
+
var _excluded = ["type", "children", "onClose", "dismissible", "className", "classNamePrefix"];
|
45216
45216
|
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); }
|
45217
45217
|
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; }
|
45218
45218
|
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; }
|
@@ -45228,29 +45228,31 @@ var Toast = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef
|
|
45228
45228
|
children = _ref.children,
|
45229
45229
|
onClose = _ref.onClose,
|
45230
45230
|
dismissible = _ref.dismissible,
|
45231
|
-
|
45232
|
-
|
45233
|
-
classNamePrefix = _ref$classNamePrefix === void 0 ? '' : _ref$classNamePrefix,
|
45231
|
+
className = _ref.className,
|
45232
|
+
classNamePrefix = _ref.classNamePrefix,
|
45234
45233
|
rest = _objectWithoutProperties(_ref, _excluded);
|
45235
|
-
var _dismissible = dismissible
|
45236
|
-
var _notDismissible = notDismissible;
|
45234
|
+
var _dismissible = (0,_util__WEBPACK_IMPORTED_MODULE_3__.firstDefined)(dismissible, type == 'error' || type == 'warning');
|
45237
45235
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Wrapper, _extends({
|
45238
45236
|
ref: ref,
|
45239
45237
|
$type: type
|
45240
45238
|
}, (0,_util__WEBPACK_IMPORTED_MODULE_3__.getCommonProps)(rest), {
|
45241
|
-
className: classNamePrefix
|
45242
|
-
|
45239
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
|
45240
|
+
wrapper: true
|
45241
|
+
}, className)
|
45242
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Content, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToastIcon, {
|
45243
45243
|
type: type,
|
45244
45244
|
classNamePrefix: classNamePrefix
|
45245
45245
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_6__.Paragraph, {
|
45246
45246
|
variant: "sm",
|
45247
45247
|
color: "text",
|
45248
|
-
className: classNamePrefix
|
45249
|
-
|
45248
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
|
45249
|
+
body: true
|
45250
|
+
})
|
45251
|
+
}, children)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(RemoveButton, {
|
45250
45252
|
onClick: onClose,
|
45251
45253
|
classNamePrefix: classNamePrefix,
|
45252
45254
|
type: type,
|
45253
|
-
dismissible: _dismissible
|
45255
|
+
dismissible: _dismissible
|
45254
45256
|
}));
|
45255
45257
|
});
|
45256
45258
|
Toast.displayName = 'Toast';
|
@@ -45258,18 +45260,21 @@ Toast.propTypes = {
|
|
45258
45260
|
type: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['success', 'error', 'warning', 'info', 'generic']),
|
45259
45261
|
onClose: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
45260
45262
|
dismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
45261
|
-
notDismissible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
45262
45263
|
classNamePrefix: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
45263
45264
|
};
|
45264
45265
|
var Wrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
45265
45266
|
displayName: "Wrapper",
|
45266
45267
|
componentId: "sc-tn2lqb-0"
|
45267
|
-
})(["display:flex;flex-direction:row;justify-content:
|
45268
|
+
})(["display:flex;flex-direction:row;justify-content:space-between;padding:8px;gap:8px;border-radius:4px;background-color:", ";box-shadow:", ";"], function (p) {
|
45268
45269
|
return getBackgroundColor(p);
|
45269
45270
|
}, function (_ref2) {
|
45270
45271
|
var shadow = _ref2.theme.shadow;
|
45271
45272
|
return shadow.medium;
|
45272
45273
|
});
|
45274
|
+
var Content = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
45275
|
+
displayName: "Content",
|
45276
|
+
componentId: "sc-tn2lqb-1"
|
45277
|
+
})(["display:flex;flex-direction:row;gap:8px;"]);
|
45273
45278
|
var ToastIcon = function ToastIcon(_ref3) {
|
45274
45279
|
var type = _ref3.type,
|
45275
45280
|
classNamePrefix = _ref3.classNamePrefix;
|
@@ -45289,7 +45294,9 @@ var ToastIcon = function ToastIcon(_ref3) {
|
|
45289
45294
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon, {
|
45290
45295
|
name: name,
|
45291
45296
|
color: _color,
|
45292
|
-
className: classNamePrefix
|
45297
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
|
45298
|
+
icon: true
|
45299
|
+
}),
|
45293
45300
|
size: "xs"
|
45294
45301
|
});
|
45295
45302
|
};
|
@@ -45304,7 +45311,9 @@ var RemoveButton = function RemoveButton(_ref4) {
|
|
45304
45311
|
icon: "CloseSmall",
|
45305
45312
|
$type: type,
|
45306
45313
|
onClick: onClick,
|
45307
|
-
className: classNamePrefix
|
45314
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
|
45315
|
+
dismissButton: true
|
45316
|
+
})
|
45308
45317
|
});
|
45309
45318
|
};
|
45310
45319
|
RemoveButton.propTypes = {
|
@@ -45314,7 +45323,7 @@ RemoveButton.propTypes = {
|
|
45314
45323
|
};
|
45315
45324
|
var StyledRemoveButton = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_icon_button__WEBPACK_IMPORTED_MODULE_5__.IconButton).withConfig({
|
45316
45325
|
displayName: "StyledRemoveButton",
|
45317
|
-
componentId: "sc-tn2lqb-
|
45326
|
+
componentId: "sc-tn2lqb-2"
|
45318
45327
|
})(["border-radius:", ";min-width:16px;width:16px;min-height:16px;height:16px;background-color:", ";"], function (_ref5) {
|
45319
45328
|
var spacing = _ref5.theme.spacing;
|
45320
45329
|
return spacing['05'];
|