bj-web-components 0.2.12 → 0.2.13

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 (49) hide show
  1. package/README.md +38 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.mjs +45 -26
  4. package/dist/style.css +1 -1
  5. package/dist/web/BasicInput/BInput.js +1 -0
  6. package/dist/web/BasicInput/BInput.mjs +177 -0
  7. package/dist/web/BasicInput/utils.js +1 -0
  8. package/dist/web/BasicInput/utils.mjs +37 -0
  9. package/dist/web/CheckBox/BCheckBox.js +1 -0
  10. package/dist/web/CheckBox/BCheckBox.mjs +101 -0
  11. package/dist/web/CheckBox/Group.js +1 -0
  12. package/dist/web/CheckBox/Group.mjs +67 -0
  13. package/dist/web/CheckBox/context.js +1 -0
  14. package/dist/web/CheckBox/context.mjs +5 -0
  15. package/dist/web/CheckBox/index.js +1 -0
  16. package/dist/web/CheckBox/index.mjs +8 -0
  17. package/dist/web/Dropdown/BDropdown.js +1 -0
  18. package/dist/web/Dropdown/BDropdown.mjs +160 -0
  19. package/dist/web/OverlayScrollbar/BOverlayScrollbar.js +1 -0
  20. package/dist/web/OverlayScrollbar/BOverlayScrollbar.mjs +152 -0
  21. package/dist/web/Pagination/Pagination.js +1 -1
  22. package/dist/web/Pagination/Pagination.mjs +1 -1
  23. package/dist/web/ProductField/ProductField.mjs +12 -12
  24. package/dist/web/SkuInputCard/SkuInputCard.mjs +26 -26
  25. package/dist/web/Table/BTable.js +1 -0
  26. package/dist/web/Table/BTable.mjs +608 -0
  27. package/dist/web/Table/Column.js +1 -0
  28. package/dist/web/Table/Column.mjs +6 -0
  29. package/dist/web/Table/ColumnGroup.js +1 -0
  30. package/dist/web/Table/ColumnGroup.mjs +6 -0
  31. package/dist/web/Table/utils/columns.js +1 -0
  32. package/dist/web/Table/utils/columns.mjs +43 -0
  33. package/dist/web/Table/utils/sortFilter.js +1 -0
  34. package/dist/web/Table/utils/sortFilter.mjs +63 -0
  35. package/dist/web/Tabs/BTabs.js +1 -0
  36. package/dist/web/Tabs/BTabs.mjs +130 -0
  37. package/dist/web/Tabs/TabPane.js +1 -0
  38. package/dist/web/Tabs/TabPane.mjs +7 -0
  39. package/dist/web/Tooltip/ContentTooltip.js +1 -1
  40. package/dist/web/Tooltip/ContentTooltip.mjs +56 -20
  41. package/dist/web.js +1 -1
  42. package/dist/web.mjs +45 -26
  43. package/package.json +3 -3
  44. package/dist/index.d.ts +0 -534
  45. package/dist/miniapp.d.ts +0 -1
  46. package/dist/mobile.d.ts +0 -1
  47. package/dist/react.d.ts +0 -1
  48. package/dist/shared.d.ts +0 -1
  49. package/dist/web.d.ts +0 -534
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(t,n){return t.key!==void 0&&t.key!==null?t.key:t.dataIndex!==void 0?Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex:n}function x(t,n){return typeof t=="function"?t(n):t}function S(t,n=["ascend","descend",null]){const o=n.indexOf(t),i=n[o+1];return i===void 0?n[0]??null:i}function l(t){if(typeof t.sorter=="function")return t.sorter;if(t.sorter&&typeof t.sorter=="object")return t.sorter.compare}function g(t){return t.sorter&&typeof t.sorter=="object"?t.sorter.multiple??0:0}function p(t,n,o,i="children"){const f=n.map((e,r)=>({column:e,key:a(e,r)})).filter(({column:e,key:r})=>!("children"in e)&&l(e)&&o.get(r)).sort((e,r)=>g(r.column)-g(e.column));return f.length===0?[...t]:[...t].sort((e,r)=>{for(const{column:s,key:c}of f){const u=o.get(c),d=l(s);if(u&&d){const y=d(e,r,u);if(y!==0)return u==="ascend"?y:-y}}return 0}).map(e=>{const r=e[i];return Array.isArray(r)?{...e,[i]:p(r,n,o,i)}:e})}function k(t,n,o){return n.reduce((i,f,e)=>{const r=f,s=o.get(a(r,e));return!r.onFilter||!(s!=null&&s.length)?i:i.filter(c=>s.some(u=>{var d;return(d=r.onFilter)==null?void 0:d.call(r,u,c)}))},[...t])}function v(t,n){const o=t.flatMap((i,f)=>{const e=i,r=a(e,f),s=n.get(r);return s?[{column:e,order:s,field:e.dataIndex,columnKey:r}]:[]});return o.length<=1?o[0]??{}:o}exports.filterRecords=k;exports.getColumnKey=a;exports.getNextSortOrder=S;exports.getSorterResult=v;exports.renderColumnTitle=x;exports.sortRecords=p;
@@ -0,0 +1,63 @@
1
+ function y(t, n) {
2
+ return t.key !== void 0 && t.key !== null ? t.key : t.dataIndex !== void 0 ? Array.isArray(t.dataIndex) ? t.dataIndex.join(".") : t.dataIndex : n;
3
+ }
4
+ function x(t, n) {
5
+ return typeof t == "function" ? t(n) : t;
6
+ }
7
+ function k(t, n = ["ascend", "descend", null]) {
8
+ const o = n.indexOf(t), i = n[o + 1];
9
+ return i === void 0 ? n[0] ?? null : i;
10
+ }
11
+ function p(t) {
12
+ if (typeof t.sorter == "function")
13
+ return t.sorter;
14
+ if (t.sorter && typeof t.sorter == "object")
15
+ return t.sorter.compare;
16
+ }
17
+ function g(t) {
18
+ return t.sorter && typeof t.sorter == "object" ? t.sorter.multiple ?? 0 : 0;
19
+ }
20
+ function l(t, n, o, i = "children") {
21
+ const s = n.map((r, e) => ({
22
+ column: r,
23
+ key: y(r, e)
24
+ })).filter(({ column: r, key: e }) => !("children" in r) && p(r) && o.get(e)).sort((r, e) => g(e.column) - g(r.column));
25
+ return s.length === 0 ? [...t] : [...t].sort((r, e) => {
26
+ for (const { column: f, key: d } of s) {
27
+ const u = o.get(d), a = p(f);
28
+ if (u && a) {
29
+ const c = a(r, e, u);
30
+ if (c !== 0)
31
+ return u === "ascend" ? c : -c;
32
+ }
33
+ }
34
+ return 0;
35
+ }).map((r) => {
36
+ const e = r[i];
37
+ return Array.isArray(e) ? { ...r, [i]: l(e, n, o, i) } : r;
38
+ });
39
+ }
40
+ function I(t, n, o) {
41
+ return n.reduce((i, s, r) => {
42
+ const e = s, f = o.get(y(e, r));
43
+ return !e.onFilter || !(f != null && f.length) ? i : i.filter((d) => f.some((u) => {
44
+ var a;
45
+ return (a = e.onFilter) == null ? void 0 : a.call(e, u, d);
46
+ }));
47
+ }, [...t]);
48
+ }
49
+ function v(t, n) {
50
+ const o = t.flatMap((i, s) => {
51
+ const r = i, e = y(r, s), f = n.get(e);
52
+ return f ? [{ column: r, order: f, field: r.dataIndex, columnKey: e }] : [];
53
+ });
54
+ return o.length <= 1 ? o[0] ?? {} : o;
55
+ }
56
+ export {
57
+ I as filterRecords,
58
+ y as getColumnKey,
59
+ k as getNextSortOrder,
60
+ v as getSorterResult,
61
+ x as renderColumnTitle,
62
+ l as sortRecords
63
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),c=require("react"),M=require("./TabPane.js");;/* empty css */function I(...s){return s.filter(Boolean).join(" ")}function P(s,n){const[t,a]=c.useState(s);return[n===void 0?t:n,a]}function D(s,n){return c.useMemo(()=>s?s.filter(t=>!!(t&&typeof t=="object"&&"key"in t)):c.Children.toArray(n).flatMap(t=>{if(!c.isValidElement(t))return[];const{tab:a,tabKey:b,...y}=t.props,i=b??t.key;return i===null?[]:[{...y,key:String(i),label:a}]}),[n,s])}function E({active:s,id:n,item:t,onClick:a,onKeyDown:b,tabCount:y,tabIndex:i}){return r.jsxs("button",{"aria-controls":`${n}-panel-${t.key}`,"aria-disabled":t.disabled,"aria-selected":s,className:I("bj-tabs__tab",s&&"bj-tabs__tab--active",t.disabled&&"bj-tabs__tab--disabled"),disabled:t.disabled,id:`${n}-tab-${t.key}`,onClick:a,onKeyDown:b,role:"tab",tabIndex:t.disabled?-1:s?0:-1,type:"button",children:[r.jsx("span",{className:"bj-tabs__tab-btn",children:t.label}),r.jsx("span",{className:"bj-tabs__sr-only",children:`Tab ${i+1} of ${y}`})]})}function L({activeKey:s,id:n,items:t}){return r.jsx("div",{className:"bj-tabs__content-holder",children:r.jsx("div",{className:"bj-tabs__content",children:t.map(a=>{const b=a.key===s;return!b&&!a.forceRender?null:r.jsx("div",{"aria-hidden":!b,"aria-labelledby":`${n}-tab-${a.key}`,className:I("bj-tabs__tabpane",b&&"bj-tabs__tabpane--active",a.className),id:`${n}-panel-${a.key}`,role:"tabpanel",style:a.style,tabIndex:b?0:-1,children:a.children},a.key)})})})}function m({activeKey:s,children:n,centered:t,className:a,defaultActiveKey:b,id:y,items:i,onChange:f,onTabClick:_,style:w,tabBarGutter:F,tabBarStyle:S,tabPosition:x="top",type:K="line"}){const l=D(i,n),B=c.useRef(`bj-tabs-${Math.random().toString(36).slice(2,10)}`),p=y??B.current,[o,v]=P(()=>{var e;return b??((e=l[0])==null?void 0:e.key)},s),[$,R]=c.useState(()=>l.findIndex(e=>e.key===o));c.useEffect(()=>{var d;let e=l.findIndex(u=>u.key===o);e===-1&&(e=Math.max(0,Math.min($,l.length-1)),v((d=l[e])==null?void 0:d.key)),R(e)},[$,o,v,l]);const T=(e,d)=>{_==null||_(e,d),e!==o&&(v(e),f==null||f(e))},V=(e,d)=>{var N;const g=x==="left"||x==="right"?e.key==="ArrowDown"?1:e.key==="ArrowUp"?-1:0:e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0;if(!g)return;e.preventDefault();const j=l.filter(h=>!h.disabled),q=j.findIndex(h=>{var A;return h.key===((A=l[d])==null?void 0:A.key)}),k=j[(q+g+j.length)%j.length];(N=document.getElementById(`${p}-tab-${k==null?void 0:k.key}`))==null||N.focus()};return r.jsxs("div",{className:I("bj-tabs",`bj-tabs--${x}`,`bj-tabs--${K}`,t&&"bj-tabs--centered",a),style:w,children:[r.jsx("div",{className:"bj-tabs__nav",role:"tablist",style:S,children:r.jsx("div",{className:"bj-tabs__nav-wrap",children:r.jsx("div",{className:"bj-tabs__nav-list",children:l.map((e,d)=>r.jsx(E,{active:e.key===o,id:p,item:e,onClick:u=>T(e.key,u),onKeyDown:u=>V(u,d),tabCount:l.length,tabIndex:d},e.key))})})}),r.jsx(L,{activeKey:o,id:p,items:l})]})}m.TabPane=M;exports.TabPane=M;exports.default=m;
@@ -0,0 +1,130 @@
1
+ import { jsxs as g, jsx as b } from "react/jsx-runtime";
2
+ import { useRef as E, useState as A, useEffect as L, useMemo as T, Children as P, isValidElement as F } from "react";
3
+ import G from "./TabPane.mjs";
4
+ /* empty css */
5
+ function I(...n) {
6
+ return n.filter(Boolean).join(" ");
7
+ }
8
+ function U(n, s) {
9
+ const [t, a] = A(n);
10
+ return [s === void 0 ? t : s, a];
11
+ }
12
+ function q(n, s) {
13
+ return T(() => n ? n.filter((t) => !!(t && typeof t == "object" && "key" in t)) : P.toArray(s).flatMap((t) => {
14
+ if (!F(t)) return [];
15
+ const { tab: a, tabKey: l, ...u } = t.props, c = l ?? t.key;
16
+ return c === null ? [] : [{ ...u, key: String(c), label: a }];
17
+ }), [s, n]);
18
+ }
19
+ function z({
20
+ active: n,
21
+ id: s,
22
+ item: t,
23
+ onClick: a,
24
+ onKeyDown: l,
25
+ tabCount: u,
26
+ tabIndex: c
27
+ }) {
28
+ return /* @__PURE__ */ g(
29
+ "button",
30
+ {
31
+ "aria-controls": `${s}-panel-${t.key}`,
32
+ "aria-disabled": t.disabled,
33
+ "aria-selected": n,
34
+ className: I("bj-tabs__tab", n && "bj-tabs__tab--active", t.disabled && "bj-tabs__tab--disabled"),
35
+ disabled: t.disabled,
36
+ id: `${s}-tab-${t.key}`,
37
+ onClick: a,
38
+ onKeyDown: l,
39
+ role: "tab",
40
+ tabIndex: t.disabled ? -1 : n ? 0 : -1,
41
+ type: "button",
42
+ children: [
43
+ /* @__PURE__ */ b("span", { className: "bj-tabs__tab-btn", children: t.label }),
44
+ /* @__PURE__ */ b("span", { className: "bj-tabs__sr-only", children: `Tab ${c + 1} of ${u}` })
45
+ ]
46
+ }
47
+ );
48
+ }
49
+ function H({ activeKey: n, id: s, items: t }) {
50
+ return /* @__PURE__ */ b("div", { className: "bj-tabs__content-holder", children: /* @__PURE__ */ b("div", { className: "bj-tabs__content", children: t.map((a) => {
51
+ const l = a.key === n;
52
+ return !l && !a.forceRender ? null : /* @__PURE__ */ b(
53
+ "div",
54
+ {
55
+ "aria-hidden": !l,
56
+ "aria-labelledby": `${s}-tab-${a.key}`,
57
+ className: I("bj-tabs__tabpane", l && "bj-tabs__tabpane--active", a.className),
58
+ id: `${s}-panel-${a.key}`,
59
+ role: "tabpanel",
60
+ style: a.style,
61
+ tabIndex: l ? 0 : -1,
62
+ children: a.children
63
+ },
64
+ a.key
65
+ );
66
+ }) }) });
67
+ }
68
+ function J({
69
+ activeKey: n,
70
+ children: s,
71
+ centered: t,
72
+ className: a,
73
+ defaultActiveKey: l,
74
+ id: u,
75
+ items: c,
76
+ onChange: f,
77
+ onTabClick: p,
78
+ style: w,
79
+ tabBarGutter: O,
80
+ tabBarStyle: M,
81
+ tabPosition: _ = "top",
82
+ type: K = "line"
83
+ }) {
84
+ const r = q(c, s), B = E(`bj-tabs-${Math.random().toString(36).slice(2, 10)}`), j = u ?? B.current, [o, k] = U(
85
+ () => {
86
+ var e;
87
+ return l ?? ((e = r[0]) == null ? void 0 : e.key);
88
+ },
89
+ n
90
+ ), [$, V] = A(() => r.findIndex((e) => e.key === o));
91
+ L(() => {
92
+ var d;
93
+ let e = r.findIndex((i) => i.key === o);
94
+ e === -1 && (e = Math.max(0, Math.min($, r.length - 1)), k((d = r[e]) == null ? void 0 : d.key)), V(e);
95
+ }, [$, o, k, r]);
96
+ const R = (e, d) => {
97
+ p == null || p(e, d), e !== o && (k(e), f == null || f(e));
98
+ }, S = (e, d) => {
99
+ var m;
100
+ const x = _ === "left" || _ === "right" ? e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0 : e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0;
101
+ if (!x) return;
102
+ e.preventDefault();
103
+ const y = r.filter((h) => !h.disabled), D = y.findIndex((h) => {
104
+ var N;
105
+ return h.key === ((N = r[d]) == null ? void 0 : N.key);
106
+ }), v = y[(D + x + y.length) % y.length];
107
+ (m = document.getElementById(`${j}-tab-${v == null ? void 0 : v.key}`)) == null || m.focus();
108
+ };
109
+ return /* @__PURE__ */ g("div", { className: I("bj-tabs", `bj-tabs--${_}`, `bj-tabs--${K}`, t && "bj-tabs--centered", a), style: w, children: [
110
+ /* @__PURE__ */ b("div", { className: "bj-tabs__nav", role: "tablist", style: M, children: /* @__PURE__ */ b("div", { className: "bj-tabs__nav-wrap", children: /* @__PURE__ */ b("div", { className: "bj-tabs__nav-list", children: r.map((e, d) => /* @__PURE__ */ b(
111
+ z,
112
+ {
113
+ active: e.key === o,
114
+ id: j,
115
+ item: e,
116
+ onClick: (i) => R(e.key, i),
117
+ onKeyDown: (i) => S(i, d),
118
+ tabCount: r.length,
119
+ tabIndex: d
120
+ },
121
+ e.key
122
+ )) }) }) }),
123
+ /* @__PURE__ */ b(H, { activeKey: o, id: j, items: r })
124
+ ] });
125
+ }
126
+ J.TabPane = G;
127
+ export {
128
+ G as TabPane,
129
+ J as default
130
+ };
@@ -0,0 +1 @@
1
+ "use strict";function a(e){return null}a.displayName="BTabs.TabPane";module.exports=a;
@@ -0,0 +1,7 @@
1
+ function a(e) {
2
+ return null;
3
+ }
4
+ a.displayName = "BTabs.TabPane";
5
+ export {
6
+ a as default
7
+ };
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime");;/* empty css */const c=require("./useAutoPlacement.js");function a({placement:p="top",content:l="这里是提示内容,可以包含更多详细信息。",variant:t="default",className:i,style:n}){const[e,s]=c.useAutoPlacement(p),r=["tooltip-popup","tooltip-popup--content",`tooltip-popup--${e}`,t!=="default"?`tooltip-popup--${t}`:"",i].filter(Boolean).join(" "),u=["tooltip-arrow",`tooltip-arrow--${e}`,t==="tinted"?"tooltip-arrow--tinted-bg":""].filter(Boolean).join(" ");return o.jsxs("div",{ref:s,className:r,style:n,children:[o.jsx("div",{className:u}),o.jsx("p",{className:"bu-tooltip-content__text",children:l})]})}module.exports=a;
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),q=require("react-dom");;/* empty css */const R=require("./useAutoPlacement.js");function B({placement:v="top",content:p="这里是提示内容,可以包含更多详细信息。",variant:c="default",className:N,style:w,getPopupContainer:o,getAnchorElement:s,color:e,fontColor:r}){const[u,d]=R.useAutoPlacement(v),i=a.useRef(null),[f,S]=a.useState(),x=["tooltip-popup","tooltip-popup--content",`tooltip-popup--${u}`,c!=="default"?`tooltip-popup--${c}`:"",N].filter(Boolean).join(" "),m=["tooltip-arrow",`tooltip-arrow--${u}`,c==="tinted"?"tooltip-arrow--tinted-bg":""].filter(Boolean).join(" "),y={...w,...e?{backgroundColor:e}:{},...r?{color:r}:{}},j=e?{backgroundColor:e,borderColor:e}:void 0,b=r?{color:r}:void 0,h=t.jsxs("div",{ref:d,className:x,style:y,children:[t.jsx("div",{className:m,style:j}),t.jsx("div",{className:"bu-tooltip-content__text",style:b,children:p})]});if(a.useLayoutEffect(()=>{if(!o||!i.current)return;const l=(s==null?void 0:s())??i.current.parentElement;if(!l)return;const n=l.getBoundingClientRect();S({position:"fixed",left:n.left+n.width/2,top:n.top,right:"auto",bottom:"auto",transform:"translate(-50%, calc(-100% - 16px))"})},[s,o]),o&&typeof document<"u"){const l=o();return t.jsxs(t.Fragment,{children:[t.jsx("span",{ref:i,className:"tooltip-portal-anchor"}),f&&q.createPortal(t.jsxs("div",{ref:d,className:x,style:{...y,...f},children:[t.jsx("div",{className:m,style:j}),t.jsx("div",{className:"bu-tooltip-content__text",style:b,children:p})]}),l)]})}return h}module.exports=B;
@@ -1,29 +1,65 @@
1
- import { jsxs as c, jsx as p } from "react/jsx-runtime";
1
+ import { jsxs as c, Fragment as B, jsx as o } from "react/jsx-runtime";
2
+ import { useRef as R, useState as _, useLayoutEffect as $ } from "react";
3
+ import { createPortal as k } from "react-dom";
2
4
  /* empty css */
3
- import { useAutoPlacement as u } from "./useAutoPlacement.mjs";
4
- function j({
5
- placement: e = "top",
6
- content: l = "这里是提示内容,可以包含更多详细信息。",
7
- variant: o = "default",
8
- className: i,
9
- style: n
5
+ import { useAutoPlacement as P } from "./useAutoPlacement.mjs";
6
+ function z({
7
+ placement: N = "top",
8
+ content: n = "这里是提示内容,可以包含更多详细信息。",
9
+ variant: i = "default",
10
+ className: w,
11
+ style: S,
12
+ getPopupContainer: e,
13
+ getAnchorElement: r,
14
+ color: t,
15
+ fontColor: l
10
16
  }) {
11
- const [t, r] = u(e), s = [
17
+ const [u, d] = P(N), p = R(null), [f, h] = _(), m = [
12
18
  "tooltip-popup",
13
19
  "tooltip-popup--content",
14
- `tooltip-popup--${t}`,
15
- o !== "default" ? `tooltip-popup--${o}` : "",
16
- i
17
- ].filter(Boolean).join(" "), a = [
20
+ `tooltip-popup--${u}`,
21
+ i !== "default" ? `tooltip-popup--${i}` : "",
22
+ w
23
+ ].filter(Boolean).join(" "), y = [
18
24
  "tooltip-arrow",
19
- `tooltip-arrow--${t}`,
20
- o === "tinted" ? "tooltip-arrow--tinted-bg" : ""
21
- ].filter(Boolean).join(" ");
22
- return /* @__PURE__ */ c("div", { ref: r, className: s, style: n, children: [
23
- /* @__PURE__ */ p("div", { className: a }),
24
- /* @__PURE__ */ p("p", { className: "bu-tooltip-content__text", children: l })
25
+ `tooltip-arrow--${u}`,
26
+ i === "tinted" ? "tooltip-arrow--tinted-bg" : ""
27
+ ].filter(Boolean).join(" "), b = {
28
+ ...S,
29
+ ...t ? { backgroundColor: t } : {},
30
+ ...l ? { color: l } : {}
31
+ }, v = t ? { backgroundColor: t, borderColor: t } : void 0, x = l ? { color: l } : void 0, j = /* @__PURE__ */ c("div", { ref: d, className: m, style: b, children: [
32
+ /* @__PURE__ */ o("div", { className: y, style: v }),
33
+ /* @__PURE__ */ o("div", { className: "bu-tooltip-content__text", style: x, children: n })
25
34
  ] });
35
+ if ($(() => {
36
+ if (!e || !p.current) return;
37
+ const s = (r == null ? void 0 : r()) ?? p.current.parentElement;
38
+ if (!s) return;
39
+ const a = s.getBoundingClientRect();
40
+ h({
41
+ position: "fixed",
42
+ left: a.left + a.width / 2,
43
+ top: a.top,
44
+ right: "auto",
45
+ bottom: "auto",
46
+ transform: "translate(-50%, calc(-100% - 16px))"
47
+ });
48
+ }, [r, e]), e && typeof document < "u") {
49
+ const s = e();
50
+ return /* @__PURE__ */ c(B, { children: [
51
+ /* @__PURE__ */ o("span", { ref: p, className: "tooltip-portal-anchor" }),
52
+ f && k(
53
+ /* @__PURE__ */ c("div", { ref: d, className: m, style: { ...b, ...f }, children: [
54
+ /* @__PURE__ */ o("div", { className: y, style: v }),
55
+ /* @__PURE__ */ o("div", { className: "bu-tooltip-content__text", style: x, children: n })
56
+ ] }),
57
+ s
58
+ )
59
+ ] });
60
+ }
61
+ return j;
26
62
  }
27
63
  export {
28
- j as default
64
+ z as default
29
65
  };
package/dist/web.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./web/Icon/Icon.js"),r=require("./web/Tooltip/ConfirmTooltip.js"),e=require("./web/Tooltip/ProgressTooltip.js"),t=require("./web/Tooltip/ContentTooltip.js"),n=require("./web/Tooltip/TooltipWrapper.js"),u=require("./web/SkuInputCard/SkuInputCard.js"),i=require("./web/Input/Input.js"),p=require("./web/EmptyInputBox/EmptyInputBox.js"),c=require("./web/Modal/Modal.js"),s=require("./web/ProductField/ProductField.js"),l=require("./web/CategoryDropdown/CategoryDropdown.js"),a=require("./web/Pagination/Pagination.js"),q=require("./web/FileCard/FileCard.js"),d=require("./web/Switch/Switch.js"),B=require("./web/InputNumber/BInputNumber.js");exports.BuIcon=o;exports.ConfirmTooltip=r;exports.ProgressTooltip=e;exports.ContentTooltip=t;exports.TooltipWrapper=n;exports.SkuInputCard=u;exports.BuInput=i;exports.BuEmptyInputBox=p;exports.BuModal=c;exports.BuProductField=s;exports.BuCategoryDropdown=l;exports.Pagination=a;exports.FileCard=q;exports.BuSwitch=d;exports.BInputNumber=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./web/Icon/Icon.js"),e=require("./web/Tooltip/ConfirmTooltip.js"),t=require("./web/Tooltip/ProgressTooltip.js"),r=require("./web/Tooltip/ContentTooltip.js"),n=require("./web/Tooltip/TooltipWrapper.js"),u=require("./web/SkuInputCard/SkuInputCard.js"),i=require("./web/Input/Input.js"),c=require("./web/BasicInput/BInput.js"),p=require("./web/Tabs/BTabs.js"),l=require("./web/Tabs/TabPane.js"),s=require("./web/EmptyInputBox/EmptyInputBox.js"),a=require("./web/Modal/Modal.js"),B=require("./web/ProductField/ProductField.js"),q=require("./web/CategoryDropdown/CategoryDropdown.js"),d=require("./web/Pagination/Pagination.js"),T=require("./web/FileCard/FileCard.js"),C=require("./web/Switch/Switch.js"),b=require("./web/InputNumber/BInputNumber.js"),I=require("./web/Table/BTable.js"),m=require("./web/Table/Column.js"),P=require("./web/Table/ColumnGroup.js"),g=require("./web/CheckBox/index.js"),y=require("./web/OverlayScrollbar/BOverlayScrollbar.js"),S=require("./web/Dropdown/BDropdown.js");exports.BuIcon=o;exports.ConfirmTooltip=e;exports.ProgressTooltip=t;exports.BTooltip=r;exports.ContentTooltip=r;exports.TooltipWrapper=n;exports.SkuInputCard=u;exports.BuInput=i;exports.BInput=c;exports.BTabs=p.default;exports.TabPane=l;exports.BuEmptyInputBox=s;exports.BuModal=a;exports.BuProductField=B;exports.BuCategoryDropdown=q;exports.Pagination=d;exports.FileCard=T;exports.BuSwitch=C;exports.BInputNumber=b;exports.BTable=I.BTable;exports.Column=m;exports.ColumnGroup=P;exports.BCheckBox=g.BCheckBox;exports.BOverlayScrollbar=y;exports.BDropdown=S.BDropdown;
package/dist/web.mjs CHANGED
@@ -1,32 +1,51 @@
1
- import { default as r } from "./web/Icon/Icon.mjs";
1
+ import { default as t } from "./web/Icon/Icon.mjs";
2
2
  import { default as e } from "./web/Tooltip/ConfirmTooltip.mjs";
3
- import { default as u } from "./web/Tooltip/ProgressTooltip.mjs";
4
- import { default as l } from "./web/Tooltip/ContentTooltip.mjs";
5
- import { default as m } from "./web/Tooltip/TooltipWrapper.mjs";
6
- import { default as x } from "./web/SkuInputCard/SkuInputCard.mjs";
3
+ import { default as p } from "./web/Tooltip/ProgressTooltip.mjs";
4
+ import { default as l, default as d } from "./web/Tooltip/ContentTooltip.mjs";
5
+ import { default as x } from "./web/Tooltip/TooltipWrapper.mjs";
6
+ import { default as B } from "./web/SkuInputCard/SkuInputCard.mjs";
7
7
  import { default as i } from "./web/Input/Input.mjs";
8
- import { default as C } from "./web/EmptyInputBox/EmptyInputBox.mjs";
9
- import { default as T } from "./web/Modal/Modal.mjs";
10
- import { default as g } from "./web/ProductField/ProductField.mjs";
11
- import { default as w } from "./web/CategoryDropdown/CategoryDropdown.mjs";
12
- import { default as F } from "./web/Pagination/Pagination.mjs";
13
- import { default as b } from "./web/FileCard/FileCard.mjs";
14
- import { default as k } from "./web/Switch/Switch.mjs";
15
- import { default as E } from "./web/InputNumber/BInputNumber.mjs";
8
+ import { default as T } from "./web/BasicInput/BInput.mjs";
9
+ import { default as b } from "./web/Tabs/BTabs.mjs";
10
+ import { default as P } from "./web/Tabs/TabPane.mjs";
11
+ import { default as w } from "./web/EmptyInputBox/EmptyInputBox.mjs";
12
+ import { default as S } from "./web/Modal/Modal.mjs";
13
+ import { default as k } from "./web/ProductField/ProductField.mjs";
14
+ import { default as F } from "./web/CategoryDropdown/CategoryDropdown.mjs";
15
+ import { default as E } from "./web/Pagination/Pagination.mjs";
16
+ import { default as M } from "./web/FileCard/FileCard.mjs";
17
+ import { default as O } from "./web/Switch/Switch.mjs";
18
+ import { default as j } from "./web/InputNumber/BInputNumber.mjs";
19
+ import { BTable as z } from "./web/Table/BTable.mjs";
20
+ import { default as H } from "./web/Table/Column.mjs";
21
+ import { default as K } from "./web/Table/ColumnGroup.mjs";
22
+ import { BCheckBox as Q } from "./web/CheckBox/index.mjs";
23
+ import { default as U } from "./web/OverlayScrollbar/BOverlayScrollbar.mjs";
24
+ import { BDropdown as X } from "./web/Dropdown/BDropdown.mjs";
16
25
  export {
17
- E as BInputNumber,
18
- w as BuCategoryDropdown,
19
- C as BuEmptyInputBox,
20
- r as BuIcon,
26
+ Q as BCheckBox,
27
+ X as BDropdown,
28
+ T as BInput,
29
+ j as BInputNumber,
30
+ U as BOverlayScrollbar,
31
+ z as BTable,
32
+ b as BTabs,
33
+ l as BTooltip,
34
+ F as BuCategoryDropdown,
35
+ w as BuEmptyInputBox,
36
+ t as BuIcon,
21
37
  i as BuInput,
22
- T as BuModal,
23
- g as BuProductField,
24
- k as BuSwitch,
38
+ S as BuModal,
39
+ k as BuProductField,
40
+ O as BuSwitch,
41
+ H as Column,
42
+ K as ColumnGroup,
25
43
  e as ConfirmTooltip,
26
- l as ContentTooltip,
27
- b as FileCard,
28
- F as Pagination,
29
- u as ProgressTooltip,
30
- x as SkuInputCard,
31
- m as TooltipWrapper
44
+ d as ContentTooltip,
45
+ M as FileCard,
46
+ E as Pagination,
47
+ p as ProgressTooltip,
48
+ B as SkuInputCard,
49
+ P as TabPane,
50
+ x as TooltipWrapper
32
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bj-web-components",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "Enterprise UI component library for Web, Mobile, and Mini-app platforms",
5
5
  "keywords": [
6
6
  "react",
@@ -68,8 +68,8 @@
68
68
  "build:lib:watch": "vite build --mode lib --watch"
69
69
  },
70
70
  "peerDependencies": {
71
- "react": ">=17.0.0",
72
- "react-dom": ">=17.0.0"
71
+ "react": ">=17.0.2",
72
+ "react-dom": ">=17.0.2"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@tailwindcss/postcss": "^4",