@baishuyun/ui-base 2.3.3 → 2.3.4
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/Card/{Card-F2t4Rv_v.js → Card-CaKTq_1y.js} +17 -17
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/CheckBox-Cz6KW9Lw.js +33 -0
- package/dist/CheckBox/{CheckBox-DFoMXJZz.js → CheckBox-l__wOnmH.js} +25 -25
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/ColorPicker-C1kG_eI-.js +168 -0
- package/dist/ColorPicker/index.js +4 -5
- package/dist/DropDown/DropDown-BAPBTglm.js +162 -0
- package/dist/DropDown/index.js +6 -6
- package/dist/Editor/{Buttons-ClWtl3G-.js → Buttons-CsKKYGbV.js} +207 -204
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +12 -13
- package/dist/Editor/index.js +207 -196
- package/dist/Icon/Icon-CTZCSuVg.js +19 -0
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/{InputTag-DbiyuWo9.js → InputTag-V4UnUnGJ.js} +33 -33
- package/dist/InputTag/index.js +2 -2
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/{Modal-BO1s8pJe.js → Modal-DQ5bptu_.js} +1 -1
- package/dist/Modal/index.js +2 -2
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/{Radio-dyoBNiKF.js → Radio-CZOrtNyn.js} +25 -25
- package/dist/Radio/index.js +1 -1
- package/dist/Segmented/{Segmented-Dd8glDXI.js → Segmented-DEGgLO-b.js} +15 -15
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/Select-BoNqxIRo.js +729 -0
- package/dist/Select/{SelectInputSearch-gp6gcY3x.js → SelectInputSearch-DMY6Y9B6.js} +2 -2
- package/dist/Select/index.js +10 -10
- package/dist/Tabs/{Tabs-Dsxn_7gF.js → Tabs-BqT-_eVo.js} +138 -138
- package/dist/Tabs/index.js +4 -5
- package/dist/Tree/index.js +4 -4
- package/dist/Tree/utils/index.js +1 -1
- package/dist/index.js +19 -20
- package/dist/vendors/Tree-nIRgDY2s.js +231 -0
- package/dist/vendors/{color-BPWy9DvT.js → color-CyuNdAfc.js} +2 -2
- package/package.json +3 -1
- package/dist/CheckBox/CheckBox-q2vu7qf7.js +0 -33
- package/dist/ColorPicker/ColorPicker-Bh4KTHxh.js +0 -168
- package/dist/DropDown/DropDown-BEzloRRM.js +0 -162
- package/dist/Icon/Icon-DXmPqVzg.js +0 -19
- package/dist/Select/Select-DoQO-Xi5.js +0 -729
- package/dist/vendors/Tree-DgwG7Unx.js +0 -231
- package/dist/vendors/clsx-DNOE4Gl8.js +0 -16
- package/dist/vendors/fuse.js-BKtvbTjL.js +0 -877
- package/dist/vendors/lexical-hZliMgDv.js +0 -6439
- package/dist/vendors/lodash-es-Bu9xU1fK.js +0 -334
- package/dist/vendors/simplebar-react-CFlS-Nm9.js +0 -370
- package/dist/vendors/tinycolor2-DToeAEPD.js +0 -726
- /package/dist/Loading/{Loading-Bi5NO-Ky.js → Loading-Dy5A--HK.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-CTPpcZOt.js → NotFoundContent-1-41e1rN.js} +0 -0
- /package/dist/vendors/{animations-C5JKFkz4.js → animations-DvjIfVz9.js} +0 -0
- /package/dist/vendors/{useFloatingPortal-BA6P5GxV.js → useFloatingPortal-W4pliYWU.js} +0 -0
- /package/dist/vendors/{useLocale-BfT0V1j4.js → useLocale-BXnqO-Ju.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
2
|
-
import { t } from "../vendors/useLocale-
|
|
1
|
+
import { t as e } from "../Icon/Icon-CTZCSuVg.js";
|
|
2
|
+
import { t } from "../vendors/useLocale-BXnqO-Ju.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Select/SelectInputSearch/SelectInputSearch.tsx
|
|
5
5
|
var i = (i) => {
|
package/dist/Select/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import "../vendors/useLocale-
|
|
3
|
-
import { n as e, r as t, t as n } from "./Select-
|
|
4
|
-
import "./SelectInputSearch-
|
|
5
|
-
import "../vendors/Tree-
|
|
6
|
-
import "../CheckBox/CheckBox-
|
|
7
|
-
import "../CheckBox/CheckBox-
|
|
8
|
-
import "../Radio/Radio-
|
|
9
|
-
import "../NotFoundContent/NotFoundContent-
|
|
10
|
-
import "../vendors/useFloatingPortal-
|
|
1
|
+
import "../Icon/Icon-CTZCSuVg.js";
|
|
2
|
+
import "../vendors/useLocale-BXnqO-Ju.js";
|
|
3
|
+
import { n as e, r as t, t as n } from "./Select-BoNqxIRo.js";
|
|
4
|
+
import "./SelectInputSearch-DMY6Y9B6.js";
|
|
5
|
+
import "../vendors/Tree-nIRgDY2s.js";
|
|
6
|
+
import "../CheckBox/CheckBox-l__wOnmH.js";
|
|
7
|
+
import "../CheckBox/CheckBox-Cz6KW9Lw.js";
|
|
8
|
+
import "../Radio/Radio-CZOrtNyn.js";
|
|
9
|
+
import "../NotFoundContent/NotFoundContent-1-41e1rN.js";
|
|
10
|
+
import "../vendors/useFloatingPortal-W4pliYWU.js";
|
|
11
11
|
export { e as Mode, n as Select, t as SelectType };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
1
|
+
import { t as e } from "../Icon/Icon-CTZCSuVg.js";
|
|
2
|
+
import { n as t } from "../vendors/color-CyuNdAfc.js";
|
|
3
|
+
import { n } from "../vendors/animations-DvjIfVz9.js";
|
|
4
|
+
import { t as r } from "../vendors/useFloatingPortal-W4pliYWU.js";
|
|
5
|
+
import { isString as i } from "lodash-es";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { createContext as c, useCallback as l, useContext as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
|
|
8
|
+
import m from "clsx";
|
|
9
9
|
import { useControllableValue as h, useEventListener as g, useMutationObserver as _, useToggle as v } from "ahooks";
|
|
10
10
|
import { AnimatePresence as y, motion as b } from "motion/react";
|
|
11
11
|
import { FloatingPortal as x } from "@floating-ui/react";
|
|
@@ -15,7 +15,7 @@ var S = {
|
|
|
15
15
|
CARD: "card",
|
|
16
16
|
FILLED_CARD: "filled-card",
|
|
17
17
|
BADGE_CARD: "badge-card"
|
|
18
|
-
}, C =
|
|
18
|
+
}, C = c({
|
|
19
19
|
color: "#0269ff",
|
|
20
20
|
type: S.LINE
|
|
21
21
|
}), w = "_active_1oc43_18", T = "_disabled_1oc43_26", E = "_line_1oc43_44", D = "_card_1oc43_53", O = {
|
|
@@ -26,66 +26,66 @@ var S = {
|
|
|
26
26
|
line: E,
|
|
27
27
|
card: D,
|
|
28
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:
|
|
30
|
-
let { type:
|
|
31
|
-
|
|
32
|
-
},
|
|
29
|
+
}, k = (e, t = 24) => e.length <= t ? e : e.slice(0, t) + "...", A = (e) => typeof e == "string" ? k(e) : e, j = ({ label: e, active: n = !1, onClick: r, tabKey: a }) => {
|
|
30
|
+
let { type: s = S.LINE, disabled: c, color: l } = u(C), d = i(e) ? e : "", f = () => {
|
|
31
|
+
c || r?.(a);
|
|
32
|
+
}, p = {
|
|
33
33
|
"data-tab-item": !0,
|
|
34
|
-
"data-tab-key":
|
|
34
|
+
"data-tab-key": a,
|
|
35
35
|
role: "tab",
|
|
36
|
-
"aria-selected":
|
|
37
|
-
"aria-controls": `panel-${
|
|
38
|
-
onClick:
|
|
36
|
+
"aria-selected": n,
|
|
37
|
+
"aria-controls": `panel-${a}`,
|
|
38
|
+
onClick: f
|
|
39
39
|
};
|
|
40
|
-
return
|
|
41
|
-
...
|
|
42
|
-
className:
|
|
43
|
-
[O.disabled]:
|
|
44
|
-
[O.active]:
|
|
40
|
+
return s === S.LINE ? /* @__PURE__ */ o("div", {
|
|
41
|
+
...p,
|
|
42
|
+
className: m(O["bsy-tab"], O.line, {
|
|
43
|
+
[O.disabled]: c,
|
|
44
|
+
[O.active]: n
|
|
45
45
|
}),
|
|
46
|
-
title:
|
|
47
|
-
children: A(
|
|
48
|
-
}) :
|
|
49
|
-
...
|
|
50
|
-
className:
|
|
51
|
-
[O.active]:
|
|
52
|
-
[O.disabled]:
|
|
46
|
+
title: d,
|
|
47
|
+
children: A(e)
|
|
48
|
+
}) : s === S.CARD ? /* @__PURE__ */ o("div", {
|
|
49
|
+
...p,
|
|
50
|
+
className: m(O["bsy-tab"], O.card, {
|
|
51
|
+
[O.active]: n,
|
|
52
|
+
[O.disabled]: c
|
|
53
53
|
}),
|
|
54
|
-
title:
|
|
55
|
-
style: { "--theme-bg-color":
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
}) :
|
|
58
|
-
...
|
|
59
|
-
className:
|
|
60
|
-
[O.active]:
|
|
61
|
-
[O.disabled]:
|
|
54
|
+
title: d,
|
|
55
|
+
style: { "--theme-bg-color": t(l, .1) },
|
|
56
|
+
children: /* @__PURE__ */ o("span", { children: A(e) })
|
|
57
|
+
}) : s === S.FILLED_CARD ? /* @__PURE__ */ o("div", {
|
|
58
|
+
...p,
|
|
59
|
+
className: m(O["bsy-tab"], O["filled-card"], {
|
|
60
|
+
[O.active]: n,
|
|
61
|
+
[O.disabled]: c
|
|
62
62
|
}),
|
|
63
|
-
title:
|
|
64
|
-
children: A(
|
|
65
|
-
}) :
|
|
66
|
-
...
|
|
67
|
-
className:
|
|
68
|
-
[O.active]:
|
|
69
|
-
[O.disabled]:
|
|
63
|
+
title: d,
|
|
64
|
+
children: A(e)
|
|
65
|
+
}) : s === S.BADGE_CARD ? /* @__PURE__ */ o("div", {
|
|
66
|
+
...p,
|
|
67
|
+
className: m(O["bsy-tab"], O["badge-card"], {
|
|
68
|
+
[O.active]: n,
|
|
69
|
+
[O.disabled]: c
|
|
70
70
|
}),
|
|
71
|
-
title:
|
|
72
|
-
children: /* @__PURE__ */
|
|
71
|
+
title: d,
|
|
72
|
+
children: /* @__PURE__ */ o("span", { children: A(e) })
|
|
73
73
|
}) : null;
|
|
74
74
|
};
|
|
75
75
|
j.displayName = "BsyTab";
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region src/components/Tabs/TabList/useTabScroll.ts
|
|
78
78
|
var M = ({ disabled: e, children: t }) => {
|
|
79
|
-
let n =
|
|
79
|
+
let n = f(null), r = f(null), [i, a] = p(!1), [o, s] = p(!1), [c, u] = p(!1), [m, h] = p(0), _ = l(() => {
|
|
80
80
|
let e = n.current, t = r.current;
|
|
81
81
|
if (!e || !t) return;
|
|
82
82
|
let i = e.clientWidth, o = t.scrollWidth, c = o > i;
|
|
83
|
-
a(c), c ? (s(
|
|
84
|
-
}, [
|
|
85
|
-
return g("resize", () => _()),
|
|
83
|
+
a(c), c ? (s(m < 0), u(m > -(o - i))) : (s(!1), u(!1), h(0));
|
|
84
|
+
}, [m]);
|
|
85
|
+
return g("resize", () => _()), d(() => {
|
|
86
86
|
_();
|
|
87
87
|
}, [
|
|
88
|
-
|
|
88
|
+
m,
|
|
89
89
|
t,
|
|
90
90
|
_
|
|
91
91
|
]), {
|
|
@@ -94,28 +94,28 @@ var M = ({ disabled: e, children: t }) => {
|
|
|
94
94
|
showControls: i,
|
|
95
95
|
canScrollLeft: o,
|
|
96
96
|
canScrollRight: c,
|
|
97
|
-
translateX:
|
|
97
|
+
translateX: m,
|
|
98
98
|
scrollLeft: () => {
|
|
99
99
|
if (!o || e) return;
|
|
100
100
|
let t = n.current;
|
|
101
101
|
if (!t) return;
|
|
102
102
|
let r = t.clientWidth * .6;
|
|
103
|
-
h(Math.min(0,
|
|
103
|
+
h(Math.min(0, m + r));
|
|
104
104
|
},
|
|
105
105
|
scrollRight: () => {
|
|
106
106
|
if (!c || e) return;
|
|
107
107
|
let t = n.current, i = r.current;
|
|
108
108
|
if (!t || !i) return;
|
|
109
109
|
let a = t.clientWidth * .6, o = t.clientWidth, s = -(i.scrollWidth - o);
|
|
110
|
-
h(Math.max(s,
|
|
110
|
+
h(Math.max(s, m - a));
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
}, N = ({ activeKey: e, type: t, showIndicator: n, wrapperRef: r, items: i }) => {
|
|
114
|
-
let [a, o] =
|
|
114
|
+
let [a, o] = p({
|
|
115
115
|
width: 0,
|
|
116
116
|
left: 0,
|
|
117
117
|
ready: !1
|
|
118
|
-
}), s =
|
|
118
|
+
}), s = l((e) => {
|
|
119
119
|
if (!n || !r.current) return;
|
|
120
120
|
let t = r.current.getBoundingClientRect(), i = e.getBoundingClientRect(), a = i.left - t.left, s = i.width;
|
|
121
121
|
o({
|
|
@@ -124,7 +124,7 @@ var M = ({ disabled: e, children: t }) => {
|
|
|
124
124
|
ready: !0
|
|
125
125
|
});
|
|
126
126
|
}, [n, r]);
|
|
127
|
-
return
|
|
127
|
+
return d(() => {
|
|
128
128
|
if (!e || !r.current) return;
|
|
129
129
|
let t = r.current.querySelector(`[data-tab-key="${e}"]`);
|
|
130
130
|
t && n && s(t);
|
|
@@ -148,39 +148,39 @@ var M = ({ disabled: e, children: t }) => {
|
|
|
148
148
|
s(e);
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
-
}, P = ({ children: e, activeKey: t, className:
|
|
152
|
-
let { type:
|
|
153
|
-
disabled:
|
|
151
|
+
}, P = ({ children: e, activeKey: t, className: n, style: r, items: i }) => {
|
|
152
|
+
let { type: a = S.LINE, color: c, disabled: l } = u(C), d = [S.LINE, S.CARD].includes(a), { listRef: f, wrapperRef: p, showControls: h, canScrollLeft: g, canScrollRight: _, translateX: v, scrollLeft: y, scrollRight: b } = M({
|
|
153
|
+
disabled: l,
|
|
154
154
|
children: e
|
|
155
155
|
}), { indicatorStyle: x, handleTabClick: w } = N({
|
|
156
156
|
activeKey: t,
|
|
157
|
-
type:
|
|
158
|
-
showIndicator:
|
|
159
|
-
wrapperRef:
|
|
160
|
-
items:
|
|
157
|
+
type: a,
|
|
158
|
+
showIndicator: d,
|
|
159
|
+
wrapperRef: p,
|
|
160
|
+
items: i
|
|
161
161
|
}), T = x.ready, E = (e) => {
|
|
162
|
-
if (
|
|
162
|
+
if (l) return;
|
|
163
163
|
let t = e.target.closest("[data-tab-item]");
|
|
164
164
|
t && w(t);
|
|
165
165
|
};
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
className:
|
|
168
|
-
style:
|
|
166
|
+
return /* @__PURE__ */ s("div", {
|
|
167
|
+
className: m("relative max-h-[36px]", n),
|
|
168
|
+
style: r,
|
|
169
169
|
children: [
|
|
170
|
-
h && /* @__PURE__ */
|
|
171
|
-
className:
|
|
172
|
-
"text-gray-400 cursor-not-allowed": !g ||
|
|
173
|
-
"text-gray-600": g && !
|
|
170
|
+
h && /* @__PURE__ */ o("button", {
|
|
171
|
+
className: m("absolute left-0 top-0 bottom-0 z-10 w-8 flex items-center justify-center", {
|
|
172
|
+
"text-gray-400 cursor-not-allowed": !g || l,
|
|
173
|
+
"text-gray-600": g && !l
|
|
174
174
|
}),
|
|
175
175
|
onClick: y,
|
|
176
|
-
disabled: !g ||
|
|
176
|
+
disabled: !g || l,
|
|
177
177
|
"aria-label": "向左滚动",
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ o("svg", {
|
|
179
179
|
className: "w-4 h-4",
|
|
180
180
|
fill: "none",
|
|
181
181
|
stroke: "currentColor",
|
|
182
182
|
viewBox: "0 0 24 24",
|
|
183
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ o("path", {
|
|
184
184
|
strokeLinecap: "round",
|
|
185
185
|
strokeLinejoin: "round",
|
|
186
186
|
strokeWidth: 2,
|
|
@@ -188,41 +188,41 @@ var M = ({ disabled: e, children: t }) => {
|
|
|
188
188
|
})
|
|
189
189
|
})
|
|
190
190
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
className:
|
|
191
|
+
/* @__PURE__ */ o("div", {
|
|
192
|
+
className: m({
|
|
193
193
|
"pl-8": h,
|
|
194
194
|
"pr-8": h
|
|
195
195
|
}),
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
ref:
|
|
198
|
-
className:
|
|
199
|
-
"border-b border-[#e0e0e0]":
|
|
200
|
-
"border-b-2":
|
|
201
|
-
"pb-[2px]":
|
|
196
|
+
children: /* @__PURE__ */ o("div", {
|
|
197
|
+
ref: f,
|
|
198
|
+
className: m("overflow-hidden", {
|
|
199
|
+
"border-b border-[#e0e0e0]": a === S.LINE,
|
|
200
|
+
"border-b-2": a === S.FILLED_CARD || a === S.BADGE_CARD,
|
|
201
|
+
"pb-[2px]": a === S.BADGE_CARD
|
|
202
202
|
}),
|
|
203
|
-
style: { borderColor:
|
|
204
|
-
children: /* @__PURE__ */
|
|
205
|
-
ref:
|
|
203
|
+
style: { borderColor: a === S.LINE ? void 0 : c },
|
|
204
|
+
children: /* @__PURE__ */ s("div", {
|
|
205
|
+
ref: p,
|
|
206
206
|
role: "tablist",
|
|
207
|
-
className:
|
|
208
|
-
"gap-x-[26px]":
|
|
209
|
-
"gap-x-[10px]":
|
|
210
|
-
"bg-[#f0f0f0]":
|
|
207
|
+
className: m("relative text-sm flex flex-nowrap", {
|
|
208
|
+
"gap-x-[26px]": a === S.LINE,
|
|
209
|
+
"gap-x-[10px]": a === S.FILLED_CARD || a === S.BADGE_CARD,
|
|
210
|
+
"bg-[#f0f0f0]": a === S.CARD
|
|
211
211
|
}),
|
|
212
212
|
onClick: E,
|
|
213
213
|
style: {
|
|
214
|
-
"--theme-color":
|
|
214
|
+
"--theme-color": c,
|
|
215
215
|
transform: `translateX(${v}px)`,
|
|
216
216
|
transition: "transform 0.3s ease-in-out"
|
|
217
217
|
},
|
|
218
|
-
children: [e,
|
|
219
|
-
className:
|
|
220
|
-
"bottom-0":
|
|
221
|
-
"top-0":
|
|
218
|
+
children: [e, d && x.ready && /* @__PURE__ */ o("div", {
|
|
219
|
+
className: m("absolute h-0.5", {
|
|
220
|
+
"bottom-0": a === S.LINE,
|
|
221
|
+
"top-0": a === S.CARD,
|
|
222
222
|
"transition-all duration-300 ease-in-out": T
|
|
223
223
|
}),
|
|
224
224
|
style: {
|
|
225
|
-
backgroundColor:
|
|
225
|
+
backgroundColor: c,
|
|
226
226
|
width: `${x.width}px`,
|
|
227
227
|
left: `${x.left}px`
|
|
228
228
|
}
|
|
@@ -230,20 +230,20 @@ var M = ({ disabled: e, children: t }) => {
|
|
|
230
230
|
})
|
|
231
231
|
})
|
|
232
232
|
}),
|
|
233
|
-
h && /* @__PURE__ */
|
|
234
|
-
className:
|
|
235
|
-
"text-gray-400 cursor-not-allowed": !_ ||
|
|
236
|
-
"text-gray-600": _ && !
|
|
233
|
+
h && /* @__PURE__ */ o("button", {
|
|
234
|
+
className: m("absolute right-0 top-0 bottom-0 z-10 w-8 flex items-center justify-center", {
|
|
235
|
+
"text-gray-400 cursor-not-allowed": !_ || l,
|
|
236
|
+
"text-gray-600": _ && !l
|
|
237
237
|
}),
|
|
238
238
|
onClick: b,
|
|
239
|
-
disabled: !_ ||
|
|
239
|
+
disabled: !_ || l,
|
|
240
240
|
"aria-label": "向右滚动",
|
|
241
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ o("svg", {
|
|
242
242
|
className: "w-4 h-4",
|
|
243
243
|
fill: "none",
|
|
244
244
|
stroke: "currentColor",
|
|
245
245
|
viewBox: "0 0 24 24",
|
|
246
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ o("path", {
|
|
247
247
|
strokeLinecap: "round",
|
|
248
248
|
strokeLinejoin: "round",
|
|
249
249
|
strokeWidth: 2,
|
|
@@ -259,7 +259,7 @@ P.displayName = "BsyTabList";
|
|
|
259
259
|
//#region src/components/Tabs/TabPanel/TabPanel.tsx
|
|
260
260
|
var F = ({ items: e, activeKey: t, className: n }) => {
|
|
261
261
|
let r = e.find((e) => e.key === t);
|
|
262
|
-
return !r || !r.children ? null : /* @__PURE__ */
|
|
262
|
+
return !r || !r.children ? null : /* @__PURE__ */ o("div", {
|
|
263
263
|
className: n,
|
|
264
264
|
role: "tabpanel",
|
|
265
265
|
"aria-labelledby": `tab-${t}`,
|
|
@@ -275,24 +275,24 @@ var I = (e) => {
|
|
|
275
275
|
valuePropName: "activeKey",
|
|
276
276
|
trigger: "onChange"
|
|
277
277
|
}), r = e.items?.some((e) => e.children), i = e.color || "#0265ff";
|
|
278
|
-
return /* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ o(C.Provider, {
|
|
279
279
|
value: {
|
|
280
280
|
color: i,
|
|
281
281
|
type: e.type,
|
|
282
282
|
disabled: e.disabled
|
|
283
283
|
},
|
|
284
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ s("div", {
|
|
285
285
|
className: "bsy-tabs",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ o(P, {
|
|
287
287
|
items: e.items,
|
|
288
288
|
activeKey: t,
|
|
289
|
-
children: e.items?.map((e) => /* @__PURE__ */
|
|
289
|
+
children: e.items?.map((e) => /* @__PURE__ */ o(j, {
|
|
290
290
|
tabKey: e.key,
|
|
291
291
|
label: e.label,
|
|
292
292
|
active: t === e.key,
|
|
293
293
|
onClick: (e) => n(e)
|
|
294
294
|
}, e.key))
|
|
295
|
-
}), r && e.items && /* @__PURE__ */
|
|
295
|
+
}), r && e.items && /* @__PURE__ */ o(F, {
|
|
296
296
|
items: e.items,
|
|
297
297
|
activeKey: t,
|
|
298
298
|
className: "bsy-tabs__content"
|
|
@@ -311,16 +311,16 @@ var L = "_active_5a1wn_11", R = "_icon_5a1wn_45", z = {
|
|
|
311
311
|
"bsy-tabs-select__panel": "_bsy-tabs-select__panel_5a1wn_21",
|
|
312
312
|
"bsy-tabs-select__panel-item": "_bsy-tabs-select__panel-item_5a1wn_32",
|
|
313
313
|
icon: R
|
|
314
|
-
}, B = (
|
|
315
|
-
let { color:
|
|
316
|
-
isOpen:
|
|
317
|
-
close:
|
|
314
|
+
}, B = (t) => {
|
|
315
|
+
let { color: i = "#0269ff" } = t, [c, { toggle: l, setLeft: u }] = v(!1), { refs: d, floatingStyles: f, getFloatingProps: p, getReferenceProps: g, referenceStyle: _ } = r({
|
|
316
|
+
isOpen: c,
|
|
317
|
+
close: u,
|
|
318
318
|
offset: {
|
|
319
319
|
x: 0,
|
|
320
320
|
y: 4
|
|
321
321
|
},
|
|
322
322
|
zIndex: 1e3
|
|
323
|
-
}), [C, w] = h(
|
|
323
|
+
}), [C, w] = h(t, {
|
|
324
324
|
trigger: "onChange",
|
|
325
325
|
defaultValuePropName: "defaultValue",
|
|
326
326
|
valuePropName: "value",
|
|
@@ -329,20 +329,20 @@ var L = "_active_5a1wn_11", R = "_icon_5a1wn_45", z = {
|
|
|
329
329
|
label: e,
|
|
330
330
|
value: e
|
|
331
331
|
}));
|
|
332
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ s("div", {
|
|
333
333
|
className: z["bsy-tabs-select"],
|
|
334
|
-
children: [/* @__PURE__ */
|
|
335
|
-
className:
|
|
336
|
-
ref:
|
|
334
|
+
children: [/* @__PURE__ */ s("div", {
|
|
335
|
+
className: m(z["bsy-tabs-select__trigger"], { [z.active]: c }),
|
|
336
|
+
ref: d.setReference,
|
|
337
337
|
...g(),
|
|
338
338
|
style: _,
|
|
339
|
-
onClick: () =>
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
-
className:
|
|
342
|
-
children: C && /* @__PURE__ */
|
|
339
|
+
onClick: () => l(),
|
|
340
|
+
children: [/* @__PURE__ */ o("div", {
|
|
341
|
+
className: m(z["bsy-tabs-select__trigger-input"], { [z.active]: C }),
|
|
342
|
+
children: C && /* @__PURE__ */ o(I, {
|
|
343
343
|
activeKey: "1",
|
|
344
344
|
type: C,
|
|
345
|
-
color:
|
|
345
|
+
color: i,
|
|
346
346
|
disabled: !0,
|
|
347
347
|
items: [
|
|
348
348
|
{
|
|
@@ -359,31 +359,31 @@ var L = "_active_5a1wn_11", R = "_icon_5a1wn_45", z = {
|
|
|
359
359
|
}
|
|
360
360
|
]
|
|
361
361
|
}, C)
|
|
362
|
-
}), /* @__PURE__ */
|
|
362
|
+
}), /* @__PURE__ */ o("div", {
|
|
363
363
|
className: z["bsy-tabs-select__trigger-icon"],
|
|
364
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ o(e, {
|
|
365
365
|
name: "arrow-down",
|
|
366
|
-
className:
|
|
366
|
+
className: m(z.icon, { active: c })
|
|
367
367
|
})
|
|
368
368
|
})]
|
|
369
|
-
}), /* @__PURE__ */
|
|
370
|
-
ref:
|
|
371
|
-
style:
|
|
372
|
-
...
|
|
373
|
-
children: /* @__PURE__ */
|
|
374
|
-
...
|
|
375
|
-
children: /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ o(x, { children: /* @__PURE__ */ o(y, { children: c && /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o("div", {
|
|
370
|
+
ref: d.setFloating,
|
|
371
|
+
style: f,
|
|
372
|
+
...p(),
|
|
373
|
+
children: /* @__PURE__ */ o(b.div, {
|
|
374
|
+
...n,
|
|
375
|
+
children: /* @__PURE__ */ o("div", {
|
|
376
376
|
className: z["bsy-tabs-select__panel"],
|
|
377
|
-
children: T.map((e) => /* @__PURE__ */
|
|
378
|
-
className:
|
|
377
|
+
children: T.map((e) => /* @__PURE__ */ o("div", {
|
|
378
|
+
className: m(z["bsy-tabs-select__panel-item"], { [z.active]: C === e.value }),
|
|
379
379
|
onClick: () => {
|
|
380
|
-
w(e.value),
|
|
380
|
+
w(e.value), u();
|
|
381
381
|
},
|
|
382
|
-
children: /* @__PURE__ */
|
|
382
|
+
children: /* @__PURE__ */ o(I, {
|
|
383
383
|
activeKey: "1",
|
|
384
384
|
type: e.value,
|
|
385
385
|
disabled: !0,
|
|
386
|
-
color:
|
|
386
|
+
color: i,
|
|
387
387
|
items: [
|
|
388
388
|
{
|
|
389
389
|
label: "标签页1",
|
package/dist/Tabs/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import "../vendors/
|
|
3
|
-
import "../vendors/
|
|
4
|
-
import "
|
|
5
|
-
import { i as e, n as t, r as n, t as r } from "./Tabs-Dsxn_7gF.js";
|
|
1
|
+
import "../Icon/Icon-CTZCSuVg.js";
|
|
2
|
+
import "../vendors/color-CyuNdAfc.js";
|
|
3
|
+
import "../vendors/useFloatingPortal-W4pliYWU.js";
|
|
4
|
+
import { i as e, n as t, r as n, t as r } from "./Tabs-BqT-_eVo.js";
|
|
6
5
|
export { e as TABS_TYPE, n as TabPanel, r as TabSelect, t as default };
|
package/dist/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "../vendors/Tree-
|
|
3
|
-
import "../CheckBox/CheckBox-
|
|
4
|
-
import "../Radio/Radio-
|
|
1
|
+
import "../Icon/Icon-CTZCSuVg.js";
|
|
2
|
+
import { t as e } from "../vendors/Tree-nIRgDY2s.js";
|
|
3
|
+
import "../CheckBox/CheckBox-l__wOnmH.js";
|
|
4
|
+
import "../Radio/Radio-CZOrtNyn.js";
|
|
5
5
|
export { e as Tree };
|
package/dist/Tree/utils/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { t as e } from "./Icon/Icon-
|
|
2
|
-
import { n as t, r as n } from "./vendors/useLocale-
|
|
3
|
-
import { t as r } from "./Card/Card-
|
|
4
|
-
import { t as i } from "./Modal/Modal-
|
|
5
|
-
import { t as a } from "./ColorPicker/ColorPicker-
|
|
6
|
-
import "./vendors/
|
|
7
|
-
import "./
|
|
8
|
-
import { t as
|
|
9
|
-
import
|
|
10
|
-
import "./
|
|
11
|
-
import
|
|
12
|
-
import "./CheckBox/CheckBox-
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import
|
|
16
|
-
import "./vendors/useFloatingPortal-BA6P5GxV.js";
|
|
1
|
+
import { t as e } from "./Icon/Icon-CTZCSuVg.js";
|
|
2
|
+
import { n as t, r as n } from "./vendors/useLocale-BXnqO-Ju.js";
|
|
3
|
+
import { t as r } from "./Card/Card-CaKTq_1y.js";
|
|
4
|
+
import { t as i } from "./Modal/Modal-DQ5bptu_.js";
|
|
5
|
+
import { t as a } from "./ColorPicker/ColorPicker-C1kG_eI-.js";
|
|
6
|
+
import "./vendors/color-CyuNdAfc.js";
|
|
7
|
+
import { t as o } from "./Segmented/Segmented-DEGgLO-b.js";
|
|
8
|
+
import { t as s } from "./Select/Select-BoNqxIRo.js";
|
|
9
|
+
import "./Select/SelectInputSearch-DMY6Y9B6.js";
|
|
10
|
+
import { t as c } from "./vendors/Tree-nIRgDY2s.js";
|
|
11
|
+
import "./CheckBox/CheckBox-l__wOnmH.js";
|
|
12
|
+
import { t as l } from "./CheckBox/CheckBox-Cz6KW9Lw.js";
|
|
13
|
+
import { t as u } from "./Radio/Radio-CZOrtNyn.js";
|
|
14
|
+
import { t as d } from "./NotFoundContent/NotFoundContent-1-41e1rN.js";
|
|
15
|
+
import "./vendors/useFloatingPortal-W4pliYWU.js";
|
|
17
16
|
import "./Tree/index.js";
|
|
18
|
-
import { n as f, t as p } from "./Tabs/Tabs-
|
|
19
|
-
import { t as m } from "./DropDown/DropDown-
|
|
20
|
-
import { t as h } from "./Loading/Loading-
|
|
17
|
+
import { n as f, t as p } from "./Tabs/Tabs-BqT-_eVo.js";
|
|
18
|
+
import { t as m } from "./DropDown/DropDown-BAPBTglm.js";
|
|
19
|
+
import { t as h } from "./Loading/Loading-Dy5A--HK.js";
|
|
21
20
|
import "./NotFoundContent/index.js";
|
|
22
|
-
import { t as g } from "./InputTag/InputTag-
|
|
21
|
+
import { t as g } from "./InputTag/InputTag-V4UnUnGJ.js";
|
|
23
22
|
import { jsx as _ } from "react/jsx-runtime";
|
|
24
23
|
import { useCallback as v, useMemo as y } from "react";
|
|
25
24
|
var b = {
|