@lobehub/ui 2.23.0 → 2.23.1

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/Alert/Alert.js CHANGED
@@ -29,6 +29,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
29
29
  var typeIcons = {
30
30
  error: XCircle,
31
31
  info: Info,
32
+ secondary: AlertTriangle,
32
33
  success: CheckCircle,
33
34
  warning: AlertTriangle
34
35
  };
@@ -37,6 +38,7 @@ var colors = function colors(theme) {
37
38
  for (var _len = arguments.length, keys = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
38
39
  keys[_key - 2] = arguments[_key];
39
40
  }
41
+ if (type === 'secondary') return theme[camelCase(['color'].concat(keys).join('-'))];
40
42
  return theme[camelCase(['color', type].concat(keys).join('-'))];
41
43
  };
42
44
  var Alert = /*#__PURE__*/memo(function (_ref) {
@@ -176,6 +178,7 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
176
178
  }),
177
179
  description: description,
178
180
  icon: /*#__PURE__*/_jsx(Icon, _objectSpread({
181
+ color: type === 'secondary' ? theme.colorTextSecondary : undefined,
179
182
  icon: typeIcons[type] || icon,
180
183
  size: description ? 24 : 18
181
184
  }, iconProps)),
@@ -186,7 +189,7 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
186
189
  borderColor: colors(theme, type, 'fillSecondary'),
187
190
  color: colorfulText ? colors(theme, type) : undefined
188
191
  }, style),
189
- type: type
192
+ type: type === 'secondary' ? 'info' : type
190
193
  }, rest));
191
194
  if (!extra) return alert;
192
195
  if (extraIsolate) return /*#__PURE__*/_jsxs(Flexbox, {
@@ -2,7 +2,7 @@ import type { AlertProps as AntAlertProps } from 'antd';
2
2
  import type { AlertRef } from 'antd/lib/alert/Alert';
3
3
  import type { 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;
@@ -18,5 +18,6 @@ export interface AlertProps extends Omit<AntAlertProps, 'icon'> {
18
18
  text?: {
19
19
  detail?: string;
20
20
  };
21
+ type?: 'success' | 'info' | 'warning' | 'error' | 'secondary';
21
22
  variant?: 'filled' | 'outlined' | 'borderless';
22
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.23.0",
3
+ "version": "2.23.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",