@uiw/react-alert
Advanced tools
Comparing version 5.0.0-bate-1 to 5.0.0-bate-10
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,13 +9,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _reactModal = _interopRequireDefault(require("@uiw/react-modal")); | ||
var _style = require("./style"); | ||
Object.keys(_style).forEach(function (key) { | ||
@@ -33,15 +26,12 @@ if (key === "default" || key === "__esModule") return; | ||
}); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _excluded = ["prefixCls", "className", "width"]; | ||
var _default = function _default() { | ||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var _props$prefixCls = props.prefixCls, | ||
prefixCls = _props$prefixCls === void 0 ? 'w-alert' : _props$prefixCls, | ||
className = props.className, | ||
_props$width = props.width, | ||
width = _props$width === void 0 ? 400 : _props$width, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
prefixCls = _props$prefixCls === void 0 ? 'w-alert' : _props$prefixCls, | ||
className = props.className, | ||
_props$width = props.width, | ||
width = _props$width === void 0 ? 400 : _props$width, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
var cls = [prefixCls, className].filter(Boolean).join(' ').trim(); | ||
@@ -56,4 +46,3 @@ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.AlertStyleWarp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"]; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,17 +9,9 @@ value: true | ||
exports.AlertStyleWarp = exports.AlertStyleTheme = void 0; | ||
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _styledComponents = _interopRequireWildcard(require("styled-components")); | ||
var _reactModal = require("@uiw/react-modal"); | ||
var _reactIcon = require("@uiw/react-icon"); | ||
var _utils = require("@uiw/utils"); | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5; | ||
var AlertStyleTheme = { | ||
@@ -38,10 +28,7 @@ colorAlertPrimary: '#008ef0', | ||
}; | ||
var typeVariant = function typeVariant(type, color) { | ||
return (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ", " > ", " {\n color: ", ";\n }\n "])), _reactModal.ModalStyleHeader, _reactIcon.IconStyleBase, color); | ||
return (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ", " > ", " {\n color: ", ";\n fill: ", ";\n }\n "])), _reactModal.ModalStyleHeader, _reactIcon.IconStyleBase, color, color); | ||
}; | ||
var typeCss = function typeCss(props) { | ||
var type = props.type; | ||
if (type === 'primary') { | ||
@@ -56,6 +43,4 @@ return typeVariant(type, (0, _utils.getThemeVariantValue)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), propsTheme), 'colorAlertPrimary')); | ||
} | ||
return typeVariant('link', (0, _utils.getThemeVariantValue)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), propsTheme), 'colorAlertDefault')); | ||
}; | ||
var AlertStyleWarp = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n ", " {\n display: table-cell;\n background-color: transparent;\n padding: 20px 0 0 20px;\n box-shadow: 0 0 0 0;\n padding-right: 0;\n ", " {\n font-size: 40px;\n margin-right: 0;\n }\n > button > ", " {\n font-size: 14px;\n }\n }\n ", " {\n display: table-cell;\n padding-right: 20px;\n padding-left: 20px;\n vertical-align: top;\n }\n ", "\n ", " ", " {\n > button {\n min-width: 18px;\n min-height: 18px;\n padding: 5px 5px;\n position: absolute;\n right: 10px;\n top: 10px;\n }\n }\n ", "\n ", "\n ", "\n"])), _reactModal.ModalStyleHeader, _reactIcon.IconStyleBase, _reactIcon.IconStyleBase, _reactModal.ModalStyleBody, typeCss, _reactModal.ModalStyleInner, _reactModal.ModalStyleHeader, function (props) { | ||
@@ -68,4 +53,3 @@ return props.title && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n ", " {\n ", " {\n word-break: break-word;\n display: flex;\n padding-top: 15px;\n padding-right: 10px;\n > ", " {\n font-size: 40px;\n position: absolute;\n top: 18px;\n }\n\n > button > ", " {\n font-size: 14px;\n }\n }\n ", " {\n word-break: break-word;\n padding-top: 5px;\n }\n }\n "])), _reactModal.ModalStyleInner, _reactModal.ModalStyleHeader, _reactIcon.IconStyleBase, _reactIcon.IconStyleBase, _reactModal.ModalStyleBody); | ||
}); | ||
exports.AlertStyleWarp = AlertStyleWarp; | ||
//# sourceMappingURL=index.js.map |
@@ -13,10 +13,8 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
} | ||
var { | ||
prefixCls = 'w-alert', | ||
className, | ||
width = 400 | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
prefixCls = 'w-alert', | ||
className, | ||
width = 400 | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
var cls = [prefixCls, className].filter(Boolean).join(' ').trim(); | ||
@@ -23,0 +21,0 @@ return /*#__PURE__*/_jsx(AlertStyleWarp, _extends({ |
import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/taggedTemplateLiteralLoose"; | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5; | ||
import styled, { css } from 'styled-components'; | ||
@@ -20,7 +18,5 @@ import { ModalStyleHeader, ModalStyleBody, ModalStyleInner } from '@uiw/react-modal'; | ||
}; | ||
var typeVariant = (type, color) => { | ||
return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", " > ", " {\n color: ", ";\n }\n "])), ModalStyleHeader, IconStyleBase, color); | ||
return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", " > ", " {\n color: ", ";\n fill: ", ";\n }\n "])), ModalStyleHeader, IconStyleBase, color, color); | ||
}; | ||
var typeCss = props => { | ||
@@ -30,3 +26,2 @@ var { | ||
} = props; | ||
if (type === 'primary') { | ||
@@ -41,7 +36,5 @@ return typeVariant(type, getThemeVariantValue(_extends({}, props, propsTheme), 'colorAlertPrimary')); | ||
} | ||
return typeVariant('link', getThemeVariantValue(_extends({}, props, propsTheme), 'colorAlertDefault')); | ||
}; | ||
export var AlertStyleWarp = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n ", " {\n display: table-cell;\n background-color: transparent;\n padding: 20px 0 0 20px;\n box-shadow: 0 0 0 0;\n padding-right: 0;\n ", " {\n font-size: 40px;\n margin-right: 0;\n }\n > button > ", " {\n font-size: 14px;\n }\n }\n ", " {\n display: table-cell;\n padding-right: 20px;\n padding-left: 20px;\n vertical-align: top;\n }\n ", "\n ", " ", " {\n > button {\n min-width: 18px;\n min-height: 18px;\n padding: 5px 5px;\n position: absolute;\n right: 10px;\n top: 10px;\n }\n }\n ", "\n ", "\n ", "\n"])), ModalStyleHeader, IconStyleBase, IconStyleBase, ModalStyleBody, typeCss, ModalStyleInner, ModalStyleHeader, props => props.title && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n ", " {\n ", " {\n word-break: break-word;\n display: flex;\n padding-top: 15px;\n padding-right: 10px;\n > ", " {\n font-size: 40px;\n position: absolute;\n top: 18px;\n }\n\n > button > ", " {\n font-size: 14px;\n }\n }\n ", " {\n word-break: break-word;\n padding-top: 5px;\n }\n }\n "])), ModalStyleInner, ModalStyleHeader, IconStyleBase, IconStyleBase, ModalStyleBody), props => props.icon && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n ", " > h4 {\n padding-left: 60px;\n }\n "])), ModalStyleHeader), props => props.title && props.icon && css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n ", " {\n padding-left: 80px;\n }\n "])), ModalStyleBody)); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@uiw/react-alert", | ||
"version": "5.0.0-bate-1", | ||
"version": "5.0.0-bate-10", | ||
"description": "Alert component", | ||
@@ -48,7 +48,7 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/react-button": "^5.0.0-bate-1", | ||
"@uiw/react-icon": "^5.0.0-bate-1", | ||
"@uiw/react-modal": "^5.0.0-bate-1", | ||
"@uiw/utils": "^5.0.0-bate-1" | ||
"@uiw/react-button": "^5.0.0-bate-10", | ||
"@uiw/react-icon": "^5.0.0-bate-10", | ||
"@uiw/react-modal": "^5.0.0-bate-10", | ||
"@uiw/utils": "^5.0.0-bate-10" | ||
} | ||
} |
@@ -29,2 +29,3 @@ import styled, { css } from 'styled-components'; | ||
color: ${color}; | ||
fill: ${color}; | ||
} | ||
@@ -31,0 +32,0 @@ `; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
338
48062