wz-h5-design 1.0.3 → 1.0.4

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.
Files changed (51) hide show
  1. package/dist/Button/index.js +23 -7
  2. package/dist/Button/index.umd.cjs +1 -1
  3. package/dist/ButtonGroup/index.js +34 -0
  4. package/dist/ButtonGroup/index.umd.cjs +1 -0
  5. package/dist/ButtonGroup/style/index.css +1 -0
  6. package/dist/ButtonGroup/style/index.js +1 -0
  7. package/dist/ButtonGroup/style.css +1 -0
  8. package/dist/Cell/index.js +29 -2
  9. package/dist/Cell/index.umd.cjs +2 -2
  10. package/dist/Cell/style/index.css +1 -1
  11. package/dist/Cell/style.css +1 -1
  12. package/dist/CheckList/index.js +28 -1
  13. package/dist/CheckList/index.umd.cjs +1 -1
  14. package/dist/CheckList/style.css +1 -1
  15. package/dist/Checkbox/index.js +34 -2
  16. package/dist/Checkbox/index.umd.cjs +1 -1
  17. package/dist/Checkbox/style/index.css +1 -1
  18. package/dist/Checkbox/style.css +1 -1
  19. package/dist/DatePicker/style/index.css +1 -1
  20. package/dist/DatePicker/style.css +1 -1
  21. package/dist/DateRangePicker/index.js +65 -9
  22. package/dist/DateRangePicker/index.umd.cjs +1 -1
  23. package/dist/DateRangePicker/style/index.css +1 -1
  24. package/dist/DateRangePicker/style.css +1 -1
  25. package/dist/Dialog/index.js +23 -7
  26. package/dist/Dialog/index.umd.cjs +1 -1
  27. package/dist/Divider/index.js +13 -4
  28. package/dist/Divider/index.umd.cjs +1 -1
  29. package/dist/Input/style/index.css +1 -1
  30. package/dist/Input/style.css +1 -1
  31. package/dist/Radio/index.js +34 -2
  32. package/dist/Radio/index.umd.cjs +1 -1
  33. package/dist/Radio/style/index.css +1 -1
  34. package/dist/Radio/style.css +1 -1
  35. package/dist/TimePicker/style/index.css +1 -1
  36. package/dist/TimePicker/style.css +1 -1
  37. package/dist/Tip/index.js +28 -5
  38. package/dist/Tip/index.umd.cjs +2 -2
  39. package/dist/Tip/style/index.css +1 -1
  40. package/dist/Tip/style.css +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/types/components/Button/Button.d.ts +3 -0
  43. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +20 -0
  44. package/dist/types/components/ButtonGroup/index.d.ts +5 -0
  45. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +6 -0
  46. package/dist/types/components/Divider/Divider.d.ts +2 -0
  47. package/dist/types/components/Tip/Tip.d.ts +21 -2
  48. package/dist/types/components/index.d.ts +2 -1
  49. package/dist/wz-h5-design.es.js +172 -56
  50. package/dist/wz-h5-design.umd.js +2 -2
  51. package/package.json +1 -1
@@ -8,6 +8,9 @@ export interface ButtonProps {
8
8
  color?: string;
9
9
  textColor?: string;
10
10
  borderColor?: string;
11
+ width?: string | number;
12
+ height?: string | number;
13
+ fontSize?: string | number;
11
14
  className?: string;
12
15
  style?: React.CSSProperties;
13
16
  children?: React.ReactNode;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import './ButtonGroup.scss';
3
+ export interface ButtonGroupProps {
4
+ /** 背景色,支持白色、灰色等 */
5
+ bgColor?: string;
6
+ /** 容器高度 */
7
+ height?: string | number;
8
+ /** 内边距 */
9
+ padding?: string | number;
10
+ /** 是否固定在底部 */
11
+ fixed?: boolean;
12
+ /** 按钮之间的间距 */
13
+ gap?: string | number;
14
+ /** 自定义类名 */
15
+ className?: string;
16
+ /** 自定义样式 */
17
+ style?: React.CSSProperties;
18
+ children?: React.ReactNode;
19
+ }
20
+ export declare const ButtonGroup: React.FC<ButtonGroupProps>;
@@ -0,0 +1,5 @@
1
+ import './ButtonGroup.scss';
2
+ import { ButtonGroup } from './ButtonGroup';
3
+ export type { ButtonGroupProps } from './ButtonGroup';
4
+ export default ButtonGroup;
5
+ export { ButtonGroup };
@@ -9,5 +9,11 @@ export interface DateRangePickerProps {
9
9
  endLabel?: string;
10
10
  className?: string;
11
11
  style?: React.CSSProperties;
12
+ /** 是否显示长期有效选项 */
13
+ showLongTerm?: boolean;
14
+ /** 长期有效文案 */
15
+ longTermLabel?: string;
16
+ /** 长期有效时结束日期的值,默认 '9999-12-31' */
17
+ longTermValue?: string;
12
18
  }
13
19
  export declare const DateRangePicker: React.FC<DateRangePickerProps>;
@@ -2,6 +2,8 @@ import React from 'react';
2
2
  import './Divider.scss';
3
3
  export interface DividerProps {
4
4
  direction?: 'horizontal' | 'vertical';
5
+ /** 分割线类型:default 常规 | emphasis 强调 */
6
+ type?: 'default' | 'emphasis';
5
7
  color?: string;
6
8
  length?: number | string;
7
9
  margin?: string;
@@ -24,9 +24,28 @@ export interface TipProps {
24
24
  */
25
25
  onClose?: () => void;
26
26
  /**
27
- * @description 操作按钮
27
+ * @description 是否加粗文字
28
+ * @default false
29
+ */
30
+ bold?: boolean;
31
+ /**
32
+ * @description 左侧图标名称
33
+ */
34
+ icon?: string;
35
+ /**
36
+ * @description 是否显示操作按钮
37
+ * @default false
38
+ */
39
+ showAction?: boolean;
40
+ /**
41
+ * @description 操作按钮文字
42
+ * @default '查看'
43
+ */
44
+ actionText?: string;
45
+ /**
46
+ * @description 操作按钮点击事件
28
47
  */
29
- action?: ReactNode;
48
+ onAction?: () => void;
30
49
  }
31
50
  export declare const Tip: FC<TipProps>;
32
51
  export default Tip;
@@ -1,4 +1,5 @@
1
1
  import { Button } from "./Button/Button";
2
+ import { ButtonGroup } from "./ButtonGroup/ButtonGroup";
2
3
  import { Radio } from "./Radio/Radio";
3
4
  import { Checkbox } from "./Checkbox/Checkbox";
4
5
  import { Switch } from "./Switch/Switch";
@@ -30,5 +31,5 @@ import { Tooltip } from "./Tooltip/Tooltip";
30
31
  import { Dialog } from "./Dialog";
31
32
  import { ConfigProvider, useConfig } from "./ConfigProvider";
32
33
  import type { ConfigProviderProps, ThemeType, ThemeVars } from "./ConfigProvider";
33
- export { Button, Radio, Checkbox, Switch, Tabbar, Icon, Card, Cell, Tabs, Collapse, Stepper, Popup, Cascader, Input, Divider, CheckList, Search, TimePicker, DatePicker, DateRangePicker, Flex, Grid, GridView, Tag, Tip, NavBar, DropdownMenu, Toast, Tooltip, Dialog, ConfigProvider, useConfig, };
34
+ export { Button, ButtonGroup, Radio, Checkbox, Switch, Tabbar, Icon, Card, Cell, Tabs, Collapse, Stepper, Popup, Cascader, Input, Divider, CheckList, Search, TimePicker, DatePicker, DateRangePicker, Flex, Grid, GridView, Tag, Tip, NavBar, DropdownMenu, Toast, Tooltip, Dialog, ConfigProvider, useConfig, };
34
35
  export type { ConfigProviderProps, ThemeType, ThemeVars };
@@ -9,6 +9,9 @@ const Button = forwardRef(({
9
9
  color = "",
10
10
  textColor = "",
11
11
  borderColor = "",
12
+ width,
13
+ height,
14
+ fontSize,
12
15
  className = "",
13
16
  style = {},
14
17
  children,
@@ -18,12 +21,22 @@ const Button = forwardRef(({
18
21
  }, ref) => {
19
22
  const [isActive, setIsActive] = useState(false);
20
23
  const timerRef = useRef(null);
24
+ const formatSize = (value) => {
25
+ if (value === void 0) return void 0;
26
+ return typeof value === "number" ? `${value}px` : value;
27
+ };
21
28
  const buttonStyle = useMemo(() => {
29
+ const customStyle = {
30
+ width: formatSize(width),
31
+ height: formatSize(height),
32
+ fontSize: formatSize(fontSize)
33
+ };
22
34
  if (type === "cancel") {
23
35
  return {
24
36
  background: "#D6D6D6",
25
37
  color: textColor || "#fff",
26
- ...style
38
+ ...style,
39
+ ...customStyle
27
40
  };
28
41
  }
29
42
  if (type === "outline") {
@@ -31,7 +44,8 @@ const Button = forwardRef(({
31
44
  color: textColor || "var(--wz-primary-color)",
32
45
  borderColor: borderColor || "var(--wz-primary-color)",
33
46
  background: "transparent",
34
- ...style
47
+ ...style,
48
+ ...customStyle
35
49
  };
36
50
  }
37
51
  if (type === "text") {
@@ -40,7 +54,8 @@ const Button = forwardRef(({
40
54
  background: "transparent",
41
55
  border: "none",
42
56
  boxShadow: "none",
43
- ...style
57
+ ...style,
58
+ ...customStyle
44
59
  };
45
60
  }
46
61
  if (type === "plain") {
@@ -48,7 +63,8 @@ const Button = forwardRef(({
48
63
  color: textColor || "#666666",
49
64
  borderColor: borderColor || "#666666",
50
65
  background: "transparent",
51
- ...style
66
+ ...style,
67
+ ...customStyle
52
68
  };
53
69
  }
54
70
  if (type === "primary") {
@@ -57,10 +73,10 @@ const Button = forwardRef(({
57
73
  s.background = color || "var(--wz-primary-gradient, var(--wz-primary-color))";
58
74
  }
59
75
  s.color = textColor || "#fff";
60
- return s;
76
+ return { ...s, ...customStyle };
61
77
  }
62
- return style;
63
- }, [type, color, textColor, borderColor, style]);
78
+ return { ...style, ...customStyle };
79
+ }, [type, color, textColor, borderColor, width, height, fontSize, style]);
64
80
  const handleClick = (e) => {
65
81
  if (disabled) return;
66
82
  setIsActive(true);
@@ -100,6 +116,62 @@ const Button = forwardRef(({
100
116
  );
101
117
  });
102
118
  Button.displayName = "Button";
119
+ const ButtonGroup = ({
120
+ bgColor = "#fff",
121
+ height,
122
+ padding = "2px 10px",
123
+ fixed = false,
124
+ gap = 12,
125
+ className = "",
126
+ style = {},
127
+ children
128
+ }) => {
129
+ const formatSize = (value) => {
130
+ if (value === void 0) return void 0;
131
+ return typeof value === "number" ? `${value}px` : value;
132
+ };
133
+ const containerStyle = {
134
+ backgroundColor: bgColor,
135
+ height: formatSize(height),
136
+ padding: formatSize(padding),
137
+ gap: formatSize(gap),
138
+ ...style
139
+ };
140
+ const classNames2 = [
141
+ "wz-button-group",
142
+ fixed ? "wz-button-group--fixed" : "",
143
+ className
144
+ ].filter(Boolean).join(" ");
145
+ return /* @__PURE__ */ jsx("div", { className: classNames2, style: containerStyle, children });
146
+ };
147
+ ButtonGroup.displayName = "ButtonGroup";
148
+ const Icon = ({
149
+ name,
150
+ size = 24,
151
+ color = "currentColor",
152
+ className = "",
153
+ style,
154
+ onClick,
155
+ type = "yunying"
156
+ // 默认使用yunying图标库
157
+ }) => {
158
+ const iconStyle = {
159
+ fontSize: typeof size === "number" ? `${size}px` : size,
160
+ color,
161
+ ...style
162
+ };
163
+ const iconFontClass = `iconfont-${type}`;
164
+ const iconPrefix = "icon-";
165
+ const iconClass = `${iconPrefix}${name}`;
166
+ return /* @__PURE__ */ jsx(
167
+ "i",
168
+ {
169
+ className: `wz-icon ${iconFontClass} ${iconClass} ${className}`,
170
+ style: iconStyle,
171
+ onClick
172
+ }
173
+ );
174
+ };
103
175
  const RadioGroupContext = createContext({});
104
176
  const Radio = ({
105
177
  size,
@@ -127,6 +199,11 @@ const Radio = ({
127
199
  const isChecked = isInGroup ? groupContext.value === value : checked;
128
200
  const isDisabled = disabled || groupContext.disabled;
129
201
  const radioSize = size || groupContext.size || "medium";
202
+ const iconSizeMap = {
203
+ small: 16,
204
+ medium: 18,
205
+ large: 20
206
+ };
130
207
  return /* @__PURE__ */ jsxs(
131
208
  "label",
132
209
  {
@@ -145,7 +222,7 @@ const Radio = ({
145
222
  ...rest
146
223
  }
147
224
  ),
148
- /* @__PURE__ */ jsx("span", { className: "wz-radio-inner" }),
225
+ /* @__PURE__ */ jsx("span", { className: "wz-radio-inner", children: /* @__PURE__ */ jsx(Icon, { name: isChecked ? "radio-sel" : "radio-nor", type: "yunying", size: iconSizeMap[radioSize] }) }),
149
226
  children && /* @__PURE__ */ jsx("span", { className: "wz-radio-label", children })
150
227
  ]
151
228
  }
@@ -206,6 +283,11 @@ const Checkbox = ({
206
283
  const isChecked = isInGroup ? (_a = groupContext.value) == null ? void 0 : _a.includes(value) : checked;
207
284
  const isDisabled = disabled || groupContext.disabled;
208
285
  const checkboxSize = size || groupContext.size || "medium";
286
+ const iconSizeMap = {
287
+ small: 16,
288
+ medium: 18,
289
+ large: 20
290
+ };
209
291
  return /* @__PURE__ */ jsxs(
210
292
  "label",
211
293
  {
@@ -224,7 +306,7 @@ const Checkbox = ({
224
306
  ...rest
225
307
  }
226
308
  ),
227
- /* @__PURE__ */ jsx("span", { className: "wz-checkbox-inner" }),
309
+ /* @__PURE__ */ jsx("span", { className: "wz-checkbox-inner", children: /* @__PURE__ */ jsx(Icon, { name: isChecked ? "checkbox-checked" : "checkbox", type: "yunying", size: iconSizeMap[checkboxSize] }) }),
228
310
  children && /* @__PURE__ */ jsx("span", { className: "wz-checkbox-label", children })
229
311
  ]
230
312
  }
@@ -355,33 +437,6 @@ var classnames = { exports: {} };
355
437
  })(classnames);
356
438
  var classnamesExports = classnames.exports;
357
439
  const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
358
- const Icon = ({
359
- name,
360
- size = 24,
361
- color = "currentColor",
362
- className = "",
363
- style,
364
- onClick,
365
- type = "yunying"
366
- // 默认使用yunying图标库
367
- }) => {
368
- const iconStyle = {
369
- fontSize: typeof size === "number" ? `${size}px` : size,
370
- color,
371
- ...style
372
- };
373
- const iconFontClass = `iconfont-${type}`;
374
- const iconPrefix = "icon-";
375
- const iconClass = `${iconPrefix}${name}`;
376
- return /* @__PURE__ */ jsx(
377
- "i",
378
- {
379
- className: `wz-icon ${iconFontClass} ${iconClass} ${className}`,
380
- style: iconStyle,
381
- onClick
382
- }
383
- );
384
- };
385
440
  const TabbarItem = (props) => {
386
441
  const { title, icon, activeIcon, badge, badgeAsBubble, hump, active, onItemClick, onClick, activeColor } = props;
387
442
  const renderIcon = (iconSource) => {
@@ -544,7 +599,7 @@ const Cell$1 = (props) => {
544
599
  };
545
600
  const renderRightIcon = () => {
546
601
  if (arrow) {
547
- return /* @__PURE__ */ jsx("div", { className: "wz-cell-arrow" });
602
+ return /* @__PURE__ */ jsx("div", { className: "wz-cell-arrow", children: /* @__PURE__ */ jsx(Icon, { name: "right-arrow", size: 16 }) });
548
603
  }
549
604
  return null;
550
605
  };
@@ -1109,23 +1164,32 @@ const Input = forwardRef(
1109
1164
  }
1110
1165
  );
1111
1166
  Input.displayName = "Input";
1167
+ const COLOR_MAP = {
1168
+ horizontal: {
1169
+ default: "#f7f7f7",
1170
+ emphasis: "#eeeeee"
1171
+ },
1172
+ vertical: "rgba(0, 0, 0, 0.1)"
1173
+ };
1112
1174
  const Divider = ({
1113
1175
  direction = "horizontal",
1114
- color = "#eee",
1176
+ type = "default",
1177
+ color,
1115
1178
  length,
1116
1179
  margin,
1117
1180
  style,
1118
1181
  className = ""
1119
1182
  }) => {
1120
1183
  const isVertical = direction === "vertical";
1184
+ const defaultColor = isVertical ? COLOR_MAP.vertical : COLOR_MAP.horizontal[type];
1121
1185
  return /* @__PURE__ */ jsx(
1122
1186
  "div",
1123
1187
  {
1124
1188
  className: `wz-divider wz-divider--${direction} ${className}`,
1125
1189
  style: {
1126
- background: color,
1127
- width: isVertical ? 1 : length || "100%",
1128
- height: isVertical ? length || 24 : 1,
1190
+ background: color || defaultColor,
1191
+ width: isVertical ? 2 : length || "100%",
1192
+ height: isVertical ? length || 24 : 2,
1129
1193
  margin,
1130
1194
  ...style
1131
1195
  }
@@ -1156,7 +1220,7 @@ const CheckList = ({ options, value, onChange, multiple = false, style, classNam
1156
1220
  onClick: () => handleClick(item),
1157
1221
  children: [
1158
1222
  /* @__PURE__ */ jsx("span", { className: "wz-check-list__label", children: item }),
1159
- isChecked(item) && /* @__PURE__ */ jsx("span", { className: "wz-check-list__icon", children: "" })
1223
+ isChecked(item) && /* @__PURE__ */ jsx("span", { className: "wz-check-list__icon", children: /* @__PURE__ */ jsx(Icon, { name: "check", size: 18, type: "yunying" }) })
1160
1224
  ]
1161
1225
  },
1162
1226
  item
@@ -1641,7 +1705,10 @@ const DateRangePicker = ({
1641
1705
  startLabel = "开始时间",
1642
1706
  endLabel = "结束时间",
1643
1707
  className = "",
1644
- style
1708
+ style,
1709
+ showLongTerm = false,
1710
+ longTermLabel = "长期有效",
1711
+ longTermValue = "9999-12-31"
1645
1712
  }) => {
1646
1713
  const todayStr = React.useMemo(() => {
1647
1714
  const today = /* @__PURE__ */ new Date();
@@ -1653,6 +1720,7 @@ const DateRangePicker = ({
1653
1720
  const [innerValue, setInnerValue] = useState(value || [todayStr, todayStr]);
1654
1721
  const range = value || innerValue;
1655
1722
  const [active, setActive] = useState("start");
1723
+ const isLongTerm = range[1] === longTermValue;
1656
1724
  const handleSelect = (val) => {
1657
1725
  if (active === "start") {
1658
1726
  const newRange = [val, range[1] && range[1] >= val ? range[1] : val];
@@ -1664,6 +1732,17 @@ const DateRangePicker = ({
1664
1732
  onChange == null ? void 0 : onChange(newRange);
1665
1733
  }
1666
1734
  };
1735
+ const handleLongTermToggle = () => {
1736
+ if (isLongTerm) {
1737
+ const newRange = [range[0], range[0]];
1738
+ setInnerValue(newRange);
1739
+ onChange == null ? void 0 : onChange(newRange);
1740
+ } else {
1741
+ const newRange = [range[0], longTermValue];
1742
+ setInnerValue(newRange);
1743
+ onChange == null ? void 0 : onChange(newRange);
1744
+ }
1745
+ };
1667
1746
  return /* @__PURE__ */ jsxs("div", { className: `wz-date-range-picker ${className}`, style, children: [
1668
1747
  /* @__PURE__ */ jsxs("div", { className: "wz-date-range-picker-label-row", children: [
1669
1748
  /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-label", children: startLabel }),
@@ -1679,14 +1758,28 @@ const DateRangePicker = ({
1679
1758
  }
1680
1759
  ) }),
1681
1760
  /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-sep", children: "至" }),
1682
- /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-col", children: /* @__PURE__ */ jsx(
1683
- "div",
1684
- {
1685
- className: `wz-date-range-picker-value${active === "end" ? " active" : ""}`,
1686
- onClick: () => setActive("end"),
1687
- children: range[1] || "请选择"
1688
- }
1689
- ) })
1761
+ /* @__PURE__ */ jsxs("div", { className: "wz-date-range-picker-col", children: [
1762
+ /* @__PURE__ */ jsx(
1763
+ "div",
1764
+ {
1765
+ className: `wz-date-range-picker-value${active === "end" ? " active" : ""}${isLongTerm ? " disabled" : ""}`,
1766
+ onClick: () => !isLongTerm && setActive("end"),
1767
+ children: isLongTerm ? longTermLabel : range[1] || "请选择"
1768
+ }
1769
+ ),
1770
+ showLongTerm && /* @__PURE__ */ jsxs("div", { className: "wz-date-range-picker-long-term", onClick: handleLongTermToggle, children: [
1771
+ /* @__PURE__ */ jsx(
1772
+ Icon,
1773
+ {
1774
+ name: isLongTerm ? "radio-sel" : "radio-nor",
1775
+ type: "yunying",
1776
+ size: 20,
1777
+ color: isLongTerm ? "var(--active-color)" : "#ccc"
1778
+ }
1779
+ ),
1780
+ /* @__PURE__ */ jsx("span", { className: "wz-date-range-picker-long-term-text", children: longTermLabel })
1781
+ ] })
1782
+ ] })
1690
1783
  ] }),
1691
1784
  /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-picker", children: /* @__PURE__ */ jsx(
1692
1785
  DatePicker,
@@ -1960,20 +2053,42 @@ const Tip = ({
1960
2053
  className,
1961
2054
  visible = true,
1962
2055
  onClose,
1963
- action,
1964
- marquee = false
2056
+ marquee = false,
2057
+ bold = false,
2058
+ icon,
2059
+ showAction = false,
2060
+ actionText = "查看",
2061
+ onAction
1965
2062
  }) => {
2063
+ const contentRef = useRef(null);
2064
+ const [isMultiLine, setIsMultiLine] = useState(false);
2065
+ useEffect(() => {
2066
+ if (contentRef.current && !marquee) {
2067
+ const el = contentRef.current;
2068
+ const lineHeight = parseFloat(getComputedStyle(el).lineHeight) || 20;
2069
+ setIsMultiLine(el.scrollHeight > lineHeight * 1.5);
2070
+ }
2071
+ }, [content, marquee]);
1966
2072
  if (!visible) {
1967
2073
  return null;
1968
2074
  }
1969
2075
  const baseClass = "wz-tip";
2076
+ const hasRightArea = showAction || onClose;
1970
2077
  const tipClass = classNames(baseClass, className, {
1971
- [`${baseClass}--marquee`]: marquee
2078
+ [`${baseClass}--marquee`]: marquee,
2079
+ [`${baseClass}--bold`]: bold,
2080
+ [`${baseClass}--center`]: !marquee && !isMultiLine,
2081
+ [`${baseClass}--left`]: !marquee && isMultiLine,
2082
+ [`${baseClass}--has-icon`]: !!icon,
2083
+ [`${baseClass}--has-right`]: hasRightArea
1972
2084
  });
1973
2085
  const contentNode = marquee ? /* @__PURE__ */ jsx("div", { className: `${baseClass}-marquee-box`, children: /* @__PURE__ */ jsx("span", { children: content }) }) : content;
1974
2086
  return /* @__PURE__ */ jsxs("div", { className: tipClass, children: [
1975
- /* @__PURE__ */ jsx("div", { className: `${baseClass}-content`, children: contentNode }),
1976
- action && /* @__PURE__ */ jsx("div", { className: `${baseClass}-action`, children: action }),
2087
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}-content`, ref: contentRef, children: [
2088
+ icon && /* @__PURE__ */ jsx("span", { className: `${baseClass}-icon`, children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 16 }) }),
2089
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}-text`, children: contentNode })
2090
+ ] }),
2091
+ showAction && /* @__PURE__ */ jsx("div", { className: `${baseClass}-action`, onClick: onAction, children: actionText }),
1977
2092
  onClose && /* @__PURE__ */ jsx("div", { className: `${baseClass}-close`, onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "close", size: 16 }) })
1978
2093
  ] });
1979
2094
  };
@@ -2499,6 +2614,7 @@ const ConfigProvider = ({
2499
2614
  };
2500
2615
  export {
2501
2616
  Button,
2617
+ ButtonGroup,
2502
2618
  Card,
2503
2619
  Cascader,
2504
2620
  Cell,