@workday/canvas-kit-react 7.0.0-alpha.102-next.27 → 7.0.0-alpha.106-next.2

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.
Files changed (53) hide show
  1. package/action-bar/lib/useActionBarModel.tsx +2 -1
  2. package/avatar/lib/Avatar.tsx +4 -0
  3. package/button/index.ts +1 -0
  4. package/button/lib/ExternalHyperlink.tsx +59 -0
  5. package/button/lib/TertiaryButton.tsx +1 -0
  6. package/common/lib/parts/_brand-assets.ts +1 -1
  7. package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
  8. package/dist/commonjs/action-bar/lib/useActionBarModel.js +1 -1
  9. package/dist/commonjs/avatar/lib/Avatar.d.ts.map +1 -1
  10. package/dist/commonjs/avatar/lib/Avatar.js +3 -0
  11. package/dist/commonjs/button/index.d.ts +1 -0
  12. package/dist/commonjs/button/index.d.ts.map +1 -1
  13. package/dist/commonjs/button/index.js +3 -1
  14. package/dist/commonjs/button/lib/ExternalHyperlink.d.ts +11 -0
  15. package/dist/commonjs/button/lib/ExternalHyperlink.d.ts.map +1 -0
  16. package/dist/commonjs/button/lib/ExternalHyperlink.js +48 -0
  17. package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
  18. package/dist/commonjs/button/lib/TertiaryButton.js +1 -0
  19. package/dist/commonjs/common/lib/parts/_brand-assets.js +1 -1
  20. package/dist/commonjs/icon/lib/Icon.d.ts +1 -1
  21. package/dist/commonjs/icon/lib/Icon.d.ts.map +1 -1
  22. package/dist/commonjs/icon/lib/Icon.js +2 -4
  23. package/dist/commonjs/icon/lib/SystemIcon.d.ts +1 -1
  24. package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
  25. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
  26. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +2 -0
  27. package/dist/commonjs/popup/lib/hooks/usePopupTarget.js +1 -1
  28. package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
  29. package/dist/es6/action-bar/lib/useActionBarModel.js +1 -1
  30. package/dist/es6/avatar/lib/Avatar.d.ts.map +1 -1
  31. package/dist/es6/avatar/lib/Avatar.js +3 -0
  32. package/dist/es6/button/index.d.ts +1 -0
  33. package/dist/es6/button/index.d.ts.map +1 -1
  34. package/dist/es6/button/index.js +1 -0
  35. package/dist/es6/button/lib/ExternalHyperlink.d.ts +11 -0
  36. package/dist/es6/button/lib/ExternalHyperlink.d.ts.map +1 -0
  37. package/dist/es6/button/lib/ExternalHyperlink.js +42 -0
  38. package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
  39. package/dist/es6/button/lib/TertiaryButton.js +1 -0
  40. package/dist/es6/common/lib/parts/_brand-assets.js +1 -1
  41. package/dist/es6/icon/lib/Icon.d.ts +1 -1
  42. package/dist/es6/icon/lib/Icon.d.ts.map +1 -1
  43. package/dist/es6/icon/lib/Icon.js +2 -4
  44. package/dist/es6/icon/lib/SystemIcon.d.ts +1 -1
  45. package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
  46. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
  47. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +2 -0
  48. package/dist/es6/popup/lib/hooks/usePopupTarget.js +1 -1
  49. package/icon/lib/Icon.tsx +2 -1
  50. package/icon/lib/SystemIcon.tsx +1 -1
  51. package/package.json +5 -5
  52. package/popup/lib/hooks/useDisableBodyScroll.ts +2 -0
  53. package/popup/lib/hooks/usePopupTarget.ts +1 -1
@@ -46,9 +46,10 @@ export const useActionBarModel = createModelHook({
46
46
  // Always show the first button and make sure it is interactive
47
47
  if (totalSize - hiddenIds.length === 0) {
48
48
  hiddenIds = items.slice(1, totalSize).map(getId);
49
- nonInteractiveIds = [];
50
49
  }
51
50
 
51
+ nonInteractiveIds = hiddenIds;
52
+
52
53
  const state = {
53
54
  ...model.state,
54
55
  hiddenIds,
@@ -139,6 +139,10 @@ const Avatar: AvatarOverload = React.forwardRef(
139
139
  }
140
140
  };
141
141
 
142
+ React.useLayoutEffect(() => {
143
+ setImageLoaded(false);
144
+ }, [url]);
145
+
142
146
  const background = variant === AvatarVariant.Dark ? colors.blueberry400 : colors.soap300;
143
147
 
144
148
  return (
package/button/index.ts CHANGED
@@ -10,4 +10,5 @@ export {ToolbarIconButton, ToolbarIconButtonProps} from './lib/ToolbarIconButton
10
10
  export {ToolbarDropdownButton, ToolbarDropdownButtonProps} from './lib/ToolbarDropdownButton';
11
11
  export {Hyperlink, HyperlinkProps} from './lib/Hyperlink';
12
12
  export {BaseButton, ButtonContainerProps} from './lib/BaseButton';
13
+ export {ExternalHyperlink, ExternalHyperlinkProps} from './lib/ExternalHyperlink';
13
14
  export * from './lib/types';
@@ -0,0 +1,59 @@
1
+ import React from 'react';
2
+ import {styled, createComponent, StyledType} from '@workday/canvas-kit-react/common';
3
+ import {extLinkIcon} from '@workday/canvas-system-icons-web';
4
+ import {SystemIcon, systemIconStyles} from '@workday/canvas-kit-react/icon';
5
+ import {Hyperlink, HyperlinkProps} from './Hyperlink';
6
+
7
+ export interface ExternalHyperlinkProps extends HyperlinkProps {
8
+ /**
9
+ * Informs a screen reader user the link will open in a new window. It is read after the link text.
10
+ * This value will need to be translated.
11
+ * @default 'Opens link in new window'
12
+ */
13
+ iconLabel?: string;
14
+ }
15
+
16
+ const iconStyles = {
17
+ ...systemIconStyles({fill: 'currentColor', fillHover: 'currentColor'}),
18
+ };
19
+
20
+ const Anchor = styled(Hyperlink)<ExternalHyperlinkProps & StyledType>({
21
+ ...iconStyles,
22
+ display: 'inline-flex',
23
+ flexDirection: 'row',
24
+ alignItems: 'center',
25
+ });
26
+
27
+ const iconSize = '1em';
28
+ const minIconSize = '16px';
29
+
30
+ const StyledSystemIcon = styled(SystemIcon)<StyledType>({
31
+ ...iconStyles,
32
+ width: `calc(${iconSize} - 1px)`,
33
+ minWidth: `calc(${minIconSize} - 1px)`,
34
+ marginLeft: '2px',
35
+ });
36
+
37
+ export const ExternalHyperlink = createComponent('a')({
38
+ displayName: 'ExternalHyperlink',
39
+ Component: (
40
+ {
41
+ children,
42
+ variant,
43
+ iconLabel = 'Opens link in new window',
44
+ ...elemProps
45
+ }: ExternalHyperlinkProps,
46
+ ref
47
+ ) => (
48
+ <Anchor ref={ref} target="_blank" rel="noreferrer" variant={variant} {...elemProps}>
49
+ <span>{children}</span>
50
+ <StyledSystemIcon
51
+ icon={extLinkIcon}
52
+ role="img"
53
+ aria-label={iconLabel}
54
+ size={iconSize}
55
+ styles={{['& svg']: {minWidth: minIconSize, minHeight: minIconSize}}}
56
+ />
57
+ </Anchor>
58
+ ),
59
+ });
@@ -118,6 +118,7 @@ const getTertiaryButtonColors = (
118
118
  focusRing: focusRing({innerColor: colors.blueberry400}, theme),
119
119
  },
120
120
  disabled: {
121
+ background: 'transparent',
121
122
  icon: children ? themePrimary.main : colors.blackPepper400,
122
123
  label: themePrimary.main,
123
124
  },
@@ -1,4 +1,4 @@
1
- const CDN_URI = '//design.workday.com/images/';
1
+ const CDN_URI = 'https://design.workday.com/images/';
2
2
 
3
3
  export const dubLogoBlue = `<img src="${CDN_URI}ck-dub-logo-blue.svg" alt="">`;
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"useActionBarModel.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/useActionBarModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,iBAAiB;IAG1B;;;OAGG;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEL,CAAC"}
@@ -51,8 +51,8 @@ exports.useActionBarModel = common_1.createModelHook({
51
51
  // Always show the first button and make sure it is interactive
52
52
  if (totalSize - hiddenIds.length === 0) {
53
53
  hiddenIds = items.slice(1, totalSize).map(getId);
54
- nonInteractiveIds = [];
55
54
  }
55
+ nonInteractiveIds = hiddenIds;
56
56
  var state = __assign(__assign({}, model.state), { hiddenIds: hiddenIds,
57
57
  nonInteractiveIds: nonInteractiveIds, orientation: config.orientation || 'horizontal' });
58
58
  var overflowItems = react_1.default.useMemo(function () { return (items ? items.filter(function (item) { return state.hiddenIds.includes(getId(item)); }) : undefined); },
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,EAAmB,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGtF,oBAAY,aAAa;IACvB,KAAK,IAAA;IACL,IAAI,IAAA;CACL;AAED,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC;CACZ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b;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC;CACZ;AAED;;GAEG;AACH,aAAK,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,GAC1F,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEvC;;GAEG;AACH,aAAK,cAAc,GAAG;IACpB,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,KAAK,CAAA;KAAC,GAAG,cAAc,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC3F,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC5F,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,IAAI,EAAE,OAAO,oBAAoB,CAAC;CACnC,CAAC;AAoEF,QAAA,MAAM,MAAM,EAAE,cAmDN,CAAC;AAKT,eAAe,MAAM,CAAC"}
@@ -111,6 +111,9 @@ var Avatar = react_1.default.forwardRef(function (_a, ref) {
111
111
  setImageLoaded(true);
112
112
  }
113
113
  };
114
+ react_1.default.useLayoutEffect(function () {
115
+ setImageLoaded(false);
116
+ }, [url]);
114
117
  var background = variant === AvatarVariant.Dark ? tokens_1.colors.blueberry400 : tokens_1.colors.soap300;
115
118
  return (react_1.default.createElement(StyledContainer, __assign({ size: size, "aria-label": altText, onClick: onClick, disabled: onClick ? false : true, ref: ref }, elemProps),
116
119
  react_1.default.createElement(StyledStack, { size: size },
@@ -7,5 +7,6 @@ export { ToolbarIconButton, ToolbarIconButtonProps } from './lib/ToolbarIconButt
7
7
  export { ToolbarDropdownButton, ToolbarDropdownButtonProps } from './lib/ToolbarDropdownButton';
8
8
  export { Hyperlink, HyperlinkProps } from './lib/Hyperlink';
9
9
  export { BaseButton, ButtonContainerProps } from './lib/BaseButton';
10
+ export { ExternalHyperlink, ExternalHyperlinkProps } from './lib/ExternalHyperlink';
10
11
  export * from './lib/types';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAClE,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,cAAc,aAAa,CAAC"}
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.BaseButton = exports.Hyperlink = exports.ToolbarDropdownButton = exports.ToolbarIconButton = exports.deprecated_Button = exports.DeleteButton = exports.TertiaryButton = exports.SecondaryButton = exports.PrimaryButton = void 0;
13
+ exports.ExternalHyperlink = exports.BaseButton = exports.Hyperlink = exports.ToolbarDropdownButton = exports.ToolbarIconButton = exports.deprecated_Button = exports.DeleteButton = exports.TertiaryButton = exports.SecondaryButton = exports.PrimaryButton = void 0;
14
14
  var PrimaryButton_1 = require("./lib/PrimaryButton");
15
15
  Object.defineProperty(exports, "PrimaryButton", { enumerable: true, get: function () { return PrimaryButton_1.PrimaryButton; } });
16
16
  var SecondaryButton_1 = require("./lib/SecondaryButton");
@@ -29,4 +29,6 @@ var Hyperlink_1 = require("./lib/Hyperlink");
29
29
  Object.defineProperty(exports, "Hyperlink", { enumerable: true, get: function () { return Hyperlink_1.Hyperlink; } });
30
30
  var BaseButton_1 = require("./lib/BaseButton");
31
31
  Object.defineProperty(exports, "BaseButton", { enumerable: true, get: function () { return BaseButton_1.BaseButton; } });
32
+ var ExternalHyperlink_1 = require("./lib/ExternalHyperlink");
33
+ Object.defineProperty(exports, "ExternalHyperlink", { enumerable: true, get: function () { return ExternalHyperlink_1.ExternalHyperlink; } });
32
34
  __exportStar(require("./lib/types"), exports);
@@ -0,0 +1,11 @@
1
+ import { HyperlinkProps } from './Hyperlink';
2
+ export interface ExternalHyperlinkProps extends HyperlinkProps {
3
+ /**
4
+ * Informs a screen reader user the link will open in a new window. It is read after the link text.
5
+ * This value will need to be translated.
6
+ * @default 'Opens link in new window'
7
+ */
8
+ iconLabel?: string;
9
+ }
10
+ export declare const ExternalHyperlink: import("../../common").ElementComponent<"a", ExternalHyperlinkProps>;
11
+ //# sourceMappingURL=ExternalHyperlink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExternalHyperlink.d.ts","sourceRoot":"","sources":["../../../../button/lib/ExternalHyperlink.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,cAAc,EAAC,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD,eAAO,MAAM,iBAAiB,sEAsB5B,CAAC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.ExternalHyperlink = void 0;
29
+ var react_1 = __importDefault(require("react"));
30
+ var common_1 = require("@workday/canvas-kit-react/common");
31
+ var canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
32
+ var icon_1 = require("@workday/canvas-kit-react/icon");
33
+ var Hyperlink_1 = require("./Hyperlink");
34
+ var iconStyles = __assign({}, icon_1.systemIconStyles({ fill: 'currentColor', fillHover: 'currentColor' }));
35
+ var Anchor = common_1.styled(Hyperlink_1.Hyperlink)(__assign(__assign({}, iconStyles), { display: 'inline-flex', flexDirection: 'row', alignItems: 'center' }));
36
+ var iconSize = '1em';
37
+ var minIconSize = '16px';
38
+ var StyledSystemIcon = common_1.styled(icon_1.SystemIcon)(__assign(__assign({}, iconStyles), { width: "calc(" + iconSize + " - 1px)", minWidth: "calc(" + minIconSize + " - 1px)", marginLeft: '2px' }));
39
+ exports.ExternalHyperlink = common_1.createComponent('a')({
40
+ displayName: 'ExternalHyperlink',
41
+ Component: function (_a, ref) {
42
+ var _b;
43
+ var children = _a.children, variant = _a.variant, _c = _a.iconLabel, iconLabel = _c === void 0 ? 'Opens link in new window' : _c, elemProps = __rest(_a, ["children", "variant", "iconLabel"]);
44
+ return (react_1.default.createElement(Anchor, __assign({ ref: ref, target: "_blank", rel: "noreferrer", variant: variant }, elemProps),
45
+ react_1.default.createElement("span", null, children),
46
+ react_1.default.createElement(StyledSystemIcon, { icon: canvas_system_icons_web_1.extLinkIcon, role: "img", "aria-label": iconLabel, size: iconSize, styles: (_b = {}, _b['& svg'] = { minWidth: minIconSize, minHeight: minIconSize }, _b) })));
47
+ },
48
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAgJD,eAAO,MAAM,cAAc,wEAkDzB,CAAC"}
1
+ {"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiJD,eAAO,MAAM,cAAc,wEAkDzB,CAAC"}
@@ -105,6 +105,7 @@ var getTertiaryButtonColors = function (variant, theme, children) {
105
105
  focusRing: common_1.focusRing({ innerColor: tokens_1.colors.blueberry400 }, theme),
106
106
  },
107
107
  disabled: {
108
+ background: 'transparent',
108
109
  icon: children ? themePrimary.main : tokens_1.colors.blackPepper400,
109
110
  label: themePrimary.main,
110
111
  },
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.miniWdayLogoBlue = exports.wdayLogoWhite = exports.wdayLogoBlue = exports.dubLogoWhite = exports.dubLogoBlue = void 0;
4
- var CDN_URI = '//design.workday.com/images/';
4
+ var CDN_URI = 'https://design.workday.com/images/';
5
5
  exports.dubLogoBlue = "<img src=\"" + CDN_URI + "ck-dub-logo-blue.svg\" alt=\"\">";
6
6
  exports.dubLogoWhite = "<img src=\"" + CDN_URI + "ck-dub-logo-white.svg\" alt=\"\">";
7
7
  exports.wdayLogoBlue = "<img src=\"" + CDN_URI + "ck-wday-logo-blue.svg\" alt=\"\">";
@@ -2,7 +2,7 @@ import { CanvasIcon, CanvasIconTypes } from '@workday/design-assets-types';
2
2
  import { SvgProps } from './Svg';
3
3
  export interface IconProps extends SvgProps {
4
4
  src: CanvasIcon;
5
- size?: number;
5
+ size?: number | string;
6
6
  type: CanvasIconTypes.Accent | CanvasIconTypes.Applet | CanvasIconTypes.System;
7
7
  }
8
8
  export declare const Icon: import("../../common").ElementComponent<"span", IconProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;CAChF;AAED,eAAO,MAAM,IAAI,4DAwBf,CAAC;AAEH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;CAChF;AAED,eAAO,MAAM,IAAI,4DAyBf,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -51,13 +51,11 @@ var common_1 = require("@workday/canvas-kit-react/common");
51
51
  exports.Icon = common_1.createComponent('span')({
52
52
  displayName: 'Icon',
53
53
  Component: function (_a, ref, Element) {
54
+ var _b;
54
55
  var src = _a.src, size = _a.size, styles = _a.styles, type = _a.type, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["src", "size", "styles", "type", "shouldMirror"]);
55
56
  var iconStyles = __assign({}, styles);
56
57
  if (size) {
57
- iconStyles['& svg'] = {
58
- width: size,
59
- height: size,
60
- };
58
+ iconStyles['& svg'] = __assign(__assign({}, ((_b = iconStyles['& svg']) !== null && _b !== void 0 ? _b : {})), { width: size, height: size });
61
59
  }
62
60
  return (React.createElement(Svg_1.default, __assign({ src: src, type: type, shouldMirror: shouldMirror, as: Element }, elemProps, { ref: ref, styles: iconStyles })));
63
61
  },
@@ -47,7 +47,7 @@ export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src'
47
47
  /**
48
48
  * The size of the SystemIcon in `px`.
49
49
  */
50
- size?: number | undefined;
50
+ size?: number | string | undefined;
51
51
  className?: string;
52
52
  }
53
53
  export declare const systemIconStyles: ({ accent, accentHover, background, backgroundHover, color, colorHover, fill, fillHover, }: SystemIconStyles) => CSSObject;
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAa,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;IA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,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,QAAA,MAAM,UAAU,kEA4Cd,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;OAsB/B,CAAC"}
1
+ {"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;OAwB/B,CAAC"}
@@ -24,6 +24,8 @@ exports.useDisableBodyScroll = common_1.createElemPropsHook(usePopupModel_1.useP
24
24
  var overflowX = document.body.style.overflowX;
25
25
  var overflow = document.body.style.overflow;
26
26
  document.body.style.overflow = 'hidden';
27
+ document.body.style.overflowY = 'hidden';
28
+ document.body.style.overflowX = 'hidden';
27
29
  return function () {
28
30
  document.body.style.overflow = overflow;
29
31
  document.body.style.overflowY = overflowY;
@@ -16,7 +16,7 @@ exports.usePopupTarget = common_1.createElemPropsHook(usePopupModel_1.usePopupMo
16
16
  // `state.targetRef` manually. This ensures that custom target components don't need to handle
17
17
  // ref forwarding since ref forwarding is only really needed to programmatically open popups
18
18
  // around a target _before_ a user clicks. In that rare case, ref forwarding is required.
19
- if (!state.targetRef.current) {
19
+ if (!(state.targetRef.current instanceof Element)) {
20
20
  state.targetRef.current = event.currentTarget;
21
21
  }
22
22
  if (state.visibility !== 'hidden') {
@@ -1 +1 @@
1
- {"version":3,"file":"useActionBarModel.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/useActionBarModel.tsx"],"names":[],"mapp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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IATH;;;OAGG;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEL,CAAC"}
@@ -45,8 +45,8 @@ export var useActionBarModel = createModelHook({
45
45
  // Always show the first button and make sure it is interactive
46
46
  if (totalSize - hiddenIds.length === 0) {
47
47
  hiddenIds = items.slice(1, totalSize).map(getId);
48
- nonInteractiveIds = [];
49
48
  }
49
+ nonInteractiveIds = hiddenIds;
50
50
  var state = __assign(__assign({}, model.state), { hiddenIds: hiddenIds,
51
51
  nonInteractiveIds: nonInteractiveIds, orientation: config.orientation || 'horizontal' });
52
52
  var overflowItems = React.useMemo(function () { return (items ? items.filter(function (item) { return state.hiddenIds.includes(getId(item)); }) : undefined); },
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,EAAmB,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGtF,oBAAY,aAAa;IACvB,KAAK,IAAA;IACL,IAAI,IAAA;CACL;AA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,aAAa;IACvB,KAAK,IAAA;IACL,IAAI,IAAA;CACL;AAED,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC;CACZ;AAED;;GAEG;AACH,aAAK,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,GAC1F,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEvC;;GAEG;AACH,aAAK,cAAc,GAAG;IACpB,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,KAAK,CAAA;KAAC,GAAG,cAAc,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC3F,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC5F,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,IAAI,EAAE,OAAO,oBAAoB,CAAC;CACnC,CAAC;AAoEF,QAAA,MAAM,MAAM,EAAE,cAmDN,CAAC;AAKT,eAAe,MAAM,CAAC"}
@@ -86,6 +86,9 @@ var Avatar = React.forwardRef(function (_a, ref) {
86
86
  setImageLoaded(true);
87
87
  }
88
88
  };
89
+ React.useLayoutEffect(function () {
90
+ setImageLoaded(false);
91
+ }, [url]);
89
92
  var background = variant === AvatarVariant.Dark ? colors.blueberry400 : colors.soap300;
90
93
  return (React.createElement(StyledContainer, __assign({ size: size, "aria-label": altText, onClick: onClick, disabled: onClick ? false : true, ref: ref }, elemProps),
91
94
  React.createElement(StyledStack, { size: size },
@@ -7,5 +7,6 @@ export { ToolbarIconButton, ToolbarIconButtonProps } from './lib/ToolbarIconButt
7
7
  export { ToolbarDropdownButton, ToolbarDropdownButtonProps } from './lib/ToolbarDropdownButton';
8
8
  export { Hyperlink, HyperlinkProps } from './lib/Hyperlink';
9
9
  export { BaseButton, ButtonContainerProps } from './lib/BaseButton';
10
+ export { ExternalHyperlink, ExternalHyperlinkProps } from './lib/ExternalHyperlink';
10
11
  export * from './lib/types';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAClE,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,cAAc,aAAa,CAAC"}
@@ -7,4 +7,5 @@ export { ToolbarIconButton } from './lib/ToolbarIconButton';
7
7
  export { ToolbarDropdownButton } from './lib/ToolbarDropdownButton';
8
8
  export { Hyperlink } from './lib/Hyperlink';
9
9
  export { BaseButton } from './lib/BaseButton';
10
+ export { ExternalHyperlink } from './lib/ExternalHyperlink';
10
11
  export * from './lib/types';
@@ -0,0 +1,11 @@
1
+ import { HyperlinkProps } from './Hyperlink';
2
+ export interface ExternalHyperlinkProps extends HyperlinkProps {
3
+ /**
4
+ * Informs a screen reader user the link will open in a new window. It is read after the link text.
5
+ * This value will need to be translated.
6
+ * @default 'Opens link in new window'
7
+ */
8
+ iconLabel?: string;
9
+ }
10
+ export declare const ExternalHyperlink: import("../../common").ElementComponent<"a", ExternalHyperlinkProps>;
11
+ //# sourceMappingURL=ExternalHyperlink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExternalHyperlink.d.ts","sourceRoot":"","sources":["../../../../button/lib/ExternalHyperlink.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,cAAc,EAAC,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD,eAAO,MAAM,iBAAiB,sEAsB5B,CAAC"}
@@ -0,0 +1,42 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { styled, createComponent } from '@workday/canvas-kit-react/common';
25
+ import { extLinkIcon } from '@workday/canvas-system-icons-web';
26
+ import { SystemIcon, systemIconStyles } from '@workday/canvas-kit-react/icon';
27
+ import { Hyperlink } from './Hyperlink';
28
+ var iconStyles = __assign({}, systemIconStyles({ fill: 'currentColor', fillHover: 'currentColor' }));
29
+ var Anchor = styled(Hyperlink)(__assign(__assign({}, iconStyles), { display: 'inline-flex', flexDirection: 'row', alignItems: 'center' }));
30
+ var iconSize = '1em';
31
+ var minIconSize = '16px';
32
+ var StyledSystemIcon = styled(SystemIcon)(__assign(__assign({}, iconStyles), { width: "calc(" + iconSize + " - 1px)", minWidth: "calc(" + minIconSize + " - 1px)", marginLeft: '2px' }));
33
+ export var ExternalHyperlink = createComponent('a')({
34
+ displayName: 'ExternalHyperlink',
35
+ Component: function (_a, ref) {
36
+ var _b;
37
+ var children = _a.children, variant = _a.variant, _c = _a.iconLabel, iconLabel = _c === void 0 ? 'Opens link in new window' : _c, elemProps = __rest(_a, ["children", "variant", "iconLabel"]);
38
+ return (React.createElement(Anchor, __assign({ ref: ref, target: "_blank", rel: "noreferrer", variant: variant }, elemProps),
39
+ React.createElement("span", null, children),
40
+ React.createElement(StyledSystemIcon, { icon: extLinkIcon, role: "img", "aria-label": iconLabel, size: iconSize, styles: (_b = {}, _b['& svg'] = { minWidth: minIconSize, minHeight: minIconSize }, _b) })));
41
+ },
42
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAgJD,eAAO,MAAM,cAAc,wEAkDzB,CAAC"}
1
+ {"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiJD,eAAO,MAAM,cAAc,wEAkDzB,CAAC"}
@@ -83,6 +83,7 @@ var getTertiaryButtonColors = function (variant, theme, children) {
83
83
  focusRing: focusRing({ innerColor: colors.blueberry400 }, theme),
84
84
  },
85
85
  disabled: {
86
+ background: 'transparent',
86
87
  icon: children ? themePrimary.main : colors.blackPepper400,
87
88
  label: themePrimary.main,
88
89
  },
@@ -1,4 +1,4 @@
1
- var CDN_URI = '//design.workday.com/images/';
1
+ var CDN_URI = 'https://design.workday.com/images/';
2
2
  export var dubLogoBlue = "<img src=\"" + CDN_URI + "ck-dub-logo-blue.svg\" alt=\"\">";
3
3
  export var dubLogoWhite = "<img src=\"" + CDN_URI + "ck-dub-logo-white.svg\" alt=\"\">";
4
4
  export var wdayLogoBlue = "<img src=\"" + CDN_URI + "ck-wday-logo-blue.svg\" alt=\"\">";
@@ -2,7 +2,7 @@ import { CanvasIcon, CanvasIconTypes } from '@workday/design-assets-types';
2
2
  import { SvgProps } from './Svg';
3
3
  export interface IconProps extends SvgProps {
4
4
  src: CanvasIcon;
5
- size?: number;
5
+ size?: number | string;
6
6
  type: CanvasIconTypes.Accent | CanvasIconTypes.Applet | CanvasIconTypes.System;
7
7
  }
8
8
  export declare const Icon: import("../../common").ElementComponent<"span", IconProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;CAChF;AAED,eAAO,MAAM,IAAI,4DAwBf,CAAC;AAEH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;CAChF;AAED,eAAO,MAAM,IAAI,4DAyBf,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -26,13 +26,11 @@ import { createComponent } from '@workday/canvas-kit-react/common';
26
26
  export var Icon = createComponent('span')({
27
27
  displayName: 'Icon',
28
28
  Component: function (_a, ref, Element) {
29
+ var _b;
29
30
  var src = _a.src, size = _a.size, styles = _a.styles, type = _a.type, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["src", "size", "styles", "type", "shouldMirror"]);
30
31
  var iconStyles = __assign({}, styles);
31
32
  if (size) {
32
- iconStyles['& svg'] = {
33
- width: size,
34
- height: size,
35
- };
33
+ iconStyles['& svg'] = __assign(__assign({}, ((_b = iconStyles['& svg']) !== null && _b !== void 0 ? _b : {})), { width: size, height: size });
36
34
  }
37
35
  return (React.createElement(Svg, __assign({ src: src, type: type, shouldMirror: shouldMirror, as: Element }, elemProps, { ref: ref, styles: iconStyles })));
38
36
  },
@@ -47,7 +47,7 @@ export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src'
47
47
  /**
48
48
  * The size of the SystemIcon in `px`.
49
49
  */
50
- size?: number | undefined;
50
+ size?: number | string | undefined;
51
51
  className?: string;
52
52
  }
53
53
  export declare const systemIconStyles: ({ accent, accentHover, background, backgroundHover, color, colorHover, fill, fillHover, }: SystemIconStyles) => CSSObject;
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAa,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,E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EG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;IAC1D;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,QAAA,MAAM,UAAU,kEA4Cd,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;OAsB/B,CAAC"}
1
+ {"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;OAwB/B,CAAC"}
@@ -18,6 +18,8 @@ export var useDisableBodyScroll = createElemPropsHook(usePopupModel)(function (m
18
18
  var overflowX = document.body.style.overflowX;
19
19
  var overflow = document.body.style.overflow;
20
20
  document.body.style.overflow = 'hidden';
21
+ document.body.style.overflowY = 'hidden';
22
+ document.body.style.overflowX = 'hidden';
21
23
  return function () {
22
24
  document.body.style.overflow = overflow;
23
25
  document.body.style.overflowY = overflowY;
@@ -13,7 +13,7 @@ export var usePopupTarget = createElemPropsHook(usePopupModel)(function (_a, 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.current = event.currentTarget;
18
18
  }
19
19
  if (state.visibility !== 'hidden') {
package/icon/lib/Icon.tsx CHANGED
@@ -6,7 +6,7 @@ import {createComponent} from '@workday/canvas-kit-react/common';
6
6
 
7
7
  export interface IconProps extends SvgProps {
8
8
  src: CanvasIcon;
9
- size?: number;
9
+ size?: number | string;
10
10
  type: CanvasIconTypes.Accent | CanvasIconTypes.Applet | CanvasIconTypes.System;
11
11
  }
12
12
 
@@ -17,6 +17,7 @@ export const Icon = createComponent('span')({
17
17
 
18
18
  if (size) {
19
19
  iconStyles['& svg'] = {
20
+ ...((iconStyles['& svg'] as CSSObject) ?? {}),
20
21
  width: size,
21
22
  height: size,
22
23
  };
@@ -54,7 +54,7 @@ export interface SystemIconProps
54
54
  /**
55
55
  * The size of the SystemIcon in `px`.
56
56
  */
57
- size?: number | undefined;
57
+ size?: number | string | undefined;
58
58
  className?: string; //investigate more
59
59
  }
60
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "7.0.0-alpha.102-next.27+a618e6a9",
3
+ "version": "7.0.0-alpha.106-next.2+ab2883e3",
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",
@@ -48,9 +48,9 @@
48
48
  "@emotion/styled": "^11.6.0",
49
49
  "@popperjs/core": "^2.5.4",
50
50
  "@workday/canvas-colors-web": "^2.0.0",
51
- "@workday/canvas-kit-labs-react": "^7.0.0-alpha.102-next.27+a618e6a9",
52
- "@workday/canvas-kit-popup-stack": "^7.0.0-alpha.102-next.27+a618e6a9",
53
- "@workday/canvas-kit-preview-react": "^7.0.0-alpha.102-next.27+a618e6a9",
51
+ "@workday/canvas-kit-labs-react": "^7.0.0-alpha.106-next.2+ab2883e3",
52
+ "@workday/canvas-kit-popup-stack": "^7.0.0-alpha.106-next.2+ab2883e3",
53
+ "@workday/canvas-kit-preview-react": "^7.0.0-alpha.106-next.2+ab2883e3",
54
54
  "@workday/canvas-system-icons-web": "^3.0.0",
55
55
  "@workday/design-assets-types": "^0.2.4",
56
56
  "chroma-js": "^2.1.0",
@@ -69,5 +69,5 @@
69
69
  "@workday/canvas-accent-icons-web": "^3.0.0",
70
70
  "@workday/canvas-applet-icons-web": "^2.0.0"
71
71
  },
72
- "gitHead": "a618e6a972dc1d5d577833b94d71e4e3be761f11"
72
+ "gitHead": "ab2883e3305013c8a9048ea7b67d4012659c2516"
73
73
  }
@@ -24,6 +24,8 @@ export const useDisableBodyScroll = createElemPropsHook(usePopupModel)(model =>
24
24
  const overflow = document.body.style.overflow;
25
25
 
26
26
  document.body.style.overflow = 'hidden';
27
+ document.body.style.overflowY = 'hidden';
28
+ document.body.style.overflowX = 'hidden';
27
29
 
28
30
  return () => {
29
31
  document.body.style.overflow = overflow;
@@ -13,7 +13,7 @@ export const usePopupTarget = createElemPropsHook(usePopupModel)(({events, state
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