wz-h5-design 1.0.3 → 1.0.5

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 (90) hide show
  1. package/dist/Button/index.js +23 -7
  2. package/dist/Button/index.umd.cjs +1 -1
  3. package/dist/Button/style/index.css +1 -1
  4. package/dist/Button/style.css +1 -1
  5. package/dist/ButtonGroup/index.js +34 -0
  6. package/dist/ButtonGroup/index.umd.cjs +1 -0
  7. package/dist/ButtonGroup/style/index.css +1 -0
  8. package/dist/ButtonGroup/style/index.js +1 -0
  9. package/dist/ButtonGroup/style.css +1 -0
  10. package/dist/Cell/index.js +29 -2
  11. package/dist/Cell/index.umd.cjs +2 -2
  12. package/dist/Cell/style/index.css +1 -1
  13. package/dist/Cell/style.css +1 -1
  14. package/dist/CheckList/index.js +28 -1
  15. package/dist/CheckList/index.umd.cjs +1 -1
  16. package/dist/CheckList/style.css +1 -1
  17. package/dist/Checkbox/index.js +34 -2
  18. package/dist/Checkbox/index.umd.cjs +1 -1
  19. package/dist/Checkbox/style/index.css +1 -1
  20. package/dist/Checkbox/style.css +1 -1
  21. package/dist/DatePicker/style/index.css +1 -1
  22. package/dist/DatePicker/style.css +1 -1
  23. package/dist/DateRangePicker/index.js +65 -9
  24. package/dist/DateRangePicker/index.umd.cjs +1 -1
  25. package/dist/DateRangePicker/style/index.css +1 -1
  26. package/dist/DateRangePicker/style.css +1 -1
  27. package/dist/Dialog/index.js +23 -7
  28. package/dist/Dialog/index.umd.cjs +1 -1
  29. package/dist/Dialog/style.css +1 -1
  30. package/dist/Divider/index.js +13 -4
  31. package/dist/Divider/index.umd.cjs +1 -1
  32. package/dist/Divider/style/index.css +1 -1
  33. package/dist/Divider/style.css +1 -1
  34. package/dist/GridView/index.js +26 -2
  35. package/dist/GridView/index.umd.cjs +1 -1
  36. package/dist/GridView/style/index.css +1 -1
  37. package/dist/GridView/style.css +1 -1
  38. package/dist/Input/index.js +47 -5
  39. package/dist/Input/index.umd.cjs +1 -1
  40. package/dist/Input/style/index.css +1 -1
  41. package/dist/Input/style.css +1 -1
  42. package/dist/Popup/style/index.css +1 -1
  43. package/dist/Popup/style.css +1 -1
  44. package/dist/Radio/index.js +34 -2
  45. package/dist/Radio/index.umd.cjs +1 -1
  46. package/dist/Radio/style/index.css +1 -1
  47. package/dist/Radio/style.css +1 -1
  48. package/dist/Search/index.js +10 -2
  49. package/dist/Search/index.umd.cjs +1 -1
  50. package/dist/Search/style/index.css +1 -1
  51. package/dist/Search/style.css +1 -1
  52. package/dist/Switch/index.js +10 -3
  53. package/dist/Switch/index.umd.cjs +1 -1
  54. package/dist/Switch/style/index.css +1 -1
  55. package/dist/Switch/style.css +1 -1
  56. package/dist/Tabbar/index.js +6 -3
  57. package/dist/Tabbar/index.umd.cjs +1 -1
  58. package/dist/Tabbar/style/index.css +1 -1
  59. package/dist/Tabbar/style.css +1 -1
  60. package/dist/Tabs/index.js +57 -17
  61. package/dist/Tabs/index.umd.cjs +1 -1
  62. package/dist/Tabs/style/index.css +1 -1
  63. package/dist/Tabs/style.css +1 -1
  64. package/dist/TimePicker/style/index.css +1 -1
  65. package/dist/TimePicker/style.css +1 -1
  66. package/dist/Tip/index.js +28 -5
  67. package/dist/Tip/index.umd.cjs +2 -2
  68. package/dist/Tip/style/index.css +1 -1
  69. package/dist/Tip/style.css +1 -1
  70. package/dist/Tooltip/index.js +59 -14
  71. package/dist/Tooltip/index.umd.cjs +2 -2
  72. package/dist/Tooltip/style/index.css +1 -1
  73. package/dist/Tooltip/style.css +1 -1
  74. package/dist/style.css +1 -1
  75. package/dist/types/components/Button/Button.d.ts +3 -0
  76. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +20 -0
  77. package/dist/types/components/ButtonGroup/index.d.ts +5 -0
  78. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +6 -0
  79. package/dist/types/components/Divider/Divider.d.ts +2 -0
  80. package/dist/types/components/GridView/GridView.d.ts +8 -0
  81. package/dist/types/components/Input/Input.d.ts +11 -1
  82. package/dist/types/components/Search/Search.d.ts +1 -0
  83. package/dist/types/components/Tabbar/Tabbar.d.ts +2 -0
  84. package/dist/types/components/Tabs/Tabs.d.ts +4 -1
  85. package/dist/types/components/Tip/Tip.d.ts +21 -2
  86. package/dist/types/components/Tooltip/Tooltip.d.ts +6 -2
  87. package/dist/types/components/index.d.ts +2 -1
  88. package/dist/wz-h5-design.es.js +357 -99
  89. package/dist/wz-h5-design.umd.js +2 -2
  90. 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;
@@ -5,8 +5,16 @@ export interface GridViewItemProps {
5
5
  icon?: React.ReactNode;
6
6
  /** 文本内容 */
7
7
  text?: React.ReactNode;
8
+ /** 文本颜色 */
9
+ textColor?: string;
10
+ /** 文本大小 */
11
+ textSize?: number | string;
8
12
  /** 描述文本 */
9
13
  description?: React.ReactNode;
14
+ /** 描述文本颜色 */
15
+ descriptionColor?: string;
16
+ /** 描述文本大小 */
17
+ descriptionSize?: number | string;
10
18
  /** 徽章内容 */
11
19
  badge?: React.ReactNode;
12
20
  /** 角标内容 */
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "./Input.scss";
3
- type InputTypes = "text" | "password" | "textarea" | "number";
3
+ type InputTypes = "text" | "password" | "textarea" | "number" | "code";
4
4
  export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
5
5
  clearable?: boolean;
6
6
  align?: "left" | "center" | "right";
@@ -12,6 +12,16 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
12
12
  borderRadius?: string;
13
13
  backgroundColor?: string;
14
14
  bordered?: true;
15
+ /** 验证码倒计时秒数,默认60秒 */
16
+ codeCountdown?: number;
17
+ /** 点击获取验证码回调 */
18
+ onGetCode?: () => void | Promise<void>;
19
+ /** 获取验证码按钮文字 */
20
+ codeText?: string;
21
+ /** 倒计时中的文字,{s}会被替换为秒数 */
22
+ codeCountingText?: string;
23
+ /** 重新获取验证码文字 */
24
+ codeResendText?: string;
15
25
  }
16
26
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
17
27
  export {};
@@ -11,6 +11,7 @@ export interface SearchProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
11
11
  suffix?: React.ReactNode;
12
12
  leftIcon?: React.ReactNode;
13
13
  actionText?: React.ReactNode;
14
+ actionColor?: string;
14
15
  showCancel?: boolean;
15
16
  cancelText?: React.ReactNode;
16
17
  background?: string;
@@ -13,6 +13,8 @@ export interface TabbarItemProps {
13
13
  badge?: React.ReactNode;
14
14
  /** 将徽标渲染为气泡样式 */
15
15
  badgeAsBubble?: boolean;
16
+ /** 是否只显示小红点(无内容) */
17
+ dot?: boolean;
16
18
  /** 自定义激活状态下图标和文字颜色 */
17
19
  activeColor?: string;
18
20
  /** 是否为特殊突起按钮 */
@@ -7,7 +7,8 @@ export interface TabPaneProps {
7
7
  badge?: ReactNode;
8
8
  }
9
9
  export interface TabsProps {
10
- type?: 'line' | 'card' | 'pills';
10
+ type?: 'line' | 'card' | 'text';
11
+ align?: 'center' | 'left';
11
12
  value?: number;
12
13
  defaultValue?: number;
13
14
  onChange?: (index: number) => void;
@@ -18,6 +19,8 @@ export interface TabsProps {
18
19
  contentClassName?: string;
19
20
  contentStyle?: React.CSSProperties;
20
21
  children: ReactNode;
22
+ /** 最大标签数量,默认5 */
23
+ maxTabs?: number;
21
24
  }
22
25
  export declare const TabPane: React.FC<TabPaneProps>;
23
26
  export declare const Tabs: React.FC<TabsProps> & {
@@ -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;
@@ -11,7 +11,11 @@ export interface TooltipProps {
11
11
  visible?: boolean;
12
12
  onVisibleChange?: (visible: boolean) => void;
13
13
  showMask?: boolean;
14
- action?: React.ReactNode;
15
- closeIcon?: React.ReactNode;
14
+ /** 操作按钮文字 */
15
+ actionText?: string;
16
+ /** 操作按钮点击回调 */
17
+ onAction?: () => void;
18
+ /** 是否显示关闭按钮 */
19
+ closable?: boolean;
16
20
  }
17
21
  export declare const Tooltip: FC<TooltipProps>;
@@ -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 };