bj-web-components 0.2.34 → 0.2.36

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 (111) hide show
  1. package/README.md +10 -1
  2. package/dist/index.js +58 -1
  3. package/dist/index.mjs +1 -29
  4. package/dist/miniapp.js +1 -1
  5. package/dist/miniapp.mjs +0 -1
  6. package/dist/mobile.js +1 -1
  7. package/dist/mobile.mjs +0 -1
  8. package/dist/react.js +1 -1
  9. package/dist/react.mjs +0 -1
  10. package/dist/shared.js +1 -1
  11. package/dist/shared.mjs +0 -1
  12. package/dist/style.css +1 -1
  13. package/dist/web/BasicInput/BInput.js +278 -1
  14. package/dist/web/BasicInput/BInput.mjs +263 -164
  15. package/dist/web/BasicInput/utils.js +47 -1
  16. package/dist/web/BasicInput/utils.mjs +22 -20
  17. package/dist/web/CategoryDropdown/CategoryDropdown.js +376 -1
  18. package/dist/web/CategoryDropdown/CategoryDropdown.mjs +355 -235
  19. package/dist/web/CheckBox/BCheckBox.js +176 -1
  20. package/dist/web/CheckBox/BCheckBox.mjs +169 -98
  21. package/dist/web/CheckBox/Group.js +111 -1
  22. package/dist/web/CheckBox/Group.mjs +104 -64
  23. package/dist/web/CheckBox/context.js +8 -1
  24. package/dist/web/CheckBox/context.mjs +2 -4
  25. package/dist/web/CheckBox/index.js +11 -1
  26. package/dist/web/CheckBox/index.mjs +2 -4
  27. package/dist/web/Dropdown/BDropdown.js +265 -1
  28. package/dist/web/Dropdown/BDropdown.mjs +233 -133
  29. package/dist/web/EmptyInputBox/EmptyInputBox.js +89 -1
  30. package/dist/web/EmptyInputBox/EmptyInputBox.mjs +85 -72
  31. package/dist/web/FileCard/FileCard.js +414 -1
  32. package/dist/web/FileCard/FileCard.mjs +400 -116
  33. package/dist/web/Icon/Icon.js +82 -1
  34. package/dist/web/Icon/Icon.mjs +78 -8
  35. package/dist/web/Input/Input.js +230 -1
  36. package/dist/web/Input/Input.mjs +219 -164
  37. package/dist/web/InputNumber/BInputNumber.js +271 -1
  38. package/dist/web/InputNumber/BInputNumber.mjs +254 -189
  39. package/dist/web/InputNumber/StepHandler.js +112 -1
  40. package/dist/web/InputNumber/StepHandler.mjs +102 -50
  41. package/dist/web/InputNumber/hooks/useCursor.js +38 -1
  42. package/dist/web/InputNumber/hooks/useCursor.mjs +31 -34
  43. package/dist/web/InputNumber/hooks/useFrame.js +15 -1
  44. package/dist/web/InputNumber/hooks/useFrame.mjs +8 -5
  45. package/dist/web/InputNumber/utils/decimal.js +163 -1
  46. package/dist/web/InputNumber/utils/decimal.mjs +114 -79
  47. package/dist/web/MobileDrawer/BMobileDrawer.js +238 -1
  48. package/dist/web/MobileDrawer/BMobileDrawer.mjs +221 -139
  49. package/dist/web/Modal/Modal.js +148 -1
  50. package/dist/web/Modal/Modal.mjs +143 -79
  51. package/dist/web/OverlayScrollbar/BOverlayScrollbar.js +273 -1
  52. package/dist/web/OverlayScrollbar/BOverlayScrollbar.mjs +262 -143
  53. package/dist/web/Pagination/Pagination.js +352 -1
  54. package/dist/web/Pagination/Pagination.mjs +342 -247
  55. package/dist/web/ProductField/ProductField.js +443 -1
  56. package/dist/web/ProductField/ProductField.mjs +423 -208
  57. package/dist/web/ProductField/arrow-up.svg.js +4 -1
  58. package/dist/web/ProductField/arrow-up.svg.mjs +2 -4
  59. package/dist/web/ProductField/checkbox-no.svg.js +4 -1
  60. package/dist/web/ProductField/checkbox-no.svg.mjs +2 -4
  61. package/dist/web/ProductField/checkbox-ok.svg.js +4 -1
  62. package/dist/web/ProductField/checkbox-ok.svg.mjs +2 -4
  63. package/dist/web/ProductField/no_data_light.svg.js +4 -1
  64. package/dist/web/ProductField/no_data_light.svg.mjs +2 -4
  65. package/dist/web/ProductField/search.svg.js +4 -1
  66. package/dist/web/ProductField/search.svg.mjs +2 -4
  67. package/dist/web/ProductField/sort.svg.js +4 -1
  68. package/dist/web/ProductField/sort.svg.mjs +2 -4
  69. package/dist/web/Radio/BRadio.js +151 -1
  70. package/dist/web/Radio/BRadio.mjs +147 -75
  71. package/dist/web/Radio/Button.js +54 -1
  72. package/dist/web/Radio/Button.mjs +51 -8
  73. package/dist/web/Radio/Group.js +97 -1
  74. package/dist/web/Radio/Group.mjs +92 -76
  75. package/dist/web/Radio/context.js +10 -1
  76. package/dist/web/Radio/context.mjs +3 -5
  77. package/dist/web/Radio/index.js +13 -1
  78. package/dist/web/Radio/index.mjs +2 -4
  79. package/dist/web/SkuInputCard/SkuInputCard.js +427 -1
  80. package/dist/web/SkuInputCard/SkuInputCard.mjs +414 -219
  81. package/dist/web/SkuInputCard/spin_loading_red.gif.js +4 -1
  82. package/dist/web/SkuInputCard/spin_loading_red.gif.mjs +2 -4
  83. package/dist/web/Switch/Switch.js +114 -1
  84. package/dist/web/Switch/Switch.mjs +109 -58
  85. package/dist/web/Table/BTable.js +1049 -1
  86. package/dist/web/Table/BTable.mjs +1011 -667
  87. package/dist/web/Table/Column.js +6 -1
  88. package/dist/web/Table/Column.mjs +1 -3
  89. package/dist/web/Table/ColumnGroup.js +6 -1
  90. package/dist/web/Table/ColumnGroup.mjs +1 -3
  91. package/dist/web/Table/utils/columns.js +116 -1
  92. package/dist/web/Table/utils/columns.mjs +103 -37
  93. package/dist/web/Table/utils/sortFilter.js +145 -1
  94. package/dist/web/Table/utils/sortFilter.mjs +129 -57
  95. package/dist/web/Tabs/BTabs.js +260 -1
  96. package/dist/web/Tabs/BTabs.mjs +239 -122
  97. package/dist/web/Tabs/TabPane.js +19 -1
  98. package/dist/web/Tabs/TabPane.mjs +1 -4
  99. package/dist/web/Tooltip/ConfirmTooltip.js +53 -1
  100. package/dist/web/Tooltip/ConfirmTooltip.mjs +47 -22
  101. package/dist/web/Tooltip/ContentTooltip.js +156 -1
  102. package/dist/web/Tooltip/ContentTooltip.mjs +145 -76
  103. package/dist/web/Tooltip/ProgressTooltip.js +56 -1
  104. package/dist/web/Tooltip/ProgressTooltip.mjs +50 -31
  105. package/dist/web/Tooltip/TooltipWrapper.js +19 -1
  106. package/dist/web/Tooltip/TooltipWrapper.mjs +13 -9
  107. package/dist/web/Tooltip/useAutoPlacement.js +65 -1
  108. package/dist/web/Tooltip/useAutoPlacement.mjs +52 -24
  109. package/dist/web.js +58 -1
  110. package/dist/web.mjs +1 -29
  111. package/package.json +3 -1
@@ -1,10 +1,80 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
2
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
4
+ import { jsx as i } from "react/jsx-runtime";
2
5
  /* empty css */
3
- const t = ({ type: r, style: e, onClick: i, className: n, ...c }) => {
4
- const s = n ? `bu-icon ${n}` : "bu-icon";
5
- return /* @__PURE__ */ o("svg", { style: e, className: s, "aria-hidden": "true", onClick: i, ...c, children: /* @__PURE__ */ o("use", { xlinkHref: `#${r}` }) });
6
- };
7
- t.displayName = "BuIcon";
8
- export {
9
- t as default
6
+ var v = Object.defineProperty,
7
+ O = Object.defineProperties,
8
+ d = Object.getOwnPropertyDescriptors,
9
+ n = Object.getOwnPropertySymbols,
10
+ s = Object.prototype.hasOwnProperty,
11
+ f = Object.prototype.propertyIsEnumerable,
12
+ l = function l(r, e, t) {
13
+ return e in r ? v(r, e, {
14
+ enumerable: !0,
15
+ configurable: !0,
16
+ writable: !0,
17
+ value: t
18
+ }) : r[e] = t;
19
+ },
20
+ m = function m(r, e) {
21
+ for (var t in e || (e = {})) s.call(e, t) && l(r, t, e[t]);
22
+ if (n) {
23
+ var _iterator = _createForOfIteratorHelper(n(e)),
24
+ _step;
25
+ try {
26
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
27
+ var t = _step.value;
28
+ f.call(e, t) && l(r, t, e[t]);
29
+ }
30
+ } catch (err) {
31
+ _iterator.e(err);
32
+ } finally {
33
+ _iterator.f();
34
+ }
35
+ }
36
+ return r;
37
+ },
38
+ y = function y(r, e) {
39
+ return O(r, d(e));
40
+ },
41
+ P = function P(r, e) {
42
+ var t = {};
43
+ for (var a in r) s.call(r, a) && e.indexOf(a) < 0 && (t[a] = r[a]);
44
+ if (r != null && n) {
45
+ var _iterator2 = _createForOfIteratorHelper(n(r)),
46
+ _step2;
47
+ try {
48
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
49
+ var a = _step2.value;
50
+ e.indexOf(a) < 0 && f.call(r, a) && (t[a] = r[a]);
51
+ }
52
+ } catch (err) {
53
+ _iterator2.e(err);
54
+ } finally {
55
+ _iterator2.f();
56
+ }
57
+ }
58
+ return t;
59
+ };
60
+ var u = function u(r) {
61
+ var e = r,
62
+ t = e.type,
63
+ a = e.style,
64
+ p = e.onClick,
65
+ o = e.className,
66
+ _ = P(e, ["type", "style", "onClick", "className"]);
67
+ var c = o ? "bu-icon ".concat(o) : "bu-icon";
68
+ return /* @__PURE__ */i("svg", y(m({
69
+ style: a,
70
+ className: c,
71
+ "aria-hidden": "true",
72
+ onClick: p
73
+ }, _), {
74
+ children: /* @__PURE__ */i("use", {
75
+ xlinkHref: "#".concat(t)
76
+ })
77
+ }));
10
78
  };
79
+ u.displayName = "BuIcon";
80
+ export { u as default };
@@ -1 +1,230 @@
1
- "use strict";const t=require("react/jsx-runtime"),R=require("react");;/* empty css */function S(){return t.jsx("svg",{width:"8",height:"4.5",viewBox:"315 270 365 185",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M661.191111 440.106667c19.100444 0 28.664889-23.096889 15.160889-36.600889l-148.337778-148.337778a21.44 21.44 0 0 0-30.321778 0l-148.337777 148.337778c-13.511111 13.511111-3.946667 36.600889 15.153777 36.600889H661.191111z",fill:"currentColor"})})}function H(){return t.jsx("svg",{width:"8",height:"4.5",viewBox:"315 565 365 215",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M659.498667 582.328889c19.100444 0 28.657778 23.089778 15.160889 36.600889l-148.337778 148.337778a21.447111 21.447111 0 0 1-30.321778 0l-148.337778-148.337778c-13.511111-13.511111-3.946667-36.600889 15.146667-36.600889h296.689778z",fill:"currentColor"})})}function I(){return t.jsxs("svg",{className:"bu-input__error-icon",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("path",{d:"M5 8h6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}const T=R.forwardRef(function({type:n="input",mode:f="single",activeLang:G="zh",onLangChange:J,value:i="",onChange:s,label:v,required:D,placeholder:_,maxLength:c,showCount:F,error:N=!1,errorMessage:g,disabled:e,leftIcon:b,rightIcon:d,langToggle:$,translating:l=!1,translated:h=!1,onBlur:j,min:p,max:a,step:k=1,labels:u,id:x,className:q,style:z},w){u==null||u.zh,u==null||u.en;function M(r){let o=(parseFloat(i)||0)+r;p!==void 0&&(o=Math.max(p,o)),a!==void 0&&(o=Math.min(a,o)),s==null||s(String(o))}const B=n==="textarea"&&!!F,L=B||f==="bilingual"||l||h,W=c?`${i.length}/${c}`:`${i.length}`,E=N&&!!g&&i.length>0,A=["bu-input__box",(n==="input"||n==="number")&&"bu-input__box--single",n==="number"&&"bu-input__box--number",n==="textarea"&&"bu-input__box--textarea",N&&"bu-input__box--error",e&&"bu-input__box--disabled",!!b&&"bu-input__box--has-left",!!d&&"bu-input__box--has-right"].filter(Boolean).join(" "),m=`bu-input__field bu-input__field--${n}`;return t.jsxs("div",{className:["bu-input",q].filter(Boolean).join(" "),style:z,children:[v&&t.jsxs("label",{className:"bu-input__label",htmlFor:x,children:[D&&t.jsx("span",{className:"bu-input__required",children:"*"}),v]}),t.jsxs("div",{className:"bu-input__row",children:[b&&t.jsx("span",{className:"bu-input__icon bu-input__icon--left",children:b}),t.jsxs("div",{className:A,children:[n==="textarea"?t.jsx("textarea",{ref:w,id:x,className:m,value:i,onChange:r=>s==null?void 0:s(r.target.value),onBlur:j,placeholder:_,maxLength:c,disabled:e}):n==="number"?t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:w,id:x,className:m,value:i,onChange:r=>s==null?void 0:s(r.target.value),onBlur:j,placeholder:_,disabled:e,inputMode:"numeric"}),t.jsxs("div",{className:"bu-input__stepper",children:[t.jsx("button",{type:"button",className:"bu-input__stepper-btn bu-input__stepper-btn--up",onMouseDown:r=>r.preventDefault(),onClick:()=>M(k),disabled:e||a!==void 0&&parseFloat(i||"0")>=a,tabIndex:-1,children:t.jsx(S,{})}),t.jsx("button",{type:"button",className:"bu-input__stepper-btn bu-input__stepper-btn--down",onMouseDown:r=>r.preventDefault(),onClick:()=>M(-k),disabled:e||p!==void 0&&parseFloat(i||"0")<=p,tabIndex:-1,children:t.jsx(H,{})})]})]}):t.jsx("input",{ref:w,id:x,className:m,value:i,onChange:r=>s==null?void 0:s(r.target.value),onBlur:j,placeholder:_,maxLength:c,disabled:e}),L&&t.jsxs("div",{className:`bu-input__footer${n==="textarea"?" bu-input__footer--bottom":""}`,children:[B&&t.jsx("span",{className:"bu-input__count",children:W}),l&&t.jsxs("span",{className:"bu-input__translating",children:[t.jsx("svg",{className:"bu-input__translating-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"14 42"})}),"翻译中…"]}),h&&!l&&t.jsxs("span",{className:"bu-input__translated",children:[t.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),"翻译完成"]}),f==="bilingual"&&!l&&!h&&($??t.jsx("div",{className:"bu-input__lang-toggle"}))]})]}),d&&t.jsx("span",{className:"bu-input__icon bu-input__icon--right",children:d})]}),E&&t.jsxs("div",{className:"bu-input__error-msg",children:[t.jsx(I,{}),g]})]})});module.exports=T;
1
+ "use strict";
2
+
3
+ var n = require("react/jsx-runtime"),
4
+ S = require("react");
5
+ ; /* empty css */
6
+ function H() {
7
+ return n.jsx("svg", {
8
+ width: "8",
9
+ height: "4.5",
10
+ viewBox: "315 270 365 185",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ children: n.jsx("path", {
13
+ d: "M661.191111 440.106667c19.100444 0 28.664889-23.096889 15.160889-36.600889l-148.337778-148.337778a21.44 21.44 0 0 0-30.321778 0l-148.337777 148.337778c-13.511111 13.511111-3.946667 36.600889 15.153777 36.600889H661.191111z",
14
+ fill: "currentColor"
15
+ })
16
+ });
17
+ }
18
+ function I() {
19
+ return n.jsx("svg", {
20
+ width: "8",
21
+ height: "4.5",
22
+ viewBox: "315 565 365 215",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ children: n.jsx("path", {
25
+ d: "M659.498667 582.328889c19.100444 0 28.657778 23.089778 15.160889 36.600889l-148.337778 148.337778a21.447111 21.447111 0 0 1-30.321778 0l-148.337778-148.337778c-13.511111-13.511111-3.946667-36.600889 15.146667-36.600889h296.689778z",
26
+ fill: "currentColor"
27
+ })
28
+ });
29
+ }
30
+ function U() {
31
+ return n.jsxs("svg", {
32
+ className: "bu-input__error-icon",
33
+ viewBox: "0 0 16 16",
34
+ fill: "none",
35
+ xmlns: "http://www.w3.org/2000/svg",
36
+ children: [n.jsx("circle", {
37
+ cx: "8",
38
+ cy: "8",
39
+ r: "7",
40
+ stroke: "currentColor",
41
+ strokeWidth: "1.5"
42
+ }), n.jsx("path", {
43
+ d: "M5 8h6",
44
+ stroke: "currentColor",
45
+ strokeWidth: "1.5",
46
+ strokeLinecap: "round"
47
+ })]
48
+ });
49
+ }
50
+ var G = S.forwardRef(function (_ref, w) {
51
+ var _ref$type = _ref.type,
52
+ s = _ref$type === void 0 ? "input" : _ref$type,
53
+ _ref$mode = _ref.mode,
54
+ m = _ref$mode === void 0 ? "single" : _ref$mode,
55
+ _ref$activeLang = _ref.activeLang,
56
+ K = _ref$activeLang === void 0 ? "zh" : _ref$activeLang,
57
+ O = _ref.onLangChange,
58
+ _ref$value = _ref.value,
59
+ e = _ref$value === void 0 ? "" : _ref$value,
60
+ r = _ref.onChange,
61
+ g = _ref.label,
62
+ $ = _ref.required,
63
+ x = _ref.placeholder,
64
+ o = _ref.maxLength,
65
+ q = _ref.showCount,
66
+ _ref$error = _ref.error,
67
+ f = _ref$error === void 0 ? !1 : _ref$error,
68
+ N = _ref.errorMessage,
69
+ i = _ref.disabled,
70
+ b = _ref.leftIcon,
71
+ d = _ref.rightIcon,
72
+ k = _ref.langToggle,
73
+ _ref$translating = _ref.translating,
74
+ l = _ref$translating === void 0 ? !1 : _ref$translating,
75
+ _ref$translated = _ref.translated,
76
+ h = _ref$translated === void 0 ? !1 : _ref$translated,
77
+ j = _ref.onBlur,
78
+ c = _ref.min,
79
+ a = _ref.max,
80
+ _ref$step = _ref.step,
81
+ C = _ref$step === void 0 ? 1 : _ref$step,
82
+ p = _ref.labels,
83
+ _ = _ref.id,
84
+ z = _ref.className,
85
+ L = _ref.style;
86
+ var M, B;
87
+ (M = p == null ? void 0 : p.zh) != null, (B = p == null ? void 0 : p.en) != null;
88
+ function D(t) {
89
+ var u = (parseFloat(e) || 0) + t;
90
+ c !== void 0 && (u = Math.max(c, u)), a !== void 0 && (u = Math.min(a, u)), r == null || r(String(u));
91
+ }
92
+ var F = s === "textarea" && !!q,
93
+ W = F || m === "bilingual" || l || h,
94
+ E = o ? "".concat(e.length, "/").concat(o) : "".concat(e.length),
95
+ A = f && !!N && e.length > 0,
96
+ R = ["bu-input__box", (s === "input" || s === "number") && "bu-input__box--single", s === "number" && "bu-input__box--number", s === "textarea" && "bu-input__box--textarea", f && "bu-input__box--error", i && "bu-input__box--disabled", !!b && "bu-input__box--has-left", !!d && "bu-input__box--has-right"].filter(Boolean).join(" "),
97
+ v = "bu-input__field bu-input__field--".concat(s);
98
+ return n.jsxs("div", {
99
+ className: ["bu-input", z].filter(Boolean).join(" "),
100
+ style: L,
101
+ children: [g && n.jsxs("label", {
102
+ className: "bu-input__label",
103
+ htmlFor: _,
104
+ children: [$ && n.jsx("span", {
105
+ className: "bu-input__required",
106
+ children: "*"
107
+ }), g]
108
+ }), n.jsxs("div", {
109
+ className: "bu-input__row",
110
+ children: [b && n.jsx("span", {
111
+ className: "bu-input__icon bu-input__icon--left",
112
+ children: b
113
+ }), n.jsxs("div", {
114
+ className: R,
115
+ children: [s === "textarea" ? n.jsx("textarea", {
116
+ ref: w,
117
+ id: _,
118
+ className: v,
119
+ value: e,
120
+ onChange: function onChange(t) {
121
+ return r == null ? void 0 : r(t.target.value);
122
+ },
123
+ onBlur: j,
124
+ placeholder: x,
125
+ maxLength: o,
126
+ disabled: i
127
+ }) : s === "number" ? n.jsxs(n.Fragment, {
128
+ children: [n.jsx("input", {
129
+ ref: w,
130
+ id: _,
131
+ className: v,
132
+ value: e,
133
+ onChange: function onChange(t) {
134
+ return r == null ? void 0 : r(t.target.value);
135
+ },
136
+ onBlur: j,
137
+ placeholder: x,
138
+ disabled: i,
139
+ inputMode: "numeric"
140
+ }), n.jsxs("div", {
141
+ className: "bu-input__stepper",
142
+ children: [n.jsx("button", {
143
+ type: "button",
144
+ className: "bu-input__stepper-btn bu-input__stepper-btn--up",
145
+ onMouseDown: function onMouseDown(t) {
146
+ return t.preventDefault();
147
+ },
148
+ onClick: function onClick() {
149
+ return D(C);
150
+ },
151
+ disabled: i || a !== void 0 && parseFloat(e || "0") >= a,
152
+ tabIndex: -1,
153
+ children: n.jsx(H, {})
154
+ }), n.jsx("button", {
155
+ type: "button",
156
+ className: "bu-input__stepper-btn bu-input__stepper-btn--down",
157
+ onMouseDown: function onMouseDown(t) {
158
+ return t.preventDefault();
159
+ },
160
+ onClick: function onClick() {
161
+ return D(-C);
162
+ },
163
+ disabled: i || c !== void 0 && parseFloat(e || "0") <= c,
164
+ tabIndex: -1,
165
+ children: n.jsx(I, {})
166
+ })]
167
+ })]
168
+ }) : n.jsx("input", {
169
+ ref: w,
170
+ id: _,
171
+ className: v,
172
+ value: e,
173
+ onChange: function onChange(t) {
174
+ return r == null ? void 0 : r(t.target.value);
175
+ },
176
+ onBlur: j,
177
+ placeholder: x,
178
+ maxLength: o,
179
+ disabled: i
180
+ }), W && n.jsxs("div", {
181
+ className: "bu-input__footer".concat(s === "textarea" ? " bu-input__footer--bottom" : ""),
182
+ children: [F && n.jsx("span", {
183
+ className: "bu-input__count",
184
+ children: E
185
+ }), l && n.jsxs("span", {
186
+ className: "bu-input__translating",
187
+ children: [n.jsx("svg", {
188
+ className: "bu-input__translating-icon",
189
+ viewBox: "0 0 24 24",
190
+ fill: "none",
191
+ xmlns: "http://www.w3.org/2000/svg",
192
+ children: n.jsx("circle", {
193
+ cx: "12",
194
+ cy: "12",
195
+ r: "9",
196
+ stroke: "currentColor",
197
+ strokeWidth: "2",
198
+ strokeLinecap: "round",
199
+ strokeDasharray: "14 42"
200
+ })
201
+ }), "翻译中…"]
202
+ }), h && !l && n.jsxs("span", {
203
+ className: "bu-input__translated",
204
+ children: [n.jsx("svg", {
205
+ viewBox: "0 0 16 16",
206
+ fill: "none",
207
+ xmlns: "http://www.w3.org/2000/svg",
208
+ children: n.jsx("path", {
209
+ d: "M3 8l3.5 3.5L13 4.5",
210
+ stroke: "currentColor",
211
+ strokeWidth: "1.8",
212
+ strokeLinecap: "round",
213
+ strokeLinejoin: "round"
214
+ })
215
+ }), "翻译完成"]
216
+ }), m === "bilingual" && !l && !h && (k != null ? k : n.jsx("div", {
217
+ className: "bu-input__lang-toggle"
218
+ }))]
219
+ })]
220
+ }), d && n.jsx("span", {
221
+ className: "bu-input__icon bu-input__icon--right",
222
+ children: d
223
+ })]
224
+ }), A && n.jsxs("div", {
225
+ className: "bu-input__error-msg",
226
+ children: [n.jsx(U, {}), N]
227
+ })]
228
+ });
229
+ });
230
+ module.exports = G;