@lobehub/ui 2.23.0 → 2.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Accordion/AccordionItem.js +2 -2
- package/es/Accordion/style.js +2 -2
- package/es/Alert/Alert.js +42 -62
- package/es/Alert/style.d.ts +0 -1
- package/es/Alert/style.js +7 -8
- package/es/Alert/type.d.ts +9 -2
- package/package.json +1 -1
|
@@ -215,13 +215,13 @@ var AccordionItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
215
215
|
paddingBlock: paddingBlock,
|
|
216
216
|
paddingInline: paddingInline,
|
|
217
217
|
ref: ref,
|
|
218
|
-
style: {
|
|
218
|
+
style: _objectSpread({
|
|
219
219
|
alignItems: 'center',
|
|
220
220
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
221
221
|
opacity: disabled ? 0.5 : undefined,
|
|
222
222
|
overflow: 'hidden',
|
|
223
223
|
width: '100%'
|
|
224
|
-
},
|
|
224
|
+
}, customStyles === null || customStyles === void 0 ? void 0 : customStyles.header),
|
|
225
225
|
variant: customVariant || variant,
|
|
226
226
|
children: indicatorPlacementFinal === 'start' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
227
227
|
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
package/es/Accordion/style.js
CHANGED
|
@@ -11,9 +11,9 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
11
11
|
contentInner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n /* Content wrapper for animation */\n "]))),
|
|
12
12
|
divider: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-block: 0;\n "]))),
|
|
13
13
|
header: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n &:hover .accordion-action {\n width: auto;\n opacity: 1;\n }\n\n &:focus-visible {\n border-radius: ", "px;\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n "])), token.borderRadiusLG, token.colorPrimary),
|
|
14
|
-
icon: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n
|
|
14
|
+
icon: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n transition: transform 200ms ", ";\n "])), token.motionEaseOut),
|
|
15
15
|
iconRotate: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n transform: rotate(90deg);\n "]))),
|
|
16
|
-
indicator: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n font-size: 18px;\n\n transition: transform 200ms ", ";\n "])), token.motionEaseOut),
|
|
16
|
+
indicator: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n font-size: 18px;\n color: ", ";\n\n transition: transform 200ms ", ";\n "])), token.colorTextDescription, token.motionEaseOut),
|
|
17
17
|
item: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n "])))
|
|
18
18
|
};
|
|
19
19
|
});
|
package/es/Alert/Alert.js
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
|
-
var _excluded = ["closeIcon", "closable", "description", "showIcon", "type", "glass", "icon", "colorfulText", "iconProps", "style", "extra", "classNames", "text", "extraDefaultExpand", "extraIsolate", "banner", "variant", "ref"];
|
|
4
|
+
var _excluded = ["closeIcon", "closable", "description", "showIcon", "type", "glass", "icon", "colorfulText", "iconProps", "style", "extra", "classNames", "styles", "text", "extraDefaultExpand", "extraIsolate", "banner", "variant", "ref"];
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
9
|
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); }
|
|
10
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
-
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."); }
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
14
|
-
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; } }
|
|
15
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
10
|
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; }
|
|
17
11
|
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; }
|
|
18
|
-
import { Alert as AntdAlert
|
|
12
|
+
import { Alert as AntdAlert } from 'antd';
|
|
19
13
|
import { cva } from 'class-variance-authority';
|
|
20
14
|
import { camelCase } from 'lodash-es';
|
|
21
|
-
import { AlertTriangle, CheckCircle,
|
|
22
|
-
import { memo, useMemo
|
|
15
|
+
import { AlertTriangle, CheckCircle, Info, X, XCircle } from 'lucide-react';
|
|
16
|
+
import { memo, useMemo } from 'react';
|
|
23
17
|
import { Flexbox } from 'react-layout-kit';
|
|
18
|
+
import { Accordion, AccordionItem } from "../Accordion";
|
|
24
19
|
import ActionIcon from "../ActionIcon";
|
|
25
20
|
import Icon from "../Icon";
|
|
26
21
|
import { useStyles } from "./style";
|
|
@@ -29,6 +24,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
29
24
|
var typeIcons = {
|
|
30
25
|
error: XCircle,
|
|
31
26
|
info: Info,
|
|
27
|
+
secondary: AlertTriangle,
|
|
32
28
|
success: CheckCircle,
|
|
33
29
|
warning: AlertTriangle
|
|
34
30
|
};
|
|
@@ -37,6 +33,7 @@ var colors = function colors(theme) {
|
|
|
37
33
|
for (var _len = arguments.length, keys = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
38
34
|
keys[_key - 2] = arguments[_key];
|
|
39
35
|
}
|
|
36
|
+
if (type === 'secondary') return theme[camelCase(['color'].concat(keys).join('-'))];
|
|
40
37
|
return theme[camelCase(['color', type].concat(keys).join('-'))];
|
|
41
38
|
};
|
|
42
39
|
var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -56,6 +53,7 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
56
53
|
style = _ref.style,
|
|
57
54
|
extra = _ref.extra,
|
|
58
55
|
classNames = _ref.classNames,
|
|
56
|
+
customStyles = _ref.styles,
|
|
59
57
|
text = _ref.text,
|
|
60
58
|
_ref$extraDefaultExpa = _ref.extraDefaultExpand,
|
|
61
59
|
extraDefaultExpand = _ref$extraDefaultExpa === void 0 ? false : _ref$extraDefaultExpa,
|
|
@@ -65,10 +63,6 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
65
63
|
variant = _ref$variant === void 0 ? 'filled' : _ref$variant,
|
|
66
64
|
ref = _ref.ref,
|
|
67
65
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
68
|
-
var _useState = useState(extraDefaultExpand),
|
|
69
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
70
|
-
expand = _useState2[0],
|
|
71
|
-
setExpand = _useState2[1];
|
|
72
66
|
var _useStyles = useStyles({
|
|
73
67
|
closable: !!closable,
|
|
74
68
|
hasTitle: !!description,
|
|
@@ -143,22 +137,6 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
143
137
|
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
|
144
138
|
});
|
|
145
139
|
}, [styles]);
|
|
146
|
-
var extraBodyVariants = useMemo(function () {
|
|
147
|
-
return cva(styles.extraBody, {
|
|
148
|
-
defaultVariants: {
|
|
149
|
-
variant: 'filled'
|
|
150
|
-
},
|
|
151
|
-
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
152
|
-
variants: {
|
|
153
|
-
variant: {
|
|
154
|
-
filled: null,
|
|
155
|
-
outlined: null,
|
|
156
|
-
borderless: styles.borderless
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
|
160
|
-
});
|
|
161
|
-
}, [styles]);
|
|
162
140
|
var isInsideExtra = Boolean(!extraIsolate && !!extra);
|
|
163
141
|
var alert = /*#__PURE__*/_jsx(AntdAlert, _objectSpread({
|
|
164
142
|
banner: banner,
|
|
@@ -176,17 +154,18 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
176
154
|
}),
|
|
177
155
|
description: description,
|
|
178
156
|
icon: /*#__PURE__*/_jsx(Icon, _objectSpread({
|
|
157
|
+
color: type === 'secondary' ? theme.colorTextSecondary : undefined,
|
|
179
158
|
icon: typeIcons[type] || icon,
|
|
180
159
|
size: description ? 24 : 18
|
|
181
160
|
}, iconProps)),
|
|
182
161
|
ref: ref,
|
|
183
162
|
showIcon: showIcon,
|
|
184
|
-
style: _objectSpread({
|
|
163
|
+
style: _objectSpread(_objectSpread({
|
|
185
164
|
background: colors(theme, type, 'fillTertiary'),
|
|
186
165
|
borderColor: colors(theme, type, 'fillSecondary'),
|
|
187
166
|
color: colorfulText ? colors(theme, type) : undefined
|
|
188
|
-
}, style),
|
|
189
|
-
type: type
|
|
167
|
+
}, style), customStyles === null || customStyles === void 0 ? void 0 : customStyles.alert),
|
|
168
|
+
type: type === 'secondary' ? 'info' : type
|
|
190
169
|
}, rest));
|
|
191
170
|
if (!extra) return alert;
|
|
192
171
|
if (extraIsolate) return /*#__PURE__*/_jsxs(Flexbox, {
|
|
@@ -196,7 +175,8 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
196
175
|
});
|
|
197
176
|
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
198
177
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container,
|
|
199
|
-
|
|
178
|
+
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.container,
|
|
179
|
+
children: [alert, /*#__PURE__*/_jsx(Flexbox, {
|
|
200
180
|
className: extraVariants({
|
|
201
181
|
banner: banner,
|
|
202
182
|
variant: variant
|
|
@@ -207,36 +187,36 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
207
187
|
color: colors(theme, type),
|
|
208
188
|
fontSize: description ? 14 : 12
|
|
209
189
|
},
|
|
210
|
-
children:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
borderColor: colors(theme, type, 'fillSecondary')
|
|
219
|
-
},
|
|
220
|
-
children: [/*#__PURE__*/_jsx(ActionIcon, {
|
|
221
|
-
color: colors(theme, type),
|
|
222
|
-
icon: expand ? ChevronDown : ChevronRight,
|
|
223
|
-
onClick: function onClick() {
|
|
224
|
-
return setExpand(!expand);
|
|
190
|
+
children: /*#__PURE__*/_jsx(Accordion, {
|
|
191
|
+
defaultExpandedKeys: extraDefaultExpand ? ['extra'] : [],
|
|
192
|
+
children: /*#__PURE__*/_jsx(AccordionItem, {
|
|
193
|
+
classNames: {
|
|
194
|
+
content: classNames === null || classNames === void 0 ? void 0 : classNames.extraContent,
|
|
195
|
+
header: extraHeaderVariants({
|
|
196
|
+
variant: variant
|
|
197
|
+
})
|
|
225
198
|
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
199
|
+
itemKey: 'extra',
|
|
200
|
+
styles: {
|
|
201
|
+
content: _objectSpread({
|
|
202
|
+
fontSize: 12,
|
|
203
|
+
padding: 8
|
|
204
|
+
}, customStyles === null || customStyles === void 0 ? void 0 : customStyles.extraContent),
|
|
205
|
+
header: {
|
|
206
|
+
borderColor: colors(theme, type, 'fillSecondary')
|
|
207
|
+
},
|
|
208
|
+
indicator: {
|
|
209
|
+
color: colors(theme, type)
|
|
210
|
+
},
|
|
211
|
+
title: {
|
|
212
|
+
color: colors(theme, type),
|
|
213
|
+
fontSize: 12
|
|
214
|
+
}
|
|
231
215
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
variant: variant
|
|
237
|
-
}),
|
|
238
|
-
children: extra
|
|
239
|
-
})]
|
|
216
|
+
title: (text === null || text === void 0 ? void 0 : text.detail) || 'Show Details',
|
|
217
|
+
children: extra
|
|
218
|
+
})
|
|
219
|
+
})
|
|
240
220
|
})]
|
|
241
221
|
});
|
|
242
222
|
});
|
package/es/Alert/style.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare const useStyles: (props?: {
|
|
|
9
9
|
colorfulText: import("antd-style").SerializedStyles;
|
|
10
10
|
expandText: import("antd-style").SerializedStyles;
|
|
11
11
|
extra: import("antd-style").SerializedStyles;
|
|
12
|
-
extraBody: import("antd-style").SerializedStyles;
|
|
13
12
|
extraHeader: import("antd-style").SerializedStyles;
|
|
14
13
|
filled: import("antd-style").SerializedStyles;
|
|
15
14
|
glass: string;
|
package/es/Alert/style.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
@@ -15,16 +15,15 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
15
15
|
return {
|
|
16
16
|
banner: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: none !important;\n border-radius: 0 !important;\n "]))),
|
|
17
17
|
borderless: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0 !important;\n border: none !important;\n background: transparent !important;\n "]))),
|
|
18
|
-
borderlessExtraHeader: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-block-start: ", "px;\n
|
|
18
|
+
borderlessExtraHeader: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-block-start: ", "px;\n padding-inline: 0;\n "])), baseBlockPadding),
|
|
19
19
|
colorfulText: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .", "-alert-message,.", "-alert-description {\n color: inherit;\n }\n "])), prefixCls, prefixCls),
|
|
20
20
|
expandText: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-inline-end: 12px;\n\n &:hover {\n cursor: pointer;\n }\n "]))),
|
|
21
21
|
extra: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n max-width: 100%;\n border: 1px solid;\n border-block-start: none;\n border-end-start-radius: ", "px;\n border-end-end-radius: ", "px;\n "])), token.borderRadiusLG, token.borderRadiusLG),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
filled: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""]))),
|
|
22
|
+
extraHeader: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-block-start: 1px dashed;\n border-radius: 0;\n background: transparent !important;\n "]))),
|
|
23
|
+
filled: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""]))),
|
|
25
24
|
glass: stylish.blur,
|
|
26
|
-
hasExtra: css(
|
|
27
|
-
outlined: css(
|
|
28
|
-
root: cx(css(
|
|
25
|
+
hasExtra: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border-block-end: none;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n "]))),
|
|
26
|
+
outlined: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background: transparent !important;\n "]))),
|
|
27
|
+
root: cx(css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n flex-direction: row;\n gap: ", "px;\n align-items: flex-start;\n\n max-width: 100%;\n padding-block: ", "px;\n padding-inline: ", "px\n ", "px;\n\n .", "-alert-message {\n font-weight: ", ";\n line-height: 24px;\n word-break: normal;\n }\n .", "-alert-icon {\n display: flex;\n align-items: center;\n height: 24px;\n margin: 0;\n }\n .", "-alert-close-icon {\n display: flex;\n align-items: center;\n height: 24px;\n margin: 0;\n }\n "])), hasTitle ? 12 : 8, baseBlockPadding, showIcon ? baseInlinePadding * 0.75 : baseInlinePadding, closable ? baseInlinePadding * 0.75 : baseInlinePadding, prefixCls, hasTitle ? 600 : 400, prefixCls, prefixCls), hasTitle && css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n .", "-alert-description {\n line-height: 1.5;\n word-break: normal;\n opacity: 0.75;\n }\n "])), prefixCls))
|
|
29
28
|
};
|
|
30
29
|
});
|
package/es/Alert/type.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { AlertProps as AntAlertProps } from 'antd';
|
|
2
2
|
import type { AlertRef } from 'antd/lib/alert/Alert';
|
|
3
|
-
import type { ReactNode, Ref } from 'react';
|
|
3
|
+
import type { CSSProperties, ReactNode, Ref } from 'react';
|
|
4
4
|
import type { IconProps } from "../Icon";
|
|
5
|
-
export interface AlertProps extends Omit<AntAlertProps, 'icon'> {
|
|
5
|
+
export interface AlertProps extends Omit<AntAlertProps, 'icon' | 'type'> {
|
|
6
6
|
classNames?: {
|
|
7
7
|
alert?: string;
|
|
8
8
|
container?: string;
|
|
9
|
+
extraContent?: string;
|
|
9
10
|
};
|
|
10
11
|
colorfulText?: boolean;
|
|
11
12
|
extra?: ReactNode;
|
|
@@ -15,8 +16,14 @@ export interface AlertProps extends Omit<AntAlertProps, 'icon'> {
|
|
|
15
16
|
icon?: IconProps['icon'];
|
|
16
17
|
iconProps?: Omit<IconProps, 'icon'>;
|
|
17
18
|
ref?: Ref<AlertRef>;
|
|
19
|
+
styles?: {
|
|
20
|
+
alert?: CSSProperties;
|
|
21
|
+
container?: CSSProperties;
|
|
22
|
+
extraContent?: CSSProperties;
|
|
23
|
+
};
|
|
18
24
|
text?: {
|
|
19
25
|
detail?: string;
|
|
20
26
|
};
|
|
27
|
+
type?: 'success' | 'info' | 'warning' | 'error' | 'secondary';
|
|
21
28
|
variant?: 'filled' | 'outlined' | 'borderless';
|
|
22
29
|
}
|