@workday/canvas-kit-react 10.0.0-alpha.470-next.0 → 10.0.0-alpha.474-next.0
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/common/lib/utils/elements.ts +19 -1
- package/dist/commonjs/common/lib/utils/elements.d.ts +3 -1
- package/dist/commonjs/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/elements.js +12 -0
- package/dist/commonjs/layout/lib/utils/other.d.ts +26 -0
- package/dist/commonjs/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.d.ts +1 -1
- package/dist/commonjs/popup/lib/hooks/useFocusRedirect.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useFocusRedirect.js +4 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/es6/common/lib/utils/elements.d.ts +3 -1
- package/dist/es6/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/elements.js +12 -0
- package/dist/es6/layout/lib/utils/other.d.ts +26 -0
- package/dist/es6/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.d.ts +1 -1
- package/dist/es6/popup/lib/hooks/useFocusRedirect.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useFocusRedirect.js +4 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/layout/lib/utils/other.ts +26 -0
- package/package.json +3 -3
- package/popup/lib/hooks/useFocusRedirect.ts +4 -1
|
@@ -43,15 +43,33 @@ export const getFirstFocusableElement = (container: HTMLElement): HTMLElement |
|
|
|
43
43
|
return null;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
const isRadioInput = (element: Element): element is HTMLInputElement => {
|
|
47
|
+
return element.nodeName.toLowerCase() === 'input' && element.getAttribute('type') === 'radio';
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const getRadioGroup = (
|
|
51
|
+
container: HTMLElement,
|
|
52
|
+
element: HTMLInputElement
|
|
53
|
+
): NodeListOf<HTMLInputElement> => {
|
|
54
|
+
return container.querySelectorAll(`input[type="radio"][name="${element.getAttribute('name')}"]`);
|
|
55
|
+
};
|
|
56
|
+
|
|
46
57
|
/**
|
|
47
58
|
* Get the last focusable element in a container.
|
|
59
|
+
*
|
|
60
|
+
* Returns an array of elements if the last focusable element is a radio group
|
|
48
61
|
*/
|
|
49
|
-
export const getLastFocusableElement = (container: HTMLElement):
|
|
62
|
+
export const getLastFocusableElement = (container: HTMLElement): Element[] | Element | null => {
|
|
50
63
|
const elements = container.querySelectorAll('*');
|
|
51
64
|
|
|
52
65
|
for (let i = elements.length - 1; i >= 0; i--) {
|
|
53
66
|
const element = elements.item(i);
|
|
54
67
|
if (element && isFocusable(element) && element.getAttribute('tabindex') !== '-1') {
|
|
68
|
+
if (isRadioInput(element)) {
|
|
69
|
+
const radioGroup = getRadioGroup(container, element);
|
|
70
|
+
|
|
71
|
+
return radioGroup.length > 1 ? Array.from(radioGroup) : element;
|
|
72
|
+
}
|
|
55
73
|
return element as HTMLElement;
|
|
56
74
|
}
|
|
57
75
|
}
|
|
@@ -9,6 +9,8 @@ export declare const isFocusable: (element: Element) => boolean;
|
|
|
9
9
|
export declare const getFirstFocusableElement: (container: HTMLElement) => HTMLElement | null;
|
|
10
10
|
/**
|
|
11
11
|
* Get the last focusable element in a container.
|
|
12
|
+
*
|
|
13
|
+
* Returns an array of elements if the last focusable element is a radio group
|
|
12
14
|
*/
|
|
13
|
-
export declare const getLastFocusableElement: (container: HTMLElement) =>
|
|
15
|
+
export declare const getLastFocusableElement: (container: HTMLElement) => Element[] | Element | null;
|
|
14
16
|
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,OAuB9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW/E,CAAC;
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,OAuB9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW/E,CAAC;AAaF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,cAAe,WAAW,KAAG,OAAO,EAAE,GAAG,OAAO,GAAG,IAgBtF,CAAC"}
|
|
@@ -39,14 +39,26 @@ const getFirstFocusableElement = (container) => {
|
|
|
39
39
|
return null;
|
|
40
40
|
};
|
|
41
41
|
exports.getFirstFocusableElement = getFirstFocusableElement;
|
|
42
|
+
const isRadioInput = (element) => {
|
|
43
|
+
return element.nodeName.toLowerCase() === 'input' && element.getAttribute('type') === 'radio';
|
|
44
|
+
};
|
|
45
|
+
const getRadioGroup = (container, element) => {
|
|
46
|
+
return container.querySelectorAll(`input[type="radio"][name="${element.getAttribute('name')}"]`);
|
|
47
|
+
};
|
|
42
48
|
/**
|
|
43
49
|
* Get the last focusable element in a container.
|
|
50
|
+
*
|
|
51
|
+
* Returns an array of elements if the last focusable element is a radio group
|
|
44
52
|
*/
|
|
45
53
|
const getLastFocusableElement = (container) => {
|
|
46
54
|
const elements = container.querySelectorAll('*');
|
|
47
55
|
for (let i = elements.length - 1; i >= 0; i--) {
|
|
48
56
|
const element = elements.item(i);
|
|
49
57
|
if (element && exports.isFocusable(element) && element.getAttribute('tabindex') !== '-1') {
|
|
58
|
+
if (isRadioInput(element)) {
|
|
59
|
+
const radioGroup = getRadioGroup(container, element);
|
|
60
|
+
return radioGroup.length > 1 ? Array.from(radioGroup) : element;
|
|
61
|
+
}
|
|
50
62
|
return element;
|
|
51
63
|
}
|
|
52
64
|
}
|
|
@@ -32,6 +32,32 @@ export declare type OtherStyleProps = {
|
|
|
32
32
|
pointerEvents?: Property.PointerEvents;
|
|
33
33
|
/** sets [CSS resize property](https://developer.mozilla.org/en-US/docs/Web/CSS/resize) */
|
|
34
34
|
resize?: Property.Resize;
|
|
35
|
+
/** sets [CSS scroll margin property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin) */
|
|
36
|
+
scrollMargin?: Property.ScrollMargin;
|
|
37
|
+
/** sets [CSS scroll margin bottom property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-bottom) */
|
|
38
|
+
scrollMarginBottom?: Property.ScrollMarginBottom;
|
|
39
|
+
/** sets [CSS scroll margin top property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-top) */
|
|
40
|
+
scrollMarginTop?: Property.ScrollMarginTop;
|
|
41
|
+
/** sets [CSS scroll margin inline start property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-inline-start) */
|
|
42
|
+
scrollMarginInlineStart?: Property.ScrollMarginInlineStart;
|
|
43
|
+
/** sets [CSS scroll margin inline end property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-inline-end) */
|
|
44
|
+
scrollMarginInlineEnd?: Property.ScrollMarginInlineEnd;
|
|
45
|
+
/** sets [CSS scroll padding property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding) */
|
|
46
|
+
scrollPadding?: Property.ScrollPadding;
|
|
47
|
+
/** sets [CSS scroll padding bottom property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-bottom) */
|
|
48
|
+
scrollPaddingBottom?: Property.ScrollPaddingBottom;
|
|
49
|
+
/** sets [CSS scroll padding top property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top) */
|
|
50
|
+
scrollPaddingTop?: Property.ScrollPaddingTop;
|
|
51
|
+
/** sets [CSS scroll padding inline start property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-inline-start) */
|
|
52
|
+
scrollPaddingInlineStart?: Property.ScrollPaddingInlineStart;
|
|
53
|
+
/** sets [CSS scroll padding inline end property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-inline-end) */
|
|
54
|
+
scrollPaddingInlineEnd?: Property.ScrollPaddingInlineEnd;
|
|
55
|
+
/** sets [CSS scroll snap align property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) */
|
|
56
|
+
scrollSnapAlign?: Property.ScrollSnapAlign;
|
|
57
|
+
/** sets [CSS scroll snap stop property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) */
|
|
58
|
+
scrollSnapStop?: Property.ScrollSnapStop;
|
|
59
|
+
/** sets [CSS scroll snap type property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) */
|
|
60
|
+
scrollSnapType?: Property.ScrollSnapType;
|
|
35
61
|
/** sets [CSS stroke property](https://developer.mozilla.org/en-US/docs/Web/CSS/stroke) */
|
|
36
62
|
stroke?: Property.Stroke;
|
|
37
63
|
/** sets [CSS transform property](https://developer.mozilla.org/en-US/docs/Web/CSS/transform) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/other.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE/E,8CAA8C;AAC9C,oBAAY,eAAe,GAAG;IAC5B,gGAAgG;IAChG,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,kGAAkG;IAClG,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,kGAAkG;IAClG,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,4FAA4F;IAC5F,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3B,0FAA0F;IAC1F,MAAM,CAA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@ -26,7 +26,7 @@ interface StyledMenuProps {
|
|
|
26
26
|
*/
|
|
27
27
|
isDisabled?: boolean;
|
|
28
28
|
}
|
|
29
|
-
export declare const StyledMenuItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
29
|
+
export declare const StyledMenuItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
30
30
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
31
31
|
} & {
|
|
32
32
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusRedirect.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useFocusRedirect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useFocusRedirect.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useFocusRedirect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;MAuC3B,CAAC"}
|
|
@@ -29,7 +29,10 @@ exports.useFocusRedirect = common_1.createElemPropsHook(usePopupModel_1.usePopup
|
|
|
29
29
|
model.events.hide(event);
|
|
30
30
|
}
|
|
31
31
|
else if (!event.getModifierState('Shift') &&
|
|
32
|
-
|
|
32
|
+
((Array.isArray(lastFocusableElement) &&
|
|
33
|
+
document.activeElement &&
|
|
34
|
+
lastFocusableElement.includes(document.activeElement)) ||
|
|
35
|
+
document.activeElement === lastFocusableElement)) {
|
|
33
36
|
model.events.hide(event);
|
|
34
37
|
}
|
|
35
38
|
}
|
|
@@ -53,7 +53,7 @@ export interface TabsItemProps extends ExtractProps<typeof Box, never>, Partial<
|
|
|
53
53
|
*/
|
|
54
54
|
tabIndex?: number;
|
|
55
55
|
}
|
|
56
|
-
export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
56
|
+
export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
57
57
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
58
58
|
} & {
|
|
59
59
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -9,6 +9,8 @@ export declare const isFocusable: (element: Element) => boolean;
|
|
|
9
9
|
export declare const getFirstFocusableElement: (container: HTMLElement) => HTMLElement | null;
|
|
10
10
|
/**
|
|
11
11
|
* Get the last focusable element in a container.
|
|
12
|
+
*
|
|
13
|
+
* Returns an array of elements if the last focusable element is a radio group
|
|
12
14
|
*/
|
|
13
|
-
export declare const getLastFocusableElement: (container: HTMLElement) =>
|
|
15
|
+
export declare const getLastFocusableElement: (container: HTMLElement) => Element[] | Element | null;
|
|
14
16
|
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,OAuB9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW/E,CAAC;
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,OAuB9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW/E,CAAC;AAaF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,cAAe,WAAW,KAAG,OAAO,EAAE,GAAG,OAAO,GAAG,IAgBtF,CAAC"}
|
|
@@ -34,14 +34,26 @@ export const getFirstFocusableElement = (container) => {
|
|
|
34
34
|
}
|
|
35
35
|
return null;
|
|
36
36
|
};
|
|
37
|
+
const isRadioInput = (element) => {
|
|
38
|
+
return element.nodeName.toLowerCase() === 'input' && element.getAttribute('type') === 'radio';
|
|
39
|
+
};
|
|
40
|
+
const getRadioGroup = (container, element) => {
|
|
41
|
+
return container.querySelectorAll(`input[type="radio"][name="${element.getAttribute('name')}"]`);
|
|
42
|
+
};
|
|
37
43
|
/**
|
|
38
44
|
* Get the last focusable element in a container.
|
|
45
|
+
*
|
|
46
|
+
* Returns an array of elements if the last focusable element is a radio group
|
|
39
47
|
*/
|
|
40
48
|
export const getLastFocusableElement = (container) => {
|
|
41
49
|
const elements = container.querySelectorAll('*');
|
|
42
50
|
for (let i = elements.length - 1; i >= 0; i--) {
|
|
43
51
|
const element = elements.item(i);
|
|
44
52
|
if (element && isFocusable(element) && element.getAttribute('tabindex') !== '-1') {
|
|
53
|
+
if (isRadioInput(element)) {
|
|
54
|
+
const radioGroup = getRadioGroup(container, element);
|
|
55
|
+
return radioGroup.length > 1 ? Array.from(radioGroup) : element;
|
|
56
|
+
}
|
|
45
57
|
return element;
|
|
46
58
|
}
|
|
47
59
|
}
|
|
@@ -32,6 +32,32 @@ export declare type OtherStyleProps = {
|
|
|
32
32
|
pointerEvents?: Property.PointerEvents;
|
|
33
33
|
/** sets [CSS resize property](https://developer.mozilla.org/en-US/docs/Web/CSS/resize) */
|
|
34
34
|
resize?: Property.Resize;
|
|
35
|
+
/** sets [CSS scroll margin property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin) */
|
|
36
|
+
scrollMargin?: Property.ScrollMargin;
|
|
37
|
+
/** sets [CSS scroll margin bottom property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-bottom) */
|
|
38
|
+
scrollMarginBottom?: Property.ScrollMarginBottom;
|
|
39
|
+
/** sets [CSS scroll margin top property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-top) */
|
|
40
|
+
scrollMarginTop?: Property.ScrollMarginTop;
|
|
41
|
+
/** sets [CSS scroll margin inline start property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-inline-start) */
|
|
42
|
+
scrollMarginInlineStart?: Property.ScrollMarginInlineStart;
|
|
43
|
+
/** sets [CSS scroll margin inline end property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-inline-end) */
|
|
44
|
+
scrollMarginInlineEnd?: Property.ScrollMarginInlineEnd;
|
|
45
|
+
/** sets [CSS scroll padding property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding) */
|
|
46
|
+
scrollPadding?: Property.ScrollPadding;
|
|
47
|
+
/** sets [CSS scroll padding bottom property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-bottom) */
|
|
48
|
+
scrollPaddingBottom?: Property.ScrollPaddingBottom;
|
|
49
|
+
/** sets [CSS scroll padding top property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top) */
|
|
50
|
+
scrollPaddingTop?: Property.ScrollPaddingTop;
|
|
51
|
+
/** sets [CSS scroll padding inline start property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-inline-start) */
|
|
52
|
+
scrollPaddingInlineStart?: Property.ScrollPaddingInlineStart;
|
|
53
|
+
/** sets [CSS scroll padding inline end property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-inline-end) */
|
|
54
|
+
scrollPaddingInlineEnd?: Property.ScrollPaddingInlineEnd;
|
|
55
|
+
/** sets [CSS scroll snap align property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) */
|
|
56
|
+
scrollSnapAlign?: Property.ScrollSnapAlign;
|
|
57
|
+
/** sets [CSS scroll snap stop property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) */
|
|
58
|
+
scrollSnapStop?: Property.ScrollSnapStop;
|
|
59
|
+
/** sets [CSS scroll snap type property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) */
|
|
60
|
+
scrollSnapType?: Property.ScrollSnapType;
|
|
35
61
|
/** sets [CSS stroke property](https://developer.mozilla.org/en-US/docs/Web/CSS/stroke) */
|
|
36
62
|
stroke?: Property.Stroke;
|
|
37
63
|
/** sets [CSS transform property](https://developer.mozilla.org/en-US/docs/Web/CSS/transform) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/other.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE/E,8CAA8C;AAC9C,oBAAY,eAAe,GAAG;IAC5B,gGAAgG;IAChG,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,kGAAkG;IAClG,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACjC,kGAAkG;IAClG,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,4FAA4F;IAC5F,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3B,0FAA0F;IAC1F,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC;IACzB,sFAAsF;IACtF,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;IACrB,wFAAwF;IACxF,KAAK,CAAC,EAAE,QAAQ,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workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
29
|
+
export declare const StyledMenuItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
30
30
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
31
31
|
} & {
|
|
32
32
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusRedirect.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useFocusRedirect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useFocusRedirect.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useFocusRedirect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;MAuC3B,CAAC"}
|
|
@@ -23,7 +23,10 @@ export const useFocusRedirect = createElemPropsHook(usePopupModel)(model => {
|
|
|
23
23
|
model.events.hide(event);
|
|
24
24
|
}
|
|
25
25
|
else if (!event.getModifierState('Shift') &&
|
|
26
|
-
|
|
26
|
+
((Array.isArray(lastFocusableElement) &&
|
|
27
|
+
document.activeElement &&
|
|
28
|
+
lastFocusableElement.includes(document.activeElement)) ||
|
|
29
|
+
document.activeElement === lastFocusableElement)) {
|
|
27
30
|
model.events.hide(event);
|
|
28
31
|
}
|
|
29
32
|
}
|
|
@@ -53,7 +53,7 @@ export interface TabsItemProps extends ExtractProps<typeof Box, never>, Partial<
|
|
|
53
53
|
*/
|
|
54
54
|
tabIndex?: number;
|
|
55
55
|
}
|
|
56
|
-
export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
56
|
+
export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "scrollMargin" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
|
|
57
57
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
58
58
|
} & {
|
|
59
59
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -34,6 +34,32 @@ export type OtherStyleProps = {
|
|
|
34
34
|
pointerEvents?: Property.PointerEvents;
|
|
35
35
|
/** sets [CSS resize property](https://developer.mozilla.org/en-US/docs/Web/CSS/resize) */
|
|
36
36
|
resize?: Property.Resize;
|
|
37
|
+
/** sets [CSS scroll margin property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin) */
|
|
38
|
+
scrollMargin?: Property.ScrollMargin;
|
|
39
|
+
/** sets [CSS scroll margin bottom property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-bottom) */
|
|
40
|
+
scrollMarginBottom?: Property.ScrollMarginBottom;
|
|
41
|
+
/** sets [CSS scroll margin top property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-top) */
|
|
42
|
+
scrollMarginTop?: Property.ScrollMarginTop;
|
|
43
|
+
/** sets [CSS scroll margin inline start property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-inline-start) */
|
|
44
|
+
scrollMarginInlineStart?: Property.ScrollMarginInlineStart;
|
|
45
|
+
/** sets [CSS scroll margin inline end property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-inline-end) */
|
|
46
|
+
scrollMarginInlineEnd?: Property.ScrollMarginInlineEnd;
|
|
47
|
+
/** sets [CSS scroll padding property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding) */
|
|
48
|
+
scrollPadding?: Property.ScrollPadding;
|
|
49
|
+
/** sets [CSS scroll padding bottom property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-bottom) */
|
|
50
|
+
scrollPaddingBottom?: Property.ScrollPaddingBottom;
|
|
51
|
+
/** sets [CSS scroll padding top property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top) */
|
|
52
|
+
scrollPaddingTop?: Property.ScrollPaddingTop;
|
|
53
|
+
/** sets [CSS scroll padding inline start property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-inline-start) */
|
|
54
|
+
scrollPaddingInlineStart?: Property.ScrollPaddingInlineStart;
|
|
55
|
+
/** sets [CSS scroll padding inline end property](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-inline-end) */
|
|
56
|
+
scrollPaddingInlineEnd?: Property.ScrollPaddingInlineEnd;
|
|
57
|
+
/** sets [CSS scroll snap align property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) */
|
|
58
|
+
scrollSnapAlign?: Property.ScrollSnapAlign;
|
|
59
|
+
/** sets [CSS scroll snap stop property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) */
|
|
60
|
+
scrollSnapStop?: Property.ScrollSnapStop;
|
|
61
|
+
/** sets [CSS scroll snap type property](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) */
|
|
62
|
+
scrollSnapType?: Property.ScrollSnapType;
|
|
37
63
|
/** sets [CSS stroke property](https://developer.mozilla.org/en-US/docs/Web/CSS/stroke) */
|
|
38
64
|
stroke?: Property.Stroke;
|
|
39
65
|
/** sets [CSS transform property](https://developer.mozilla.org/en-US/docs/Web/CSS/transform) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"version": "10.0.0-alpha.474-next.0",
|
|
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": "^10.0.0-alpha.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^10.0.0-alpha.474-next.0",
|
|
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": "93f3772ff1d28cc1c05c6e91e908d259ae1819e6"
|
|
70
70
|
}
|
|
@@ -33,7 +33,10 @@ export const useFocusRedirect = createElemPropsHook(usePopupModel)(model => {
|
|
|
33
33
|
model.events.hide(event);
|
|
34
34
|
} else if (
|
|
35
35
|
!event.getModifierState('Shift') &&
|
|
36
|
-
|
|
36
|
+
((Array.isArray(lastFocusableElement) &&
|
|
37
|
+
document.activeElement &&
|
|
38
|
+
lastFocusableElement.includes(document.activeElement)) ||
|
|
39
|
+
document.activeElement === lastFocusableElement)
|
|
37
40
|
) {
|
|
38
41
|
model.events.hide(event);
|
|
39
42
|
}
|