@snack-uikit/fields 0.17.7 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.17.8 (2024-03-12)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **FF-4497:** minus button is no longer clickable if value grater than min ([8446173](https://github.com/cloud-ru-tech/snack-uikit/commit/8446173bed6224d307821807e86b737bbb0b409a))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 0.17.7 (2024-03-11)
7
18
 
8
19
  ### Only dependencies have been changed
@@ -38,8 +38,8 @@ export const FieldStepper = forwardRef((_a, ref) => {
38
38
  const inputRef = useRef(null);
39
39
  const minusButtonRef = useRef(null);
40
40
  const plusButtonRef = useRef(null);
41
- const isMinusButtonDisabled = value === min || readonly || disabled;
42
- const isPlusButtonDisabled = value === max || readonly || disabled;
41
+ const isMinusButtonDisabled = (typeof min === 'number' && value <= min) || readonly || disabled;
42
+ const isPlusButtonDisabled = (typeof max === 'number' && value >= max) || readonly || disabled;
43
43
  const adjustValue = (value) => {
44
44
  setValue(value);
45
45
  setTooltipOpen(true);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Fields",
7
- "version": "0.17.7",
7
+ "version": "0.17.8",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -56,5 +56,5 @@
56
56
  "peerDependencies": {
57
57
  "@snack-uikit/locale": "*"
58
58
  },
59
- "gitHead": "113e80e60c1a5ce1ce6957d48d37a6181991c5fd"
59
+ "gitHead": "582d9df07c9476893488ba49f95f9cb2051a406b"
60
60
  }
@@ -98,8 +98,8 @@ export const FieldStepper = forwardRef<HTMLInputElement, FieldStepperProps>(
98
98
  const inputRef = useRef<HTMLInputElement>(null);
99
99
  const minusButtonRef = useRef<HTMLButtonElement>(null);
100
100
  const plusButtonRef = useRef<HTMLButtonElement>(null);
101
- const isMinusButtonDisabled = value === min || readonly || disabled;
102
- const isPlusButtonDisabled = value === max || readonly || disabled;
101
+ const isMinusButtonDisabled = (typeof min === 'number' && value <= min) || readonly || disabled;
102
+ const isPlusButtonDisabled = (typeof max === 'number' && value >= max) || readonly || disabled;
103
103
 
104
104
  const adjustValue = (value: number) => {
105
105
  setValue(value);