@react-stately/slider 3.5.4-nightly.4624 → 3.5.5-nightly.4629
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.
|
@@ -23,7 +23,7 @@ const $e86753598efd0f02$var$DEFAULT_MIN_VALUE = 0;
|
|
|
23
23
|
const $e86753598efd0f02$var$DEFAULT_MAX_VALUE = 100;
|
|
24
24
|
const $e86753598efd0f02$var$DEFAULT_STEP_VALUE = 1;
|
|
25
25
|
function $e86753598efd0f02$export$e5fda3247f5d67f9(props) {
|
|
26
|
-
const { isDisabled: isDisabled = false, minValue: minValue = $e86753598efd0f02$var$DEFAULT_MIN_VALUE, maxValue: maxValue = $e86753598efd0f02$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step: step = $e86753598efd0f02$var$DEFAULT_STEP_VALUE, orientation: orientation =
|
|
26
|
+
const { isDisabled: isDisabled = false, minValue: minValue = $e86753598efd0f02$var$DEFAULT_MIN_VALUE, maxValue: maxValue = $e86753598efd0f02$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step: step = $e86753598efd0f02$var$DEFAULT_STEP_VALUE, orientation: orientation = 'horizontal' } = props;
|
|
27
27
|
// Page step should be at least equal to step and always a multiple of the step.
|
|
28
28
|
let pageSize = (0, $1NNdE$react.useMemo)(()=>{
|
|
29
29
|
let calcPageSize = (maxValue - minValue) / 10;
|
|
@@ -167,7 +167,7 @@ function $e86753598efd0f02$var$convertValue(value) {
|
|
|
167
167
|
}
|
|
168
168
|
function $e86753598efd0f02$var$createOnChange(value, defaultValue, onChange) {
|
|
169
169
|
return (newValue)=>{
|
|
170
|
-
if (typeof value ===
|
|
170
|
+
if (typeof value === 'number' || typeof defaultValue === 'number') onChange === null || onChange === void 0 ? void 0 : onChange(newValue[0]);
|
|
171
171
|
else onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
172
172
|
};
|
|
173
173
|
}
|
package/dist/useSliderState.mjs
CHANGED
|
@@ -17,7 +17,7 @@ const $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE = 0;
|
|
|
17
17
|
const $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE = 100;
|
|
18
18
|
const $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE = 1;
|
|
19
19
|
function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
|
|
20
|
-
const { isDisabled: isDisabled = false, minValue: minValue = $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE, maxValue: maxValue = $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step: step = $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE, orientation: orientation =
|
|
20
|
+
const { isDisabled: isDisabled = false, minValue: minValue = $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE, maxValue: maxValue = $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step: step = $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE, orientation: orientation = 'horizontal' } = props;
|
|
21
21
|
// Page step should be at least equal to step and always a multiple of the step.
|
|
22
22
|
let pageSize = (0, $BT4Uh$useMemo)(()=>{
|
|
23
23
|
let calcPageSize = (maxValue - minValue) / 10;
|
|
@@ -161,7 +161,7 @@ function $28f99e3e86e6ec45$var$convertValue(value) {
|
|
|
161
161
|
}
|
|
162
162
|
function $28f99e3e86e6ec45$var$createOnChange(value, defaultValue, onChange) {
|
|
163
163
|
return (newValue)=>{
|
|
164
|
-
if (typeof value ===
|
|
164
|
+
if (typeof value === 'number' || typeof defaultValue === 'number') onChange === null || onChange === void 0 ? void 0 : onChange(newValue[0]);
|
|
165
165
|
else onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
166
166
|
};
|
|
167
167
|
}
|
|
@@ -17,7 +17,7 @@ const $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE = 0;
|
|
|
17
17
|
const $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE = 100;
|
|
18
18
|
const $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE = 1;
|
|
19
19
|
function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
|
|
20
|
-
const { isDisabled: isDisabled = false, minValue: minValue = $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE, maxValue: maxValue = $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step: step = $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE, orientation: orientation =
|
|
20
|
+
const { isDisabled: isDisabled = false, minValue: minValue = $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE, maxValue: maxValue = $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step: step = $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE, orientation: orientation = 'horizontal' } = props;
|
|
21
21
|
// Page step should be at least equal to step and always a multiple of the step.
|
|
22
22
|
let pageSize = (0, $BT4Uh$useMemo)(()=>{
|
|
23
23
|
let calcPageSize = (maxValue - minValue) / 10;
|
|
@@ -161,7 +161,7 @@ function $28f99e3e86e6ec45$var$convertValue(value) {
|
|
|
161
161
|
}
|
|
162
162
|
function $28f99e3e86e6ec45$var$createOnChange(value, defaultValue, onChange) {
|
|
163
163
|
return (newValue)=>{
|
|
164
|
-
if (typeof value ===
|
|
164
|
+
if (typeof value === 'number' || typeof defaultValue === 'number') onChange === null || onChange === void 0 ? void 0 : onChange(newValue[0]);
|
|
165
165
|
else onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
166
166
|
};
|
|
167
167
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/slider",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.5-nightly.4629+c34886769",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-stately/utils": "3.0.0-nightly.
|
|
26
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
27
|
-
"@react-types/slider": "3.7.
|
|
25
|
+
"@react-stately/utils": "3.0.0-nightly.2917+c34886769",
|
|
26
|
+
"@react-types/shared": "3.0.0-nightly.2917+c34886769",
|
|
27
|
+
"@react-types/slider": "3.7.4-nightly.4629+c34886769",
|
|
28
28
|
"@swc/helpers": "^0.5.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "c34886769d3e69bb56553a02eead6a0fd877e754"
|
|
37
37
|
}
|