@unicom-cloud/ui 0.8.101 → 0.8.102

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 (122) hide show
  1. package/Badge.js +7 -54
  2. package/Copy.js +5 -4
  3. package/LiquidFill.js +5 -4
  4. package/List.js +1 -1
  5. package/Marquee.js +5 -4
  6. package/QrCode.js +5 -4
  7. package/Tooltip.js +3 -4
  8. package/Tour.js +5 -4
  9. package/anchor/Anchor.js +12 -12
  10. package/anchor/util.js +10 -10
  11. package/back-top/index.js +7 -7
  12. package/badge/index.js +109 -162
  13. package/card/index.js +63 -43
  14. package/color-picker/InputHex.js +3 -4
  15. package/color-picker/InputRgb.js +7 -8
  16. package/color-picker/Palette.js +3 -4
  17. package/color-picker/Panel.js +3 -4
  18. package/color-picker/colors.js +5 -5
  19. package/color-picker/hooks/useColorPicker.js +3 -4
  20. package/color-picker/utils.js +14 -15
  21. package/components/common/utils/PqbCSSTransition.js +1 -1
  22. package/components/common/utils/constant.js +6 -3
  23. package/components/common/utils/reactDOM.js +6 -4
  24. package/components/common/utils/{scrollIntoView.js → scrollIntoViewIfNeeded.js} +1 -1
  25. package/components/common/utils/setPrimaryColor.js +18 -18
  26. package/components/common/utils/setTheme.js +8 -9
  27. package/copy/index.js +3 -2
  28. package/dist/scroll-into-view-if-needed/compute/index.js +126 -0
  29. package/dist/scroll-into-view-if-needed/smooth/index.js +70 -0
  30. package/dist/scroll-into-view-if-needed/src/index.js +19 -19
  31. package/form/FormItem.js +69 -65
  32. package/form/context.js +6 -7
  33. package/grid/Col-.js +86 -0
  34. package/grid/Col.js +156 -73
  35. package/grid/Grid.js +71 -67
  36. package/grid/Row.js +3 -3
  37. package/grid/index.js +13 -13
  38. package/index.js +639 -662
  39. package/input/Textarea.js +1 -1
  40. package/input/autoSizeTextAreaHeight.js +7 -7
  41. package/liquid-fill/index.js +5 -4
  42. package/list/index.js +1 -1
  43. package/marquee/index.js +5 -4
  44. package/menu/Item.js +9 -9
  45. package/package.json +1 -1
  46. package/qr-code/index.js +5 -4
  47. package/splitter/SplitBar.js +81 -79
  48. package/splitter/Splitter.js +70 -78
  49. package/splitter/hooks/useResizable.js +9 -18
  50. package/splitter/hooks/useResize.js +10 -10
  51. package/splitter/hooks/useSizes.js +28 -28
  52. package/statistic/index.js +10 -10
  53. package/style.css +1 -1
  54. package/table/Table.js +369 -370
  55. package/table/hook/useThResizable.js +5 -4
  56. package/table/th-resizable/index.js +12 -11
  57. package/time-picker/util.js +8 -8
  58. package/tooltip/index.js +1 -2
  59. package/tour/index.js +5 -4
  60. package/tree/NodeList.js +1 -1
  61. package/types/common/utils/constant.d.ts +1 -0
  62. package/types/common/utils/scrollIntoViewIfNeeded.d.ts +4 -0
  63. package/types/common/utils/tree.d.ts +1 -0
  64. package/types/common/utils/tween.d.ts +1 -0
  65. package/types/pc/anchor/util.d.ts +1 -1
  66. package/types/pc/badge/interface.d.ts +2 -0
  67. package/types/pc/card/interface.d.ts +8 -0
  68. package/types/pc/color-picker/hooks/useColorPicker.d.ts +7 -2
  69. package/types/pc/color-picker/utils.d.ts +6 -1
  70. package/types/pc/form/FormItem.d.ts +1 -1
  71. package/types/pc/grid/Col-.d.ts +4 -0
  72. package/types/pc/grid/Col.d.ts +3 -2
  73. package/types/pc/grid/Grid.d.ts +2 -2
  74. package/types/pc/grid/Item.d.ts +3 -3
  75. package/types/pc/grid/Row.d.ts +2 -2
  76. package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
  77. package/types/pc/grid/interface.d.ts +13 -7
  78. package/types/pc/splitter/SplitBar.d.ts +0 -1
  79. package/types/pc/splitter/hooks/useResizable.d.ts +0 -1
  80. package/types/pc/splitter/hooks/useResize.d.ts +1 -2
  81. package/types/pc/splitter/interface.d.ts +0 -8
  82. package/types/pc/tour/index.d.ts +1 -1
  83. package/types/pc/upload/interface.d.ts +1 -0
  84. package/types/pc/utils/constant.d.ts +1 -2
  85. package/types/pc/utils/dayjs.d.ts +2 -1
  86. package/types/pc/utils/index.d.ts +2 -5
  87. package/types/pc/utils/scrollIntoViewIfNeeded.d.ts +3 -0
  88. package/types/pc/utils/tree.d.ts +2 -1
  89. package/types/pc/utils/tween.d.ts +1 -1
  90. package/typography/Ellipsis.js +5 -4
  91. package/typography/Operations.js +5 -4
  92. package/upload/request.js +12 -13
  93. package/upload/request_.js +2 -3
  94. package/utils/constant.js +5 -5
  95. package/utils/dayjs.js +13 -12
  96. package/utils/index.js +261 -284
  97. package/utils/scrollIntoViewIfNeeded.js +12 -0
  98. package/utils/tree.js +11 -9
  99. package/utils/tween.js +5 -5
  100. package/version/index.js +1 -1
  101. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +0 -6
  102. package/dist/compute-scroll-into-view/src/index.js +0 -126
  103. package/dist/tinycolor/chunk/BOzCVdr0.js +0 -182
  104. package/dist/tinycolor/customize/index.js +0 -12
  105. package/dist/tinycolor/src/conversion.js +0 -143
  106. package/dist/tinycolor/src/css-color-names.js +0 -153
  107. package/dist/tinycolor/src/format-input.js +0 -77
  108. package/dist/tinycolor/src/index.js +0 -388
  109. package/dist/tinycolor/src/util.js +0 -32
  110. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
  111. package/types/common/utils/scrollIntoView.d.ts +0 -4
  112. package/types/common/utils/tinycolor.d.ts +0 -1
  113. package/types/pc/utils/color.d.ts +0 -1
  114. package/types/pc/utils/computeScrollIntoView.d.ts +0 -1
  115. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +0 -3
  116. package/types/pc/utils/scrollIntoView.d.ts +0 -3
  117. package/types/pc/utils/tinycolor.d.ts +0 -1
  118. package/utils/color.js +0 -4
  119. package/utils/computeScrollIntoView.js +0 -6
  120. package/utils/convertToDurationBasedOnTimeUnits.js +0 -6
  121. package/utils/scrollIntoView.js +0 -6
  122. package/utils/tinycolor.js +0 -29
package/input/Textarea.js CHANGED
@@ -49,7 +49,7 @@ const ge = (e, A) => {
49
49
  beforeTriggerValueChangeCallback: (t) => {
50
50
  !("value" in e) && (n === void 0 || t.length <= n) && U(t);
51
51
  }
52
- }), S = F || l || "", { getPrefixCls: J, rtl: g } = ne(de), o = J?.("textarea"), z = s || e.resize === "none" || C(e.autoSize) && !w(e.autoSize.minRows) && !w(e.autoSize.maxRows) && e.autoSize?.minRows === e.autoSize?.maxRows || !w(e.rows);
52
+ }), S = F || l || "", { getPrefixCls: J, rtl: g } = ne(de), o = J?.("textarea"), z = s || e.resize === "none" || !w(e.rows) || C(e.autoSize) && !w(e.autoSize.minRows) && !w(e.autoSize.maxRows) && e.autoSize?.minRows === e.autoSize?.maxRows;
53
53
  z ? f.resize = "none" : e.resize && (f.resize = e.resize);
54
54
  const y = () => {
55
55
  if (r.current && r.current.focus) {
@@ -32,11 +32,11 @@ function y(n) {
32
32
  r || (r = document.createElement("textarea"), document.body.appendChild(r));
33
33
  const t = window.getComputedStyle(n), m = w.map((a) => `${a}:${t.getPropertyValue(a)}`).join(";");
34
34
  r.setAttribute("style", u + m);
35
- const e = parseFloat(t.getPropertyValue("padding-top")) + parseFloat(t.getPropertyValue("padding-bottom")), i = t.getPropertyValue("box-sizing"), l = parseFloat(t.getPropertyValue("border-top-width")) + parseFloat(t.getPropertyValue("border-bottom-width"));
35
+ const e = parseFloat(t.getPropertyValue("padding-top")) + parseFloat(t.getPropertyValue("padding-bottom")), i = t.getPropertyValue("box-sizing"), g = parseFloat(t.getPropertyValue("border-top-width")) + parseFloat(t.getPropertyValue("border-bottom-width"));
36
36
  return {
37
37
  paddingSize: e,
38
38
  boxSizing: i,
39
- borderSize: l
39
+ borderSize: g
40
40
  };
41
41
  }
42
42
  function H(n, t) {
@@ -48,16 +48,16 @@ function H(n, t) {
48
48
  };
49
49
  };
50
50
  if (n) {
51
- const { minRows: e, maxRows: i } = m(), l = t, { paddingSize: a, boxSizing: x, borderSize: p } = y(l);
52
- r.value = l.value || l.placeholder || "";
53
- let d = r.scrollHeight + p, g, o, h;
51
+ const { minRows: e, maxRows: i } = m(), g = t, { paddingSize: a, boxSizing: x, borderSize: p } = y(g);
52
+ r.value = g.value || g.placeholder || "";
53
+ let d = r.scrollHeight + p, l, o, h;
54
54
  if (e || i) {
55
55
  r.value = "";
56
56
  const f = r.scrollHeight - a;
57
- c(e) && (g = f * e, x === "border-box" && (g += a, g += p), d = Math.max(d, g)), c(i) && (o = f * i, x === "border-box" && (o += a, o += p), h = d > o ? "auto" : "", o = Math.min(d, o));
57
+ c(e) && (l = f * e, x === "border-box" && (l += a, l += p), d = Math.max(d, l)), c(i) && (o = f * i, x === "border-box" && (o += a, o += p), h = d > o ? "auto" : "", o = Math.min(d, o));
58
58
  }
59
59
  const s = {};
60
- return s.height = d, g && (s.minHeight = g), o && (s.maxHeight = o), h && (s.overflowY = h), s;
60
+ return s.height = d, l && (s.minHeight = l), o && (s.maxHeight = o), h && (s.overflowY = h), s;
61
61
  }
62
62
  }
63
63
  export {
@@ -13,12 +13,11 @@ import "../components/common/utils/reactDOM.js";
13
13
  import "@unicom-cloud/utils/constant";
14
14
  import mt from "../components/common/hooks/useUpdateEffect.js";
15
15
  import "lodash/debounce";
16
+ import "@unicom-cloud/utils/date";
16
17
  import "@unicom-cloud/utils/case-name";
17
18
  import lt from "@unicom-cloud/utils/class-name";
18
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
19
19
  import "@unicom-cloud/utils/constant/ui";
20
20
  import "../utils/contextHolder.js";
21
- import "@unicom-cloud/utils/dayjs";
22
21
  import "@unicom-cloud/utils/clipboard-copy";
23
22
  import "../components/common/utils/dayjs.js";
24
23
  import "@unicom-cloud/utils/file/fileToURL";
@@ -49,6 +48,8 @@ import "../dist/react-transition-group/chunk/CPfP7aNL.js";
49
48
  import "../dist/react-transition-group/src/TransitionGroup.js";
50
49
  import "@unicom-cloud/utils/file/saveAs";
51
50
  import "@unicom-cloud/utils/screenfull";
51
+ import "@unicom-cloud/utils/tinycolor";
52
+ import "@unicom-cloud/utils/ui-color";
52
53
  import "@unicom-cloud/utils/constant/ui.js";
53
54
  import "react-is";
54
55
  import "@unicom-cloud/utils/tree";
@@ -73,7 +74,7 @@ const dt = {
73
74
  decimalPlaces: 0,
74
75
  percentFontScale: 0.5,
75
76
  waveSpeedVariation: 0.5
76
- }, ge = (E) => {
77
+ }, we = (E) => {
77
78
  const { getPrefixCls: I, componentConfig: _ } = at(pt), i = I?.("liquid-fill"), H = st(
78
79
  E,
79
80
  dt,
@@ -254,5 +255,5 @@ const dt = {
254
255
  );
255
256
  };
256
257
  export {
257
- ge as default
258
+ we as default
258
259
  };
package/list/index.js CHANGED
@@ -10,7 +10,7 @@ import Tt from "../spin/index.js";
10
10
  import x from "@unicom-cloud/utils/class-name";
11
11
  import { omit as Bt } from "../components/common/utils/omit.js";
12
12
  import { pickDataAttributes as Vt } from "../components/common/utils/pick.js";
13
- import { scrollIntoView as _t } from "../components/common/utils/scrollIntoView.js";
13
+ import { scrollIntoView as _t } from "../components/common/utils/scrollIntoViewIfNeeded.js";
14
14
  import kt from "../virtual-list/VirtualList.js";
15
15
  import Gt from "./Item.js";
16
16
  import Ot from "../config-provider/context.js";
package/marquee/index.js CHANGED
@@ -12,12 +12,11 @@ import V from "../components/common/hooks/useMergeProps.js";
12
12
  import "../components/common/utils/reactDOM.js";
13
13
  import "@unicom-cloud/utils/constant";
14
14
  import "lodash/debounce";
15
+ import "@unicom-cloud/utils/date";
15
16
  import "@unicom-cloud/utils/case-name";
16
17
  import Z from "@unicom-cloud/utils/class-name";
17
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
18
18
  import "@unicom-cloud/utils/constant/ui";
19
19
  import "../utils/contextHolder.js";
20
- import "@unicom-cloud/utils/dayjs";
21
20
  import "@unicom-cloud/utils/clipboard-copy";
22
21
  import "../components/common/utils/dayjs.js";
23
22
  import "@unicom-cloud/utils/file/fileToURL";
@@ -49,6 +48,8 @@ import "../dist/react-transition-group/src/TransitionGroup.js";
49
48
  import { resizeObserver as _ } from "../components/common/utils/resizeObserver.js";
50
49
  import "@unicom-cloud/utils/file/saveAs";
51
50
  import "@unicom-cloud/utils/screenfull";
51
+ import "@unicom-cloud/utils/tinycolor";
52
+ import "@unicom-cloud/utils/ui-color";
52
53
  import "@unicom-cloud/utils/constant/ui.js";
53
54
  import "react-is";
54
55
  import "@unicom-cloud/utils/tree";
@@ -65,7 +66,7 @@ const et = {
65
66
  loop: 0,
66
67
  // 0表示无限循环
67
68
  gradientSize: 50
68
- }, ae = (q) => {
69
+ }, ce = (q) => {
69
70
  const { getPrefixCls: O, componentConfig: P } = U(tt), s = O?.("marquee"), R = V(
70
71
  q,
71
72
  et,
@@ -279,5 +280,5 @@ const et = {
279
280
  );
280
281
  };
281
282
  export {
282
- ae as default
283
+ ce as default
283
284
  };
package/menu/Item.js CHANGED
@@ -5,11 +5,11 @@ import U from "../components/common/hooks/useIsFirstRender.js";
5
5
  import z from "../tooltip/index.js";
6
6
  import A from "@unicom-cloud/utils/class-name";
7
7
  import { Enter as H } from "@unicom-cloud/utils/constant/keyboardCode";
8
- import { omit as h } from "../components/common/utils/omit.js";
8
+ import { omit as b } from "../components/common/utils/omit.js";
9
9
  import V from "./Indent.js";
10
10
  import W from "./context.js";
11
11
  import { PROPS_NEED_TO_BE_PASSED_IN_SUBMENU as q } from "./util.js";
12
- function G(b, c) {
12
+ function G(C, c) {
13
13
  const {
14
14
  _key: a,
15
15
  children: i,
@@ -21,7 +21,7 @@ function G(b, c) {
21
21
  onClick: _,
22
22
  renderItemInTooltip: d,
23
23
  ...$
24
- } = b, {
24
+ } = C, {
25
25
  prefixCls: t,
26
26
  mode: p,
27
27
  collapse: m,
@@ -74,7 +74,7 @@ function G(b, c) {
74
74
  onKeyDown: (e) => {
75
75
  e.key === H.key && k(e);
76
76
  },
77
- ...h(
77
+ ...b(
78
78
  $,
79
79
  ["key", "_key"].concat(q)
80
80
  ),
@@ -113,14 +113,14 @@ function G(b, c) {
113
113
  className: `${t}-item-tooltip`,
114
114
  ...y?.triggerProps || {}
115
115
  },
116
- ...h(y, ["triggerProps"]),
116
+ ...b(y, ["triggerProps"]),
117
117
  children: g
118
118
  }
119
119
  ) : g;
120
120
  }
121
- const J = O(G), C = J;
122
- C.displayName = "MenuItem";
123
- C.menuType = "MenuItem";
121
+ const J = O(G), h = J;
122
+ h.displayName = "MenuItem";
123
+ h.menuType = "MenuItem";
124
124
  export {
125
- C as default
125
+ h as default
126
126
  };
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@unicom-cloud/ui","version":"0.8.101","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
1
+ {"name":"@unicom-cloud/ui","version":"0.8.102","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
package/qr-code/index.js CHANGED
@@ -13,12 +13,11 @@ import R from "../components/common/hooks/useMergeProps.js";
13
13
  import "../components/common/utils/reactDOM.js";
14
14
  import "@unicom-cloud/utils/constant";
15
15
  import "lodash/debounce";
16
+ import "@unicom-cloud/utils/date";
16
17
  import "@unicom-cloud/utils/case-name";
17
18
  import S from "@unicom-cloud/utils/class-name";
18
- import "../dist/tinycolor/chunk/BOzCVdr0.js";
19
19
  import "@unicom-cloud/utils/constant/ui";
20
20
  import "../utils/contextHolder.js";
21
- import "@unicom-cloud/utils/dayjs";
22
21
  import "@unicom-cloud/utils/clipboard-copy";
23
22
  import "../components/common/utils/dayjs.js";
24
23
  import "@unicom-cloud/utils/file/fileToURL";
@@ -49,6 +48,8 @@ import "../dist/react-transition-group/chunk/CPfP7aNL.js";
49
48
  import "../dist/react-transition-group/src/TransitionGroup.js";
50
49
  import "@unicom-cloud/utils/file/saveAs";
51
50
  import "@unicom-cloud/utils/screenfull";
51
+ import "@unicom-cloud/utils/tinycolor";
52
+ import "@unicom-cloud/utils/ui-color";
52
53
  import "@unicom-cloud/utils/constant/ui.js";
53
54
  import "react-is";
54
55
  import "@unicom-cloud/utils/tree";
@@ -65,7 +66,7 @@ const q = {
65
66
  bgColor: "#ffffff",
66
67
  marginSize: 0,
67
68
  value: "qr-code"
68
- }, $o = (e) => {
69
+ }, jo = (e) => {
69
70
  const { getPrefixCls: s, componentConfig: n } = Q(h), d = R(
70
71
  e,
71
72
  q,
@@ -113,5 +114,5 @@ const q = {
113
114
  );
114
115
  };
115
116
  export {
116
- $o as default
117
+ jo as default
117
118
  };
@@ -1,127 +1,129 @@
1
- import { jsxs as H, jsx as l } from "react/jsx-runtime";
2
- import J from "@unicom-cloud/icons/IconUiDown";
3
- import K from "@unicom-cloud/icons/IconUiLeft";
4
- import Q from "@unicom-cloud/icons/IconUiRight";
5
- import W from "@unicom-cloud/icons/IconUiUp";
6
- import x from "react";
1
+ import { jsxs as G, jsx as l } from "react/jsx-runtime";
2
+ import H from "@unicom-cloud/icons/IconUiDown";
3
+ import J from "@unicom-cloud/icons/IconUiLeft";
4
+ import K from "@unicom-cloud/icons/IconUiRight";
5
+ import Q from "@unicom-cloud/icons/IconUiUp";
6
+ import E from "react";
7
7
  import "../config-provider/ConfigProvider.js";
8
- import d from "@unicom-cloud/utils/class-name";
9
- import y from "./hooks/useEvent.js";
10
- import Z from "../config-provider/context.js";
11
- function L(f) {
12
- return typeof f == "number" && !Number.isNaN(f) ? Math.round(f) : 0;
8
+ import f from "@unicom-cloud/utils/class-name";
9
+ import Y from "./hooks/useEvent.js";
10
+ import W from "../config-provider/context.js";
11
+ function O(d) {
12
+ return typeof d == "number" && !Number.isNaN(d) ? Math.round(d) : 0;
13
13
  }
14
- const le = (f) => {
15
- const { getPrefixCls: z } = x.useContext(Z), {
14
+ const ie = (d) => {
15
+ const { getPrefixCls: y } = E.useContext(W), {
16
16
  prefixCls: I,
17
- vertical: n,
18
- index: s,
19
- active: T,
17
+ vertical: s,
18
+ index: n,
19
+ active: z,
20
20
  ariaNow: $,
21
- ariaMin: C,
22
- ariaMax: E,
23
- resizable: M,
24
- startCollapsible: j,
25
- endCollapsible: k,
26
- onOffsetStart: O,
27
- onOffsetUpdate: N,
28
- onOffsetEnd: b,
29
- onCollapse: S,
21
+ ariaMin: M,
22
+ ariaMax: N,
23
+ startCollapsible: T,
24
+ endCollapsible: j,
25
+ onOffsetStart: S,
26
+ onOffsetUpdate: v,
27
+ onOffsetEnd: h,
28
+ onCollapse: P,
30
29
  lazy: a,
31
30
  containerSize: m
32
- } = f, e = z?.("bar", I), [r, v] = x.useState(
31
+ } = d, e = y?.("bar", I), [r, w] = E.useState(
33
32
  null
34
- ), [h, P] = x.useState(0), A = n ? 0 : h, D = n ? h : 0, R = (t) => {
35
- M && t.currentTarget && (v([t.pageX, t.pageY]), O(s));
36
- }, V = (t) => {
37
- if (M && t.touches.length === 1) {
33
+ ), [g, U] = E.useState(0), k = s ? 0 : g, A = s ? g : 0, D = (t) => {
34
+ t.currentTarget && (w([t.pageX, t.pageY]), S(n));
35
+ }, R = (t) => {
36
+ if (t.touches.length === 1) {
38
37
  const o = t.touches[0];
39
- v([o.pageX, o.pageY]), O(s);
38
+ w([o.pageX, o.pageY]), S(n);
40
39
  }
41
- }, B = (t) => {
42
- const o = m * $ / 100, c = o + t, w = Math.max(0, m * C / 100), i = Math.min(m, m * E / 100);
43
- return Math.max(w, Math.min(i, c)) - o;
44
- }, U = y((t, o) => {
45
- const c = B(
46
- n ? o : t
40
+ }, V = (t) => {
41
+ const o = m * $ / 100, c = o + t, x = Math.max(0, m * M / 100), i = Math.min(m, m * N / 100);
42
+ return Math.max(x, Math.min(i, c)) - o;
43
+ }, L = Y((t, o) => {
44
+ const c = V(
45
+ s ? o : t
47
46
  );
48
- P(c);
49
- }), X = y(() => {
50
- N(s, A, D, !0), P(0), b(!0);
47
+ U(c);
48
+ }), b = Y(() => {
49
+ v(n, k, A, !0), U(0), h(!0);
51
50
  });
52
- x.useEffect(() => {
51
+ E.useEffect(() => {
53
52
  if (r) {
54
53
  const t = (i) => {
55
- const { pageX: u, pageY: g } = i, p = u - r[0], Y = g - r[1];
56
- a ? U(p, Y) : N(s, p, Y);
54
+ const { pageX: u, pageY: C } = i, p = u - r[0], X = C - r[1];
55
+ a ? L(p, X) : v(n, p, X);
57
56
  }, o = () => {
58
- a ? X() : b(), v(null);
57
+ a ? b() : h(), w(null);
59
58
  }, c = (i) => {
60
59
  if (i.touches.length === 1) {
61
- const u = i.touches[0], g = u.pageX - r[0], p = u.pageY - r[1];
62
- a ? U(g, p) : N(s, g, p);
60
+ const u = i.touches[0], C = u.pageX - r[0], p = u.pageY - r[1];
61
+ a ? L(C, p) : v(n, C, p);
63
62
  }
64
- }, w = () => {
65
- a ? X() : b(), v(null);
63
+ }, x = () => {
64
+ a ? b() : h(), w(null);
66
65
  };
67
- return window.addEventListener("touchmove", c), window.addEventListener("touchend", w), window.addEventListener("mousemove", t), window.addEventListener("mouseup", o), () => {
68
- window.removeEventListener("mousemove", t), window.removeEventListener("mouseup", o), window.removeEventListener("touchmove", c), window.removeEventListener("touchend", w);
66
+ return window.addEventListener("touchmove", c), window.addEventListener("touchend", x), window.addEventListener("mousemove", t), window.addEventListener("mouseup", o), () => {
67
+ window.removeEventListener("mousemove", t), window.removeEventListener("mouseup", o), window.removeEventListener("touchmove", c), window.removeEventListener("touchend", x);
69
68
  };
70
69
  }
71
70
  }, [
72
71
  r,
73
72
  a,
74
- n,
75
73
  s,
74
+ n,
76
75
  m,
77
76
  $,
78
- C,
79
- E
77
+ M,
78
+ N,
79
+ L,
80
+ v,
81
+ b,
82
+ h
80
83
  ]);
81
- const q = {
82
- [`--${e}-preview-offset`]: `${h}px`
83
- }, F = n ? W : K, G = n ? J : Q;
84
- return /* @__PURE__ */ H(
84
+ const B = {
85
+ [`--${e}-preview-offset`]: `${g}px`
86
+ }, q = s ? Q : J, F = s ? H : K;
87
+ return /* @__PURE__ */ G(
85
88
  "div",
86
89
  {
87
90
  className: e,
88
91
  role: "separator",
89
- "aria-valuenow": L($),
90
- "aria-valuemin": L(C),
91
- "aria-valuemax": L(E),
92
+ "aria-valuenow": O($),
93
+ "aria-valuemin": O(M),
94
+ "aria-valuemax": O(N),
92
95
  children: [
93
96
  a && /* @__PURE__ */ l(
94
97
  "div",
95
98
  {
96
- className: d(`${e}-preview`, {
97
- [`${e}-preview-active`]: !!h
99
+ className: f(`${e}-preview`, {
100
+ [`${e}-preview-active`]: !!g
98
101
  }),
99
- style: q
102
+ style: B
100
103
  }
101
104
  ),
102
105
  /* @__PURE__ */ l(
103
106
  "div",
104
107
  {
105
- className: d(`${e}-dragger`, {
106
- [`${e}-dragger-disabled`]: !M,
107
- [`${e}-dragger-active`]: T
108
+ className: f(`${e}-dragger`, {
109
+ [`${e}-dragger-active`]: z
108
110
  }),
109
- onMouseDown: R,
110
- onTouchStart: V
111
+ onMouseDown: D,
112
+ onTouchStart: R
111
113
  }
112
114
  ),
113
- j && /* @__PURE__ */ l(
115
+ T && /* @__PURE__ */ l(
114
116
  "div",
115
117
  {
116
- className: d(
118
+ className: f(
117
119
  `${e}-collapse-bar`,
118
120
  `${e}-collapse-bar-start`
119
121
  ),
120
- onClick: () => S(s, "start"),
122
+ onClick: () => P(n, "start"),
121
123
  children: /* @__PURE__ */ l(
122
- F,
124
+ q,
123
125
  {
124
- className: d(
126
+ className: f(
125
127
  `${e}-collapse-icon`,
126
128
  `${e}-collapse-start`
127
129
  )
@@ -129,18 +131,18 @@ const le = (f) => {
129
131
  )
130
132
  }
131
133
  ),
132
- k && /* @__PURE__ */ l(
134
+ j && /* @__PURE__ */ l(
133
135
  "div",
134
136
  {
135
- className: d(
137
+ className: f(
136
138
  `${e}-collapse-bar`,
137
139
  `${e}-collapse-bar-end`
138
140
  ),
139
- onClick: () => S(s, "end"),
141
+ onClick: () => P(n, "end"),
140
142
  children: /* @__PURE__ */ l(
141
- G,
143
+ F,
142
144
  {
143
- className: d(
145
+ className: f(
144
146
  `${e}-collapse-icon`,
145
147
  `${e}-collapse-end`
146
148
  )
@@ -153,5 +155,5 @@ const le = (f) => {
153
155
  );
154
156
  };
155
157
  export {
156
- le as default
158
+ ie as default
157
159
  };