@deque/cauldron-react 6.1.0-canary.f877edfd → 6.2.0-canary.39cdc690
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/lib/src/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/lib/src/components/Combobox/Combobox.d.ts +1 -1
- package/lib/src/components/Tag/index.test.d.ts +1 -0
- package/lib/src/components/TextField/TextField.test.d.ts +1 -0
- package/lib/src/components/TextField/index.d.ts +1 -1
- package/lib/src/utils/setRef.d.ts +1 -1
- package/package.json +7 -23
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;
|
|
@@ -3697,7 +3697,7 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
3697
3697
|
var noMatchingOptions = !!(value === null || value === void 0 ? void 0 : value.length) && !matchingOptions.size && (React__default["default"].createElement(NoMatchingOptions, null));
|
|
3698
3698
|
var comboboxListbox = (React__default["default"].createElement(Listbox, { className: classNames__default["default"]('Combobox__listbox', {
|
|
3699
3699
|
'Combobox__listbox--open': open
|
|
3700
|
-
}), role:
|
|
3700
|
+
}), role: noMatchingOptions ? 'presentation' : 'listbox', "aria-labelledby": noMatchingOptions ? undefined : "".concat(id, "-label"), id: "".concat(id, "-listbox"), value: selectedValue, onMouseDown: handleComboboxOptionMouseDown, onClick: handleComboboxOptionClick, onSelectionChange: handleSelectionChange, onActiveChange: handleActiveChange, ref: listboxRef, tabIndex: undefined, "aria-activedescendant": undefined },
|
|
3701
3701
|
comboboxOptions,
|
|
3702
3702
|
noMatchingOptions));
|
|
3703
3703
|
var errorId = "".concat(id, "-error");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -28,5 +28,5 @@ interface ComboboxProps extends React.InputHTMLAttributes<Omit<HTMLInputElement,
|
|
|
28
28
|
portal?: React.RefObject<HTMLElement> | HTMLElement;
|
|
29
29
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
30
30
|
}
|
|
31
|
-
declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<
|
|
31
|
+
declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
32
|
export default Combobox;
|
|
@@ -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.
|
|
3
|
+
"version": "6.2.0-canary.39cdc690",
|
|
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,10 +44,11 @@
|
|
|
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
|
-
"@types/jest": "^
|
|
51
|
+
"@types/jest": "^29.5.11",
|
|
51
52
|
"@types/jest-axe": "^3.5.4",
|
|
52
53
|
"@types/node": "^17.0.42",
|
|
53
54
|
"@types/react": "^18.0.12",
|
|
@@ -60,8 +61,9 @@
|
|
|
60
61
|
"concurrently": "^5.3.0",
|
|
61
62
|
"enzyme": "^3.11.0",
|
|
62
63
|
"enzyme-adapter-react-16": "^1.15.2",
|
|
63
|
-
"jest": "^
|
|
64
|
+
"jest": "^29.7.0",
|
|
64
65
|
"jest-axe": "^8.0.0",
|
|
66
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
65
67
|
"nyc": "^15.0.1",
|
|
66
68
|
"postcss-cli": "^7.1.1",
|
|
67
69
|
"postcss-import": "^12.0.1",
|
|
@@ -70,6 +72,7 @@
|
|
|
70
72
|
"react-dom": "^16.13.1",
|
|
71
73
|
"rollup": "^2.23.0",
|
|
72
74
|
"sinon": "^10.0.0",
|
|
75
|
+
"ts-node": "^10.9.2",
|
|
73
76
|
"typescript": "~5.0.0"
|
|
74
77
|
},
|
|
75
78
|
"repository": {
|
|
@@ -95,24 +98,5 @@
|
|
|
95
98
|
"coverage",
|
|
96
99
|
"test/**/*.js"
|
|
97
100
|
]
|
|
98
|
-
},
|
|
99
|
-
"jest": {
|
|
100
|
-
"setupFilesAfterEnv": [
|
|
101
|
-
"<rootDir>__tests__/setupTests.ts"
|
|
102
|
-
],
|
|
103
|
-
"testMatch": [
|
|
104
|
-
"**/__tests__/src/**/*.js",
|
|
105
|
-
"**/__tests__/demo/**/*.js",
|
|
106
|
-
"**/src/components/**/*.test.tsx"
|
|
107
|
-
],
|
|
108
|
-
"collectCoverageFrom": [
|
|
109
|
-
"src/**/*.{ts,tsx}"
|
|
110
|
-
],
|
|
111
|
-
"moduleNameMapper": {
|
|
112
|
-
"\\.(css|less)$": "<rootDir>/__tests__/styleMock.js",
|
|
113
|
-
"react-syntax-highlighter/dist/esm/light": "<rootDir>/__tests__/reactSyntaxHighlighterMock.js",
|
|
114
|
-
"react-syntax-highlighter/dist/esm/languages/hljs/(.*)": "<rootDir>/__tests__/hljsMock.js",
|
|
115
|
-
"\\.svg$": "<rootDir>/__tests__/svgMock.js"
|
|
116
|
-
}
|
|
117
101
|
}
|
|
118
102
|
}
|