@pinnacle0/web-ui 0.4.37 → 0.4.38
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/core/Resizable/index.less +16 -16
- package/hooks/useDelayed.js +5 -3
- package/hooks/useDelayed.js.map +1 -1
- package/package.json +3 -3
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
&.top-right {
|
|
22
22
|
cursor: nesw-resize;
|
|
23
|
-
width:
|
|
24
|
-
height:
|
|
25
|
-
top: -@thickness;
|
|
26
|
-
left: calc(100% - @thickness);
|
|
23
|
+
width: @thickness;
|
|
24
|
+
height: @thickness;
|
|
25
|
+
top: -@half-thickness;
|
|
26
|
+
left: calc(100% - @half-thickness);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&.right {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
|
|
37
37
|
&.bottom-right {
|
|
38
38
|
cursor: nwse-resize;
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
41
|
-
top: calc(100% - @thickness);
|
|
42
|
-
left: calc(100% - @thickness);
|
|
39
|
+
width: @thickness;
|
|
40
|
+
height: @thickness;
|
|
41
|
+
top: calc(100% - @half-thickness);
|
|
42
|
+
left: calc(100% - @half-thickness);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&.bottom {
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
|
|
53
53
|
&.bottom-left {
|
|
54
54
|
cursor: nesw-resize;
|
|
55
|
-
width:
|
|
56
|
-
height:
|
|
57
|
-
top: calc(100% - @thickness);
|
|
58
|
-
left: -@thickness;
|
|
55
|
+
width: @thickness;
|
|
56
|
+
height: @thickness;
|
|
57
|
+
top: calc(100% - @half-thickness);
|
|
58
|
+
left: -@half-thickness;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
&.left {
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
|
|
69
69
|
&.top-left {
|
|
70
70
|
cursor: nwse-resize;
|
|
71
|
-
width:
|
|
72
|
-
height:
|
|
73
|
-
top: -@thickness;
|
|
74
|
-
left: -@thickness;
|
|
71
|
+
width: @thickness;
|
|
72
|
+
height: @thickness;
|
|
73
|
+
top: -@half-thickness;
|
|
74
|
+
left: -@half-thickness;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
package/hooks/useDelayed.js
CHANGED
|
@@ -23,15 +23,17 @@ export function useDelayedWhen(value, when, exceeded) {
|
|
|
23
23
|
var _a = __read(React.useState(value), 2), delayed = _a[0], setDelayed = _a[1];
|
|
24
24
|
var whenRef = React.useRef(when);
|
|
25
25
|
whenRef.current = when;
|
|
26
|
+
var exceededRef = React.useRef(exceeded);
|
|
27
|
+
exceededRef.current = exceeded;
|
|
26
28
|
React.useEffect(function () {
|
|
27
|
-
if (
|
|
28
|
-
var id_1 = window.setTimeout(function () { return setDelayed(value); },
|
|
29
|
+
if (whenRef.current(value)) {
|
|
30
|
+
var id_1 = window.setTimeout(function () { return setDelayed(value); }, exceededRef.current);
|
|
29
31
|
return function () { return window.clearTimeout(id_1); };
|
|
30
32
|
}
|
|
31
33
|
else {
|
|
32
34
|
setDelayed(value);
|
|
33
35
|
}
|
|
34
|
-
}, [value
|
|
36
|
+
}, [value]);
|
|
35
37
|
return delayed;
|
|
36
38
|
}
|
|
37
39
|
export function useDelayed(value, exceeded) {
|
package/hooks/useDelayed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDelayed.js","sourceRoot":"","sources":["../../src/hooks/useDelayed.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,UAAU,cAAc,CAAI,KAAQ,EAAE,IAA2B,EAAE,QAAsB;IAAtB,yBAAA,EAAA,cAAsB;IACrF,IAAA,KAAA,OAAwB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAA,EAA5C,OAAO,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KAAQ,EAAE,QAAgB;IACpD,OAAO,cAAc,CAAI,KAAK,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc,EAAE,QAAsB;IAAtB,yBAAA,EAAA,cAAsB;IACpE,OAAO,cAAc,CAAC,KAAK,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,IAAI,EAAV,CAAU,EAAE,QAAQ,CAAC,CAAC;AAC5D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinnacle0/web-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.38",
|
|
4
4
|
"author": "Pinnacle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"react-dom": "18.2.0",
|
|
53
53
|
"react-router-dom": "5.3.0",
|
|
54
54
|
"typescript": "4.9.5",
|
|
55
|
-
"@pinnacle0/
|
|
56
|
-
"@pinnacle0/
|
|
55
|
+
"@pinnacle0/webpack-util": "0.4.47",
|
|
56
|
+
"@pinnacle0/devtool-util": "1.2.2"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"directory": "build"
|