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,9 +1,52 @@
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 t } from "react/jsx-runtime";
2
5
  import { forwardRef as i } from "react";
3
- import a from "./BRadio.mjs";
4
- import { RadioOptionTypeContext as e } from "./context.mjs";
5
- const m = i((t, r) => /* @__PURE__ */ o(e.Provider, { value: "button", children: /* @__PURE__ */ o(a, { ...t, ref: r }) }));
6
- m.displayName = "BRadio.Button";
7
- export {
8
- m as default
9
- };
6
+ import n from "./BRadio.mjs";
7
+ import { RadioOptionTypeContext as s } from "./context.mjs";
8
+ var f = Object.defineProperty,
9
+ _ = Object.defineProperties,
10
+ d = Object.getOwnPropertyDescriptors,
11
+ a = Object.getOwnPropertySymbols,
12
+ l = Object.prototype.hasOwnProperty,
13
+ m = Object.prototype.propertyIsEnumerable,
14
+ p = function p(e, r, o) {
15
+ return r in e ? f(e, r, {
16
+ enumerable: !0,
17
+ configurable: !0,
18
+ writable: !0,
19
+ value: o
20
+ }) : e[r] = o;
21
+ },
22
+ c = function c(e, r) {
23
+ for (var o in r || (r = {})) l.call(r, o) && p(e, o, r[o]);
24
+ if (a) {
25
+ var _iterator = _createForOfIteratorHelper(a(r)),
26
+ _step;
27
+ try {
28
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
29
+ var o = _step.value;
30
+ m.call(r, o) && p(e, o, r[o]);
31
+ }
32
+ } catch (err) {
33
+ _iterator.e(err);
34
+ } finally {
35
+ _iterator.f();
36
+ }
37
+ }
38
+ return e;
39
+ },
40
+ u = function u(e, r) {
41
+ return _(e, d(r));
42
+ };
43
+ var O = i(function (e, r) {
44
+ return /* @__PURE__ */t(s.Provider, {
45
+ value: "button",
46
+ children: /* @__PURE__ */t(n, u(c({}, e), {
47
+ ref: r
48
+ }))
49
+ });
50
+ });
51
+ O.displayName = "BRadio.Button";
52
+ export { O as default };
@@ -1 +1,97 @@
1
- "use strict";const o=require("react/jsx-runtime"),s=require("react"),w=require("./BRadio.js"),z=require("./context.js");function I(...t){return t.filter(Boolean).join(" ")}function P(t){return(t??[]).map(e=>typeof e=="string"||typeof e=="number"?{label:e,value:e}:e)}const j=s.forwardRef(({defaultValue:t,value:e,onChange:u,options:a,children:v,disabled:l,name:c,className:f,style:x,id:R,direction:q="ltr",variant:d="dark",optionType:i,buttonStyle:B="outline",size:m,onMouseEnter:y,onMouseLeave:G,onFocus:N,onBlur:h},M)=>{const[O,S]=s.useState(t),n=e!==void 0?e:O,b=i==="button",V=s.useMemo(()=>P(a),[a]),k=s.useMemo(()=>({name:c,value:n,disabled:l,variant:d,optionType:i,onChange:r=>{const g=r.target.value;e===void 0&&S(g),g!==n&&(u==null||u(r))}}),[e,l,n,c,u,i,d]),p=a&&a.length>0?V.map(r=>o.jsx(w,{disabled:r.disabled||l,onChange:r.onChange,style:r.style,value:r.value,children:r.label},String(r.value))):v;return o.jsx("div",{className:I("bj-radio-group",b&&"bj-radio-group--button",b&&B==="solid"&&"bj-radio-group--solid",m==="large"&&"bj-radio-group--lg",m==="small"&&"bj-radio-group--sm",q==="rtl"&&"bj-radio-group--rtl",f),id:R,onBlur:h,onFocus:N,onMouseEnter:y,onMouseLeave:G,ref:M,style:x,children:o.jsx(z.RadioGroupContext.Provider,{value:k,children:p})})});j.displayName="BRadio.Group";module.exports=j;
1
+ "use strict";
2
+
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ 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; } }
6
+ 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; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
9
+ var o = require("react/jsx-runtime"),
10
+ t = require("react"),
11
+ w = require("./BRadio.js"),
12
+ z = require("./context.js");
13
+ function I() {
14
+ for (var _len = arguments.length, u = new Array(_len), _key = 0; _key < _len; _key++) {
15
+ u[_key] = arguments[_key];
16
+ }
17
+ return u.filter(Boolean).join(" ");
18
+ }
19
+ function P(u) {
20
+ return (u != null ? u : []).map(function (e) {
21
+ return typeof e == "string" || typeof e == "number" ? {
22
+ label: e,
23
+ value: e
24
+ } : e;
25
+ });
26
+ }
27
+ var j = t.forwardRef(function (_ref, C) {
28
+ var u = _ref.defaultValue,
29
+ e = _ref.value,
30
+ l = _ref.onChange,
31
+ a = _ref.options,
32
+ v = _ref.children,
33
+ s = _ref.disabled,
34
+ c = _ref.name,
35
+ f = _ref.className,
36
+ x = _ref.style,
37
+ h = _ref.id,
38
+ _ref$direction = _ref.direction,
39
+ R = _ref$direction === void 0 ? "ltr" : _ref$direction,
40
+ _ref$variant = _ref.variant,
41
+ d = _ref$variant === void 0 ? "dark" : _ref$variant,
42
+ n = _ref.optionType,
43
+ _ref$buttonStyle = _ref.buttonStyle,
44
+ q = _ref$buttonStyle === void 0 ? "outline" : _ref$buttonStyle,
45
+ g = _ref.size,
46
+ B = _ref.onMouseEnter,
47
+ y = _ref.onMouseLeave,
48
+ G = _ref.onFocus,
49
+ N = _ref.onBlur;
50
+ var _t$useState = t.useState(u),
51
+ _t$useState2 = _slicedToArray(_t$useState, 2),
52
+ M = _t$useState2[0],
53
+ O = _t$useState2[1],
54
+ i = e !== void 0 ? e : M,
55
+ m = n === "button",
56
+ S = t.useMemo(function () {
57
+ return P(a);
58
+ }, [a]),
59
+ V = t.useMemo(function () {
60
+ return {
61
+ name: c,
62
+ value: i,
63
+ disabled: s,
64
+ variant: d,
65
+ optionType: n,
66
+ onChange: function onChange(r) {
67
+ var b = r.target.value;
68
+ e === void 0 && O(b), b !== i && (l == null || l(r));
69
+ }
70
+ };
71
+ }, [e, s, i, c, l, n, d]),
72
+ k = a && a.length > 0 ? S.map(function (r) {
73
+ return o.jsx(w, {
74
+ disabled: r.disabled || s,
75
+ onChange: r.onChange,
76
+ style: r.style,
77
+ value: r.value,
78
+ children: r.label
79
+ }, String(r.value));
80
+ }) : v;
81
+ return o.jsx("div", {
82
+ className: I("bj-radio-group", m && "bj-radio-group--button", m && q === "solid" && "bj-radio-group--solid", g === "large" && "bj-radio-group--lg", g === "small" && "bj-radio-group--sm", R === "rtl" && "bj-radio-group--rtl", f),
83
+ id: h,
84
+ onBlur: N,
85
+ onFocus: G,
86
+ onMouseEnter: B,
87
+ onMouseLeave: y,
88
+ ref: C,
89
+ style: x,
90
+ children: o.jsx(z.RadioGroupContext.Provider, {
91
+ value: V,
92
+ children: k
93
+ })
94
+ });
95
+ });
96
+ j.displayName = "BRadio.Group";
97
+ module.exports = j;
@@ -1,80 +1,96 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as z, useState as I, useMemo as b } from "react";
3
- import M from "./BRadio.mjs";
4
- import { RadioGroupContext as P } from "./context.mjs";
5
- function q(...a) {
1
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ 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; } }
4
+ 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; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
+ import { jsx as s } from "react/jsx-runtime";
8
+ import { forwardRef as w, useState as z, useMemo as g } from "react";
9
+ import I from "./BRadio.mjs";
10
+ import { RadioGroupContext as M } from "./context.mjs";
11
+ function P() {
12
+ for (var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++) {
13
+ a[_key] = arguments[_key];
14
+ }
6
15
  return a.filter(Boolean).join(" ");
7
16
  }
8
- function A(a) {
9
- return (a ?? []).map((r) => typeof r == "string" || typeof r == "number" ? { label: r, value: r } : r);
17
+ function q(a) {
18
+ return (a != null ? a : []).map(function (r) {
19
+ return typeof r == "string" || typeof r == "number" ? {
20
+ label: r,
21
+ value: r
22
+ } : r;
23
+ });
10
24
  }
11
- const D = z(({
12
- defaultValue: a,
13
- value: r,
14
- onChange: l,
15
- options: t,
16
- children: g,
17
- disabled: u,
18
- name: d,
19
- className: v,
20
- style: j,
21
- id: p,
22
- direction: x = "ltr",
23
- variant: m = "dark",
24
- optionType: s,
25
- buttonStyle: B = "outline",
26
- size: n,
27
- onMouseEnter: R,
28
- onMouseLeave: y,
29
- onFocus: G,
30
- onBlur: N
31
- }, h) => {
32
- const [O, S] = I(a), o = r !== void 0 ? r : O, c = s === "button", V = b(() => A(t), [t]), k = b(() => ({
33
- name: d,
34
- value: o,
35
- disabled: u,
36
- variant: m,
37
- // 保持原始值(可能是 undefined),以便 BRadio.Button 能在组内生效
38
- optionType: s,
39
- onChange: (e) => {
40
- const f = e.target.value;
41
- r === void 0 && S(f), f !== o && (l == null || l(e));
42
- }
43
- }), [r, u, o, d, l, s, m]), w = t && t.length > 0 ? V.map((e) => /* @__PURE__ */ i(
44
- M,
45
- {
46
- disabled: e.disabled || u,
47
- onChange: e.onChange,
48
- style: e.style,
49
- value: e.value,
50
- children: e.label
51
- },
52
- String(e.value)
53
- )) : g;
54
- return /* @__PURE__ */ i(
55
- "div",
56
- {
57
- className: q(
58
- "bj-radio-group",
59
- c && "bj-radio-group--button",
60
- c && B === "solid" && "bj-radio-group--solid",
61
- n === "large" && "bj-radio-group--lg",
62
- n === "small" && "bj-radio-group--sm",
63
- x === "rtl" && "bj-radio-group--rtl",
64
- v
65
- ),
66
- id: p,
67
- onBlur: N,
68
- onFocus: G,
69
- onMouseEnter: R,
70
- onMouseLeave: y,
71
- ref: h,
72
- style: j,
73
- children: /* @__PURE__ */ i(P.Provider, { value: k, children: w })
74
- }
75
- );
25
+ var A = w(function (_ref, N) {
26
+ var a = _ref.defaultValue,
27
+ r = _ref.value,
28
+ u = _ref.onChange,
29
+ l = _ref.options,
30
+ b = _ref.children,
31
+ t = _ref.disabled,
32
+ d = _ref.name,
33
+ v = _ref.className,
34
+ j = _ref.style,
35
+ h = _ref.id,
36
+ _ref$direction = _ref.direction,
37
+ x = _ref$direction === void 0 ? "ltr" : _ref$direction,
38
+ _ref$variant = _ref.variant,
39
+ i = _ref$variant === void 0 ? "dark" : _ref$variant,
40
+ o = _ref.optionType,
41
+ _ref$buttonStyle = _ref.buttonStyle,
42
+ p = _ref$buttonStyle === void 0 ? "outline" : _ref$buttonStyle,
43
+ m = _ref.size,
44
+ B = _ref.onMouseEnter,
45
+ R = _ref.onMouseLeave,
46
+ y = _ref.onFocus,
47
+ G = _ref.onBlur;
48
+ var _z = z(a),
49
+ _z2 = _slicedToArray(_z, 2),
50
+ C = _z2[0],
51
+ O = _z2[1],
52
+ n = r !== void 0 ? r : C,
53
+ c = o === "button",
54
+ S = g(function () {
55
+ return q(l);
56
+ }, [l]),
57
+ V = g(function () {
58
+ return {
59
+ name: d,
60
+ value: n,
61
+ disabled: t,
62
+ variant: i,
63
+ // 保持原始值(可能是 undefined),以便 BRadio.Button 能在组内生效
64
+ optionType: o,
65
+ onChange: function onChange(e) {
66
+ var f = e.target.value;
67
+ r === void 0 && O(f), f !== n && (u == null || u(e));
68
+ }
69
+ };
70
+ }, [r, t, n, d, u, o, i]),
71
+ k = l && l.length > 0 ? S.map(function (e) {
72
+ return /* @__PURE__ */s(I, {
73
+ disabled: e.disabled || t,
74
+ onChange: e.onChange,
75
+ style: e.style,
76
+ value: e.value,
77
+ children: e.label
78
+ }, String(e.value));
79
+ }) : b;
80
+ return /* @__PURE__ */s("div", {
81
+ className: P("bj-radio-group", c && "bj-radio-group--button", c && p === "solid" && "bj-radio-group--solid", m === "large" && "bj-radio-group--lg", m === "small" && "bj-radio-group--sm", x === "rtl" && "bj-radio-group--rtl", v),
82
+ id: h,
83
+ onBlur: G,
84
+ onFocus: y,
85
+ onMouseEnter: B,
86
+ onMouseLeave: R,
87
+ ref: N,
88
+ style: j,
89
+ children: /* @__PURE__ */s(M.Provider, {
90
+ value: V,
91
+ children: k
92
+ })
93
+ });
76
94
  });
77
- D.displayName = "BRadio.Group";
78
- export {
79
- D as default
80
- };
95
+ A.displayName = "BRadio.Group";
96
+ export { A as default };
@@ -1 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext(null),o=t.createContext(null);exports.RadioGroupContext=e;exports.RadioOptionTypeContext=o;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, {
4
+ value: "Module"
5
+ });
6
+ var t = require("react"),
7
+ e = t.createContext(null),
8
+ o = t.createContext(null);
9
+ exports.RadioGroupContext = e;
10
+ exports.RadioOptionTypeContext = o;
@@ -1,6 +1,4 @@
1
1
  import { createContext as o } from "react";
2
- const n = o(null), e = o(null);
3
- export {
4
- n as RadioGroupContext,
5
- e as RadioOptionTypeContext
6
- };
2
+ var n = o(null),
3
+ e = o(null);
4
+ export { n as RadioGroupContext, e as RadioOptionTypeContext };
@@ -1 +1,13 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./BRadio.js"),e=require("./Button.js"),r=require("./Group.js"),o=t;o.Group=r;o.Button=e;o.__ANT_RADIO=!0;exports.BRadio=o;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, {
4
+ value: "Module"
5
+ });
6
+ var t = require("./BRadio.js"),
7
+ e = require("./Button.js"),
8
+ r = require("./Group.js"),
9
+ o = t;
10
+ o.Group = r;
11
+ o.Button = e;
12
+ o.__ANT_RADIO = !0;
13
+ exports.BRadio = o;
@@ -1,10 +1,8 @@
1
1
  import r from "./BRadio.mjs";
2
2
  import t from "./Button.mjs";
3
3
  import m from "./Group.mjs";
4
- const o = r;
4
+ var o = r;
5
5
  o.Group = m;
6
6
  o.Button = t;
7
7
  o.__ANT_RADIO = !0;
8
- export {
9
- o as BRadio
10
- };
8
+ export { o as BRadio };