@baishuyun/ui-base 2.3.3 → 2.4.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.
- 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-DyV_1e23.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/components/Tree/Tree.test.d.ts +1 -0
- package/dist/components/Tree/context/TreeContext.d.ts +1 -1
- package/dist/components/Tree/types/tree.d.ts +1 -1
- package/dist/index.js +83 -23
- package/dist/locale/LocaleProvider.test.d.ts +1 -0
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/lang/zh-TW.json.d.ts +64 -0
- package/dist/vendors/Tree-P9E06Unm.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,162 +0,0 @@
|
|
|
1
|
-
import { a as e, i as t } from "../vendors/lodash-es-Bu9xU1fK.js";
|
|
2
|
-
import { t as n } from "../vendors/useLocale-BfT0V1j4.js";
|
|
3
|
-
import { t as r } from "../vendors/clsx-DNOE4Gl8.js";
|
|
4
|
-
import { n as i } from "../vendors/animations-C5JKFkz4.js";
|
|
5
|
-
import { t as a } from "../Select/SelectInputSearch-gp6gcY3x.js";
|
|
6
|
-
import { t as o } from "../NotFoundContent/NotFoundContent-CTPpcZOt.js";
|
|
7
|
-
import { t as s } from "../vendors/fuse.js-BKtvbTjL.js";
|
|
8
|
-
import { t as c } from "../vendors/simplebar-react-CFlS-Nm9.js";
|
|
9
|
-
import { t as l } from "../vendors/useFloatingPortal-BA6P5GxV.js";
|
|
10
|
-
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
-
import { cloneElement as p, isValidElement as m, memo as h, useMemo as g, useState as _ } from "react";
|
|
12
|
-
import { useControllableValue as v } from "ahooks";
|
|
13
|
-
import { AnimatePresence as y, motion as b } from "motion/react";
|
|
14
|
-
import { FloatingPortal as x } from "@floating-ui/react";
|
|
15
|
-
//#region src/hooks/useDropdownSearch.ts
|
|
16
|
-
var S = ({ menus: t, searchValue: n, enableInternalFilter: r, searchKey: i }) => {
|
|
17
|
-
let a = g(() => new s(t, {
|
|
18
|
-
keys: [i],
|
|
19
|
-
ignoreLocation: !0,
|
|
20
|
-
threshold: .3,
|
|
21
|
-
getFn: (e, t) => {
|
|
22
|
-
let n = e[t];
|
|
23
|
-
return t === "label" && typeof n != "string" ? "" : String(n || "");
|
|
24
|
-
}
|
|
25
|
-
}), [t, i]), o = g(() => !r || e(n) ? t : a.search(n).map((e) => e.item), [
|
|
26
|
-
t,
|
|
27
|
-
n,
|
|
28
|
-
r,
|
|
29
|
-
a
|
|
30
|
-
]);
|
|
31
|
-
return {
|
|
32
|
-
filteredMenus: o,
|
|
33
|
-
hasNoResults: g(() => r && !e(n) && o.length === 0, [
|
|
34
|
-
r,
|
|
35
|
-
n,
|
|
36
|
-
o.length
|
|
37
|
-
])
|
|
38
|
-
};
|
|
39
|
-
}, C = "_dropdown__trigger_11n5z_1", w = "_dropdown__panel_11n5z_7", T = "_dropdown__search_11n5z_15", E = "_dropdown__menu_11n5z_19", D = {
|
|
40
|
-
dropdown__trigger: C,
|
|
41
|
-
"dropdown__trigger--disabled": "_dropdown__trigger--disabled_11n5z_4",
|
|
42
|
-
dropdown__panel: w,
|
|
43
|
-
dropdown__search: T,
|
|
44
|
-
dropdown__menu: E,
|
|
45
|
-
"dropdown__menu-item": "_dropdown__menu-item_11n5z_22",
|
|
46
|
-
"dropdown__menu-item--disabled": "_dropdown__menu-item--disabled_11n5z_34",
|
|
47
|
-
"dropdown__menu-item--active": "_dropdown__menu-item--active_11n5z_34",
|
|
48
|
-
"dropdown__menu-item-icon": "_dropdown__menu-item-icon_11n5z_41",
|
|
49
|
-
"system-field": "_system-field_11n5z_52",
|
|
50
|
-
"dropdown__menu-item-label": "_dropdown__menu-item-label_11n5z_63"
|
|
51
|
-
}, O = h(({ item: e, onClick: t, isActive: n = !1 }) => {
|
|
52
|
-
let i = () => {
|
|
53
|
-
e.disabled || t(e);
|
|
54
|
-
}, a = e.systemField || !1;
|
|
55
|
-
return /* @__PURE__ */ f("div", {
|
|
56
|
-
className: r(D["dropdown__menu-item"], {
|
|
57
|
-
[D["dropdown__menu-item--disabled"]]: e.disabled,
|
|
58
|
-
[D["dropdown__menu-item--active"]]: n && !e.disabled,
|
|
59
|
-
"text-[#4d609f]": a && !e.disabled && !n
|
|
60
|
-
}),
|
|
61
|
-
onClick: i,
|
|
62
|
-
children: [e.icon && /* @__PURE__ */ d("div", {
|
|
63
|
-
className: r(D["dropdown__menu-item-icon"], { [D["system-field"]]: a }),
|
|
64
|
-
children: e.icon
|
|
65
|
-
}), /* @__PURE__ */ d("div", {
|
|
66
|
-
className: r(D["dropdown__menu-item-label"], "truncate"),
|
|
67
|
-
children: e.label
|
|
68
|
-
})]
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
O.displayName = "BsyDropDownMenuItem";
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/components/DropDown/MenuList/MenuList.tsx
|
|
74
|
-
var k = ({ menus: e, onClick: t, hasNoResults: r, activeKey: i = [] }) => {
|
|
75
|
-
let { t: a } = n();
|
|
76
|
-
return e.length === 0 ? /* @__PURE__ */ d(o, {
|
|
77
|
-
text: a("noData"),
|
|
78
|
-
className: "px-3 py-6"
|
|
79
|
-
}) : r ? /* @__PURE__ */ d(o, {
|
|
80
|
-
text: a("noDataFound"),
|
|
81
|
-
className: "px-3 py-6"
|
|
82
|
-
}) : /* @__PURE__ */ d("div", {
|
|
83
|
-
className: D.dropdown__menu,
|
|
84
|
-
children: e.map((e) => /* @__PURE__ */ d(O, {
|
|
85
|
-
item: e,
|
|
86
|
-
onClick: t,
|
|
87
|
-
isActive: i.includes(e.key)
|
|
88
|
-
}, e.key))
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
k.displayName = "BsyDropDownMenuList";
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/components/DropDown/DropDown.tsx
|
|
94
|
-
var A = (e) => {
|
|
95
|
-
let { t: r } = n(), { children: o, menus: s, onClick: h, onSearch: g, searchKey: C = "label", showSearch: w = !0, closeOnSelect: T = !0, searchPlaceholder: E = r("search"), offset: O = {
|
|
96
|
-
x: 0,
|
|
97
|
-
y: 0
|
|
98
|
-
}, zIndex: A = 1101, style: j, activeKey: M = [] } = e, [N, P] = v(e, {
|
|
99
|
-
valuePropName: "visible",
|
|
100
|
-
defaultValue: !1,
|
|
101
|
-
trigger: "onOpenChange"
|
|
102
|
-
}), [F, I] = _(""), L = () => {
|
|
103
|
-
P(!N);
|
|
104
|
-
}, R = () => {
|
|
105
|
-
P(!1);
|
|
106
|
-
}, z = (e) => {
|
|
107
|
-
e.disabled || (h?.(e), T && R());
|
|
108
|
-
}, B = (e) => {
|
|
109
|
-
I(e), g?.(e);
|
|
110
|
-
}, { filteredMenus: V, hasNoResults: H } = S({
|
|
111
|
-
menus: s,
|
|
112
|
-
searchValue: F,
|
|
113
|
-
enableInternalFilter: !g,
|
|
114
|
-
searchKey: C
|
|
115
|
-
}), { refs: U, floatingStyles: W, getReferenceProps: G, getFloatingProps: K } = l({
|
|
116
|
-
isOpen: N,
|
|
117
|
-
close: R,
|
|
118
|
-
showMask: !1,
|
|
119
|
-
zIndex: A,
|
|
120
|
-
offset: {
|
|
121
|
-
x: t(O.x) ? O.x : 0,
|
|
122
|
-
y: t(O.y) ? O.y : 0
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
return /* @__PURE__ */ f(u, { children: [m(o) ? p(o, {
|
|
126
|
-
...G(),
|
|
127
|
-
ref: U.setReference,
|
|
128
|
-
onClick: (e) => {
|
|
129
|
-
L(), o.props.onClick?.(e);
|
|
130
|
-
}
|
|
131
|
-
}) : o, /* @__PURE__ */ d(x, { children: /* @__PURE__ */ d(y, { children: N && /* @__PURE__ */ d("div", {
|
|
132
|
-
ref: U.setFloating,
|
|
133
|
-
...K(),
|
|
134
|
-
style: W,
|
|
135
|
-
children: /* @__PURE__ */ d(b.div, {
|
|
136
|
-
...i,
|
|
137
|
-
children: /* @__PURE__ */ f("div", {
|
|
138
|
-
className: D.dropdown__panel,
|
|
139
|
-
style: j,
|
|
140
|
-
children: [w && /* @__PURE__ */ d("div", {
|
|
141
|
-
className: D.dropdown__search,
|
|
142
|
-
children: /* @__PURE__ */ d(a, {
|
|
143
|
-
value: F,
|
|
144
|
-
onChange: B,
|
|
145
|
-
searchPlaceholder: E
|
|
146
|
-
})
|
|
147
|
-
}), /* @__PURE__ */ d(c, {
|
|
148
|
-
style: { maxHeight: 300 },
|
|
149
|
-
children: /* @__PURE__ */ d(k, {
|
|
150
|
-
menus: V,
|
|
151
|
-
onClick: z,
|
|
152
|
-
hasNoResults: H,
|
|
153
|
-
activeKey: M
|
|
154
|
-
})
|
|
155
|
-
})]
|
|
156
|
-
})
|
|
157
|
-
})
|
|
158
|
-
}) }) })] });
|
|
159
|
-
};
|
|
160
|
-
A.displayName = "BsyDropDown";
|
|
161
|
-
//#endregion
|
|
162
|
-
export { A as t };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { i as e } from "../vendors/lodash-es-Bu9xU1fK.js";
|
|
2
|
-
import { createFromIconfontCN as t } from "@ant-design/icons";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/Icon/Icon.tsx
|
|
5
|
-
var r = t({ scriptUrl: "https://at.alicdn.com/t/c/font_4786625_ofg0ibxfhle.js" }), i = ({ name: t, style: i, className: a, onClick: o, color: s, size: c = 16 }) => {
|
|
6
|
-
let l = {
|
|
7
|
-
color: s,
|
|
8
|
-
fontSize: e(c) ? `${c}px` : c,
|
|
9
|
-
...i
|
|
10
|
-
};
|
|
11
|
-
return /* @__PURE__ */ n(r, {
|
|
12
|
-
onClick: o,
|
|
13
|
-
type: `icon-${t}`,
|
|
14
|
-
style: l,
|
|
15
|
-
className: `${a || ""}`
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { i as t };
|