@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../vendors/LocaleContext-Jj_JGgi2.js";
|
|
2
|
-
import "../../
|
|
2
|
+
import "../../vendors/ConfigProvider-BekyDD3V.js";
|
|
3
3
|
import "../AmapContext-JaYk1a3H.js";
|
|
4
|
-
import { t as e } from "../AmapProvider-
|
|
4
|
+
import { t as e } from "../AmapProvider-BkJp-sWi.js";
|
|
5
5
|
export { e as AmapProvider, e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "../
|
|
1
|
+
import { n as e } from "../vendors/ConfigProvider-BekyDD3V.js";
|
|
2
2
|
import { n as t } from "./AmapContext-JaYk1a3H.js";
|
|
3
3
|
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect as i, useState as a } from "react";
|
package/dist/Amap/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
2
|
-
import "../
|
|
2
|
+
import "../vendors/ConfigProvider-BekyDD3V.js";
|
|
3
3
|
import "./AmapContext-JaYk1a3H.js";
|
|
4
|
-
import { t as e } from "./AmapProvider-
|
|
4
|
+
import { t as e } from "./AmapProvider-BkJp-sWi.js";
|
|
5
5
|
import { t } from "./Amap-DL5dLiUm.js";
|
|
6
6
|
import { n, t as r } from "./hooks-D1m8KgVM.js";
|
|
7
|
-
import { t as i } from "./AmapCircle-
|
|
7
|
+
import { t as i } from "./AmapCircle-mh92P2l6.js";
|
|
8
8
|
import "./useMarkerInfoWindowController-CRgf2I0Q.js";
|
|
9
9
|
import { t as a } from "./AmapMarker-DYW0-8Hd.js";
|
|
10
10
|
import { t as o } from "./AmapMarkerCluster-BRVHHMbi.js";
|
|
@@ -5,9 +5,9 @@ import { n as r } from "../vendors/animations-C2i5EijE.js";
|
|
|
5
5
|
import { isArray as i } from "lodash-es";
|
|
6
6
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { cloneElement as c, isValidElement as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
8
|
-
import p from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
8
|
+
import { ColorPicker as p } from "antd";
|
|
9
|
+
import m from "clsx";
|
|
10
|
+
import { useControllableValue as h } from "ahooks";
|
|
11
11
|
import { AnimatePresence as g, motion as _ } from "motion/react";
|
|
12
12
|
import { FloatingPortal as v, flip as y, offset as b, shift as x, useClick as S, useDismiss as C, useFloating as w, useInteractions as T } from "@floating-ui/react";
|
|
13
13
|
import E from "tinycolor2";
|
|
@@ -80,10 +80,10 @@ var D = [
|
|
|
80
80
|
})
|
|
81
81
|
}, i))
|
|
82
82
|
}), M = (e) => {
|
|
83
|
-
let { children: f, placement: p = "bottom-start", disabled:
|
|
83
|
+
let { children: f, placement: p = "bottom-start", disabled: m = !1, presetColors: y, getPopupContainer: b } = e, { t: x } = t(), [S, C] = h(e, { defaultValue: e.value }), { isOpen: w, refs: T, floatingStyles: E, getReferenceProps: k, getFloatingProps: M } = O(p), P = l(f) ? c(f, {
|
|
84
84
|
...k(),
|
|
85
85
|
ref: T.setReference,
|
|
86
|
-
disabled:
|
|
86
|
+
disabled: m
|
|
87
87
|
}) : f, F = i(y) && y.length ? y : D, I = d(F.some((e) => n(e, S)) ? [] : [S]);
|
|
88
88
|
return /* @__PURE__ */ s(a, { children: [P, /* @__PURE__ */ o(v, {
|
|
89
89
|
root: u(() => w ? b?.() : void 0, [w, b]),
|
|
@@ -129,7 +129,7 @@ var D = [
|
|
|
129
129
|
children: u("customColor")
|
|
130
130
|
}), /* @__PURE__ */ s("div", {
|
|
131
131
|
className: A["bsy-color-picker__custom-color-content"],
|
|
132
|
-
children: [/* @__PURE__ */ o(
|
|
132
|
+
children: [/* @__PURE__ */ o(p, {
|
|
133
133
|
value: i,
|
|
134
134
|
onChange: (e) => {
|
|
135
135
|
let t = e.toRgbString();
|
|
@@ -140,7 +140,7 @@ var D = [
|
|
|
140
140
|
l(e), !e && i && (r.includes(i) || r.unshift(i), n.onChange(i), a(void 0));
|
|
141
141
|
},
|
|
142
142
|
children: /* @__PURE__ */ o("div", {
|
|
143
|
-
className:
|
|
143
|
+
className: m(A["bsy-color-picker__custom-color-btn"], {
|
|
144
144
|
[A["bsy-color-picker__custom-color-btn--active"]]: c && !i,
|
|
145
145
|
[A["bsy-color-picker__custom-color-btn--preview"]]: !!i
|
|
146
146
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../Icon/Icon-CTZCSuVg.js";
|
|
2
2
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
|
-
import { n as e, t } from "./ColorPicker-
|
|
3
|
+
import { n as e, t } from "./ColorPicker-nnQIw0_e.js";
|
|
4
4
|
import "../vendors/useLocale-Mk0d7wNt.js";
|
|
5
5
|
import "../vendors/color-CxdZwdYM.js";
|
|
6
6
|
export { e as COLOR_OPTIONS_RGBA, t as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../Icon/Icon-CTZCSuVg.js";
|
|
2
|
-
import { t } from "../Modal/Modal-
|
|
3
|
-
import { t as n } from "../ColorPicker/ColorPicker-
|
|
2
|
+
import { t } from "../Modal/Modal-CweuD-VO.js";
|
|
3
|
+
import { t as n } from "../ColorPicker/ColorPicker-nnQIw0_e.js";
|
|
4
4
|
import { t as r } from "../vendors/useLocale-Mk0d7wNt.js";
|
|
5
5
|
import { t as i } from "../CheckBox/CheckBox-B04hZKaC.js";
|
|
6
6
|
import { t as a } from "../DropDown/DropDown-CMKiQDrc.js";
|
|
@@ -8,10 +8,10 @@ import { FONT_SIZES as o } from "./constants/index.js";
|
|
|
8
8
|
import { AlignCenterOutlined as s, AlignLeftOutlined as c, AlignRightOutlined as l } from "@ant-design/icons";
|
|
9
9
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
10
|
import p, { createContext as m, forwardRef as h, useCallback as g, useContext as _, useImperativeHandle as v, useMemo as y, useRef as b, useState as x } from "react";
|
|
11
|
-
import S from "
|
|
12
|
-
import
|
|
11
|
+
import { Button as S, Form as C, Input as w, message as T } from "antd";
|
|
12
|
+
import E from "clsx";
|
|
13
13
|
import { AnimatePresence as D, motion as O } from "motion/react";
|
|
14
|
-
import { $createParagraphNode as k, $createTextNode as ee, $getRoot as te, $getSelection as A, $isElementNode as j, $isRangeSelection as M, FORMAT_ELEMENT_COMMAND as
|
|
14
|
+
import { $createParagraphNode as k, $createTextNode as ee, $getRoot as te, $getSelection as A, $isElementNode as j, $isRangeSelection as M, FORMAT_ELEMENT_COMMAND as N, FORMAT_TEXT_COMMAND as P, createCommand as ne } from "lexical";
|
|
15
15
|
import { useLexicalComposerContext as F } from "@lexical/react/LexicalComposerContext";
|
|
16
16
|
import { $patchStyleText as I } from "@lexical/selection";
|
|
17
17
|
import { $createLinkNode as L, $toggleLink as R, TOGGLE_LINK_COMMAND as z } from "@lexical/link";
|
|
@@ -22,7 +22,7 @@ var B = m(null), V = {
|
|
|
22
22
|
}, H = (t) => {
|
|
23
23
|
let { icon: n, tooltip: r, onClick: i, disabled: a = !1, active: o = !1, size: s = 14 } = t;
|
|
24
24
|
return /* @__PURE__ */ d("button", {
|
|
25
|
-
className:
|
|
25
|
+
className: E(V["lexical-editor__toolbar-button"], { [V["lexical-editor__toolbar-button-active"]]: o }),
|
|
26
26
|
type: "button",
|
|
27
27
|
onClick: i,
|
|
28
28
|
disabled: a,
|
|
@@ -43,7 +43,7 @@ var B = m(null), V = {
|
|
|
43
43
|
tooltip: n("editor.bold"),
|
|
44
44
|
active: i,
|
|
45
45
|
onClick: () => {
|
|
46
|
-
e.dispatchCommand(
|
|
46
|
+
e.dispatchCommand(P, "bold");
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
}, re = () => {
|
|
@@ -53,7 +53,7 @@ var B = m(null), V = {
|
|
|
53
53
|
tooltip: n("editor.underline"),
|
|
54
54
|
active: i,
|
|
55
55
|
onClick: () => {
|
|
56
|
-
e.dispatchCommand(
|
|
56
|
+
e.dispatchCommand(P, "underline");
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
}, ie = () => {
|
|
@@ -63,7 +63,7 @@ var B = m(null), V = {
|
|
|
63
63
|
tooltip: n("editor.italic"),
|
|
64
64
|
active: i,
|
|
65
65
|
onClick: () => {
|
|
66
|
-
e.dispatchCommand(
|
|
66
|
+
e.dispatchCommand(P, "italic");
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}, ae = () => {
|
|
@@ -161,7 +161,7 @@ var B = m(null), V = {
|
|
|
161
161
|
icon: /* @__PURE__ */ d(l, {})
|
|
162
162
|
}
|
|
163
163
|
], o = g((t) => {
|
|
164
|
-
e.dispatchCommand(
|
|
164
|
+
e.dispatchCommand(N, t);
|
|
165
165
|
}, [e]), u = i.map((e) => ({
|
|
166
166
|
key: e.key,
|
|
167
167
|
label: /* @__PURE__ */ f("div", {
|
|
@@ -191,7 +191,7 @@ var B = m(null), V = {
|
|
|
191
191
|
})
|
|
192
192
|
});
|
|
193
193
|
}, le = () => {
|
|
194
|
-
let [e] = F(), { link: n } = U(), { t: a } = r(), [o, s] = x(!1), [c, l] = x(""), [p, m] = x(""), [h, _] = x(!0), [v, y] =
|
|
194
|
+
let [e] = F(), { link: n } = U(), { t: a } = r(), [o, s] = x(!1), [c, l] = x(""), [p, m] = x(""), [h, _] = x(!0), [v, y] = T.useMessage(), b = g((e) => e ? e.startsWith("@") ? "javascript:void(0);" : e.match(/^https?:\/\//) ? e : `http://${e}` : "", []), C = () => {
|
|
195
195
|
if (!c) {
|
|
196
196
|
v.warning(a("editor.linkAddressEmpty"));
|
|
197
197
|
return;
|
|
@@ -214,14 +214,14 @@ var B = m(null), V = {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
}), l(""), m(""), s(!1);
|
|
217
|
-
},
|
|
217
|
+
}, E = g(() => {
|
|
218
218
|
n ? (l(n.link === "javascript:void(0);" ? "" : n.link), m(n.linkText)) : (l(""), m("")), s(!0);
|
|
219
219
|
}, [n]);
|
|
220
220
|
return /* @__PURE__ */ f(u, { children: [
|
|
221
221
|
/* @__PURE__ */ d(H, {
|
|
222
222
|
icon: "Insertlink",
|
|
223
223
|
tooltip: a("link"),
|
|
224
|
-
onClick:
|
|
224
|
+
onClick: E,
|
|
225
225
|
active: !!n?.link
|
|
226
226
|
}),
|
|
227
227
|
y,
|
|
@@ -238,7 +238,7 @@ var B = m(null), V = {
|
|
|
238
238
|
className: "w-[80px] shrink-0",
|
|
239
239
|
children: a("linkAddress")
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */ d(
|
|
241
|
+
/* @__PURE__ */ d(w, {
|
|
242
242
|
value: c,
|
|
243
243
|
onChange: (e) => l(e.target.value),
|
|
244
244
|
placeholder: a("editor.linkTip")
|
|
@@ -256,7 +256,7 @@ var B = m(null), V = {
|
|
|
256
256
|
children: [/* @__PURE__ */ d("label", {
|
|
257
257
|
className: "w-[80px] shrink-0",
|
|
258
258
|
children: a("showContent")
|
|
259
|
-
}), /* @__PURE__ */ d(
|
|
259
|
+
}), /* @__PURE__ */ d(w, {
|
|
260
260
|
value: p,
|
|
261
261
|
onChange: (e) => m(e.target.value)
|
|
262
262
|
})]
|
|
@@ -269,12 +269,12 @@ var B = m(null), V = {
|
|
|
269
269
|
children: a("openInNewTab")
|
|
270
270
|
}) }), /* @__PURE__ */ f("div", {
|
|
271
271
|
className: "flex gap-[15px]",
|
|
272
|
-
children: [/* @__PURE__ */ d(
|
|
272
|
+
children: [/* @__PURE__ */ d(S, {
|
|
273
273
|
onClick: () => s(!1),
|
|
274
274
|
children: a("cancel")
|
|
275
|
-
}), /* @__PURE__ */ d(
|
|
275
|
+
}), /* @__PURE__ */ d(S, {
|
|
276
276
|
type: "primary",
|
|
277
|
-
onClick:
|
|
277
|
+
onClick: C,
|
|
278
278
|
children: a("confirm")
|
|
279
279
|
})]
|
|
280
280
|
})]
|
|
@@ -312,7 +312,7 @@ var B = m(null), V = {
|
|
|
312
312
|
"picture-modal__upload-text": "_picture-modal__upload-text_qyj1h_121",
|
|
313
313
|
"picture-modal__footer": "_picture-modal__footer_qyj1h_125"
|
|
314
314
|
}, J = h((e, t) => {
|
|
315
|
-
let [n] =
|
|
315
|
+
let [n] = C.useForm(), [i, a] = x(""), { t: o } = r(), s = (e) => /^https?:\/\/.+/i.test(e);
|
|
316
316
|
return v(t, () => ({ getValue: async () => {
|
|
317
317
|
try {
|
|
318
318
|
return await n.validateFields(), i;
|
|
@@ -323,15 +323,15 @@ var B = m(null), V = {
|
|
|
323
323
|
className: q["picture-modal__content-title"],
|
|
324
324
|
"data-title": o("editor.imageUrlNote"),
|
|
325
325
|
children: o("editor.enterImageUrl")
|
|
326
|
-
}), /* @__PURE__ */ d(
|
|
326
|
+
}), /* @__PURE__ */ d(C, {
|
|
327
327
|
form: n,
|
|
328
|
-
children: /* @__PURE__ */ d(
|
|
328
|
+
children: /* @__PURE__ */ d(C.Item, {
|
|
329
329
|
name: "url",
|
|
330
330
|
rules: [{
|
|
331
331
|
required: !0,
|
|
332
332
|
message: o("editor.pleaseEnterImageUrl")
|
|
333
333
|
}, { validator: (e, t) => !t || s(t) ? Promise.resolve() : Promise.reject(Error(o("editor.pleaseEnterValidImageUrl"))) }],
|
|
334
|
-
children: /* @__PURE__ */ d(
|
|
334
|
+
children: /* @__PURE__ */ d(w, {
|
|
335
335
|
placeholder: o("editor.pleaseEnterImageUrl"),
|
|
336
336
|
value: i,
|
|
337
337
|
onChange: (e) => a(e.target.value)
|
|
@@ -343,7 +343,7 @@ J.displayName = "LinkInput";
|
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/components/Editor/ToolbarPlugin/Buttons/PictureButton/UploadImage.tsx
|
|
345
345
|
var Y = h((t, n) => {
|
|
346
|
-
let [i, a] = x(null), [o, s] = x(!1), [c, l] = x(null), u = b(null), [p, m] =
|
|
346
|
+
let [i, a] = x(null), [o, s] = x(!1), [c, l] = x(null), u = b(null), [p, m] = T.useMessage(), { t: h } = r(), g = (e) => (e / 1024).toFixed(1) + "kb", _ = (e) => e.type.startsWith("image/") ? e.size > 1048576 ? (p.warning(h("editor.imageSizeNote")), !1) : !0 : (p.warning(h("editor.onlyImageFormatsSupported")), !1), y = (e) => {
|
|
347
347
|
_(e) && (a(URL.createObjectURL(e)), l(e));
|
|
348
348
|
}, S = () => {
|
|
349
349
|
u.current?.click();
|
|
@@ -504,7 +504,7 @@ var Y = h((t, n) => {
|
|
|
504
504
|
Y.displayName = "UploadImage";
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/components/Editor/commands/ImageCommands.ts
|
|
507
|
-
var X =
|
|
507
|
+
var X = ne("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
|
|
508
508
|
let { t: n } = r(), [i] = F(), [a, o] = x(!1), s = b(null), c = b(null), l = [{
|
|
509
509
|
key: "upload",
|
|
510
510
|
title: n("editor.uploadImage"),
|
|
@@ -525,7 +525,7 @@ var X = P("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
|
|
|
525
525
|
altText: t
|
|
526
526
|
}), o(!1);
|
|
527
527
|
} catch (e) {
|
|
528
|
-
|
|
528
|
+
T.error(e instanceof Error ? e.message : n("editor.operationFailed"));
|
|
529
529
|
}
|
|
530
530
|
}, _ = {
|
|
531
531
|
upload: /* @__PURE__ */ d(Y, { ref: c }),
|
|
@@ -564,10 +564,10 @@ var X = P("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
|
|
|
564
564
|
})]
|
|
565
565
|
}), /* @__PURE__ */ f("div", {
|
|
566
566
|
className: q["picture-modal__footer"],
|
|
567
|
-
children: [/* @__PURE__ */ d(
|
|
567
|
+
children: [/* @__PURE__ */ d(S, {
|
|
568
568
|
onClick: () => o(!1),
|
|
569
569
|
children: n("cancel")
|
|
570
|
-
}), /* @__PURE__ */ d(
|
|
570
|
+
}), /* @__PURE__ */ d(S, {
|
|
571
571
|
type: "primary",
|
|
572
572
|
onClick: g,
|
|
573
573
|
children: n("confirm")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../Icon/Icon-CTZCSuVg.js";
|
|
2
2
|
import "../../../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
|
-
import "../../../Modal/Modal-
|
|
4
|
-
import "../../../ColorPicker/ColorPicker-
|
|
3
|
+
import "../../../Modal/Modal-CweuD-VO.js";
|
|
4
|
+
import "../../../ColorPicker/ColorPicker-nnQIw0_e.js";
|
|
5
5
|
import "../../../vendors/useLocale-Mk0d7wNt.js";
|
|
6
6
|
import "../../../vendors/color-CxdZwdYM.js";
|
|
7
7
|
import "../../../Select/SelectInputSearch-Dm3CI_L4.js";
|
|
@@ -10,5 +10,5 @@ import "../../../CheckBox/CheckBox-B04hZKaC.js";
|
|
|
10
10
|
import "../../../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
11
11
|
import "../../../vendors/useFloatingPortal-CDgiCnbb.js";
|
|
12
12
|
import "../../../DropDown/DropDown-CMKiQDrc.js";
|
|
13
|
-
import { a as e, i as t, n, r, t as i } from "../../Buttons-
|
|
13
|
+
import { a as e, i as t, n, r, t as i } from "../../Buttons-D17RQIEb.js";
|
|
14
14
|
export { i as default, n as getToolbarButton, r as listRegisteredToolbarButtons, t as registerToolbarButton, e as unregisterToolbarButton };
|
package/dist/Editor/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../Icon/Icon-CTZCSuVg.js";
|
|
2
2
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
|
-
import "../Modal/Modal-
|
|
4
|
-
import "../ColorPicker/ColorPicker-
|
|
3
|
+
import "../Modal/Modal-CweuD-VO.js";
|
|
4
|
+
import "../ColorPicker/ColorPicker-nnQIw0_e.js";
|
|
5
5
|
import "../vendors/useLocale-Mk0d7wNt.js";
|
|
6
6
|
import "../vendors/color-CxdZwdYM.js";
|
|
7
7
|
import "../Select/SelectInputSearch-Dm3CI_L4.js";
|
|
@@ -10,7 +10,7 @@ import "../CheckBox/CheckBox-B04hZKaC.js";
|
|
|
10
10
|
import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
11
11
|
import "../vendors/useFloatingPortal-CDgiCnbb.js";
|
|
12
12
|
import "../DropDown/DropDown-CMKiQDrc.js";
|
|
13
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s } from "./Buttons-
|
|
13
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s } from "./Buttons-D17RQIEb.js";
|
|
14
14
|
import { DEFAULT_BACKGROUND_COLOR as c, DEFAULT_FONT_COLOR as l, DEFAULT_FONT_SIZE as u } from "./constants/index.js";
|
|
15
15
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
16
16
|
import m, { useCallback as h, useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
@@ -1,81 +1,89 @@
|
|
|
1
1
|
import { t as e } from "../Icon/Icon-CTZCSuVg.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { useState as r } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Modal as i } from "antd";
|
|
5
|
+
import { useControllableValue as a } from "ahooks";
|
|
6
6
|
//#region src/components/Modal/modal.module.scss
|
|
7
|
-
var o = "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
var o = "_modal_2gsat_1", s = "_modal__title_2gsat_4", c = "_modal__actions_2gsat_17", l = "_modal__button_groups_2gsat_21", u = "_modal__button_2gsat_21", d = "_modal__icon_2gsat_41", f = {
|
|
8
|
+
modal: o,
|
|
9
|
+
modal__title: s,
|
|
10
|
+
"modal__title-text": "_modal__title-text_2gsat_13",
|
|
11
|
+
modal__actions: c,
|
|
12
|
+
modal__button_groups: l,
|
|
13
|
+
modal__button: u,
|
|
14
|
+
"modal__button--fullscreen": "_modal__button--fullscreen_2gsat_38",
|
|
15
|
+
modal__icon: d
|
|
16
|
+
}, p = (o) => {
|
|
17
|
+
let { fullSwitch: s = !1 } = o, [c, l] = a(o, {
|
|
17
18
|
valuePropName: "open",
|
|
18
19
|
defaultValue: !1,
|
|
19
20
|
defaultValuePropName: "defaultOpen",
|
|
20
21
|
trigger: "onOpenChange"
|
|
21
|
-
}), [u,
|
|
22
|
-
return /* @__PURE__ */ t(
|
|
22
|
+
}), [u, d] = r(!1);
|
|
23
|
+
return /* @__PURE__ */ t(i, {
|
|
23
24
|
destroyOnHidden: !0,
|
|
24
25
|
open: c,
|
|
25
26
|
onCancel: () => l(!1),
|
|
26
27
|
footer: null,
|
|
27
28
|
title: o.title ? /* @__PURE__ */ n("div", {
|
|
28
|
-
className:
|
|
29
|
+
className: f.modal__title,
|
|
29
30
|
children: [/* @__PURE__ */ t("div", {
|
|
30
|
-
className:
|
|
31
|
+
className: f.modal__titleText,
|
|
31
32
|
children: o.title
|
|
32
33
|
}), s ? /* @__PURE__ */ n("div", {
|
|
33
|
-
className:
|
|
34
|
+
className: f.modal__button_groups,
|
|
34
35
|
children: [/* @__PURE__ */ t("div", {
|
|
35
36
|
"aria-label": "toggle fullscreen",
|
|
36
37
|
role: "button",
|
|
37
|
-
onClick: () =>
|
|
38
|
-
className:
|
|
38
|
+
onClick: () => d(!u),
|
|
39
|
+
className: f.modal__button,
|
|
39
40
|
children: /* @__PURE__ */ t(e, {
|
|
40
41
|
name: u ? "quanpingsuoxiao" : "quanpingfangda",
|
|
41
|
-
className:
|
|
42
|
+
className: f.modal__icon
|
|
42
43
|
})
|
|
43
44
|
}), /* @__PURE__ */ t("div", {
|
|
44
45
|
role: "button",
|
|
45
46
|
"aria-label": "close",
|
|
46
47
|
onClick: () => l(!1),
|
|
47
|
-
className:
|
|
48
|
+
className: f.modal__button,
|
|
48
49
|
children: /* @__PURE__ */ t(e, {
|
|
49
50
|
name: "close",
|
|
50
|
-
className:
|
|
51
|
+
className: f.modal__icon
|
|
51
52
|
})
|
|
52
53
|
})]
|
|
53
54
|
}) : /* @__PURE__ */ t("div", {
|
|
54
55
|
role: "button",
|
|
55
56
|
"aria-label": "close",
|
|
56
57
|
onClick: () => l(!1),
|
|
57
|
-
className:
|
|
58
|
+
className: f.modal__button,
|
|
58
59
|
children: /* @__PURE__ */ t(e, {
|
|
59
60
|
name: "close",
|
|
60
|
-
className:
|
|
61
|
+
className: f.modal__icon
|
|
61
62
|
})
|
|
62
63
|
})]
|
|
63
64
|
}) : null,
|
|
64
65
|
closable: !1,
|
|
66
|
+
className: f.modal,
|
|
65
67
|
width: u ? "100%" : o.width,
|
|
68
|
+
zIndex: o.zIndex,
|
|
66
69
|
style: { transition: "width 0.3s ease" },
|
|
67
|
-
|
|
70
|
+
mask: {
|
|
71
|
+
closable: !1,
|
|
72
|
+
blur: !1
|
|
73
|
+
},
|
|
74
|
+
focusable: { trap: !1 },
|
|
68
75
|
styles: {
|
|
69
76
|
header: { marginBottom: 0 },
|
|
70
|
-
|
|
77
|
+
container: {
|
|
71
78
|
padding: 0,
|
|
72
79
|
borderRadius: "10px",
|
|
73
80
|
overflow: "hidden"
|
|
74
|
-
}
|
|
81
|
+
},
|
|
82
|
+
body: { padding: 0 }
|
|
75
83
|
},
|
|
76
84
|
children: o.children
|
|
77
85
|
});
|
|
78
86
|
};
|
|
79
|
-
|
|
87
|
+
p.displayName = "BsyModal";
|
|
80
88
|
//#endregion
|
|
81
|
-
export {
|
|
89
|
+
export { p as t };
|
package/dist/Modal/index.js
CHANGED
|
@@ -9,9 +9,9 @@ import { t as l } from "../vendors/useFloatingPortal-CDgiCnbb.js";
|
|
|
9
9
|
import { first as u, isArray as d, isEmpty as f, isNil as p, noop as m } from "lodash-es";
|
|
10
10
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
11
|
import { Suspense as v, createContext as y, forwardRef as b, memo as x, useCallback as S, useContext as C, useDeferredValue as w, useId as T, useImperativeHandle as E, useLayoutEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
12
|
+
import { Input as ee } from "antd";
|
|
12
13
|
import j from "clsx";
|
|
13
|
-
import { useControllableValue as
|
|
14
|
-
import { Input as M } from "antd";
|
|
14
|
+
import { useControllableValue as te, useHover as M, useToggle as ne } from "ahooks";
|
|
15
15
|
import { AnimatePresence as re, motion as N } from "motion/react";
|
|
16
16
|
import { FloatingPortal as ie } from "@floating-ui/react";
|
|
17
17
|
import P from "fuse.js";
|
|
@@ -225,7 +225,7 @@ var Q = (e, t) => {
|
|
|
225
225
|
};
|
|
226
226
|
return r(e), n;
|
|
227
227
|
}, ue = ({ placeholder: t, mode: n, clearable: i, onClear: a, disabled: o = !1, labelRender: s, options: c = [], type: l, prefix: u, suffixIcon: f, ghost: m, inputValueStyle: v, tagStyle: y }) => {
|
|
228
|
-
let b = k(null), x =
|
|
228
|
+
let b = k(null), x = M(o ? null : b), { isOpen: S, value: C, getCachedOptionByValue: w } = R(), { fieldNames: T } = z(), E = O(() => {
|
|
229
229
|
if (p(C)) return [];
|
|
230
230
|
let e = d(C) ? C : [C];
|
|
231
231
|
if (l === L.TREE) {
|
|
@@ -331,7 +331,7 @@ var $ = x((e) => {
|
|
|
331
331
|
className: "ml-2 flex-1",
|
|
332
332
|
onClick: (e) => e.stopPropagation(),
|
|
333
333
|
style: { minWidth: "146px" },
|
|
334
|
-
children: /* @__PURE__ */ g(
|
|
334
|
+
children: /* @__PURE__ */ g(ee, {
|
|
335
335
|
ref: m,
|
|
336
336
|
value: u,
|
|
337
337
|
onChange: (e) => {
|
|
@@ -526,7 +526,7 @@ ge.displayName = "BsySelectPanel";
|
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region src/components/Select/Select.tsx
|
|
528
528
|
var _e = b((e, n) => {
|
|
529
|
-
let { options: r = [], type: i = L.SINGLE, fieldNames: a, clearable: o = !0, disabled: s = !1, placeholder: c, labelRender: u, onOtherInputChange: d, onOpenChange: f, onPopupScroll: p, prefix: m, suffixIcon: v, ghost: y, inputValueStyle: b, tagStyle: x, zIndex: C = 1101, zIndexMask: w = 1100, otherInputPosition: D = "bottom", popupMinWidth:
|
|
529
|
+
let { options: r = [], type: i = L.SINGLE, fieldNames: a, clearable: o = !0, disabled: s = !1, placeholder: c, labelRender: u, onOtherInputChange: d, onOpenChange: f, onPopupScroll: p, prefix: m, suffixIcon: v, ghost: y, inputValueStyle: b, tagStyle: x, zIndex: C = 1101, zIndexMask: w = 1100, otherInputPosition: D = "bottom", popupMinWidth: ee } = e, M = ae[i], { t: N } = t(), P = T(), { onChange: F } = e, R = a || oe, [z, B] = te(e, {
|
|
530
530
|
defaultValue: M === I.SINGLE ? void 0 : [],
|
|
531
531
|
defaultValuePropName: "defaultValue",
|
|
532
532
|
valuePropName: "value",
|
|
@@ -633,7 +633,7 @@ var _e = b((e, n) => {
|
|
|
633
633
|
showMask: e.showMask,
|
|
634
634
|
zIndex: C,
|
|
635
635
|
zIndexMask: w,
|
|
636
|
-
popupMinWidth:
|
|
636
|
+
popupMinWidth: ee,
|
|
637
637
|
offset: {
|
|
638
638
|
x: 0,
|
|
639
639
|
y: 4
|
package/dist/Select/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../Icon/Icon-CTZCSuVg.js";
|
|
2
2
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
3
|
import "../vendors/useLocale-Mk0d7wNt.js";
|
|
4
|
-
import { n as e, r as t, t as n } from "./Select-
|
|
4
|
+
import { n as e, r as t, t as n } from "./Select-D8T0S1_m.js";
|
|
5
5
|
import "./SelectInputSearch-Dm3CI_L4.js";
|
|
6
6
|
import "../vendors/Tree-Bg2UzLsC.js";
|
|
7
7
|
import "../CheckBox/CheckBox-DF201Nxg.js";
|