@workday/canvas-kit-react 9.0.0-alpha.394-next.7 → 9.0.0-alpha.397-next.9
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/collection/lib/useListItemSelect.tsx +3 -4
- package/common/lib/utils/components.ts +49 -13
- package/common/lib/utils/models.ts +9 -5
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +3 -3
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts +3 -3
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemSelect.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemSelect.js +3 -4
- package/dist/commonjs/common/lib/utils/components.d.ts +12 -6
- package/dist/commonjs/common/lib/utils/components.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/components.js +29 -10
- package/dist/commonjs/common/lib/utils/models.d.ts +6 -2
- package/dist/commonjs/common/lib/utils/models.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/models.js +2 -1
- package/dist/commonjs/dialog/lib/Dialog.d.ts +2 -2
- package/dist/commonjs/dialog/lib/DialogCard.d.ts +1 -1
- package/dist/commonjs/dialog/lib/DialogPopper.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormField.js +3 -0
- package/dist/commonjs/form-field/lib/Label.d.ts +4 -3
- package/dist/commonjs/form-field/lib/Label.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Label.js +4 -4
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +5 -2
- package/dist/commonjs/modal/lib/Modal.d.ts +2 -2
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.d.ts +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +3 -3
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts +3 -3
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemSelect.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemSelect.js +3 -4
- package/dist/es6/common/lib/utils/components.d.ts +12 -6
- package/dist/es6/common/lib/utils/components.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/components.js +29 -10
- package/dist/es6/common/lib/utils/models.d.ts +6 -2
- package/dist/es6/common/lib/utils/models.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/models.js +2 -1
- package/dist/es6/dialog/lib/Dialog.d.ts +2 -2
- package/dist/es6/dialog/lib/DialogCard.d.ts +1 -1
- package/dist/es6/dialog/lib/DialogPopper.d.ts +1 -1
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormField.js +3 -0
- package/dist/es6/form-field/lib/Label.d.ts +4 -3
- package/dist/es6/form-field/lib/Label.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Label.js +4 -4
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.js +5 -2
- package/dist/es6/modal/lib/Modal.d.ts +2 -2
- package/dist/es6/modal/lib/ModalOverflowOverlay.d.ts +1 -1
- package/form-field/lib/FormField.tsx +4 -0
- package/form-field/lib/Label.tsx +9 -8
- package/menu/lib/MenuItem.tsx +5 -2
- package/package.json +3 -3
package/form-field/lib/Label.tsx
CHANGED
|
@@ -15,7 +15,7 @@ export interface LabelProps extends FormFieldLabelPositionBehavior {
|
|
|
15
15
|
*/
|
|
16
16
|
isLegend?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
* The id of
|
|
18
|
+
* The id of the form-related element. Synonymous with `for`.
|
|
19
19
|
*/
|
|
20
20
|
htmlFor?: string;
|
|
21
21
|
/**
|
|
@@ -24,8 +24,9 @@ export interface LabelProps extends FormFieldLabelPositionBehavior {
|
|
|
24
24
|
*/
|
|
25
25
|
required?: boolean;
|
|
26
26
|
/**
|
|
27
|
-
* The
|
|
28
|
-
*
|
|
27
|
+
* The required label is not visible to screen readers and should have no label. This prop will be
|
|
28
|
+
* ignored.
|
|
29
|
+
* @deprecated
|
|
29
30
|
*/
|
|
30
31
|
requiredLabel?: string;
|
|
31
32
|
/**
|
|
@@ -62,7 +63,7 @@ const labelStyles = [
|
|
|
62
63
|
},
|
|
63
64
|
];
|
|
64
65
|
|
|
65
|
-
const
|
|
66
|
+
const RequiredAsterisk = styled('abbr')({
|
|
66
67
|
color: colors.cinnamon500,
|
|
67
68
|
fontSize: '16px',
|
|
68
69
|
fontWeight: 400,
|
|
@@ -94,16 +95,16 @@ class Label extends React.Component<React.PropsWithChildren<LabelProps>> {
|
|
|
94
95
|
const {
|
|
95
96
|
labelPosition = Label.Position.Top,
|
|
96
97
|
isLegend = false,
|
|
97
|
-
|
|
98
|
+
required,
|
|
98
99
|
...elemProps
|
|
99
100
|
} = this.props;
|
|
100
|
-
const children = !
|
|
101
|
+
const children = !required
|
|
101
102
|
? this.props.children
|
|
102
103
|
: [
|
|
103
104
|
this.props.children,
|
|
104
|
-
<
|
|
105
|
+
<RequiredAsterisk key={'0'} aria-hidden>
|
|
105
106
|
*
|
|
106
|
-
</
|
|
107
|
+
</RequiredAsterisk>,
|
|
107
108
|
];
|
|
108
109
|
return (
|
|
109
110
|
<>
|
package/menu/lib/MenuItem.tsx
CHANGED
|
@@ -96,7 +96,7 @@ const StyledItem = styled(Box.as('button'))<StyledType>(
|
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
98
|
backgroundColor: 'inherit',
|
|
99
|
-
'&:disabled, &[aria-disabled]': {
|
|
99
|
+
'&:disabled, &[aria-disabled=true]': {
|
|
100
100
|
color: colors.licorice100,
|
|
101
101
|
cursor: 'default',
|
|
102
102
|
'.wd-icon-fill, .wd-icon-accent, .wd-icon-accent2': {
|
|
@@ -157,7 +157,10 @@ export const useMenuItem = composeHooks(
|
|
|
157
157
|
onClick:
|
|
158
158
|
model.state.mode === 'single'
|
|
159
159
|
? (event: React.SyntheticEvent) => {
|
|
160
|
-
|
|
160
|
+
// only hide if the item isn't disabled
|
|
161
|
+
if (event.currentTarget.getAttribute('aria-disabled') !== 'true') {
|
|
162
|
+
model.events.hide(event);
|
|
163
|
+
}
|
|
161
164
|
}
|
|
162
165
|
: undefined,
|
|
163
166
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.397-next.9+7f8997d2",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@emotion/styled": "^11.6.0",
|
|
50
50
|
"@popperjs/core": "^2.5.4",
|
|
51
51
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
52
|
-
"@workday/canvas-kit-popup-stack": "^9.0.0-alpha.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^9.0.0-alpha.397-next.9+7f8997d2",
|
|
53
53
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
54
54
|
"@workday/design-assets-types": "^0.2.8",
|
|
55
55
|
"chroma-js": "^2.1.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
67
67
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "7f8997d24b9771c2e4e28c06f74515a89cfb998c"
|
|
70
70
|
}
|