@workday/canvas-kit-react 11.0.12 → 11.0.14

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 (30) hide show
  1. package/avatar/lib/Avatar.tsx +7 -3
  2. package/common/lib/theming/index.ts +1 -1
  3. package/common/lib/theming/styled.ts +23 -16
  4. package/dist/commonjs/avatar/lib/Avatar.d.ts.map +1 -1
  5. package/dist/commonjs/avatar/lib/Avatar.js +6 -2
  6. package/dist/commonjs/common/lib/theming/index.d.ts +1 -1
  7. package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
  8. package/dist/commonjs/common/lib/theming/index.js +2 -1
  9. package/dist/commonjs/common/lib/theming/styled.d.ts +1 -0
  10. package/dist/commonjs/common/lib/theming/styled.d.ts.map +1 -1
  11. package/dist/commonjs/common/lib/theming/styled.js +7 -2
  12. package/dist/commonjs/skeleton/lib/parts/skeletonText.d.ts.map +1 -1
  13. package/dist/commonjs/skeleton/lib/parts/skeletonText.js +3 -1
  14. package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
  15. package/dist/commonjs/tabs/lib/TabsList.js +3 -1
  16. package/dist/es6/avatar/lib/Avatar.d.ts.map +1 -1
  17. package/dist/es6/avatar/lib/Avatar.js +7 -3
  18. package/dist/es6/common/lib/theming/index.d.ts +1 -1
  19. package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
  20. package/dist/es6/common/lib/theming/index.js +1 -1
  21. package/dist/es6/common/lib/theming/styled.d.ts +1 -0
  22. package/dist/es6/common/lib/theming/styled.d.ts.map +1 -1
  23. package/dist/es6/common/lib/theming/styled.js +5 -2
  24. package/dist/es6/skeleton/lib/parts/skeletonText.d.ts.map +1 -1
  25. package/dist/es6/skeleton/lib/parts/skeletonText.js +4 -2
  26. package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
  27. package/dist/es6/tabs/lib/TabsList.js +4 -2
  28. package/package.json +4 -4
  29. package/skeleton/lib/parts/skeletonText.tsx +4 -2
  30. package/tabs/lib/TabsList.tsx +6 -3
@@ -1,6 +1,6 @@
1
1
  import React, {useState} from 'react';
2
2
  import {Property} from 'csstype';
3
- import {styled, focusRing, hideMouseFocus} from '@workday/canvas-kit-react/common';
3
+ import {styled, focusRing, hideMouseFocus, filterOutProps} from '@workday/canvas-kit-react/common';
4
4
  import isPropValid from '@emotion/is-prop-valid';
5
5
  import {borderRadius, colors} from '@workday/canvas-kit-react/tokens';
6
6
  import {SystemIconCircle, SystemIconCircleSize} from '@workday/canvas-kit-react/icon';
@@ -106,7 +106,9 @@ const StyledStack = styled('span')<Pick<AvatarProps, 'size'>>(
106
106
  })
107
107
  );
108
108
 
109
- const StyledIcon = styled(SystemIconCircle)<{isImageLoaded: boolean}>(
109
+ const StyledIcon = styled(SystemIconCircle, {
110
+ shouldForwardProp: filterOutProps(['isImageLoaded']),
111
+ })<{isImageLoaded: boolean}>(
110
112
  {
111
113
  transition: fadeTransition,
112
114
  },
@@ -115,7 +117,9 @@ const StyledIcon = styled(SystemIconCircle)<{isImageLoaded: boolean}>(
115
117
  })
116
118
  );
117
119
 
118
- const StyledImage = styled('img')<{isLoaded: boolean; objectFit?: Property.ObjectFit}>(
120
+ const StyledImage = styled('img', {
121
+ shouldForwardProp: filterOutProps(['isLoaded', 'objectFit']),
122
+ })<{isLoaded: boolean; objectFit?: Property.ObjectFit}>(
119
123
  {
120
124
  width: '100%',
121
125
  height: '100%',
@@ -1,7 +1,7 @@
1
1
  export * from './breakpoints';
2
2
  export {createCanvasTheme} from './createCanvasTheme';
3
3
  export * from './types';
4
- export {default as styled, StyleRewriteFn} from './styled';
4
+ export {default as styled, StyleRewriteFn, filterOutProps} from './styled';
5
5
  export * from './theme';
6
6
  export * from './useTheme';
7
7
  export * from './useThemedRing';
@@ -6,32 +6,39 @@ import rtlCSSJS from 'rtl-css-js';
6
6
 
7
7
  const noop = (styles: any) => styles;
8
8
 
9
+ interface ThemingStyledOptions {
10
+ shouldForwardProp?: (prop: any) => boolean;
11
+ }
12
+
13
+ export const filterOutProps = (omittedProps: string[]) => {
14
+ return (prop: string) => !omittedProps.includes(prop);
15
+ };
16
+
9
17
  // Pulled from https://github.com/emotion-js/emotion/blob/master/packages/styled-base/src/utils.js#L6 (not exported)
10
18
  type Interpolations = Array<any>;
11
19
  export type StyleRewriteFn = (obj?: CSSProperties) => CSSProperties | undefined;
12
20
 
13
- function styled<Props>(node: any) {
21
+ function styled<Props>(node: any, options?: ThemingStyledOptions) {
14
22
  return (...args: Interpolation<Props>[]) => {
15
23
  const newArgs: Interpolations = args.map(
16
- interpolation => (
17
- props: Props & {theme: EmotionCanvasTheme & {_styleRewriteFn?: StyleRewriteFn}}
18
- ) => {
19
- props.theme = useTheme(props.theme);
20
- const direction = props.theme.canvas.direction;
21
- const maybeFlip = direction === ContentDirection.RTL ? rtlCSSJS : noop;
22
- const maybeConvert = props.theme._styleRewriteFn || noop;
23
- try {
24
- if (typeof interpolation === 'function') {
25
- return maybeFlip(maybeConvert(interpolation(props)) as CSSObject);
24
+ interpolation =>
25
+ (props: Props & {theme: EmotionCanvasTheme & {_styleRewriteFn?: StyleRewriteFn}}) => {
26
+ props.theme = useTheme(props.theme);
27
+ const direction = props.theme.canvas.direction;
28
+ const maybeFlip = direction === ContentDirection.RTL ? rtlCSSJS : noop;
29
+ const maybeConvert = props.theme._styleRewriteFn || noop;
30
+ try {
31
+ if (typeof interpolation === 'function') {
32
+ return maybeFlip(maybeConvert(interpolation(props)) as CSSObject);
33
+ }
34
+ return maybeFlip(maybeConvert(interpolation) as CSSObject);
35
+ } catch (e) {
36
+ return maybeConvert(interpolation);
26
37
  }
27
- return maybeFlip(maybeConvert(interpolation) as CSSObject);
28
- } catch (e) {
29
- return maybeConvert(interpolation);
30
38
  }
31
- }
32
39
  );
33
40
 
34
- return emotionStyled(node)(newArgs);
41
+ return emotionStyled(node, options)(newArgs);
35
42
  };
36
43
  }
37
44
 
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts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AAC,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;AAyEF,eAAO,MAAM,MAAM,EAAE,cA0Db,CAAC"}
@@ -69,12 +69,16 @@ const StyledStack = common_1.styled('span')({
69
69
  height: size,
70
70
  width: size,
71
71
  }));
72
- const StyledIcon = common_1.styled(icon_1.SystemIconCircle)({
72
+ const StyledIcon = common_1.styled(icon_1.SystemIconCircle, {
73
+ shouldForwardProp: common_1.filterOutProps(['isImageLoaded']),
74
+ })({
73
75
  transition: fadeTransition,
74
76
  }, ({ isImageLoaded }) => ({
75
77
  opacity: isImageLoaded ? 0 : 1,
76
78
  }));
77
- const StyledImage = common_1.styled('img')({
79
+ const StyledImage = common_1.styled('img', {
80
+ shouldForwardProp: common_1.filterOutProps(['isLoaded', 'objectFit']),
81
+ })({
78
82
  width: '100%',
79
83
  height: '100%',
80
84
  borderRadius: tokens_1.borderRadius.circle,
@@ -1,7 +1,7 @@
1
1
  export * from './breakpoints';
2
2
  export { createCanvasTheme } from './createCanvasTheme';
3
3
  export * from './types';
4
- export { default as styled, StyleRewriteFn } from './styled';
4
+ export { default as styled, StyleRewriteFn, filterOutProps } from './styled';
5
5
  export * from './theme';
6
6
  export * from './useTheme';
7
7
  export * from './useThemedRing';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC3D,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,cAAc,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -13,13 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  return (mod && mod.__esModule) ? mod : { "default": mod };
14
14
  };
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.styled = exports.createCanvasTheme = void 0;
16
+ exports.filterOutProps = exports.styled = exports.createCanvasTheme = void 0;
17
17
  __exportStar(require("./breakpoints"), exports);
18
18
  var createCanvasTheme_1 = require("./createCanvasTheme");
19
19
  Object.defineProperty(exports, "createCanvasTheme", { enumerable: true, get: function () { return createCanvasTheme_1.createCanvasTheme; } });
20
20
  __exportStar(require("./types"), exports);
21
21
  var styled_1 = require("./styled");
22
22
  Object.defineProperty(exports, "styled", { enumerable: true, get: function () { return __importDefault(styled_1).default; } });
23
+ Object.defineProperty(exports, "filterOutProps", { enumerable: true, get: function () { return styled_1.filterOutProps; } });
23
24
  __exportStar(require("./theme"), exports);
24
25
  __exportStar(require("./useTheme"), exports);
25
26
  __exportStar(require("./useThemedRing"), exports);
@@ -1,5 +1,6 @@
1
1
  import { CreateStyled } from '@emotion/styled';
2
2
  import { CSSProperties } from '@workday/canvas-kit-react/tokens';
3
+ export declare const filterOutProps: (omittedProps: string[]) => (prop: string) => boolean;
3
4
  export declare type StyleRewriteFn = (obj?: CSSProperties) => CSSProperties | undefined;
4
5
  declare const _default: CreateStyled;
5
6
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAS/D,oBAAY,cAAc,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;;AA2BhF,wBAAsC"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAW/D,eAAO,MAAM,cAAc,iBAAkB,MAAM,EAAE,YACrC,MAAM,YACrB,CAAC;AAIF,oBAAY,cAAc,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;;AA0BhF,wBAAsC"}
@@ -3,11 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.filterOutProps = void 0;
6
7
  const styled_1 = __importDefault(require("@emotion/styled"));
7
8
  const index_1 = require("./index");
8
9
  const rtl_css_js_1 = __importDefault(require("rtl-css-js"));
9
10
  const noop = (styles) => styles;
10
- function styled(node) {
11
+ const filterOutProps = (omittedProps) => {
12
+ return (prop) => !omittedProps.includes(prop);
13
+ };
14
+ exports.filterOutProps = filterOutProps;
15
+ function styled(node, options) {
11
16
  return (...args) => {
12
17
  const newArgs = args.map(interpolation => (props) => {
13
18
  props.theme = index_1.useTheme(props.theme);
@@ -24,7 +29,7 @@ function styled(node) {
24
29
  return maybeConvert(interpolation);
25
30
  }
26
31
  });
27
- return styled_1.default(node)(newArgs);
32
+ return styled_1.default(node, options)(newArgs);
28
33
  };
29
34
  }
30
35
  exports.default = styled;
@@ -1 +1 @@
1
- {"version":3,"file":"skeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonText.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6BD,eAAO,MAAM,YAAY,uFAYvB,CAAC"}
1
+ {"version":3,"file":"skeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonText.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA+BD,eAAO,MAAM,YAAY,uFAYvB,CAAC"}
@@ -30,7 +30,9 @@ const tokens_1 = require("@workday/canvas-kit-react/tokens");
30
30
  const TextContainer = styled_1.default('div')({
31
31
  marginBottom: tokens_1.space.m,
32
32
  });
33
- const Line = styled_1.default('div')(({ backgroundColor, width }) => {
33
+ const Line = styled_1.default('div', {
34
+ shouldForwardProp: common_1.filterOutProps(['backgroundColor', 'width']),
35
+ })(({ backgroundColor, width }) => {
34
36
  return {
35
37
  backgroundColor,
36
38
  width,
@@ -1 +1 @@
1
- {"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAStD,MAAM,WA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AAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3D,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUvB,CAAC;AAQF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BnB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;CA+B7B,CAAC"}
@@ -33,7 +33,9 @@ exports.useTabsList = common_1.composeHooks(common_1.createElemPropsHook(useTabs
33
33
  overflowX: modality === 'touch' ? 'auto' : undefined,
34
34
  };
35
35
  }), collection_1.useOverflowListMeasure, collection_1.useListResetCursorOnBlur);
36
- const StyledStack = common_1.styled(layout_1.Flex)(({ maskImage }) => ({
36
+ const StyledStack = common_1.styled(layout_1.Flex, {
37
+ shouldForwardProp: common_1.filterOutProps(['maskImage']),
38
+ })(({ maskImage }) => ({
37
39
  maskImage: maskImage,
38
40
  }));
39
41
  exports.TabsList = common_1.createSubcomponent('div')({
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAIjC,OAAO,E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9B,IAAI,EAAE,OAAO,oBAAoB,CAAC;CACnC,CAAC;AAyEF,eAAO,MAAM,MAAM,EAAE,cA0Db,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import { styled, focusRing, hideMouseFocus } from '@workday/canvas-kit-react/common';
2
+ import { styled, focusRing, hideMouseFocus, filterOutProps } from '@workday/canvas-kit-react/common';
3
3
  import isPropValid from '@emotion/is-prop-valid';
4
4
  import { borderRadius, colors } from '@workday/canvas-kit-react/tokens';
5
5
  import { SystemIconCircle, SystemIconCircleSize } from '@workday/canvas-kit-react/icon';
@@ -44,12 +44,16 @@ const StyledStack = styled('span')({
44
44
  height: size,
45
45
  width: size,
46
46
  }));
47
- const StyledIcon = styled(SystemIconCircle)({
47
+ const StyledIcon = styled(SystemIconCircle, {
48
+ shouldForwardProp: filterOutProps(['isImageLoaded']),
49
+ })({
48
50
  transition: fadeTransition,
49
51
  }, ({ isImageLoaded }) => ({
50
52
  opacity: isImageLoaded ? 0 : 1,
51
53
  }));
52
- const StyledImage = styled('img')({
54
+ const StyledImage = styled('img', {
55
+ shouldForwardProp: filterOutProps(['isLoaded', 'objectFit']),
56
+ })({
53
57
  width: '100%',
54
58
  height: '100%',
55
59
  borderRadius: borderRadius.circle,
@@ -1,7 +1,7 @@
1
1
  export * from './breakpoints';
2
2
  export { createCanvasTheme } from './createCanvasTheme';
3
3
  export * from './types';
4
- export { default as styled, StyleRewriteFn } from './styled';
4
+ export { default as styled, StyleRewriteFn, filterOutProps } from './styled';
5
5
  export * from './theme';
6
6
  export * from './useTheme';
7
7
  export * from './useThemedRing';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC3D,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,cAAc,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export * from './breakpoints';
2
2
  export { createCanvasTheme } from './createCanvasTheme';
3
3
  export * from './types';
4
- export { default as styled } from './styled';
4
+ export { default as styled, filterOutProps } from './styled';
5
5
  export * from './theme';
6
6
  export * from './useTheme';
7
7
  export * from './useThemedRing';
@@ -1,5 +1,6 @@
1
1
  import { CreateStyled } from '@emotion/styled';
2
2
  import { CSSProperties } from '@workday/canvas-kit-react/tokens';
3
+ export declare const filterOutProps: (omittedProps: string[]) => (prop: string) => boolean;
3
4
  export declare type StyleRewriteFn = (obj?: CSSProperties) => CSSProperties | undefined;
4
5
  declare const _default: CreateStyled;
5
6
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAS/D,oBAAY,cAAc,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;;AA2BhF,wBAAsC"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAW/D,eAAO,MAAM,cAAc,iBAAkB,MAAM,EAAE,YACrC,MAAM,YACrB,CAAC;AAIF,oBAAY,cAAc,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;;AA0BhF,wBAAsC"}
@@ -2,7 +2,10 @@ import { default as emotionStyled } from '@emotion/styled';
2
2
  import { useTheme, ContentDirection } from './index';
3
3
  import rtlCSSJS from 'rtl-css-js';
4
4
  const noop = (styles) => styles;
5
- function styled(node) {
5
+ export const filterOutProps = (omittedProps) => {
6
+ return (prop) => !omittedProps.includes(prop);
7
+ };
8
+ function styled(node, options) {
6
9
  return (...args) => {
7
10
  const newArgs = args.map(interpolation => (props) => {
8
11
  props.theme = useTheme(props.theme);
@@ -19,7 +22,7 @@ function styled(node) {
19
22
  return maybeConvert(interpolation);
20
23
  }
21
24
  });
22
- return emotionStyled(node)(newArgs);
25
+ return emotionStyled(node, options)(newArgs);
23
26
  };
24
27
  }
25
28
  export default styled;
@@ -1 +1 @@
1
- {"version":3,"file":"skeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonText.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6BD,eAAO,MAAM,YAAY,uFAYvB,CAAC"}
1
+ {"version":3,"file":"skeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/skeletonText.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA+BD,eAAO,MAAM,YAAY,uFAYvB,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import styled from '@emotion/styled';
3
- import { createComponent } from '@workday/canvas-kit-react/common';
3
+ import { createComponent, filterOutProps } from '@workday/canvas-kit-react/common';
4
4
  import { borderRadius, colors, space } from '@workday/canvas-kit-react/tokens';
5
5
  const TextContainer = styled('div')({
6
6
  marginBottom: space.m,
7
7
  });
8
- const Line = styled('div')(({ backgroundColor, width }) => {
8
+ const Line = styled('div', {
9
+ shouldForwardProp: filterOutProps(['backgroundColor', 'width']),
10
+ })(({ backgroundColor, width }) => {
9
11
  return {
10
12
  backgroundColor,
11
13
  width,
@@ -1 +1 @@
1
- {"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAStD,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAC/F;;;;;;;;OAQG;IACH,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3D,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BnB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;CA+B7B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { commonColors } from '@workday/canvas-kit-react/tokens';
3
- import { composeHooks, createSubcomponent, createElemPropsHook, useModalityType, styled, } from '@workday/canvas-kit-react/common';
3
+ import { composeHooks, createSubcomponent, createElemPropsHook, useModalityType, styled, filterOutProps, } from '@workday/canvas-kit-react/common';
4
4
  import { Flex } from '@workday/canvas-kit-react/layout';
5
5
  import { useOverflowListMeasure, useListRenderItems, useListResetCursorOnBlur, } from '@workday/canvas-kit-react/collection';
6
6
  import { useTabsModel } from './useTabsModel';
@@ -11,7 +11,9 @@ export const useTabsList = composeHooks(createElemPropsHook(useTabsModel)(() =>
11
11
  overflowX: modality === 'touch' ? 'auto' : undefined,
12
12
  };
13
13
  }), useOverflowListMeasure, useListResetCursorOnBlur);
14
- const StyledStack = styled(Flex)(({ maskImage }) => ({
14
+ const StyledStack = styled(Flex, {
15
+ shouldForwardProp: filterOutProps(['maskImage']),
16
+ })(({ maskImage }) => ({
15
17
  maskImage: maskImage,
16
18
  }));
17
19
  export const TabsList = createSubcomponent('div')({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "11.0.12",
3
+ "version": "11.0.14",
4
4
  "description": "The parent module that contains all Workday Canvas Kit React components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -49,8 +49,8 @@
49
49
  "@emotion/styled": "^11.6.0",
50
50
  "@popperjs/core": "^2.5.4",
51
51
  "@workday/canvas-colors-web": "^2.0.0",
52
- "@workday/canvas-kit-popup-stack": "^11.0.12",
53
- "@workday/canvas-kit-styling": "^11.0.12",
52
+ "@workday/canvas-kit-popup-stack": "^11.0.14",
53
+ "@workday/canvas-kit-styling": "^11.0.14",
54
54
  "@workday/canvas-system-icons-web": "^3.0.0",
55
55
  "@workday/canvas-tokens-web": "^2.0.0",
56
56
  "@workday/design-assets-types": "^0.2.8",
@@ -67,5 +67,5 @@
67
67
  "@workday/canvas-accent-icons-web": "^3.0.0",
68
68
  "@workday/canvas-applet-icons-web": "^2.0.0"
69
69
  },
70
- "gitHead": "442dc6bb54412fe61deba996cb6e686cc4090777"
70
+ "gitHead": "585a43cfc6a31ab41be8b7099ee5930533a86bb0"
71
71
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import styled from '@emotion/styled';
3
3
 
4
- import {createComponent, StyledType} from '@workday/canvas-kit-react/common';
4
+ import {createComponent, filterOutProps, StyledType} from '@workday/canvas-kit-react/common';
5
5
  import {borderRadius, colors, space} from '@workday/canvas-kit-react/tokens';
6
6
 
7
7
  const TextContainer = styled('div')<StyledType>({
@@ -21,7 +21,9 @@ export interface SkeletonTextProps {
21
21
  backgroundColor?: string;
22
22
  }
23
23
 
24
- const Line = styled('div')<
24
+ const Line = styled('div', {
25
+ shouldForwardProp: filterOutProps(['backgroundColor', 'width']),
26
+ })<
25
27
  {
26
28
  backgroundColor: string;
27
29
  width: number | string;
@@ -9,6 +9,7 @@ import {
9
9
  useModalityType,
10
10
  styled,
11
11
  StyledType,
12
+ filterOutProps,
12
13
  } from '@workday/canvas-kit-react/common';
13
14
  import {Flex} from '@workday/canvas-kit-react/layout';
14
15
  import {
@@ -45,7 +46,9 @@ export const useTabsList = composeHooks(
45
46
  useListResetCursorOnBlur
46
47
  );
47
48
 
48
- const StyledStack = styled(Flex)<StyledType & {maskImage?: string}>(({maskImage}) => ({
49
+ const StyledStack = styled(Flex, {
50
+ shouldForwardProp: filterOutProps(['maskImage']),
51
+ })<StyledType & {maskImage?: string}>(({maskImage}) => ({
49
52
  maskImage: maskImage,
50
53
  }));
51
54
 
@@ -84,7 +87,7 @@ export const useTouchDirection = () => {
84
87
 
85
88
  React.useEffect(() => {
86
89
  let prevXPos = window.pageXOffset;
87
- const handleTouchMove = function(e: TouchEvent) {
90
+ const handleTouchMove = function (e: TouchEvent) {
88
91
  const currXPos = e.touches[0].clientX;
89
92
  setIsDragging(true);
90
93
  if (currXPos > prevXPos) {
@@ -95,7 +98,7 @@ export const useTouchDirection = () => {
95
98
  prevXPos = currXPos;
96
99
  e.preventDefault();
97
100
  };
98
- const handleDragEnd = function() {
101
+ const handleDragEnd = function () {
99
102
  setIsDragging(false);
100
103
  };
101
104
  window.addEventListener('touchmove', handleTouchMove);