@baishuyun/ui-base 6.24.5 → 6.24.7
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/index.js +1 -1
- package/dist/Calendar/{Calendar-BXO7aEFf.js → Calendar-3Kv_WGxD.js} +2 -2
- package/dist/Calendar/index.js +4 -4
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DatePicker/{DatePicker-DDn-YRzO.js → DatePicker-Dlw6OaT8.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-B5FDqMRj.js → DatePickerPanel-Ohx9pcvr.js} +1 -1
- package/dist/DatePicker/index.js +2 -2
- package/dist/DropDown/index.js +1 -1
- package/dist/Editor/index.js +790 -772
- package/dist/Gantt/index.js +2 -2
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/index.js +1 -1
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/index.js +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Tooltip/Tooltip-N06Os8rG.js +178 -0
- package/dist/Tooltip/index.js +2 -2
- package/dist/Tree/index.js +1 -1
- package/dist/components/Editor/commands/ImageCommands.d.ts +3 -1
- package/dist/components/Editor/nodes/ImageNode.d.ts +2 -0
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/dist/vendors/{version-F33icKZ9.js → version-CxNabWr4.js} +1 -1
- package/package.json +1 -1
- package/dist/Tooltip/Tooltip-DAtuL6eT.js +0 -175
package/dist/Gantt/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CxNabWr4.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import { t as e } from "../Icon/Icon-CcKDWNGy.js";
|
|
4
4
|
import "../vendors/LocaleContext-DXQoOKM2.js";
|
|
@@ -6,7 +6,7 @@ import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
|
6
6
|
import { t } from "../vendors/useLocale-Be4e7Xfn.js";
|
|
7
7
|
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
8
8
|
import { t as n } from "../vendors/cssVars-UpriQzph.js";
|
|
9
|
-
import { t as r } from "../Tooltip/Tooltip-
|
|
9
|
+
import { t as r } from "../Tooltip/Tooltip-N06Os8rG.js";
|
|
10
10
|
import "../Select/SelectInputSearch-BEYleN-o.js";
|
|
11
11
|
import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
12
12
|
import "../ScrollBar/ScrollBar-IMTuAOF5.js";
|
package/dist/Icon/index.js
CHANGED
package/dist/InputTag/index.js
CHANGED
package/dist/Loading/index.js
CHANGED
package/dist/Modal/index.js
CHANGED
package/dist/Overlay/index.js
CHANGED
package/dist/Radio/index.js
CHANGED
package/dist/ScrollBar/index.js
CHANGED
package/dist/Segmented/index.js
CHANGED
package/dist/Select/index.js
CHANGED
package/dist/Table/index.js
CHANGED
package/dist/Tabs/index.js
CHANGED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { a as e, i as t } from "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
2
|
+
import { t as n } from "../vendors/animations-ISccYUE3.js";
|
|
3
|
+
import { t as r } from "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
4
|
+
import { n as i } from "../vendors/mergeRefs-mEH9TBYV.js";
|
|
5
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as c, cloneElement as l, createContext as u, isValidElement as d, useCallback as f, useEffect as ee, useMemo as p, useRef as te, useState as ne } from "react";
|
|
7
|
+
import { useControllableValue as re } from "ahooks";
|
|
8
|
+
import { AnimatePresence as m, motion as ie } from "motion/react";
|
|
9
|
+
import { FloatingArrow as ae, FloatingPortal as oe, arrow as se, autoUpdate as h, flip as g, offset as _, safePolygon as v, shift as y, size as b, useClick as ce, useDismiss as le, useFloating as ue, useHover as de, useInteractions as fe, useRole as pe } from "@floating-ui/react";
|
|
10
|
+
//#region src/components/Tooltip/context/TooltipFloatingContext.ts
|
|
11
|
+
var x = u(null), S = {
|
|
12
|
+
"bsy-tooltip__trigger": "_bsy-tooltip__trigger_eg3cj_1",
|
|
13
|
+
"bsy-tooltip__content": "_bsy-tooltip__content_eg3cj_5"
|
|
14
|
+
}, me = "M0 14C0 14 1.44834 13.9879 4.14272 10.7864C5.24990 9.46652 6.28557 8.66663 7.0002 8.66663C7.71415 8.66663 8.73670 9.55158 9.85697 10.8831C12.5664 14.1005 14 14 14 14H0Z", he = "#525867", C = (e, t) => e ? t ? (n) => {
|
|
15
|
+
e(n), t(n);
|
|
16
|
+
} : e : t, w = (e) => {
|
|
17
|
+
if (!(e === "auto" || e === void 0)) return typeof e == "number" ? `${e}px` : e;
|
|
18
|
+
}, T = (e) => e.type === c || (e.type?.toString().includes("Fragment") ?? !1), E = ({ children: c, content: u, trigger: E = "hover", style: D, zIndex: O, showArrow: k = !0, placement: A = "bottom", onClose: j, hoverDelay: M = 500, getPopupContainer: N, moveToFloatingKeepOpen: P = !1, widthMode: F = "content", width: I, minWidth: L = 60, maxWidth: R = 340, offset: z = 10, fallbackPlacements: B, virtualReference: V, flipBoundary: H, animated: ge = !0, ..._e }) => {
|
|
19
|
+
let U = te(null), [ve, ye] = ne(null), W = e(O), [G, K] = re(_e, {
|
|
20
|
+
valuePropName: "visible",
|
|
21
|
+
trigger: "onVisibleChange",
|
|
22
|
+
defaultValue: !1
|
|
23
|
+
}), be = f((e) => {
|
|
24
|
+
!e && G && j && j(), K(e);
|
|
25
|
+
}, [
|
|
26
|
+
G,
|
|
27
|
+
j,
|
|
28
|
+
K
|
|
29
|
+
]), xe = p(() => {
|
|
30
|
+
let e = B ? { fallbackPlacements: B } : {};
|
|
31
|
+
H && (e.boundary = H);
|
|
32
|
+
let t = [
|
|
33
|
+
_(z),
|
|
34
|
+
g(e),
|
|
35
|
+
y({ padding: 8 })
|
|
36
|
+
];
|
|
37
|
+
return k && t.push(se({ element: U })), F === "reference" && t.push(b({ apply({ rects: e, elements: t }) {
|
|
38
|
+
t.floating.style.width = `${e.reference.width}px`;
|
|
39
|
+
let n = w(L);
|
|
40
|
+
n && (t.floating.style.minWidth = n);
|
|
41
|
+
let r = w(R);
|
|
42
|
+
r && (t.floating.style.maxWidth = r);
|
|
43
|
+
} })), t;
|
|
44
|
+
}, [
|
|
45
|
+
F,
|
|
46
|
+
L,
|
|
47
|
+
R,
|
|
48
|
+
z,
|
|
49
|
+
B,
|
|
50
|
+
H,
|
|
51
|
+
k
|
|
52
|
+
]), { refs: q, floatingStyles: J, context: Y, isPositioned: X } = ue({
|
|
53
|
+
open: G,
|
|
54
|
+
onOpenChange: be,
|
|
55
|
+
whileElementsMounted: G ? (e, t, n) => h(e, t, n, {
|
|
56
|
+
animationFrame: !1,
|
|
57
|
+
ancestorScroll: !0,
|
|
58
|
+
ancestorResize: !0,
|
|
59
|
+
elementResize: !0,
|
|
60
|
+
layoutShift: !1
|
|
61
|
+
}) : void 0,
|
|
62
|
+
placement: A,
|
|
63
|
+
middleware: xe,
|
|
64
|
+
transform: !1
|
|
65
|
+
}), { portalRoot: Se, portalMountKey: Ce, handleExitComplete: we } = r(G, N), Te = p(() => {
|
|
66
|
+
let e = {
|
|
67
|
+
...J,
|
|
68
|
+
...D,
|
|
69
|
+
"--bsy-tooltip-z-index": W
|
|
70
|
+
};
|
|
71
|
+
switch (F) {
|
|
72
|
+
case "content":
|
|
73
|
+
e.width = "auto";
|
|
74
|
+
break;
|
|
75
|
+
case "manual":
|
|
76
|
+
I !== void 0 && (e.width = w(I));
|
|
77
|
+
break;
|
|
78
|
+
case "reference": break;
|
|
79
|
+
default: e.width = "max-content";
|
|
80
|
+
}
|
|
81
|
+
return F !== "reference" && (L !== void 0 && (e.minWidth = w(L)), R !== void 0 && (e.maxWidth = w(R))), G && !X && (e.visibility = "hidden"), e;
|
|
82
|
+
}, [
|
|
83
|
+
J,
|
|
84
|
+
G,
|
|
85
|
+
X,
|
|
86
|
+
D,
|
|
87
|
+
W,
|
|
88
|
+
F,
|
|
89
|
+
I,
|
|
90
|
+
L,
|
|
91
|
+
R
|
|
92
|
+
]);
|
|
93
|
+
ee(() => {
|
|
94
|
+
V && q.setPositionReference(V);
|
|
95
|
+
}, [V, q]);
|
|
96
|
+
let { getReferenceProps: Ee, getFloatingProps: De } = fe([
|
|
97
|
+
de(Y, {
|
|
98
|
+
enabled: E === "hover",
|
|
99
|
+
delay: { open: M },
|
|
100
|
+
handleClose: P ? v() : void 0
|
|
101
|
+
}),
|
|
102
|
+
ce(Y, { enabled: E === "click" }),
|
|
103
|
+
le(Y),
|
|
104
|
+
pe(Y, { role: "tooltip" })
|
|
105
|
+
]), Z = Ee(), Q = {
|
|
106
|
+
...Z,
|
|
107
|
+
onClick: (e) => {
|
|
108
|
+
E === "click" && e.stopPropagation(), Z.onClick?.(e);
|
|
109
|
+
},
|
|
110
|
+
onMouseEnter: (e) => {
|
|
111
|
+
E === "hover" && e.stopPropagation(), Z.onMouseEnter?.(e);
|
|
112
|
+
},
|
|
113
|
+
onMouseLeave: (e) => {
|
|
114
|
+
E === "hover" && e.stopPropagation(), Z.onMouseLeave?.(e);
|
|
115
|
+
},
|
|
116
|
+
onMouseMove: (e) => {
|
|
117
|
+
Z.onMouseMove?.(e);
|
|
118
|
+
}
|
|
119
|
+
}, Oe = typeof D?.background == "string" ? D.background : he, ke = i(q.setFloating, ye), $ = /* @__PURE__ */ o(oe, {
|
|
120
|
+
root: Se,
|
|
121
|
+
children: /* @__PURE__ */ o(t, {
|
|
122
|
+
zIndex: W,
|
|
123
|
+
children: /* @__PURE__ */ o(m, {
|
|
124
|
+
onExitComplete: we,
|
|
125
|
+
children: G ? /* @__PURE__ */ s(ie.div, {
|
|
126
|
+
ref: ke,
|
|
127
|
+
style: Te,
|
|
128
|
+
...De(),
|
|
129
|
+
className: S["bsy-tooltip__content"],
|
|
130
|
+
onClick: (e) => e.stopPropagation(),
|
|
131
|
+
...ge ? n : {},
|
|
132
|
+
transformTemplate: (e, t) => t,
|
|
133
|
+
children: [k ? /* @__PURE__ */ o(ae, {
|
|
134
|
+
ref: U,
|
|
135
|
+
context: Y,
|
|
136
|
+
width: 14,
|
|
137
|
+
height: 14,
|
|
138
|
+
tipRadius: 2,
|
|
139
|
+
fill: Oe,
|
|
140
|
+
d: me
|
|
141
|
+
}) : null, /* @__PURE__ */ o(x.Provider, {
|
|
142
|
+
value: ve,
|
|
143
|
+
children: u
|
|
144
|
+
})]
|
|
145
|
+
}, "bsy-tooltip-content") : null
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
}, Ce);
|
|
149
|
+
if (d(c) && !T(c)) {
|
|
150
|
+
let e = c.props, t = c.ref;
|
|
151
|
+
return /* @__PURE__ */ s(a, { children: [l(c, {
|
|
152
|
+
...e,
|
|
153
|
+
...Q,
|
|
154
|
+
ref: t ? i(q.setReference, t) : q.setReference,
|
|
155
|
+
style: e.style,
|
|
156
|
+
onClick: C(e.onClick, Q.onClick),
|
|
157
|
+
onMouseEnter: C(e.onMouseEnter, Q.onMouseEnter),
|
|
158
|
+
onMouseLeave: C(e.onMouseLeave, Q.onMouseLeave),
|
|
159
|
+
onMouseMove: C(e.onMouseMove, Q.onMouseMove)
|
|
160
|
+
}), $] });
|
|
161
|
+
}
|
|
162
|
+
return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
|
|
163
|
+
className: S["bsy-tooltip"],
|
|
164
|
+
children: /* @__PURE__ */ o("div", {
|
|
165
|
+
ref: q.setReference,
|
|
166
|
+
...Q,
|
|
167
|
+
className: S["bsy-tooltip__trigger"],
|
|
168
|
+
children: c
|
|
169
|
+
})
|
|
170
|
+
}), $] });
|
|
171
|
+
}, D = ({ content: e, children: t, ...n }) => e ? /* @__PURE__ */ o(E, {
|
|
172
|
+
content: e,
|
|
173
|
+
...n,
|
|
174
|
+
children: t
|
|
175
|
+
}) : /* @__PURE__ */ o(a, { children: t });
|
|
176
|
+
D.displayName = "BsyTooltip";
|
|
177
|
+
//#endregion
|
|
178
|
+
export { x as n, D as t };
|
package/dist/Tooltip/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CxNabWr4.js";
|
|
2
2
|
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
3
3
|
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
4
|
-
import { n as e, t } from "./Tooltip-
|
|
4
|
+
import { n as e, t } from "./Tooltip-N06Os8rG.js";
|
|
5
5
|
export { e as TooltipFloatingContext, t as default };
|
package/dist/Tree/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LexicalCommand } from 'lexical';
|
|
1
|
+
import { LexicalCommand, LexicalEditor, NodeKey } from 'lexical';
|
|
2
2
|
export interface InsertImagePayload {
|
|
3
3
|
src: string;
|
|
4
4
|
altText?: string;
|
|
@@ -8,3 +8,5 @@ export interface InsertImagePayload {
|
|
|
8
8
|
dataSrc?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const INSERT_INLINE_IMAGE_COMMAND: LexicalCommand<InsertImagePayload>;
|
|
11
|
+
/** 蓝框选中时接住 Backspace / Delete。不可编辑时吞掉按键,避免富文本继续删除。 */
|
|
12
|
+
export declare function registerSelectedImageDeleteCommands(editor: LexicalEditor, nodeKey: NodeKey): () => void;
|
|
@@ -53,5 +53,7 @@ export declare class ImageNode extends DecoratorNode<ReactNode> {
|
|
|
53
53
|
}
|
|
54
54
|
export declare function $createImageNode({ src, altText, width, height, dataId, dataSrc, key, }: ImagePayload): ImageNode;
|
|
55
55
|
export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;
|
|
56
|
+
/** 删掉已选中的图片,并把光标放到图片原来的位置。 */
|
|
57
|
+
export declare function $removeSelectedImage(node: ImageNode): void;
|
|
56
58
|
declare function convertImageElement(domNode: Node): null | DOMConversionOutput;
|
|
57
59
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./vendors/version-
|
|
1
|
+
import "./vendors/version-CxNabWr4.js";
|
|
2
2
|
import "./ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import { t as e } from "./Icon/Icon-CcKDWNGy.js";
|
|
4
4
|
import "./vendors/LocaleContext-DXQoOKM2.js";
|
|
@@ -13,7 +13,7 @@ import "./vendors/useFloatingOverlay-B66lOL8v.js";
|
|
|
13
13
|
import "./vendors/useLocale-Be4e7Xfn.js";
|
|
14
14
|
import "./vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
15
15
|
import { t as _ } from "./Segmented/Segmented-BMwjhsZw.js";
|
|
16
|
-
import { n as v, t as y } from "./Tooltip/Tooltip-
|
|
16
|
+
import { n as v, t as y } from "./Tooltip/Tooltip-N06Os8rG.js";
|
|
17
17
|
import { t as b } from "./Select/Select-DFXTqfwb.js";
|
|
18
18
|
import "./Select/SelectInputSearch-BEYleN-o.js";
|
|
19
19
|
import { t as x } from "./vendors/Tree-BkxKK0Sf.js";
|
|
@@ -29,8 +29,8 @@ import { t as O } from "./DropDown/DropDown-Ds0X5fxe.js";
|
|
|
29
29
|
import { t as k } from "./Loading/Loading-Cherk9Ax.js";
|
|
30
30
|
import "./NotFoundContent/index.js";
|
|
31
31
|
import { t as A } from "./InputTag/InputTag-BT-IXf5k.js";
|
|
32
|
-
import { t as j } from "./Calendar/Calendar-
|
|
33
|
-
import { t as M } from "./DatePicker/DatePicker-
|
|
32
|
+
import { t as j } from "./Calendar/Calendar-3Kv_WGxD.js";
|
|
33
|
+
import { t as M } from "./DatePicker/DatePicker-Dlw6OaT8.js";
|
|
34
34
|
import "./DatePicker/pickerLocale-Brf7_Tnd.js";
|
|
35
35
|
import { c as N, d as P, f as F, i as I, l as L, m as R, n as z, o as B, p as V, r as H, s as U, t as W, u as G } from "./Table/Table-8ac6xLZv.js";
|
|
36
36
|
import "overlayscrollbars/overlayscrollbars.css";
|