@workday/canvas-kit-react 9.1.38 → 9.1.40

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.
@@ -74,13 +74,9 @@ const LabelComponent = common_1.styled('label')(...labelStyles);
74
74
  class Label extends React.Component {
75
75
  render() {
76
76
  const { labelPosition = Label.Position.Top, isLegend = false, required, ...elemProps } = this.props;
77
- const children = !required
78
- ? this.props.children
79
- : [
80
- React.createElement("span", null,
81
- this.props.children,
82
- React.createElement(RequiredAsterisk, { key: '0', "aria-hidden": true }, "*")),
83
- ];
77
+ const children = !required ? (this.props.children) : (React.createElement("span", null,
78
+ this.props.children,
79
+ React.createElement(RequiredAsterisk, { key: '0', "aria-hidden": true }, "*")));
84
80
  return (React.createElement(React.Fragment, null, isLegend ? (React.createElement(LegendComponent, Object.assign({ labelPosition: labelPosition, isLegend: isLegend }, elemProps, { children: children }))) : (React.createElement(LabelComponent, Object.assign({ labelPosition: labelPosition }, elemProps, { children: children })))));
85
81
  }
86
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAeF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
1
+ {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAcF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
@@ -72,9 +72,8 @@ exports.findEllipsisElement = findEllipsisElement;
72
72
  const isOverflowed = (element) => {
73
73
  const overflowElement = exports.findEllipsisElement(element) || exports.findOverflowElement(element);
74
74
  if (overflowElement) {
75
- const clientRect = overflowElement.getBoundingClientRect();
76
- return (overflowElement.scrollWidth > clientRect.width ||
77
- overflowElement.scrollHeight > clientRect.height);
75
+ return (overflowElement.scrollWidth > overflowElement.clientWidth ||
76
+ overflowElement.scrollHeight > overflowElement.clientHeight);
78
77
  }
79
78
  return false;
80
79
  };
@@ -52,13 +52,9 @@ const LabelComponent = styled('label')(...labelStyles);
52
52
  class Label extends React.Component {
53
53
  render() {
54
54
  const { labelPosition = Label.Position.Top, isLegend = false, required, ...elemProps } = this.props;
55
- const children = !required
56
- ? this.props.children
57
- : [
58
- React.createElement("span", null,
59
- this.props.children,
60
- React.createElement(RequiredAsterisk, { key: '0', "aria-hidden": true }, "*")),
61
- ];
55
+ const children = !required ? (this.props.children) : (React.createElement("span", null,
56
+ this.props.children,
57
+ React.createElement(RequiredAsterisk, { key: '0', "aria-hidden": true }, "*")));
62
58
  return (React.createElement(React.Fragment, null, isLegend ? (React.createElement(LegendComponent, Object.assign({ labelPosition: labelPosition, isLegend: isLegend }, elemProps, { children: children }))) : (React.createElement(LabelComponent, Object.assign({ labelPosition: labelPosition }, elemProps, { children: children })))));
63
59
  }
64
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAeF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
1
+ {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAcF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
@@ -48,9 +48,8 @@ export const findEllipsisElement = (element) => {
48
48
  const isOverflowed = (element) => {
49
49
  const overflowElement = findEllipsisElement(element) || findOverflowElement(element);
50
50
  if (overflowElement) {
51
- const clientRect = overflowElement.getBoundingClientRect();
52
- return (overflowElement.scrollWidth > clientRect.width ||
53
- overflowElement.scrollHeight > clientRect.height);
51
+ return (overflowElement.scrollWidth > overflowElement.clientWidth ||
52
+ overflowElement.scrollHeight > overflowElement.clientHeight);
54
53
  }
55
54
  return false;
56
55
  };
@@ -98,16 +98,16 @@ class Label extends React.Component<React.PropsWithChildren<LabelProps>> {
98
98
  required,
99
99
  ...elemProps
100
100
  } = this.props;
101
- const children = !required
102
- ? this.props.children
103
- : [
104
- <span>
105
- {this.props.children}
106
- <RequiredAsterisk key={'0'} aria-hidden>
107
- *
108
- </RequiredAsterisk>
109
- </span>,
110
- ];
101
+ const children = !required ? (
102
+ this.props.children
103
+ ) : (
104
+ <span>
105
+ {this.props.children}
106
+ <RequiredAsterisk key={'0'} aria-hidden>
107
+ *
108
+ </RequiredAsterisk>
109
+ </span>
110
+ );
111
111
  return (
112
112
  <>
113
113
  {isLegend ? (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "9.1.38",
3
+ "version": "9.1.40",
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": "^9.1.38",
52
+ "@workday/canvas-kit-popup-stack": "^9.1.40",
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": "932e6b6918cdebda0791da400020c03d680a8134"
69
+ "gitHead": "f6842dfb0d9a12a275fc0f1832cf0a3df3ff2cdb"
70
70
  }
@@ -59,10 +59,9 @@ const isOverflowed = (element: Element) => {
59
59
  const overflowElement = findEllipsisElement(element) || findOverflowElement(element);
60
60
 
61
61
  if (overflowElement) {
62
- const clientRect = overflowElement.getBoundingClientRect();
63
62
  return (
64
- overflowElement.scrollWidth > clientRect.width ||
65
- overflowElement.scrollHeight > clientRect.height
63
+ overflowElement.scrollWidth > overflowElement.clientWidth ||
64
+ overflowElement.scrollHeight > overflowElement.clientHeight
66
65
  );
67
66
  }
68
67
  return false;