@uiw/react-alert
Advanced tools
Comparing version 4.21.14 to 5.0.0-bate-0
import { ModalProps } from '@uiw/react-modal'; | ||
import { IProps } from '@uiw/utils'; | ||
import './style/index.less'; | ||
export * from './style'; | ||
export interface AlertProps extends IProps, ModalProps { | ||
@@ -9,1 +9,2 @@ width?: number; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -8,2 +8,3 @@ "use strict"; | ||
}); | ||
var _exportNames = {}; | ||
exports["default"] = void 0; | ||
@@ -19,2 +20,16 @@ | ||
var _style = require("./style"); | ||
Object.keys(_style).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
if (key in exports && exports[key] === _style[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _style[key]; | ||
} | ||
}); | ||
}); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
@@ -33,3 +48,5 @@ | ||
var cls = [prefixCls, className].filter(Boolean).join(' ').trim(); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactModal["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, other), {}, { | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.AlertStyleWarp, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
as: _reactModal["default"] | ||
}, other), {}, { | ||
width: width, | ||
@@ -42,3 +59,2 @@ className: cls, | ||
exports["default"] = _default; | ||
module.exports = exports.default; | ||
//# sourceMappingURL=index.js.map |
import { ModalProps } from '@uiw/react-modal'; | ||
import { IProps } from '@uiw/utils'; | ||
import './style/index.less'; | ||
export * from './style'; | ||
export interface AlertProps extends IProps, ModalProps { | ||
@@ -9,1 +9,2 @@ width?: number; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,4 +6,5 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import Modal from '@uiw/react-modal'; | ||
import "./style/index.css"; | ||
import { AlertStyleWarp } from './style'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
export * from './style'; | ||
export default (function (props) { | ||
@@ -22,3 +23,5 @@ if (props === void 0) { | ||
var cls = [prefixCls, className].filter(Boolean).join(' ').trim(); | ||
return /*#__PURE__*/_jsx(Modal, _extends({}, other, { | ||
return /*#__PURE__*/_jsx(AlertStyleWarp, _extends({ | ||
as: Modal | ||
}, other, { | ||
width: width, | ||
@@ -25,0 +28,0 @@ className: cls, |
{ | ||
"name": "@uiw/react-alert", | ||
"version": "4.21.14", | ||
"version": "5.0.0-bate-0", | ||
"description": "Alert component", | ||
@@ -44,8 +44,11 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"react": ">=16.9.0", | ||
"react-dom": ">=16.9.0" | ||
"react-dom": ">=16.9.0", | ||
"styled-components": ">=5.3.5" | ||
}, | ||
"dependencies": { | ||
"@uiw/react-modal": "^4.21.14", | ||
"@uiw/utils": "^4.21.14" | ||
"@uiw/react-button": "^5.0.0-bate-0", | ||
"@uiw/react-icon": "^5.0.0-bate-0", | ||
"@uiw/react-modal": "^5.0.0-bate-0", | ||
"@uiw/utils": "^5.0.0-bate-0" | ||
} | ||
} |
@@ -18,6 +18,4 @@ Alert 确认对话框 | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Alert, ButtonGroup, Button } from 'uiw'; | ||
@@ -67,3 +65,3 @@ | ||
} | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -75,6 +73,4 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Alert, Button } from 'uiw'; | ||
@@ -124,3 +120,3 @@ | ||
} | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -132,6 +128,4 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Alert, ButtonGroup, Button } from 'uiw'; | ||
@@ -221,3 +215,3 @@ | ||
} | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -228,6 +222,4 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Alert, ButtonGroup, Button } from 'uiw'; | ||
@@ -267,2 +259,3 @@ | ||
cancelText="取消按钮" | ||
icon="circle-check" | ||
type="success" | ||
@@ -323,3 +316,3 @@ onClosed={this.onClosed.bind(this, 'visible2')} | ||
} | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -331,6 +324,4 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Alert, ButtonGroup, Button } from 'uiw'; | ||
@@ -377,3 +368,3 @@ | ||
} | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -383,6 +374,4 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Alert, ButtonGroup, Button } from 'uiw'; | ||
@@ -424,3 +413,3 @@ | ||
} | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -439,3 +428,3 @@ | ||
| type | 按钮类型跟 `<Button>` 组件的 `type` 参数一致,同时会影响按钮颜色。 | String | `light` | | ||
| icon[`<Modal>`](#/components/modal) | 设置对话框右上角图标,,设置 `type` 将图标设置不同的颜色。当前属性为 [`<Icon>`](#/components/icon) 组件的 `type` 属性,所以可以参考该组件自定义图标。 | String/ReactNode | - | | ||
| icon[`<Modal>`](#/components/modal) | 设置对话框左上角图标,,设置 `type` 将图标设置不同的颜色。当前属性为 [`<Icon>`](#/components/icon) 组件的 `type` 属性,所以可以参考该组件自定义图标。 | String/ReactNode | - | | ||
| title[`<Modal>`](#/components/modal) | 设置标题 | Function(e) | - | | ||
@@ -442,0 +431,0 @@ | useButton[`<Modal>`](#/components/modal) | 是否使用默认按钮,如果设置 `false` 需要自定义按钮关闭 | Boolean | `true` | |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
48091
16
337
7
1
421
1
+ Added@emotion/is-prop-valid@1.2.2(transitive)
+ Added@emotion/memoize@0.8.1(transitive)
+ Added@emotion/unitless@0.8.1(transitive)
+ Added@types/stylis@4.2.5(transitive)
+ Added@uiw/icons@2.6.1(transitive)
+ Added@uiw/react-button@5.0.0-bate-9(transitive)
+ Added@uiw/react-icon@5.0.0-bate-9(transitive)
+ Added@uiw/react-modal@5.0.0-bate-9(transitive)
+ Added@uiw/react-overlay@5.0.0-bate-9(transitive)
+ Added@uiw/react-portal@5.0.0-bate-9(transitive)
+ Added@uiw/utils@5.0.0-bate-9(transitive)
+ Addedcamelize@1.0.1(transitive)
+ Addedcss-color-keywords@1.0.0(transitive)
+ Addedcss-to-react-native@3.2.0(transitive)
+ Addednanoid@3.3.8(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.4.38(transitive)
+ Addedpostcss-value-parser@4.2.0(transitive)
+ Addedshallowequal@1.1.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedstyled-components@6.1.14(transitive)
+ Addedstylis@4.3.2(transitive)
+ Addedtslib@2.6.2(transitive)
- Removed@uiw/icons@2.6.10(transitive)
- Removed@uiw/react-button@4.22.3(transitive)
- Removed@uiw/react-icon@4.22.3(transitive)
- Removed@uiw/react-modal@4.22.3(transitive)
- Removed@uiw/react-overlay@4.22.3(transitive)
- Removed@uiw/react-portal@4.22.3(transitive)
- Removed@uiw/utils@4.22.3(transitive)
Updated@uiw/utils@^5.0.0-bate-0