@deque/cauldron-react 6.1.0-canary.6817bbd1 → 6.1.0-canary.b350c521
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
CHANGED
|
@@ -2342,7 +2342,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2342
2342
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2343
2343
|
_a.onChange;
|
|
2344
2344
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2345
|
-
_a.defaultValue; var _b = _a.error, error = _b === void 0 ? null : _b, requiredText = _a.requiredText, multiline = _a.multiline, ariaDescribedby = _a["aria-describedby"], other = tslib.__rest(_a, ["label", "fieldRef", "value", "onChange", "defaultValue", "error", "requiredText", "multiline", 'aria-describedby']);
|
|
2345
|
+
_a.defaultValue; var _b = _a.error, error = _b === void 0 ? null : _b, requiredText = _a.requiredText, multiline = _a.multiline, ariaDescribedby = _a["aria-describedby"], className = _a.className, other = tslib.__rest(_a, ["label", "fieldRef", "value", "onChange", "defaultValue", "error", "requiredText", "multiline", 'aria-describedby', "className"]);
|
|
2346
2346
|
// typescript can't infer the type so it's complaining about
|
|
2347
2347
|
// textarea and input props being incompatible
|
|
2348
2348
|
// we should probably fix this
|
|
@@ -2359,7 +2359,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2359
2359
|
}), htmlFor: this.inputId },
|
|
2360
2360
|
React__default["default"].createElement("span", null, label),
|
|
2361
2361
|
isRequired && (React__default["default"].createElement("span", { className: "Field__required-text" }, requiredText))),
|
|
2362
|
-
React__default["default"].createElement(Field, tslib.__assign({ className: classNames__default["default"]({
|
|
2362
|
+
React__default["default"].createElement(Field, tslib.__assign({ className: classNames__default["default"](className, {
|
|
2363
2363
|
'Field__text-input': !multiline,
|
|
2364
2364
|
Field__textarea: multiline,
|
|
2365
2365
|
'Field--has-error': error
|
|
@@ -2372,7 +2372,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2372
2372
|
TextField.prototype.onChange = function (e) {
|
|
2373
2373
|
var _a, _b;
|
|
2374
2374
|
if (this.props.onChange) {
|
|
2375
|
-
this.props.onChange(((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) || '', e);
|
|
2375
|
+
this.props.onChange(((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) || /* istanbul ignore next: default value */ '', e);
|
|
2376
2376
|
}
|
|
2377
2377
|
if (typeof this.props.value !== 'undefined') {
|
|
2378
2378
|
return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,7 +4,7 @@ export interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInput
|
|
|
4
4
|
error?: React.ReactNode;
|
|
5
5
|
defaultValue?: string;
|
|
6
6
|
onChange?: (value: string, e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
7
|
-
fieldRef
|
|
7
|
+
fieldRef?: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
|
|
8
8
|
requiredText?: string;
|
|
9
9
|
multiline?: boolean;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function setRef<T>(ref: React.Ref<T
|
|
1
|
+
export default function setRef<T>(ref: React.Ref<T> | undefined, element: T): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deque/cauldron-react",
|
|
3
|
-
"version": "6.1.0-canary.
|
|
3
|
+
"version": "6.1.0-canary.b350c521",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Fully accessible react components library for Deque Cauldron",
|
|
6
6
|
"homepage": "https://cauldron.dequelabs.com/",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"@rollup/plugin-typescript": "^11.1.2",
|
|
45
45
|
"@svgr/rollup": "^6.1.2",
|
|
46
46
|
"@testing-library/jest-dom": "^6.1.3",
|
|
47
|
-
"@testing-library/react": "
|
|
47
|
+
"@testing-library/react": "^12",
|
|
48
|
+
"@testing-library/user-event": "^14.5.2",
|
|
48
49
|
"@types/classnames": "^2.2.10",
|
|
49
50
|
"@types/enzyme-adapter-react-16": "^1.0.9",
|
|
50
51
|
"@types/jest": "^29.5.11",
|