@baishuyun/ui-base 6.6.0 → 6.7.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.
- package/dist/Calendar/{AllDaySection-M-b9tRHh.js → AllDaySection-DOMayJvh.js} +3 -3
- package/dist/Calendar/{Calendar-C9PhASp0.js → Calendar-DSqL58yh.js} +11 -11
- package/dist/Calendar/{CurrentTimeIndicator-Dpi36eVJ.js → CurrentTimeIndicator-CgDrVXin.js} +1 -1
- package/dist/Calendar/{EventCard-BIfRqCk5.js → EventCard-BGDwQ-c7.js} +3 -3
- package/dist/Calendar/{TimeGrid-Dk3soSo4.js → TimeGrid-KeZ4RsDq.js} +1 -1
- package/dist/Calendar/context/index.js +1 -1
- package/dist/Calendar/index.js +16 -15
- package/dist/Calendar/subcomponents/AllDaySection/index.js +6 -6
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -4
- package/dist/Calendar/subcomponents/EventCard/index.js +5 -5
- package/dist/Calendar/subcomponents/TimeAxis/index.js +3 -3
- package/dist/Calendar/subcomponents/TimeGrid/index.js +2 -2
- package/dist/Calendar/{theme-Cgn0zQoC.js → theme-qcYESlpU.js} +2 -2
- package/dist/Calendar/utils/index.js +3 -3
- package/dist/Calendar/utils/layout/index.js +2 -2
- package/dist/Calendar/utils/theme/index.js +1 -1
- package/dist/CheckBox/{CheckBox-81R8QKHb.js → CheckBox-GtT43IQ8.js} +1 -1
- package/dist/CheckBox/index.js +2 -2
- package/dist/ColorPicker/{ColorPicker-aj57lMA5.js → ColorPicker-Hjs4Vp5a.js} +37 -35
- package/dist/ColorPicker/index.js +2 -1
- package/dist/DatePicker/DatePicker-DnH3zblC.js +96 -0
- package/dist/DatePicker/{DatePickerPanel-BjnLfncu.js → DatePickerPanel-CQGrY4wT.js} +2 -2
- package/dist/DatePicker/index.js +5 -4
- package/dist/DatePicker/style/index.js +1 -1
- package/dist/DatePicker/{style-BxWyBhZ3.js → style-BlAisgTN.js} +1 -1
- package/dist/DropDown/DropDown-D_Zh6fGX.js +171 -0
- package/dist/DropDown/index.js +6 -5
- package/dist/DropDown/style/index.js +1 -1
- package/dist/DropDown/{style-4LK6rNHe.js → style-WiojFVQn.js} +1 -1
- package/dist/Editor/{Buttons-Ds6bLmnl.js → Buttons-De6NyZQs.js} +3 -3
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +10 -9
- package/dist/Editor/index.js +10 -9
- package/dist/Gantt/GanttChart/index.js +13 -12
- package/dist/Gantt/{GanttChart-DbI1fvxe.js → GanttChart-MwVs4NFd.js} +7 -7
- package/dist/Gantt/GanttTable/index.js +7 -7
- package/dist/Gantt/{GanttTable-C3PLGmKr.js → GanttTable-DoDMELyN.js} +5 -5
- package/dist/Gantt/GanttToolBar/index.js +9 -8
- package/dist/Gantt/{GanttToolBar-8jPQ9BAG.js → GanttToolBar-BAAQMT0x.js} +2 -2
- package/dist/Gantt/{collapseKeys-1N9ci2oJ.js → collapseKeys-VeqoqKwC.js} +2 -2
- package/dist/Gantt/index.js +20 -19
- package/dist/Gantt/{theme-C197Dtjy.js → theme-DLS8mdri.js} +1 -1
- package/dist/Gantt/{timelineViewConfig-Dl3AXO45.js → timelineViewConfig-C1T1exJd.js} +1 -1
- package/dist/Gantt/utils/index.js +5 -5
- package/dist/Gantt/utils/theme/index.js +1 -1
- package/dist/InputTag/{InputTag-CGQ5dXyf.js → InputTag-C4iRY5Mw.js} +1 -1
- package/dist/InputTag/index.js +2 -2
- package/dist/Loading/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/{ScrollBar-CSGBOE3e.js → ScrollBar-C4-PtPBc.js} +1 -1
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/{Segmented-CzVKrL6o.js → Segmented-Ck2ZmfF7.js} +13 -12
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/Select-CAoozrW7.js +743 -0
- package/dist/Select/index.js +10 -9
- package/dist/Table/{Table-BtH9Oa14.js → Table-BZspRsYV.js} +4 -4
- package/dist/Table/hooks/index.js +1 -1
- package/dist/Table/{hooks-DK8Pf7iH.js → hooks-5ETrGbzY.js} +1 -1
- package/dist/Table/index.js +5 -5
- package/dist/Table/{processRowspan-D4uv6zLk.js → processRowspan-CSW5J9Rs.js} +1 -1
- package/dist/Table/style/index.js +1 -1
- package/dist/Table/{style-BwcnT2ee.js → style-qi0sTT0x.js} +1 -1
- package/dist/Table/utils/index.js +1 -1
- package/dist/Tabs/{Tabs-7wEcxUv6.js → Tabs-sag2ofoG.js} +1 -1
- package/dist/Tabs/index.js +2 -2
- package/dist/Tooltip/{Tooltip-B_SZOy6k.js → Tooltip-DWWWYn1a.js} +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +3 -3
- package/dist/components/Select/__tests__/Select.optionDisabled.test.d.ts +1 -0
- package/dist/components/Select/interface.d.ts +0 -1
- package/dist/index.js +33 -32
- package/dist/style.css +1 -1
- package/dist/vendors/{Tree-DqnOGJtB.js → Tree-DMC_MSw1.js} +2 -2
- package/dist/vendors/{useFloatingPortal-B2SDNV5C.js → useFloatingPortal-CsNiNirJ.js} +1 -0
- package/dist/vendors/useLatchedPopupPortalRoot-hwf14FJ5.js +24 -0
- package/package.json +1 -1
- package/dist/DatePicker/DatePicker-EIFyC9zF.js +0 -115
- package/dist/DropDown/DropDown-B34vfoOs.js +0 -172
- package/dist/Select/Select-DTximYG6.js +0 -734
- /package/dist/Calendar/{TimeAxis-Chwxo6Yj.js → TimeAxis-f40447Et.js} +0 -0
- /package/dist/Calendar/{colorUtils-FNbm3zBQ.js → colorUtils-Be9RqvDV.js} +0 -0
- /package/dist/Calendar/{context-CzS6P3nk.js → context-BrzVkPeC.js} +0 -0
- /package/dist/Calendar/{layout-Cb39seCc.js → layout-rnPhDP7c.js} +0 -0
- /package/dist/CheckBox/{CheckBox-ejvbDr-a.js → CheckBox-D7bCjlkU.js} +0 -0
- /package/dist/DatePicker/{ensureDayjsPlugins-DxqbKqon.js → ensureDayjsPlugins-Bz70Nzmi.js} +0 -0
- /package/dist/DatePicker/{pickerLocale-CtDOOxxD.js → pickerLocale-g90uglxB.js} +0 -0
- /package/dist/Gantt/{GanttHighlightContext-CtT98ZnK.js → GanttHighlightContext-CMXYFPyz.js} +0 -0
- /package/dist/Gantt/{columnResize-DFe7F98O.js → columnResize-1nSds2g5.js} +0 -0
- /package/dist/Gantt/{constants-CrBb5i5p.js → constants-BSCH_s3S.js} +0 -0
- /package/dist/Gantt/{highlightTarget-DtCe7zto.js → highlightTarget-EEsL61Qd.js} +0 -0
- /package/dist/Loading/{Loading-ho-6d72M.js → Loading-CV5GuhWQ.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-CV9fTylQ.js → NotFoundContent-J-TEnljc.js} +0 -0
- /package/dist/Radio/{Radio-C2zJzZc3.js → Radio-CMAwZdP7.js} +0 -0
- /package/dist/Select/{SelectInputSearch-BDwg-Noi.js → SelectInputSearch-dfBUnTCY.js} +0 -0
- /package/dist/Table/{constants-CuBlYZLO.js → constants-BZfNf-UU.js} +0 -0
- /package/dist/vendors/{cssVars-DoQgQ2CM.js → cssVars-B8o94Yao.js} +0 -0
- /package/dist/vendors/{mergeRefs-TiJ0xjUN.js → mergeRefs-Bai1cIzv.js} +0 -0
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../ScrollBar/ScrollBar-CSGBOE3e.js";
|
|
2
|
-
import { t } from "../vendors/useLocale-DZ8XW2VL.js";
|
|
3
|
-
import { n } from "../vendors/animations-Mlw78WYo.js";
|
|
4
|
-
import { t as r } from "../Select/SelectInputSearch-BDwg-Noi.js";
|
|
5
|
-
import { t as i } from "../NotFoundContent/NotFoundContent-CV9fTylQ.js";
|
|
6
|
-
import { t as a } from "../vendors/useFloatingPortal-B2SDNV5C.js";
|
|
7
|
-
import { t as o } from "./style-4LK6rNHe.js";
|
|
8
|
-
import { isEmpty as s, isNumber as c } from "lodash-es";
|
|
9
|
-
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
-
import { cloneElement as f, isValidElement as p, memo as m, useMemo as h, useState as g } from "react";
|
|
11
|
-
import { clsx as _ } from "clsx";
|
|
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
|
-
import S from "fuse.js";
|
|
16
|
-
//#region src/hooks/useDropdownSearch.ts
|
|
17
|
-
var C = ({ menus: e, searchValue: t, enableInternalFilter: n, searchKey: r }) => {
|
|
18
|
-
let i = h(() => new S(e, {
|
|
19
|
-
keys: [r],
|
|
20
|
-
ignoreLocation: !0,
|
|
21
|
-
threshold: .3,
|
|
22
|
-
getFn: (e, t) => {
|
|
23
|
-
let n = e[t];
|
|
24
|
-
return t === "label" && typeof n != "string" ? "" : String(n || "");
|
|
25
|
-
}
|
|
26
|
-
}), [e, r]), a = h(() => !n || s(t) ? e : i.search(t).map((e) => e.item), [
|
|
27
|
-
e,
|
|
28
|
-
t,
|
|
29
|
-
n,
|
|
30
|
-
i
|
|
31
|
-
]);
|
|
32
|
-
return {
|
|
33
|
-
filteredMenus: a,
|
|
34
|
-
hasNoResults: h(() => n && !s(t) && a.length === 0, [
|
|
35
|
-
n,
|
|
36
|
-
t,
|
|
37
|
-
a.length
|
|
38
|
-
])
|
|
39
|
-
};
|
|
40
|
-
}, w = "_dropdown__trigger_1fafn_1", T = "_dropdown__panel_1fafn_7", E = "_dropdown__search_1fafn_15", D = "_dropdown__menu_1fafn_19", O = {
|
|
41
|
-
dropdown__trigger: w,
|
|
42
|
-
"dropdown__trigger--disabled": "_dropdown__trigger--disabled_1fafn_4",
|
|
43
|
-
dropdown__panel: T,
|
|
44
|
-
dropdown__search: E,
|
|
45
|
-
dropdown__menu: D,
|
|
46
|
-
"dropdown__menu-item": "_dropdown__menu-item_1fafn_22",
|
|
47
|
-
"dropdown__menu-item--disabled": "_dropdown__menu-item--disabled_1fafn_34",
|
|
48
|
-
"dropdown__menu-item--active": "_dropdown__menu-item--active_1fafn_34",
|
|
49
|
-
"dropdown__menu-item-icon": "_dropdown__menu-item-icon_1fafn_41",
|
|
50
|
-
"system-field": "_system-field_1fafn_52",
|
|
51
|
-
"dropdown__menu-item-label": "_dropdown__menu-item-label_1fafn_63"
|
|
52
|
-
}, k = m(({ item: e, onClick: t, isActive: n = !1 }) => {
|
|
53
|
-
let r = () => {
|
|
54
|
-
e.disabled || t(e);
|
|
55
|
-
}, i = e.systemField || !1;
|
|
56
|
-
return /* @__PURE__ */ d("div", {
|
|
57
|
-
className: _(O["dropdown__menu-item"], {
|
|
58
|
-
[O["dropdown__menu-item--disabled"]]: e.disabled,
|
|
59
|
-
[O["dropdown__menu-item--active"]]: n && !e.disabled,
|
|
60
|
-
"text-[#4d609f]": i && !e.disabled && !n
|
|
61
|
-
}),
|
|
62
|
-
onClick: r,
|
|
63
|
-
children: [e.icon && /* @__PURE__ */ u("div", {
|
|
64
|
-
className: _(O["dropdown__menu-item-icon"], { [O["system-field"]]: i && !e.disabled && !n }),
|
|
65
|
-
children: e.icon
|
|
66
|
-
}), /* @__PURE__ */ u("div", {
|
|
67
|
-
className: _(O["dropdown__menu-item-label"], "truncate"),
|
|
68
|
-
children: e.label
|
|
69
|
-
})]
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
k.displayName = "BsyDropDownMenuItem";
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/components/DropDown/MenuList/MenuList.tsx
|
|
75
|
-
var A = ({ menus: e, onClick: n, hasNoResults: r, activeKey: a = [] }) => {
|
|
76
|
-
let { t: o } = t();
|
|
77
|
-
return e.length === 0 ? /* @__PURE__ */ u(i, {
|
|
78
|
-
text: o("noData"),
|
|
79
|
-
className: "px-3 py-6"
|
|
80
|
-
}) : r ? /* @__PURE__ */ u(i, {
|
|
81
|
-
text: o("noDataFound"),
|
|
82
|
-
className: "px-3 py-6"
|
|
83
|
-
}) : /* @__PURE__ */ u("div", {
|
|
84
|
-
className: O.dropdown__menu,
|
|
85
|
-
children: e.map((e) => /* @__PURE__ */ u(k, {
|
|
86
|
-
item: e,
|
|
87
|
-
onClick: n,
|
|
88
|
-
isActive: a.includes(e.key)
|
|
89
|
-
}, e.key))
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
A.displayName = "BsyDropDownMenuList";
|
|
93
|
-
//#endregion
|
|
94
|
-
//#region src/components/DropDown/DropDown.tsx
|
|
95
|
-
var j = (i) => {
|
|
96
|
-
let { t: s } = t(), { children: m, menus: _, onClick: S, onSearch: w, searchKey: T = "label", showSearch: E = !0, closeOnSelect: D = !0, searchPlaceholder: k = s("search"), offset: j = {
|
|
97
|
-
x: 0,
|
|
98
|
-
y: 0
|
|
99
|
-
}, zIndex: M = 1101, style: N, activeKey: P = [], getPopupContainer: F, theme: I } = i, [L, R] = v(i, {
|
|
100
|
-
valuePropName: "visible",
|
|
101
|
-
defaultValue: !1,
|
|
102
|
-
trigger: "onOpenChange"
|
|
103
|
-
}), [z, B] = g(""), V = () => {
|
|
104
|
-
R(!L);
|
|
105
|
-
}, H = () => {
|
|
106
|
-
R(!1);
|
|
107
|
-
}, U = (e) => {
|
|
108
|
-
e.disabled || (S?.(e), D && H());
|
|
109
|
-
}, W = (e) => {
|
|
110
|
-
B(e), w?.(e);
|
|
111
|
-
}, { filteredMenus: G, hasNoResults: K } = C({
|
|
112
|
-
menus: _,
|
|
113
|
-
searchValue: z,
|
|
114
|
-
enableInternalFilter: !w,
|
|
115
|
-
searchKey: T
|
|
116
|
-
}), { refs: q, floatingStyles: J, getReferenceProps: Y, getFloatingProps: X } = a({
|
|
117
|
-
isOpen: L,
|
|
118
|
-
close: H,
|
|
119
|
-
showMask: !1,
|
|
120
|
-
zIndex: M,
|
|
121
|
-
offset: {
|
|
122
|
-
x: c(j.x) ? j.x : 0,
|
|
123
|
-
y: c(j.y) ? j.y : 0
|
|
124
|
-
}
|
|
125
|
-
}), Z = p(m) ? f(m, {
|
|
126
|
-
...Y(),
|
|
127
|
-
ref: q.setReference,
|
|
128
|
-
onClick: (e) => {
|
|
129
|
-
V(), m.props.onClick?.(e);
|
|
130
|
-
}
|
|
131
|
-
}) : m, Q = h(() => {
|
|
132
|
-
let e = L ? F?.() : void 0;
|
|
133
|
-
return e?.nodeType === 1 ? e : void 0;
|
|
134
|
-
}, [L, F]), $ = h(() => o(I), [I]);
|
|
135
|
-
return /* @__PURE__ */ d(l, { children: [Z, /* @__PURE__ */ u(x, {
|
|
136
|
-
root: Q,
|
|
137
|
-
children: /* @__PURE__ */ u(y, { children: L && /* @__PURE__ */ u("div", {
|
|
138
|
-
ref: q.setFloating,
|
|
139
|
-
...X(),
|
|
140
|
-
style: J,
|
|
141
|
-
children: /* @__PURE__ */ u(b.div, {
|
|
142
|
-
...n,
|
|
143
|
-
children: /* @__PURE__ */ d("div", {
|
|
144
|
-
className: O.dropdown__panel,
|
|
145
|
-
style: {
|
|
146
|
-
...$,
|
|
147
|
-
...N
|
|
148
|
-
},
|
|
149
|
-
children: [E && /* @__PURE__ */ u("div", {
|
|
150
|
-
className: O.dropdown__search,
|
|
151
|
-
children: /* @__PURE__ */ u(r, {
|
|
152
|
-
value: z,
|
|
153
|
-
onChange: W,
|
|
154
|
-
searchPlaceholder: k
|
|
155
|
-
})
|
|
156
|
-
}), /* @__PURE__ */ u(e, {
|
|
157
|
-
style: { maxHeight: 300 },
|
|
158
|
-
children: /* @__PURE__ */ u(A, {
|
|
159
|
-
menus: G,
|
|
160
|
-
onClick: U,
|
|
161
|
-
hasNoResults: K,
|
|
162
|
-
activeKey: P
|
|
163
|
-
})
|
|
164
|
-
})]
|
|
165
|
-
})
|
|
166
|
-
})
|
|
167
|
-
}) })
|
|
168
|
-
})] });
|
|
169
|
-
};
|
|
170
|
-
j.displayName = "BsyDropDown";
|
|
171
|
-
//#endregion
|
|
172
|
-
export { j as t };
|