@baishuyun/ui-base 6.7.3 → 6.8.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.
- package/dist/Amap/AmapCircle/index.js +1 -1
- package/dist/Amap/AmapMarker/index.js +1 -1
- package/dist/Amap/AmapMarkerCluster/index.js +1 -1
- package/dist/Amap/AmapProvider/index.js +4 -4
- package/dist/Amap/{AmapProvider-DSjQj2oA.js → AmapProvider-Cwi6WOe0.js} +1 -1
- package/dist/Amap/hooks/index.js +1 -1
- package/dist/Amap/index.js +4 -4
- package/dist/Calendar/{Calendar-C2iO_3cX.js → Calendar-DnQrN8KB.js} +2 -2
- package/dist/Calendar/context/index.js +1 -1
- package/dist/Calendar/index.js +5 -5
- package/dist/Calendar/subcomponents/AllDaySection/index.js +1 -1
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +1 -1
- package/dist/Calendar/subcomponents/EventCard/index.js +1 -1
- package/dist/Calendar/subcomponents/TimeAxis/index.js +1 -1
- package/dist/Calendar/subcomponents/TimeGrid/index.js +1 -1
- package/dist/Calendar/utils/index.js +1 -1
- package/dist/Calendar/utils/layout/index.js +1 -1
- package/dist/Calendar/utils/theme/index.js +1 -1
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/{ColorPicker-BtTIb9tX.js → ColorPicker-CL57cSDG.js} +2 -1
- package/dist/ColorPicker/index.js +4 -4
- package/dist/ConfigProvider/index.js +3 -3
- package/dist/DatePicker/{DatePicker-BMTK0Phw.js → DatePicker-C0XbZmrZ.js} +2 -2
- package/dist/DatePicker/{DatePickerPanel-BH_Z4e88.js → DatePickerPanel-BEn16cat.js} +3 -3
- package/dist/DatePicker/index.js +4 -4
- package/dist/DatePicker/style/index.js +1 -1
- package/dist/DropDown/{DropDown-CdTjlySd.js → DropDown-yDH9V_9Y.js} +2 -2
- package/dist/DropDown/index.js +5 -5
- package/dist/DropDown/style/index.js +1 -1
- package/dist/Editor/{Buttons-BcP66z6E.js → Buttons-BivKInBV.js} +144 -124
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +7 -7
- package/dist/Editor/constants/index.js +1 -1
- package/dist/Editor/index.js +274 -164
- package/dist/Gantt/GanttChart/index.js +7 -7
- package/dist/Gantt/{GanttChart-BYzMKcZ2.js → GanttChart-CDw1IQ4F.js} +2 -2
- package/dist/Gantt/GanttTable/index.js +5 -5
- package/dist/Gantt/{GanttTable-DqJziqML.js → GanttTable-xbXD_PWI.js} +1 -1
- package/dist/Gantt/GanttToolBar/index.js +6 -6
- package/dist/Gantt/{GanttToolBar-C50n7PD9.js → GanttToolBar-BTeTsR6Z.js} +2 -2
- package/dist/Gantt/index.js +9 -9
- package/dist/Gantt/utils/index.js +1 -1
- package/dist/Gantt/utils/theme/index.js +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/InputTag-hzCCJQ1z.js +144 -0
- package/dist/InputTag/index.js +4 -2
- package/dist/Loading/Loading-DiywS7ex.js +19 -0
- package/dist/Loading/index.js +4 -2
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/{Radio-DSoZotcs.js → Radio-CX9cUqb7.js} +12 -12
- package/dist/Radio/index.js +2 -2
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-DujgkkUp.js → Select-D6EK7whJ.js} +195 -194
- package/dist/Select/{SelectInputSearch-Bikrj3FI.js → SelectInputSearch-COUzreau.js} +1 -1
- package/dist/Select/index.js +7 -7
- package/dist/Table/{Table-k9wdWm6V.js → Table-yQXQEk6d.js} +1 -1
- package/dist/Table/hooks/index.js +1 -1
- package/dist/Table/index.js +4 -4
- package/dist/Table/style/index.js +1 -1
- package/dist/Table/utils/index.js +1 -1
- package/dist/Tabs/Tabs-BiKW70CL.js +398 -0
- package/dist/Tabs/index.js +4 -2
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +3 -3
- package/dist/Tree/utils/index.js +1 -1
- package/dist/components/DropDown/interface.d.ts +167 -169
- package/dist/components/Editor/LengthBadge.d.ts +6 -0
- package/dist/components/Editor/ToolbarPlugin/BaseButton/BaseButton.d.ts +1 -1
- package/dist/components/Editor/ToolbarPlugin/ToolbarPlugin.d.ts +5 -1
- package/dist/components/Editor/ToolbarPlugin/context/EditorToolbarThemeContext.d.ts +6 -0
- package/dist/components/Editor/ToolbarPlugin/interface.d.ts +30 -32
- package/dist/components/Editor/index.d.ts +1 -1
- package/dist/components/Editor/interface.d.ts +118 -60
- package/dist/components/Editor/plugins/MaxLengthPlugin.d.ts +7 -0
- package/dist/components/Editor/utils/resolveEditorToolbarThemeVars.d.ts +5 -0
- package/dist/components/Editor/utils/textLength.d.ts +4 -0
- package/dist/components/InputTag/interface.d.ts +32 -32
- package/dist/components/Radio/interface.d.ts +95 -97
- package/dist/components/Tabs/TabSelect/interface.d.ts +23 -25
- package/dist/components/Tabs/interface.d.ts +58 -60
- package/dist/components/Tree/types/node.d.ts +19 -19
- package/dist/components/Tree/types/tree.d.ts +81 -83
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +18 -18
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/lang/en-US.json.d.ts +177 -166
- package/dist/locale/lang/zh-CN.json.d.ts +177 -166
- package/dist/locale/lang/zh-TW.json.d.ts +177 -166
- package/dist/style.css +1 -1
- package/dist/vendors/{ConfigProvider-C3Uwzinj.js → ConfigProvider-DxrZpdIb.js} +23 -1
- package/dist/vendors/{LocaleContext-B1HuhJc-.js → LocaleContext-Dcw6C1LX.js} +11 -0
- package/dist/vendors/{Tree-DQkpLl6f.js → Tree-DXmVRDn0.js} +8 -7
- package/dist/vendors/{useLocale-BYtF5pxt.js → useLocale-BKZX2_zw.js} +1 -1
- package/dist/vendors/{version-Dkos5Cha.js → version-4HBYLKDL.js} +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/dist/vitest-matchers.d.ts +0 -1
- package/package.json +8 -8
- package/dist/InputTag/InputTag-LnUqz0Hz.js +0 -143
- package/dist/Loading/Loading-CcTZogVx.js +0 -15
- package/dist/Tabs/Tabs-Ctgg45Ox.js +0 -410
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../Icon/Icon-BBDcb-yw.js";
|
|
2
|
-
import { t } from "../vendors/useLocale-
|
|
2
|
+
import { t } from "../vendors/useLocale-BKZX2_zw.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,15 +1,15 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-4HBYLKDL.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import "../Icon/Icon-BBDcb-yw.js";
|
|
4
|
-
import "../vendors/LocaleContext-
|
|
5
|
-
import "../vendors/useLocale-
|
|
4
|
+
import "../vendors/LocaleContext-Dcw6C1LX.js";
|
|
5
|
+
import "../vendors/useLocale-BKZX2_zw.js";
|
|
6
6
|
import "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
7
|
-
import { n as e, r as t, t as n } from "./Select-
|
|
8
|
-
import "./SelectInputSearch-
|
|
9
|
-
import "../vendors/Tree-
|
|
7
|
+
import { n as e, r as t, t as n } from "./Select-D6EK7whJ.js";
|
|
8
|
+
import "./SelectInputSearch-COUzreau.js";
|
|
9
|
+
import "../vendors/Tree-DXmVRDn0.js";
|
|
10
10
|
import "../CheckBox/CheckBox-ByWSy9Yr.js";
|
|
11
11
|
import "../CheckBox/CheckBox-nBm0u6zX.js";
|
|
12
|
-
import "../Radio/Radio-
|
|
12
|
+
import "../Radio/Radio-CX9cUqb7.js";
|
|
13
13
|
import "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
|
|
14
14
|
import "../ScrollBar/ScrollBar-QhXVe8zd.js";
|
|
15
15
|
import "../vendors/useFloatingPortal-CmVJbuRm.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../vendors/useLocale-
|
|
1
|
+
import { t as e } from "../vendors/useLocale-BKZX2_zw.js";
|
|
2
2
|
import { n as t, o as n, t as r } from "./constants-kRpjsoet.js";
|
|
3
3
|
import { c as i, f as a, i as o, l as s, o as c, r as l, s as u, t as d, u as f } from "./processRowspan-B0WELhG2.js";
|
|
4
4
|
import { n as p, t as m } from "./hooks-BceUZQQm.js";
|
package/dist/Table/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-4HBYLKDL.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
|
-
import "../vendors/LocaleContext-
|
|
4
|
-
import "../vendors/useLocale-
|
|
3
|
+
import "../vendors/LocaleContext-Dcw6C1LX.js";
|
|
4
|
+
import "../vendors/useLocale-BKZX2_zw.js";
|
|
5
5
|
import { a as e, n as t, t as n } from "./constants-kRpjsoet.js";
|
|
6
6
|
import { a as r, c as i, d as a, f as o, n as s, o as c, r as l, t as u, u as d } from "./processRowspan-B0WELhG2.js";
|
|
7
|
-
import { n as f, t as p } from "./Table-
|
|
7
|
+
import { n as f, t as p } from "./Table-yQXQEk6d.js";
|
|
8
8
|
import { n as m, t as h } from "./hooks-BceUZQQm.js";
|
|
9
9
|
import { t as g } from "./style-DgiPEsSp.js";
|
|
10
10
|
export { n as COLUMN_DEFAULTS, t as DEFAULT_CONFIG, e as TABLE_DOM, p as Table, p as default, f as TableBody, r as calculateFixedOffset, c as expandLeafColumns, u as getCellRowspan, i as getColumnsWidth, d as getRowKey, s as processRowspan, g as resolveTableThemeVars, l as shouldRenderCell, a as sortData, o as splitFixedColumns, h as useColumnResize, m as useTableVirtual };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../../vendors/version-
|
|
1
|
+
import "../../vendors/version-4HBYLKDL.js";
|
|
2
2
|
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../processRowspan-B0WELhG2.js";
|
|
3
3
|
export { e as calculateFixedOffset, s as expandLeafColumns, l as findFlatColumnIndex, i as flattenColumns, u as getCellRowspan, t as getColumnsWidth, a as getFixedStickyStyle, d as getRowKey, o as processRowspan, c as shouldRenderCell, n as sortData, r as splitFixedColumns };
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import { t as e } from "../Icon/Icon-BBDcb-yw.js";
|
|
2
|
+
import { t } from "../vendors/useLocale-BKZX2_zw.js";
|
|
3
|
+
import { n } from "../vendors/color-D6XBXROa.js";
|
|
4
|
+
import { n as r } from "../vendors/animations-rwUbyoT0.js";
|
|
5
|
+
import { t as i } from "../vendors/useFloatingPortal-CmVJbuRm.js";
|
|
6
|
+
import { isString as a } from "lodash-es";
|
|
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, useMemo as p, useRef as m, useState as h } from "react";
|
|
9
|
+
import g from "clsx";
|
|
10
|
+
import { useControllableValue as _, useEventListener as v, useMutationObserver as y, useToggle as b } from "ahooks";
|
|
11
|
+
import { AnimatePresence as x, motion as S } from "motion/react";
|
|
12
|
+
import { FloatingPortal as C } from "@floating-ui/react";
|
|
13
|
+
//#region src/components/Tabs/constants.ts
|
|
14
|
+
var w = {
|
|
15
|
+
LINE: "line",
|
|
16
|
+
CARD: "card",
|
|
17
|
+
FILLED_CARD: "filled-card",
|
|
18
|
+
BADGE_CARD: "badge-card"
|
|
19
|
+
}, T = l({
|
|
20
|
+
color: "#0269ff",
|
|
21
|
+
type: w.LINE
|
|
22
|
+
}), E = "_active_1oc43_18", D = "_disabled_1oc43_26", O = "_line_1oc43_44", k = "_card_1oc43_53", A = {
|
|
23
|
+
"bsy-tab": "_bsy-tab_1oc43_1",
|
|
24
|
+
"badge-card": "_badge-card_1oc43_9",
|
|
25
|
+
active: E,
|
|
26
|
+
disabled: D,
|
|
27
|
+
line: O,
|
|
28
|
+
card: k,
|
|
29
|
+
"filled-card": "_filled-card_1oc43_78"
|
|
30
|
+
}, j = (e, t = 24) => e.length <= t ? e : e.slice(0, t) + "...", M = (e) => typeof e == "string" ? j(e) : e, N = ({ label: e, active: t = !1, onClick: r, tabKey: i }) => {
|
|
31
|
+
let { type: o = w.LINE, disabled: c, color: l } = d(T), u = a(e) ? e : "", f = () => {
|
|
32
|
+
c || r?.(i);
|
|
33
|
+
}, p = {
|
|
34
|
+
"data-tab-item": !0,
|
|
35
|
+
"data-tab-key": i,
|
|
36
|
+
role: "tab",
|
|
37
|
+
"aria-selected": t,
|
|
38
|
+
"aria-controls": `panel-${i}`,
|
|
39
|
+
onClick: f
|
|
40
|
+
};
|
|
41
|
+
return o === w.LINE ? /* @__PURE__ */ s("div", {
|
|
42
|
+
...p,
|
|
43
|
+
className: g(A["bsy-tab"], A.line, {
|
|
44
|
+
[A.disabled]: c,
|
|
45
|
+
[A.active]: t
|
|
46
|
+
}),
|
|
47
|
+
title: u,
|
|
48
|
+
children: M(e)
|
|
49
|
+
}) : o === w.CARD ? /* @__PURE__ */ s("div", {
|
|
50
|
+
...p,
|
|
51
|
+
className: g(A["bsy-tab"], A.card, {
|
|
52
|
+
[A.active]: t,
|
|
53
|
+
[A.disabled]: c
|
|
54
|
+
}),
|
|
55
|
+
title: u,
|
|
56
|
+
style: { "--theme-bg-color": n(l, .1) },
|
|
57
|
+
children: /* @__PURE__ */ s("span", { children: M(e) })
|
|
58
|
+
}) : o === w.FILLED_CARD ? /* @__PURE__ */ s("div", {
|
|
59
|
+
...p,
|
|
60
|
+
className: g(A["bsy-tab"], A["filled-card"], {
|
|
61
|
+
[A.active]: t,
|
|
62
|
+
[A.disabled]: c
|
|
63
|
+
}),
|
|
64
|
+
title: u,
|
|
65
|
+
children: M(e)
|
|
66
|
+
}) : o === w.BADGE_CARD ? /* @__PURE__ */ s("div", {
|
|
67
|
+
...p,
|
|
68
|
+
className: g(A["bsy-tab"], A["badge-card"], {
|
|
69
|
+
[A.active]: t,
|
|
70
|
+
[A.disabled]: c
|
|
71
|
+
}),
|
|
72
|
+
title: u,
|
|
73
|
+
children: /* @__PURE__ */ s("span", { children: M(e) })
|
|
74
|
+
}) : null;
|
|
75
|
+
};
|
|
76
|
+
N.displayName = "BsyTab";
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/Tabs/TabList/useTabScroll.ts
|
|
79
|
+
var P = ({ disabled: e, children: t }) => {
|
|
80
|
+
let n = m(null), r = m(null), [i, a] = h(!1), [o, s] = h(!1), [c, l] = h(!1), [d, p] = h(0), g = u(() => {
|
|
81
|
+
let e = n.current, t = r.current;
|
|
82
|
+
if (!e || !t) return;
|
|
83
|
+
let i = e.clientWidth, o = t.scrollWidth, c = o > i;
|
|
84
|
+
a(c), c ? (s(d < 0), l(d > -(o - i))) : (s(!1), l(!1), p(0));
|
|
85
|
+
}, [d]);
|
|
86
|
+
return v("resize", () => g()), f(() => {
|
|
87
|
+
g();
|
|
88
|
+
}, [
|
|
89
|
+
d,
|
|
90
|
+
t,
|
|
91
|
+
g
|
|
92
|
+
]), {
|
|
93
|
+
listRef: n,
|
|
94
|
+
wrapperRef: r,
|
|
95
|
+
showControls: i,
|
|
96
|
+
canScrollLeft: o,
|
|
97
|
+
canScrollRight: c,
|
|
98
|
+
translateX: d,
|
|
99
|
+
scrollLeft: () => {
|
|
100
|
+
if (!o || e) return;
|
|
101
|
+
let t = n.current;
|
|
102
|
+
if (!t) return;
|
|
103
|
+
let r = t.clientWidth * .6;
|
|
104
|
+
p(Math.min(0, d + r));
|
|
105
|
+
},
|
|
106
|
+
scrollRight: () => {
|
|
107
|
+
if (!c || e) return;
|
|
108
|
+
let t = n.current, i = r.current;
|
|
109
|
+
if (!t || !i) return;
|
|
110
|
+
let a = t.clientWidth * .6, o = t.clientWidth, s = -(i.scrollWidth - o);
|
|
111
|
+
p(Math.max(s, d - a));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}, F = ({ activeKey: e, type: t, showIndicator: n, wrapperRef: r, items: i }) => {
|
|
115
|
+
let [a, o] = h({
|
|
116
|
+
width: 0,
|
|
117
|
+
left: 0,
|
|
118
|
+
ready: !1
|
|
119
|
+
}), s = u((e) => {
|
|
120
|
+
if (!n || !r.current) return;
|
|
121
|
+
let t = r.current.getBoundingClientRect(), i = e.getBoundingClientRect(), a = i.left - t.left, s = i.width;
|
|
122
|
+
o({
|
|
123
|
+
width: s,
|
|
124
|
+
left: a,
|
|
125
|
+
ready: !0
|
|
126
|
+
});
|
|
127
|
+
}, [n, r]);
|
|
128
|
+
return f(() => {
|
|
129
|
+
if (!e || !r.current) return;
|
|
130
|
+
let t = r.current.querySelector(`[data-tab-key="${e}"]`);
|
|
131
|
+
t && n && s(t);
|
|
132
|
+
}, [
|
|
133
|
+
e,
|
|
134
|
+
n,
|
|
135
|
+
r,
|
|
136
|
+
s,
|
|
137
|
+
t,
|
|
138
|
+
i
|
|
139
|
+
]), y(() => {
|
|
140
|
+
if (!n) return;
|
|
141
|
+
let e = r.current?.querySelector("[aria-selected=\"true\"]");
|
|
142
|
+
e && s(e);
|
|
143
|
+
}, r, {
|
|
144
|
+
subtree: !0,
|
|
145
|
+
characterData: !0
|
|
146
|
+
}), {
|
|
147
|
+
indicatorStyle: a,
|
|
148
|
+
handleTabClick: (e) => {
|
|
149
|
+
s(e);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}, I = ({ children: e, activeKey: n, className: r, style: i, items: a }) => {
|
|
153
|
+
let { t: o } = t(), { type: l = w.LINE, color: u, disabled: f } = d(T), p = [w.LINE, w.CARD].includes(l), { listRef: m, wrapperRef: h, showControls: _, canScrollLeft: v, canScrollRight: y, translateX: b, scrollLeft: x, scrollRight: S } = P({
|
|
154
|
+
disabled: f,
|
|
155
|
+
children: e
|
|
156
|
+
}), { indicatorStyle: C, handleTabClick: E } = F({
|
|
157
|
+
activeKey: n,
|
|
158
|
+
type: l,
|
|
159
|
+
showIndicator: p,
|
|
160
|
+
wrapperRef: h,
|
|
161
|
+
items: a
|
|
162
|
+
}), D = C.ready, O = (e) => {
|
|
163
|
+
if (f) return;
|
|
164
|
+
let t = e.target.closest("[data-tab-item]");
|
|
165
|
+
t && E(t);
|
|
166
|
+
};
|
|
167
|
+
return /* @__PURE__ */ c("div", {
|
|
168
|
+
className: g("relative max-h-[36px]", r),
|
|
169
|
+
style: i,
|
|
170
|
+
children: [
|
|
171
|
+
_ && /* @__PURE__ */ s("button", {
|
|
172
|
+
className: g("absolute left-0 top-0 bottom-0 z-10 w-8 flex items-center justify-center", {
|
|
173
|
+
"text-gray-400 cursor-not-allowed": !v || f,
|
|
174
|
+
"text-gray-600": v && !f
|
|
175
|
+
}),
|
|
176
|
+
onClick: x,
|
|
177
|
+
disabled: !v || f,
|
|
178
|
+
"aria-label": o("tabs.scrollPrev"),
|
|
179
|
+
children: /* @__PURE__ */ s("svg", {
|
|
180
|
+
className: "w-4 h-4",
|
|
181
|
+
fill: "none",
|
|
182
|
+
stroke: "currentColor",
|
|
183
|
+
viewBox: "0 0 24 24",
|
|
184
|
+
children: /* @__PURE__ */ s("path", {
|
|
185
|
+
strokeLinecap: "round",
|
|
186
|
+
strokeLinejoin: "round",
|
|
187
|
+
strokeWidth: 2,
|
|
188
|
+
d: "M15 19l-7-7 7-7"
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ s("div", {
|
|
193
|
+
className: g({
|
|
194
|
+
"pl-8": _,
|
|
195
|
+
"pr-8": _
|
|
196
|
+
}),
|
|
197
|
+
children: /* @__PURE__ */ s("div", {
|
|
198
|
+
ref: m,
|
|
199
|
+
className: g("overflow-hidden", {
|
|
200
|
+
"border-b border-[#e0e0e0]": l === w.LINE,
|
|
201
|
+
"border-b-2": l === w.FILLED_CARD || l === w.BADGE_CARD,
|
|
202
|
+
"pb-[2px]": l === w.BADGE_CARD
|
|
203
|
+
}),
|
|
204
|
+
style: { borderColor: l === w.LINE ? void 0 : u },
|
|
205
|
+
children: /* @__PURE__ */ c("div", {
|
|
206
|
+
ref: h,
|
|
207
|
+
role: "tablist",
|
|
208
|
+
className: g("relative text-sm flex flex-nowrap", {
|
|
209
|
+
"gap-x-[26px]": l === w.LINE,
|
|
210
|
+
"gap-x-[10px]": l === w.FILLED_CARD || l === w.BADGE_CARD,
|
|
211
|
+
"bg-[#f0f0f0]": l === w.CARD
|
|
212
|
+
}),
|
|
213
|
+
onClick: O,
|
|
214
|
+
style: {
|
|
215
|
+
"--theme-color": u,
|
|
216
|
+
transform: `translateX(${b}px)`,
|
|
217
|
+
transition: "transform 0.3s ease-in-out"
|
|
218
|
+
},
|
|
219
|
+
children: [e, p && C.ready && /* @__PURE__ */ s("div", {
|
|
220
|
+
className: g("absolute h-0.5", {
|
|
221
|
+
"bottom-0": l === w.LINE,
|
|
222
|
+
"top-0": l === w.CARD,
|
|
223
|
+
"transition-all duration-300 ease-in-out": D
|
|
224
|
+
}),
|
|
225
|
+
style: {
|
|
226
|
+
backgroundColor: u,
|
|
227
|
+
width: `${C.width}px`,
|
|
228
|
+
left: `${C.left}px`
|
|
229
|
+
}
|
|
230
|
+
})]
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
}),
|
|
234
|
+
_ && /* @__PURE__ */ s("button", {
|
|
235
|
+
className: g("absolute right-0 top-0 bottom-0 z-10 w-8 flex items-center justify-center", {
|
|
236
|
+
"text-gray-400 cursor-not-allowed": !y || f,
|
|
237
|
+
"text-gray-600": y && !f
|
|
238
|
+
}),
|
|
239
|
+
onClick: S,
|
|
240
|
+
disabled: !y || f,
|
|
241
|
+
"aria-label": o("tabs.scrollNext"),
|
|
242
|
+
children: /* @__PURE__ */ s("svg", {
|
|
243
|
+
className: "w-4 h-4",
|
|
244
|
+
fill: "none",
|
|
245
|
+
stroke: "currentColor",
|
|
246
|
+
viewBox: "0 0 24 24",
|
|
247
|
+
children: /* @__PURE__ */ s("path", {
|
|
248
|
+
strokeLinecap: "round",
|
|
249
|
+
strokeLinejoin: "round",
|
|
250
|
+
strokeWidth: 2,
|
|
251
|
+
d: "M9 5l7 7-7 7"
|
|
252
|
+
})
|
|
253
|
+
})
|
|
254
|
+
})
|
|
255
|
+
]
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
I.displayName = "BsyTabList";
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/components/Tabs/TabPanel/TabPanel.tsx
|
|
261
|
+
var L = ({ items: e, activeKey: t, className: n }) => {
|
|
262
|
+
let r = e.find((e) => e.key === t);
|
|
263
|
+
return !r || !r.children ? null : /* @__PURE__ */ s("div", {
|
|
264
|
+
className: n,
|
|
265
|
+
role: "tabpanel",
|
|
266
|
+
"aria-labelledby": `tab-${t}`,
|
|
267
|
+
children: r.children
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
L.displayName = "BsyTabPanel";
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/components/Tabs/Tabs.tsx
|
|
273
|
+
var R = (e) => {
|
|
274
|
+
let [t, n] = _(e, {
|
|
275
|
+
defaultValuePropName: "defaultActiveKey",
|
|
276
|
+
valuePropName: "activeKey",
|
|
277
|
+
trigger: "onChange"
|
|
278
|
+
}), r = e.items?.some((e) => e.children), i = e.color || "#0265ff";
|
|
279
|
+
return /* @__PURE__ */ s(T.Provider, {
|
|
280
|
+
value: {
|
|
281
|
+
color: i,
|
|
282
|
+
type: e.type,
|
|
283
|
+
disabled: e.disabled
|
|
284
|
+
},
|
|
285
|
+
children: /* @__PURE__ */ c("div", {
|
|
286
|
+
className: "bsy-tabs",
|
|
287
|
+
children: [/* @__PURE__ */ s(I, {
|
|
288
|
+
items: e.items,
|
|
289
|
+
activeKey: t,
|
|
290
|
+
children: e.items?.map((e) => /* @__PURE__ */ s(N, {
|
|
291
|
+
tabKey: e.key,
|
|
292
|
+
label: e.label,
|
|
293
|
+
active: t === e.key,
|
|
294
|
+
onClick: (e) => n(e)
|
|
295
|
+
}, e.key))
|
|
296
|
+
}), r && e.items && /* @__PURE__ */ s(L, {
|
|
297
|
+
items: e.items,
|
|
298
|
+
activeKey: t,
|
|
299
|
+
className: "bsy-tabs__content"
|
|
300
|
+
})]
|
|
301
|
+
})
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
R.displayName = "BsyTabs";
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/components/Tabs/TabSelect/tabSelect.module.scss
|
|
307
|
+
var z = "_active_5a1wn_11", B = "_icon_5a1wn_45", V = {
|
|
308
|
+
"bsy-tabs-select__trigger": "_bsy-tabs-select__trigger_5a1wn_1",
|
|
309
|
+
active: z,
|
|
310
|
+
"bsy-tabs-select__trigger-icon": "_bsy-tabs-select__trigger-icon_5a1wn_14",
|
|
311
|
+
"bsy-tabs-select__trigger-input": "_bsy-tabs-select__trigger-input_5a1wn_17",
|
|
312
|
+
"bsy-tabs-select__panel": "_bsy-tabs-select__panel_5a1wn_21",
|
|
313
|
+
"bsy-tabs-select__panel-item": "_bsy-tabs-select__panel-item_5a1wn_32",
|
|
314
|
+
icon: B
|
|
315
|
+
}, H = (n) => {
|
|
316
|
+
let { color: a = "#0269ff" } = n, { t: l } = t(), [u, { toggle: d, setLeft: f }] = b(!1), { refs: m, floatingStyles: h, getFloatingProps: v, getReferenceProps: y, referenceStyle: T } = i({
|
|
317
|
+
isOpen: u,
|
|
318
|
+
close: f,
|
|
319
|
+
offset: {
|
|
320
|
+
x: 0,
|
|
321
|
+
y: 4
|
|
322
|
+
},
|
|
323
|
+
zIndex: 1e3
|
|
324
|
+
}), [E, D] = _(n, {
|
|
325
|
+
trigger: "onChange",
|
|
326
|
+
defaultValuePropName: "defaultValue",
|
|
327
|
+
valuePropName: "value",
|
|
328
|
+
defaultValue: w.LINE
|
|
329
|
+
}), O = Object.values(w).map((e) => ({
|
|
330
|
+
label: e,
|
|
331
|
+
value: e
|
|
332
|
+
})), k = p(() => [
|
|
333
|
+
{
|
|
334
|
+
label: l("tabs.previewTab1"),
|
|
335
|
+
key: "1"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
label: l("tabs.previewTab2"),
|
|
339
|
+
key: "2"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
label: l("tabs.previewTab3"),
|
|
343
|
+
key: "3"
|
|
344
|
+
}
|
|
345
|
+
], [l]);
|
|
346
|
+
return /* @__PURE__ */ c("div", {
|
|
347
|
+
className: V["bsy-tabs-select"],
|
|
348
|
+
children: [/* @__PURE__ */ c("div", {
|
|
349
|
+
className: g(V["bsy-tabs-select__trigger"], { [V.active]: u }),
|
|
350
|
+
ref: m.setReference,
|
|
351
|
+
...y(),
|
|
352
|
+
style: T,
|
|
353
|
+
onClick: () => d(),
|
|
354
|
+
children: [/* @__PURE__ */ s("div", {
|
|
355
|
+
className: g(V["bsy-tabs-select__trigger-input"], { [V.active]: E }),
|
|
356
|
+
children: E && /* @__PURE__ */ s(R, {
|
|
357
|
+
activeKey: "1",
|
|
358
|
+
type: E,
|
|
359
|
+
color: a,
|
|
360
|
+
disabled: !0,
|
|
361
|
+
items: k
|
|
362
|
+
}, E)
|
|
363
|
+
}), /* @__PURE__ */ s("div", {
|
|
364
|
+
className: V["bsy-tabs-select__trigger-icon"],
|
|
365
|
+
children: /* @__PURE__ */ s(e, {
|
|
366
|
+
name: "arrow-down",
|
|
367
|
+
className: g(V.icon, { active: u })
|
|
368
|
+
})
|
|
369
|
+
})]
|
|
370
|
+
}), /* @__PURE__ */ s(C, { children: /* @__PURE__ */ s(x, { children: u && /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s("div", {
|
|
371
|
+
ref: m.setFloating,
|
|
372
|
+
style: h,
|
|
373
|
+
...v(),
|
|
374
|
+
children: /* @__PURE__ */ s(S.div, {
|
|
375
|
+
...r,
|
|
376
|
+
children: /* @__PURE__ */ s("div", {
|
|
377
|
+
className: V["bsy-tabs-select__panel"],
|
|
378
|
+
children: O.map((e) => /* @__PURE__ */ s("div", {
|
|
379
|
+
className: g(V["bsy-tabs-select__panel-item"], { [V.active]: E === e.value }),
|
|
380
|
+
onClick: () => {
|
|
381
|
+
D(e.value), f();
|
|
382
|
+
},
|
|
383
|
+
children: /* @__PURE__ */ s(R, {
|
|
384
|
+
activeKey: "1",
|
|
385
|
+
type: e.value,
|
|
386
|
+
disabled: !0,
|
|
387
|
+
color: a,
|
|
388
|
+
items: k
|
|
389
|
+
}, e.value)
|
|
390
|
+
}, e.value))
|
|
391
|
+
})
|
|
392
|
+
})
|
|
393
|
+
}) }) }) })]
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
H.displayName = "BsyTabSelect";
|
|
397
|
+
//#endregion
|
|
398
|
+
export { w as i, R as n, L as r, H as t };
|
package/dist/Tabs/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-4HBYLKDL.js";
|
|
2
2
|
import "../Icon/Icon-BBDcb-yw.js";
|
|
3
|
+
import "../vendors/LocaleContext-Dcw6C1LX.js";
|
|
4
|
+
import "../vendors/useLocale-BKZX2_zw.js";
|
|
3
5
|
import "../vendors/color-D6XBXROa.js";
|
|
4
6
|
import "../vendors/useFloatingPortal-CmVJbuRm.js";
|
|
5
|
-
import { i as e, n as t, r as n, t as r } from "./Tabs-
|
|
7
|
+
import { i as e, n as t, r as n, t as r } from "./Tabs-BiKW70CL.js";
|
|
6
8
|
export { e as TABS_TYPE, n as TabPanel, r as TabSelect, t as default };
|
package/dist/Tooltip/index.js
CHANGED
package/dist/Tree/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-4HBYLKDL.js";
|
|
2
2
|
import "../Icon/Icon-BBDcb-yw.js";
|
|
3
|
-
import { t as e } from "../vendors/Tree-
|
|
3
|
+
import { t as e } from "../vendors/Tree-DXmVRDn0.js";
|
|
4
4
|
import "../CheckBox/CheckBox-ByWSy9Yr.js";
|
|
5
|
-
import "../Radio/Radio-
|
|
5
|
+
import "../Radio/Radio-CX9cUqb7.js";
|
|
6
6
|
export { e as Tree };
|
package/dist/Tree/utils/index.js
CHANGED