@baishuyun/ui-base 6.33.0 → 6.34.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.
Files changed (44) hide show
  1. package/dist/AiRuntimeContainer/index.js +1 -2
  2. package/dist/Amap/index.js +1 -1
  3. package/dist/Calendar/{Calendar-BNC0RpwL.js → Calendar-Cx-sUiyk.js} +1 -1
  4. package/dist/Calendar/index.js +3 -3
  5. package/dist/Card/index.js +1 -1
  6. package/dist/CheckBox/index.js +1 -1
  7. package/dist/ColorPicker/index.js +1 -1
  8. package/dist/ConfigProvider/index.js +1 -1
  9. package/dist/DatePicker/{DatePicker-DbcRkKy7.js → DatePicker-DwlDV-_e.js} +1 -1
  10. package/dist/DatePicker/{DatePickerPanel-DJdjyTxg.js → DatePickerPanel-Ca8f-74-.js} +1 -1
  11. package/dist/DatePicker/index.js +2 -2
  12. package/dist/DropDown/{DropDown-Bb4dkd_c.js → DropDown-D97QGQpV.js} +1 -1
  13. package/dist/DropDown/index.js +3 -3
  14. package/dist/Editor/index.js +3 -3
  15. package/dist/FieldCard/FieldCard-CTrNTXFc.js +286 -0
  16. package/dist/FieldCard/index.js +4 -4
  17. package/dist/Gantt/index.js +31 -31
  18. package/dist/Icon/index.js +1 -1
  19. package/dist/InputTag/{InputTag-3sZTy2HT.js → InputTag-5NTrA5bA.js} +1 -1
  20. package/dist/InputTag/index.js +3 -3
  21. package/dist/Kanban/index.js +4 -4
  22. package/dist/Loading/index.js +1 -1
  23. package/dist/Modal/index.js +1 -1
  24. package/dist/NotFoundContent/index.js +1 -1
  25. package/dist/Overlay/index.js +1 -1
  26. package/dist/Radio/index.js +1 -1
  27. package/dist/ScrollBar/ScrollBar-DJ6DaHDb.js +98 -0
  28. package/dist/ScrollBar/index.js +2 -2
  29. package/dist/Segmented/index.js +1 -1
  30. package/dist/Select/{Select-Bio92QMl.js → Select-cIKwnIMD.js} +1 -1
  31. package/dist/Select/index.js +3 -3
  32. package/dist/Table/{Table-8JyKy6tq.js → Table-B7fDob3i.js} +310 -307
  33. package/dist/Table/index.js +2 -2
  34. package/dist/Tabs/index.js +1 -1
  35. package/dist/Tooltip/index.js +1 -1
  36. package/dist/Tree/index.js +1 -1
  37. package/dist/components/ScrollBar/interface.d.ts +8 -4
  38. package/dist/index.js +9 -9
  39. package/dist/utils/hasTextSelection.d.ts +3 -0
  40. package/dist/vendors/hasTextSelection-7Q4xY0kK.js +7 -0
  41. package/dist/vendors/{version-DJ_rbXnB.js → version-Di95Ubpo.js} +1 -1
  42. package/package.json +1 -1
  43. package/dist/FieldCard/FieldCard-BW1JOjtx.js +0 -282
  44. package/dist/ScrollBar/ScrollBar-B7R4brL_.js +0 -67
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -9,10 +9,10 @@ import "../vendors/useLatchedPopupPortalRoot-Cu3oUL9h.js";
9
9
  import { t as r } from "../Tooltip/Tooltip-N-w19uRu.js";
10
10
  import "../Select/SelectInputSearch-Bt2i3y3d.js";
11
11
  import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
12
- import "../ScrollBar/ScrollBar-B7R4brL_.js";
12
+ import "../ScrollBar/ScrollBar-DJ6DaHDb.js";
13
13
  import "../vendors/useFloatingPortal-DJ1iKmW-.js";
14
- import { t as i } from "../DropDown/DropDown-Bb4dkd_c.js";
15
- import { r as a } from "../Table/Table-8JyKy6tq.js";
14
+ import { t as i } from "../DropDown/DropDown-D97QGQpV.js";
15
+ import { r as a } from "../Table/Table-B7fDob3i.js";
16
16
  import { isFunction as o, isNumber as s, isString as c } from "lodash-es";
17
17
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
18
18
  import f, { createContext as p, forwardRef as m, memo as h, useCallback as g, useContext as _, useEffect as v, useImperativeHandle as y, useLayoutEffect as b, useMemo as x, useRef as S, useState as C } from "react";
@@ -20,12 +20,12 @@ import w from "clsx";
20
20
  import { useDocumentVisibility as T, useEventListener as E, useSize as D } from "ahooks";
21
21
  import { AnimatePresence as O, motion as ee } from "motion/react";
22
22
  import te from "tinycolor2";
23
- import { createContext as k, useContextSelector as A } from "use-context-selector";
24
- import j from "dayjs";
25
- import M from "dayjs/plugin/isoWeek";
26
- import { useVirtualizer as N } from "@tanstack/react-virtual";
27
- import P from "dayjs/plugin/quarterOfYear";
28
- import { OverlayScrollbars as F } from "overlayscrollbars";
23
+ import { OverlayScrollbars as k } from "overlayscrollbars";
24
+ import { createContext as A, useContextSelector as j } from "use-context-selector";
25
+ import M from "dayjs";
26
+ import N from "dayjs/plugin/isoWeek";
27
+ import { useVirtualizer as P } from "@tanstack/react-virtual";
28
+ import F from "dayjs/plugin/quarterOfYear";
29
29
  var I = 34, L = 68 / 34, R = 1440 * 60 * 1e3, ne = "move", re = "resize-start", z = "resize-end", B = 3e4, ie = "__empty__", V = /^#([a-f\d]{3}|[a-f\d]{6})$/i, H = {
30
30
  bufferDaysBefore: 90,
31
31
  bufferDaysAfter: 90
@@ -140,7 +140,7 @@ function X(e = []) {
140
140
  }
141
141
  //#endregion
142
142
  //#region src/components/Gantt/GanttHighlightContext.ts
143
- var oe = k({
143
+ var oe = A({
144
144
  getHighlightTarget: () => null,
145
145
  setHighlightTarget: () => {},
146
146
  setTableHighlightTarget: () => {},
@@ -175,7 +175,7 @@ function Z(e) {
175
175
  //#endregion
176
176
  //#region src/components/Gantt/GanttTable/GanttTable.tsx
177
177
  var le = ({ data: e = [], columns: t = [], onRowClick: n, rowHeight: r = 34, tableTheme: i }) => {
178
- let o = A(oe, (e) => e.setTableHighlightTarget), { columns: s, resizable: c, disabledResizeColumns: l, onColumnResizeEnd: d } = J(x(() => X(t), [t])), f = g((e) => {
178
+ let o = j(oe, (e) => e.setTableHighlightTarget), { columns: s, resizable: c, disabledResizeColumns: l, onColumnResizeEnd: d } = J(x(() => X(t), [t])), f = g((e) => {
179
179
  let t = Z(e);
180
180
  t && o?.(t);
181
181
  }, [o]), p = g(() => {
@@ -240,10 +240,10 @@ function ge(e) {
240
240
  var _e = () => -(/* @__PURE__ */ new Date()).getTimezoneOffset() / 60, ve = () => {
241
241
  let e = _e();
242
242
  return e === null ? 0 : ((/* @__PURE__ */ new Date()).getTimezoneOffset() + e * 60) * 60 * 1e3;
243
- }, ye = (e) => e + ve(), be = (e) => e - ve(), xe = () => Date.now() + ve(), Se = (e) => be(j(ye(e)).startOf("day").valueOf()), Ce = (e, t) => be(j(ye(e)).startOf(t).valueOf()), we = (e, t) => be(j(ye(e)).endOf(t).valueOf()), Te = (e) => {
243
+ }, ye = (e) => e + ve(), be = (e) => e - ve(), xe = () => Date.now() + ve(), Se = (e) => be(M(ye(e)).startOf("day").valueOf()), Ce = (e, t) => be(M(ye(e)).startOf(t).valueOf()), we = (e, t) => be(M(ye(e)).endOf(t).valueOf()), Te = (e) => {
244
244
  let t = ye(e);
245
245
  return new Date(t).getDay();
246
- }, Ee = (e) => j(ye(e)), De = (e) => e?.type === "task" && e?.draggable !== !1 && !e?.invalid, Oe = {
246
+ }, Ee = (e) => M(ye(e)), De = (e) => e?.type === "task" && e?.draggable !== !1 && !e?.invalid, Oe = {
247
247
  canMove: !1,
248
248
  canResizeStart: !1,
249
249
  canResizeEnd: !1
@@ -257,7 +257,7 @@ var _e = () => -(/* @__PURE__ */ new Date()).getTimezoneOffset() / 60, ve = () =
257
257
  canResizeEnd: !0
258
258
  }, Ae = (e, t) => De(e) ? e?.dragPermission ? t === "move" ? e.dragPermission.canMove === !0 : t === "resize-start" ? e.dragPermission.canResizeStart === !0 : t === "resize-end" ? e.dragPermission.canResizeEnd === !0 : !1 : !0 : !1, je = (e, t) => !t || Math.abs(e) < Math.min(5, t) ? 0 : Math.round(e / t), Me = (e, t) => je(e, t), Ne = (e, t, n = "round") => {
259
259
  if (!t || !Number.isFinite(e)) return e;
260
- let r = ye(e), i = j(r).startOf("day").valueOf(), a = (r - i) / t, o;
260
+ let r = ye(e), i = M(r).startOf("day").valueOf(), a = (r - i) / t, o;
261
261
  return o = n === "floor" ? Math.floor(a) : n === "ceil" ? Math.ceil(a) : Math.round(a), be(i + o * t);
262
262
  }, Pe = (e, t, n) => ({
263
263
  startMs: e + n,
@@ -680,7 +680,7 @@ function Xe({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
680
680
  }
681
681
  //#endregion
682
682
  //#region src/components/Gantt/GanttChart/utils/quarterMonthScale.ts
683
- j.extend(P);
683
+ M.extend(F);
684
684
  var Ze = Ge("quarterMonth").bottomCellWidthPx, Qe = (e) => {
685
685
  if (!Number.isFinite(e)) return 0;
686
686
  let t = Ee(e), n = Ce(e, "month"), r = Se(we(e, "month") + 1) - n, i = r > 0 ? (e - n) / r : 0;
@@ -727,14 +727,14 @@ var Ze = Ge("quarterMonth").bottomCellWidthPx, Qe = (e) => {
727
727
  let a = t[t.length - 1];
728
728
  return Math.min(a.endMs, n);
729
729
  };
730
- j.extend(M), j.extend(P);
730
+ M.extend(N), M.extend(F);
731
731
  var st = (e) => {
732
732
  if (e == null || c(e) && e.trim() === "") return 0;
733
733
  let t = Number(e);
734
734
  return Number.isFinite(t) ? t < 0 || t > 1 ? 1 : t : 0;
735
735
  }, ct = (e) => {
736
736
  if (e == null) return null;
737
- let t = j(e);
737
+ let t = M(e);
738
738
  return t.isValid() ? t.valueOf() : null;
739
739
  }, lt = (e) => Se(e), ut = (e, t = ae) => {
740
740
  let n = Number(t?.[e]);
@@ -764,7 +764,7 @@ var st = (e) => {
764
764
  endMs: i + (r + 1) * R
765
765
  };
766
766
  }, mt = (e, t, n) => {
767
- let r = j(e).isValid() ? e : Date.now(), i = j(t).isValid() ? t : Date.now() + R;
767
+ let r = M(e).isValid() ? e : Date.now(), i = M(t).isValid() ? t : Date.now() + R;
768
768
  switch (n) {
769
769
  case "week": return {
770
770
  startMs: Ce(r, "isoWeek"),
@@ -867,7 +867,7 @@ function Ct({ lowerSegments: e, pixelsPerDay: t, scrollLeft: n, viewportWidth: r
867
867
  ])
868
868
  };
869
869
  }
870
- j.extend(M), j.extend(P);
870
+ M.extend(N), M.extend(F);
871
871
  var wt = {
872
872
  day: {
873
873
  amount: 1,
@@ -985,12 +985,12 @@ var wt = {
985
985
  endMs: n,
986
986
  left: s ? e.length * c : ht(t, i, a, r),
987
987
  width: s ? c : Math.max(1, gt(t, n, a, r)),
988
- label: Et(j(t), r, o)
988
+ label: Et(M(t), r, o)
989
989
  });
990
990
  }, At = ({ viewMode: e, timelineStartMs: t, timelineEndMs: n, pixelsPerDay: r, formatMessage: i }) => {
991
- let a = [], o = wt[e] || wt.day, s = j(ye(t));
991
+ let a = [], o = wt[e] || wt.day, s = M(ye(t));
992
992
  qe(e) && (s = s.startOf("month"));
993
- let c = j(ye(n));
993
+ let c = M(ye(n));
994
994
  for (; s.isBefore(c);) {
995
995
  o.align && (s = o.align(s));
996
996
  let n = s.add(o.amount, o.unit);
@@ -1001,7 +1001,7 @@ var wt = {
1001
1001
  if (!Array.isArray(e) || e.length === 0) return [];
1002
1002
  let r = [], i = null;
1003
1003
  for (let a of e) {
1004
- let e = j(a.startMs), o = Dt(e, t);
1004
+ let e = M(a.startMs), o = Dt(e, t);
1005
1005
  if (!i || i.id !== o) {
1006
1006
  i && r.push(i), i = {
1007
1007
  id: o,
@@ -1592,7 +1592,7 @@ function $t(e, t) {
1592
1592
  return b(() => {
1593
1593
  let n = e.current, i = t.current;
1594
1594
  if (!n || !i) return;
1595
- let a = F({
1595
+ let a = k({
1596
1596
  target: n,
1597
1597
  elements: { viewport: i }
1598
1598
  }, { scrollbars: {
@@ -1911,7 +1911,7 @@ var tn = (e) => e.startsWith("gantt.") ? e : `gantt.${e}`, nn = p(void 0), rn =
1911
1911
  //#endregion
1912
1912
  //#region src/components/Gantt/GanttChart/hooks/useGanttRowVirtualScroll.ts
1913
1913
  function mn({ items: e, contentRef: t, safeRowHeight: n, viewportHeight: r, overscan: i = 4 }) {
1914
- let [a, o] = C(!1), s = N({
1914
+ let [a, o] = C(!1), s = P({
1915
1915
  count: e.length,
1916
1916
  getScrollElement: () => t.current,
1917
1917
  estimateSize: () => n,
@@ -1959,7 +1959,7 @@ function hn({ virtualRows: e, normalizedItems: t, visibleStartMs: n, visibleEndM
1959
1959
  //#endregion
1960
1960
  //#region src/components/Gantt/GanttChart/hooks/useRowHoverHighlight.ts
1961
1961
  function gn({ normalizedItems: e, safeRowHeight: t }) {
1962
- let n = A(oe, (e) => e.setHighlightTarget), r = A(oe, (e) => e.subscribeHighlight), i = A(oe, (e) => e.getIsScrollActive), a = S(null), o = S(null), s = S(null), c = S(!1), l = x(() => {
1962
+ let n = j(oe, (e) => e.setHighlightTarget), r = j(oe, (e) => e.subscribeHighlight), i = j(oe, (e) => e.getIsScrollActive), a = S(null), o = S(null), s = S(null), c = S(!1), l = x(() => {
1963
1963
  let t = /* @__PURE__ */ new Map(), n = 0;
1964
1964
  for (; n < e.length;) {
1965
1965
  let r = e[n]?.parentId;
@@ -2045,14 +2045,14 @@ function gn({ normalizedItems: e, safeRowHeight: t }) {
2045
2045
  }
2046
2046
  //#endregion
2047
2047
  //#region src/components/Gantt/GanttChart/GanttInteractionContext.ts
2048
- var _n = k({
2048
+ var _n = A({
2049
2049
  tooltip: null,
2050
2050
  isScrolling: !1,
2051
2051
  collapsedKeys: void 0,
2052
2052
  onBarClick: () => {},
2053
2053
  onTaskMouseDown: () => {},
2054
2054
  onResizeMouseDown: () => {}
2055
- }), vn = (e) => A(_n, e), yn = k({
2055
+ }), vn = (e) => j(_n, e), yn = A({
2056
2056
  viewMode: "day",
2057
2057
  pixelsPerDay: 1,
2058
2058
  timelineStartMs: 0,
@@ -2068,7 +2068,7 @@ var _n = k({
2068
2068
  viewportWidth: 0,
2069
2069
  timelineWidth: 0,
2070
2070
  isInitialLayoutReady: !1
2071
- }), $ = (e) => A(yn, e), bn = (e, t) => {
2071
+ }), $ = (e) => j(yn, e), bn = (e, t) => {
2072
2072
  let n = e.replace("#", ""), r = n.length === 3 ? n.split("").map((e) => e + e).join("") : n;
2073
2073
  return `rgba(${parseInt(r.slice(0, 2), 16)}, ${parseInt(r.slice(2, 4), 16)}, ${parseInt(r.slice(4, 6), 16)}, ${t})`;
2074
2074
  }, xn = (e, t) => {
@@ -3068,7 +3068,7 @@ var dr = "#0265ff", fr = "#121111", pr = "#fff", mr = (e) => {
3068
3068
  //#endregion
3069
3069
  //#region src/components/Gantt/GanttTable/hooks/useGanttTableHighlightDomSync.ts
3070
3070
  function yr(e) {
3071
- let t = A(oe, (e) => e.getHighlightTarget), n = A(oe, (e) => e.subscribeHighlight), r = S(null), i = g((e, t) => {
3071
+ let t = j(oe, (e) => e.getHighlightTarget), n = j(oe, (e) => e.subscribeHighlight), r = S(null), i = g((e, t) => {
3072
3072
  if (!e || !t?.id || !t?.type) return [];
3073
3073
  let n = CSS.escape(String(t.id)), r = CSS.escape(String(t.type));
3074
3074
  return Array.from(e.querySelectorAll(`[data-highlight-id="${n}"][data-highlight-type="${r}"]`));
@@ -1,3 +1,3 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import { t as e } from "./Icon-CcKDWNGy.js";
3
3
  export { e as default };
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../Icon/Icon-CcKDWNGy.js";
2
2
  import { t } from "../vendors/useLocale-DvhRopWF.js";
3
- import { t as n } from "../ScrollBar/ScrollBar-B7R4brL_.js";
3
+ import { t as n } from "../ScrollBar/ScrollBar-DJ6DaHDb.js";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  import { useCallback as a, useEffect as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
6
6
  import u from "clsx";
@@ -1,8 +1,8 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
5
5
  import "../vendors/useLocale-DvhRopWF.js";
6
- import "../ScrollBar/ScrollBar-B7R4brL_.js";
7
- import { t as e } from "./InputTag-3sZTy2HT.js";
6
+ import "../ScrollBar/ScrollBar-DJ6DaHDb.js";
7
+ import { t as e } from "./InputTag-5NTrA5bA.js";
8
8
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -10,10 +10,10 @@ import "../Select/SelectInputSearch-Bt2i3y3d.js";
10
10
  import "../CheckBox/CheckBox-BXKoPSBh.js";
11
11
  import { t as r } from "../CheckBox/CheckBox-DihUnPT-.js";
12
12
  import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
13
- import { t as i } from "../ScrollBar/ScrollBar-B7R4brL_.js";
13
+ import { t as i } from "../ScrollBar/ScrollBar-DJ6DaHDb.js";
14
14
  import "../vendors/useFloatingPortal-DJ1iKmW-.js";
15
- import "../DropDown/DropDown-Bb4dkd_c.js";
16
- import { t as a } from "../FieldCard/FieldCard-BW1JOjtx.js";
15
+ import "../DropDown/DropDown-D97QGQpV.js";
16
+ import { t as a } from "../FieldCard/FieldCard-CTrNTXFc.js";
17
17
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
18
18
  import { createContext as l, memo as u, useCallback as d, useContext as f, useEffect as p, useLayoutEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
19
19
  import v from "clsx";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import "../vendors/LocaleContext-CsTLO_Y2.js";
3
3
  import "../vendors/useLocale-DvhRopWF.js";
4
4
  import { t as e } from "./Loading-CLUJfdln.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../Overlay/OverlayContext-CVSFoyqN.js";
4
4
  import { t as e } from "./Modal-BeDIo3CM.js";
@@ -1,3 +1,3 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import { t as e } from "./NotFoundContent-DJUQ0_2D.js";
3
3
  export { e as NotFoundContent };
@@ -1,3 +1,3 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import { a as e, i as t, n, t as r } from "./OverlayContext-CVSFoyqN.js";
3
3
  export { r as OVERLAY_Z_BASE, n as OVERLAY_Z_STEP, t as OverlayProvider, e as useOverlayZIndex };
@@ -1,3 +1,3 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import { t as e } from "./Radio-GeMs-7qt.js";
3
3
  export { e as default };
@@ -0,0 +1,98 @@
1
+ import { t as e } from "../vendors/mergeRefs-DSqdKcq6.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { useCallback as n, useEffect as r, useMemo as i, useRef as a } from "react";
4
+ import o from "clsx";
5
+ import { OverlayScrollbars as s } from "overlayscrollbars";
6
+ //#region src/components/ScrollBar/ScrollBar.module.scss
7
+ var c = { "bsy-scrollbar": "_bsy-scrollbar_1mgws_1" }, l = { scrollbars: {
8
+ theme: "os-theme-bsy",
9
+ autoHide: "leave",
10
+ autoHideDelay: 400
11
+ } }, u = 2233;
12
+ function d(e) {
13
+ return e ? {
14
+ ...l,
15
+ ...e,
16
+ scrollbars: {
17
+ ...l.scrollbars,
18
+ ...e.scrollbars
19
+ }
20
+ } : l;
21
+ }
22
+ function f(e, ...t) {
23
+ typeof e == "function" ? e(...t) : Array.isArray(e) && e.forEach((e) => e?.(...t));
24
+ }
25
+ function p(e, t) {
26
+ let n = 0, r = () => {
27
+ n = window.requestAnimationFrame(e);
28
+ }, i = 0, a = t === !0 ? { timeout: u } : t;
29
+ return typeof window.requestIdleCallback == "function" ? i = window.requestIdleCallback(r, a) : r(), () => {
30
+ i && window.cancelIdleCallback?.(i), n && window.cancelAnimationFrame(n);
31
+ };
32
+ }
33
+ var m = ({ children: l, className: u, style: m, contentClassName: h, viewportRef: g, onScroll: _, options: v, events: y, defer: b = !g, initialize: x = !0, ...S }) => {
34
+ let C = a(null), w = a(null), T = a(null), E = i(() => d(v), [v]), D = a(_), O = a(E), k = a(b), A = a(g);
35
+ D.current = _, O.current = E, k.current = b, A.current = g;
36
+ let j = n((t) => {
37
+ let n = t?.elements().viewport ?? null;
38
+ e(A.current, n);
39
+ }, []), M = a(j);
40
+ M.current = j;
41
+ let N = i(() => {
42
+ let t = y && typeof y == "object" ? y : {};
43
+ return {
44
+ ...t,
45
+ initialized: (e, ...n) => {
46
+ M.current(e), f(t.initialized, e, ...n);
47
+ },
48
+ destroyed: (...n) => {
49
+ e(A.current, null), f(t.destroyed, ...n);
50
+ },
51
+ scroll: (e, n) => {
52
+ f(t.scroll, e, n), D.current?.(n);
53
+ }
54
+ };
55
+ }, [y]), P = a(N);
56
+ P.current = N, r(() => {
57
+ if (!x) return;
58
+ let t = C.current, n = w.current;
59
+ if (!t || !n) return;
60
+ let r = () => {}, i = !1, a = () => {
61
+ if (i || !C.current || !w.current) return;
62
+ let e = s({
63
+ target: C.current,
64
+ elements: {
65
+ viewport: w.current,
66
+ content: w.current
67
+ }
68
+ }, O.current, P.current);
69
+ T.current = e, M.current(e);
70
+ }, o = k.current;
71
+ return o ? r = p(a, o) : a(), () => {
72
+ i = !0, r(), T.current?.destroy(), T.current = null, e(A.current, null);
73
+ };
74
+ }, [x]), r(() => {
75
+ s.valid(T.current) && T.current.options(E, !0);
76
+ }, [E]), r(() => {
77
+ s.valid(T.current) && T.current.on(N, !0);
78
+ }, [N]);
79
+ let F = h ? /* @__PURE__ */ t("div", {
80
+ className: h,
81
+ children: l
82
+ }) : l;
83
+ return /* @__PURE__ */ t("div", {
84
+ ...S,
85
+ ref: C,
86
+ className: o(c["bsy-scrollbar"], u),
87
+ style: m,
88
+ "data-overlayscrollbars-initialize": "",
89
+ children: /* @__PURE__ */ t("div", {
90
+ "data-overlayscrollbars-contents": "",
91
+ ref: w,
92
+ children: F
93
+ })
94
+ });
95
+ };
96
+ m.displayName = "BsyScrollBar";
97
+ //#endregion
98
+ export { m as t };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import "./style-D26azwz6.js";
3
- import { t as e } from "./ScrollBar-B7R4brL_.js";
3
+ import { t as e } from "./ScrollBar-DJ6DaHDb.js";
4
4
  export { e as ScrollBar, e as default };
@@ -1,3 +1,3 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import { t as e } from "./Segmented-AHLqTK7U.js";
3
3
  export { e as default };
@@ -9,7 +9,7 @@ import { n as l, t as u } from "../vendors/Tree-C8l3t4L6.js";
9
9
  import { n as d } from "../CheckBox/CheckBox-BXKoPSBh.js";
10
10
  import { t as f } from "../CheckBox/CheckBox-DihUnPT-.js";
11
11
  import { t as p } from "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
12
- import { t as m } from "../ScrollBar/ScrollBar-B7R4brL_.js";
12
+ import { t as m } from "../ScrollBar/ScrollBar-DJ6DaHDb.js";
13
13
  import { t as h } from "../vendors/useFloatingPortal-DJ1iKmW-.js";
14
14
  import { first as g, isArray as _, isEmpty as v, isEqual as y, isNil as b, noop as x } from "lodash-es";
15
15
  import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
@@ -1,17 +1,17 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-Di95Ubpo.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
5
5
  import "../Overlay/OverlayContext-CVSFoyqN.js";
6
6
  import "../vendors/useLocale-DvhRopWF.js";
7
7
  import "../vendors/useLatchedPopupPortalRoot-Cu3oUL9h.js";
8
- import { n as e, r as t, t as n } from "./Select-Bio92QMl.js";
8
+ import { n as e, r as t, t as n } from "./Select-cIKwnIMD.js";
9
9
  import "./SelectInputSearch-Bt2i3y3d.js";
10
10
  import "../vendors/Tree-C8l3t4L6.js";
11
11
  import "../CheckBox/CheckBox-BXKoPSBh.js";
12
12
  import "../CheckBox/CheckBox-DihUnPT-.js";
13
13
  import "../Radio/Radio-GeMs-7qt.js";
14
14
  import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
15
- import "../ScrollBar/ScrollBar-B7R4brL_.js";
15
+ import "../ScrollBar/ScrollBar-DJ6DaHDb.js";
16
16
  import "../vendors/useFloatingPortal-DJ1iKmW-.js";
17
17
  export { e as Mode, n as Select, t as SelectType };