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 @@ const Button = forwardRef(({
8
8
  color = "",
9
9
  textColor = "",
10
10
  borderColor = "",
11
+ width,
12
+ height,
13
+ fontSize,
11
14
  className = "",
12
15
  style = {},
13
16
  children,
@@ -17,12 +20,22 @@ const Button = forwardRef(({
17
20
  }, ref) => {
18
21
  const [isActive, setIsActive] = useState(false);
19
22
  const timerRef = useRef(null);
23
+ const formatSize = (value) => {
24
+ if (value === void 0) return void 0;
25
+ return typeof value === "number" ? `${value}px` : value;
26
+ };
20
27
  const buttonStyle = useMemo(() => {
28
+ const customStyle = {
29
+ width: formatSize(width),
30
+ height: formatSize(height),
31
+ fontSize: formatSize(fontSize)
32
+ };
21
33
  if (type === "cancel") {
22
34
  return {
23
35
  background: "#D6D6D6",
24
36
  color: textColor || "#fff",
25
- ...style
37
+ ...style,
38
+ ...customStyle
26
39
  };
27
40
  }
28
41
  if (type === "outline") {
@@ -30,7 +43,8 @@ const Button = forwardRef(({
30
43
  color: textColor || "var(--wz-primary-color)",
31
44
  borderColor: borderColor || "var(--wz-primary-color)",
32
45
  background: "transparent",
33
- ...style
46
+ ...style,
47
+ ...customStyle
34
48
  };
35
49
  }
36
50
  if (type === "text") {
@@ -39,7 +53,8 @@ const Button = forwardRef(({
39
53
  background: "transparent",
40
54
  border: "none",
41
55
  boxShadow: "none",
42
- ...style
56
+ ...style,
57
+ ...customStyle
43
58
  };
44
59
  }
45
60
  if (type === "plain") {
@@ -47,7 +62,8 @@ const Button = forwardRef(({
47
62
  color: textColor || "#666666",
48
63
  borderColor: borderColor || "#666666",
49
64
  background: "transparent",
50
- ...style
65
+ ...style,
66
+ ...customStyle
51
67
  };
52
68
  }
53
69
  if (type === "primary") {
@@ -56,10 +72,10 @@ const Button = forwardRef(({
56
72
  s.background = color || "var(--wz-primary-gradient, var(--wz-primary-color))";
57
73
  }
58
74
  s.color = textColor || "#fff";
59
- return s;
75
+ return { ...s, ...customStyle };
60
76
  }
61
- return style;
62
- }, [type, color, textColor, borderColor, style]);
77
+ return { ...style, ...customStyle };
78
+ }, [type, color, textColor, borderColor, width, height, fontSize, style]);
63
79
  const handleClick = (e) => {
64
80
  if (disabled) return;
65
81
  setIsActive(true);
@@ -1 +1 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).Button={},e.jsxRuntime,e.React)}(this,(function(e,r,t){"use strict";const o=t.forwardRef((({type:e="primary",size:o="medium",block:n=!1,disabled:a=!1,color:l="",textColor:s="",borderColor:i="",className:u="",style:c={},children:d,icon:b,iconPosition:f="left",onClick:m},p)=>{const[w,y]=t.useState(!1),z=t.useRef(null),x=t.useMemo((()=>{if("cancel"===e)return{background:"#D6D6D6",color:s||"#fff",...c};if("outline"===e)return{color:s||"var(--wz-primary-color)",borderColor:i||"var(--wz-primary-color)",background:"transparent",...c};if("text"===e)return{color:s||c.color||"var(--wz-primary-color, #22C94D)",background:"transparent",border:"none",boxShadow:"none",...c};if("plain"===e)return{color:s||"#666666",borderColor:i||"#666666",background:"transparent",...c};if("primary"===e){let e={...c};return a||(e.background=l||"var(--wz-primary-gradient, var(--wz-primary-color))"),e.color=s||"#fff",e}return c}),[e,l,s,i,c]),k=["wz-button",`wz-button--${e}`,`wz-button--${o}`,n?"wz-button--block":"",a?"wz-button--disabled":"",w&&!a?"wz-button--active":"",u].filter(Boolean).join(" ");return r.jsxs("button",{ref:p,type:"button",className:k,style:x,disabled:a,onClick:e=>{a||(y(!0),z.current&&window.clearTimeout(z.current),z.current=window.setTimeout((()=>y(!1)),100),null==m||m(e))},children:["left"===f&&b,d,"right"===f&&b,"primary"===e&&w&&r.jsx("span",{className:"wz-button__mask"}),"outline"===e&&w&&r.jsx("span",{className:"wz-button__mask"}),"outline"===e&&a&&r.jsx("span",{className:"wz-button__mask--disabled"}),"cancel"===e&&w&&r.jsx("span",{className:"wz-button__mask--cancel"}),"plain"===e&&w&&r.jsx("span",{className:"wz-button__mask"})]})}));o.displayName="Button",e.Button=o,e.default=o,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Button={},e.jsxRuntime,e.React)}(this,(function(e,t,o){"use strict";const r=o.forwardRef((({type:e="primary",size:r="medium",block:n=!1,disabled:a=!1,color:i="",textColor:l="",borderColor:s="",width:u,height:c,fontSize:d,className:f="",style:b={},children:m,icon:p,iconPosition:w="left",onClick:y},z)=>{const[x,k]=o.useState(!1),g=o.useRef(null),h=e=>{if(void 0!==e)return"number"==typeof e?`${e}px`:e},j=o.useMemo((()=>{const t={width:h(u),height:h(c),fontSize:h(d)};if("cancel"===e)return{background:"#D6D6D6",color:l||"#fff",...b,...t};if("outline"===e)return{color:l||"var(--wz-primary-color)",borderColor:s||"var(--wz-primary-color)",background:"transparent",...b,...t};if("text"===e)return{color:l||b.color||"var(--wz-primary-color, #22C94D)",background:"transparent",border:"none",boxShadow:"none",...b,...t};if("plain"===e)return{color:l||"#666666",borderColor:s||"#666666",background:"transparent",...b,...t};if("primary"===e){let e={...b};return a||(e.background=i||"var(--wz-primary-gradient, var(--wz-primary-color))"),e.color=l||"#fff",{...e,...t}}return{...b,...t}}),[e,i,l,s,u,c,d,b]),_=["wz-button",`wz-button--${e}`,`wz-button--${r}`,n?"wz-button--block":"",a?"wz-button--disabled":"",x&&!a?"wz-button--active":"",f].filter(Boolean).join(" ");return t.jsxs("button",{ref:z,type:"button",className:_,style:j,disabled:a,onClick:e=>{a||(k(!0),g.current&&window.clearTimeout(g.current),g.current=window.setTimeout((()=>k(!1)),100),null==y||y(e))},children:["left"===w&&p,m,"right"===w&&p,"primary"===e&&x&&t.jsx("span",{className:"wz-button__mask"}),"outline"===e&&x&&t.jsx("span",{className:"wz-button__mask"}),"outline"===e&&a&&t.jsx("span",{className:"wz-button__mask--disabled"}),"cancel"===e&&x&&t.jsx("span",{className:"wz-button__mask--cancel"}),"plain"===e&&x&&t.jsx("span",{className:"wz-button__mask"})]})}));r.displayName="Button",e.Button=r,e.default=r,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
@@ -1 +1 @@
1
- .wz-button{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;gap:5px;font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;font-weight:600;line-height:23px;transition:all .2s;display:inline-flex;position:relative;overflow:hidden}.wz-button--primary{color:var(--wz-text-color-white,#fff);background:var(--wz-primary-gradient);border:none}.wz-button--primary.wz-button--disabled{color:#fff;background-color:#d6d6d6}.wz-button--outline{color:var(--wz-primary-color,#22c94d);border:1px solid var(--wz-primary-color,#22c94d);background:0 0}.wz-button--plain{color:#666;background:0 0;border:1px solid #666}.wz-button--plain.wz-button--disabled{opacity:.5;background:#fff!important;border:1px solid #ccc!important}.wz-button--cancel{color:#fff;background:#c0c4cc;border:none}.wz-button--block{width:100%;display:flex}.wz-button--large{border-radius:23px;height:45px;padding:10px 20px;font-size:18px}.wz-button--medium{border-radius:23px;height:30px;padding:4px 16px;font-size:14px}.wz-button--small{border-radius:13px;height:25px;padding:3px 10px;font-size:13px}.wz-button--disabled{cursor:not-allowed;opacity:.8}.wz-button--active{opacity:.6}.wz-button__mask{pointer-events:none;border-radius:inherit;z-index:1;background:#00000014;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--disabled{pointer-events:none;border-radius:inherit;z-index:10;background:#ffffff80;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--cancel{pointer-events:none;border-radius:inherit;z-index:10;background:#0000000f;width:100%;height:100%;position:absolute;top:0;left:0}@media screen and (max-width:767px){.wz-button--small{height:30px;font-size:14px}.wz-button--medium{height:40px;font-size:15px}.wz-button--large{height:50px;font-size:16px}}.wz-button--text{color:var(--wz-primary-color,#22c94d);box-shadow:none;background:0 0;border:none;height:auto;padding:0 8px;transition:color .2s}.wz-button--text:active{color:var(--wz-primary-color-dark,#179a38);background:var(--wz-bg-color-base,#f5f7f9)}.wz-button--disabled.wz-button--text{color:var(--wz-disabled-color,#c0c4cc);background:0 0}
1
+ .wz-button{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;gap:5px;font-family:"Alibaba PuHuiTi 2.0";font-weight:600;transition:all .2s;display:inline-flex;position:relative;overflow:hidden}.wz-button--primary{color:var(--wz-text-color-white,#fff);background:var(--wz-primary-gradient);border:none}.wz-button--primary.wz-button--disabled{color:#fff;background-color:#d6d6d6}.wz-button--outline{color:var(--wz-primary-color,#22c94d);border:1px solid var(--wz-primary-color,#22c94d);background:0 0}.wz-button--plain{color:#666;background:0 0;border:1px solid #666}.wz-button--plain.wz-button--disabled{opacity:.5;background:#fff!important;border:1px solid #ccc!important}.wz-button--cancel{color:#fff;background:#c0c4cc;border:none}.wz-button--block{width:100%;display:flex}.wz-button--large{border-radius:23px;height:46px;padding:10px 20px;font-size:18px;line-height:26px}.wz-button--medium{border-radius:23px;height:30px;padding:4px 16px;font-size:14px;line-height:22px}.wz-button--small{border-radius:13px;height:26px;padding:3px 10px;font-size:13px;line-height:20px}.wz-button--disabled{cursor:not-allowed;opacity:.8}.wz-button--active{opacity:.6}.wz-button__mask{pointer-events:none;border-radius:inherit;z-index:1;background:#00000014;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--disabled{pointer-events:none;border-radius:inherit;z-index:10;background:#ffffff80;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--cancel{pointer-events:none;border-radius:inherit;z-index:10;background:#0000000f;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button--text{color:var(--wz-primary-color,#22c94d);box-shadow:none;background:0 0;border:none;height:auto;padding:0 8px;transition:color .2s}.wz-button--text:active{color:var(--wz-primary-color-dark,#179a38);background:var(--wz-bg-color-base,#f5f7f9)}.wz-button--disabled.wz-button--text{color:var(--wz-disabled-color,#c0c4cc);background:0 0}
@@ -1 +1 @@
1
- .wz-button{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;gap:5px;font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;font-weight:600;line-height:23px;transition:all .2s;display:inline-flex;position:relative;overflow:hidden}.wz-button--primary{color:var(--wz-text-color-white,#fff);background:var(--wz-primary-gradient);border:none}.wz-button--primary.wz-button--disabled{color:#fff;background-color:#d6d6d6}.wz-button--outline{color:var(--wz-primary-color,#22c94d);border:1px solid var(--wz-primary-color,#22c94d);background:0 0}.wz-button--plain{color:#666;background:0 0;border:1px solid #666}.wz-button--plain.wz-button--disabled{opacity:.5;background:#fff!important;border:1px solid #ccc!important}.wz-button--cancel{color:#fff;background:#c0c4cc;border:none}.wz-button--block{width:100%;display:flex}.wz-button--large{border-radius:23px;height:45px;padding:10px 20px;font-size:18px}.wz-button--medium{border-radius:23px;height:30px;padding:4px 16px;font-size:14px}.wz-button--small{border-radius:13px;height:25px;padding:3px 10px;font-size:13px}.wz-button--disabled{cursor:not-allowed;opacity:.8}.wz-button--active{opacity:.6}.wz-button__mask{pointer-events:none;border-radius:inherit;z-index:1;background:#00000014;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--disabled{pointer-events:none;border-radius:inherit;z-index:10;background:#ffffff80;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--cancel{pointer-events:none;border-radius:inherit;z-index:10;background:#0000000f;width:100%;height:100%;position:absolute;top:0;left:0}@media screen and (max-width:767px){.wz-button--small{height:30px;font-size:14px}.wz-button--medium{height:40px;font-size:15px}.wz-button--large{height:50px;font-size:16px}}.wz-button--text{color:var(--wz-primary-color,#22c94d);box-shadow:none;background:0 0;border:none;height:auto;padding:0 8px;transition:color .2s}.wz-button--text:active{color:var(--wz-primary-color-dark,#179a38);background:var(--wz-bg-color-base,#f5f7f9)}.wz-button--disabled.wz-button--text{color:var(--wz-disabled-color,#c0c4cc);background:0 0}
1
+ .wz-button{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;gap:5px;font-family:"Alibaba PuHuiTi 2.0";font-weight:600;transition:all .2s;display:inline-flex;position:relative;overflow:hidden}.wz-button--primary{color:var(--wz-text-color-white,#fff);background:var(--wz-primary-gradient);border:none}.wz-button--primary.wz-button--disabled{color:#fff;background-color:#d6d6d6}.wz-button--outline{color:var(--wz-primary-color,#22c94d);border:1px solid var(--wz-primary-color,#22c94d);background:0 0}.wz-button--plain{color:#666;background:0 0;border:1px solid #666}.wz-button--plain.wz-button--disabled{opacity:.5;background:#fff!important;border:1px solid #ccc!important}.wz-button--cancel{color:#fff;background:#c0c4cc;border:none}.wz-button--block{width:100%;display:flex}.wz-button--large{border-radius:23px;height:46px;padding:10px 20px;font-size:18px;line-height:26px}.wz-button--medium{border-radius:23px;height:30px;padding:4px 16px;font-size:14px;line-height:22px}.wz-button--small{border-radius:13px;height:26px;padding:3px 10px;font-size:13px;line-height:20px}.wz-button--disabled{cursor:not-allowed;opacity:.8}.wz-button--active{opacity:.6}.wz-button__mask{pointer-events:none;border-radius:inherit;z-index:1;background:#00000014;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--disabled{pointer-events:none;border-radius:inherit;z-index:10;background:#ffffff80;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button__mask--cancel{pointer-events:none;border-radius:inherit;z-index:10;background:#0000000f;width:100%;height:100%;position:absolute;top:0;left:0}.wz-button--text{color:var(--wz-primary-color,#22c94d);box-shadow:none;background:0 0;border:none;height:auto;padding:0 8px;transition:color .2s}.wz-button--text:active{color:var(--wz-primary-color-dark,#179a38);background:var(--wz-bg-color-base,#f5f7f9)}.wz-button--disabled.wz-button--text{color:var(--wz-disabled-color,#c0c4cc);background:0 0}
@@ -0,0 +1,34 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ const ButtonGroup = ({
3
+ bgColor = "#fff",
4
+ height,
5
+ padding = "2px 10px",
6
+ fixed = false,
7
+ gap = 9,
8
+ className = "",
9
+ style = {},
10
+ children
11
+ }) => {
12
+ const formatSize = (value) => {
13
+ if (value === void 0) return void 0;
14
+ return typeof value === "number" ? `${value}px` : value;
15
+ };
16
+ const containerStyle = {
17
+ backgroundColor: bgColor,
18
+ height: formatSize(height),
19
+ padding: formatSize(padding),
20
+ gap: formatSize(gap),
21
+ ...style
22
+ };
23
+ const classNames = [
24
+ "wz-button-group",
25
+ fixed ? "wz-button-group--fixed" : "",
26
+ className
27
+ ].filter(Boolean).join(" ");
28
+ return /* @__PURE__ */ jsx("div", { className: classNames, style: containerStyle, children });
29
+ };
30
+ ButtonGroup.displayName = "ButtonGroup";
31
+ export {
32
+ ButtonGroup,
33
+ ButtonGroup as default
34
+ };
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ButtonGroup={},e.jsxRuntime)}(this,(function(e,t){"use strict";const o=({bgColor:e="#fff",height:o,padding:n="2px 10px",fixed:i=!1,gap:u=9,className:r="",style:d={},children:s})=>{const f=e=>{if(void 0!==e)return"number"==typeof e?`${e}px`:e},l={backgroundColor:e,height:f(o),padding:f(n),gap:f(u),...d},p=["wz-button-group",i?"wz-button-group--fixed":"",r].filter(Boolean).join(" ");return t.jsx("div",{className:p,style:l,children:s})};o.displayName="ButtonGroup",e.ButtonGroup=o,e.default=o,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
@@ -0,0 +1 @@
1
+ .wz-button-group{box-sizing:border-box;justify-content:center;align-items:center;width:100%;display:flex}.wz-button-group--fixed{z-index:100;padding-bottom:env(safe-area-inset-bottom);position:fixed;bottom:0;left:0;right:0}.wz-button-group>.wz-button{flex:1}.wz-button-group>.wz-button--text{flex:none}
@@ -0,0 +1 @@
1
+ import './index.css';
@@ -0,0 +1 @@
1
+ .wz-button-group{box-sizing:border-box;justify-content:center;align-items:center;width:100%;display:flex}.wz-button-group--fixed{z-index:100;padding-bottom:env(safe-area-inset-bottom);position:fixed;bottom:0;left:0;right:0}.wz-button-group>.wz-button{flex:1}.wz-button-group>.wz-button--text{flex:none}
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  function getDefaultExportFromCjs(x) {
3
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
4
  }
@@ -50,6 +50,33 @@ var classnames = { exports: {} };
50
50
  })(classnames);
51
51
  var classnamesExports = classnames.exports;
52
52
  const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
53
+ const Icon = ({
54
+ name,
55
+ size = 24,
56
+ color = "currentColor",
57
+ className = "",
58
+ style,
59
+ onClick,
60
+ type = "yunying"
61
+ // 默认使用yunying图标库
62
+ }) => {
63
+ const iconStyle = {
64
+ fontSize: typeof size === "number" ? `${size}px` : size,
65
+ color,
66
+ ...style
67
+ };
68
+ const iconFontClass = `iconfont-${type}`;
69
+ const iconPrefix = "icon-";
70
+ const iconClass = `${iconPrefix}${name}`;
71
+ return /* @__PURE__ */ jsx(
72
+ "i",
73
+ {
74
+ className: `wz-icon ${iconFontClass} ${iconClass} ${className}`,
75
+ style: iconStyle,
76
+ onClick
77
+ }
78
+ );
79
+ };
53
80
  const Cell$1 = (props) => {
54
81
  const {
55
82
  title,
@@ -108,7 +135,7 @@ const Cell$1 = (props) => {
108
135
  };
109
136
  const renderRightIcon = () => {
110
137
  if (arrow) {
111
- return /* @__PURE__ */ jsx("div", { className: "wz-cell-arrow" });
138
+ return /* @__PURE__ */ jsx("div", { className: "wz-cell-arrow", children: /* @__PURE__ */ jsx(Icon, { name: "right-arrow", size: 16 }) });
112
139
  }
113
140
  return null;
114
141
  };
@@ -1,6 +1,6 @@
1
- !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?l(exports,require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime"],l):l((e="undefined"!=typeof globalThis?globalThis:e||self).Cell={},e.jsxRuntime)}(this,(function(e,l){"use strict";function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,r={exports:{}};
1
+ !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?l(exports,require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime"],l):l((e="undefined"!=typeof globalThis?globalThis:e||self).Cell={},e.jsxRuntime)}(this,(function(e,l){"use strict";function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,n={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */t=r,function(){var e={}.hasOwnProperty;function l(){for(var s=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var n=typeof r;if("string"===n||"number"===n)s.push(r);else if(Array.isArray(r)){if(r.length){var a=l.apply(null,r);a&&s.push(a)}}else if("object"===n){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){s.push(r.toString());continue}for(var i in r)e.call(r,i)&&r[i]&&s.push(i)}}}return s.join(" ")}t.exports?(l.default=l,t.exports=l):window.classNames=l}();const n=s(r.exports),a=e=>{const{className:s,style:t,children:r}=e;return l.jsx("div",{className:n("wz-cell-group",s),style:t,children:r})},i=e=>{const{title:s,label:t,value:r,icon:a,arrow:i=!1,border:c=!0,center:o=!1,disabled:d=!1,required:u=!1,className:p,style:f,titleStyle:y,titleClassName:m,labelStyle:h,labelClassName:v,valueStyle:x,valueClassName:j,onClick:w,children:b}=e,N=n("wz-cell",{"wz-cell-border":c,"wz-cell-center":o,"wz-cell-disabled":d},p);return l.jsxs("div",{className:N,style:f,onClick:d?void 0:w,children:[a?l.jsx("div",{className:"wz-cell-icon",children:a}):null,l.jsxs("div",{className:"wz-cell-content",children:[s?l.jsxs("div",{className:n("wz-cell-title",m),style:y,children:[u&&l.jsx("span",{className:"wz-cell-required",children:"*"}),s,r&&l.jsx("span",{className:n("wz-cell-value",j),style:x,children:r})]}):null,t?l.jsx("div",{className:n("wz-cell-label",v),style:h,children:t}):null]}),null,b&&l.jsx("div",{className:"wz-cell-extra",children:b}),i?l.jsx("div",{className:"wz-cell-arrow"}):null]})};i.Group=a,e.Cell=i,e.CellGroup=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
6
+ */t=n,function(){var e={}.hasOwnProperty;function l(){for(var s=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)s.push(n);else if(Array.isArray(n)){if(n.length){var i=l.apply(null,n);i&&s.push(i)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){s.push(n.toString());continue}for(var a in n)e.call(n,a)&&n[a]&&s.push(a)}}}return s.join(" ")}t.exports?(l.default=l,t.exports=l):window.classNames=l}();const r=s(n.exports),i=({name:e,size:s=24,color:t="currentColor",className:n="",style:r,onClick:i,type:a="yunying"})=>{const c={fontSize:"number"==typeof s?`${s}px`:s,color:t,...r},o=`iconfont-${a}`,u=`icon-${e}`;return l.jsx("i",{className:`wz-icon ${o} ${u} ${n}`,style:c,onClick:i})},a=e=>{const{className:s,style:t,children:n}=e;return l.jsx("div",{className:r("wz-cell-group",s),style:t,children:n})},c=e=>{const{title:s,label:t,value:n,icon:a,arrow:c=!1,border:o=!0,center:u=!1,disabled:d=!1,required:p=!1,className:f,style:y,titleStyle:m,titleClassName:h,labelStyle:x,labelClassName:v,valueStyle:j,valueClassName:w,onClick:b,children:N}=e,z=r("wz-cell",{"wz-cell-border":o,"wz-cell-center":u,"wz-cell-disabled":d},f);return l.jsxs("div",{className:z,style:y,onClick:d?void 0:b,children:[a?l.jsx("div",{className:"wz-cell-icon",children:a}):null,l.jsxs("div",{className:"wz-cell-content",children:[s?l.jsxs("div",{className:r("wz-cell-title",h),style:m,children:[p&&l.jsx("span",{className:"wz-cell-required",children:"*"}),s,n&&l.jsx("span",{className:r("wz-cell-value",w),style:j,children:n})]}):null,t?l.jsx("div",{className:r("wz-cell-label",v),style:x,children:t}):null]}),null,N&&l.jsx("div",{className:"wz-cell-extra",children:N}),c?l.jsx("div",{className:"wz-cell-arrow",children:l.jsx(i,{name:"right-arrow",size:16})}):null]})};c.Group=a,e.Cell=c,e.CellGroup=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- .wz-cell-group{background-color:var(--wz-bg-color-white,#fff);border-radius:8px;overflow:hidden}.wz-cell-group .wz-cell{background-color:#0000;border-radius:0}.wz-cell{background-color:var(--wz-bg-color-white,#fff);-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;border-radius:8px;outline:none;align-items:center;padding:12px;line-height:1.5;display:flex;position:relative}.wz-cell-border:after{content:"";background-color:var(--wz-border-color-base,#dcdfe6);height:1px;position:absolute;bottom:0;left:12px;right:12px;transform:scaleY(.5)}.wz-cell-center{align-items:center}.wz-cell-disabled{opacity:.5;cursor:not-allowed}.wz-cell-icon{color:var(--wz-text-color-regular,#666);align-items:center;margin-right:12px;font-size:16px;display:flex}.wz-cell-content{flex:1;min-width:0}.wz-cell-title{color:var(--wz-text-color-primary,#333);align-items:center;font-size:14px;display:flex}.wz-cell-title .wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;margin-left:8px;font-size:14px}.wz-cell-label{color:var(--wz-text-color-secondary,#999);margin-top:4px;font-size:13px}.wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;text-overflow:ellipsis;margin-left:8px;font-size:15px;overflow:hidden}.wz-cell-required{color:var(--wz-danger-color,#ff4d4f);margin-right:4px;font-size:15px;font-weight:600}.wz-cell-arrow{border:1px solid var(--wz-border-color-base,#dcdfe6);border-width:1px 1px 0 0;width:12px;height:12px;margin-left:12px;transform:rotate(45deg)}.wz-cell-extra{color:var(--wz-text-color-regular,#666);align-items:center;min-width:0;margin-left:8px;font-size:15px;display:flex}.wz-cell:has(.wz-cell-arrow):active{background-color:var(--wz-bg-color-light,#f8f8f8)}
1
+ .wz-cell-group{background-color:var(--wz-bg-color-white,#fff);border-radius:8px;overflow:hidden}.wz-cell-group .wz-cell{background-color:#0000;border-radius:0}.wz-cell{background-color:var(--wz-bg-color-white,#fff);-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;border-radius:8px;outline:none;align-items:center;padding:0 14px;line-height:1.5;display:flex;position:relative}.wz-cell-border:after{content:"";background-color:var(--wz-border-color-base,#dcdfe6);height:1px;position:absolute;bottom:0;left:12px;right:12px;transform:scaleY(.5)}.wz-cell-center{align-items:center}.wz-cell-disabled{opacity:.5;cursor:not-allowed}.wz-cell-icon{color:var(--wz-text-color-regular,#666);align-items:center;margin-right:12px;font-size:16px;display:flex}.wz-cell-content{flex-shrink:0;min-width:0}.wz-cell-title{color:var(--wz-text-color-primary,#333);align-items:center;font-size:14px;display:flex}.wz-cell-title .wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;margin-left:4px;font-size:14px}.wz-cell-label{color:var(--wz-text-color-secondary,#999);margin-top:4px;font-size:13px}.wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;text-overflow:ellipsis;margin-left:8px;font-size:15px;overflow:hidden}.wz-cell-required{color:var(--wz-danger-color,#ff4d4f);margin-right:4px;font-size:15px;font-weight:600}.wz-cell-arrow{color:var(--wz-text-color-secondary,#999);align-items:center;margin-left:12px;display:flex}.wz-cell-extra{color:var(--wz-text-color-regular,#666);flex:1;align-items:center;min-width:0;margin-left:10px;font-size:15px;display:flex}.wz-cell:has(.wz-cell-arrow):active{background-color:var(--wz-bg-color-light,#f8f8f8)}
@@ -1 +1 @@
1
- .wz-cell-group .wz-cell{background-color:#0000;border-radius:0}.wz-cell{background-color:var(--wz-bg-color-white,#fff);-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;border-radius:8px;outline:none;align-items:center;padding:12px;line-height:1.5;display:flex;position:relative}.wz-cell-border:after{content:"";background-color:var(--wz-border-color-base,#dcdfe6);height:1px;position:absolute;bottom:0;left:12px;right:12px;transform:scaleY(.5)}.wz-cell-center{align-items:center}.wz-cell-disabled{opacity:.5;cursor:not-allowed}.wz-cell-icon{color:var(--wz-text-color-regular,#666);align-items:center;margin-right:12px;font-size:16px;display:flex}.wz-cell-content{flex:1;min-width:0}.wz-cell-title{color:var(--wz-text-color-primary,#333);align-items:center;font-size:14px;display:flex}.wz-cell-title .wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;margin-left:8px;font-size:14px}.wz-cell-label{color:var(--wz-text-color-secondary,#999);margin-top:4px;font-size:13px}.wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;text-overflow:ellipsis;margin-left:8px;font-size:15px;overflow:hidden}.wz-cell-required{color:var(--wz-danger-color,#ff4d4f);margin-right:4px;font-size:15px;font-weight:600}.wz-cell-arrow{border:1px solid var(--wz-border-color-base,#dcdfe6);border-width:1px 1px 0 0;width:12px;height:12px;margin-left:12px;transform:rotate(45deg)}.wz-cell-extra{color:var(--wz-text-color-regular,#666);align-items:center;min-width:0;margin-left:8px;font-size:15px;display:flex}.wz-cell:has(.wz-cell-arrow):active{background-color:var(--wz-bg-color-light,#f8f8f8)}.wz-cell-group{background-color:var(--wz-bg-color-white,#fff);border-radius:8px;overflow:hidden}
1
+ .wz-cell-group .wz-cell{background-color:#0000;border-radius:0}.wz-cell{background-color:var(--wz-bg-color-white,#fff);-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;border-radius:8px;outline:none;align-items:center;padding:0 14px;line-height:1.5;display:flex;position:relative}.wz-cell-border:after{content:"";background-color:var(--wz-border-color-base,#dcdfe6);height:1px;position:absolute;bottom:0;left:12px;right:12px;transform:scaleY(.5)}.wz-cell-center{align-items:center}.wz-cell-disabled{opacity:.5;cursor:not-allowed}.wz-cell-icon{color:var(--wz-text-color-regular,#666);align-items:center;margin-right:12px;font-size:16px;display:flex}.wz-cell-content{flex-shrink:0;min-width:0}.wz-cell-title{color:var(--wz-text-color-primary,#333);align-items:center;font-size:14px;display:flex}.wz-cell-title .wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;margin-left:4px;font-size:14px}.wz-cell-label{color:var(--wz-text-color-secondary,#999);margin-top:4px;font-size:13px}.wz-cell-value{color:var(--wz-text-color-regular,#666);white-space:nowrap;text-overflow:ellipsis;margin-left:8px;font-size:15px;overflow:hidden}.wz-cell-required{color:var(--wz-danger-color,#ff4d4f);margin-right:4px;font-size:15px;font-weight:600}.wz-cell-arrow{color:var(--wz-text-color-secondary,#999);align-items:center;margin-left:12px;display:flex}.wz-cell-extra{color:var(--wz-text-color-regular,#666);flex:1;align-items:center;min-width:0;margin-left:10px;font-size:15px;display:flex}.wz-cell:has(.wz-cell-arrow):active{background-color:var(--wz-bg-color-light,#f8f8f8)}.wz-icon{justify-content:center;align-items:center;transition:color .2s ease-in-out;display:inline-flex}.wz-icon-home:before{content:""}.wz-icon-search:before{content:""}.wz-icon-person:before{content:""}.wz-icon-settings:before{content:""}.wz-icon-notifications:before{content:""}.wz-icon-message:before{content:""}.wz-icon-favorite:before{content:""}.wz-icon-star:before{content:""}.wz-icon-close:before{content:""}.wz-icon-check:before{content:""}.wz-icon-arrow-back:before{content:""}.wz-icon-arrow-forward:before{content:""}.wz-icon-menu:before{content:""}.wz-icon-more:before{content:""}.wz-icon-add:before{content:""}.wz-icon-edit:before{content:""}.wz-icon-delete:before{content:""}.wz-icon-share:before{content:""}.wz-icon-download:before{content:""}.wz-icon-upload:before{content:""}.wz-icon-refresh:before{content:""}.wz-icon-help:before{content:""}.wz-icon-info:before{content:""}.wz-icon-warning:before{content:""}.wz-icon-error:before{content:""}.wz-icon-success:before{content:""}.wz-cell-group{background-color:var(--wz-bg-color-white,#fff);border-radius:10px;overflow:hidden}
@@ -1,4 +1,31 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ const Icon = ({
3
+ name,
4
+ size = 24,
5
+ color = "currentColor",
6
+ className = "",
7
+ style,
8
+ onClick,
9
+ type = "yunying"
10
+ // 默认使用yunying图标库
11
+ }) => {
12
+ const iconStyle = {
13
+ fontSize: typeof size === "number" ? `${size}px` : size,
14
+ color,
15
+ ...style
16
+ };
17
+ const iconFontClass = `iconfont-${type}`;
18
+ const iconPrefix = "icon-";
19
+ const iconClass = `${iconPrefix}${name}`;
20
+ return /* @__PURE__ */ jsx(
21
+ "i",
22
+ {
23
+ className: `wz-icon ${iconFontClass} ${iconClass} ${className}`,
24
+ style: iconStyle,
25
+ onClick
26
+ }
27
+ );
28
+ };
2
29
  const CheckList = ({ options, value, onChange, multiple = false, style, className = "" }) => {
3
30
  const isChecked = (item) => {
4
31
  if (multiple && Array.isArray(value)) return value.includes(item);
@@ -23,7 +50,7 @@ const CheckList = ({ options, value, onChange, multiple = false, style, classNam
23
50
  onClick: () => handleClick(item),
24
51
  children: [
25
52
  /* @__PURE__ */ jsx("span", { className: "wz-check-list__label", children: item }),
26
- isChecked(item) && /* @__PURE__ */ jsx("span", { className: "wz-check-list__icon", children: "" })
53
+ isChecked(item) && /* @__PURE__ */ jsx("span", { className: "wz-check-list__icon", children: /* @__PURE__ */ jsx(Icon, { name: "check", size: 18, type: "yunying" }) })
27
54
  ]
28
55
  },
29
56
  item
@@ -1 +1 @@
1
- !function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["react/jsx-runtime"],s):(e="undefined"!=typeof globalThis?globalThis:e||self).CheckList=s(e.jsxRuntime)}(this,(function(e){"use strict";return({options:s,value:i,onChange:t,multiple:c=!1,style:l,className:n=""})=>{const r=e=>c&&Array.isArray(i)?i.includes(e):i===e;return e.jsx("div",{className:`wz-check-list ${n}`,style:l,children:s.map((s=>e.jsxs("div",{className:"wz-check-list__item"+(r(s)?" wz-check-list__item--active":""),onClick:()=>(e=>{if(c){if(!Array.isArray(i))return;i.includes(e)?t(i.filter((s=>s!==e))):t([...i,e])}else t(e)})(s),children:[e.jsx("span",{className:"wz-check-list__label",children:s}),r(s)&&e.jsx("span",{className:"wz-check-list__icon",children:""})]},s)))})}}));
1
+ !function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["react/jsx-runtime"],s):(e="undefined"!=typeof globalThis?globalThis:e||self).CheckList=s(e.jsxRuntime)}(this,(function(e){"use strict";const s=({name:s,size:i=24,color:n="currentColor",className:c="",style:t,onClick:l,type:o="yunying"})=>{const r={fontSize:"number"==typeof i?`${i}px`:i,color:n,...t},a=`iconfont-${o}`,u=`icon-${s}`;return e.jsx("i",{className:`wz-icon ${a} ${u} ${c}`,style:r,onClick:l})};return({options:i,value:n,onChange:c,multiple:t=!1,style:l,className:o=""})=>{const r=e=>t&&Array.isArray(n)?n.includes(e):n===e;return e.jsx("div",{className:`wz-check-list ${o}`,style:l,children:i.map((i=>e.jsxs("div",{className:"wz-check-list__item"+(r(i)?" wz-check-list__item--active":""),onClick:()=>(e=>{if(t){if(!Array.isArray(n))return;n.includes(e)?c(n.filter((s=>s!==e))):c([...n,e])}else c(e)})(i),children:[e.jsx("span",{className:"wz-check-list__label",children:i}),r(i)&&e.jsx("span",{className:"wz-check-list__icon",children:e.jsx(s,{name:"check",size:18,type:"yunying"})})]},i)))})}}));
@@ -1 +1 @@
1
- .wz-check-list{margin:0;padding:0}.wz-check-list__item{font-size:var(--wz-check-list-font-size,15px);color:var(--wz-text-color-primary,#111);cursor:pointer;background:var(--wz-bg-color-white,#fff);border-radius:var(--wz-check-list-radius,8px);-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;outline:none;justify-content:space-between;align-items:center;margin-bottom:2px;padding:15px 20px;transition:background .2s;display:flex}.wz-check-list__item--active{color:var(--wz-primary-color,#1677ff);background:var(--wz-bg-color-white,#fff);font-weight:700}.wz-check-list__label{flex:1}.wz-check-list__icon{color:var(--wz-primary-color,#1677ff);margin-left:8px;font-size:16px}
1
+ .wz-check-list{margin:0;padding:0}.wz-check-list__item{font-size:var(--wz-check-list-font-size,15px);color:var(--wz-text-color-primary,#111);cursor:pointer;background:var(--wz-bg-color-white,#fff);border-radius:var(--wz-check-list-radius,8px);-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;outline:none;justify-content:space-between;align-items:center;margin-bottom:2px;padding:15px 20px;transition:background .2s;display:flex}.wz-check-list__item--active{color:var(--wz-primary-color,#1677ff);background:var(--wz-bg-color-white,#fff);font-weight:700}.wz-check-list__label{flex:1}.wz-check-list__icon{color:var(--wz-primary-color,#1677ff);margin-left:8px;font-size:16px}.wz-icon{justify-content:center;align-items:center;transition:color .2s ease-in-out;display:inline-flex}.wz-icon-home:before{content:""}.wz-icon-search:before{content:""}.wz-icon-person:before{content:""}.wz-icon-settings:before{content:""}.wz-icon-notifications:before{content:""}.wz-icon-message:before{content:""}.wz-icon-favorite:before{content:""}.wz-icon-star:before{content:""}.wz-icon-close:before{content:""}.wz-icon-check:before{content:""}.wz-icon-arrow-back:before{content:""}.wz-icon-arrow-forward:before{content:""}.wz-icon-menu:before{content:""}.wz-icon-more:before{content:""}.wz-icon-add:before{content:""}.wz-icon-edit:before{content:""}.wz-icon-delete:before{content:""}.wz-icon-share:before{content:""}.wz-icon-download:before{content:""}.wz-icon-upload:before{content:""}.wz-icon-refresh:before{content:""}.wz-icon-help:before{content:""}.wz-icon-info:before{content:""}.wz-icon-warning:before{content:""}.wz-icon-error:before{content:""}.wz-icon-success:before{content:""}
@@ -1,5 +1,32 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import React, { useContext, createContext } from "react";
3
+ const Icon = ({
4
+ name,
5
+ size = 24,
6
+ color = "currentColor",
7
+ className = "",
8
+ style,
9
+ onClick,
10
+ type = "yunying"
11
+ // 默认使用yunying图标库
12
+ }) => {
13
+ const iconStyle = {
14
+ fontSize: typeof size === "number" ? `${size}px` : size,
15
+ color,
16
+ ...style
17
+ };
18
+ const iconFontClass = `iconfont-${type}`;
19
+ const iconPrefix = "icon-";
20
+ const iconClass = `${iconPrefix}${name}`;
21
+ return /* @__PURE__ */ jsx(
22
+ "i",
23
+ {
24
+ className: `wz-icon ${iconFontClass} ${iconClass} ${className}`,
25
+ style: iconStyle,
26
+ onClick
27
+ }
28
+ );
29
+ };
3
30
  const CheckboxContext = createContext({});
4
31
  const Checkbox = ({
5
32
  size,
@@ -29,6 +56,11 @@ const Checkbox = ({
29
56
  const isChecked = isInGroup ? (_a = groupContext.value) == null ? void 0 : _a.includes(value) : checked;
30
57
  const isDisabled = disabled || groupContext.disabled;
31
58
  const checkboxSize = size || groupContext.size || "medium";
59
+ const iconSizeMap = {
60
+ small: 16,
61
+ medium: 18,
62
+ large: 20
63
+ };
32
64
  return /* @__PURE__ */ jsxs(
33
65
  "label",
34
66
  {
@@ -47,7 +79,7 @@ const Checkbox = ({
47
79
  ...rest
48
80
  }
49
81
  ),
50
- /* @__PURE__ */ jsx("span", { className: "wz-checkbox-inner" }),
82
+ /* @__PURE__ */ jsx("span", { className: "wz-checkbox-inner", children: /* @__PURE__ */ jsx(Icon, { name: isChecked ? "checkbox-checked" : "checkbox", type: "yunying", size: iconSizeMap[checkboxSize] }) }),
51
83
  children && /* @__PURE__ */ jsx("span", { className: "wz-checkbox-label", children })
52
84
  ]
53
85
  }
@@ -1 +1 @@
1
- !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["react/jsx-runtime","react"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).Checkbox=a(e.jsxRuntime,e.React)}(this,(function(e,a){"use strict";const l=a.createContext({}),s=({size:s,checked:c,disabled:n,onChange:i,children:t,value:d,className:o="",style:u,...r})=>{var h;const x=a.useContext(l),b=!!x.value,p=b?null==(h=x.value)?void 0:h.includes(d):c,f=n||x.disabled,m=s||x.size||"medium";return e.jsxs("label",{className:`wz-checkbox-wrapper ${f?"wz-checkbox--disabled":""} wz-checkbox--${m} ${o}`,style:u,children:[e.jsx("input",{type:"checkbox",className:"wz-checkbox-input",checked:p,disabled:f,onChange:e=>{var a;if(!n&&!x.disabled)if(b){const l=e.target.checked?[...x.value||[],d]:(x.value||[]).filter((e=>e!==d));null==(a=x.onChange)||a.call(x,l)}else null==i||i(e.target.checked)},value:d,...r}),e.jsx("span",{className:"wz-checkbox-inner"}),t&&e.jsx("span",{className:"wz-checkbox-label",children:t})]})},c=({value:s,defaultValue:c,onChange:n,disabled:i,size:t,children:d,className:o="",style:u})=>{const[r,h]=a.useState(c||[]),x={value:void 0!==s?s:r,onChange:e=>{h(e),null==n||n(e)},disabled:i,size:t};return e.jsx(l.Provider,{value:x,children:e.jsx("div",{className:`wz-checkbox-group ${o}`,style:u,children:d})})};return s.Group=c,s.displayName="Checkbox",c.displayName="Checkbox.Group",s}));
1
+ !function(e,c){"object"==typeof exports&&"undefined"!=typeof module?module.exports=c(require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["react/jsx-runtime","react"],c):(e="undefined"!=typeof globalThis?globalThis:e||self).Checkbox=c(e.jsxRuntime,e.React)}(this,(function(e,c){"use strict";const l=({name:c,size:l=24,color:s="currentColor",className:n="",style:a,onClick:i,type:o="yunying"})=>{const t={fontSize:"number"==typeof l?`${l}px`:l,color:s,...a},r=`iconfont-${o}`,d=`icon-${c}`;return e.jsx("i",{className:`wz-icon ${r} ${d} ${n}`,style:t,onClick:i})},s=c.createContext({}),n=({size:n,checked:a,disabled:i,onChange:o,children:t,value:r,className:d="",style:u,...h})=>{var x;const b=c.useContext(s),m=!!b.value,p=m?null==(x=b.value)?void 0:x.includes(r):a,f=i||b.disabled,k=n||b.size||"medium";return e.jsxs("label",{className:`wz-checkbox-wrapper ${f?"wz-checkbox--disabled":""} wz-checkbox--${k} ${d}`,style:u,children:[e.jsx("input",{type:"checkbox",className:"wz-checkbox-input",checked:p,disabled:f,onChange:e=>{var c;if(!i&&!b.disabled)if(m){const l=e.target.checked?[...b.value||[],r]:(b.value||[]).filter((e=>e!==r));null==(c=b.onChange)||c.call(b,l)}else null==o||o(e.target.checked)},value:r,...h}),e.jsx("span",{className:"wz-checkbox-inner",children:e.jsx(l,{name:p?"checkbox-checked":"checkbox",type:"yunying",size:{small:16,medium:18,large:20}[k]})}),t&&e.jsx("span",{className:"wz-checkbox-label",children:t})]})},a=({value:l,defaultValue:n,onChange:a,disabled:i,size:o,children:t,className:r="",style:d})=>{const[u,h]=c.useState(n||[]),x={value:void 0!==l?l:u,onChange:e=>{h(e),null==a||a(e)},disabled:i,size:o};return e.jsx(s.Provider,{value:x,children:e.jsx("div",{className:`wz-checkbox-group ${r}`,style:d,children:t})})};return n.Group=a,n.displayName="Checkbox",a.displayName="Checkbox.Group",n}));
@@ -1 +1 @@
1
- .wz-checkbox-group{flex-direction:column;gap:12px;display:inline-flex}.wz-checkbox-group.wz-checkbox-group--horizontal{flex-direction:row;align-items:center}.wz-checkbox-wrapper{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;outline:none;align-items:center;padding:8px 0;font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;transition:all .2s ease-in-out;display:inline-flex;position:relative}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-inner{width:16px;height:16px}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-label{margin-left:8px;font-size:13px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-inner{width:18px;height:18px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-label{margin-left:12px;font-size:14px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-inner{width:20px;height:20px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-label{margin-left:16px;font-size:16px}.wz-checkbox-wrapper.wz-checkbox--disabled{cursor:not-allowed;opacity:.6}.wz-checkbox-wrapper.wz-checkbox--disabled .wz-checkbox-inner{background-color:var(--wz-disabled-bg,#f5f7fa);border-color:var(--wz-disabled-border,#e4e7ed)}.wz-checkbox-wrapper.wz-checkbox--disabled .wz-checkbox-label{color:var(--wz-disabled-color,#c0c4cc)}.wz-checkbox-input{opacity:0;z-index:-1;width:0;height:0;margin:0;padding:0;position:absolute}.wz-checkbox-inner{border:1.5px solid var(--wz-border-color-base,#dcdfe6);background-color:var(--wz-bg-color-white,#fff);border-radius:2px;transition:all .2s cubic-bezier(.4,0,.2,1);display:inline-block;position:relative;box-shadow:0 1px 2px #0000000d}.wz-checkbox-inner:after{content:"";opacity:0;pointer-events:none;border:2px solid #fff;border-width:0 2px 2px 0;width:6px;height:12px;transition:all .2s cubic-bezier(.4,0,.2,1);display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-60%)scale(.7)rotate(45deg)}.wz-checkbox-input:checked+.wz-checkbox-inner{border-color:var(--wz-primary-color,#22c94d);background-color:var(--wz-primary-color,#22c94d);box-shadow:0 2px 4px #22c94d33}.wz-checkbox-input:checked+.wz-checkbox-inner:after{opacity:1;transform:translate(-50%,-60%)scale(1)rotate(45deg)}.wz-checkbox-input:focus+.wz-checkbox-inner{border-color:var(--wz-primary-color,#22c94d);box-shadow:0 0 0 3px #22c94d26}.wz-checkbox-wrapper:hover .wz-checkbox-inner{border-color:var(--wz-primary-color,#22c94d);box-shadow:0 2px 4px #22c94d1a}.wz-checkbox-label{color:var(--wz-text-color-primary,#333);font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;line-height:1.5;transition:color .2s}.wz-checkbox-wrapper:hover .wz-checkbox-label{color:var(--wz-primary-color,#22c94d)}@media screen and (max-width:767px){.wz-checkbox-group{gap:8px}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-label{font-size:14px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-label{font-size:15px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-label{font-size:16px}}
1
+ .wz-checkbox-group{flex-direction:column;gap:12px;display:inline-flex}.wz-checkbox-group.wz-checkbox-group--horizontal{flex-direction:row;align-items:center}.wz-checkbox-wrapper{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;outline:none;align-items:center;padding:8px 0;font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;transition:all .2s ease-in-out;display:inline-flex;position:relative}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-inner{font-size:16px}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-label{margin-left:8px;font-size:13px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-inner{font-size:18px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-label{margin-left:12px;font-size:14px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-inner{font-size:20px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-label{margin-left:16px;font-size:16px}.wz-checkbox-wrapper.wz-checkbox--disabled{cursor:not-allowed;opacity:.6}.wz-checkbox-wrapper.wz-checkbox--disabled .wz-checkbox-label{color:var(--wz-disabled-color,#c0c4cc)}.wz-checkbox-input{opacity:0;z-index:-1;width:0;height:0;margin:0;padding:0;position:absolute}.wz-checkbox-inner{color:var(--wz-border-color-base,#dcdfe6);justify-content:center;align-items:center;transition:all .2s cubic-bezier(.4,0,.2,1);display:inline-flex;position:relative}.wz-checkbox-input:checked+.wz-checkbox-inner,.wz-checkbox-input:focus+.wz-checkbox-inner{color:var(--wz-primary-color,#22c94d)}.wz-checkbox-wrapper:hover .wz-checkbox-inner{color:var(--wz-primary-color,#22c94d);opacity:.8}.wz-checkbox-label{color:var(--wz-text-color-primary,#333);font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;line-height:1.5;transition:color .2s}.wz-checkbox-wrapper:hover .wz-checkbox-label{color:var(--wz-primary-color,#22c94d)}
@@ -1 +1 @@
1
- .wz-checkbox-group{flex-direction:column;gap:12px;display:inline-flex}.wz-checkbox-group.wz-checkbox-group--horizontal{flex-direction:row;align-items:center}.wz-checkbox-wrapper{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;outline:none;align-items:center;padding:8px 0;font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;transition:all .2s ease-in-out;display:inline-flex;position:relative}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-inner{width:16px;height:16px}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-label{margin-left:8px;font-size:13px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-inner{width:18px;height:18px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-label{margin-left:12px;font-size:14px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-inner{width:20px;height:20px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-label{margin-left:16px;font-size:16px}.wz-checkbox-wrapper.wz-checkbox--disabled{cursor:not-allowed;opacity:.6}.wz-checkbox-wrapper.wz-checkbox--disabled .wz-checkbox-inner{background-color:var(--wz-disabled-bg,#f5f7fa);border-color:var(--wz-disabled-border,#e4e7ed)}.wz-checkbox-wrapper.wz-checkbox--disabled .wz-checkbox-label{color:var(--wz-disabled-color,#c0c4cc)}.wz-checkbox-input{opacity:0;z-index:-1;width:0;height:0;margin:0;padding:0;position:absolute}.wz-checkbox-inner{border:1.5px solid var(--wz-border-color-base,#dcdfe6);background-color:var(--wz-bg-color-white,#fff);border-radius:2px;transition:all .2s cubic-bezier(.4,0,.2,1);display:inline-block;position:relative;box-shadow:0 1px 2px #0000000d}.wz-checkbox-inner:after{content:"";opacity:0;pointer-events:none;border:2px solid #fff;border-width:0 2px 2px 0;width:6px;height:12px;transition:all .2s cubic-bezier(.4,0,.2,1);display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-60%)scale(.7)rotate(45deg)}.wz-checkbox-input:checked+.wz-checkbox-inner{border-color:var(--wz-primary-color,#22c94d);background-color:var(--wz-primary-color,#22c94d);box-shadow:0 2px 4px #22c94d33}.wz-checkbox-input:checked+.wz-checkbox-inner:after{opacity:1;transform:translate(-50%,-60%)scale(1)rotate(45deg)}.wz-checkbox-input:focus+.wz-checkbox-inner{border-color:var(--wz-primary-color,#22c94d);box-shadow:0 0 0 3px #22c94d26}.wz-checkbox-wrapper:hover .wz-checkbox-inner{border-color:var(--wz-primary-color,#22c94d);box-shadow:0 2px 4px #22c94d1a}.wz-checkbox-label{color:var(--wz-text-color-primary,#333);font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;line-height:1.5;transition:color .2s}.wz-checkbox-wrapper:hover .wz-checkbox-label{color:var(--wz-primary-color,#22c94d)}@media screen and (max-width:767px){.wz-checkbox-group{gap:8px}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-label{font-size:14px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-label{font-size:15px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-label{font-size:16px}}
1
+ .wz-checkbox-group{flex-direction:column;gap:12px;display:inline-flex}.wz-checkbox-group.wz-checkbox-group--horizontal{flex-direction:row;align-items:center}.wz-checkbox-wrapper{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;outline:none;align-items:center;padding:8px 0;font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;transition:all .2s ease-in-out;display:inline-flex;position:relative}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-inner{font-size:16px}.wz-checkbox-wrapper.wz-checkbox--small .wz-checkbox-label{margin-left:8px;font-size:13px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-inner{font-size:18px}.wz-checkbox-wrapper.wz-checkbox--medium .wz-checkbox-label{margin-left:12px;font-size:14px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-inner{font-size:20px}.wz-checkbox-wrapper.wz-checkbox--large .wz-checkbox-label{margin-left:16px;font-size:16px}.wz-checkbox-wrapper.wz-checkbox--disabled{cursor:not-allowed;opacity:.6}.wz-checkbox-wrapper.wz-checkbox--disabled .wz-checkbox-label{color:var(--wz-disabled-color,#c0c4cc)}.wz-checkbox-input{opacity:0;z-index:-1;width:0;height:0;margin:0;padding:0;position:absolute}.wz-checkbox-inner{color:var(--wz-border-color-base,#dcdfe6);justify-content:center;align-items:center;transition:all .2s cubic-bezier(.4,0,.2,1);display:inline-flex;position:relative}.wz-checkbox-input:checked+.wz-checkbox-inner,.wz-checkbox-input:focus+.wz-checkbox-inner{color:var(--wz-primary-color,#22c94d)}.wz-checkbox-wrapper:hover .wz-checkbox-inner{color:var(--wz-primary-color,#22c94d);opacity:.8}.wz-checkbox-label{color:var(--wz-text-color-primary,#333);font-family:"Alibaba PuHuiTi 2.0",Alibaba-PuHuiTi-Regular,PingFang SC,Microsoft YaHei,Arial,sans-serif;line-height:1.5;transition:color .2s}.wz-checkbox-wrapper:hover .wz-checkbox-label{color:var(--wz-primary-color,#22c94d)}.wz-icon{justify-content:center;align-items:center;transition:color .2s ease-in-out;display:inline-flex}.wz-icon-home:before{content:""}.wz-icon-search:before{content:""}.wz-icon-person:before{content:""}.wz-icon-settings:before{content:""}.wz-icon-notifications:before{content:""}.wz-icon-message:before{content:""}.wz-icon-favorite:before{content:""}.wz-icon-star:before{content:""}.wz-icon-close:before{content:""}.wz-icon-check:before{content:""}.wz-icon-arrow-back:before{content:""}.wz-icon-arrow-forward:before{content:""}.wz-icon-menu:before{content:""}.wz-icon-more:before{content:""}.wz-icon-add:before{content:""}.wz-icon-edit:before{content:""}.wz-icon-delete:before{content:""}.wz-icon-share:before{content:""}.wz-icon-download:before{content:""}.wz-icon-upload:before{content:""}.wz-icon-refresh:before{content:""}.wz-icon-help:before{content:""}.wz-icon-info:before{content:""}.wz-icon-warning:before{content:""}.wz-icon-error:before{content:""}.wz-icon-success:before{content:""}
@@ -1 +1 @@
1
- .wz-date-picker{background:var(--wz-date-picker-bg,#f5f5f5);-webkit-user-select:none;user-select:none;touch-action:pan-y;width:100%;position:relative;overflow:hidden}.wz-date-picker-columns{flex-direction:row;width:100%;height:100%;display:flex}.wz-date-picker-list{-webkit-overflow-scrolling:touch;scrollbar-width:none;z-index:2;flex:1 1 0;min-width:0;position:relative;overflow-y:scroll}.wz-date-picker-list::-webkit-scrollbar{display:none}.wz-date-picker-item{color:var(--wz-date-picker-item-color,#bbb);background:0 0;justify-content:center;align-items:center;font-family:"阿里巴巴普惠体 2.0";font-size:20px;font-weight:600;transition:color .2s;display:flex}.wz-date-picker-item.active{color:var(--wz-date-picker-active-color,#000)}.wz-date-picker-mask{z-index:3;pointer-events:none;position:absolute;left:0;right:0}.wz-date-picker-mask-top{background:linear-gradient(to bottom,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);top:0}.wz-date-picker-mask-bottom{background:linear-gradient(to top,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);bottom:0}.wz-date-picker-indicator{z-index:1;pointer-events:none;border-radius:var(--wz-date-picker-radius,10px);background:var(--wz-date-picker-active-bg,#fff);position:absolute;top:50%;left:10px;right:10px;transform:translateY(-50%)}
1
+ .wz-date-picker{background:var(--wz-date-picker-bg,#f5f5f5);-webkit-user-select:none;user-select:none;touch-action:pan-y;width:100%;position:relative;overflow:hidden}.wz-date-picker-columns{flex-direction:row;width:100%;height:100%;display:flex}.wz-date-picker-list{-webkit-overflow-scrolling:touch;scrollbar-width:none;z-index:2;flex:1 1 0;min-width:0;position:relative;overflow-y:scroll}.wz-date-picker-list::-webkit-scrollbar{display:none}.wz-date-picker-item{color:var(--wz-date-picker-item-color,#bbb);background:0 0;justify-content:center;align-items:center;font-family:"阿里巴巴普惠体 2.0";font-size:20px;font-weight:600;transition:color .2s;display:flex}.wz-date-picker-item.active{color:var(--wz-date-picker-active-color,#000)}.wz-date-picker-mask{z-index:3;pointer-events:none;position:absolute;left:0;right:0}.wz-date-picker-mask-top{background:linear-gradient(to bottom,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);top:0}.wz-date-picker-mask-bottom{background:linear-gradient(to top,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);bottom:0}.wz-date-picker-indicator{z-index:1;pointer-events:none;border-radius:var(--wz-date-picker-radius,10px);background:var(--wz-date-picker-active-bg,#fff);position:absolute;top:50%;left:0;right:0;transform:translateY(-50%)}
@@ -1 +1 @@
1
- .wz-date-picker{background:var(--wz-date-picker-bg,#f5f5f5);-webkit-user-select:none;user-select:none;touch-action:pan-y;width:100%;position:relative;overflow:hidden}.wz-date-picker-columns{flex-direction:row;width:100%;height:100%;display:flex}.wz-date-picker-list{-webkit-overflow-scrolling:touch;scrollbar-width:none;z-index:2;flex:1 1 0;min-width:0;position:relative;overflow-y:scroll}.wz-date-picker-list::-webkit-scrollbar{display:none}.wz-date-picker-item{color:var(--wz-date-picker-item-color,#bbb);background:0 0;justify-content:center;align-items:center;font-family:"阿里巴巴普惠体 2.0";font-size:20px;font-weight:600;transition:color .2s;display:flex}.wz-date-picker-item.active{color:var(--wz-date-picker-active-color,#000)}.wz-date-picker-mask{z-index:3;pointer-events:none;position:absolute;left:0;right:0}.wz-date-picker-mask-top{background:linear-gradient(to bottom,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);top:0}.wz-date-picker-mask-bottom{background:linear-gradient(to top,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);bottom:0}.wz-date-picker-indicator{z-index:1;pointer-events:none;border-radius:var(--wz-date-picker-radius,10px);background:var(--wz-date-picker-active-bg,#fff);position:absolute;top:50%;left:10px;right:10px;transform:translateY(-50%)}
1
+ .wz-date-picker{background:var(--wz-date-picker-bg,#f5f5f5);-webkit-user-select:none;user-select:none;touch-action:pan-y;width:100%;position:relative;overflow:hidden}.wz-date-picker-columns{flex-direction:row;width:100%;height:100%;display:flex}.wz-date-picker-list{-webkit-overflow-scrolling:touch;scrollbar-width:none;z-index:2;flex:1 1 0;min-width:0;position:relative;overflow-y:scroll}.wz-date-picker-list::-webkit-scrollbar{display:none}.wz-date-picker-item{color:var(--wz-date-picker-item-color,#bbb);background:0 0;justify-content:center;align-items:center;font-family:"阿里巴巴普惠体 2.0";font-size:20px;font-weight:600;transition:color .2s;display:flex}.wz-date-picker-item.active{color:var(--wz-date-picker-active-color,#000)}.wz-date-picker-mask{z-index:3;pointer-events:none;position:absolute;left:0;right:0}.wz-date-picker-mask-top{background:linear-gradient(to bottom,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);top:0}.wz-date-picker-mask-bottom{background:linear-gradient(to top,var(--wz-date-picker-bg,#f5f5f5)20%,#f5f5f500);bottom:0}.wz-date-picker-indicator{z-index:1;pointer-events:none;border-radius:var(--wz-date-picker-radius,10px);background:var(--wz-date-picker-active-bg,#fff);position:absolute;top:50%;left:0;right:0;transform:translateY(-50%)}
@@ -149,6 +149,33 @@ const DatePicker = ({
149
149
  /* @__PURE__ */ jsx("div", { className: "wz-date-picker-mask wz-date-picker-mask-bottom", style: { height: itemHeight } })
150
150
  ] });
151
151
  };
152
+ const Icon = ({
153
+ name,
154
+ size = 24,
155
+ color = "currentColor",
156
+ className = "",
157
+ style,
158
+ onClick,
159
+ type = "yunying"
160
+ // 默认使用yunying图标库
161
+ }) => {
162
+ const iconStyle = {
163
+ fontSize: typeof size === "number" ? `${size}px` : size,
164
+ color,
165
+ ...style
166
+ };
167
+ const iconFontClass = `iconfont-${type}`;
168
+ const iconPrefix = "icon-";
169
+ const iconClass = `${iconPrefix}${name}`;
170
+ return /* @__PURE__ */ jsx(
171
+ "i",
172
+ {
173
+ className: `wz-icon ${iconFontClass} ${iconClass} ${className}`,
174
+ style: iconStyle,
175
+ onClick
176
+ }
177
+ );
178
+ };
152
179
  const DateRangePicker = ({
153
180
  value,
154
181
  onChange,
@@ -157,7 +184,10 @@ const DateRangePicker = ({
157
184
  startLabel = "开始时间",
158
185
  endLabel = "结束时间",
159
186
  className = "",
160
- style
187
+ style,
188
+ showLongTerm = false,
189
+ longTermLabel = "长期有效",
190
+ longTermValue = "9999-12-31"
161
191
  }) => {
162
192
  const todayStr = React.useMemo(() => {
163
193
  const today = /* @__PURE__ */ new Date();
@@ -169,6 +199,7 @@ const DateRangePicker = ({
169
199
  const [innerValue, setInnerValue] = useState(value || [todayStr, todayStr]);
170
200
  const range = value || innerValue;
171
201
  const [active, setActive] = useState("start");
202
+ const isLongTerm = range[1] === longTermValue;
172
203
  const handleSelect = (val) => {
173
204
  if (active === "start") {
174
205
  const newRange = [val, range[1] && range[1] >= val ? range[1] : val];
@@ -180,6 +211,17 @@ const DateRangePicker = ({
180
211
  onChange == null ? void 0 : onChange(newRange);
181
212
  }
182
213
  };
214
+ const handleLongTermToggle = () => {
215
+ if (isLongTerm) {
216
+ const newRange = [range[0], range[0]];
217
+ setInnerValue(newRange);
218
+ onChange == null ? void 0 : onChange(newRange);
219
+ } else {
220
+ const newRange = [range[0], longTermValue];
221
+ setInnerValue(newRange);
222
+ onChange == null ? void 0 : onChange(newRange);
223
+ }
224
+ };
183
225
  return /* @__PURE__ */ jsxs("div", { className: `wz-date-range-picker ${className}`, style, children: [
184
226
  /* @__PURE__ */ jsxs("div", { className: "wz-date-range-picker-label-row", children: [
185
227
  /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-label", children: startLabel }),
@@ -195,14 +237,28 @@ const DateRangePicker = ({
195
237
  }
196
238
  ) }),
197
239
  /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-sep", children: "至" }),
198
- /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-col", children: /* @__PURE__ */ jsx(
199
- "div",
200
- {
201
- className: `wz-date-range-picker-value${active === "end" ? " active" : ""}`,
202
- onClick: () => setActive("end"),
203
- children: range[1] || "请选择"
204
- }
205
- ) })
240
+ /* @__PURE__ */ jsxs("div", { className: "wz-date-range-picker-col", children: [
241
+ /* @__PURE__ */ jsx(
242
+ "div",
243
+ {
244
+ className: `wz-date-range-picker-value${active === "end" ? " active" : ""}${isLongTerm ? " disabled" : ""}`,
245
+ onClick: () => !isLongTerm && setActive("end"),
246
+ children: isLongTerm ? longTermLabel : range[1] || "请选择"
247
+ }
248
+ ),
249
+ showLongTerm && /* @__PURE__ */ jsxs("div", { className: "wz-date-range-picker-long-term", onClick: handleLongTermToggle, children: [
250
+ /* @__PURE__ */ jsx(
251
+ Icon,
252
+ {
253
+ name: isLongTerm ? "radio-sel" : "radio-nor",
254
+ type: "yunying",
255
+ size: 20,
256
+ color: isLongTerm ? "var(--active-color)" : "#ccc"
257
+ }
258
+ ),
259
+ /* @__PURE__ */ jsx("span", { className: "wz-date-range-picker-long-term-text", children: longTermLabel })
260
+ ] })
261
+ ] })
206
262
  ] }),
207
263
  /* @__PURE__ */ jsx("div", { className: "wz-date-range-picker-picker", children: /* @__PURE__ */ jsx(
208
264
  DatePicker,
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["react/jsx-runtime","react"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).DateRangePicker=t(e.jsxRuntime,e.React)}(this,(function(e,t){"use strict";const r=({value:r,onChange:n,min:a="1970-01-01",max:c="2100-12-31",columns:s=["year","month","day"],itemHeight:l=48,className:o="",style:u})=>{const i=new Date,[d,p,h]=r?r.split("-").map(Number):[i.getFullYear(),i.getMonth()+1,i.getDate()],m=Number(a.split("-")[0]),g=Number(c.split("-")[0]),f=t.useMemo((()=>((e,t)=>{const r=[];for(let n=e;n<=t;n++)r.push(n.toString());return r})(m,g)),[m,g]),[v,y]=t.useState(d),[S,N]=t.useState(p),[x,k]=t.useState(h),$=Array.from({length:12},((e,t)=>(t+1).toString().padStart(2,"0"))),b=((e,t)=>{const r=new Date(e,t,0).getDate();return Array.from({length:r},((e,t)=>(t+1).toString().padStart(2,"0")))})(v,S),j=t.useRef(null),w=t.useRef(null),T=t.useRef(null),z=t.useRef(0),M=t.useRef(0),R=t.useRef(!1),D=t.useRef(null);t.useLayoutEffect((()=>{j.current&&j.current.scrollTo({top:(v-m)*l,behavior:"auto"})}),[v,l,m]),t.useLayoutEffect((()=>{w.current&&w.current.scrollTo({top:(S-1)*l,behavior:"auto"})}),[S,l]),t.useLayoutEffect((()=>{T.current&&T.current.scrollTo({top:(x-1)*l,behavior:"auto"})}),[x,l]);const C=e=>t=>{var r,n,a;R.current=!0,D.current=e,z.current=t.touches[0].clientY;let c=0;"year"===e&&(c=(null==(r=j.current)?void 0:r.scrollTop)||0),"month"===e&&(c=(null==(n=w.current)?void 0:n.scrollTop)||0),"day"===e&&(c=(null==(a=T.current)?void 0:a.scrollTop)||0),M.current=c},E=e=>{if(!R.current||!D.current)return;const t=e.touches[0].clientY-z.current;"year"===D.current&&j.current&&(j.current.scrollTop=M.current-t),"month"===D.current&&w.current&&(w.current.scrollTop=M.current-t),"day"===D.current&&T.current&&(T.current.scrollTop=M.current-t)},L=()=>{if(R.current&&D.current){if("year"===D.current&&j.current){const e=Math.round(j.current.scrollTop/l);y(Number(f[e])),null==n||n(`${f[e]}-${S.toString().padStart(2,"0")}-${x.toString().padStart(2,"0")}`)}if("month"===D.current&&w.current){const e=Math.round(w.current.scrollTop/l);N(Number($[e])),null==n||n(`${v}-${$[e]}-${x.toString().padStart(2,"0")}`)}if("day"===D.current&&T.current){const e=Math.round(T.current.scrollTop/l);k(Number(b[e])),null==n||n(`${v}-${S.toString().padStart(2,"0")}-${b[e]}`)}R.current=!1,D.current=null}},Y=e=>()=>{if(!R.current){if("year"===e&&j.current){const e=Math.round(j.current.scrollTop/l);y(Number(f[e])),null==n||n(`${f[e]}-${S.toString().padStart(2,"0")}-${x.toString().padStart(2,"0")}`)}if("month"===e&&w.current){const e=Math.round(w.current.scrollTop/l);N(Number($[e])),null==n||n(`${v}-${$[e]}-${x.toString().padStart(2,"0")}`)}if("day"===e&&T.current){const e=Math.round(T.current.scrollTop/l);k(Number(b[e])),null==n||n(`${v}-${S.toString().padStart(2,"0")}-${b[e]}`)}}};t.useEffect((()=>{if(r){const[e,t,n]=r.split("-").map(Number);y(e),N(t),k(n),j.current&&j.current.scrollTo({top:(e-m)*l,behavior:"auto"}),w.current&&w.current.scrollTo({top:(t-1)*l,behavior:"auto"}),T.current&&T.current.scrollTo({top:(n-1)*l,behavior:"auto"})}}),[r]);const q=(t,r,n,a)=>e.jsxs("div",{className:"wz-date-picker-list",ref:n,style:{height:3*l},onTouchStart:C(a),onTouchMove:E,onTouchEnd:L,onScroll:Y(a),children:[e.jsx("div",{style:{height:l}}),t.map(((t,n)=>e.jsx("div",{className:"wz-date-picker-item"+(n===r?" active":""),style:{height:l},children:"year"===a?`${t}年`:"month"===a?`${t}月`:`${t}日`},t))),e.jsx("div",{style:{height:l}})]});return e.jsxs("div",{className:`wz-date-picker ${o}`,style:u,children:[e.jsx("div",{className:"wz-date-picker-mask wz-date-picker-mask-top",style:{height:l}}),e.jsx("div",{className:"wz-date-picker-indicator",style:{height:l}}),e.jsxs("div",{className:"wz-date-picker-columns",children:[s.includes("year")&&q(f,v-m,j,"year"),s.includes("month")&&q($,S-1,w,"month"),s.includes("day")&&q(b,x-1,T,"day")]}),e.jsx("div",{className:"wz-date-picker-mask wz-date-picker-mask-bottom",style:{height:l}})]})};return({value:n,onChange:a,min:c="1970-01-01",max:s="2100-12-31",startLabel:l="开始时间",endLabel:o="结束时间",className:u="",style:i})=>{const d=t.useMemo((()=>{const e=new Date;return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}),[]),[p,h]=t.useState(n||[d,d]),m=n||p,[g,f]=t.useState("start");return e.jsxs("div",{className:`wz-date-range-picker ${u}`,style:i,children:[e.jsxs("div",{className:"wz-date-range-picker-label-row",children:[e.jsx("div",{className:"wz-date-range-picker-label",children:l}),e.jsx("div",{className:"wz-date-range-picker-label",children:o})]}),e.jsxs("div",{className:"wz-date-range-picker-row",children:[e.jsx("div",{className:"wz-date-range-picker-col",children:e.jsx("div",{className:"wz-date-range-picker-value"+("start"===g?" active":""),onClick:()=>f("start"),children:m[0]||"请选择"})}),e.jsx("div",{className:"wz-date-range-picker-sep",children:"至"}),e.jsx("div",{className:"wz-date-range-picker-col",children:e.jsx("div",{className:"wz-date-range-picker-value"+("end"===g?" active":""),onClick:()=>f("end"),children:m[1]||"请选择"})})]}),e.jsx("div",{className:"wz-date-range-picker-picker",children:e.jsx(r,{value:"start"===g?m[0]:m[1],onChange:e=>{if("start"===g){const t=[e,m[1]&&m[1]>=e?m[1]:e];h(t),null==a||a(t)}else{const t=[m[0],e&&e>=m[0]?e:m[0]];h(t),null==a||a(t)}},min:c,max:s})})]})}}));
1
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["react/jsx-runtime","react"],r):(e="undefined"!=typeof globalThis?globalThis:e||self).DateRangePicker=r(e.jsxRuntime,e.React)}(this,(function(e,r){"use strict";const t=({value:t,onChange:n,min:a="1970-01-01",max:c="2100-12-31",columns:s=["year","month","day"],itemHeight:l=48,className:o="",style:i})=>{const u=new Date,[d,m,p]=t?t.split("-").map(Number):[u.getFullYear(),u.getMonth()+1,u.getDate()],h=Number(a.split("-")[0]),g=Number(c.split("-")[0]),f=r.useMemo((()=>((e,r)=>{const t=[];for(let n=e;n<=r;n++)t.push(n.toString());return t})(h,g)),[h,g]),[y,v]=r.useState(d),[x,N]=r.useState(m),[$,k]=r.useState(p),S=Array.from({length:12},((e,r)=>(r+1).toString().padStart(2,"0"))),j=((e,r)=>{const t=new Date(e,r,0).getDate();return Array.from({length:t},((e,r)=>(r+1).toString().padStart(2,"0")))})(y,x),w=r.useRef(null),b=r.useRef(null),z=r.useRef(null),T=r.useRef(0),M=r.useRef(0),R=r.useRef(!1),C=r.useRef(null);r.useLayoutEffect((()=>{w.current&&w.current.scrollTo({top:(y-h)*l,behavior:"auto"})}),[y,l,h]),r.useLayoutEffect((()=>{b.current&&b.current.scrollTo({top:(x-1)*l,behavior:"auto"})}),[x,l]),r.useLayoutEffect((()=>{z.current&&z.current.scrollTo({top:($-1)*l,behavior:"auto"})}),[$,l]);const D=e=>r=>{var t,n,a;R.current=!0,C.current=e,T.current=r.touches[0].clientY;let c=0;"year"===e&&(c=(null==(t=w.current)?void 0:t.scrollTop)||0),"month"===e&&(c=(null==(n=b.current)?void 0:n.scrollTop)||0),"day"===e&&(c=(null==(a=z.current)?void 0:a.scrollTop)||0),M.current=c},L=e=>{if(!R.current||!C.current)return;const r=e.touches[0].clientY-T.current;"year"===C.current&&w.current&&(w.current.scrollTop=M.current-r),"month"===C.current&&b.current&&(b.current.scrollTop=M.current-r),"day"===C.current&&z.current&&(z.current.scrollTop=M.current-r)},E=()=>{if(R.current&&C.current){if("year"===C.current&&w.current){const e=Math.round(w.current.scrollTop/l);v(Number(f[e])),null==n||n(`${f[e]}-${x.toString().padStart(2,"0")}-${$.toString().padStart(2,"0")}`)}if("month"===C.current&&b.current){const e=Math.round(b.current.scrollTop/l);N(Number(S[e])),null==n||n(`${y}-${S[e]}-${$.toString().padStart(2,"0")}`)}if("day"===C.current&&z.current){const e=Math.round(z.current.scrollTop/l);k(Number(j[e])),null==n||n(`${y}-${x.toString().padStart(2,"0")}-${j[e]}`)}R.current=!1,C.current=null}},Y=e=>()=>{if(!R.current){if("year"===e&&w.current){const e=Math.round(w.current.scrollTop/l);v(Number(f[e])),null==n||n(`${f[e]}-${x.toString().padStart(2,"0")}-${$.toString().padStart(2,"0")}`)}if("month"===e&&b.current){const e=Math.round(b.current.scrollTop/l);N(Number(S[e])),null==n||n(`${y}-${S[e]}-${$.toString().padStart(2,"0")}`)}if("day"===e&&z.current){const e=Math.round(z.current.scrollTop/l);k(Number(j[e])),null==n||n(`${y}-${x.toString().padStart(2,"0")}-${j[e]}`)}}};r.useEffect((()=>{if(t){const[e,r,n]=t.split("-").map(Number);v(e),N(r),k(n),w.current&&w.current.scrollTo({top:(e-h)*l,behavior:"auto"}),b.current&&b.current.scrollTo({top:(r-1)*l,behavior:"auto"}),z.current&&z.current.scrollTo({top:(n-1)*l,behavior:"auto"})}}),[t]);const q=(r,t,n,a)=>e.jsxs("div",{className:"wz-date-picker-list",ref:n,style:{height:3*l},onTouchStart:D(a),onTouchMove:L,onTouchEnd:E,onScroll:Y(a),children:[e.jsx("div",{style:{height:l}}),r.map(((r,n)=>e.jsx("div",{className:"wz-date-picker-item"+(n===t?" active":""),style:{height:l},children:"year"===a?`${r}年`:"month"===a?`${r}月`:`${r}日`},r))),e.jsx("div",{style:{height:l}})]});return e.jsxs("div",{className:`wz-date-picker ${o}`,style:i,children:[e.jsx("div",{className:"wz-date-picker-mask wz-date-picker-mask-top",style:{height:l}}),e.jsx("div",{className:"wz-date-picker-indicator",style:{height:l}}),e.jsxs("div",{className:"wz-date-picker-columns",children:[s.includes("year")&&q(f,y-h,w,"year"),s.includes("month")&&q(S,x-1,b,"month"),s.includes("day")&&q(j,$-1,z,"day")]}),e.jsx("div",{className:"wz-date-picker-mask wz-date-picker-mask-bottom",style:{height:l}})]})},n=({name:r,size:t=24,color:n="currentColor",className:a="",style:c,onClick:s,type:l="yunying"})=>{const o={fontSize:"number"==typeof t?`${t}px`:t,color:n,...c},i=`iconfont-${l}`,u=`icon-${r}`;return e.jsx("i",{className:`wz-icon ${i} ${u} ${a}`,style:o,onClick:s})};return({value:a,onChange:c,min:s="1970-01-01",max:l="2100-12-31",startLabel:o="开始时间",endLabel:i="结束时间",className:u="",style:d,showLongTerm:m=!1,longTermLabel:p="长期有效",longTermValue:h="9999-12-31"})=>{const g=r.useMemo((()=>{const e=new Date;return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}),[]),[f,y]=r.useState(a||[g,g]),v=a||f,[x,N]=r.useState("start"),$=v[1]===h;return e.jsxs("div",{className:`wz-date-range-picker ${u}`,style:d,children:[e.jsxs("div",{className:"wz-date-range-picker-label-row",children:[e.jsx("div",{className:"wz-date-range-picker-label",children:o}),e.jsx("div",{className:"wz-date-range-picker-label",children:i})]}),e.jsxs("div",{className:"wz-date-range-picker-row",children:[e.jsx("div",{className:"wz-date-range-picker-col",children:e.jsx("div",{className:"wz-date-range-picker-value"+("start"===x?" active":""),onClick:()=>N("start"),children:v[0]||"请选择"})}),e.jsx("div",{className:"wz-date-range-picker-sep",children:"至"}),e.jsxs("div",{className:"wz-date-range-picker-col",children:[e.jsx("div",{className:`wz-date-range-picker-value${"end"===x?" active":""}${$?" disabled":""}`,onClick:()=>!$&&N("end"),children:$?p:v[1]||"请选择"}),m&&e.jsxs("div",{className:"wz-date-range-picker-long-term",onClick:()=>{if($){const e=[v[0],v[0]];y(e),null==c||c(e)}else{const e=[v[0],h];y(e),null==c||c(e)}},children:[e.jsx(n,{name:$?"radio-sel":"radio-nor",type:"yunying",size:20,color:$?"var(--active-color)":"#ccc"}),e.jsx("span",{className:"wz-date-range-picker-long-term-text",children:p})]})]})]}),e.jsx("div",{className:"wz-date-range-picker-picker",children:e.jsx(t,{value:"start"===x?v[0]:v[1],onChange:e=>{if("start"===x){const r=[e,v[1]&&v[1]>=e?v[1]:e];y(r),null==c||c(r)}else{const r=[v[0],e&&e>=v[0]?e:v[0]];y(r),null==c||c(r)}},min:s,max:l})})]})}}));
@@ -1 +1 @@
1
- .wz-date-range-picker-row{justify-content:center;align-items:center;gap:16px;display:flex}.wz-date-range-picker-col{flex-direction:column;flex:1;align-items:center;display:flex}.wz-date-range-picker-label-row{justify-content:space-between;column-gap:65px;margin-bottom:8px;display:flex}.wz-date-range-picker-label{text-align:center;color:var(--wz-text-color-primary,#333);flex:1;font-size:15px}.wz-date-range-picker-value{color:var(--wz-text-color-placeholder,#bbb);background:var(--wz-bg-color-white,#fff);text-align:center;cursor:pointer;-webkit-tap-highlight-color:transparent;border:1.5px solid #0000;border-radius:8px;min-width:100%;height:44px;font-size:16px;line-height:44px;transition:all .2s}.wz-date-range-picker-value.active{color:var(--wz-primary-color,#0599f7);border-color:var(--wz-primary-color,#0599f7);background:#0599f71a;font-weight:700}.wz-date-range-picker-sep{color:var(--wz-text-color-primary,#333);align-items:center;height:44px;margin:0 8px;font-size:14px;display:flex}.wz-date-range-picker-picker{margin-top:8px}
1
+ .wz-date-range-picker{--active-color:var(--wz-primary-color,#0599f7);--active-bg:#0599f71a;--active-border:var(--wz-primary-color,#0599f7);--label-color:var(--wz-text-color-primary,#333);--value-color:var(--wz-text-color-placeholder,#bbb);--value-bg:var(--wz-bg-color-white,#fff);--sep-color:var(--wz-text-color-primary,#333)}.wz-date-range-picker-row{justify-content:center;align-items:flex-start;gap:16px;display:flex}.wz-date-range-picker-col{flex-direction:column;flex:1;align-items:stretch;display:flex}.wz-date-range-picker-label-row{justify-content:space-between;column-gap:65px;margin-bottom:8px;display:flex}.wz-date-range-picker-label{text-align:center;color:var(--label-color);flex:1;font-size:15px}.wz-date-range-picker-value{color:var(--value-color);background:var(--value-bg);text-align:center;cursor:pointer;-webkit-tap-highlight-color:transparent;border:1.5px solid #0000;border-radius:8px;min-width:100%;height:44px;font-size:16px;line-height:44px;transition:all .2s}.wz-date-range-picker-value.active{color:var(--active-color);background:var(--active-bg);border-color:var(--active-border);font-weight:700}.wz-date-range-picker-sep{color:var(--sep-color);flex-shrink:0;align-items:center;height:44px;margin:0 8px;font-size:14px;display:flex}.wz-date-range-picker-picker{margin-top:8px}.wz-date-range-picker-long-term{cursor:pointer;-webkit-tap-highlight-color:transparent;justify-content:flex-start;align-items:center;gap:6px;margin-top:12px;display:flex}.wz-date-range-picker-long-term-text{color:var(--label-color);font-size:14px}.wz-date-range-picker-value.disabled{opacity:.6;cursor:not-allowed}