grevlingui 0.1.24 → 0.1.25
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.
|
@@ -4,24 +4,26 @@
|
|
|
4
4
|
position: relative;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
.numberSelect_editing {
|
|
8
|
+
z-index: 2;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
.numberSelect_value {
|
|
8
12
|
position: relative;
|
|
9
13
|
display: flex;
|
|
10
14
|
align-items: center;
|
|
11
15
|
justify-content: center;
|
|
12
16
|
border-radius: 100%;
|
|
13
|
-
z-index:
|
|
17
|
+
z-index: 2;
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
.numberSelect_increment {
|
|
17
21
|
border-radius: 100%;
|
|
18
22
|
position: absolute;
|
|
19
|
-
z-index:
|
|
23
|
+
z-index: 3;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
.numberSelect_blur {
|
|
23
27
|
position: absolute;
|
|
24
|
-
opacity: .5;
|
|
25
|
-
/*background: radial-gradient(#1E90FFFF, #1E90FFFF, #1E90FF00, #1E90FF00, #1E90FF00);*/
|
|
26
28
|
z-index: 1;
|
|
27
29
|
}
|
|
@@ -30,9 +30,7 @@ const NumberSelect = _ref => {
|
|
|
30
30
|
size = 5,
|
|
31
31
|
color = 'white',
|
|
32
32
|
numberBgColor = '#663399',
|
|
33
|
-
selectorColor = '#1E90FF'
|
|
34
|
-
pointerShadowColor = '#33333390',
|
|
35
|
-
top = -16
|
|
33
|
+
selectorColor = '#1E90FF'
|
|
36
34
|
} = _ref;
|
|
37
35
|
const [editing, setEditing] = (0, _react.useState)(false);
|
|
38
36
|
const fullSize = "".concat(size, "rem");
|
|
@@ -57,7 +55,7 @@ const NumberSelect = _ref => {
|
|
|
57
55
|
});
|
|
58
56
|
|
|
59
57
|
const blurStyle = {
|
|
60
|
-
background: "radial-gradient(".concat(
|
|
58
|
+
background: "radial-gradient(".concat(numberBgColor, "FF, ").concat(numberBgColor, "00, ").concat(numberBgColor, "00)"),
|
|
61
59
|
left: minusHalfSize,
|
|
62
60
|
right: minusHalfSize,
|
|
63
61
|
top: incrementorVerticalOffset,
|
|
@@ -74,13 +72,14 @@ const NumberSelect = _ref => {
|
|
|
74
72
|
d: "M480-345 240-585l43-43 197 198 197-197 43 43-240 239Z"
|
|
75
73
|
}));
|
|
76
74
|
|
|
77
|
-
const increment = change => () =>
|
|
78
|
-
const nv = change +
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
const increment = change => () => {
|
|
76
|
+
const nv = change + value;
|
|
77
|
+
if (nv > max || nv < min) return;
|
|
78
|
+
setValue(nv);
|
|
79
|
+
};
|
|
81
80
|
|
|
82
81
|
const renderInputs = () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
83
|
-
className: "numberSelect_increment numberSelect_add",
|
|
82
|
+
className: "numberSelect_increment numberSelect_add ".concat(editing ? 'numberSelect_editing' : ''),
|
|
84
83
|
style: addStyle,
|
|
85
84
|
onClick: increment(1)
|
|
86
85
|
}, icon(true)), /*#__PURE__*/_react.default.createElement("div", {
|