@baishuyun/ui-base 6.14.0 → 6.15.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.
Files changed (102) hide show
  1. package/dist/Amap/AmapCircle/index.js +1 -1
  2. package/dist/Amap/AmapMarker/index.js +1 -1
  3. package/dist/Amap/AmapMarkerCluster/index.js +1 -1
  4. package/dist/Amap/AmapProvider/index.js +4 -4
  5. package/dist/Amap/{AmapProvider-BwyzXpEj.js → AmapProvider-B-R2DrkJ.js} +1 -1
  6. package/dist/Amap/hooks/index.js +1 -1
  7. package/dist/Amap/index.js +4 -4
  8. package/dist/Calendar/{AllDaySection-D9YHhwIa.js → AllDaySection-b3li9ovR.js} +1 -1
  9. package/dist/Calendar/{Calendar-DpANgMxX.js → Calendar-DbQvgTzh.js} +7 -7
  10. package/dist/Calendar/{CurrentTimeIndicator-dRYot1Rk.js → CurrentTimeIndicator-BZLQps2m.js} +1 -1
  11. package/dist/Calendar/{EventCard-Di5UX4pB.js → EventCard-DkJoyxI3.js} +1 -1
  12. package/dist/Calendar/{TimeGrid-5zMy9Hks.js → TimeGrid-Qjvt-eum.js} +1 -1
  13. package/dist/Calendar/context/index.js +1 -1
  14. package/dist/Calendar/index.js +10 -10
  15. package/dist/Calendar/subcomponents/AllDaySection/index.js +5 -4
  16. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -3
  17. package/dist/Calendar/subcomponents/EventCard/index.js +4 -3
  18. package/dist/Calendar/subcomponents/TimeAxis/index.js +1 -1
  19. package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -3
  20. package/dist/Calendar/utils/index.js +1 -1
  21. package/dist/Calendar/utils/layout/index.js +1 -1
  22. package/dist/Calendar/utils/theme/index.js +1 -1
  23. package/dist/Card/index.js +1 -1
  24. package/dist/CheckBox/index.js +1 -1
  25. package/dist/ColorPicker/{ColorPicker-Cm_-e0Hz.js → ColorPicker-BGduOQbR.js} +2 -2
  26. package/dist/ColorPicker/index.js +4 -4
  27. package/dist/ConfigProvider/index.js +3 -3
  28. package/dist/DatePicker/{DatePicker-Sl-c8f3e.js → DatePicker-CvOPih1m.js} +3 -3
  29. package/dist/DatePicker/{DatePickerPanel-Bbz1ISVO.js → DatePickerPanel-CrpZidbJ.js} +3 -3
  30. package/dist/DatePicker/index.js +4 -4
  31. package/dist/DatePicker/style/index.js +1 -1
  32. package/dist/DropDown/{DropDown-DV1IuuQD.js → DropDown-CtiUrlqk.js} +4 -4
  33. package/dist/DropDown/index.js +6 -6
  34. package/dist/DropDown/style/index.js +1 -1
  35. package/dist/Editor/{Buttons-C6whbXgn.js → Buttons-BhGuyTzy.js} +595 -558
  36. package/dist/Editor/ToolbarPlugin/Buttons/index.js +9 -8
  37. package/dist/Editor/constants/index.js +1 -1
  38. package/dist/Editor/index.js +91 -76
  39. package/dist/Gantt/GanttChart/index.js +9 -9
  40. package/dist/Gantt/{GanttChart-DEGOIgRD.js → GanttChart-C_bxX0_A.js} +3 -3
  41. package/dist/Gantt/GanttTable/index.js +5 -5
  42. package/dist/Gantt/{GanttTable-Dwb00N8Z.js → GanttTable-T7ZHce4a.js} +1 -1
  43. package/dist/Gantt/GanttToolBar/index.js +7 -7
  44. package/dist/Gantt/{GanttToolBar-BcJB6sKY.js → GanttToolBar-jhhCjBn-.js} +2 -2
  45. package/dist/Gantt/index.js +11 -11
  46. package/dist/Gantt/utils/index.js +1 -1
  47. package/dist/Gantt/utils/theme/index.js +1 -1
  48. package/dist/Icon/index.js +1 -1
  49. package/dist/InputTag/{InputTag-CBnG1R7g.js → InputTag-BcywA_86.js} +1 -1
  50. package/dist/InputTag/index.js +4 -4
  51. package/dist/Loading/{Loading-DYayeRbT.js → Loading-D1QxBrOq.js} +1 -1
  52. package/dist/Loading/index.js +4 -4
  53. package/dist/Modal/index.js +1 -1
  54. package/dist/NotFoundContent/index.js +1 -1
  55. package/dist/Overlay/index.js +1 -1
  56. package/dist/Radio/index.js +1 -1
  57. package/dist/ScrollBar/index.js +1 -1
  58. package/dist/Segmented/index.js +1 -1
  59. package/dist/Select/{Select-CG5wFTL4.js → Select-DWXMgoud.js} +145 -145
  60. package/dist/Select/{SelectInputSearch-DiuwwOWz.js → SelectInputSearch-BUWOQCgT.js} +1 -1
  61. package/dist/Select/index.js +6 -6
  62. package/dist/Table/{Table-B7J-IK2_.js → Table-BjLvTorz.js} +1 -1
  63. package/dist/Table/hooks/index.js +1 -1
  64. package/dist/Table/index.js +4 -4
  65. package/dist/Table/style/index.js +1 -1
  66. package/dist/Table/utils/index.js +1 -1
  67. package/dist/Tabs/{Tabs-CObQtF37.js → Tabs-DezpnxP1.js} +3 -3
  68. package/dist/Tabs/index.js +5 -5
  69. package/dist/Tooltip/Tooltip-nJU13gX4.js +175 -0
  70. package/dist/Tooltip/index.js +3 -2
  71. package/dist/Tree/index.js +1 -1
  72. package/dist/Tree/utils/index.js +1 -1
  73. package/dist/animations/index.d.ts +1 -0
  74. package/dist/components/Editor/ToolbarPlugin/BaseButton/BaseButton.d.ts +4 -18
  75. package/dist/components/Editor/ToolbarPlugin/Buttons/PictureButton/UploadImage.d.ts +3 -1
  76. package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +2 -0
  77. package/dist/components/Editor/ToolbarPlugin/Buttons/registry.d.ts +2 -0
  78. package/dist/components/Editor/ToolbarPlugin/interface.d.ts +9 -11
  79. package/dist/components/Editor/commands/ImageCommands.d.ts +1 -0
  80. package/dist/components/Editor/index.d.ts +2 -1
  81. package/dist/components/Editor/interface.d.ts +1 -1
  82. package/dist/components/Editor/nodes/ImageComponent.d.ts +1 -0
  83. package/dist/components/Editor/nodes/ImageNode.d.ts +6 -2
  84. package/dist/components/Select/interface.d.ts +7 -0
  85. package/dist/components/Tooltip/Tooltip.type.d.ts +1 -2
  86. package/dist/hooks/resolvePopupMatchSelectWidth.d.ts +4 -0
  87. package/dist/hooks/useFloatingPortal.d.ts +1 -0
  88. package/dist/hooks/useLatchedPopupPortalRoot.d.ts +1 -1
  89. package/dist/index.js +21 -21
  90. package/dist/locale/lang/en-US.json.d.ts +2 -1
  91. package/dist/locale/lang/zh-CN.json.d.ts +2 -1
  92. package/dist/locale/lang/zh-TW.json.d.ts +2 -1
  93. package/dist/style.css +1 -1
  94. package/dist/vendors/{ConfigProvider-BDyxjj6K.js → ConfigProvider-gZYvcwIQ.js} +5 -3
  95. package/dist/vendors/{LocaleContext-w5ODGcJX.js → LocaleContext-DXQoOKM2.js} +2 -1
  96. package/dist/vendors/{animations-rwUbyoT0.js → animations-Dn_5xJ7B.js} +9 -1
  97. package/dist/vendors/useFloatingPortal-VpzL-EPh.js +75 -0
  98. package/dist/vendors/{useLocale-CEDl6cUK.js → useLocale-D31qCCff.js} +1 -1
  99. package/dist/vendors/{version-D17a2Lcy.js → version-DuQW7jtS.js} +1 -1
  100. package/package.json +1 -1
  101. package/dist/Tooltip/Tooltip-Bb3Jx-If.js +0 -172
  102. package/dist/vendors/useFloatingPortal-B3N1viK2.js +0 -47
@@ -1,6 +1,6 @@
1
1
  //#region src/version.ts
2
2
  if (typeof window < "u") {
3
3
  let e = window.__BSY_UI__ ??= {};
4
- e["@baishuyun/ui-base"] = "6.14.0";
4
+ e["@baishuyun/ui-base"] = "6.15.0";
5
5
  }
6
6
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-base",
3
- "version": "6.14.0",
3
+ "version": "6.15.0",
4
4
  "type": "module",
5
5
  "description": "百数云低代码平台通用组件库",
6
6
  "author": "bsy-fe team",
@@ -1,172 +0,0 @@
1
- import { a as e, i as t } from "../Overlay/OverlayContext-CVSFoyqN.js";
2
- import { n } from "../vendors/mergeRefs-TiJ0xjUN.js";
3
- import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
4
- import { Fragment as o, cloneElement as ee, createContext as s, isValidElement as c, useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as te } from "react";
5
- import { useControllableValue as ne } from "ahooks";
6
- import { FloatingArrow as re, FloatingPortal as ie, arrow as ae, autoUpdate as p, flip as oe, offset as se, safePolygon as ce, shift as le, size as ue, useClick as m, useDismiss as h, useFloating as g, useHover as _, useInteractions as v, useRole as y, useTransitionStyles as de } from "@floating-ui/react";
7
- //#region src/components/Tooltip/context/TooltipFloatingContext.ts
8
- var b = s(null), x = {
9
- "bsy-tooltip": "_bsy-tooltip_eibqv_1",
10
- "bsy-tooltip__trigger": "_bsy-tooltip__trigger_eibqv_4",
11
- "bsy-tooltip__content": "_bsy-tooltip__content_eibqv_8"
12
- }, fe = "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", pe = "#525867", S = (e, t) => e ? t ? (n) => {
13
- e(n), t(n);
14
- } : e : t, C = (e) => {
15
- if (!(e === "auto" || e === void 0)) return typeof e == "number" ? `${e}px` : e;
16
- }, me = (e) => e.type === o || (e.type?.toString().includes("Fragment") ?? !1), w = ({ children: o, content: s, trigger: w = "hover", style: T, zIndex: E, showArrow: D = !0, placement: O = "bottom", onClose: k, hoverDelay: A = 500, getPopupContainer: j, moveToFloatingKeepOpen: M = !1, widthMode: N = "content", width: P, minWidth: F = 60, maxWidth: I = 340, offset: L = 10, fallbackPlacements: R, virtualReference: z, flipBoundary: B, animated: V = !1, animationConfig: H, ...he }) => {
17
- let U = f(null), [ge, _e] = te(null), W = e(E), [G, K] = ne(he, {
18
- valuePropName: "visible",
19
- trigger: "onVisibleChange",
20
- defaultValue: !1
21
- }), ve = l((e) => {
22
- !e && G && k && k(), K(e);
23
- }, [
24
- G,
25
- k,
26
- K
27
- ]), ye = d(() => {
28
- let e = R ? { fallbackPlacements: R } : {};
29
- B && (e.boundary = B);
30
- let t = [
31
- se(L),
32
- oe(e),
33
- le({ padding: 8 })
34
- ];
35
- return D && t.push(ae({ element: U })), N === "reference" && t.push(ue({ apply({ rects: e, elements: t }) {
36
- t.floating.style.width = `${e.reference.width}px`;
37
- let n = C(F);
38
- n && (t.floating.style.minWidth = n);
39
- let r = C(I);
40
- r && (t.floating.style.maxWidth = r);
41
- } })), t;
42
- }, [
43
- N,
44
- F,
45
- I,
46
- L,
47
- R,
48
- B,
49
- D
50
- ]), { refs: q, floatingStyles: J, context: Y } = g({
51
- open: G,
52
- onOpenChange: ve,
53
- whileElementsMounted: G ? (e, t, n) => p(e, t, n, {
54
- animationFrame: !1,
55
- ancestorScroll: !0,
56
- ancestorResize: !0,
57
- elementResize: !0,
58
- layoutShift: !1
59
- }) : void 0,
60
- placement: O,
61
- middleware: ye,
62
- transform: !1
63
- }), { isMounted: be, styles: xe } = de(Y, V && H ? H : { duration: 0 }), Se = V ? be : G, X = d(() => {
64
- let e = {
65
- ...J,
66
- ...T,
67
- "--bsy-tooltip-z-index": W
68
- };
69
- switch (N) {
70
- case "content":
71
- e.width = "auto";
72
- break;
73
- case "manual":
74
- P !== void 0 && (e.width = C(P));
75
- break;
76
- case "reference": break;
77
- default: e.width = "max-content";
78
- }
79
- return N !== "reference" && (F !== void 0 && (e.minWidth = C(F)), I !== void 0 && (e.maxWidth = C(I))), e;
80
- }, [
81
- J,
82
- T,
83
- W,
84
- N,
85
- P,
86
- F,
87
- I
88
- ]);
89
- u(() => {
90
- z && q.setPositionReference(z);
91
- }, [z, q]);
92
- let { getReferenceProps: Ce, getFloatingProps: we } = v([
93
- _(Y, {
94
- enabled: w === "hover",
95
- delay: { open: A },
96
- handleClose: M ? ce() : void 0
97
- }),
98
- m(Y, { enabled: w === "click" }),
99
- h(Y),
100
- y(Y, { role: "tooltip" })
101
- ]), Z = Ce(), Q = {
102
- ...Z,
103
- onClick: (e) => {
104
- w === "click" && e.stopPropagation(), Z.onClick?.(e);
105
- },
106
- onMouseEnter: (e) => {
107
- w === "hover" && e.stopPropagation(), Z.onMouseEnter?.(e);
108
- },
109
- onMouseLeave: (e) => {
110
- w === "hover" && e.stopPropagation(), Z.onMouseLeave?.(e);
111
- },
112
- onMouseMove: (e) => {
113
- Z.onMouseMove?.(e);
114
- }
115
- }, Te = j?.(), Ee = typeof T?.background == "string" ? T.background : pe, De = n(q.setFloating, _e), $ = Se ? /* @__PURE__ */ i(ie, {
116
- root: Te ?? void 0,
117
- children: /* @__PURE__ */ i(t, {
118
- zIndex: W,
119
- children: /* @__PURE__ */ a("div", {
120
- ref: De,
121
- style: V ? {
122
- ...X,
123
- ...xe
124
- } : X,
125
- ...we(),
126
- className: x["bsy-tooltip__content"],
127
- onClick: (e) => e.stopPropagation(),
128
- children: [D ? /* @__PURE__ */ i(re, {
129
- ref: U,
130
- context: Y,
131
- width: 14,
132
- height: 14,
133
- tipRadius: 2,
134
- fill: Ee,
135
- d: fe
136
- }) : null, /* @__PURE__ */ i(b.Provider, {
137
- value: ge,
138
- children: s
139
- })]
140
- })
141
- })
142
- }) : null;
143
- if (c(o) && !me(o)) {
144
- let e = o.props, t = o.ref;
145
- return /* @__PURE__ */ a(r, { children: [ee(o, {
146
- ...e,
147
- ...Q,
148
- ref: t ? n(q.setReference, t) : q.setReference,
149
- style: e.style,
150
- onClick: S(e.onClick, Q.onClick),
151
- onMouseEnter: S(e.onMouseEnter, Q.onMouseEnter),
152
- onMouseLeave: S(e.onMouseLeave, Q.onMouseLeave),
153
- onMouseMove: S(e.onMouseMove, Q.onMouseMove)
154
- }), $] });
155
- }
156
- return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("div", {
157
- className: x["bsy-tooltip"],
158
- children: /* @__PURE__ */ i("div", {
159
- ref: q.setReference,
160
- ...Q,
161
- className: x["bsy-tooltip__trigger"],
162
- children: o
163
- })
164
- }), $] });
165
- }, T = ({ content: e, children: t, ...n }) => e ? /* @__PURE__ */ i(w, {
166
- content: e,
167
- ...n,
168
- children: t
169
- }) : /* @__PURE__ */ i(r, { children: t });
170
- T.displayName = "BsyTooltip";
171
- //#endregion
172
- export { b as n, T as t };
@@ -1,47 +0,0 @@
1
- import { useMemo as e } from "react";
2
- import { autoUpdate as t, flip as n, offset as r, shift as i, size as a, useClick as o, useDismiss as s, useFloating as c, useInteractions as l } from "@floating-ui/react";
3
- //#region src/hooks/useFloatingPortal.ts
4
- var u = (u) => {
5
- let { isOpen: d, close: f, showMask: p, zIndex: m, zIndexMask: h, offset: g, popupMinWidth: _, outsidePress: v = !0, nodeId: y } = u, { refs: b, floatingStyles: x, context: S } = c({
6
- nodeId: y,
7
- open: d,
8
- onOpenChange: (e) => {
9
- e || f();
10
- },
11
- placement: "bottom-start",
12
- transform: !1,
13
- whileElementsMounted: t,
14
- middleware: [
15
- n(),
16
- i({ padding: 8 }),
17
- r({
18
- mainAxis: g?.y || 0,
19
- crossAxis: g?.x || 0
20
- }),
21
- a({ apply({ rects: e, elements: t }) {
22
- Object.assign(t.floating.style, {
23
- minWidth: _,
24
- width: `${e.reference.width}px`,
25
- zIndex: m
26
- });
27
- } })
28
- ]
29
- }), { getReferenceProps: C, getFloatingProps: w } = l([o(S), s(S, { outsidePress: v })]);
30
- return {
31
- refs: b,
32
- floatingStyles: x,
33
- context: S,
34
- getReferenceProps: C,
35
- getFloatingProps: w,
36
- referenceStyle: e(() => p && d && h !== void 0 ? {
37
- zIndex: h + 1,
38
- position: "relative"
39
- } : {}, [
40
- p,
41
- d,
42
- h
43
- ])
44
- };
45
- };
46
- //#endregion
47
- export { u as t };