@workday/canvas-kit-react 5.3.12 → 5.3.15
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/banner/lib/Banner.tsx +32 -33
- package/dist/commonjs/banner/lib/Banner.d.ts +4 -5
- package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
- package/dist/commonjs/banner/lib/Banner.js +10 -32
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +2 -0
- package/dist/commonjs/popup/lib/hooks/usePopupTarget.js +1 -1
- package/dist/es6/banner/lib/Banner.d.ts +4 -5
- package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
- package/dist/es6/banner/lib/Banner.js +10 -32
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +2 -0
- package/dist/es6/popup/lib/hooks/usePopupTarget.js +1 -1
- package/package.json +5 -5
- package/popup/lib/hooks/useDisableBodyScroll.ts +2 -0
- package/popup/lib/hooks/usePopupTarget.ts +1 -1
- package/ts3.5/dist/commonjs/banner/lib/Banner.d.ts +4 -5
- package/ts3.5/dist/es6/banner/lib/Banner.d.ts +4 -5
package/banner/lib/Banner.tsx
CHANGED
|
@@ -85,41 +85,40 @@ const BannerViewAll = styled('span')<BannerProps>(
|
|
|
85
85
|
})
|
|
86
86
|
);
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
const Banner = (React.forwardRef<HTMLButtonElement, BannerProps>((props, ref) => {
|
|
89
|
+
const {
|
|
90
|
+
actionText = 'View All',
|
|
91
|
+
variant = BannerVariant.Full,
|
|
92
|
+
error = ErrorType.Alert,
|
|
93
|
+
label,
|
|
94
|
+
onClick,
|
|
95
|
+
...elemProps
|
|
96
|
+
} = props;
|
|
91
97
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
variant = BannerVariant.Full,
|
|
96
|
-
error = ErrorType.Alert,
|
|
97
|
-
label,
|
|
98
|
-
onClick,
|
|
99
|
-
...props
|
|
100
|
-
} = this.props;
|
|
98
|
+
const bannerIcon = error === ErrorType.Error ? exclamationCircleIcon : exclamationTriangleIcon;
|
|
99
|
+
const iconColor = error === ErrorType.Error ? colors.frenchVanilla100 : colors.blackPepper400;
|
|
100
|
+
const iconSize = 24;
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
102
|
+
return (
|
|
103
|
+
<BannerWrapper
|
|
104
|
+
aria-label={actionText + ': ' + label}
|
|
105
|
+
role="button"
|
|
106
|
+
variant={variant}
|
|
107
|
+
tabIndex={0}
|
|
108
|
+
onClick={onClick}
|
|
109
|
+
error={error}
|
|
110
|
+
ref={ref}
|
|
111
|
+
{...elemProps}
|
|
112
|
+
>
|
|
113
|
+
<BannerIcon icon={bannerIcon} color={iconColor} colorHover={iconColor} size={iconSize} />
|
|
114
|
+
<BannerLabel>{label}</BannerLabel>
|
|
115
|
+
<BannerViewAll variant={variant}>{actionText}</BannerViewAll>
|
|
116
|
+
</BannerWrapper>
|
|
117
|
+
);
|
|
118
|
+
}) as any) as React.FC<BannerProps> & {
|
|
119
|
+
Variant: typeof BannerVariant;
|
|
120
|
+
ErrorType: typeof ErrorType;
|
|
121
|
+
};
|
|
123
122
|
|
|
124
123
|
Banner.Variant = BannerVariant;
|
|
125
124
|
Banner.ErrorType = ErrorType;
|
|
@@ -29,10 +29,9 @@ export interface BannerProps extends Themeable, React.ButtonHTMLAttributes<HTMLB
|
|
|
29
29
|
*/
|
|
30
30
|
actionText?: string;
|
|
31
31
|
}
|
|
32
|
-
declare
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
32
|
+
declare const Banner: React.FC<BannerProps> & {
|
|
33
|
+
Variant: typeof BannerVariant;
|
|
34
|
+
ErrorType: typeof ErrorType;
|
|
35
|
+
};
|
|
37
36
|
export default Banner;
|
|
38
37
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,SAAS,EAAqB,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAEzF,oBAAY,aAAa;IACvB,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC3F;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoDD,
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,SAAS,EAAqB,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAEzF,oBAAY,aAAa;IACvB,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC3F;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoDD,QAAA,MAAM,MAAM;;;CAiCX,CAAC;AAKF,eAAe,MAAM,CAAC"}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
var __assign = (this && this.__assign) || function () {
|
|
16
3
|
__assign = Object.assign || function(t) {
|
|
17
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -80,25 +67,16 @@ var BannerViewAll = common_1.styled('span')({
|
|
|
80
67
|
display: variant === BannerVariant.Sticky ? 'none' : undefined,
|
|
81
68
|
});
|
|
82
69
|
});
|
|
83
|
-
var Banner =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return (React.createElement(BannerWrapper, __assign({ "aria-label": actionText + ': ' + label, role: "button", variant: variant, tabIndex: 0, onClick: onClick, error: error }, props),
|
|
94
|
-
React.createElement(BannerIcon, { icon: bannerIcon, color: iconColor, colorHover: iconColor, size: iconSize }),
|
|
95
|
-
React.createElement(BannerLabel, null, label),
|
|
96
|
-
React.createElement(BannerViewAll, { variant: variant }, actionText)));
|
|
97
|
-
};
|
|
98
|
-
Banner.Variant = BannerVariant;
|
|
99
|
-
Banner.ErrorType = common_1.ErrorType;
|
|
100
|
-
return Banner;
|
|
101
|
-
}(React.Component));
|
|
70
|
+
var Banner = React.forwardRef(function (props, ref) {
|
|
71
|
+
var _a = props.actionText, actionText = _a === void 0 ? 'View All' : _a, _b = props.variant, variant = _b === void 0 ? BannerVariant.Full : _b, _c = props.error, error = _c === void 0 ? common_1.ErrorType.Alert : _c, label = props.label, onClick = props.onClick, elemProps = __rest(props, ["actionText", "variant", "error", "label", "onClick"]);
|
|
72
|
+
var bannerIcon = error === common_1.ErrorType.Error ? canvas_system_icons_web_1.exclamationCircleIcon : canvas_system_icons_web_1.exclamationTriangleIcon;
|
|
73
|
+
var iconColor = error === common_1.ErrorType.Error ? tokens_1.colors.frenchVanilla100 : tokens_1.colors.blackPepper400;
|
|
74
|
+
var iconSize = 24;
|
|
75
|
+
return (React.createElement(BannerWrapper, __assign({ "aria-label": actionText + ': ' + label, role: "button", variant: variant, tabIndex: 0, onClick: onClick, error: error, ref: ref }, elemProps),
|
|
76
|
+
React.createElement(BannerIcon, { icon: bannerIcon, color: iconColor, colorHover: iconColor, size: iconSize }),
|
|
77
|
+
React.createElement(BannerLabel, null, label),
|
|
78
|
+
React.createElement(BannerViewAll, { variant: variant }, actionText)));
|
|
79
|
+
});
|
|
102
80
|
Banner.Variant = BannerVariant;
|
|
103
81
|
Banner.ErrorType = common_1.ErrorType;
|
|
104
82
|
exports.default = Banner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,sIAwBhC,CAAC"}
|
|
@@ -22,6 +22,8 @@ exports.useDisableBodyScroll = function (model, elemProps) {
|
|
|
22
22
|
var overflowX = document.body.style.overflowX;
|
|
23
23
|
var overflow = document.body.style.overflow;
|
|
24
24
|
document.body.style.overflow = 'hidden';
|
|
25
|
+
document.body.style.overflowY = 'hidden';
|
|
26
|
+
document.body.style.overflowX = 'hidden';
|
|
25
27
|
return function () {
|
|
26
28
|
document.body.style.overflow = overflow;
|
|
27
29
|
document.body.style.overflowY = overflowY;
|
|
@@ -14,7 +14,7 @@ exports.usePopupTarget = common_1.createHook(function (_a, ref) {
|
|
|
14
14
|
// `state.targetRef` manually. This ensures that custom target components don't need to handle
|
|
15
15
|
// ref forwarding since ref forwarding is only really needed to programmatically open popups
|
|
16
16
|
// around a target _before_ a user clicks. In that rare case, ref forwarding is required.
|
|
17
|
-
if (!state.targetRef.current) {
|
|
17
|
+
if (!(state.targetRef.current instanceof Element)) {
|
|
18
18
|
state.targetRef.current = event.currentTarget;
|
|
19
19
|
}
|
|
20
20
|
if (state.visibility !== 'hidden') {
|
|
@@ -29,10 +29,9 @@ export interface BannerProps extends Themeable, React.ButtonHTMLAttributes<HTMLB
|
|
|
29
29
|
*/
|
|
30
30
|
actionText?: string;
|
|
31
31
|
}
|
|
32
|
-
declare
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
32
|
+
declare const Banner: React.FC<BannerProps> & {
|
|
33
|
+
Variant: typeof BannerVariant;
|
|
34
|
+
ErrorType: typeof ErrorType;
|
|
35
|
+
};
|
|
37
36
|
export default Banner;
|
|
38
37
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,SAAS,EAAqB,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAEzF,oBAAY,aAAa;IACvB,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC3F;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoDD,
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,SAAS,EAAqB,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAEzF,oBAAY,aAAa;IACvB,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC3F;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoDD,QAAA,MAAM,MAAM;;;CAiCX,CAAC;AAKF,eAAe,MAAM,CAAC"}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
1
|
var __assign = (this && this.__assign) || function () {
|
|
15
2
|
__assign = Object.assign || function(t) {
|
|
16
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -71,25 +58,16 @@ var BannerViewAll = styled('span')({
|
|
|
71
58
|
display: variant === BannerVariant.Sticky ? 'none' : undefined,
|
|
72
59
|
});
|
|
73
60
|
});
|
|
74
|
-
var Banner =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return (React.createElement(BannerWrapper, __assign({ "aria-label": actionText + ': ' + label, role: "button", variant: variant, tabIndex: 0, onClick: onClick, error: error }, props),
|
|
85
|
-
React.createElement(BannerIcon, { icon: bannerIcon, color: iconColor, colorHover: iconColor, size: iconSize }),
|
|
86
|
-
React.createElement(BannerLabel, null, label),
|
|
87
|
-
React.createElement(BannerViewAll, { variant: variant }, actionText)));
|
|
88
|
-
};
|
|
89
|
-
Banner.Variant = BannerVariant;
|
|
90
|
-
Banner.ErrorType = ErrorType;
|
|
91
|
-
return Banner;
|
|
92
|
-
}(React.Component));
|
|
61
|
+
var Banner = React.forwardRef(function (props, ref) {
|
|
62
|
+
var _a = props.actionText, actionText = _a === void 0 ? 'View All' : _a, _b = props.variant, variant = _b === void 0 ? BannerVariant.Full : _b, _c = props.error, error = _c === void 0 ? ErrorType.Alert : _c, label = props.label, onClick = props.onClick, elemProps = __rest(props, ["actionText", "variant", "error", "label", "onClick"]);
|
|
63
|
+
var bannerIcon = error === ErrorType.Error ? exclamationCircleIcon : exclamationTriangleIcon;
|
|
64
|
+
var iconColor = error === ErrorType.Error ? colors.frenchVanilla100 : colors.blackPepper400;
|
|
65
|
+
var iconSize = 24;
|
|
66
|
+
return (React.createElement(BannerWrapper, __assign({ "aria-label": actionText + ': ' + label, role: "button", variant: variant, tabIndex: 0, onClick: onClick, error: error, ref: ref }, elemProps),
|
|
67
|
+
React.createElement(BannerIcon, { icon: bannerIcon, color: iconColor, colorHover: iconColor, size: iconSize }),
|
|
68
|
+
React.createElement(BannerLabel, null, label),
|
|
69
|
+
React.createElement(BannerViewAll, { variant: variant }, actionText)));
|
|
70
|
+
});
|
|
93
71
|
Banner.Variant = BannerVariant;
|
|
94
72
|
Banner.ErrorType = ErrorType;
|
|
95
73
|
export default Banner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,sIAwBhC,CAAC"}
|
|
@@ -17,6 +17,8 @@ export var useDisableBodyScroll = function (model, elemProps) {
|
|
|
17
17
|
var overflowX = document.body.style.overflowX;
|
|
18
18
|
var overflow = document.body.style.overflow;
|
|
19
19
|
document.body.style.overflow = 'hidden';
|
|
20
|
+
document.body.style.overflowY = 'hidden';
|
|
21
|
+
document.body.style.overflowX = 'hidden';
|
|
20
22
|
return function () {
|
|
21
23
|
document.body.style.overflow = overflow;
|
|
22
24
|
document.body.style.overflowY = overflowY;
|
|
@@ -12,7 +12,7 @@ export var usePopupTarget = createHook(function (_a, ref) {
|
|
|
12
12
|
// `state.targetRef` manually. This ensures that custom target components don't need to handle
|
|
13
13
|
// ref forwarding since ref forwarding is only really needed to programmatically open popups
|
|
14
14
|
// around a target _before_ a user clicks. In that rare case, ref forwarding is required.
|
|
15
|
-
if (!state.targetRef.current) {
|
|
15
|
+
if (!(state.targetRef.current instanceof Element)) {
|
|
16
16
|
state.targetRef.current = event.currentTarget;
|
|
17
17
|
}
|
|
18
18
|
if (state.visibility !== 'hidden') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.15",
|
|
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",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"@popperjs/core": "^2.5.4",
|
|
59
59
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
60
60
|
"@workday/canvas-depth-web": "^0.16.4",
|
|
61
|
-
"@workday/canvas-kit-labs-react": "^5.3.
|
|
62
|
-
"@workday/canvas-kit-popup-stack": "^5.3.
|
|
63
|
-
"@workday/canvas-kit-preview-react": "^5.3.
|
|
61
|
+
"@workday/canvas-kit-labs-react": "^5.3.15",
|
|
62
|
+
"@workday/canvas-kit-popup-stack": "^5.3.15",
|
|
63
|
+
"@workday/canvas-kit-preview-react": "^5.3.15",
|
|
64
64
|
"@workday/canvas-system-icons-web": "1.0.41",
|
|
65
65
|
"@workday/design-assets-types": "^0.2.4",
|
|
66
66
|
"chroma-js": "^2.1.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"@workday/canvas-accent-icons-web": "^1.0.0",
|
|
78
78
|
"@workday/canvas-applet-icons-web": "^0.17.50"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "fe5165ae7e3c7c6a537d64e7353f40d6add7ea95"
|
|
81
81
|
}
|
|
@@ -22,6 +22,8 @@ export const useDisableBodyScroll = (model: PopupModel, elemProps = {}) => {
|
|
|
22
22
|
const overflow = document.body.style.overflow;
|
|
23
23
|
|
|
24
24
|
document.body.style.overflow = 'hidden';
|
|
25
|
+
document.body.style.overflowY = 'hidden';
|
|
26
|
+
document.body.style.overflowX = 'hidden';
|
|
25
27
|
|
|
26
28
|
return () => {
|
|
27
29
|
document.body.style.overflow = overflow;
|
|
@@ -13,7 +13,7 @@ export const usePopupTarget = createHook(({events, state}: PopupModel, ref) => {
|
|
|
13
13
|
// `state.targetRef` manually. This ensures that custom target components don't need to handle
|
|
14
14
|
// ref forwarding since ref forwarding is only really needed to programmatically open popups
|
|
15
15
|
// around a target _before_ a user clicks. In that rare case, ref forwarding is required.
|
|
16
|
-
if (!state.targetRef.current) {
|
|
16
|
+
if (!(state.targetRef.current instanceof Element)) {
|
|
17
17
|
(state.targetRef as React.MutableRefObject<any>).current = event.currentTarget;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -29,10 +29,9 @@ export interface BannerProps extends Themeable, React.ButtonHTMLAttributes<HTMLB
|
|
|
29
29
|
*/
|
|
30
30
|
actionText?: string;
|
|
31
31
|
}
|
|
32
|
-
declare
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
32
|
+
declare const Banner: React.FC<BannerProps> & {
|
|
33
|
+
Variant: typeof BannerVariant;
|
|
34
|
+
ErrorType: typeof ErrorType;
|
|
35
|
+
};
|
|
37
36
|
export default Banner;
|
|
38
37
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -29,10 +29,9 @@ export interface BannerProps extends Themeable, React.ButtonHTMLAttributes<HTMLB
|
|
|
29
29
|
*/
|
|
30
30
|
actionText?: string;
|
|
31
31
|
}
|
|
32
|
-
declare
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
32
|
+
declare const Banner: React.FC<BannerProps> & {
|
|
33
|
+
Variant: typeof BannerVariant;
|
|
34
|
+
ErrorType: typeof ErrorType;
|
|
35
|
+
};
|
|
37
36
|
export default Banner;
|
|
38
37
|
//# sourceMappingURL=Banner.d.ts.map
|