@baishuyun/ui-base 2.3.1 → 2.3.2

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 (74) hide show
  1. package/dist/Card/Card-BE6v4I-A.js +69 -0
  2. package/dist/Card/index.js +3 -4
  3. package/dist/CheckBox/CheckBox--rXaUgMO.js +67 -0
  4. package/dist/CheckBox/CheckBox-Db8X-pw9.js +33 -0
  5. package/dist/CheckBox/index.js +4 -39
  6. package/dist/ColorPicker/ColorPicker-BBP-4-so.js +168 -0
  7. package/dist/ColorPicker/index.js +6 -5
  8. package/dist/DropDown/DropDown-CKXi9mXN.js +162 -0
  9. package/dist/DropDown/index.js +7 -4
  10. package/dist/Editor/Buttons--dMLPuk2.js +595 -0
  11. package/dist/Editor/ToolbarPlugin/Buttons/index.js +14 -8
  12. package/dist/Editor/constants/index.js +53 -20
  13. package/dist/Editor/index.js +518 -576
  14. package/dist/Icon/Icon-DppVOyPK.js +19 -0
  15. package/dist/Icon/index.js +2 -4
  16. package/dist/InputTag/InputTag-B6N5MZA2.js +139 -0
  17. package/dist/InputTag/index.js +3 -4
  18. package/dist/Loading/Loading-Bi5NO-Ky.js +15 -0
  19. package/dist/Loading/index.js +2 -4
  20. package/dist/Modal/Modal-FVJpbEgw.js +81 -0
  21. package/dist/Modal/index.js +3 -4
  22. package/dist/NotFoundContent/NotFoundContent-CTPpcZOt.js +9 -0
  23. package/dist/NotFoundContent/index.js +2 -4
  24. package/dist/Radio/Radio-dyoBNiKF.js +85 -0
  25. package/dist/Radio/index.js +2 -105
  26. package/dist/Segmented/Segmented-Dd8glDXI.js +62 -0
  27. package/dist/Segmented/index.js +2 -4
  28. package/dist/Select/Select-Bd2ECrB0.js +729 -0
  29. package/dist/Select/SelectInputSearch-CIXBNLFi.js +46 -0
  30. package/dist/Select/index.js +11 -6
  31. package/dist/Tabs/Tabs-C79GTyGd.js +410 -0
  32. package/dist/Tabs/index.js +6 -7
  33. package/dist/Tree/index.js +5 -4
  34. package/dist/Tree/utils/index.js +24 -39
  35. package/dist/components/Editor/context/EditorContainerContext.d.ts +8 -0
  36. package/dist/index.js +103 -81
  37. package/dist/style.css +2 -1
  38. package/dist/vendors/Tree-CQR9fvpA.js +231 -0
  39. package/dist/vendors/animations-C5JKFkz4.js +38 -0
  40. package/dist/vendors/clsx-DNOE4Gl8.js +16 -0
  41. package/dist/vendors/color-BPWy9DvT.js +12 -0
  42. package/dist/vendors/fuse.js-BKtvbTjL.js +877 -0
  43. package/dist/vendors/lexical-hZliMgDv.js +6439 -0
  44. package/dist/vendors/lodash-es-Bu9xU1fK.js +334 -0
  45. package/dist/vendors/simplebar-react-CFlS-Nm9.js +370 -0
  46. package/dist/vendors/tinycolor2-DToeAEPD.js +726 -0
  47. package/dist/vendors/useFloatingPortal-BA6P5GxV.js +45 -0
  48. package/dist/vendors/useLocale-BfT0V1j4.js +75 -0
  49. package/package.json +3 -3
  50. package/dist/Card/Card-Y1ISqAp9.js +0 -86
  51. package/dist/CheckBox/CheckBox-C9sXWSA5.js +0 -84
  52. package/dist/ColorPicker/ColorPicker-uPJOs52x.js +0 -215
  53. package/dist/DropDown/DropDown-DGkSeXQT.js +0 -166
  54. package/dist/Editor/index-D7tFsaxU.js +0 -846
  55. package/dist/Icon/Icon-CBlIwtp2.js +0 -24
  56. package/dist/InputTag/InputTag-C-rQUJnF.js +0 -155
  57. package/dist/Loading/Loading-CEB4PLUE.js +0 -9
  58. package/dist/Modal/Modal-z3TvEXwN.js +0 -80
  59. package/dist/NotFoundContent/NotFoundContent-h0-oIXlk.js +0 -6
  60. package/dist/Segmented/Segmented-UgzW78Ey.js +0 -75
  61. package/dist/Select/Select-hwXXDuLU.js +0 -820
  62. package/dist/Select/SelectInputSearch-ChUpUgxa.js +0 -34
  63. package/dist/Tabs/TabSelect-DL8Bhehc.js +0 -445
  64. package/dist/vendors/Tree-CLEy-xqz.js +0 -235
  65. package/dist/vendors/clsx-OuTLNxxd.js +0 -16
  66. package/dist/vendors/color-VzwvCPhF.js +0 -21
  67. package/dist/vendors/fuse.js-D1DCbUBb.js +0 -1022
  68. package/dist/vendors/index-MTmG1Ezy.js +0 -15
  69. package/dist/vendors/lexical-DO7eMeC2.js +0 -5891
  70. package/dist/vendors/lodash-es-DFpaJB4Y.js +0 -305
  71. package/dist/vendors/simplebar-react-D68KzE44.js +0 -408
  72. package/dist/vendors/tinycolor2-Begv3Jc8.js +0 -711
  73. package/dist/vendors/useFloatingPortal-9VUFOAOG.js +0 -45
  74. package/dist/vendors/useLocale-DgqW9M3h.js +0 -47
@@ -0,0 +1,46 @@
1
+ import { t as e } from "../Icon/Icon-DppVOyPK.js";
2
+ import { t } from "../vendors/useLocale-BfT0V1j4.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/components/Select/SelectInputSearch/SelectInputSearch.tsx
5
+ var i = (i) => {
6
+ let { t: a } = t(), { searchPlaceholder: o = a("search"), value: s = "", onChange: c } = i;
7
+ return /* @__PURE__ */ n("div", {
8
+ className: "bsy-select-input-search",
9
+ children: /* @__PURE__ */ r("div", {
10
+ className: "bsy-select-input-search-input",
11
+ children: [
12
+ /* @__PURE__ */ n("div", {
13
+ className: "bsy-select-input-search-input__icon flex items-center justify-center",
14
+ children: /* @__PURE__ */ n(e, {
15
+ name: "search",
16
+ style: {
17
+ color: "#666",
18
+ fontSize: 16
19
+ }
20
+ })
21
+ }),
22
+ /* @__PURE__ */ n("div", {
23
+ className: "bsy-select-input-search-input__container",
24
+ children: /* @__PURE__ */ n("input", {
25
+ type: "text",
26
+ placeholder: o,
27
+ value: s,
28
+ onChange: (e) => c?.(e.target.value),
29
+ role: "searchbox",
30
+ "aria-label": "search options"
31
+ })
32
+ }),
33
+ s && /* @__PURE__ */ n("div", {
34
+ className: "bsy-select-input-search-input__icon flex items-center justify-center cursor-pointer",
35
+ onClick: () => c?.(""),
36
+ role: "button",
37
+ "aria-label": "clear search",
38
+ children: /* @__PURE__ */ n(e, { name: "close" })
39
+ })
40
+ ]
41
+ })
42
+ });
43
+ };
44
+ i.displayName = "BsySelectInputSearch";
45
+ //#endregion
46
+ export { i as t };
@@ -1,6 +1,11 @@
1
- import { M as o, S as s, a as t } from "./Select-hwXXDuLU.js";
2
- export {
3
- o as Mode,
4
- s as Select,
5
- t as SelectType
6
- };
1
+ import "../Icon/Icon-DppVOyPK.js";
2
+ import "../vendors/useLocale-BfT0V1j4.js";
3
+ import { n as e, r as t, t as n } from "./Select-Bd2ECrB0.js";
4
+ import "./SelectInputSearch-CIXBNLFi.js";
5
+ import "../vendors/Tree-CQR9fvpA.js";
6
+ import "../CheckBox/CheckBox--rXaUgMO.js";
7
+ import "../CheckBox/CheckBox-Db8X-pw9.js";
8
+ import "../Radio/Radio-dyoBNiKF.js";
9
+ import "../NotFoundContent/NotFoundContent-CTPpcZOt.js";
10
+ import "../vendors/useFloatingPortal-BA6P5GxV.js";
11
+ export { e as Mode, n as Select, t as SelectType };
@@ -0,0 +1,410 @@
1
+ import { o as e } from "../vendors/lodash-es-Bu9xU1fK.js";
2
+ import { t } from "../Icon/Icon-DppVOyPK.js";
3
+ import { t as n } from "../vendors/clsx-DNOE4Gl8.js";
4
+ import { n as r } from "../vendors/color-BPWy9DvT.js";
5
+ import { n as i } from "../vendors/animations-C5JKFkz4.js";
6
+ import { t as a } from "../vendors/useFloatingPortal-BA6P5GxV.js";
7
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ import { createContext as l, useCallback as u, useContext as d, useLayoutEffect as f, useRef as p, useState as m } from "react";
9
+ import { useControllableValue as h, useEventListener as g, useMutationObserver as _, useToggle as v } from "ahooks";
10
+ import { AnimatePresence as y, motion as b } from "motion/react";
11
+ import { FloatingPortal as x } from "@floating-ui/react";
12
+ //#region src/components/Tabs/constants.ts
13
+ var S = {
14
+ LINE: "line",
15
+ CARD: "card",
16
+ FILLED_CARD: "filled-card",
17
+ BADGE_CARD: "badge-card"
18
+ }, C = l({
19
+ color: "#0269ff",
20
+ type: S.LINE
21
+ }), w = "_active_1oc43_18", T = "_disabled_1oc43_26", E = "_line_1oc43_44", D = "_card_1oc43_53", O = {
22
+ "bsy-tab": "_bsy-tab_1oc43_1",
23
+ "badge-card": "_badge-card_1oc43_9",
24
+ active: w,
25
+ disabled: T,
26
+ line: E,
27
+ card: D,
28
+ "filled-card": "_filled-card_1oc43_78"
29
+ }, k = (e, t = 24) => e.length <= t ? e : e.slice(0, t) + "...", A = (e) => typeof e == "string" ? k(e) : e, j = ({ label: t, active: i = !1, onClick: a, tabKey: o }) => {
30
+ let { type: c = S.LINE, disabled: l, color: u } = d(C), f = e(t) ? t : "", p = () => {
31
+ l || a?.(o);
32
+ }, m = {
33
+ "data-tab-item": !0,
34
+ "data-tab-key": o,
35
+ role: "tab",
36
+ "aria-selected": i,
37
+ "aria-controls": `panel-${o}`,
38
+ onClick: p
39
+ };
40
+ return c === S.LINE ? /* @__PURE__ */ s("div", {
41
+ ...m,
42
+ className: n(O["bsy-tab"], O.line, {
43
+ [O.disabled]: l,
44
+ [O.active]: i
45
+ }),
46
+ title: f,
47
+ children: A(t)
48
+ }) : c === S.CARD ? /* @__PURE__ */ s("div", {
49
+ ...m,
50
+ className: n(O["bsy-tab"], O.card, {
51
+ [O.active]: i,
52
+ [O.disabled]: l
53
+ }),
54
+ title: f,
55
+ style: { "--theme-bg-color": r(u, .1) },
56
+ children: /* @__PURE__ */ s("span", { children: A(t) })
57
+ }) : c === S.FILLED_CARD ? /* @__PURE__ */ s("div", {
58
+ ...m,
59
+ className: n(O["bsy-tab"], O["filled-card"], {
60
+ [O.active]: i,
61
+ [O.disabled]: l
62
+ }),
63
+ title: f,
64
+ children: A(t)
65
+ }) : c === S.BADGE_CARD ? /* @__PURE__ */ s("div", {
66
+ ...m,
67
+ className: n(O["bsy-tab"], O["badge-card"], {
68
+ [O.active]: i,
69
+ [O.disabled]: l
70
+ }),
71
+ title: f,
72
+ children: /* @__PURE__ */ s("span", { children: A(t) })
73
+ }) : null;
74
+ };
75
+ j.displayName = "BsyTab";
76
+ //#endregion
77
+ //#region src/components/Tabs/TabList/useTabScroll.ts
78
+ var M = ({ disabled: e, children: t }) => {
79
+ let n = p(null), r = p(null), [i, a] = m(!1), [o, s] = m(!1), [c, l] = m(!1), [d, h] = m(0), _ = u(() => {
80
+ let e = n.current, t = r.current;
81
+ if (!e || !t) return;
82
+ let i = e.clientWidth, o = t.scrollWidth, c = o > i;
83
+ a(c), c ? (s(d < 0), l(d > -(o - i))) : (s(!1), l(!1), h(0));
84
+ }, [d]);
85
+ return g("resize", () => _()), f(() => {
86
+ _();
87
+ }, [
88
+ d,
89
+ t,
90
+ _
91
+ ]), {
92
+ listRef: n,
93
+ wrapperRef: r,
94
+ showControls: i,
95
+ canScrollLeft: o,
96
+ canScrollRight: c,
97
+ translateX: d,
98
+ scrollLeft: () => {
99
+ if (!o || e) return;
100
+ let t = n.current;
101
+ if (!t) return;
102
+ let r = t.clientWidth * .6;
103
+ h(Math.min(0, d + r));
104
+ },
105
+ scrollRight: () => {
106
+ if (!c || e) return;
107
+ let t = n.current, i = r.current;
108
+ if (!t || !i) return;
109
+ let a = t.clientWidth * .6, o = t.clientWidth, s = -(i.scrollWidth - o);
110
+ h(Math.max(s, d - a));
111
+ }
112
+ };
113
+ }, N = ({ activeKey: e, type: t, showIndicator: n, wrapperRef: r, items: i }) => {
114
+ let [a, o] = m({
115
+ width: 0,
116
+ left: 0,
117
+ ready: !1
118
+ }), s = u((e) => {
119
+ if (!n || !r.current) return;
120
+ let t = r.current.getBoundingClientRect(), i = e.getBoundingClientRect(), a = i.left - t.left, s = i.width;
121
+ o({
122
+ width: s,
123
+ left: a,
124
+ ready: !0
125
+ });
126
+ }, [n, r]);
127
+ return f(() => {
128
+ if (!e || !r.current) return;
129
+ let t = r.current.querySelector(`[data-tab-key="${e}"]`);
130
+ t && n && s(t);
131
+ }, [
132
+ e,
133
+ n,
134
+ r,
135
+ s,
136
+ t,
137
+ i
138
+ ]), _(() => {
139
+ if (!n) return;
140
+ let e = r.current?.querySelector("[aria-selected=\"true\"]");
141
+ e && s(e);
142
+ }, r, {
143
+ subtree: !0,
144
+ characterData: !0
145
+ }), {
146
+ indicatorStyle: a,
147
+ handleTabClick: (e) => {
148
+ s(e);
149
+ }
150
+ };
151
+ }, P = ({ children: e, activeKey: t, className: r, style: i, items: a }) => {
152
+ let { type: o = S.LINE, color: l, disabled: u } = d(C), f = [S.LINE, S.CARD].includes(o), { listRef: p, wrapperRef: m, showControls: h, canScrollLeft: g, canScrollRight: _, translateX: v, scrollLeft: y, scrollRight: b } = M({
153
+ disabled: u,
154
+ children: e
155
+ }), { indicatorStyle: x, handleTabClick: w } = N({
156
+ activeKey: t,
157
+ type: o,
158
+ showIndicator: f,
159
+ wrapperRef: m,
160
+ items: a
161
+ }), T = x.ready, E = (e) => {
162
+ if (u) return;
163
+ let t = e.target.closest("[data-tab-item]");
164
+ t && w(t);
165
+ };
166
+ return /* @__PURE__ */ c("div", {
167
+ className: n("relative max-h-[36px]", r),
168
+ style: i,
169
+ children: [
170
+ h && /* @__PURE__ */ s("button", {
171
+ className: n("absolute left-0 top-0 bottom-0 z-10 w-8 flex items-center justify-center", {
172
+ "text-gray-400 cursor-not-allowed": !g || u,
173
+ "text-gray-600": g && !u
174
+ }),
175
+ onClick: y,
176
+ disabled: !g || u,
177
+ "aria-label": "向左滚动",
178
+ children: /* @__PURE__ */ s("svg", {
179
+ className: "w-4 h-4",
180
+ fill: "none",
181
+ stroke: "currentColor",
182
+ viewBox: "0 0 24 24",
183
+ children: /* @__PURE__ */ s("path", {
184
+ strokeLinecap: "round",
185
+ strokeLinejoin: "round",
186
+ strokeWidth: 2,
187
+ d: "M15 19l-7-7 7-7"
188
+ })
189
+ })
190
+ }),
191
+ /* @__PURE__ */ s("div", {
192
+ className: n({
193
+ "pl-8": h,
194
+ "pr-8": h
195
+ }),
196
+ children: /* @__PURE__ */ s("div", {
197
+ ref: p,
198
+ className: n("overflow-hidden", {
199
+ "border-b border-[#e0e0e0]": o === S.LINE,
200
+ "border-b-2": o === S.FILLED_CARD || o === S.BADGE_CARD,
201
+ "pb-[2px]": o === S.BADGE_CARD
202
+ }),
203
+ style: { borderColor: o === S.LINE ? void 0 : l },
204
+ children: /* @__PURE__ */ c("div", {
205
+ ref: m,
206
+ role: "tablist",
207
+ className: n("relative text-sm flex flex-nowrap", {
208
+ "gap-x-[26px]": o === S.LINE,
209
+ "gap-x-[10px]": o === S.FILLED_CARD || o === S.BADGE_CARD,
210
+ "bg-[#f0f0f0]": o === S.CARD
211
+ }),
212
+ onClick: E,
213
+ style: {
214
+ "--theme-color": l,
215
+ transform: `translateX(${v}px)`,
216
+ transition: "transform 0.3s ease-in-out"
217
+ },
218
+ children: [e, f && x.ready && /* @__PURE__ */ s("div", {
219
+ className: n("absolute h-0.5", {
220
+ "bottom-0": o === S.LINE,
221
+ "top-0": o === S.CARD,
222
+ "transition-all duration-300 ease-in-out": T
223
+ }),
224
+ style: {
225
+ backgroundColor: l,
226
+ width: `${x.width}px`,
227
+ left: `${x.left}px`
228
+ }
229
+ })]
230
+ })
231
+ })
232
+ }),
233
+ h && /* @__PURE__ */ s("button", {
234
+ className: n("absolute right-0 top-0 bottom-0 z-10 w-8 flex items-center justify-center", {
235
+ "text-gray-400 cursor-not-allowed": !_ || u,
236
+ "text-gray-600": _ && !u
237
+ }),
238
+ onClick: b,
239
+ disabled: !_ || u,
240
+ "aria-label": "向右滚动",
241
+ children: /* @__PURE__ */ s("svg", {
242
+ className: "w-4 h-4",
243
+ fill: "none",
244
+ stroke: "currentColor",
245
+ viewBox: "0 0 24 24",
246
+ children: /* @__PURE__ */ s("path", {
247
+ strokeLinecap: "round",
248
+ strokeLinejoin: "round",
249
+ strokeWidth: 2,
250
+ d: "M9 5l7 7-7 7"
251
+ })
252
+ })
253
+ })
254
+ ]
255
+ });
256
+ };
257
+ P.displayName = "BsyTabList";
258
+ //#endregion
259
+ //#region src/components/Tabs/TabPanel/TabPanel.tsx
260
+ var F = ({ items: e, activeKey: t, className: n }) => {
261
+ let r = e.find((e) => e.key === t);
262
+ return !r || !r.children ? null : /* @__PURE__ */ s("div", {
263
+ className: n,
264
+ role: "tabpanel",
265
+ "aria-labelledby": `tab-${t}`,
266
+ children: r.children
267
+ });
268
+ };
269
+ F.displayName = "BsyTabPanel";
270
+ //#endregion
271
+ //#region src/components/Tabs/Tabs.tsx
272
+ var I = (e) => {
273
+ let [t, n] = h(e, {
274
+ defaultValuePropName: "defaultActiveKey",
275
+ valuePropName: "activeKey",
276
+ trigger: "onChange"
277
+ }), r = e.items?.some((e) => e.children), i = e.color || "#0265ff";
278
+ return /* @__PURE__ */ s(C.Provider, {
279
+ value: {
280
+ color: i,
281
+ type: e.type,
282
+ disabled: e.disabled
283
+ },
284
+ children: /* @__PURE__ */ c("div", {
285
+ className: "bsy-tabs",
286
+ children: [/* @__PURE__ */ s(P, {
287
+ items: e.items,
288
+ activeKey: t,
289
+ children: e.items?.map((e) => /* @__PURE__ */ s(j, {
290
+ tabKey: e.key,
291
+ label: e.label,
292
+ active: t === e.key,
293
+ onClick: (e) => n(e)
294
+ }, e.key))
295
+ }), r && e.items && /* @__PURE__ */ s(F, {
296
+ items: e.items,
297
+ activeKey: t,
298
+ className: "bsy-tabs__content"
299
+ })]
300
+ })
301
+ });
302
+ };
303
+ I.displayName = "BsyTabs";
304
+ //#endregion
305
+ //#region src/components/Tabs/TabSelect/tabSelect.module.scss
306
+ var L = "_active_5a1wn_11", R = "_icon_5a1wn_45", z = {
307
+ "bsy-tabs-select__trigger": "_bsy-tabs-select__trigger_5a1wn_1",
308
+ active: L,
309
+ "bsy-tabs-select__trigger-icon": "_bsy-tabs-select__trigger-icon_5a1wn_14",
310
+ "bsy-tabs-select__trigger-input": "_bsy-tabs-select__trigger-input_5a1wn_17",
311
+ "bsy-tabs-select__panel": "_bsy-tabs-select__panel_5a1wn_21",
312
+ "bsy-tabs-select__panel-item": "_bsy-tabs-select__panel-item_5a1wn_32",
313
+ icon: R
314
+ }, B = (e) => {
315
+ let { color: r = "#0269ff" } = e, [l, { toggle: u, setLeft: d }] = v(!1), { refs: f, floatingStyles: p, getFloatingProps: m, getReferenceProps: g, referenceStyle: _ } = a({
316
+ isOpen: l,
317
+ close: d,
318
+ offset: {
319
+ x: 0,
320
+ y: 4
321
+ },
322
+ zIndex: 1e3
323
+ }), [C, w] = h(e, {
324
+ trigger: "onChange",
325
+ defaultValuePropName: "defaultValue",
326
+ valuePropName: "value",
327
+ defaultValue: S.LINE
328
+ }), T = Object.values(S).map((e) => ({
329
+ label: e,
330
+ value: e
331
+ }));
332
+ return /* @__PURE__ */ c("div", {
333
+ className: z["bsy-tabs-select"],
334
+ children: [/* @__PURE__ */ c("div", {
335
+ className: n(z["bsy-tabs-select__trigger"], { [z.active]: l }),
336
+ ref: f.setReference,
337
+ ...g(),
338
+ style: _,
339
+ onClick: () => u(),
340
+ children: [/* @__PURE__ */ s("div", {
341
+ className: n(z["bsy-tabs-select__trigger-input"], { [z.active]: C }),
342
+ children: C && /* @__PURE__ */ s(I, {
343
+ activeKey: "1",
344
+ type: C,
345
+ color: r,
346
+ disabled: !0,
347
+ items: [
348
+ {
349
+ label: "标签页1",
350
+ key: "1"
351
+ },
352
+ {
353
+ label: "标签页2",
354
+ key: "2"
355
+ },
356
+ {
357
+ label: "标签页3",
358
+ key: "3"
359
+ }
360
+ ]
361
+ }, C)
362
+ }), /* @__PURE__ */ s("div", {
363
+ className: z["bsy-tabs-select__trigger-icon"],
364
+ children: /* @__PURE__ */ s(t, {
365
+ name: "arrow-down",
366
+ className: n(z.icon, { active: l })
367
+ })
368
+ })]
369
+ }), /* @__PURE__ */ s(x, { children: /* @__PURE__ */ s(y, { children: l && /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s("div", {
370
+ ref: f.setFloating,
371
+ style: p,
372
+ ...m(),
373
+ children: /* @__PURE__ */ s(b.div, {
374
+ ...i,
375
+ children: /* @__PURE__ */ s("div", {
376
+ className: z["bsy-tabs-select__panel"],
377
+ children: T.map((e) => /* @__PURE__ */ s("div", {
378
+ className: n(z["bsy-tabs-select__panel-item"], { [z.active]: C === e.value }),
379
+ onClick: () => {
380
+ w(e.value), d();
381
+ },
382
+ children: /* @__PURE__ */ s(I, {
383
+ activeKey: "1",
384
+ type: e.value,
385
+ disabled: !0,
386
+ color: r,
387
+ items: [
388
+ {
389
+ label: "标签页1",
390
+ key: "1"
391
+ },
392
+ {
393
+ label: "标签页2",
394
+ key: "2"
395
+ },
396
+ {
397
+ label: "标签页3",
398
+ key: "3"
399
+ }
400
+ ]
401
+ }, e.value)
402
+ }, e.value))
403
+ })
404
+ })
405
+ }) }) }) })]
406
+ });
407
+ };
408
+ B.displayName = "BsyTabSelect";
409
+ //#endregion
410
+ export { S as i, I as n, F as r, B as t };
@@ -1,7 +1,6 @@
1
- import { c as T, b as s, a as b, T as l } from "./TabSelect-DL8Bhehc.js";
2
- export {
3
- T as TABS_TYPE,
4
- s as TabPanel,
5
- b as TabSelect,
6
- l as default
7
- };
1
+ import "../Icon/Icon-DppVOyPK.js";
2
+ import "../vendors/tinycolor2-DToeAEPD.js";
3
+ import "../vendors/color-BPWy9DvT.js";
4
+ import "../vendors/useFloatingPortal-BA6P5GxV.js";
5
+ import { i as e, n as t, r as n, t as r } from "./Tabs-C79GTyGd.js";
6
+ export { e as TABS_TYPE, n as TabPanel, r as TabSelect, t as default };
@@ -1,4 +1,5 @@
1
- import { T as o } from "../vendors/Tree-CLEy-xqz.js";
2
- export {
3
- o as Tree
4
- };
1
+ import "../Icon/Icon-DppVOyPK.js";
2
+ import { t as e } from "../vendors/Tree-CQR9fvpA.js";
3
+ import "../CheckBox/CheckBox--rXaUgMO.js";
4
+ import "../Radio/Radio-dyoBNiKF.js";
5
+ export { e as Tree };
@@ -1,40 +1,25 @@
1
- import { i as P } from "../../vendors/lodash-es-DFpaJB4Y.js";
2
- const g = (s, c, t, u = []) => {
3
- var r;
4
- for (const n of s) {
5
- const o = [...u, n[t.value]];
6
- if (n[t.value] === c)
7
- return o;
8
- if ((r = n[t.children]) != null && r.length) {
9
- const h = g(
10
- n[t.children],
11
- c,
12
- t,
13
- o
14
- );
15
- if (h)
16
- return h;
17
- }
18
- }
19
- return null;
20
- }, l = (s, c, t, u = []) => {
21
- var n;
22
- const r = [];
23
- for (const o of s) {
24
- const h = [...u, o[t.value]], e = o[t.title];
25
- if (P(e) && e.toLowerCase().includes(c.toLowerCase()) && r.push(h), (n = o[t.children]) != null && n.length) {
26
- const i = l(
27
- o[t.children],
28
- c,
29
- t,
30
- h
31
- );
32
- r.push(...i);
33
- }
34
- }
35
- return r;
36
- };
37
- export {
38
- l as getMatchingNodesPaths,
39
- g as getNodePath
1
+ import { o as e } from "../../vendors/lodash-es-Bu9xU1fK.js";
2
+ //#region src/components/Tree/utils/index.ts
3
+ var t = (e, n, r, i = []) => {
4
+ for (let a of e) {
5
+ let e = [...i, a[r.value]];
6
+ if (a[r.value] === n) return e;
7
+ if (a[r.children]?.length) {
8
+ let i = t(a[r.children], n, r, e);
9
+ if (i) return i;
10
+ }
11
+ }
12
+ return null;
13
+ }, n = (t, r, i, a = []) => {
14
+ let o = [];
15
+ for (let s of t) {
16
+ let t = [...a, s[i.value]], c = s[i.title];
17
+ if (e(c) && c.toLowerCase().includes(r.toLowerCase()) && o.push(t), s[i.children]?.length) {
18
+ let e = n(s[i.children], r, i, t);
19
+ o.push(...e);
20
+ }
21
+ }
22
+ return o;
40
23
  };
24
+ //#endregion
25
+ export { n as getMatchingNodesPaths, t as getNodePath };
@@ -0,0 +1,8 @@
1
+ import { RefObject } from 'react';
2
+ interface EditorContainerContextType {
3
+ containerRef: RefObject<HTMLDivElement | null>;
4
+ getPopupContainer: () => HTMLElement;
5
+ }
6
+ declare const EditorContainerContext: import('react').Context<EditorContainerContextType | null>;
7
+ export declare const useEditorContainer: () => EditorContainerContextType;
8
+ export default EditorContainerContext;