@baishuyun/ui-base 6.9.1 → 6.10.1

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 (145) hide show
  1. package/dist/Amap/{Amap-BNnmSPnl.js → Amap-BLSziesG.js} +1 -1
  2. package/dist/Amap/AmapCircle/index.js +4 -4
  3. package/dist/Amap/{AmapCircle-BDW6pnNR.js → AmapCircle-2qupysHe.js} +1 -1
  4. package/dist/Amap/AmapMarker/index.js +5 -5
  5. package/dist/Amap/{AmapMarker-CdoPWdff.js → AmapMarker-xEqoVnFR.js} +2 -2
  6. package/dist/Amap/AmapMarkerCluster/index.js +5 -5
  7. package/dist/Amap/{AmapMarkerCluster-CSIxiVC5.js → AmapMarkerCluster-CvEQa3o9.js} +2 -2
  8. package/dist/Amap/AmapProvider/index.js +6 -5
  9. package/dist/Amap/{AmapProvider-Cwi6WOe0.js → AmapProvider-DqFp3DZ5.js} +2 -2
  10. package/dist/Amap/hooks/index.js +3 -3
  11. package/dist/Amap/{hooks-DAN31s_-.js → hooks-BTcFpdd0.js} +1 -1
  12. package/dist/Amap/index.js +12 -11
  13. package/dist/Calendar/{AllDaySection-a96dIzs3.js → AllDaySection-BqbcPQls.js} +1 -1
  14. package/dist/Calendar/{Calendar-Bcs9mxET.js → Calendar-gEtuBW7Y.js} +9 -10
  15. package/dist/Calendar/{CurrentTimeIndicator-CNKsVEXH.js → CurrentTimeIndicator-dRYot1Rk.js} +24 -18
  16. package/dist/Calendar/{EventCard-B1LoBxth.js → EventCard-Di5UX4pB.js} +1 -2
  17. package/dist/Calendar/{TimeGrid-DIw8oCqY.js → TimeGrid-CBpDFAM4.js} +1 -1
  18. package/dist/Calendar/context/index.js +1 -1
  19. package/dist/Calendar/index.js +15 -14
  20. package/dist/Calendar/subcomponents/AllDaySection/index.js +5 -4
  21. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -3
  22. package/dist/Calendar/subcomponents/EventCard/index.js +4 -3
  23. package/dist/Calendar/subcomponents/TimeAxis/index.js +1 -1
  24. package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -3
  25. package/dist/Calendar/{theme-xnrMsnkg.js → theme-i60ueO92.js} +1 -1
  26. package/dist/Calendar/utils/index.js +1 -1
  27. package/dist/Calendar/utils/layout/index.js +1 -1
  28. package/dist/Calendar/utils/theme/index.js +2 -2
  29. package/dist/Card/index.js +2 -2
  30. package/dist/CheckBox/index.js +1 -1
  31. package/dist/ColorPicker/ColorPicker-CYlrnMwM.js +174 -0
  32. package/dist/ColorPicker/index.js +6 -6
  33. package/dist/ConfigProvider/index.js +4 -3
  34. package/dist/DatePicker/DatePicker-CagGt_f0.js +101 -0
  35. package/dist/DatePicker/{DatePickerPanel-C_TDG3HH.js → DatePickerPanel-CaDZzxMD.js} +3 -3
  36. package/dist/DatePicker/index.js +7 -6
  37. package/dist/DatePicker/style/index.js +2 -2
  38. package/dist/DatePicker/{style-CNtPPsZp.js → style-UKXn1N_p.js} +1 -1
  39. package/dist/DropDown/DropDown-CLuQf970.js +178 -0
  40. package/dist/DropDown/index.js +8 -7
  41. package/dist/DropDown/style/index.js +2 -2
  42. package/dist/DropDown/{style-Fdp-U4md.js → style-LLDVPpPa.js} +1 -1
  43. package/dist/Editor/Buttons-ByO5rS19.js +937 -0
  44. package/dist/Editor/ToolbarPlugin/Buttons/index.js +12 -12
  45. package/dist/Editor/constants/index.js +3 -3
  46. package/dist/Editor/index.js +667 -298
  47. package/dist/Gantt/GanttChart/index.js +11 -10
  48. package/dist/Gantt/{GanttChart-DjwZsxEj.js → GanttChart-DvCAp8Dk.js} +3 -5
  49. package/dist/Gantt/GanttTable/index.js +6 -6
  50. package/dist/Gantt/{GanttTable-xbXD_PWI.js → GanttTable-DyVJOVo3.js} +1 -1
  51. package/dist/Gantt/GanttToolBar/index.js +9 -8
  52. package/dist/Gantt/{GanttToolBar-BTeTsR6Z.js → GanttToolBar-CxT68kmT.js} +2 -3
  53. package/dist/Gantt/index.js +15 -14
  54. package/dist/Gantt/{theme-DLNvgM9X.js → theme-2LyXJRDe.js} +1 -1
  55. package/dist/Gantt/utils/index.js +1 -1
  56. package/dist/Gantt/utils/theme/index.js +2 -2
  57. package/dist/Icon/index.js +1 -1
  58. package/dist/InputTag/{InputTag-hzCCJQ1z.js → InputTag-yRPO90Ku.js} +2 -2
  59. package/dist/InputTag/index.js +5 -5
  60. package/dist/Loading/{Loading-DiywS7ex.js → Loading-BF_dtuLc.js} +1 -1
  61. package/dist/Loading/index.js +4 -4
  62. package/dist/Modal/Modal-Cb7Msq26.js +96 -0
  63. package/dist/Modal/index.js +3 -2
  64. package/dist/NotFoundContent/index.js +1 -1
  65. package/dist/Overlay/OverlayContext-CVSFoyqN.js +23 -0
  66. package/dist/Overlay/index.js +3 -0
  67. package/dist/Radio/index.js +1 -1
  68. package/dist/ScrollBar/{ScrollBar-QhXVe8zd.js → ScrollBar-N2pOLv-8.js} +1 -1
  69. package/dist/ScrollBar/index.js +2 -2
  70. package/dist/Segmented/{Segmented-BDz1hMDT.js → Segmented-BCQRrc65.js} +1 -1
  71. package/dist/Segmented/index.js +2 -2
  72. package/dist/Select/Select-iwzfNy9d.js +753 -0
  73. package/dist/Select/{SelectInputSearch-COUzreau.js → SelectInputSearch-Bc_aPNbG.js} +1 -1
  74. package/dist/Select/index.js +8 -7
  75. package/dist/Table/{Table-yQXQEk6d.js → Table-Cm8zFl2G.js} +2 -2
  76. package/dist/Table/hooks/index.js +1 -1
  77. package/dist/Table/index.js +5 -5
  78. package/dist/Table/style/index.js +2 -2
  79. package/dist/Table/{style-DgiPEsSp.js → style-C4wp0IOM.js} +1 -1
  80. package/dist/Table/utils/index.js +1 -1
  81. package/dist/Tabs/{Tabs-BiKW70CL.js → Tabs-BPWRIwtD.js} +118 -103
  82. package/dist/Tabs/index.js +5 -5
  83. package/dist/Tooltip/Tooltip-Bb3Jx-If.js +172 -0
  84. package/dist/Tooltip/index.js +3 -2
  85. package/dist/Tree/index.js +2 -2
  86. package/dist/Tree/utils/index.js +1 -1
  87. package/dist/components/ColorPicker/ColorPalettes.d.ts +3 -8
  88. package/dist/components/ColorPicker/ColorPicker.type.d.ts +6 -9
  89. package/dist/components/ColorPicker/constants.d.ts +3 -1
  90. package/dist/components/ColorPicker/index.d.ts +1 -1
  91. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +2 -0
  92. package/dist/components/DatePicker/interface.d.ts +2 -0
  93. package/dist/components/Editor/ToolbarPlugin/Buttons/BulletListButton.d.ts +2 -0
  94. package/dist/components/Editor/ToolbarPlugin/Buttons/CodeButton.d.ts +2 -0
  95. package/dist/components/Editor/ToolbarPlugin/Buttons/CodeLanguageButton.d.ts +2 -0
  96. package/dist/components/Editor/ToolbarPlugin/Buttons/IndentButton.d.ts +2 -0
  97. package/dist/components/Editor/ToolbarPlugin/Buttons/NumberListButton.d.ts +2 -0
  98. package/dist/components/Editor/ToolbarPlugin/Buttons/OutdentButton.d.ts +2 -0
  99. package/dist/components/Editor/ToolbarPlugin/Buttons/PictureButton/UploadImage.d.ts +5 -4
  100. package/dist/components/Editor/ToolbarPlugin/Buttons/RedoButton.d.ts +2 -0
  101. package/dist/components/Editor/ToolbarPlugin/Buttons/StrikeThroughButton.d.ts +2 -0
  102. package/dist/components/Editor/ToolbarPlugin/Buttons/SubscriptButton.d.ts +2 -0
  103. package/dist/components/Editor/ToolbarPlugin/Buttons/SuperscriptButton.d.ts +2 -0
  104. package/dist/components/Editor/ToolbarPlugin/Buttons/UndoButton.d.ts +2 -0
  105. package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +10 -0
  106. package/dist/components/Editor/ToolbarPlugin/context/HistoryStateProvider.d.ts +8 -0
  107. package/dist/components/Editor/ToolbarPlugin/context/TextFormatsContext.d.ts +8 -1
  108. package/dist/components/Editor/ToolbarPlugin/icons/ToolbarIcon.d.ts +13 -0
  109. package/dist/components/Editor/constants/codeLanguages.d.ts +69 -0
  110. package/dist/components/Editor/constants/index.d.ts +2 -0
  111. package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +1 -0
  112. package/dist/components/Editor/plugins/LinkColorPlugin.d.ts +2 -0
  113. package/dist/components/Editor/plugins/PasteStripImagePlugin.d.ts +1 -0
  114. package/dist/components/Editor/utils/codeHighlighter.d.ts +12 -0
  115. package/dist/components/Editor/utils/formatTruncatedFilename.d.ts +4 -0
  116. package/dist/components/Editor/utils/stripImagesFromHtml.d.ts +1 -0
  117. package/dist/components/Overlay/OverlayContext.d.ts +16 -0
  118. package/dist/components/Overlay/index.d.ts +2 -0
  119. package/dist/components/Tooltip/Tooltip.type.d.ts +1 -1
  120. package/dist/components/index.d.ts +2 -0
  121. package/dist/index.js +45 -44
  122. package/dist/locale/lang/en-US.json.d.ts +14 -2
  123. package/dist/locale/lang/zh-CN.json.d.ts +14 -2
  124. package/dist/locale/lang/zh-TW.json.d.ts +14 -2
  125. package/dist/style.css +1 -1
  126. package/dist/vendors/{ConfigProvider-DxrZpdIb.js → ConfigProvider-vPuwReNX.js} +70 -36
  127. package/dist/vendors/{LocaleContext-Dcw6C1LX.js → LocaleContext-CN9doEXT.js} +14 -2
  128. package/dist/vendors/{Tree-DXmVRDn0.js → Tree-B09frqQX.js} +1 -0
  129. package/dist/vendors/{useLocale-BKZX2_zw.js → useLocale-sawv8CEL.js} +1 -1
  130. package/dist/vendors/{version-DiV_Cnd8.js → version-DdQLttdL.js} +1 -1
  131. package/package.json +7 -1
  132. package/dist/ColorPicker/ColorPicker-t1uBeATW.js +0 -155
  133. package/dist/DatePicker/DatePicker--kMNwM9Q.js +0 -96
  134. package/dist/DropDown/DropDown-yDH9V_9Y.js +0 -171
  135. package/dist/Editor/Buttons-BhStZyIa.js +0 -620
  136. package/dist/Modal/Modal-LiztSF7x.js +0 -92
  137. package/dist/Select/Select-D6EK7whJ.js +0 -744
  138. package/dist/Tooltip/Tooltip-Ch9lti_7.js +0 -168
  139. package/dist/vendors/color-D6XBXROa.js +0 -12
  140. /package/dist/Amap/{AmapContext-D7Njjm5a.js → AmapContext-CJBe6lld.js} +0 -0
  141. /package/dist/Amap/{useMarkerInfoWindowController-BQmhR0N7.js → useMarkerInfoWindowController-Cjx0xQXw.js} +0 -0
  142. /package/dist/Card/{Card-CtKLNh3n.js → Card-Ds5Rpq--.js} +0 -0
  143. /package/dist/vendors/{cssVars-BYg1matG.js → cssVars-l4-kP_14.js} +0 -0
  144. /package/dist/vendors/{mergeRefs-Bsywq1Vo.js → mergeRefs-TiJ0xjUN.js} +0 -0
  145. /package/dist/vendors/{useFloatingOverlay-BApqkHSu.js → useFloatingOverlay-B3M9k8nj.js} +0 -0
@@ -1,168 +0,0 @@
1
- import { n as e } from "../vendors/mergeRefs-Bsywq1Vo.js";
2
- import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
- import { Fragment as i, cloneElement as ee, createContext as a, isValidElement as te, useCallback as ne, useEffect as re, useMemo as o, useRef as ie, useState as s } from "react";
4
- import { useControllableValue as c } from "ahooks";
5
- import { FloatingArrow as l, FloatingPortal as u, arrow as d, autoUpdate as f, flip as p, offset as m, safePolygon as h, shift as g, size as _, useClick as v, useDismiss as y, useFloating as ae, useHover as oe, useInteractions as se, useRole as ce, useTransitionStyles as le } from "@floating-ui/react";
6
- //#region src/components/Tooltip/context/TooltipFloatingContext.ts
7
- var b = a(null), x = {
8
- "bsy-tooltip": "_bsy-tooltip_bqmfs_1",
9
- "bsy-tooltip__trigger": "_bsy-tooltip__trigger_bqmfs_4",
10
- "bsy-tooltip__content": "_bsy-tooltip__content_bqmfs_8"
11
- }, ue = "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", de = "#525867", S = (e, t) => e ? t ? (n) => {
12
- e(n), t(n);
13
- } : e : t, C = (e) => {
14
- if (!(e === "auto" || e === void 0)) return typeof e == "number" ? `${e}px` : e;
15
- }, fe = (e) => e.type === i || (e.type?.toString().includes("Fragment") ?? !1), w = ({ children: i, content: a, 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, ...pe }) => {
16
- let U = ie(null), [me, he] = s(null), [W, G] = c(pe, {
17
- valuePropName: "visible",
18
- trigger: "onVisibleChange",
19
- defaultValue: !1
20
- }), ge = ne((e) => {
21
- !e && W && k && k(), G(e);
22
- }, [
23
- W,
24
- k,
25
- G
26
- ]), _e = o(() => {
27
- let e = R ? { fallbackPlacements: R } : {};
28
- B && (e.boundary = B);
29
- let t = [
30
- m(L),
31
- p(e),
32
- g({ padding: 8 })
33
- ];
34
- return D && t.push(d({ element: U })), N === "reference" && t.push(_({ apply({ rects: e, elements: t }) {
35
- t.floating.style.width = `${e.reference.width}px`;
36
- let n = C(F);
37
- n && (t.floating.style.minWidth = n);
38
- let r = C(I);
39
- r && (t.floating.style.maxWidth = r);
40
- } })), t;
41
- }, [
42
- N,
43
- F,
44
- I,
45
- L,
46
- R,
47
- B,
48
- D
49
- ]), { refs: K, floatingStyles: q, context: J } = ae({
50
- open: W,
51
- onOpenChange: ge,
52
- whileElementsMounted: W ? (e, t, n) => f(e, t, n, {
53
- animationFrame: !1,
54
- ancestorScroll: !0,
55
- ancestorResize: !0,
56
- elementResize: !0,
57
- layoutShift: !1
58
- }) : void 0,
59
- placement: O,
60
- middleware: _e,
61
- transform: !1
62
- }), { isMounted: Y, styles: ve } = le(J, V && H ? H : { duration: 0 }), ye = V ? Y : W, X = o(() => {
63
- let e = {
64
- ...q,
65
- ...T,
66
- ...E === void 0 ? null : { "--bsy-tooltip-z-index": E }
67
- };
68
- switch (N) {
69
- case "content":
70
- e.width = "auto";
71
- break;
72
- case "manual":
73
- P !== void 0 && (e.width = C(P));
74
- break;
75
- case "reference": break;
76
- default: e.width = "max-content";
77
- }
78
- return N !== "reference" && (F !== void 0 && (e.minWidth = C(F)), I !== void 0 && (e.maxWidth = C(I))), e;
79
- }, [
80
- q,
81
- T,
82
- E,
83
- N,
84
- P,
85
- F,
86
- I
87
- ]);
88
- re(() => {
89
- z && K.setPositionReference(z);
90
- }, [z, K]);
91
- let { getReferenceProps: be, getFloatingProps: xe } = se([
92
- oe(J, {
93
- enabled: w === "hover",
94
- delay: { open: A },
95
- handleClose: M ? h() : void 0
96
- }),
97
- v(J, { enabled: w === "click" }),
98
- y(J),
99
- ce(J, { role: "tooltip" })
100
- ]), Z = be(), Q = {
101
- ...Z,
102
- onClick: (e) => {
103
- w === "click" && e.stopPropagation(), Z.onClick?.(e);
104
- },
105
- onMouseEnter: (e) => {
106
- w === "hover" && e.stopPropagation(), Z.onMouseEnter?.(e);
107
- },
108
- onMouseLeave: (e) => {
109
- w === "hover" && e.stopPropagation(), Z.onMouseLeave?.(e);
110
- },
111
- onMouseMove: (e) => {
112
- Z.onMouseMove?.(e);
113
- }
114
- }, Se = j?.(), Ce = typeof T?.background == "string" ? T.background : de, we = e(K.setFloating, he), $ = ye ? /* @__PURE__ */ n(u, {
115
- root: Se ?? void 0,
116
- children: /* @__PURE__ */ r("div", {
117
- ref: we,
118
- style: V ? {
119
- ...X,
120
- ...ve
121
- } : X,
122
- ...xe(),
123
- className: x["bsy-tooltip__content"],
124
- onClick: (e) => e.stopPropagation(),
125
- children: [D ? /* @__PURE__ */ n(l, {
126
- ref: U,
127
- context: J,
128
- width: 14,
129
- height: 14,
130
- tipRadius: 2,
131
- fill: Ce,
132
- d: ue
133
- }) : null, /* @__PURE__ */ n(b.Provider, {
134
- value: me,
135
- children: a
136
- })]
137
- })
138
- }) : null;
139
- if (te(i) && !fe(i)) {
140
- let n = i.props, a = i.ref;
141
- return /* @__PURE__ */ r(t, { children: [ee(i, {
142
- ...n,
143
- ...Q,
144
- ref: a ? e(K.setReference, a) : K.setReference,
145
- style: n.style,
146
- onClick: S(n.onClick, Q.onClick),
147
- onMouseEnter: S(n.onMouseEnter, Q.onMouseEnter),
148
- onMouseLeave: S(n.onMouseLeave, Q.onMouseLeave),
149
- onMouseMove: S(n.onMouseMove, Q.onMouseMove)
150
- }), $] });
151
- }
152
- return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("div", {
153
- className: x["bsy-tooltip"],
154
- children: /* @__PURE__ */ n("div", {
155
- ref: K.setReference,
156
- ...Q,
157
- className: x["bsy-tooltip__trigger"],
158
- children: i
159
- })
160
- }), $] });
161
- }, T = ({ content: e, children: r, ...i }) => e ? /* @__PURE__ */ n(w, {
162
- content: e,
163
- ...i,
164
- children: r
165
- }) : /* @__PURE__ */ n(t, { children: r });
166
- T.displayName = "BsyTooltip";
167
- //#endregion
168
- export { b as n, T as t };
@@ -1,12 +0,0 @@
1
- import { isEmpty as e } from "lodash-es";
2
- import t from "tinycolor2";
3
- //#region src/utils/color.ts
4
- function n(e, t) {
5
- if (t < 0 || t > 1) return console.error("Alpha value must be between 0 and 1."), null;
6
- e = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (e, t, n, r) => t + t + n + n + r + r);
7
- let n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
8
- return n ? `rgba(${parseInt(n[1], 16)}, ${parseInt(n[2], 16)}, ${parseInt(n[3], 16)}, ${t})` : (console.error("Invalid HEX color format."), null);
9
- }
10
- var r = (n, r) => e(n) || e(r) ? !1 : t(n).toRgbString() === t(r).toRgbString();
11
- //#endregion
12
- export { n, r as t };