@baishuyun/ui-base 6.4.2 → 6.5.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/Amap/{Amap-DL5dLiUm.js → Amap-Dnvu_pUP.js} +1 -1
- package/dist/Amap/AmapCircle/index.js +3 -3
- package/dist/Amap/{AmapCircle-mh92P2l6.js → AmapCircle-Wfn43qco.js} +1 -1
- package/dist/Amap/AmapMarker/index.js +4 -4
- package/dist/Amap/{AmapMarker-DYW0-8Hd.js → AmapMarker-CB66dQIG.js} +2 -2
- package/dist/Amap/AmapMarkerCluster/index.js +4 -4
- package/dist/Amap/{AmapMarkerCluster-BRVHHMbi.js → AmapMarkerCluster-DvXchCC0.js} +2 -2
- package/dist/Amap/AmapProvider/index.js +4 -4
- package/dist/Amap/{AmapProvider-CwKdpmCg.js → AmapProvider-XCrqzo9W.js} +2 -2
- package/dist/Amap/hooks/index.js +2 -2
- package/dist/Amap/{hooks-D1m8KgVM.js → hooks-DwRvpafb.js} +1 -1
- package/dist/Amap/index.js +10 -10
- package/dist/Calendar/{AllDaySection-CseF1DuB.js → AllDaySection-M-b9tRHh.js} +4 -4
- package/dist/Calendar/{Calendar-Yu2HfA5D.js → Calendar-C9PhASp0.js} +13 -13
- package/dist/Calendar/{CurrentTimeIndicator-CUeblc9r.js → CurrentTimeIndicator-Dpi36eVJ.js} +1 -1
- package/dist/Calendar/{EventCard-L6jaKgEw.js → EventCard-BIfRqCk5.js} +3 -3
- package/dist/Calendar/{TimeGrid-B8lvUb1W.js → TimeGrid-Dk3soSo4.js} +2 -2
- package/dist/Calendar/context/index.js +1 -1
- package/dist/Calendar/index.js +19 -19
- package/dist/Calendar/subcomponents/AllDaySection/index.js +7 -7
- 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 +3 -3
- package/dist/Calendar/{theme-BzNDRi0U.js → theme-Cgn0zQoC.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/Card/{Card-CRrtIjNT.js → Card-BjWdQRjq.js} +1 -1
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/{CheckBox-DIunYcfS.js → CheckBox-81R8QKHb.js} +1 -1
- package/dist/CheckBox/{CheckBox-CkVe5Boq.js → CheckBox-ejvbDr-a.js} +1 -1
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/{ColorPicker-By-Y8Tyz.js → ColorPicker-aj57lMA5.js} +5 -5
- package/dist/ColorPicker/index.js +6 -6
- package/dist/ConfigProvider/index.js +2 -2
- package/dist/DatePicker/{DatePicker-PCdNachD.js → DatePicker-EIFyC9zF.js} +6 -6
- package/dist/DatePicker/{DatePickerPanel-HoxXteK0.js → DatePickerPanel-BjnLfncu.js} +5 -5
- package/dist/DatePicker/index.js +7 -7
- package/dist/DatePicker/style/index.js +1 -1
- package/dist/DatePicker/{style-DZaSSoNs.js → style-BxWyBhZ3.js} +1 -1
- package/dist/DropDown/DropDown-B34vfoOs.js +172 -0
- package/dist/DropDown/index.js +8 -7
- package/dist/DropDown/style/index.js +2 -0
- package/dist/DropDown/style-4LK6rNHe.js +9 -0
- package/dist/Editor/{Buttons-DmSUkHWl.js → Buttons-Ds6bLmnl.js} +6 -6
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +15 -14
- package/dist/Editor/index.js +15 -14
- package/dist/Gantt/GanttChart/index.js +15 -14
- package/dist/Gantt/{GanttChart-BgDJOyW1.js → GanttChart-CnIWe_wk.js} +672 -590
- package/dist/Gantt/GanttTable/index.js +9 -9
- package/dist/Gantt/{GanttTable-Di_p-0M1.js → GanttTable-C3PLGmKr.js} +20 -19
- package/dist/Gantt/GanttToolBar/index.js +11 -10
- package/dist/Gantt/GanttToolBar-8jPQ9BAG.js +121 -0
- package/dist/Gantt/{collapseKeys-C8139wvy.js → collapseKeys-1N9ci2oJ.js} +2 -2
- package/dist/Gantt/index.js +195 -162
- package/dist/Gantt/theme-C197Dtjy.js +31 -0
- package/dist/Gantt/{timelineViewConfig-BXl2UkN8.js → timelineViewConfig-Dl3AXO45.js} +1 -1
- package/dist/Gantt/utils/index.js +5 -5
- package/dist/Gantt/utils/theme/index.js +2 -0
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/InputTag-CGQ5dXyf.js +143 -0
- package/dist/InputTag/index.js +3 -2
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/{Modal-D3LFqIV4.js → Modal-GGHNlZv3.js} +1 -1
- package/dist/Modal/index.js +2 -2
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/ScrollBar-CSGBOE3e.js +68 -0
- package/dist/ScrollBar/index.js +2 -0
- package/dist/Segmented/{Segmented-BTW445jc.js → Segmented-CzVKrL6o.js} +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-OjCjCogR.js → Select-B0r9VgF6.js} +199 -200
- package/dist/Select/{SelectInputSearch-DXPTGSc2.js → SelectInputSearch-BDwg-Noi.js} +2 -2
- package/dist/Select/index.js +12 -11
- package/dist/Table/Table-BtH9Oa14.js +545 -0
- package/dist/Table/hooks/index.js +1 -1
- package/dist/Table/{hooks-CJ2CnSep.js → hooks-DK8Pf7iH.js} +1 -1
- package/dist/Table/index.js +8 -7
- package/dist/Table/{processRowspan-BCzfI5un.js → processRowspan-D4uv6zLk.js} +1 -1
- package/dist/Table/style/index.js +2 -0
- package/dist/Table/style-BwcnT2ee.js +9 -0
- package/dist/Table/utils/index.js +1 -1
- package/dist/Tabs/{Tabs-DVQcB3YG.js → Tabs-7wEcxUv6.js} +4 -4
- package/dist/Tabs/index.js +4 -4
- package/dist/Tooltip/{Tooltip-DW_XP13m.js → Tooltip-B_SZOy6k.js} +41 -44
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +4 -4
- package/dist/components/DropDown/index.d.ts +1 -0
- package/dist/components/DropDown/interface.d.ts +45 -0
- package/dist/components/DropDown/style/__tests__/resolveDropDownThemeVars.test.d.ts +1 -0
- package/dist/components/DropDown/style/index.d.ts +1 -0
- package/dist/components/DropDown/style/resolveDropDownThemeVars.d.ts +2 -0
- package/dist/components/Gantt/Gantt.d.ts +1 -1
- package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +1 -1
- package/dist/components/Gantt/GanttTable/GanttTable.d.ts +1 -1
- package/dist/components/Gantt/GanttThemeContext.d.ts +3 -0
- package/dist/components/Gantt/index.d.ts +2 -1
- package/dist/components/Gantt/interface.d.ts +39 -0
- package/dist/components/Gantt/internal/GanttLayout.d.ts +1 -1
- package/dist/components/Gantt/types.internal.d.ts +2 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttTheme.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttThemeVars.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveTableThemeFromGantt.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/index.d.ts +3 -0
- package/dist/components/Gantt/utils/theme/resolveGanttTheme.d.ts +3 -0
- package/dist/components/Gantt/utils/theme/resolveGanttThemeVars.d.ts +5 -0
- package/dist/components/Gantt/utils/theme/resolveTableThemeFromGantt.d.ts +4 -0
- package/dist/components/ScrollBar/ScrollBar.d.ts +3 -0
- package/dist/components/ScrollBar/__tests__/ScrollBar.test.d.ts +1 -0
- package/dist/components/ScrollBar/index.d.ts +3 -0
- package/dist/components/ScrollBar/interface.d.ts +23 -0
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/interface.d.ts +17 -0
- package/dist/components/Table/style/__tests__/resolveTableThemeVars.test.d.ts +1 -0
- package/dist/components/Table/style/index.d.ts +1 -0
- package/dist/components/Table/style/resolveTableThemeVars.d.ts +3 -0
- package/dist/components/index.d.ts +5 -2
- package/dist/index.js +50 -47
- package/dist/style.css +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -0
- package/dist/vendors/{ConfigProvider-DwmA94S2.js → ConfigProvider-AQTr7T_c.js} +1 -1
- package/dist/vendors/{Tree-C7BgkjCQ.js → Tree-DqnOGJtB.js} +3 -3
- package/dist/vendors/mergeRefs-TiJ0xjUN.js +9 -0
- package/dist/vendors/{useLocale-BTz4slNW.js → useLocale-DZ8XW2VL.js} +1 -1
- package/package.json +1 -2
- package/dist/DropDown/DropDown-CvQAbsEo.js +0 -168
- package/dist/Gantt/GanttToolBar-D5pQdrzv.js +0 -105
- package/dist/InputTag/InputTag-zP5QdId7.js +0 -139
- package/dist/Table/Table-3-kFIm5v.js +0 -543
- /package/dist/Amap/{AmapContext-JaYk1a3H.js → AmapContext-CFmsMycg.js} +0 -0
- /package/dist/Amap/{useMarkerInfoWindowController-CRgf2I0Q.js → useMarkerInfoWindowController-G-Bg-NDJ.js} +0 -0
- /package/dist/Calendar/{TimeAxis-cK2_3FeM.js → TimeAxis-Chwxo6Yj.js} +0 -0
- /package/dist/Calendar/{colorUtils-DcpqM3KR.js → colorUtils-FNbm3zBQ.js} +0 -0
- /package/dist/Calendar/{context-DNOJ9LW_.js → context-CzS6P3nk.js} +0 -0
- /package/dist/Calendar/{layout-CaPxiRd-.js → layout-Cb39seCc.js} +0 -0
- /package/dist/DatePicker/{ensureDayjsPlugins-C3aqki6i.js → ensureDayjsPlugins-DxqbKqon.js} +0 -0
- /package/dist/DatePicker/{pickerLocale-VqSP_iIm.js → pickerLocale-CtDOOxxD.js} +0 -0
- /package/dist/Gantt/{GanttHighlightContext-AIpN3-af.js → GanttHighlightContext-CtT98ZnK.js} +0 -0
- /package/dist/Gantt/{columnResize-By_1E48E.js → columnResize-DFe7F98O.js} +0 -0
- /package/dist/Gantt/{constants-D4ur8WRs.js → constants-CrBb5i5p.js} +0 -0
- /package/dist/Gantt/{highlightTarget-DmzCIiQb.js → highlightTarget-DtCe7zto.js} +0 -0
- /package/dist/Icon/{Icon-BQ3Whub2.js → Icon-SQ5tu-yG.js} +0 -0
- /package/dist/Loading/{Loading-WjmzBabh.js → Loading-ho-6d72M.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-7xV-zOG2.js → NotFoundContent-CV9fTylQ.js} +0 -0
- /package/dist/Radio/{Radio-DkrZHoG1.js → Radio-C2zJzZc3.js} +0 -0
- /package/dist/Table/{constants-CKqc9Os_.js → constants-CuBlYZLO.js} +0 -0
- /package/dist/vendors/{LocaleContext-BJdHS0sH.js → LocaleContext-CBcJzvUD.js} +0 -0
- /package/dist/vendors/{animations-BeI8JZp1.js → animations-Mlw78WYo.js} +0 -0
- /package/dist/vendors/{color-BeQo449h.js → color-BQYy0Wgy.js} +0 -0
- /package/dist/vendors/{cssVars-C4BlzyxA.js → cssVars-DoQgQ2CM.js} +0 -0
- /package/dist/vendors/{useFloatingOverlay-3KB88hpZ.js → useFloatingOverlay-WbbHmuT-.js} +0 -0
- /package/dist/vendors/{useFloatingPortal-DsEtsAGW.js → useFloatingPortal-B2SDNV5C.js} +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { t as e } from "../ScrollBar/ScrollBar-CSGBOE3e.js";
|
|
2
|
+
import { t } from "../Icon/Icon-SQ5tu-yG.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback as i, useEffect as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
|
|
5
|
+
import l from "clsx";
|
|
6
|
+
import { useControllableValue as u } from "ahooks";
|
|
7
|
+
import { motion as d } from "motion/react";
|
|
8
|
+
//#region src/components/InputTag/input-tag.module.scss
|
|
9
|
+
var f = {
|
|
10
|
+
"bsy-inputTag": "_bsy-inputTag_46spj_11",
|
|
11
|
+
"bsy-inputTag__container": "_bsy-inputTag__container_46spj_22",
|
|
12
|
+
"bsy-inputTag__inputContainer": "_bsy-inputTag__inputContainer_46spj_27",
|
|
13
|
+
"bsy-inputTag__inputContainer--zeroMargin": "_bsy-inputTag__inputContainer--zeroMargin_46spj_37",
|
|
14
|
+
"bsy-inputTag__input": "_bsy-inputTag__input_46spj_27",
|
|
15
|
+
"scale-in": "_scale-in_46spj_1"
|
|
16
|
+
}, p = {
|
|
17
|
+
GAP: 4,
|
|
18
|
+
OFFSET: 3,
|
|
19
|
+
INPUT_MIN_WIDTH: 80,
|
|
20
|
+
CONTAINER_PADDING: 10,
|
|
21
|
+
INPUT_MARGIN: 4
|
|
22
|
+
}, m = (e, t) => {
|
|
23
|
+
let [n, r] = c(0);
|
|
24
|
+
return o(() => {
|
|
25
|
+
let t = e.current;
|
|
26
|
+
if (!t) return;
|
|
27
|
+
let n = () => {
|
|
28
|
+
let e = t.children, n = 0;
|
|
29
|
+
for (let t = 0; t < e.length; t++) n += e[t].clientWidth;
|
|
30
|
+
let i = Math.max(0, e.length - 1) * p.GAP, a = Math.max(0, n + i + p.OFFSET);
|
|
31
|
+
r((e) => e === a ? e : a);
|
|
32
|
+
};
|
|
33
|
+
n();
|
|
34
|
+
let i = new ResizeObserver(n);
|
|
35
|
+
return i.observe(t), () => {
|
|
36
|
+
i.disconnect();
|
|
37
|
+
};
|
|
38
|
+
}, [t, e]), n;
|
|
39
|
+
}, h = { overflow: {
|
|
40
|
+
x: "scroll",
|
|
41
|
+
y: "hidden"
|
|
42
|
+
} }, g = (g) => {
|
|
43
|
+
let { defaultValue: _, enableActive: v = !1, defaultActiveIndex: y, onActiveIndexChange: b } = g, [x, S] = u(g, { defaultValue: _ || [] }), [C, w] = u(g, {
|
|
44
|
+
valuePropName: "activeIndex",
|
|
45
|
+
trigger: "onActiveIndexChange",
|
|
46
|
+
defaultValue: y
|
|
47
|
+
}), [T, E] = c(""), D = s(null), O = s(null), k = s(null), A = s(!1), j = () => {
|
|
48
|
+
if (O.current && O.current.children.length > 0) {
|
|
49
|
+
let e = O.current.children.length - 1;
|
|
50
|
+
O.current.children[e].scrollIntoView({
|
|
51
|
+
behavior: "smooth",
|
|
52
|
+
block: "nearest",
|
|
53
|
+
inline: "end"
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
a(() => {
|
|
58
|
+
A.current && x.length > 0 && (j(), A.current = !1);
|
|
59
|
+
}, [x.length]);
|
|
60
|
+
let M = (e) => {
|
|
61
|
+
E(e.currentTarget.value);
|
|
62
|
+
}, N = () => {
|
|
63
|
+
let e = T.trim();
|
|
64
|
+
if (e !== "") {
|
|
65
|
+
let t = e;
|
|
66
|
+
A.current = !0, S([...x, t]), E("");
|
|
67
|
+
}
|
|
68
|
+
}, P = (e, t) => {
|
|
69
|
+
if (!v) return;
|
|
70
|
+
let n = C === e ? void 0 : e;
|
|
71
|
+
w(n), b?.(n ?? -1, t);
|
|
72
|
+
}, F = (e) => {
|
|
73
|
+
e.key === "Enter" || e.key === "NumpadEnter" ? N() : e.key === "Backspace" && T === "" && x.length > 0 && S(x.slice(0, -1));
|
|
74
|
+
}, I = (e) => {
|
|
75
|
+
S(x.filter((t, n) => n !== e));
|
|
76
|
+
}, [L, R] = c(0), z = m(O, x.length), B = i(() => {
|
|
77
|
+
if (!D.current || !k.current) return;
|
|
78
|
+
let e = D.current.clientWidth - k.current.clientWidth - p.INPUT_MARGIN - p.CONTAINER_PADDING, t = Math.max(0, e);
|
|
79
|
+
R((e) => e === t ? e : t);
|
|
80
|
+
}, []);
|
|
81
|
+
o(() => {
|
|
82
|
+
if (!D.current || !k.current) return;
|
|
83
|
+
B();
|
|
84
|
+
let e = new ResizeObserver(() => {
|
|
85
|
+
B();
|
|
86
|
+
});
|
|
87
|
+
return e.observe(D.current), e.observe(k.current), () => {
|
|
88
|
+
e.disconnect();
|
|
89
|
+
};
|
|
90
|
+
}, [B]);
|
|
91
|
+
let V = Math.min(z, L);
|
|
92
|
+
return /* @__PURE__ */ r("div", {
|
|
93
|
+
className: f["bsy-inputTag"],
|
|
94
|
+
ref: D,
|
|
95
|
+
children: [/* @__PURE__ */ n("div", {
|
|
96
|
+
className: f["bsy-inputTag__container"],
|
|
97
|
+
children: x.length ? /* @__PURE__ */ n(e, {
|
|
98
|
+
style: { width: `${V}px` },
|
|
99
|
+
options: h,
|
|
100
|
+
children: /* @__PURE__ */ n("div", {
|
|
101
|
+
className: "flex gap-1 py-[3px]",
|
|
102
|
+
ref: O,
|
|
103
|
+
children: x.map((e, i) => /* @__PURE__ */ r(d.div, {
|
|
104
|
+
className: l("rounded-[2px] gap-1 px-[6px] h-[26px] flex items-center flex-shrink-0", {
|
|
105
|
+
"cursor-pointer": v,
|
|
106
|
+
"hover:bg-[#e0e0e0]": v && C !== i,
|
|
107
|
+
"bg-[#0265ff] text-white": v && C === i,
|
|
108
|
+
"bg-[#eee] text-black": !v || C !== i
|
|
109
|
+
}),
|
|
110
|
+
onClick: () => P(i, e),
|
|
111
|
+
children: [/* @__PURE__ */ n("span", { children: e }), /* @__PURE__ */ n("div", {
|
|
112
|
+
className: l("cursor-pointer", v && C === i ? "text-white hover:text-gray-200" : "text-[#666] hover:text-[#0265ff]"),
|
|
113
|
+
onClick: (e) => {
|
|
114
|
+
e.stopPropagation(), I(i);
|
|
115
|
+
},
|
|
116
|
+
children: /* @__PURE__ */ n(t, {
|
|
117
|
+
name: "close",
|
|
118
|
+
size: 12
|
|
119
|
+
})
|
|
120
|
+
})]
|
|
121
|
+
}, i))
|
|
122
|
+
})
|
|
123
|
+
}) : null
|
|
124
|
+
}), /* @__PURE__ */ n("div", {
|
|
125
|
+
ref: k,
|
|
126
|
+
className: l(f["bsy-inputTag__inputContainer"], { [f["bsy-inputTag__inputContainer--zeroMargin"]]: x.length === 0 }, "py-[3px]"),
|
|
127
|
+
children: /* @__PURE__ */ n("input", {
|
|
128
|
+
value: T,
|
|
129
|
+
onChange: M,
|
|
130
|
+
onKeyDown: F,
|
|
131
|
+
onBlur: N,
|
|
132
|
+
className: l(f["bsy-inputTag__input"], "placeholder:text-[#999]"),
|
|
133
|
+
placeholder: "输入标签"
|
|
134
|
+
})
|
|
135
|
+
})]
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
g.displayName = "BsyInputTag";
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/components/InputTag/index.ts
|
|
141
|
+
var _ = g;
|
|
142
|
+
//#endregion
|
|
143
|
+
export { _ as t };
|
package/dist/InputTag/index.js
CHANGED
package/dist/Loading/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Loading-
|
|
1
|
+
import { t as e } from "./Loading-ho-6d72M.js";
|
|
2
2
|
export { e as default };
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "./Modal-
|
|
1
|
+
import "../Icon/Icon-SQ5tu-yG.js";
|
|
2
|
+
import { t as e } from "./Modal-GGHNlZv3.js";
|
|
3
3
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./NotFoundContent-
|
|
1
|
+
import { t as e } from "./NotFoundContent-CV9fTylQ.js";
|
|
2
2
|
export { e as NotFoundContent };
|
package/dist/Radio/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Radio-
|
|
1
|
+
import { t as e } from "./Radio-C2zJzZc3.js";
|
|
2
2
|
export { e as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { t as e } from "../vendors/mergeRefs-TiJ0xjUN.js";
|
|
2
|
+
import "overlayscrollbars/overlayscrollbars.css";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback as n, useMemo as r, useRef as i } from "react";
|
|
5
|
+
import a from "clsx";
|
|
6
|
+
import { OverlayScrollbarsComponent as o } from "overlayscrollbars-react";
|
|
7
|
+
//#region src/components/ScrollBar/ScrollBar.module.scss
|
|
8
|
+
var s = { "bsy-scrollbar": "_bsy-scrollbar_1mgws_1" }, c = { scrollbars: {
|
|
9
|
+
theme: "os-theme-bsy",
|
|
10
|
+
autoHide: "leave",
|
|
11
|
+
autoHideDelay: 400
|
|
12
|
+
} };
|
|
13
|
+
function l(e) {
|
|
14
|
+
return e ? {
|
|
15
|
+
...c,
|
|
16
|
+
...e,
|
|
17
|
+
scrollbars: {
|
|
18
|
+
...c.scrollbars,
|
|
19
|
+
...e.scrollbars
|
|
20
|
+
}
|
|
21
|
+
} : c;
|
|
22
|
+
}
|
|
23
|
+
function u(e, ...t) {
|
|
24
|
+
typeof e == "function" ? e(...t) : Array.isArray(e) && e.forEach((e) => e?.(...t));
|
|
25
|
+
}
|
|
26
|
+
var d = ({ children: c, className: d, style: f, contentClassName: p, viewportRef: m, onScroll: h, options: g, events: _, defer: v = !m }) => {
|
|
27
|
+
let y = r(() => l(g), [g]), b = i(h);
|
|
28
|
+
b.current = h;
|
|
29
|
+
let x = n((t) => {
|
|
30
|
+
e(m, t?.elements().viewport ?? null);
|
|
31
|
+
}, [m]), S = r(() => {
|
|
32
|
+
let t = _ && typeof _ == "object" ? _ : {};
|
|
33
|
+
return {
|
|
34
|
+
...t,
|
|
35
|
+
initialized: (e, ...n) => {
|
|
36
|
+
x(e), u(t.initialized, e, ...n);
|
|
37
|
+
},
|
|
38
|
+
destroyed: (...n) => {
|
|
39
|
+
e(m, null), u(t.destroyed, ...n);
|
|
40
|
+
},
|
|
41
|
+
scroll: (e, n) => {
|
|
42
|
+
u(t.scroll, e, n), b.current?.(n);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}, [
|
|
46
|
+
_,
|
|
47
|
+
x,
|
|
48
|
+
m
|
|
49
|
+
]);
|
|
50
|
+
return /* @__PURE__ */ t(o, {
|
|
51
|
+
ref: n((e) => {
|
|
52
|
+
x(e?.osInstance() ?? null);
|
|
53
|
+
}, [x]),
|
|
54
|
+
className: a(s["bsy-scrollbar"], d),
|
|
55
|
+
style: f,
|
|
56
|
+
options: y,
|
|
57
|
+
events: S,
|
|
58
|
+
defer: v,
|
|
59
|
+
"data-overlayscrollbars-initialize": "",
|
|
60
|
+
children: p ? /* @__PURE__ */ t("div", {
|
|
61
|
+
className: p,
|
|
62
|
+
children: c
|
|
63
|
+
}) : c
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
d.displayName = "BsyScrollBar";
|
|
67
|
+
//#endregion
|
|
68
|
+
export { d as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../vendors/cssVars-
|
|
1
|
+
import { t as e } from "../vendors/cssVars-DoQgQ2CM.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback as r, useLayoutEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
4
4
|
import c from "clsx";
|
package/dist/Segmented/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Segmented-
|
|
1
|
+
import { t as e } from "./Segmented-CzVKrL6o.js";
|
|
2
2
|
export { e as default };
|