@workday/canvas-kit-react 11.0.25 → 11.0.27
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/checkbox/lib/CheckboxInput.tsx +2 -2
- package/dist/commonjs/checkbox/lib/CheckboxInput.js +2 -2
- package/dist/commonjs/modal/lib/Modal.d.ts +1 -1
- package/dist/commonjs/modal/lib/Modal.js +1 -1
- package/dist/commonjs/modal/lib/hooks/useModalCard.d.ts +7 -0
- package/dist/commonjs/modal/lib/hooks/useModalCard.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/hooks/useModalCard.js +8 -1
- package/dist/es6/checkbox/lib/CheckboxInput.js +2 -2
- package/dist/es6/modal/lib/Modal.d.ts +1 -1
- package/dist/es6/modal/lib/Modal.js +1 -1
- package/dist/es6/modal/lib/hooks/useModalCard.d.ts +7 -0
- package/dist/es6/modal/lib/hooks/useModalCard.d.ts.map +1 -1
- package/dist/es6/modal/lib/hooks/useModalCard.js +8 -1
- package/modal/lib/Modal.tsx +1 -1
- package/modal/lib/hooks/useModalCard.ts +8 -1
- package/package.json +4 -4
|
@@ -223,8 +223,8 @@ const checkboxInputStencil = createStencil({
|
|
|
223
223
|
|
|
224
224
|
export const CheckboxInput = createComponent('input')({
|
|
225
225
|
displayName: 'CheckboxInput',
|
|
226
|
-
Component: ({variant, error, ...elemProps}: CheckboxProps, ref, Element) => {
|
|
227
|
-
const {checked, disabled
|
|
226
|
+
Component: ({variant, error, indeterminate, ...elemProps}: CheckboxProps, ref, Element) => {
|
|
227
|
+
const {checked, disabled} = elemProps;
|
|
228
228
|
|
|
229
229
|
return (
|
|
230
230
|
<Element
|
|
@@ -47,8 +47,8 @@ const checkboxInputStencil = canvas_kit_styling_1.createStencil({
|
|
|
47
47
|
}, "checkbox-input-d394e3");
|
|
48
48
|
exports.CheckboxInput = common_1.createComponent('input')({
|
|
49
49
|
displayName: 'CheckboxInput',
|
|
50
|
-
Component: ({ variant, error, ...elemProps }, ref, Element) => {
|
|
51
|
-
const { checked, disabled
|
|
50
|
+
Component: ({ variant, error, indeterminate, ...elemProps }, ref, Element) => {
|
|
51
|
+
const { checked, disabled } = elemProps;
|
|
52
52
|
return (React.createElement(Element, Object.assign({ type: "checkbox", ref: ref, "aria-checked": indeterminate ? 'mixed' : checked }, canvas_kit_styling_1.handleCsProp(elemProps, checkboxInputStencil({ variant, disabled, error: !!error })))));
|
|
53
53
|
},
|
|
54
54
|
});
|
|
@@ -162,7 +162,7 @@ export declare const Modal: import("@workday/canvas-kit-react/common").Component
|
|
|
162
162
|
/**
|
|
163
163
|
* The `Modal.Card` is wraps a {@link PopupCard Popup.Card} which wraps a {@link Card}. It is
|
|
164
164
|
* the `role="dialog"` element and is uses `useModalCard` behavior hook which sets
|
|
165
|
-
* `aria-modal="
|
|
165
|
+
* `aria-modal="false"` and sets the `aria-labelledby` that points to the `id` of the
|
|
166
166
|
* {@link ModalHeading Modal.Heading}. If you don't use a `Modal.Heading`, add an `aria-label`
|
|
167
167
|
* instead. The default element is a `div` and can be changed via the `as` prop.
|
|
168
168
|
*/
|
|
@@ -62,7 +62,7 @@ exports.Modal = common_1.createContainer()({
|
|
|
62
62
|
/**
|
|
63
63
|
* The `Modal.Card` is wraps a {@link PopupCard Popup.Card} which wraps a {@link Card}. It is
|
|
64
64
|
* the `role="dialog"` element and is uses `useModalCard` behavior hook which sets
|
|
65
|
-
* `aria-modal="
|
|
65
|
+
* `aria-modal="false"` and sets the `aria-labelledby` that points to the `id` of the
|
|
66
66
|
* {@link ModalHeading Modal.Heading}. If you don't use a `Modal.Heading`, add an `aria-label`
|
|
67
67
|
* instead. The default element is a `div` and can be changed via the `as` prop.
|
|
68
68
|
*/
|
|
@@ -19,6 +19,13 @@ export declare const useModalCard: import("@workday/canvas-kit-react/common").Be
|
|
|
19
19
|
role: string;
|
|
20
20
|
'aria-labelledby': string;
|
|
21
21
|
} & {
|
|
22
|
+
/**
|
|
23
|
+
* `aria-modal` was added with the intent that screen readers would add support to properly define content within a modal,
|
|
24
|
+
* including popups like a Select. However, when aria-modal is true, it will hide other elements from screen readers,
|
|
25
|
+
* including popups owned by the modal because these popups are siblings to the modal and not ancestors. There is no defined time when Apple/VoiceOver
|
|
26
|
+
* might change this behavior and better support aria-owns, so for the time being we'll explicitly set this to false to provide a better
|
|
27
|
+
* VoiceOver experience.
|
|
28
|
+
*/
|
|
22
29
|
'aria-modal': boolean;
|
|
23
30
|
}>;
|
|
24
31
|
//# sourceMappingURL=useModalCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModalCard.d.ts","sourceRoot":"","sources":["../../../../../modal/lib/hooks/useModalCard.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"useModalCard.d.ts","sourceRoot":"","sources":["../../../../../modal/lib/hooks/useModalCard.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;IAInB;;;;;;OAMG;;EAIR,CAAC"}
|
|
@@ -5,6 +5,13 @@ const common_1 = require("@workday/canvas-kit-react/common");
|
|
|
5
5
|
const popup_1 = require("@workday/canvas-kit-react/popup");
|
|
6
6
|
exports.useModalCard = common_1.composeHooks(popup_1.usePopupCard, common_1.createElemPropsHook(popup_1.usePopupModel)(() => {
|
|
7
7
|
return {
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* `aria-modal` was added with the intent that screen readers would add support to properly define content within a modal,
|
|
10
|
+
* including popups like a Select. However, when aria-modal is true, it will hide other elements from screen readers,
|
|
11
|
+
* including popups owned by the modal because these popups are siblings to the modal and not ancestors. There is no defined time when Apple/VoiceOver
|
|
12
|
+
* might change this behavior and better support aria-owns, so for the time being we'll explicitly set this to false to provide a better
|
|
13
|
+
* VoiceOver experience.
|
|
14
|
+
*/
|
|
15
|
+
'aria-modal': false,
|
|
9
16
|
};
|
|
10
17
|
}));
|
|
@@ -25,8 +25,8 @@ const checkboxInputStencil = createStencil({
|
|
|
25
25
|
}, "checkbox-input-d394e3");
|
|
26
26
|
export const CheckboxInput = createComponent('input')({
|
|
27
27
|
displayName: 'CheckboxInput',
|
|
28
|
-
Component: ({ variant, error, ...elemProps }, ref, Element) => {
|
|
29
|
-
const { checked, disabled
|
|
28
|
+
Component: ({ variant, error, indeterminate, ...elemProps }, ref, Element) => {
|
|
29
|
+
const { checked, disabled } = elemProps;
|
|
30
30
|
return (React.createElement(Element, Object.assign({ type: "checkbox", ref: ref, "aria-checked": indeterminate ? 'mixed' : checked }, handleCsProp(elemProps, checkboxInputStencil({ variant, disabled, error: !!error })))));
|
|
31
31
|
},
|
|
32
32
|
});
|
|
@@ -162,7 +162,7 @@ export declare const Modal: import("@workday/canvas-kit-react/common").Component
|
|
|
162
162
|
/**
|
|
163
163
|
* The `Modal.Card` is wraps a {@link PopupCard Popup.Card} which wraps a {@link Card}. It is
|
|
164
164
|
* the `role="dialog"` element and is uses `useModalCard` behavior hook which sets
|
|
165
|
-
* `aria-modal="
|
|
165
|
+
* `aria-modal="false"` and sets the `aria-labelledby` that points to the `id` of the
|
|
166
166
|
* {@link ModalHeading Modal.Heading}. If you don't use a `Modal.Heading`, add an `aria-label`
|
|
167
167
|
* instead. The default element is a `div` and can be changed via the `as` prop.
|
|
168
168
|
*/
|
|
@@ -40,7 +40,7 @@ export const Modal = createContainer()({
|
|
|
40
40
|
/**
|
|
41
41
|
* The `Modal.Card` is wraps a {@link PopupCard Popup.Card} which wraps a {@link Card}. It is
|
|
42
42
|
* the `role="dialog"` element and is uses `useModalCard` behavior hook which sets
|
|
43
|
-
* `aria-modal="
|
|
43
|
+
* `aria-modal="false"` and sets the `aria-labelledby` that points to the `id` of the
|
|
44
44
|
* {@link ModalHeading Modal.Heading}. If you don't use a `Modal.Heading`, add an `aria-label`
|
|
45
45
|
* instead. The default element is a `div` and can be changed via the `as` prop.
|
|
46
46
|
*/
|
|
@@ -19,6 +19,13 @@ export declare const useModalCard: import("@workday/canvas-kit-react/common").Be
|
|
|
19
19
|
role: string;
|
|
20
20
|
'aria-labelledby': string;
|
|
21
21
|
} & {
|
|
22
|
+
/**
|
|
23
|
+
* `aria-modal` was added with the intent that screen readers would add support to properly define content within a modal,
|
|
24
|
+
* including popups like a Select. However, when aria-modal is true, it will hide other elements from screen readers,
|
|
25
|
+
* including popups owned by the modal because these popups are siblings to the modal and not ancestors. There is no defined time when Apple/VoiceOver
|
|
26
|
+
* might change this behavior and better support aria-owns, so for the time being we'll explicitly set this to false to provide a better
|
|
27
|
+
* VoiceOver experience.
|
|
28
|
+
*/
|
|
22
29
|
'aria-modal': boolean;
|
|
23
30
|
}>;
|
|
24
31
|
//# sourceMappingURL=useModalCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModalCard.d.ts","sourceRoot":"","sources":["../../../../../modal/lib/hooks/useModalCard.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"useModalCard.d.ts","sourceRoot":"","sources":["../../../../../modal/lib/hooks/useModalCard.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;IAInB;;;;;;OAMG;;EAIR,CAAC"}
|
|
@@ -2,6 +2,13 @@ import { composeHooks, createElemPropsHook } from '@workday/canvas-kit-react/com
|
|
|
2
2
|
import { usePopupCard, usePopupModel } from '@workday/canvas-kit-react/popup';
|
|
3
3
|
export const useModalCard = composeHooks(usePopupCard, createElemPropsHook(usePopupModel)(() => {
|
|
4
4
|
return {
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* `aria-modal` was added with the intent that screen readers would add support to properly define content within a modal,
|
|
7
|
+
* including popups like a Select. However, when aria-modal is true, it will hide other elements from screen readers,
|
|
8
|
+
* including popups owned by the modal because these popups are siblings to the modal and not ancestors. There is no defined time when Apple/VoiceOver
|
|
9
|
+
* might change this behavior and better support aria-owns, so for the time being we'll explicitly set this to false to provide a better
|
|
10
|
+
* VoiceOver experience.
|
|
11
|
+
*/
|
|
12
|
+
'aria-modal': false,
|
|
6
13
|
};
|
|
7
14
|
}));
|
package/modal/lib/Modal.tsx
CHANGED
|
@@ -42,7 +42,7 @@ export const Modal = createContainer()({
|
|
|
42
42
|
/**
|
|
43
43
|
* The `Modal.Card` is wraps a {@link PopupCard Popup.Card} which wraps a {@link Card}. It is
|
|
44
44
|
* the `role="dialog"` element and is uses `useModalCard` behavior hook which sets
|
|
45
|
-
* `aria-modal="
|
|
45
|
+
* `aria-modal="false"` and sets the `aria-labelledby` that points to the `id` of the
|
|
46
46
|
* {@link ModalHeading Modal.Heading}. If you don't use a `Modal.Heading`, add an `aria-label`
|
|
47
47
|
* instead. The default element is a `div` and can be changed via the `as` prop.
|
|
48
48
|
*/
|
|
@@ -5,7 +5,14 @@ export const useModalCard = composeHooks(
|
|
|
5
5
|
usePopupCard,
|
|
6
6
|
createElemPropsHook(usePopupModel)(() => {
|
|
7
7
|
return {
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* `aria-modal` was added with the intent that screen readers would add support to properly define content within a modal,
|
|
10
|
+
* including popups like a Select. However, when aria-modal is true, it will hide other elements from screen readers,
|
|
11
|
+
* including popups owned by the modal because these popups are siblings to the modal and not ancestors. There is no defined time when Apple/VoiceOver
|
|
12
|
+
* might change this behavior and better support aria-owns, so for the time being we'll explicitly set this to false to provide a better
|
|
13
|
+
* VoiceOver experience.
|
|
14
|
+
*/
|
|
15
|
+
'aria-modal': false,
|
|
9
16
|
};
|
|
10
17
|
})
|
|
11
18
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.27",
|
|
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,8 +49,8 @@
|
|
|
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": "^11.0.
|
|
53
|
-
"@workday/canvas-kit-styling": "^11.0.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^11.0.27",
|
|
53
|
+
"@workday/canvas-kit-styling": "^11.0.27",
|
|
54
54
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
55
55
|
"@workday/canvas-tokens-web": "^2.0.0",
|
|
56
56
|
"@workday/design-assets-types": "^0.2.8",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
68
68
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "5b915c6804168b8a875d07adf64cf61c719b0f10"
|
|
71
71
|
}
|