bj-web-components 0.2.18 → 0.2.19

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.
@@ -1,5 +1,5 @@
1
1
  import { jsxs as P, jsx as f } from "react/jsx-runtime";
2
- import { useRef as ne, useMemo as Q, useState as k, useEffect as X, createElement as Ke, isValidElement as Zt } from "react";
2
+ import { useRef as ne, useMemo as Q, useState as k, useEffect as Y, createElement as Ke, isValidElement as Zt } from "react";
3
3
  import { createPortal as Xt } from "react-dom";
4
4
  import Yt from "../Pagination/Pagination.mjs";
5
5
  import Be from "../Icon/Icon.mjs";
@@ -94,7 +94,7 @@ function pr({
94
94
  emptyText: _e,
95
95
  emptyImage: ye = sr,
96
96
  emptyHeight: yt,
97
- t: Y = (le) => le,
97
+ t: Z = (le) => le,
98
98
  className: jt,
99
99
  style: pt,
100
100
  rowClassName: je,
@@ -110,7 +110,7 @@ function pr({
110
110
  onHeaderRow: ve,
111
111
  id: vt,
112
112
  scroll: b,
113
- locale: Z,
113
+ locale: X,
114
114
  groupCollapse: h
115
115
  }) {
116
116
  var it, st, nt;
@@ -146,9 +146,9 @@ function pr({
146
146
  const r = be(e, t), s = $.includes(r), l = s ? $.filter((i) => i !== r) : [...$, r];
147
147
  (h == null ? void 0 : h.expandedKeys) === void 0 && Ot(l), (c = h == null ? void 0 : h.onExpandedKeysChange) == null || c.call(h, l, e, !s);
148
148
  };
149
- X(() => {
149
+ Y(() => {
150
150
  q !== ge && (a == null ? void 0 : a.current) === void 0 && ce(q);
151
- }, [q, a == null ? void 0 : a.current, ge]), X(() => {
151
+ }, [q, a == null ? void 0 : a.current, ge]), Y(() => {
152
152
  if (!W || S === null) {
153
153
  Ae(null);
154
154
  return;
@@ -160,20 +160,20 @@ function pr({
160
160
  return e(), document.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
161
161
  document.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
162
162
  };
163
- }, [W, S]), X(() => {
163
+ }, [W, S]), Y(() => {
164
164
  if (S === null) return;
165
165
  const e = (t) => {
166
166
  const r = t.target;
167
167
  W != null && W.contains(r) || r.closest(".bj-table__filter-dropdown") || (U(null), Ne(null));
168
168
  };
169
169
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
170
- }, [W, S]), X(() => {
170
+ }, [W, S]), Y(() => {
171
171
  const e = window.setTimeout(
172
172
  () => He(Fe.trim()),
173
173
  or
174
174
  );
175
175
  return () => window.clearTimeout(e);
176
- }, [Fe]), X(() => {
176
+ }, [Fe]), Y(() => {
177
177
  if (S === null) return;
178
178
  const e = C.find((r, s) => E(r, s) === S);
179
179
  if (!e || "children" in e || !e.filterRequest) return;
@@ -211,7 +211,7 @@ function pr({
211
211
  () => H.map(({ record: e, index: t }) => G(e, t, _)),
212
212
  [_, H]
213
213
  ), Mt = K.map(String).join("|"), Tt = Qe.map(String).join("|");
214
- X(() => {
214
+ Y(() => {
215
215
  var l;
216
216
  if (!n || F || K.length === 0) return;
217
217
  const e = new Set(Qe), t = K.filter((c) => e.has(c));
@@ -315,7 +315,7 @@ function pr({
315
315
  rr,
316
316
  {
317
317
  ...e.filterDropdownProps,
318
- emptyText: (Z == null ? void 0 : Z.filterEmptyText) ?? Y("暂无结果"),
318
+ emptyText: (X == null ? void 0 : X.filterEmptyText) ?? Z("暂无结果"),
319
319
  multiple: e.filterMultiple !== !1,
320
320
  onChange: (d, j) => {
321
321
  var O, lt;
@@ -339,8 +339,9 @@ function pr({
339
339
  value: d.value
340
340
  })),
341
341
  searchable: ((T = e.filterDropdownProps) == null ? void 0 : T.searchable) ?? D,
342
- searchPlaceholder: ((se = e.filterDropdownProps) == null ? void 0 : se.searchPlaceholder) ?? (e.filterRequest ? Y("请输入搜索内容") : (Z == null ? void 0 : Z.filterSearchPlaceholder) ?? Y("搜索")),
342
+ searchPlaceholder: ((se = e.filterDropdownProps) == null ? void 0 : se.searchPlaceholder) ?? (e.filterRequest ? Z("请输入搜索内容") : (X == null ? void 0 : X.filterSearchPlaceholder) ?? Z("搜索")),
343
343
  searchValue: Fe,
344
+ t: Z,
344
345
  value: i
345
346
  }
346
347
  )
@@ -419,7 +420,7 @@ function pr({
419
420
  width: b.x === !0 ? "max-content" : b.x,
420
421
  minWidth: "100%",
421
422
  tableLayout: Se ?? "fixed"
422
- } : { tableLayout: Se }, Ht = (g == null ? void 0 : g.table) ?? "table", Ut = ((it = g == null ? void 0 : g.header) == null ? void 0 : it.wrapper) ?? "thead", Wt = ((st = g == null ? void 0 : g.header) == null ? void 0 : st.row) ?? "tr", tt = ((nt = g == null ? void 0 : g.header) == null ? void 0 : nt.cell) ?? "th", V = typeof (g == null ? void 0 : g.body) == "object" ? g.body : void 0, $t = (V == null ? void 0 : V.wrapper) ?? "tbody", rt = (V == null ? void 0 : V.row) ?? "tr", Ee = (V == null ? void 0 : V.cell) ?? "td", Jt = typeof _e == "function" ? _e() : _e ?? Y("暂无数据"), at = typeof ye == "string" ? /* @__PURE__ */ f("img", { alt: "", className: "bj-table__empty-image", src: ye }) : ye;
423
+ } : { tableLayout: Se }, Ht = (g == null ? void 0 : g.table) ?? "table", Ut = ((it = g == null ? void 0 : g.header) == null ? void 0 : it.wrapper) ?? "thead", Wt = ((st = g == null ? void 0 : g.header) == null ? void 0 : st.row) ?? "tr", tt = ((nt = g == null ? void 0 : g.header) == null ? void 0 : nt.cell) ?? "th", V = typeof (g == null ? void 0 : g.body) == "object" ? g.body : void 0, $t = (V == null ? void 0 : V.wrapper) ?? "tbody", rt = (V == null ? void 0 : V.row) ?? "tr", Ee = (V == null ? void 0 : V.cell) ?? "td", Jt = typeof _e == "function" ? _e() : _e ?? Z("暂无数据"), at = typeof ye == "string" ? /* @__PURE__ */ f("img", { alt: "", className: "bj-table__empty-image", src: ye }) : ye;
423
424
  return /* @__PURE__ */ P(
424
425
  "div",
425
426
  {
@@ -629,7 +630,7 @@ function pr({
629
630
  showTotal: a.showTotal,
630
631
  simple: a.simple,
631
632
  size: a.size,
632
- t: a.t ?? Y,
633
+ t: a.t ?? Z,
633
634
  total: We
634
635
  }
635
636
  ) })
package/dist/web.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import { CSSProperties } from 'react';
2
- import { default as default_2 } from 'react';
3
2
  import { FocusEvent as FocusEvent_2 } from 'react';
4
3
  import { FocusEventHandler } from 'react';
5
4
  import { ForwardRefExoticComponent } from 'react';
6
5
  import { HTMLAttributes } from 'react';
7
6
  import { InputHTMLAttributes } from 'react';
8
- import { JSX } from 'react';
7
+ import { JSX } from 'react/jsx-runtime';
9
8
  import { Key } from 'react';
10
9
  import { KeyboardEvent as KeyboardEvent_2 } from 'react';
11
10
  import { KeyboardEventHandler } from 'react';
@@ -868,7 +867,7 @@ export declare interface ProductFieldOption {
868
867
  searchText?: string;
869
868
  }
870
869
 
871
- export declare function ProgressTooltip({ placement, title, progress, className, style, }: ProgressTooltipProps): default_2.JSX.Element;
870
+ export declare function ProgressTooltip({ placement, title, progress, className, style, }: ProgressTooltipProps): JSX.Element;
872
871
 
873
872
  export declare interface ProgressTooltipProps extends BaseTooltipProps {
874
873
  title?: string;
package/package.json CHANGED
@@ -1,92 +1,92 @@
1
- {
2
- "name": "bj-web-components",
3
- "version": "0.2.18",
4
- "description": "Enterprise UI component library for Web, Mobile, and Mini-app platforms",
5
- "keywords": [
6
- "react",
7
- "ui",
8
- "component",
9
- "design-system",
10
- "web",
11
- "mobile",
12
- "miniapp"
13
- ],
14
- "author": "hkm-hfrl",
15
- "license": "MIT",
16
- "repository": {
17
- "type": "git",
18
- "url": ""
19
- },
20
- "private": false,
21
- "main": "./dist/index.js",
22
- "module": "./dist/index.mjs",
23
- "types": "./dist/index.d.ts",
24
- "exports": {
25
- ".": {
26
- "types": "./dist/index.d.ts",
27
- "import": "./dist/index.mjs",
28
- "require": "./dist/index.js"
29
- },
30
- "./react": {
31
- "types": "./dist/react.d.ts",
32
- "import": "./dist/react.mjs",
33
- "require": "./dist/react.js"
34
- },
35
- "./web": {
36
- "types": "./dist/web.d.ts",
37
- "import": "./dist/web.mjs",
38
- "require": "./dist/web.js"
39
- },
40
- "./mobile": {
41
- "types": "./dist/mobile.d.ts",
42
- "import": "./dist/mobile.mjs",
43
- "require": "./dist/mobile.js"
44
- },
45
- "./miniapp": {
46
- "types": "./dist/miniapp.d.ts",
47
- "import": "./dist/miniapp.mjs",
48
- "require": "./dist/miniapp.js"
49
- },
50
- "./shared": {
51
- "types": "./dist/shared.d.ts",
52
- "import": "./dist/shared.mjs",
53
- "require": "./dist/shared.js"
54
- },
55
- "./style": "./dist/style.css"
56
- },
57
- "files": [
58
- "dist"
59
- ],
60
- "scripts": {
61
- "dev": "vite",
62
- "build": "vite build --mode lib --minify false",
63
- "build:dev": "vite build --mode lib --watch --minify false",
64
- "build:docs": "vite build",
65
- "preview": "vite preview",
66
- "lint": "eslint",
67
- "build:lib": "vite build --mode lib",
68
- "build:lib:watch": "vite build --mode lib --watch"
69
- },
70
- "peerDependencies": {
71
- "react": ">=17.0.2",
72
- "react-dom": ">=17.0.2"
73
- },
74
- "devDependencies": {
75
- "@tailwindcss/postcss": "^4",
76
- "@types/node": "^20",
77
- "@types/react": "^19",
78
- "@types/react-dom": "^19",
79
- "@vitejs/plugin-react": "^4.3.4",
80
- "antd": "^6.3.3",
81
- "eslint": "^9",
82
- "less": "^4.6.4",
83
- "lucide-react": "^0.577.0",
84
- "react": "19.2.3",
85
- "react-dom": "19.2.3",
86
- "react-router-dom": "^6.30.3",
87
- "tailwindcss": "^4",
88
- "typescript": "^5",
89
- "vite": "^6.0.7",
90
- "vite-plugin-dts": "^4.3.0"
91
- }
92
- }
1
+ {
2
+ "name": "bj-web-components",
3
+ "version": "0.2.19",
4
+ "description": "Enterprise UI component library for Web, Mobile, and Mini-app platforms",
5
+ "keywords": [
6
+ "react",
7
+ "ui",
8
+ "component",
9
+ "design-system",
10
+ "web",
11
+ "mobile",
12
+ "miniapp"
13
+ ],
14
+ "author": "hkm-hfrl",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": ""
19
+ },
20
+ "private": false,
21
+ "main": "./dist/index.js",
22
+ "module": "./dist/index.mjs",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.mjs",
28
+ "require": "./dist/index.js"
29
+ },
30
+ "./react": {
31
+ "types": "./dist/react.d.ts",
32
+ "import": "./dist/react.mjs",
33
+ "require": "./dist/react.js"
34
+ },
35
+ "./web": {
36
+ "types": "./dist/web.d.ts",
37
+ "import": "./dist/web.mjs",
38
+ "require": "./dist/web.js"
39
+ },
40
+ "./mobile": {
41
+ "types": "./dist/mobile.d.ts",
42
+ "import": "./dist/mobile.mjs",
43
+ "require": "./dist/mobile.js"
44
+ },
45
+ "./miniapp": {
46
+ "types": "./dist/miniapp.d.ts",
47
+ "import": "./dist/miniapp.mjs",
48
+ "require": "./dist/miniapp.js"
49
+ },
50
+ "./shared": {
51
+ "types": "./dist/shared.d.ts",
52
+ "import": "./dist/shared.mjs",
53
+ "require": "./dist/shared.js"
54
+ },
55
+ "./style": "./dist/style.css"
56
+ },
57
+ "files": [
58
+ "dist"
59
+ ],
60
+ "scripts": {
61
+ "dev": "vite",
62
+ "build": "vite build --mode lib --minify false",
63
+ "build:dev": "vite build --mode lib --watch --minify false",
64
+ "build:docs": "vite build",
65
+ "preview": "vite preview",
66
+ "lint": "eslint",
67
+ "build:lib": "vite build --mode lib",
68
+ "build:lib:watch": "vite build --mode lib --watch"
69
+ },
70
+ "peerDependencies": {
71
+ "react": ">=17.0.2",
72
+ "react-dom": ">=17.0.2"
73
+ },
74
+ "devDependencies": {
75
+ "@tailwindcss/postcss": "^4",
76
+ "@types/node": "^20",
77
+ "@types/react": "^19",
78
+ "@types/react-dom": "^19",
79
+ "@vitejs/plugin-react": "^4.3.4",
80
+ "antd": "^6.3.3",
81
+ "eslint": "^9",
82
+ "less": "^4.6.4",
83
+ "lucide-react": "^0.577.0",
84
+ "react": "19.2.3",
85
+ "react-dom": "19.2.3",
86
+ "react-router-dom": "^6.30.3",
87
+ "tailwindcss": "^4",
88
+ "typescript": "^5",
89
+ "vite": "^6.0.7",
90
+ "vite-plugin-dts": "^4.3.0"
91
+ }
92
+ }