@workday/canvas-kit-react 6.5.1 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,7 @@ const ChildrenContainer = styled('div')(
42
42
  {
43
43
  display: 'inline-block',
44
44
  padding: `0 ${space.m}`,
45
- '*:not(:first-of-type)': {
45
+ '> *:not(style) ~ *:not(style)': {
46
46
  marginLeft: space.s,
47
47
  },
48
48
  },
@@ -54,7 +54,7 @@ const ChildrenContainer = styled('div')(
54
54
  flexDirection: 'row-reverse',
55
55
  '> *': {
56
56
  flex: 1,
57
- '&:not(:first-of-type)': {
57
+ '&:not(style) ~ *:not(style)': {
58
58
  marginRight: space.s,
59
59
  marginLeft: 0,
60
60
  },
@@ -71,7 +71,7 @@ var ActionBarContainer = common_1.styled('div')({
71
71
  var ChildrenContainer = common_1.styled('div')({
72
72
  display: 'inline-block',
73
73
  padding: "0 " + tokens_1.space.m,
74
- '*:not(:first-of-type)': {
74
+ '> *:not(style) ~ *:not(style)': {
75
75
  marginLeft: tokens_1.space.s,
76
76
  },
77
77
  }, function (_a) {
@@ -85,7 +85,7 @@ var ChildrenContainer = common_1.styled('div')({
85
85
  flexDirection: 'row-reverse',
86
86
  '> *': {
87
87
  flex: 1,
88
- '&:not(:first-of-type)': {
88
+ '&:not(style) ~ *:not(style)': {
89
89
  marginRight: tokens_1.space.s,
90
90
  marginLeft: 0,
91
91
  },
@@ -1 +1 @@
1
- {"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,sIAsBhC,CAAC"}
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') {
@@ -62,7 +62,7 @@ var ActionBarContainer = styled('div')({
62
62
  var ChildrenContainer = styled('div')({
63
63
  display: 'inline-block',
64
64
  padding: "0 " + space.m,
65
- '*:not(:first-of-type)': {
65
+ '> *:not(style) ~ *:not(style)': {
66
66
  marginLeft: space.s,
67
67
  },
68
68
  }, function (_a) {
@@ -76,7 +76,7 @@ var ChildrenContainer = styled('div')({
76
76
  flexDirection: 'row-reverse',
77
77
  '> *': {
78
78
  flex: 1,
79
- '&:not(:first-of-type)': {
79
+ '&:not(style) ~ *:not(style)': {
80
80
  marginRight: space.s,
81
81
  marginLeft: 0,
82
82
  },
@@ -1 +1 @@
1
- {"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,sIAsBhC,CAAC"}
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": "6.5.1",
3
+ "version": "6.7.0",
4
4
  "description": "The parent module that contains all Workday Canvas Kit React components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -57,9 +57,9 @@
57
57
  "@emotion/styled": "^10.0.27",
58
58
  "@popperjs/core": "^2.5.4",
59
59
  "@workday/canvas-colors-web": "^2.0.0",
60
- "@workday/canvas-kit-labs-react": "^6.5.1",
61
- "@workday/canvas-kit-popup-stack": "^6.5.1",
62
- "@workday/canvas-kit-preview-react": "^6.5.1",
60
+ "@workday/canvas-kit-labs-react": "^6.7.0",
61
+ "@workday/canvas-kit-popup-stack": "^6.7.0",
62
+ "@workday/canvas-kit-preview-react": "^6.7.0",
63
63
  "@workday/canvas-system-icons-web": "1.0.41",
64
64
  "@workday/design-assets-types": "^0.2.4",
65
65
  "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": "8addffe34535e828e552e42e9c1530056a84a980"
80
+ "gitHead": "e626d855cdf3d80d4dfede0ab5a770a4e4661f35"
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