baseui 0.0.0-next-73c3b1e → 0.0.0-next-e40d68e
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/breadcrumbs/breadcrumbs.js +1 -1
- package/breadcrumbs/breadcrumbs.js.flow +5 -1
- package/breadcrumbs/index.d.ts +1 -0
- package/breadcrumbs/types.js.flow +1 -0
- package/button-group/button-group.js +1 -1
- package/button-group/button-group.js.flow +1 -1
- package/button-group/index.d.ts +1 -0
- package/button-group/types.js.flow +1 -0
- package/checkbox/checkbox.js +2 -3
- package/checkbox/checkbox.js.flow +1 -2
- package/checkbox/index.d.ts +1 -0
- package/checkbox/types.js.flow +1 -0
- package/es/breadcrumbs/breadcrumbs.js +1 -1
- package/es/button-group/button-group.js +1 -1
- package/es/checkbox/checkbox.js +2 -3
- package/es/menu/menu.js +1 -1
- package/es/progress-bar/progressbar.js +2 -2
- package/es/table/sortable-head-cell.js +1 -1
- package/esm/breadcrumbs/breadcrumbs.js +1 -1
- package/esm/button-group/button-group.js +1 -1
- package/esm/checkbox/checkbox.js +2 -3
- package/esm/menu/menu.js +1 -1
- package/esm/progress-bar/progressbar.js +2 -2
- package/esm/table/sortable-head-cell.js +1 -1
- package/menu/index.d.ts +1 -0
- package/menu/menu.js +1 -1
- package/menu/menu.js.flow +1 -1
- package/menu/types.js.flow +1 -1
- package/package.json +2 -2
- package/progress-bar/index.d.ts +1 -0
- package/progress-bar/progressbar.js +2 -2
- package/progress-bar/progressbar.js.flow +1 -1
- package/progress-bar/types.js.flow +1 -0
- package/table/index.d.ts +1 -0
- package/table/sortable-head-cell.js +1 -1
- package/table/sortable-head-cell.js.flow +1 -1
- package/table/types.js.flow +1 -0
|
@@ -103,7 +103,7 @@ function Breadcrumbs(props) {
|
|
|
103
103
|
});
|
|
104
104
|
return /*#__PURE__*/_react.default.createElement(_index.LocaleContext.Consumer, null, function (locale) {
|
|
105
105
|
return /*#__PURE__*/_react.default.createElement(Root, _extends({
|
|
106
|
-
"aria-label": props.ariaLabel || locale.breadcrumbs.ariaLabel,
|
|
106
|
+
"aria-label": props['aria-label'] || props.ariaLabel || locale.breadcrumbs.ariaLabel,
|
|
107
107
|
"data-baseweb": "breadcrumbs"
|
|
108
108
|
}, baseRootProps), /*#__PURE__*/_react.default.createElement(List, baseListProps, childrenWithSeparators));
|
|
109
109
|
});
|
|
@@ -77,7 +77,11 @@ export function Breadcrumbs(props: BreadcrumbsPropsT) {
|
|
|
77
77
|
<LocaleContext.Consumer>
|
|
78
78
|
{locale => (
|
|
79
79
|
<Root
|
|
80
|
-
aria-label={
|
|
80
|
+
aria-label={
|
|
81
|
+
props['aria-label'] ||
|
|
82
|
+
props.ariaLabel ||
|
|
83
|
+
locale.breadcrumbs.ariaLabel
|
|
84
|
+
}
|
|
81
85
|
data-baseweb="breadcrumbs"
|
|
82
86
|
{...baseRootProps}
|
|
83
87
|
>
|
package/breadcrumbs/index.d.ts
CHANGED
|
@@ -107,7 +107,6 @@ var ButtonGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
107
107
|
_this$props$mode = _this$props.mode,
|
|
108
108
|
mode = _this$props$mode === void 0 ? _constants.MODE.checkbox : _this$props$mode,
|
|
109
109
|
children = _this$props.children,
|
|
110
|
-
ariaLabel = _this$props.ariaLabel,
|
|
111
110
|
selected = _this$props.selected,
|
|
112
111
|
disabled = _this$props.disabled,
|
|
113
112
|
_onClick = _this$props.onClick,
|
|
@@ -120,6 +119,7 @@ var ButtonGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
120
119
|
Root = _getOverrides2[0],
|
|
121
120
|
rootProps = _getOverrides2[1];
|
|
122
121
|
|
|
122
|
+
var ariaLabel = this.props['aria-label'] || this.props.ariaLabel;
|
|
123
123
|
var isRadio = mode === _constants.MODE.radio;
|
|
124
124
|
var numItems = React.Children.count(children);
|
|
125
125
|
return /*#__PURE__*/React.createElement(_index2.LocaleContext.Consumer, null, function (locale) {
|
|
@@ -43,7 +43,6 @@ export default class ButtonGroup extends React.Component<PropsT> {
|
|
|
43
43
|
overrides = {},
|
|
44
44
|
mode = MODE.checkbox,
|
|
45
45
|
children,
|
|
46
|
-
ariaLabel,
|
|
47
46
|
selected,
|
|
48
47
|
disabled,
|
|
49
48
|
onClick,
|
|
@@ -52,6 +51,7 @@ export default class ButtonGroup extends React.Component<PropsT> {
|
|
|
52
51
|
size,
|
|
53
52
|
} = this.props;
|
|
54
53
|
const [Root, rootProps] = getOverrides(overrides.Root, StyledRoot);
|
|
54
|
+
const ariaLabel = this.props['aria-label'] || this.props.ariaLabel;
|
|
55
55
|
const isRadio = mode === MODE.radio;
|
|
56
56
|
|
|
57
57
|
const numItems = React.Children.count(children);
|
package/button-group/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import {MODE, STATE_CHANGE_TYPE} from './constants.js';
|
|
|
17
17
|
export type PropsT = {|
|
|
18
18
|
/** Accessible label. */
|
|
19
19
|
ariaLabel?: string,
|
|
20
|
+
'aria-label'?: string,
|
|
20
21
|
/** Set of more than one `Button` components */
|
|
21
22
|
children: Array<React.Node>,
|
|
22
23
|
/** Defines if the button group is disabled. */
|
package/checkbox/checkbox.js
CHANGED
|
@@ -183,8 +183,7 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
183
183
|
checked = _this$props2.checked,
|
|
184
184
|
children = _this$props2.children,
|
|
185
185
|
required = _this$props2.required,
|
|
186
|
-
title = _this$props2.title
|
|
187
|
-
ariaLabel = _this$props2.ariaLabel;
|
|
186
|
+
title = _this$props2.title;
|
|
188
187
|
var RootOverride = overrides.Root,
|
|
189
188
|
CheckmarkOverride = overrides.Checkmark,
|
|
190
189
|
LabelOverride = overrides.Label,
|
|
@@ -253,7 +252,7 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
253
252
|
name: name,
|
|
254
253
|
checked: checked,
|
|
255
254
|
required: required,
|
|
256
|
-
"aria-label": ariaLabel,
|
|
255
|
+
"aria-label": this.props['aria-label'] || this.props.ariaLabel,
|
|
257
256
|
"aria-checked": isIndeterminate ? 'mixed' : checked,
|
|
258
257
|
"aria-describedby": this.props['aria-describedby'],
|
|
259
258
|
"aria-errormessage": this.props['aria-errormessage'],
|
|
@@ -134,7 +134,6 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
134
134
|
children,
|
|
135
135
|
required,
|
|
136
136
|
title,
|
|
137
|
-
ariaLabel,
|
|
138
137
|
} = this.props;
|
|
139
138
|
|
|
140
139
|
const {
|
|
@@ -229,7 +228,7 @@ class StatelessCheckbox extends React.Component<PropsT, StatelessStateT> {
|
|
|
229
228
|
name={name}
|
|
230
229
|
checked={checked}
|
|
231
230
|
required={required}
|
|
232
|
-
aria-label={ariaLabel}
|
|
231
|
+
aria-label={this.props['aria-label'] || this.props.ariaLabel}
|
|
233
232
|
aria-checked={isIndeterminate ? 'mixed' : checked}
|
|
234
233
|
aria-describedby={this.props['aria-describedby']}
|
|
235
234
|
aria-errormessage={this.props['aria-errormessage']}
|
package/checkbox/index.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export interface CheckboxProps {
|
|
|
106
106
|
checkmarkType?: STYLE_TYPE[keyof STYLE_TYPE];
|
|
107
107
|
title?: string;
|
|
108
108
|
ariaLabel?: string;
|
|
109
|
+
'aria-label'?: string;
|
|
109
110
|
onChange?: React.FormEventHandler<HTMLInputElement>;
|
|
110
111
|
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
|
111
112
|
onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
|
package/checkbox/types.js.flow
CHANGED
|
@@ -48,6 +48,7 @@ export type PropsT = {
|
|
|
48
48
|
'aria-errormessage'?: string,
|
|
49
49
|
/** Passed to the input element aria-label attribute. */
|
|
50
50
|
ariaLabel?: string,
|
|
51
|
+
'aria-label'?: string,
|
|
51
52
|
/** Component or String value for label of checkbox. */
|
|
52
53
|
children?: React$Node,
|
|
53
54
|
/** Indicates if this checkbox children contain an interactive element (prevents the label from moving focus from the child element to the radio button) */
|
|
@@ -45,7 +45,7 @@ export function Breadcrumbs(props) {
|
|
|
45
45
|
}), /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, theme => theme.direction === 'rtl' ? /*#__PURE__*/React.createElement(Left, baseIconProps) : /*#__PURE__*/React.createElement(Right, baseIconProps)))));
|
|
46
46
|
});
|
|
47
47
|
return /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, locale => /*#__PURE__*/React.createElement(Root, _extends({
|
|
48
|
-
"aria-label": props.ariaLabel || locale.breadcrumbs.ariaLabel,
|
|
48
|
+
"aria-label": props['aria-label'] || props.ariaLabel || locale.breadcrumbs.ariaLabel,
|
|
49
49
|
"data-baseweb": "breadcrumbs"
|
|
50
50
|
}, baseRootProps), /*#__PURE__*/React.createElement(List, baseListProps, childrenWithSeparators)));
|
|
51
51
|
}
|
|
@@ -39,7 +39,6 @@ export default class ButtonGroup extends React.Component {
|
|
|
39
39
|
overrides = {},
|
|
40
40
|
mode = MODE.checkbox,
|
|
41
41
|
children,
|
|
42
|
-
ariaLabel,
|
|
43
42
|
selected,
|
|
44
43
|
disabled,
|
|
45
44
|
onClick,
|
|
@@ -48,6 +47,7 @@ export default class ButtonGroup extends React.Component {
|
|
|
48
47
|
size
|
|
49
48
|
} = this.props;
|
|
50
49
|
const [Root, rootProps] = getOverrides(overrides.Root, StyledRoot);
|
|
50
|
+
const ariaLabel = this.props['aria-label'] || this.props.ariaLabel;
|
|
51
51
|
const isRadio = mode === MODE.radio;
|
|
52
52
|
const numItems = React.Children.count(children);
|
|
53
53
|
return /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, locale => /*#__PURE__*/React.createElement(Root, _extends({
|
package/es/checkbox/checkbox.js
CHANGED
|
@@ -128,8 +128,7 @@ class StatelessCheckbox extends React.Component {
|
|
|
128
128
|
checked,
|
|
129
129
|
children,
|
|
130
130
|
required,
|
|
131
|
-
title
|
|
132
|
-
ariaLabel
|
|
131
|
+
title
|
|
133
132
|
} = this.props;
|
|
134
133
|
const {
|
|
135
134
|
Root: RootOverride,
|
|
@@ -191,7 +190,7 @@ class StatelessCheckbox extends React.Component {
|
|
|
191
190
|
name: name,
|
|
192
191
|
checked: checked,
|
|
193
192
|
required: required,
|
|
194
|
-
"aria-label": ariaLabel,
|
|
193
|
+
"aria-label": this.props['aria-label'] || this.props.ariaLabel,
|
|
195
194
|
"aria-checked": isIndeterminate ? 'mixed' : checked,
|
|
196
195
|
"aria-describedby": this.props['aria-describedby'],
|
|
197
196
|
"aria-errormessage": this.props['aria-errormessage'],
|
package/es/menu/menu.js
CHANGED
|
@@ -17,7 +17,7 @@ import { isFocusVisible, forkFocus, forkBlur } from '../utils/focusVisible.js';
|
|
|
17
17
|
export default function Menu(props) {
|
|
18
18
|
const {
|
|
19
19
|
overrides = {},
|
|
20
|
-
ariaLabel = 'Menu',
|
|
20
|
+
'aria-label': ariaLabel = 'Menu',
|
|
21
21
|
rootRef = /*#__PURE__*/React.createRef(),
|
|
22
22
|
focusMenu = () => {},
|
|
23
23
|
unfocusMenu = () => {},
|
|
@@ -25,7 +25,6 @@ class ProgressBar extends React.Component {
|
|
|
25
25
|
|
|
26
26
|
render() {
|
|
27
27
|
const {
|
|
28
|
-
ariaLabel,
|
|
29
28
|
overrides = {},
|
|
30
29
|
getProgressLabel,
|
|
31
30
|
value,
|
|
@@ -39,7 +38,8 @@ class ProgressBar extends React.Component {
|
|
|
39
38
|
errorMessage,
|
|
40
39
|
forwardedRef,
|
|
41
40
|
...restProps
|
|
42
|
-
} = this.props;
|
|
41
|
+
} = this.props;
|
|
42
|
+
const ariaLabel = this.props['aria-label'] || this.props.ariaLabel; // fallback on successValue (and it's default) if maxValue is not set by user
|
|
43
43
|
|
|
44
44
|
const maximumValue = maxValue !== 100 ? maxValue : successValue;
|
|
45
45
|
const [Root, rootProps] = getOverrides(overrides.Root, StyledRoot);
|
|
@@ -47,7 +47,7 @@ export const SortableHeadCellFactory = (CustomHeadCell = StyledHeadCell) => {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const enableHeadClick = fillClickTarget && !disabled;
|
|
50
|
-
let ariaLabel = props.ariaLabel;
|
|
50
|
+
let ariaLabel = props['aria-label'] || props.ariaLabel;
|
|
51
51
|
|
|
52
52
|
if (!ariaLabel) {
|
|
53
53
|
if (typeof props.title === 'string') {
|
|
@@ -84,7 +84,7 @@ export function Breadcrumbs(props) {
|
|
|
84
84
|
});
|
|
85
85
|
return /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, function (locale) {
|
|
86
86
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
87
|
-
"aria-label": props.ariaLabel || locale.breadcrumbs.ariaLabel,
|
|
87
|
+
"aria-label": props['aria-label'] || props.ariaLabel || locale.breadcrumbs.ariaLabel,
|
|
88
88
|
"data-baseweb": "breadcrumbs"
|
|
89
89
|
}, baseRootProps), /*#__PURE__*/React.createElement(List, baseListProps, childrenWithSeparators));
|
|
90
90
|
});
|
|
@@ -97,7 +97,6 @@ var ButtonGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
97
97
|
_this$props$mode = _this$props.mode,
|
|
98
98
|
mode = _this$props$mode === void 0 ? MODE.checkbox : _this$props$mode,
|
|
99
99
|
children = _this$props.children,
|
|
100
|
-
ariaLabel = _this$props.ariaLabel,
|
|
101
100
|
selected = _this$props.selected,
|
|
102
101
|
disabled = _this$props.disabled,
|
|
103
102
|
_onClick = _this$props.onClick,
|
|
@@ -110,6 +109,7 @@ var ButtonGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
110
109
|
Root = _getOverrides2[0],
|
|
111
110
|
rootProps = _getOverrides2[1];
|
|
112
111
|
|
|
112
|
+
var ariaLabel = this.props['aria-label'] || this.props.ariaLabel;
|
|
113
113
|
var isRadio = mode === MODE.radio;
|
|
114
114
|
var numItems = React.Children.count(children);
|
|
115
115
|
return /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, function (locale) {
|
package/esm/checkbox/checkbox.js
CHANGED
|
@@ -174,8 +174,7 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
174
174
|
checked = _this$props2.checked,
|
|
175
175
|
children = _this$props2.children,
|
|
176
176
|
required = _this$props2.required,
|
|
177
|
-
title = _this$props2.title
|
|
178
|
-
ariaLabel = _this$props2.ariaLabel;
|
|
177
|
+
title = _this$props2.title;
|
|
179
178
|
var RootOverride = overrides.Root,
|
|
180
179
|
CheckmarkOverride = overrides.Checkmark,
|
|
181
180
|
LabelOverride = overrides.Label,
|
|
@@ -236,7 +235,7 @@ var StatelessCheckbox = /*#__PURE__*/function (_React$Component) {
|
|
|
236
235
|
name: name,
|
|
237
236
|
checked: checked,
|
|
238
237
|
required: required,
|
|
239
|
-
"aria-label": ariaLabel,
|
|
238
|
+
"aria-label": this.props['aria-label'] || this.props.ariaLabel,
|
|
240
239
|
"aria-checked": isIndeterminate ? 'mixed' : checked,
|
|
241
240
|
"aria-describedby": this.props['aria-describedby'],
|
|
242
241
|
"aria-errormessage": this.props['aria-errormessage'],
|
package/esm/menu/menu.js
CHANGED
|
@@ -33,7 +33,7 @@ import { isFocusVisible, forkFocus, forkBlur } from '../utils/focusVisible.js';
|
|
|
33
33
|
export default function Menu(props) {
|
|
34
34
|
var _props$overrides = props.overrides,
|
|
35
35
|
overrides = _props$overrides === void 0 ? {} : _props$overrides,
|
|
36
|
-
_props$ariaLabel = props
|
|
36
|
+
_props$ariaLabel = props['aria-label'],
|
|
37
37
|
ariaLabel = _props$ariaLabel === void 0 ? 'Menu' : _props$ariaLabel,
|
|
38
38
|
_props$rootRef = props.rootRef,
|
|
39
39
|
rootRef = _props$rootRef === void 0 ? /*#__PURE__*/React.createRef() : _props$rootRef,
|
|
@@ -76,7 +76,6 @@ var ProgressBar = /*#__PURE__*/function (_React$Component) {
|
|
|
76
76
|
key: "render",
|
|
77
77
|
value: function render() {
|
|
78
78
|
var _this$props = this.props,
|
|
79
|
-
ariaLabel = _this$props.ariaLabel,
|
|
80
79
|
_this$props$overrides = _this$props.overrides,
|
|
81
80
|
overrides = _this$props$overrides === void 0 ? {} : _this$props$overrides,
|
|
82
81
|
getProgressLabel = _this$props.getProgressLabel,
|
|
@@ -90,8 +89,9 @@ var ProgressBar = /*#__PURE__*/function (_React$Component) {
|
|
|
90
89
|
infinite = _this$props.infinite,
|
|
91
90
|
errorMessage = _this$props.errorMessage,
|
|
92
91
|
forwardedRef = _this$props.forwardedRef,
|
|
93
|
-
restProps = _objectWithoutProperties(_this$props, ["
|
|
92
|
+
restProps = _objectWithoutProperties(_this$props, ["overrides", "getProgressLabel", "value", "size", "steps", "successValue", "minValue", "maxValue", "showLabel", "infinite", "errorMessage", "forwardedRef"]);
|
|
94
93
|
|
|
94
|
+
var ariaLabel = this.props['aria-label'] || this.props.ariaLabel; // fallback on successValue (and it's default) if maxValue is not set by user
|
|
95
95
|
|
|
96
96
|
var maximumValue = maxValue !== 100 ? maxValue : successValue;
|
|
97
97
|
|
|
@@ -67,7 +67,7 @@ export var SortableHeadCellFactory = function SortableHeadCellFactory() {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
var enableHeadClick = fillClickTarget && !disabled;
|
|
70
|
-
var ariaLabel = props.ariaLabel;
|
|
70
|
+
var ariaLabel = props['aria-label'] || props.ariaLabel;
|
|
71
71
|
|
|
72
72
|
if (!ariaLabel) {
|
|
73
73
|
if (typeof props.title === 'string') {
|
package/menu/index.d.ts
CHANGED
|
@@ -172,6 +172,7 @@ export const OptionProfile: React.FC<OptionProfileProps>;
|
|
|
172
172
|
export interface SharedStatelessProps {
|
|
173
173
|
activedescendantId?: string;
|
|
174
174
|
ariaLabel?: string;
|
|
175
|
+
'aria-label'?: string;
|
|
175
176
|
getRequiredItemProps?: (item: any, index: number) => RenderItemProps;
|
|
176
177
|
highlightedIndex?: number;
|
|
177
178
|
items: ItemsT;
|
package/menu/menu.js
CHANGED
|
@@ -46,7 +46,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
46
46
|
function Menu(props) {
|
|
47
47
|
var _props$overrides = props.overrides,
|
|
48
48
|
overrides = _props$overrides === void 0 ? {} : _props$overrides,
|
|
49
|
-
_props$ariaLabel = props
|
|
49
|
+
_props$ariaLabel = props['aria-label'],
|
|
50
50
|
ariaLabel = _props$ariaLabel === void 0 ? 'Menu' : _props$ariaLabel,
|
|
51
51
|
_props$rootRef = props.rootRef,
|
|
52
52
|
rootRef = _props$rootRef === void 0 ? /*#__PURE__*/React.createRef() : _props$rootRef,
|
package/menu/menu.js.flow
CHANGED
|
@@ -24,7 +24,7 @@ import {isFocusVisible, forkFocus, forkBlur} from '../utils/focusVisible.js';
|
|
|
24
24
|
export default function Menu(props: StatelessMenuPropsT) {
|
|
25
25
|
const {
|
|
26
26
|
overrides = {},
|
|
27
|
-
ariaLabel = 'Menu',
|
|
27
|
+
'aria-label': ariaLabel = 'Menu',
|
|
28
28
|
rootRef = React.createRef(),
|
|
29
29
|
focusMenu = () => {},
|
|
30
30
|
unfocusMenu = () => {},
|
package/menu/types.js.flow
CHANGED
|
@@ -170,7 +170,7 @@ export type SharedStatelessPropsT = {
|
|
|
170
170
|
* bindings to work properly. Every rendered item should call this.
|
|
171
171
|
*/
|
|
172
172
|
/** Passed to the top level menu element. */
|
|
173
|
-
|
|
173
|
+
'aria-label'?: string,
|
|
174
174
|
getRequiredItemProps?: GetRequiredItemPropsFnT,
|
|
175
175
|
isFocused?: boolean,
|
|
176
176
|
handleMouseLeave?: (event: SyntheticMouseEvent<HTMLElement>) => mixed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baseui",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-e40d68e",
|
|
4
4
|
"description": "A React Component library implementing the Base design language",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@commitlint/config-conventional": "^8.0.0",
|
|
82
82
|
"@date-io/luxon": "^2.7.0",
|
|
83
83
|
"@date-io/moment": "^2.7.0",
|
|
84
|
-
"@ladle/react": "^0.
|
|
84
|
+
"@ladle/react": "^0.8.0",
|
|
85
85
|
"@mdx-js/tag": "^0.20.0",
|
|
86
86
|
"@octokit/rest": "^16.33.1",
|
|
87
87
|
"@svgr/cli": "^4.3.2",
|
package/progress-bar/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface ProgressBarOverrides {
|
|
|
17
17
|
}
|
|
18
18
|
export interface ProgressBarProps {
|
|
19
19
|
ariaLabel?: string;
|
|
20
|
+
'aria-label'?: string;
|
|
20
21
|
children?: React.ReactNode;
|
|
21
22
|
getProgressLabel?: (value: number, successValue: number) => React.ReactNode;
|
|
22
23
|
infinite?: boolean;
|
|
@@ -84,7 +84,6 @@ var ProgressBar = /*#__PURE__*/function (_React$Component) {
|
|
|
84
84
|
key: "render",
|
|
85
85
|
value: function render() {
|
|
86
86
|
var _this$props = this.props,
|
|
87
|
-
ariaLabel = _this$props.ariaLabel,
|
|
88
87
|
_this$props$overrides = _this$props.overrides,
|
|
89
88
|
overrides = _this$props$overrides === void 0 ? {} : _this$props$overrides,
|
|
90
89
|
getProgressLabel = _this$props.getProgressLabel,
|
|
@@ -98,8 +97,9 @@ var ProgressBar = /*#__PURE__*/function (_React$Component) {
|
|
|
98
97
|
infinite = _this$props.infinite,
|
|
99
98
|
errorMessage = _this$props.errorMessage,
|
|
100
99
|
forwardedRef = _this$props.forwardedRef,
|
|
101
|
-
restProps = _objectWithoutProperties(_this$props, ["
|
|
100
|
+
restProps = _objectWithoutProperties(_this$props, ["overrides", "getProgressLabel", "value", "size", "steps", "successValue", "minValue", "maxValue", "showLabel", "infinite", "errorMessage", "forwardedRef"]);
|
|
102
101
|
|
|
102
|
+
var ariaLabel = this.props['aria-label'] || this.props.ariaLabel; // fallback on successValue (and it's default) if maxValue is not set by user
|
|
103
103
|
|
|
104
104
|
var maximumValue = maxValue !== 100 ? maxValue : successValue;
|
|
105
105
|
|
|
@@ -52,7 +52,6 @@ class ProgressBar extends React.Component<
|
|
|
52
52
|
|
|
53
53
|
render() {
|
|
54
54
|
const {
|
|
55
|
-
ariaLabel,
|
|
56
55
|
overrides = {},
|
|
57
56
|
getProgressLabel,
|
|
58
57
|
value,
|
|
@@ -67,6 +66,7 @@ class ProgressBar extends React.Component<
|
|
|
67
66
|
forwardedRef,
|
|
68
67
|
...restProps
|
|
69
68
|
} = this.props;
|
|
69
|
+
const ariaLabel = this.props['aria-label'] || this.props.ariaLabel;
|
|
70
70
|
// fallback on successValue (and it's default) if maxValue is not set by user
|
|
71
71
|
const maximumValue = maxValue !== 100 ? maxValue : successValue;
|
|
72
72
|
const [Root, rootProps] = getOverrides(overrides.Root, StyledRoot);
|
|
@@ -23,6 +23,7 @@ export type OverridesT = {
|
|
|
23
23
|
export type ProgressBarPropsT = {
|
|
24
24
|
/** The accessible label for the progress bar (getProgressLabel will be used if not provided) */
|
|
25
25
|
ariaLabel?: string,
|
|
26
|
+
'aria-label'?: string,
|
|
26
27
|
children?: React.Node,
|
|
27
28
|
/** Error message for screen-reader users**/
|
|
28
29
|
errorMessage?: string,
|
package/table/index.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ var SortableHeadCellFactory = function SortableHeadCellFactory() {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
var enableHeadClick = fillClickTarget && !disabled;
|
|
84
|
-
var ariaLabel = props.ariaLabel;
|
|
84
|
+
var ariaLabel = props['aria-label'] || props.ariaLabel;
|
|
85
85
|
|
|
86
86
|
if (!ariaLabel) {
|
|
87
87
|
if (typeof props.title === 'string') {
|
|
@@ -47,7 +47,7 @@ export const SortableHeadCellFactory = (
|
|
|
47
47
|
};
|
|
48
48
|
const enableHeadClick = fillClickTarget && !disabled;
|
|
49
49
|
|
|
50
|
-
let ariaLabel = props.ariaLabel;
|
|
50
|
+
let ariaLabel = props['aria-label'] || props.ariaLabel;
|
|
51
51
|
if (!ariaLabel) {
|
|
52
52
|
if (typeof props.title === 'string') {
|
|
53
53
|
ariaLabel = `sorts table by ${props.title} column`;
|
package/table/types.js.flow
CHANGED
|
@@ -16,6 +16,7 @@ export type SortDirectionT = ?$Keys<typeof SORT_DIRECTION>;
|
|
|
16
16
|
export type HeadCellPropsT = {|
|
|
17
17
|
/** Aria label applied to the sort button. */
|
|
18
18
|
ariaLabel?: string,
|
|
19
|
+
'aria-label'?: string,
|
|
19
20
|
/** Additional content to fill head cell. Most likely used for a filter button. */
|
|
20
21
|
children?: React.Node,
|
|
21
22
|
/** Visually indicates sort direction. Displays a chevron next to column title. */
|