bitz-react-admin-ui 1.6.6 → 1.6.8

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 (83) hide show
  1. package/dist/bitz-ui.mjs +126 -120
  2. package/dist/components/BitzFluentInput/index.mjs +17 -14
  3. package/dist/components/BitzFluentSelect/index.mjs +17 -15
  4. package/dist/components/BitzList/List.mjs +14 -0
  5. package/dist/components/BitzList/LoadMore.mjs +60 -0
  6. package/dist/components/BitzList/index.less.mjs +4 -0
  7. package/dist/components/BitzList/index.mjs +6 -0
  8. package/dist/components/BitzPullRefresh/PullRefresh.mjs +84 -0
  9. package/dist/components/BitzPullRefresh/index.mjs +6 -0
  10. package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
  11. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +86 -74
  12. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +36 -0
  13. package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
  14. package/dist/components/BitzTable/ActionBar/index.mjs +6 -34
  15. package/dist/components/BitzTable/ActionBar/style.mjs +36 -27
  16. package/dist/components/BitzTable/ActionCol/index.mjs +18 -17
  17. package/dist/components/BitzTable/Table/index.mjs +154 -92
  18. package/dist/components/BitzTable/TableSkeleton/index.mjs +36 -32
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +88 -99
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +20 -18
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -8
  22. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +7 -7
  23. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +13 -13
  24. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +5 -5
  25. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +7 -3
  26. package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
  27. package/dist/hooks/use-event-listener.mjs +31 -0
  28. package/dist/hooks/use-lock-fn.mjs +18 -0
  29. package/dist/hooks/use-scroll-parent.mjs +32 -0
  30. package/dist/hooks/use-touch.mjs +33 -0
  31. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
  32. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
  33. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
  34. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
  35. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
  36. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
  37. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
  38. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
  39. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
  40. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
  41. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
  42. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  43. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
  44. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
  45. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
  46. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
  47. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
  48. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
  49. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
  50. package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
  51. package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
  52. package/dist/style.css +1 -1
  53. package/dist/type/bitz-ui.d.ts +2 -0
  54. package/dist/type/components/BitzList/List.d.ts +4 -0
  55. package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
  56. package/dist/type/components/BitzList/PropsType.d.ts +35 -0
  57. package/dist/type/components/BitzList/index.d.ts +5 -0
  58. package/dist/type/components/BitzPagination/index.d.ts +8 -2
  59. package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
  60. package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
  61. package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
  62. package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
  63. package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
  64. package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
  65. package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
  66. package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
  67. package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
  68. package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
  69. package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
  70. package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
  71. package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
  72. package/dist/type/components/BitzTable/index.d.ts +5 -1
  73. package/dist/type/hooks/use-event-listener.d.ts +11 -0
  74. package/dist/type/hooks/use-lock-fn.d.ts +2 -0
  75. package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
  76. package/dist/type/hooks/use-touch.d.ts +18 -0
  77. package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
  78. package/dist/type/pages/Test/index.d.ts +3 -0
  79. package/dist/type/utils/get-default-props.d.ts +2 -0
  80. package/dist/type/utils/scroll.d.ts +6 -0
  81. package/dist/utils/get-default-props.mjs +12 -0
  82. package/dist/utils/scroll.mjs +15 -0
  83. package/package.json +2 -1
@@ -1,24 +1,26 @@
1
- import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
1
+ import { j as s } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import c from "react";
3
- import o from "./index.module.less.mjs";
4
- import { useSortable as f } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
5
- import { CSS as p } from "../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
6
- import g from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
3
+ import e from "./index.module.less.mjs";
4
+ import { useSortable as b } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
5
+ import { CSS as f } from "../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
6
+ import o from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
7
  import u from "../../../../assets/iconfont/IconTuodong.mjs";
8
- import x from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/LockOutlined.mjs";
9
- const b = (r) => {
10
- const { item: s } = r, { attributes: e, isDragging: a, setNodeRef: m, listeners: n, transform: i, transition: d } = f({
11
- id: s == null ? void 0 : s.key,
12
- disabled: s == null ? void 0 : s.disabled
13
- }), l = {
8
+ import p from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/LockOutlined.mjs";
9
+ const I = (n) => {
10
+ const { item: t } = n, { attributes: r, isDragging: a, setNodeRef: l, listeners: m, transform: i, transition: d } = b({
11
+ id: t == null ? void 0 : t.key,
12
+ disabled: t == null ? void 0 : t.disabled
13
+ }), g = {
14
14
  transition: d,
15
- transform: p.Transform.toString(i)
15
+ transform: f.Transform.toString(i)
16
16
  };
17
- return t.jsxs("li", { ref: m, className: g(o.moveItem, {
18
- [o.isDragging]: a,
19
- [o.disabled]: s == null ? void 0 : s.disabled
20
- }), style: l, ...n, ...e, children: [s.disabled ? t.jsx(x, { className: o.dragIcon }) : t.jsx(u, { size: 14, className: o.dragIcon }), t.jsx("span", { className: o["moveItem-text"], children: s.title })] });
21
- }, k = c.memo(b);
17
+ return s.jsxs("li", { ref: l, className: o(e.moveItem, "tableColumnSetting_moveItem", {
18
+ [e.isDragging]: a,
19
+ [e.disabled]: t == null ? void 0 : t.disabled,
20
+ tableColumnSetting_isDragging: a,
21
+ tableColumnSetting_disabled: t == null ? void 0 : t.disabled
22
+ }), style: g, ...m, ...r, children: [t.disabled ? s.jsx(p, { className: o(e.dragIcon, "tableColumnSetting_dragIcon") }) : s.jsx(u, { size: 14, className: o(e.dragIcon, "tableColumnSetting_dragIcon") }), s.jsx("span", { className: o(e["moveItem-text"], "tableColumnSetting_moveItem-text"), children: t.title })] });
23
+ }, y = c.memo(I);
22
24
  export {
23
- k as default
25
+ y as default
24
26
  };
@@ -1,21 +1,21 @@
1
1
  import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import s, { useContext as a } from "react";
3
- import { Tooltip as u } from "antd";
2
+ import u, { useContext as s } from "react";
3
+ import { Tooltip as a } from "antd";
4
4
  import { show as c } from "@ebay/nice-modal-react";
5
- import d from "./ColumnSettingModal.mjs";
6
- import f from "../style.mjs";
5
+ import f from "./ColumnSettingModal.mjs";
6
+ import d from "../style.mjs";
7
7
  import C from "../../../BitzButton/index.mjs";
8
8
  import { TableContext as x } from "../../Store/index.mjs";
9
9
  import g from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
10
  const h = (o) => {
11
- const { icon: m = t.jsx(g, {}) } = o, { toolbarItemClassName: i } = f(), { uuid: n } = a(x), l = () => {
11
+ const { icon: i = t.jsx(g, {}) } = o, { toolbarItemClassName: m } = d(), { uuid: n } = s(x), l = () => {
12
12
  c(`ColumnSettingModal-${n}`).then((r) => {
13
13
  var e;
14
14
  (e = o.onChange) == null || e.call(o, r);
15
15
  });
16
16
  };
17
- return t.jsxs(t.Fragment, { children: [t.jsx(d, { id: `ColumnSettingModal-${n}` }), t.jsx(u, { title: "列设置", children: t.jsx(C, { type: "text", className: i, onClick: l, children: m }) })] });
18
- }, F = s.memo(h);
17
+ return t.jsxs(t.Fragment, { children: [t.jsx(f, { id: `ColumnSettingModal-${n}` }), t.jsx(a, { title: "列设置", open: !1, children: t.jsx(C, { type: "text", className: m, onClick: l, icon: i, children: "列设置" }) })] });
18
+ }, y = u.memo(h);
19
19
  export {
20
- F as default
20
+ y as default
21
21
  };
@@ -2,11 +2,11 @@ import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_module
2
2
  import { memo as r, useContext as u } from "react";
3
3
  import { Dropdown as x, Tooltip as d } from "antd";
4
4
  import { TableContext as y } from "../../Store/index.mjs";
5
- import b from "../style.mjs";
6
- import f from "../../../BitzButton/index.mjs";
7
- import C from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/ColumnHeightOutlined.mjs";
5
+ import C from "../style.mjs";
6
+ import b from "../../../BitzButton/index.mjs";
7
+ import f from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/ColumnHeightOutlined.mjs";
8
8
  const k = (e) => {
9
- const { icon: m = o.jsx(C, {}) } = e, t = u(y), { toolbarItemClassName: s } = b(), a = {
9
+ const { icon: m = o.jsx(f, {}) } = e, t = u(y), { toolbarItemClassName: s } = C(), a = {
10
10
  selectedKeys: [t.tableSize],
11
11
  onClick: ({ key: c }) => {
12
12
  var n, i;
@@ -36,8 +36,8 @@ const k = (e) => {
36
36
  }
37
37
  ]
38
38
  };
39
- return o.jsx(x, { menu: a, trigger: ["click"], children: o.jsx(d, { title: "表格密度", children: o.jsx(f, { type: "text", className: s, children: m }) }) });
40
- }, S = r(k);
39
+ return o.jsx(x, { menu: a, trigger: ["click"], children: o.jsx(d, { title: "表格密度", open: !1, children: o.jsx(b, { type: "text", className: s, icon: m, children: "表格密度" }) }) });
40
+ }, I = r(k);
41
41
  export {
42
- S as default
42
+ I as default
43
43
  };
@@ -1,18 +1,18 @@
1
- import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { memo as i, useMemo as p } from "react";
3
- import l from "../style.mjs";
4
- import x from "../../../BitzButton/index.mjs";
5
- import a from "../../../BitzConvert/index.mjs";
6
- import c from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/DownloadOutlined.mjs";
7
- const d = ({ show: e = !0, loading: r, onClick: t, icon: m = o.jsx(c, {}) }) => {
8
- const { toolbarItemClassName: s } = l(), n = p(() => ({
1
+ import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { memo as u, useMemo as a } from "react";
3
+ import x from "../style.mjs";
4
+ import c from "../../../BitzButton/index.mjs";
5
+ import f from "../../../BitzConvert/index.mjs";
6
+ import d from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/DownloadOutlined.mjs";
7
+ const j = ({ show: r = !0, loading: s, onClick: t, icon: m = e.jsx(d, {}), menu: o, tipText: n }) => {
8
+ const { toolbarItemClassName: i } = x(), p = a(() => o || {
9
9
  items: [
10
10
  { key: "excel", label: "导出查询结果为Excel" }
11
11
  ],
12
- onClick: ({ key: u }) => t == null ? void 0 : t(u)
13
- }), [t]);
14
- return e ? o.jsx(a.DropdownToButton, { menu: n, trigger: ["click"], showTootip: !0, tipText: "导出", children: o.jsx(x, { type: "text", className: s, disabled: r, children: m }) }) : null;
15
- }, y = i(d);
12
+ onClick: ({ key: l }) => t == null ? void 0 : t(l)
13
+ }, [o, t]);
14
+ return r ? e.jsx(f.DropdownToButton, { menu: p, trigger: ["click"], showTootip: !1, tipText: n || "导出", children: e.jsx(c, { type: "text", className: i, disabled: s, icon: m, children: "下载" }) }) : null;
15
+ }, I = u(j);
16
16
  export {
17
- y as default
17
+ I as default
18
18
  };
@@ -1,13 +1,13 @@
1
1
  import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { memo as m } from "react";
3
- import { Tooltip as n } from "antd";
2
+ import { memo as n } from "react";
3
+ import { Tooltip as m } from "antd";
4
4
  import l from "../style.mjs";
5
5
  import c from "../../../BitzButton/index.mjs";
6
6
  import a from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/ReloadOutlined.mjs";
7
7
  const p = (t) => {
8
8
  const { loading: e, onClick: r, icon: s = o.jsx(a, {}) } = t, { toolbarItemClassName: i } = l();
9
- return o.jsx(n, { title: "刷新", children: o.jsx(c, { type: "text", className: i, disabled: e, onClick: r, children: s }) });
10
- }, R = m(p);
9
+ return o.jsx(m, { title: "刷新", open: !1, children: o.jsx(c, { type: "text", className: i, disabled: e, onClick: r, icon: s, children: "刷新" }) });
10
+ }, B = n(p);
11
11
  export {
12
- R as default
12
+ B as default
13
13
  };
@@ -1,7 +1,11 @@
1
1
  import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useMemo as a } from "react";
2
3
  import { Space as l } from "antd";
3
- import n from "../index.mjs";
4
- const p = ({ size: c, loading: e, onExport: r, onRefresh: s, onSizeChange: i, onColumnChange: t, children: a = o.jsxs(o.Fragment, { children: [o.jsx(n.ExportIcon, { loading: e, onClick: r }), o.jsx(n.RefreshIcon, { loading: e, onClick: s }), o.jsx(n.DensityIcon, { onChange: i }), o.jsx(n.ColConfigIcon, { onChange: t })] }) }) => o.jsx(l, { size: 32, children: a });
4
+ import e from "../index.mjs";
5
+ const g = ({ size: j, loading: n, onExport: c, onRefresh: r, onSizeChange: t, onColumnChange: i, children: s }) => {
6
+ const x = a(() => s ? o.jsxs(o.Fragment, { children: [s, o.jsx(e.RefreshIcon, { loading: n, onClick: r }), o.jsx(e.DensityIcon, { onChange: t }), o.jsx(e.ColConfigIcon, { onChange: i })] }) : o.jsxs(o.Fragment, { children: [o.jsx(e.ExportIcon, { loading: n, onClick: c }), o.jsx(e.RefreshIcon, { loading: n, onClick: r }), o.jsx(e.DensityIcon, { onChange: t }), o.jsx(e.ColConfigIcon, { onChange: i })] }), [n, s]);
7
+ return o.jsx(l.Compact, { style: { height: "100%" }, children: x });
8
+ };
5
9
  export {
6
- p as default
10
+ g as default
7
11
  };
@@ -1,7 +1,8 @@
1
- import { theme as s } from "antd";
1
+ import { theme as $ } from "antd";
2
+ import { TableContext as d } from "../Store/index.mjs";
2
3
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
3
4
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
4
- import "react";
5
+ import { useContext as h, useMemo as S } from "react";
5
6
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
6
7
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/theme/createTheme.mjs";
7
8
  import "../../../node_modules/.store/rc-util@5.39.0/node_modules/rc-util/es/warning.mjs";
@@ -9,33 +10,41 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@an
9
10
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
10
11
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
11
12
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
12
- import l from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
13
+ import g from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
13
14
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
14
- import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
15
- const z = (p) => {
16
- const { theme: i, token: o, hashId: e } = s.useToken(), t = "toolbarItem", m = (a, r) => [
15
+ import u from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
16
+ const M = () => {
17
+ const { theme: a, token: r, hashId: n } = $.useToken(), { tableSize: m } = h(d), p = S(() => m ?? "lg", [m]), e = "toolbarItem", i = "ToolbarItemBtn", l = (t, o, s) => [
17
18
  {
18
- [`.${a}`]: {
19
- fontSize: 16,
20
- background: "inherit !important",
21
- height: "auto",
22
- lineHeight: "inherit",
23
- padding: 0,
24
- border: "none",
19
+ [`.${t}`]: {
20
+ height: "100%",
21
+ lineHeight: "normal",
22
+ paddingBlock: 0,
23
+ borderRadius: 0,
25
24
  display: "block",
26
25
  "&:not(&:disabled):hover": {
27
- color: r.colorPrimary
26
+ color: s.colorText
28
27
  },
29
28
  "&:not(&:disabled):focus": {
30
- color: r.colorPrimaryTextActive
29
+ color: s.colorText
30
+ },
31
+ ".ant-btn-icon": {
32
+ marginInlineEnd: "6px !important"
31
33
  }
32
34
  }
33
- }
35
+ },
36
+ [{ [`.${t}.xl${o}`]: { fontSize: 14 } }],
37
+ [{ [`.${t}.lg${o}`]: { fontSize: 12 } }],
38
+ [{ [`.${t}.md${o}`]: { fontSize: 12 } }],
39
+ [{ [`.${t}.sm${o}`]: { fontSize: 12 } }],
40
+ [{ [`.${t}.xs${o}`]: { fontSize: 12 } }]
34
41
  ];
35
- return l({ theme: i, token: o, hashId: e, path: [t] }, () => [
36
- m(t, o)
37
- ]), { toolbarItemClassName: n(t, e) };
42
+ g({ theme: a, token: r, hashId: n, path: [e] }, () => [
43
+ l(e, i, r)
44
+ ]);
45
+ const c = `${p}${i}`;
46
+ return { toolbarItemClassName: u(e, c, n) };
38
47
  };
39
48
  export {
40
- z as default
49
+ M as default
41
50
  };
@@ -0,0 +1,31 @@
1
+ import { useEffect as v } from "react";
2
+ import { inBrowser as i, getTargetElement as a } from "./use-scroll-parent.mjs";
3
+ let f = !1;
4
+ if (i)
5
+ try {
6
+ const e = {};
7
+ Object.defineProperty(e, "passive", {
8
+ get() {
9
+ f = !0;
10
+ }
11
+ }), window.addEventListener("test-passive", null, e);
12
+ } catch {
13
+ }
14
+ function w(e, o, c = {}) {
15
+ if (!i)
16
+ return;
17
+ const { target: n = window, passive: d = !1, capture: r = !1, depends: l = [] } = c;
18
+ let s;
19
+ const p = () => {
20
+ const t = a(n);
21
+ t && !s && (t.addEventListener(e, o, f ? { capture: r, passive: d } : r), s = !0);
22
+ }, u = () => {
23
+ const t = a(n);
24
+ t && s && (t.removeEventListener(e, o, r), s = !1);
25
+ };
26
+ v(() => (p(), () => u()), [n, ...l]);
27
+ }
28
+ export {
29
+ w as default,
30
+ f as supportsPassive
31
+ };
@@ -0,0 +1,18 @@
1
+ import { useRef as u, useCallback as n } from "react";
2
+ function s(t) {
3
+ const r = u(!1);
4
+ return n(async (...c) => {
5
+ if (!r.current) {
6
+ r.current = !0;
7
+ try {
8
+ const e = await t(...c);
9
+ return r.current = !1, e;
10
+ } catch (e) {
11
+ throw r.current = !1, e;
12
+ }
13
+ }
14
+ }, [t]);
15
+ }
16
+ export {
17
+ s as default
18
+ };
@@ -0,0 +1,32 @@
1
+ import "react";
2
+ function w(n, t) {
3
+ if (!n)
4
+ return t;
5
+ let e;
6
+ return typeof n == "function" ? e = n() : "current" in n ? e = n.current : e = n, e;
7
+ }
8
+ const l = typeof window < "u", o = /scroll|auto/i, f = l ? window : void 0;
9
+ function u(n) {
10
+ return n.tagName !== "HTML" && n.tagName !== "BODY" && n.nodeType === 1;
11
+ }
12
+ function c(n, t = f) {
13
+ t === void 0 && (t = window);
14
+ let e = n;
15
+ for (; e && e !== t && u(e); ) {
16
+ const { overflowY: i } = window.getComputedStyle(e);
17
+ if (o.test(i)) {
18
+ if (e.tagName !== "BODY")
19
+ return e;
20
+ const r = window.getComputedStyle(e.parentNode).overflowY;
21
+ if (o.test(r))
22
+ return e;
23
+ }
24
+ e = e.parentNode;
25
+ }
26
+ return t;
27
+ }
28
+ export {
29
+ c as getScrollParent,
30
+ w as getTargetElement,
31
+ l as inBrowser
32
+ };
@@ -0,0 +1,33 @@
1
+ import { useRef as t } from "react";
2
+ const h = 10;
3
+ function d(r, n) {
4
+ return r > n && r > h ? "horizontal" : n > r && n > h ? "vertical" : "";
5
+ }
6
+ function z() {
7
+ const r = t(0), n = t(0), u = t(0), o = t(0), s = t(0), i = t(0), e = t(""), c = t(null), X = () => e.current === "vertical", Y = () => e.current === "horizontal", f = () => {
8
+ u.current = 0, o.current = 0, s.current = 0, i.current = 0, e.current = "", c.current = null;
9
+ };
10
+ return {
11
+ move: (l) => {
12
+ const a = l.touches[0];
13
+ u.current = a.clientX < 0 ? 0 : a.clientX - r.current, o.current = a.clientY - n.current, s.current = Math.abs(u.current), i.current = Math.abs(o.current), c.current === null ? c.current = !0 : c.current = !1, e.current || (e.current = d(s.current, i.current));
14
+ },
15
+ start: (l) => {
16
+ f(), r.current = l.touches[0].clientX, n.current = l.touches[0].clientY;
17
+ },
18
+ reset: f,
19
+ startX: r,
20
+ startY: n,
21
+ deltaX: u,
22
+ deltaY: o,
23
+ offsetX: s,
24
+ offsetY: i,
25
+ direction: e,
26
+ isVertical: X,
27
+ isHorizontal: Y,
28
+ firstMove: c
29
+ };
30
+ }
31
+ export {
32
+ z as default
33
+ };