@automattic/vip-design-system 0.27.8 → 0.27.9
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.
|
@@ -41,7 +41,7 @@ var Label = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwardRef
|
|
|
41
41
|
|
|
42
42
|
exports.Label = Label;
|
|
43
43
|
Label.propTypes = {
|
|
44
|
-
children: _propTypes["default"].
|
|
44
|
+
children: _propTypes["default"].any,
|
|
45
45
|
required: _propTypes["default"].bool,
|
|
46
46
|
sx: _propTypes["default"].object
|
|
47
47
|
};
|
|
@@ -33,7 +33,7 @@ var _FormSelectLoading = require("./FormSelectLoading");
|
|
|
33
33
|
|
|
34
34
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
35
35
|
|
|
36
|
-
var _excluded = ["autoFilter", "className", "debounce", "displayMenu", "forLabel", "getOptionLabel", "getOptionValue", "id", "isInline", "label", "loading", "minLength", "noOptionsMessage", "onChange", "onInputChange", "options", "required", "searchIcon", "showAllValues", "value"];
|
|
36
|
+
var _excluded = ["autoFilter", "className", "debounce", "displayMenu", "forLabel", "getOptionLabel", "getOptionValue", "id", "isInline", "label", "loading", "minLength", "noOptionsMessage", "onChange", "onInputChange", "options", "required", "searchIcon", "showAllValues", "source", "value"];
|
|
37
37
|
|
|
38
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
39
|
|
|
@@ -164,6 +164,7 @@ var FormAutocomplete = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
|
|
|
164
164
|
searchIcon = _ref.searchIcon,
|
|
165
165
|
_ref$showAllValues = _ref.showAllValues,
|
|
166
166
|
showAllValues = _ref$showAllValues === void 0 ? true : _ref$showAllValues,
|
|
167
|
+
source = _ref.source,
|
|
167
168
|
value = _ref.value,
|
|
168
169
|
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
169
170
|
|
|
@@ -257,7 +258,7 @@ var FormAutocomplete = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
|
|
|
257
258
|
"aria-busy": loading,
|
|
258
259
|
showAllValues: showAllValues,
|
|
259
260
|
ref: forwardRef,
|
|
260
|
-
source: suggest,
|
|
261
|
+
source: source || suggest,
|
|
261
262
|
defaultValue: value,
|
|
262
263
|
displayMenu: displayMenu,
|
|
263
264
|
onConfirm: onValueChange,
|
|
@@ -289,6 +290,7 @@ FormAutocomplete.propTypes = {
|
|
|
289
290
|
required: _propTypes["default"].bool,
|
|
290
291
|
searchIcon: _propTypes["default"].bool,
|
|
291
292
|
showAllValues: _propTypes["default"].bool,
|
|
293
|
+
source: _propTypes["default"].func,
|
|
292
294
|
value: _propTypes["default"].string
|
|
293
295
|
};
|
|
294
296
|
FormAutocomplete.displayName = 'FormAutocomplete';
|
package/package.json
CHANGED
package/src/system/Form/Label.js
CHANGED
|
@@ -114,6 +114,7 @@ const FormAutocomplete = React.forwardRef(
|
|
|
114
114
|
required,
|
|
115
115
|
searchIcon,
|
|
116
116
|
showAllValues = true,
|
|
117
|
+
source,
|
|
117
118
|
value,
|
|
118
119
|
...props
|
|
119
120
|
},
|
|
@@ -232,7 +233,7 @@ const FormAutocomplete = React.forwardRef(
|
|
|
232
233
|
aria-busy={ loading }
|
|
233
234
|
showAllValues={ showAllValues }
|
|
234
235
|
ref={ forwardRef }
|
|
235
|
-
source={ suggest }
|
|
236
|
+
source={ source || suggest }
|
|
236
237
|
defaultValue={ value }
|
|
237
238
|
displayMenu={ displayMenu }
|
|
238
239
|
onConfirm={ onValueChange }
|
|
@@ -268,6 +269,7 @@ FormAutocomplete.propTypes = {
|
|
|
268
269
|
required: PropTypes.bool,
|
|
269
270
|
searchIcon: PropTypes.bool,
|
|
270
271
|
showAllValues: PropTypes.bool,
|
|
272
|
+
source: PropTypes.func,
|
|
271
273
|
value: PropTypes.string,
|
|
272
274
|
};
|
|
273
275
|
|