@deque/cauldron-react 6.3.0-canary.cc6c4456 → 6.3.1-canary.4bedc795
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/lib/index.js +4 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2429,7 +2429,7 @@ var TextFieldWrapper = React.forwardRef(function (_a, ref) {
|
|
|
2429
2429
|
TextFieldWrapper.displayName = 'TextFieldWrapper';
|
|
2430
2430
|
|
|
2431
2431
|
var SearchField = React.forwardRef(function (_a, ref) {
|
|
2432
|
-
var label = _a.label, _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b, onChange = _a.onChange, _c = _a.hideLabel, hideLabel = _c === void 0 ? false : _c, _d = _a.placeholder, placeholder = _d === void 0 ? 'Search...' : _d, _e = _a.isForm, isForm = _e === void 0 ? true : _e, propId = _a.id, propValue = _a.value, trailingChildren = _a.trailingChildren,
|
|
2432
|
+
var className = _a.className, label = _a.label, _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b, onChange = _a.onChange, _c = _a.hideLabel, hideLabel = _c === void 0 ? false : _c, _d = _a.placeholder, placeholder = _d === void 0 ? 'Search...' : _d, _e = _a.isForm, isForm = _e === void 0 ? true : _e, propId = _a.id, propValue = _a.value, trailingChildren = _a.trailingChildren, inputProps = tslib.__rest(_a, ["className", "label", "defaultValue", "onChange", "hideLabel", "placeholder", "isForm", "id", "value", "trailingChildren"]);
|
|
2433
2433
|
var isControlled = typeof propValue !== 'undefined';
|
|
2434
2434
|
var _f = tslib.__read(React.useState(isControlled ? propValue : defaultValue), 2), value = _f[0], setValue = _f[1];
|
|
2435
2435
|
var _g = tslib.__read(propId ? [propId] : nextId.useId(1, 'search-field'), 1), id = _g[0];
|
|
@@ -2451,11 +2451,11 @@ var SearchField = React.forwardRef(function (_a, ref) {
|
|
|
2451
2451
|
return (React__default["default"].createElement(Field, { role: isForm ? 'search' : undefined, className: "SearchField", "aria-labelledby": isForm ? "".concat(inputId, "-label") : undefined },
|
|
2452
2452
|
hideLabel ? (React__default["default"].createElement(Offscreen, null,
|
|
2453
2453
|
React__default["default"].createElement("label", { htmlFor: inputId, id: "".concat(inputId, "-label") }, label))) : (React__default["default"].createElement("label", { className: "Field__label", htmlFor: inputId, id: "".concat(inputId, "-label") }, label)),
|
|
2454
|
-
React__default["default"].createElement(TextFieldWrapper, { className: classNames__default["default"]({
|
|
2455
|
-
'TextFieldWrapper--disabled':
|
|
2454
|
+
React__default["default"].createElement(TextFieldWrapper, { className: classNames__default["default"](className, {
|
|
2455
|
+
'TextFieldWrapper--disabled': inputProps.disabled
|
|
2456
2456
|
}) },
|
|
2457
2457
|
React__default["default"].createElement(Icon, { type: "magnifying-glass", className: "SearchField__search-icon" }),
|
|
2458
|
-
React__default["default"].createElement("input", tslib.__assign({ id: inputId, value: value, onChange: handleChange, placeholder: placeholder, ref: ref },
|
|
2458
|
+
React__default["default"].createElement("input", tslib.__assign({ id: inputId, value: value, onChange: handleChange, placeholder: placeholder, ref: ref }, inputProps, { type: "search" })),
|
|
2459
2459
|
trailingChildren)));
|
|
2460
2460
|
});
|
|
2461
2461
|
SearchField.displayName = 'SearchField';
|
package/package.json
CHANGED