@snack-uikit/fields 0.20.7 → 0.20.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,18 @@
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.20.8 (2024-05-16)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **FF-00:** fix empty value on remove input ([365f639](https://github.com/cloud-ru-tech/snack-uikit/commit/365f6394d2f2de0b43439d447f10cfc7a157ae40))
12
+ * **FF-00:** fix safari bug with input disabled value ([3eeed10](https://github.com/cloud-ru-tech/snack-uikit/commit/3eeed106e4935d6fd7e49e695a7037b1cbf88190))
13
+
14
+
15
+
16
+
17
+
6
18
  ## 0.20.7 (2024-05-13)
7
19
 
8
20
 
@@ -86,11 +86,11 @@ export const FieldSlider = forwardRef((_a, ref) => {
86
86
  setTextFieldInputValue(String(value));
87
87
  onChange(value);
88
88
  };
89
- if (textFieldNumValue < min) {
89
+ if (textFieldNumValue <= min) {
90
90
  handleChange(min);
91
91
  return;
92
92
  }
93
- if (textFieldNumValue > max) {
93
+ if (textFieldNumValue >= max) {
94
94
  handleChange(max);
95
95
  return;
96
96
  }
@@ -114,7 +114,10 @@ export const FieldSlider = forwardRef((_a, ref) => {
114
114
  handleChange(mark);
115
115
  };
116
116
  const handleTextValueChange = () => {
117
- const textFieldNumValue = parseInt(textFieldInputValue);
117
+ const parsedValue = parseInt(textFieldInputValue);
118
+ const actualMinByMark = parseInt(String(getMarkValue(min)));
119
+ const actualMin = Number.isNaN(actualMinByMark) ? min : actualMinByMark;
120
+ const textFieldNumValue = textFieldInputValue ? parsedValue : actualMin;
118
121
  if (Number.isNaN(textFieldNumValue)) {
119
122
  return;
120
123
  }
@@ -198,6 +198,7 @@
198
198
  .container[data-disabled] textarea,
199
199
  .container[data-disabled] span{
200
200
  cursor:not-allowed;
201
+ background-color:var(--sys-neutral-background, #f1f2f6);
201
202
  }
202
203
  .container[data-disabled], .container[data-disabled]:focus-within, .container[data-disabled][data-focused], .container[data-disabled]:hover{
203
204
  background-color:var(--sys-neutral-background, #f1f2f6);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Fields",
7
- "version": "0.20.7",
7
+ "version": "0.20.8",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -59,5 +59,5 @@
59
59
  "peerDependencies": {
60
60
  "@snack-uikit/locale": "*"
61
61
  },
62
- "gitHead": "58d2de0677c973ff4510861699d6fc19b8912a44"
62
+ "gitHead": "11b393f82f4ad8f303de86651b20d9e38917be03"
63
63
  }
@@ -170,12 +170,12 @@ export const FieldSlider = forwardRef<HTMLInputElement, FieldSliderProps>(
170
170
  onChange(value);
171
171
  };
172
172
 
173
- if (textFieldNumValue < min) {
173
+ if (textFieldNumValue <= min) {
174
174
  handleChange(min);
175
175
  return;
176
176
  }
177
177
 
178
- if (textFieldNumValue > max) {
178
+ if (textFieldNumValue >= max) {
179
179
  handleChange(max);
180
180
  return;
181
181
  }
@@ -204,7 +204,11 @@ export const FieldSlider = forwardRef<HTMLInputElement, FieldSliderProps>(
204
204
  };
205
205
 
206
206
  const handleTextValueChange = () => {
207
- const textFieldNumValue = parseInt(textFieldInputValue);
207
+ const parsedValue = parseInt(textFieldInputValue);
208
+ const actualMinByMark = parseInt(String(getMarkValue(min)));
209
+ const actualMin = Number.isNaN(actualMinByMark) ? min : actualMinByMark;
210
+
211
+ const textFieldNumValue = textFieldInputValue ? parsedValue : actualMin;
208
212
 
209
213
  if (Number.isNaN(textFieldNumValue)) {
210
214
  return;
@@ -109,6 +109,7 @@ $variants: 'single-line-container', 'multi-line-container';
109
109
  textarea,
110
110
  span {
111
111
  cursor: not-allowed;
112
+ background-color: simple-var($sys-neutral-background);
112
113
  }
113
114
 
114
115
  &,