@automattic/vip-design-system 0.27.6 → 0.27.7

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.
@@ -44,7 +44,8 @@ var inputStyles = {
44
44
  bg: 'backgroundSecondary'
45
45
  },
46
46
  '&::placeholder': {
47
- color: 'placeholder'
47
+ color: 'placeholder',
48
+ opacity: 1
48
49
  }
49
50
  };
50
51
 
@@ -210,6 +210,10 @@ var FormAutocomplete = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
210
210
  });
211
211
  }, [options]);
212
212
  var handleInputChange = (0, _react.useCallback)(function (query) {
213
+ if (!debounce) {
214
+ return onInputChange(query);
215
+ }
216
+
213
217
  clearTimeout(debounceTimeout);
214
218
 
215
219
  if (!query.length || query.length >= minLength) {
@@ -224,7 +228,7 @@ var FormAutocomplete = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
224
228
  }
225
229
 
226
230
  var data = handleTypeChange(query);
227
- populateResults(data.map(function (option) {
231
+ populateResults(data == null ? void 0 : data.map(function (option) {
228
232
  return optionLabel(option);
229
233
  }));
230
234
  }, [options, isDirty]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/vip-design-system",
3
- "version": "0.27.6",
3
+ "version": "0.27.7",
4
4
  "main": "build/system/index.js",
5
5
  "scripts": {
6
6
  "build-storybook": "build-storybook",
@@ -33,6 +33,7 @@ const inputStyles = {
33
33
  },
34
34
  '&::placeholder': {
35
35
  color: 'placeholder',
36
+ opacity: 1,
36
37
  },
37
38
  };
38
39
 
@@ -168,6 +168,9 @@ const FormAutocomplete = React.forwardRef(
168
168
 
169
169
  const handleInputChange = useCallback(
170
170
  query => {
171
+ if ( ! debounce ) {
172
+ return onInputChange( query );
173
+ }
171
174
  clearTimeout( debounceTimeout );
172
175
  if ( ! query.length || query.length >= minLength ) {
173
176
  debounceTimeout = setTimeout( () => {
@@ -184,7 +187,7 @@ const FormAutocomplete = React.forwardRef(
184
187
  handleInputChange( query );
185
188
  }
186
189
  const data = handleTypeChange( query );
187
- populateResults( data.map( option => optionLabel( option ) ) );
190
+ populateResults( data?.map( option => optionLabel( option ) ) );
188
191
  },
189
192
  [ options, isDirty ]
190
193
  );