@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.
Files changed (35) hide show
  1. package/dist/Amap/index.js +1 -1
  2. package/dist/Calendar/{Calendar-BXO7aEFf.js → Calendar-3Kv_WGxD.js} +2 -2
  3. package/dist/Calendar/index.js +4 -4
  4. package/dist/Card/index.js +1 -1
  5. package/dist/CheckBox/index.js +1 -1
  6. package/dist/ColorPicker/index.js +1 -1
  7. package/dist/ConfigProvider/index.js +1 -1
  8. package/dist/DatePicker/{DatePicker-DDn-YRzO.js → DatePicker-Dlw6OaT8.js} +1 -1
  9. package/dist/DatePicker/{DatePickerPanel-B5FDqMRj.js → DatePickerPanel-Ohx9pcvr.js} +1 -1
  10. package/dist/DatePicker/index.js +2 -2
  11. package/dist/DropDown/index.js +1 -1
  12. package/dist/Editor/index.js +790 -772
  13. package/dist/Gantt/index.js +2 -2
  14. package/dist/Icon/index.js +1 -1
  15. package/dist/InputTag/index.js +1 -1
  16. package/dist/Loading/index.js +1 -1
  17. package/dist/Modal/index.js +1 -1
  18. package/dist/NotFoundContent/index.js +1 -1
  19. package/dist/Overlay/index.js +1 -1
  20. package/dist/Radio/index.js +1 -1
  21. package/dist/ScrollBar/index.js +1 -1
  22. package/dist/Segmented/index.js +1 -1
  23. package/dist/Select/index.js +1 -1
  24. package/dist/Table/index.js +1 -1
  25. package/dist/Tabs/index.js +1 -1
  26. package/dist/Tooltip/Tooltip-N06Os8rG.js +178 -0
  27. package/dist/Tooltip/index.js +2 -2
  28. package/dist/Tree/index.js +1 -1
  29. package/dist/components/Editor/commands/ImageCommands.d.ts +3 -1
  30. package/dist/components/Editor/nodes/ImageNode.d.ts +2 -0
  31. package/dist/index.js +4 -4
  32. package/dist/style.css +1 -1
  33. package/dist/vendors/{version-F33icKZ9.js → version-CxNabWr4.js} +1 -1
  34. package/package.json +1 -1
  35. package/dist/Tooltip/Tooltip-DAtuL6eT.js +0 -175
@@ -1,175 +0,0 @@
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 h, autoUpdate as g, flip as _, offset as v, safePolygon as y, shift as b, size as x, useClick as se, useDismiss as ce, useFloating as le, useHover as ue, useInteractions as de, useRole as fe } from "@floating-ui/react";
10
- //#region src/components/Tooltip/context/TooltipFloatingContext.ts
11
- var S = u(null), C = {
12
- "bsy-tooltip__trigger": "_bsy-tooltip__trigger_eg3cj_1",
13
- "bsy-tooltip__content": "_bsy-tooltip__content_eg3cj_5"
14
- }, pe = "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", me = "#525867", w = (e, t) => e ? t ? (n) => {
15
- e(n), t(n);
16
- } : e : t, T = (e) => {
17
- if (!(e === "auto" || e === void 0)) return typeof e == "number" ? `${e}px` : e;
18
- }, E = (e) => e.type === c || (e.type?.toString().includes("Fragment") ?? !1), D = ({ children: c, content: u, trigger: D = "hover", style: O, zIndex: k, showArrow: A = !0, placement: j = "bottom", onClose: M, hoverDelay: N = 500, getPopupContainer: P, moveToFloatingKeepOpen: F = !1, widthMode: I = "content", width: L, minWidth: R = 60, maxWidth: z = 340, offset: B = 10, fallbackPlacements: V, virtualReference: H, flipBoundary: U, animated: he = !0, ...ge }) => {
19
- let W = te(null), [_e, ve] = ne(null), G = e(k), [K, q] = re(ge, {
20
- valuePropName: "visible",
21
- trigger: "onVisibleChange",
22
- defaultValue: !1
23
- }), ye = f((e) => {
24
- !e && K && M && M(), q(e);
25
- }, [
26
- K,
27
- M,
28
- q
29
- ]), be = p(() => {
30
- let e = V ? { fallbackPlacements: V } : {};
31
- U && (e.boundary = U);
32
- let t = [
33
- v(B),
34
- _(e),
35
- b({ padding: 8 })
36
- ];
37
- return A && t.push(h({ element: W })), I === "reference" && t.push(x({ apply({ rects: e, elements: t }) {
38
- t.floating.style.width = `${e.reference.width}px`;
39
- let n = T(R);
40
- n && (t.floating.style.minWidth = n);
41
- let r = T(z);
42
- r && (t.floating.style.maxWidth = r);
43
- } })), t;
44
- }, [
45
- I,
46
- R,
47
- z,
48
- B,
49
- V,
50
- U,
51
- A
52
- ]), { refs: J, floatingStyles: Y, context: X } = le({
53
- open: K,
54
- onOpenChange: ye,
55
- whileElementsMounted: K ? (e, t, n) => g(e, t, n, {
56
- animationFrame: !1,
57
- ancestorScroll: !0,
58
- ancestorResize: !0,
59
- elementResize: !0,
60
- layoutShift: !1
61
- }) : void 0,
62
- placement: j,
63
- middleware: be,
64
- transform: !1
65
- }), { portalRoot: xe, portalMountKey: Se, handleExitComplete: Ce } = r(K, P), we = p(() => {
66
- let e = {
67
- ...Y,
68
- ...O,
69
- "--bsy-tooltip-z-index": G
70
- };
71
- switch (I) {
72
- case "content":
73
- e.width = "auto";
74
- break;
75
- case "manual":
76
- L !== void 0 && (e.width = T(L));
77
- break;
78
- case "reference": break;
79
- default: e.width = "max-content";
80
- }
81
- return I !== "reference" && (R !== void 0 && (e.minWidth = T(R)), z !== void 0 && (e.maxWidth = T(z))), e;
82
- }, [
83
- Y,
84
- O,
85
- G,
86
- I,
87
- L,
88
- R,
89
- z
90
- ]);
91
- ee(() => {
92
- H && J.setPositionReference(H);
93
- }, [H, J]);
94
- let { getReferenceProps: Te, getFloatingProps: Ee } = de([
95
- ue(X, {
96
- enabled: D === "hover",
97
- delay: { open: N },
98
- handleClose: F ? y() : void 0
99
- }),
100
- se(X, { enabled: D === "click" }),
101
- ce(X),
102
- fe(X, { role: "tooltip" })
103
- ]), Z = Te(), Q = {
104
- ...Z,
105
- onClick: (e) => {
106
- D === "click" && e.stopPropagation(), Z.onClick?.(e);
107
- },
108
- onMouseEnter: (e) => {
109
- D === "hover" && e.stopPropagation(), Z.onMouseEnter?.(e);
110
- },
111
- onMouseLeave: (e) => {
112
- D === "hover" && e.stopPropagation(), Z.onMouseLeave?.(e);
113
- },
114
- onMouseMove: (e) => {
115
- Z.onMouseMove?.(e);
116
- }
117
- }, De = typeof O?.background == "string" ? O.background : me, Oe = i(J.setFloating, ve), $ = /* @__PURE__ */ o(oe, {
118
- root: xe,
119
- children: /* @__PURE__ */ o(t, {
120
- zIndex: G,
121
- children: /* @__PURE__ */ o(m, {
122
- onExitComplete: Ce,
123
- children: K ? /* @__PURE__ */ s(ie.div, {
124
- ref: Oe,
125
- style: we,
126
- ...Ee(),
127
- className: C["bsy-tooltip__content"],
128
- onClick: (e) => e.stopPropagation(),
129
- ...he ? n : {},
130
- children: [A ? /* @__PURE__ */ o(ae, {
131
- ref: W,
132
- context: X,
133
- width: 14,
134
- height: 14,
135
- tipRadius: 2,
136
- fill: De,
137
- d: pe
138
- }) : null, /* @__PURE__ */ o(S.Provider, {
139
- value: _e,
140
- children: u
141
- })]
142
- }, "bsy-tooltip-content") : null
143
- })
144
- })
145
- }, Se);
146
- if (d(c) && !E(c)) {
147
- let e = c.props, t = c.ref;
148
- return /* @__PURE__ */ s(a, { children: [l(c, {
149
- ...e,
150
- ...Q,
151
- ref: t ? i(J.setReference, t) : J.setReference,
152
- style: e.style,
153
- onClick: w(e.onClick, Q.onClick),
154
- onMouseEnter: w(e.onMouseEnter, Q.onMouseEnter),
155
- onMouseLeave: w(e.onMouseLeave, Q.onMouseLeave),
156
- onMouseMove: w(e.onMouseMove, Q.onMouseMove)
157
- }), $] });
158
- }
159
- return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
160
- className: C["bsy-tooltip"],
161
- children: /* @__PURE__ */ o("div", {
162
- ref: J.setReference,
163
- ...Q,
164
- className: C["bsy-tooltip__trigger"],
165
- children: c
166
- })
167
- }), $] });
168
- }, O = ({ content: e, children: t, ...n }) => e ? /* @__PURE__ */ o(D, {
169
- content: e,
170
- ...n,
171
- children: t
172
- }) : /* @__PURE__ */ o(a, { children: t });
173
- O.displayName = "BsyTooltip";
174
- //#endregion
175
- export { S as n, O as t };