bitz-react-admin-ui 1.8.0 → 1.8.1

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,4 +1,4 @@
1
- var s = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- s as __module
3
+ p as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var s = { exports: {} };
2
2
  export {
3
- p as __module
3
+ s as __module
4
4
  };
@@ -4,6 +4,11 @@ import { AliasToken } from 'antd/es/theme/internal';
4
4
  import { ComponentTokenMap } from 'antd/lib/theme/interface/components';
5
5
  import { FC } from 'react';
6
6
  import { BitzConfigProviderContextProps } from './context';
7
+ interface TableConfigBySize {
8
+ fontSize?: number;
9
+ height?: number;
10
+ lineHeight?: number;
11
+ }
7
12
  /** 给ant table组件添加design token */
8
13
  export interface BitzTableComponentToken extends TableComponentToken {
9
14
  /** 工具栏背景颜色 */
@@ -15,15 +20,15 @@ export interface BitzTableComponentToken extends TableComponentToken {
15
20
  /** 展开按钮border颜色 */
16
21
  expandIconBorderColor?: string;
17
22
  /** xl */
18
- xlFontSize?: number;
23
+ xlTable?: TableConfigBySize;
19
24
  /** lg */
20
- lgFontSize?: number;
25
+ lgTable?: TableConfigBySize;
21
26
  /** md */
22
- mdFontSize?: number;
27
+ mdTable?: TableConfigBySize;
23
28
  /** sm */
24
- smFontSize?: number;
29
+ smTable?: TableConfigBySize;
25
30
  /** xs */
26
- xsFontSize?: number;
31
+ xsTable?: TableConfigBySize;
27
32
  /** list背景颜色 移动端 */
28
33
  mobileListBgColor?: string;
29
34
  /** listItem背景颜色 移动端 */
@@ -3,11 +3,7 @@ import { ModalProps } from 'antd';
3
3
  import { NiceModalHandler } from '@ebay/nice-modal-react';
4
4
  import './index.less';
5
5
  export interface BitzConfirmModalProps extends Omit<ModalProps, 'onOk' | 'onCancel'> {
6
- okButtonProps: any;
7
- okType: any;
8
- /**
9
- * 内容文字
10
- */
6
+ /** 内容文字 */
11
7
  modalText?: ReactNode;
12
8
  /** 点击ok按钮,返回'yes' */
13
9
  onOk?: () => Promise<any>;
@@ -15,7 +11,8 @@ export interface BitzConfirmModalProps extends Omit<ModalProps, 'onOk' | 'onCanc
15
11
  onCancel?: () => any;
16
12
  }
17
13
  export type BitzConfirmModalResolveType = 'ok' | 'cancel';
18
- export interface BitzConfirmModalHandler extends Omit<NiceModalHandler, 'resolve'> {
14
+ export interface BitzConfirmModalHandler extends Omit<NiceModalHandler<BitzConfirmModalProps>, 'resolve' | 'show'> {
15
+ show: (args?: BitzConfirmModalProps) => Promise<BitzConfirmModalResolveType>;
19
16
  resolve: (args?: BitzConfirmModalResolveType) => void;
20
17
  }
21
18
  declare const _default: FC<BitzConfirmModalProps & import("@ebay/nice-modal-react").NiceModalHocProps>;
@@ -1,5 +1,4 @@
1
- import { useContext as f, useMemo as z } from "react";
2
- import { theme as B } from "antd";
1
+ import { useContext as D, useMemo as v } from "react";
3
2
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
4
3
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
5
4
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
@@ -9,32 +8,56 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@an
9
8
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
10
9
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
11
10
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
12
- import T from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
11
+ import A from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
13
12
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
14
- import { TableContext as x } from "../Store/index.mjs";
15
- import $ from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
16
- const F = (m) => {
17
- const { theme: d, hashId: r, token: a } = B.useToken(), { tableSize: s } = f(x), h = z(() => m ?? s ?? "lg", [m, s]), e = "bitzTableActionBarBlock", n = "actionBtn", c = "ActionBtn", l = "dropdownBtn", S = (o, i, t) => [
18
- {
19
- [`.${o} .${i}`]: {
20
- height: "100%",
21
- borderRadius: 0,
22
- paddingBlock: 0,
23
- borderColor: "transparent",
24
- lineHeight: "normal",
25
- ".ant-btn-icon .anticon": {
26
- verticalAlign: "-0.14em"
13
+ import { TableContext as N } from "../Store/index.mjs";
14
+ import z from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
15
+ import w from "../../BitzTheme/index.mjs";
16
+ const Q = (m) => {
17
+ const { theme: g, hashId: n, token: i } = w.useToken(), { tableSize: s } = D(N), h = v(() => m ?? s ?? "lg", [m, s]), r = "bitzTableActionBarBlock", a = "actionBtn", c = "ActionBtn", p = "dropdownBtn", u = (o, l, t, e) => {
18
+ var $, b, T, S, f;
19
+ return [
20
+ {
21
+ [`.${o} .${l}`]: {
22
+ height: "100%",
23
+ borderRadius: 0,
24
+ paddingBlock: 0,
25
+ borderColor: "transparent",
26
+ lineHeight: "normal",
27
+ ".ant-btn-icon .anticon": {
28
+ verticalAlign: "-0.14em"
29
+ }
30
+ }
31
+ },
32
+ {
33
+ [`.${o} .xl${t}`]: {
34
+ fontSize: ($ = e.Table.xlTable) == null ? void 0 : $.fontSize
35
+ }
36
+ },
37
+ {
38
+ [`.${o} .lg${t}`]: {
39
+ fontSize: (b = e.Table.lgTable) == null ? void 0 : b.fontSize
40
+ }
41
+ },
42
+ {
43
+ [`.${o} .md${t}`]: {
44
+ fontSize: (T = e.Table.mdTable) == null ? void 0 : T.fontSize
45
+ }
46
+ },
47
+ {
48
+ [`.${o} .sm${t}`]: {
49
+ fontSize: (S = e.Table.smTable) == null ? void 0 : S.fontSize
50
+ }
51
+ },
52
+ {
53
+ [`.${o} .xs${t}`]: {
54
+ fontSize: (f = e.Table.xsTable) == null ? void 0 : f.fontSize
27
55
  }
28
56
  }
29
- },
30
- { [`.${o} .xl${t}`]: { fontSize: 14 } },
31
- { [`.${o} .lg${t}`]: { fontSize: 12 } },
32
- { [`.${o} .md${t}`]: { fontSize: 12 } },
33
- { [`.${o} .sm${t}`]: { fontSize: 12 } },
34
- { [`.${o} .xs${t}`]: { fontSize: 12 } }
35
- ], g = (o, i, t) => [
57
+ ];
58
+ }, B = (o, l, t) => [
36
59
  {
37
- [`.${o} .${i}`]: {
60
+ [`.${o} .${l}`]: {
38
61
  "&:hover": {
39
62
  color: `${t.colorText} !important`
40
63
  },
@@ -50,21 +73,21 @@ const F = (m) => {
50
73
  }
51
74
  }
52
75
  ];
53
- T(
76
+ A(
54
77
  {
55
- theme: d,
56
- token: a,
57
- hashId: r,
58
- path: [e]
78
+ theme: g,
79
+ token: i,
80
+ hashId: n,
81
+ path: [r]
59
82
  },
60
83
  () => [
61
- S(e, n, c),
62
- g(e, l, a)
84
+ u(r, a, c, i),
85
+ B(r, p, i)
63
86
  ]
64
87
  );
65
- const p = `${h}${c}`, u = $(n, p, r), b = $(n, l, p, r);
66
- return { blockCls: e, addBtnClassName: u, btnClassName: b };
88
+ const d = `${h}${c}`, x = z(a, d, n), y = z(a, p, d, n);
89
+ return { blockCls: r, addBtnClassName: x, btnClassName: y };
67
90
  };
68
91
  export {
69
- F as default
92
+ Q as default
70
93
  };
@@ -1,4 +1,4 @@
1
- import { useContext as w, useMemo as I } from "react";
1
+ import { useContext as G, useMemo as R } from "react";
2
2
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
3
3
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
4
4
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
@@ -8,43 +8,46 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@an
8
8
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
9
9
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
10
10
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
11
- import D from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
11
+ import j from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
12
12
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
13
- import { TableContext as P } from "../Store/index.mjs";
13
+ import { TableContext as q } from "../Store/index.mjs";
14
14
  import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
15
- import k from "../../BitzTheme/index.mjs";
16
- const X = () => {
17
- const { tableSize: l } = w(P), g = I(() => l ?? "lg", [l]), { theme: v, hashId: r, token: i } = k.useToken(), a = "ActionTextBtn", e = "actionTextBtn", c = "primaryBtn", m = "delBtn", p = "dropdownBtn", d = "skeletonBtn", $ = "skeleton", B = "actionColMask", h = 24, u = (t, o, E) => [
18
- {
19
- [`.${t}`]: {
20
- padding: 0,
21
- margin: 0,
22
- background: "inherit",
23
- border: "none",
24
- height: "auto",
25
- zIndex: 2,
26
- "&:hover": {
27
- background: "inherit !important"
28
- },
29
- "&:active": {
30
- background: "inherit !important"
15
+ import F from "../../BitzTheme/index.mjs";
16
+ const eo = () => {
17
+ const { tableSize: a } = G(q), f = R(() => a ?? "lg", [a]), { theme: h, hashId: e, token: s } = F.useToken(), c = "ActionTextBtn", r = "actionTextBtn", m = "primaryBtn", p = "delBtn", d = "dropdownBtn", $ = "skeletonBtn", B = "skeleton", S = "actionColMask", u = 24, y = (t, o, A, i) => {
18
+ var T, b, g, z, v;
19
+ return [
20
+ {
21
+ [`.${t}`]: {
22
+ padding: 0,
23
+ margin: 0,
24
+ background: "inherit",
25
+ border: "none",
26
+ height: "auto",
27
+ zIndex: 2,
28
+ "&:hover": {
29
+ background: "inherit !important"
30
+ },
31
+ "&:active": {
32
+ background: "inherit !important"
33
+ }
34
+ }
35
+ },
36
+ { [`.xl${o}`]: { fontSize: (T = i.Table.xlTable) == null ? void 0 : T.fontSize } },
37
+ { [`.lg${o}`]: { fontSize: (b = i.Table.lgTable) == null ? void 0 : b.fontSize } },
38
+ { [`.md${o}`]: { fontSize: (g = i.Table.mdTable) == null ? void 0 : g.fontSize } },
39
+ { [`.sm${o}`]: { fontSize: (z = i.Table.smTable) == null ? void 0 : z.fontSize } },
40
+ { [`.xs${o}`]: { fontSize: (v = i.Table.xsTable) == null ? void 0 : v.fontSize } },
41
+ {
42
+ [`.${A}`]: {
43
+ position: "absolute",
44
+ insetBlock: -1,
45
+ insetInline: 0,
46
+ zIndex: 1
31
47
  }
32
48
  }
33
- },
34
- { [`.xl${o}`]: { fontSize: 14 } },
35
- { [`.lg${o}`]: { fontSize: 12 } },
36
- { [`.md${o}`]: { fontSize: 12 } },
37
- { [`.sm${o}`]: { fontSize: 11 } },
38
- { [`.xs${o}`]: { fontSize: 11 } },
39
- {
40
- [`.${E}`]: {
41
- position: "absolute",
42
- insetBlock: -1,
43
- insetInline: 0,
44
- zIndex: 1
45
- }
46
- }
47
- ], y = (t, o) => [
49
+ ];
50
+ }, C = (t, o) => [
48
51
  {
49
52
  [`.${t}`]: {
50
53
  color: o.colorPrimary,
@@ -56,7 +59,7 @@ const X = () => {
56
59
  }
57
60
  }
58
61
  }
59
- ], S = (t, o) => [
62
+ ], x = (t, o) => [
60
63
  {
61
64
  [`.${t}`]: {
62
65
  color: o.colorError,
@@ -68,7 +71,7 @@ const X = () => {
68
71
  }
69
72
  }
70
73
  }
71
- ], C = (t, o) => [
74
+ ], N = (t, o) => [
72
75
  {
73
76
  [`.${t}`]: {
74
77
  color: o.colorText,
@@ -80,7 +83,7 @@ const X = () => {
80
83
  }
81
84
  }
82
85
  }
83
- ], z = (t, o) => [
86
+ ], H = (t, o) => [
84
87
  {
85
88
  [`.${t}`]: {
86
89
  pointerEvents: "none",
@@ -96,49 +99,49 @@ const X = () => {
96
99
  }
97
100
  }
98
101
  ];
99
- D(
102
+ j(
100
103
  {
101
- theme: v,
102
- token: i,
103
- hashId: r,
104
- path: [e]
104
+ theme: h,
105
+ token: s,
106
+ hashId: e,
107
+ path: [r]
105
108
  },
106
109
  () => [
107
- u(e, a, B),
108
- y(c, i),
109
- S(m, i),
110
- C(p, i),
111
- z(d, $)
110
+ y(r, c, S, s),
111
+ C(m, s),
112
+ x(p, s),
113
+ N(d, s),
114
+ H($, B)
112
115
  ]
113
116
  );
114
- const s = `${g}${a}`, f = n(
115
- e,
116
- c,
117
- s,
118
- r
119
- ), x = n(e, m, s, r), T = n(
120
- e,
121
- p,
122
- s,
123
- r
124
- ), b = n(
125
- e,
117
+ const l = `${f}${c}`, E = n(
118
+ r,
119
+ m,
120
+ l,
121
+ e
122
+ ), w = n(r, p, l, e), I = n(
123
+ r,
126
124
  d,
127
- s,
128
- r
129
- ), N = n($, r), H = n(B, r);
125
+ l,
126
+ e
127
+ ), D = n(
128
+ r,
129
+ $,
130
+ l,
131
+ e
132
+ ), P = n(B, e), M = n(S, e);
130
133
  return {
131
- gap: h,
132
- defaultCls: e,
133
- sizeCls: s,
134
- primaryBtnClassName: f,
135
- dangerBtnClassName: x,
136
- dropdownBtnClassName: T,
137
- skeletonBtnClassName: b,
138
- skeletonClassName: N,
139
- maskClassName: H
134
+ gap: u,
135
+ defaultCls: r,
136
+ sizeCls: l,
137
+ primaryBtnClassName: E,
138
+ dangerBtnClassName: w,
139
+ dropdownBtnClassName: I,
140
+ skeletonBtnClassName: D,
141
+ skeletonClassName: P,
142
+ maskClassName: M
140
143
  };
141
144
  };
142
145
  export {
143
- X as default
146
+ eo as default
144
147
  };