@baishuyun/ui-base 3.0.2 → 6.0.0
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.
- package/dist/Amap/AmapCircle/index.js +1 -1
- package/dist/Amap/{AmapCircle-COjtl-XB.js → AmapCircle-mh92P2l6.js} +1 -1
- package/dist/Amap/AmapProvider/index.js +2 -2
- package/dist/Amap/{AmapProvider-CWbRK6QL.js → AmapProvider-BkJp-sWi.js} +1 -1
- package/dist/Amap/index.js +3 -3
- package/dist/ColorPicker/{ColorPicker-B-KaMDAn.js → ColorPicker-nnQIw0_e.js} +7 -7
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/Editor/{Buttons-CZOTyAPL.js → Buttons-D17RQIEb.js} +27 -27
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +3 -3
- package/dist/Editor/index.js +3 -3
- package/dist/Modal/{Modal-CuDbh_WD.js → Modal-CweuD-VO.js} +37 -29
- package/dist/Modal/index.js +1 -1
- package/dist/Select/{Select-xuQGK6It.js → Select-D8T0S1_m.js} +6 -6
- package/dist/Select/index.js +1 -1
- package/dist/components/Amap/Amap.d.ts +1 -1
- package/dist/components/Amap/{interface.d.ts → Amap.type.d.ts} +187 -2
- package/dist/components/Amap/AmapCircle/AmapCircle.d.ts +1 -1
- package/dist/components/Amap/AmapMarker/AmapMarker.d.ts +1 -1
- package/dist/components/Amap/AmapMarker/useMarkerInfoWindow.d.ts +1 -1
- package/dist/components/Amap/AmapMarker/useMarkerInfoWindowController.d.ts +1 -1
- package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.d.ts +1 -1
- package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.type.d.ts +1 -1
- package/dist/components/Amap/AmapMarkerCluster/utils.d.ts +1 -1
- package/dist/components/Amap/AmapProvider/AmapProvider.d.ts +1 -1
- package/dist/components/Amap/context/AmapContext.d.ts +1 -1
- package/dist/components/Amap/hooks/useAmap.d.ts +1 -1
- package/dist/components/Amap/hooks/useCurrentLocation.d.ts +1 -1
- package/dist/components/Amap/index.d.ts +1 -1
- package/dist/components/Amap/utils/currentLocation.d.ts +1 -1
- package/dist/components/Modal/Modal.type.d.ts +4 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/theme.d.ts +6 -0
- package/dist/index.js +22 -48
- package/dist/style.css +1 -1
- package/dist/{ConfigProvider/ConfigProvider-Bx-uxnns.js → vendors/ConfigProvider-BekyDD3V.js} +86 -22
- package/package.json +5 -9
- package/dist/locale/LocaleProvider.d.ts +0 -9
- /package/dist/locale/__tests__/{LocaleProvider.test.d.ts → locale.test.d.ts} +0 -0
package/dist/{ConfigProvider/ConfigProvider-Bx-uxnns.js → vendors/ConfigProvider-BekyDD3V.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { n as e, t } from "
|
|
1
|
+
import { n as e, t } from "./LocaleContext-Jj_JGgi2.js";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as r, useCallback as i, useContext as a, useMemo as o } from "react";
|
|
4
|
-
|
|
4
|
+
import { ConfigProvider as s } from "antd";
|
|
5
|
+
var c = {
|
|
5
6
|
select: "請選擇",
|
|
6
7
|
search: "搜尋",
|
|
7
8
|
noFindData: "未搜尋到任何資料",
|
|
@@ -61,7 +62,7 @@ var s = {
|
|
|
61
62
|
picture: "圖片",
|
|
62
63
|
addPicture: "新增圖片",
|
|
63
64
|
customColor: "自訂顏色"
|
|
64
|
-
},
|
|
65
|
+
}, l = {
|
|
65
66
|
select: "Please select",
|
|
66
67
|
search: "search",
|
|
67
68
|
noFindData: "No search data",
|
|
@@ -121,12 +122,72 @@ var s = {
|
|
|
121
122
|
picture: "Picture",
|
|
122
123
|
customColor: "Custom Color",
|
|
123
124
|
addPicture: "Add Picture"
|
|
124
|
-
},
|
|
125
|
+
}, u = {
|
|
126
|
+
token: {
|
|
127
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, PingFang SC, Noto Sans, Noto Sans CJK SC, Microsoft YaHei, 微软雅黑, sans-serif",
|
|
128
|
+
colorPrimary: "#0265ff",
|
|
129
|
+
borderRadius: 4
|
|
130
|
+
},
|
|
131
|
+
components: {
|
|
132
|
+
Input: {
|
|
133
|
+
controlHeight: 34,
|
|
134
|
+
paddingInline: 10,
|
|
135
|
+
activeShadow: "none",
|
|
136
|
+
activeBorderColor: "#0265ff",
|
|
137
|
+
colorTextPlaceholder: "#999"
|
|
138
|
+
},
|
|
139
|
+
InputNumber: {
|
|
140
|
+
controlHeight: 34,
|
|
141
|
+
paddingInline: 10,
|
|
142
|
+
colorTextPlaceholder: "#999",
|
|
143
|
+
activeShadow: "none"
|
|
144
|
+
},
|
|
145
|
+
DatePicker: {
|
|
146
|
+
paddingInline: 10,
|
|
147
|
+
controlHeight: 34,
|
|
148
|
+
colorTextPlaceholder: "#999",
|
|
149
|
+
cellWidth: 36,
|
|
150
|
+
cellHeight: 36
|
|
151
|
+
},
|
|
152
|
+
Button: {
|
|
153
|
+
borderRadius: 4,
|
|
154
|
+
dangerShadow: "none",
|
|
155
|
+
defaultShadow: "none",
|
|
156
|
+
primaryShadow: "none",
|
|
157
|
+
colorError: "#ff5631",
|
|
158
|
+
colorLink: "#0265ff",
|
|
159
|
+
colorLinkHover: "rgba(2,99,255,0.8)",
|
|
160
|
+
colorErrorHover: "rgba(255,87,49,0.8)",
|
|
161
|
+
defaultHoverBg: "#e5e5e5",
|
|
162
|
+
defaultHoverColor: "#121211",
|
|
163
|
+
defaultActiveBg: "#e5e5e5",
|
|
164
|
+
defaultColor: "#121211",
|
|
165
|
+
defaultActiveColor: "#121211",
|
|
166
|
+
defaultHoverBorderColor: "#e5e5e5",
|
|
167
|
+
defaultActiveBorderColor: "#e5e5e5"
|
|
168
|
+
},
|
|
169
|
+
Popover: {
|
|
170
|
+
sizePopupArrow: 0,
|
|
171
|
+
borderRadius: 4,
|
|
172
|
+
padding: 10,
|
|
173
|
+
colorText: "#121211",
|
|
174
|
+
boxShadowSecondary: "0px 0px 10px 0px rgba(0, 0, 0, 0.08);"
|
|
175
|
+
},
|
|
176
|
+
Segmented: {
|
|
177
|
+
itemColor: "#121211",
|
|
178
|
+
itemSelectedColor: "#0265ff",
|
|
179
|
+
trackBg: "#f3f3f3",
|
|
180
|
+
colorPrimaryBorder: "#e0e0e0",
|
|
181
|
+
controlHeight: 34,
|
|
182
|
+
borderRadius: 4
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}, d = r({}), f = () => a(d), p = (...e) => e.reduce((e, t) => (t && Object.entries(t).forEach(([t, n]) => {
|
|
125
186
|
e[t] = {
|
|
126
187
|
...e[t] || {},
|
|
127
188
|
...n || {}
|
|
128
189
|
};
|
|
129
|
-
}), e), {}),
|
|
190
|
+
}), e), {}), m = (e, t) => {
|
|
130
191
|
if (!e && !t) return;
|
|
131
192
|
let n = Array.from(new Set([...e?.plugins || [], ...t?.plugins || []]));
|
|
132
193
|
return {
|
|
@@ -134,26 +195,29 @@ var s = {
|
|
|
134
195
|
...t,
|
|
135
196
|
plugins: n.length ? n : void 0
|
|
136
197
|
};
|
|
137
|
-
},
|
|
138
|
-
let
|
|
198
|
+
}, h = (r) => {
|
|
199
|
+
let f = a(d), h = a(t), { children: g, locale: _ = h.locale, messages: v = {}, amap: y } = r, b = o(() => p({
|
|
139
200
|
"zh-CN": e,
|
|
140
|
-
"zh-TW":
|
|
141
|
-
"en-US":
|
|
142
|
-
},
|
|
143
|
-
let t = e.split("."), n =
|
|
144
|
-
for (let r of t) if (n = n[r], !n) return console.warn(`[
|
|
201
|
+
"zh-TW": c,
|
|
202
|
+
"en-US": l
|
|
203
|
+
}, v), [v]), x = o(() => b[_] || e, [b, _]), S = i((e) => {
|
|
204
|
+
let t = e.split("."), n = x;
|
|
205
|
+
for (let r of t) if (n = n[r], !n) return console.warn(`[ConfigProvider] Cannot find translation for key: ${e}`), e;
|
|
145
206
|
return typeof n == "string" ? n : e;
|
|
146
|
-
}, [
|
|
147
|
-
locale:
|
|
148
|
-
t:
|
|
149
|
-
}), [
|
|
150
|
-
return /* @__PURE__ */ n(
|
|
151
|
-
|
|
152
|
-
children: /* @__PURE__ */ n(
|
|
153
|
-
value:
|
|
154
|
-
children:
|
|
207
|
+
}, [x]), C = o(() => ({
|
|
208
|
+
locale: _,
|
|
209
|
+
t: S
|
|
210
|
+
}), [_, S]), w = o(() => ({ amap: m(f.amap, y) }), [y, f.amap]);
|
|
211
|
+
return /* @__PURE__ */ n(s, {
|
|
212
|
+
theme: u,
|
|
213
|
+
children: /* @__PURE__ */ n(d.Provider, {
|
|
214
|
+
value: w,
|
|
215
|
+
children: /* @__PURE__ */ n(t.Provider, {
|
|
216
|
+
value: C,
|
|
217
|
+
children: g
|
|
218
|
+
})
|
|
155
219
|
})
|
|
156
220
|
});
|
|
157
221
|
};
|
|
158
222
|
//#endregion
|
|
159
|
-
export {
|
|
223
|
+
export { f as n, u as r, h as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ui-base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "百数云低代码平台通用组件库",
|
|
6
6
|
"author": "bsy-fe team",
|
|
@@ -23,10 +23,6 @@
|
|
|
23
23
|
"types": "./dist/components/index.d.ts"
|
|
24
24
|
},
|
|
25
25
|
"./style.css": "./dist/style.css",
|
|
26
|
-
"./locale": {
|
|
27
|
-
"import": "./dist/locale/index.js",
|
|
28
|
-
"types": "./dist/locale/index.d.ts"
|
|
29
|
-
},
|
|
30
26
|
"./*": {
|
|
31
27
|
"import": "./dist/*/index.js",
|
|
32
28
|
"types": "./dist/components/*/index.d.ts"
|
|
@@ -38,9 +34,9 @@
|
|
|
38
34
|
],
|
|
39
35
|
"keywords": [],
|
|
40
36
|
"peerDependencies": {
|
|
41
|
-
"@ant-design/icons": ">=6.0.0",
|
|
37
|
+
"@ant-design/icons": ">=6.0.0 <7.0.0",
|
|
42
38
|
"@floating-ui/react": ">=0.27.0",
|
|
43
|
-
"antd": ">=
|
|
39
|
+
"antd": ">=6.0.0 <7.0.0",
|
|
44
40
|
"motion": "^11.18.2",
|
|
45
41
|
"react": ">=18.3.0",
|
|
46
42
|
"react-dom": ">=18.3.0"
|
|
@@ -63,7 +59,7 @@
|
|
|
63
59
|
"tinycolor2": "^1.6.0"
|
|
64
60
|
},
|
|
65
61
|
"devDependencies": {
|
|
66
|
-
"@ant-design/icons": "^6.
|
|
62
|
+
"@ant-design/icons": "^6.2.3",
|
|
67
63
|
"@floating-ui/react": "^0.27.16",
|
|
68
64
|
"@tailwindcss/typography": "^0.5.16",
|
|
69
65
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -72,7 +68,7 @@
|
|
|
72
68
|
"@types/react-dom": "^18.3.0",
|
|
73
69
|
"@types/tinycolor2": "^1.4.6",
|
|
74
70
|
"@vitejs/plugin-react": "^6.0.0",
|
|
75
|
-
"antd": "^
|
|
71
|
+
"antd": "^6.4.2",
|
|
76
72
|
"glob": "^11.0.3",
|
|
77
73
|
"motion": "^11.18.2",
|
|
78
74
|
"postcss": "^8.5.3",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { Locale } from './index';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated LocaleProvider will be removed in the next major version. Please use ConfigProvider.
|
|
5
|
-
*/
|
|
6
|
-
export declare const LocaleProvider: React.FC<{
|
|
7
|
-
locale?: Locale;
|
|
8
|
-
messages?: Record<string, any>;
|
|
9
|
-
} & PropsWithChildren>;
|
|
File without changes
|