carbon-react 119.2.0 → 119.3.1
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/esm/components/flat-table/flat-table.component.js +2 -2
- package/esm/components/flat-table/flat-table.style.js +0 -3
- package/esm/components/search/search.component.d.ts +2 -0
- package/esm/components/search/search.component.js +3 -0
- package/lib/components/flat-table/flat-table.component.js +2 -2
- package/lib/components/flat-table/flat-table.style.js +0 -3
- package/lib/components/search/search.component.d.ts +2 -0
- package/lib/components/search/search.component.js +3 -0
- package/package.json +3 -3
|
@@ -175,9 +175,9 @@ const FlatTable = _ref => {
|
|
|
175
175
|
setSelectedId,
|
|
176
176
|
selectedId
|
|
177
177
|
}
|
|
178
|
-
}, children)), footer && /*#__PURE__*/React.createElement(StyledFlatTableFooter, {
|
|
178
|
+
}, children))), footer && /*#__PURE__*/React.createElement(StyledFlatTableFooter, {
|
|
179
179
|
hasStickyFooter: hasStickyFooter
|
|
180
|
-
}, footer))
|
|
180
|
+
}, footer));
|
|
181
181
|
});
|
|
182
182
|
};
|
|
183
183
|
FlatTable.propTypes = {
|
|
@@ -11,6 +11,8 @@ export interface SearchEvent {
|
|
|
11
11
|
export interface SearchProps extends ValidationProps, MarginProps {
|
|
12
12
|
/** Prop to specify the aria-label of the search component */
|
|
13
13
|
"aria-label"?: string;
|
|
14
|
+
/** Prop to specify the aria-label of the search button */
|
|
15
|
+
searchButtonAriaLabel?: string;
|
|
14
16
|
/** Prop for `uncontrolled` use */
|
|
15
17
|
defaultValue?: string;
|
|
16
18
|
/** Prop for `id` */
|
|
@@ -27,6 +27,7 @@ const Search = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
27
27
|
searchWidth,
|
|
28
28
|
maxWidth,
|
|
29
29
|
searchButton,
|
|
30
|
+
searchButtonAriaLabel = "search button",
|
|
30
31
|
placeholder,
|
|
31
32
|
variant = "default",
|
|
32
33
|
"aria-label": ariaLabel = "search",
|
|
@@ -160,6 +161,7 @@ const Search = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
160
161
|
info: info,
|
|
161
162
|
tooltipPosition: tooltipPosition
|
|
162
163
|
}), searchButton && /*#__PURE__*/React.createElement(StyledSearchButton, null, isSearchTyped && /*#__PURE__*/React.createElement(Button, _extends({
|
|
164
|
+
"aria-label": searchButtonAriaLabel,
|
|
163
165
|
size: "medium",
|
|
164
166
|
px: "16px"
|
|
165
167
|
}, buttonProps), /*#__PURE__*/React.createElement(StyledButtonIcon, null, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -338,6 +340,7 @@ Search.propTypes = {
|
|
|
338
340
|
"onKeyDown": PropTypes.func,
|
|
339
341
|
"placeholder": PropTypes.string,
|
|
340
342
|
"searchButton": PropTypes.bool,
|
|
343
|
+
"searchButtonAriaLabel": PropTypes.string,
|
|
341
344
|
"searchWidth": PropTypes.string,
|
|
342
345
|
"tabIndex": PropTypes.number,
|
|
343
346
|
"threshold": PropTypes.number,
|
|
@@ -185,9 +185,9 @@ const FlatTable = _ref => {
|
|
|
185
185
|
setSelectedId,
|
|
186
186
|
selectedId
|
|
187
187
|
}
|
|
188
|
-
}, children)), footer && /*#__PURE__*/_react.default.createElement(_flatTable.StyledFlatTableFooter, {
|
|
188
|
+
}, children))), footer && /*#__PURE__*/_react.default.createElement(_flatTable.StyledFlatTableFooter, {
|
|
189
189
|
hasStickyFooter: hasStickyFooter
|
|
190
|
-
}, footer))
|
|
190
|
+
}, footer));
|
|
191
191
|
});
|
|
192
192
|
};
|
|
193
193
|
FlatTable.propTypes = {
|
|
@@ -22,9 +22,6 @@ const HEADER_OVERLAY_INCREMENT = 3;
|
|
|
22
22
|
const STICKY_FOOTER_OVERLAY_INCREMENT = 1;
|
|
23
23
|
const ROW_HEADER_OVERLAY_INCREMENT = 5;
|
|
24
24
|
const StyledTableContainer = _styledComponents.default.div`
|
|
25
|
-
display: grid;
|
|
26
|
-
grid-auto-rows: min-content;
|
|
27
|
-
|
|
28
25
|
${_ref => {
|
|
29
26
|
let {
|
|
30
27
|
width,
|
|
@@ -11,6 +11,8 @@ export interface SearchEvent {
|
|
|
11
11
|
export interface SearchProps extends ValidationProps, MarginProps {
|
|
12
12
|
/** Prop to specify the aria-label of the search component */
|
|
13
13
|
"aria-label"?: string;
|
|
14
|
+
/** Prop to specify the aria-label of the search button */
|
|
15
|
+
searchButtonAriaLabel?: string;
|
|
14
16
|
/** Prop for `uncontrolled` use */
|
|
15
17
|
defaultValue?: string;
|
|
16
18
|
/** Prop for `id` */
|
|
@@ -36,6 +36,7 @@ const Search = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
36
36
|
searchWidth,
|
|
37
37
|
maxWidth,
|
|
38
38
|
searchButton,
|
|
39
|
+
searchButtonAriaLabel = "search button",
|
|
39
40
|
placeholder,
|
|
40
41
|
variant = "default",
|
|
41
42
|
"aria-label": ariaLabel = "search",
|
|
@@ -169,6 +170,7 @@ const Search = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
169
170
|
info: info,
|
|
170
171
|
tooltipPosition: tooltipPosition
|
|
171
172
|
}), searchButton && /*#__PURE__*/_react.default.createElement(_searchButton.default, null, isSearchTyped && /*#__PURE__*/_react.default.createElement(_button.default, _extends({
|
|
173
|
+
"aria-label": searchButtonAriaLabel,
|
|
172
174
|
size: "medium",
|
|
173
175
|
px: "16px"
|
|
174
176
|
}, buttonProps), /*#__PURE__*/_react.default.createElement(_searchButton.StyledButtonIcon, null, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
@@ -348,6 +350,7 @@ Search.propTypes = {
|
|
|
348
350
|
"onKeyDown": _propTypes.default.func,
|
|
349
351
|
"placeholder": _propTypes.default.string,
|
|
350
352
|
"searchButton": _propTypes.default.bool,
|
|
353
|
+
"searchButtonAriaLabel": _propTypes.default.string,
|
|
351
354
|
"searchWidth": _propTypes.default.string,
|
|
352
355
|
"tabIndex": _propTypes.default.number,
|
|
353
356
|
"threshold": _propTypes.default.number,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "119.
|
|
3
|
+
"version": "119.3.1",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"test": "jest --config=./jest.config.json",
|
|
15
15
|
"test-update": "jest --config=./jest.config.json --updateSnapshot",
|
|
16
16
|
"cypress:react": "npx cypress open --component --browser chrome",
|
|
17
|
-
"format": "prettier --write './src/**/*.{js,jsx,ts,tsx}'",
|
|
18
|
-
"lint": "eslint ./src",
|
|
17
|
+
"format": "prettier --write './{src,cypress}/**/*.{js,jsx,ts,tsx}'",
|
|
18
|
+
"lint": "eslint ./src ./cypress",
|
|
19
19
|
"build": "node ./scripts/build.js",
|
|
20
20
|
"copy-files": "node ./scripts/copy-files.js",
|
|
21
21
|
"precompile": "npm run type-check && npm run clean-lib && npm run build && npm run build:types && npm run copy-files",
|