@workday/canvas-kit-docs 8.0.0-alpha.230-next.1 → 8.0.0-alpha.232-next.3

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.
@@ -2779,6 +2779,17 @@ module.exports = {specifications: [
2779
2779
  }
2780
2780
  ]
2781
2781
  },
2782
+ {
2783
+ "type": "describe",
2784
+ "name": "given the [Testing/React/Popups/Popup, CloseOnTargetHiddenTest] story is rendered",
2785
+ "children": [
2786
+ {
2787
+ "type": "describe",
2788
+ "name": "when the \"Open Popup\" is clicked",
2789
+ "children": []
2790
+ }
2791
+ ]
2792
+ },
2782
2793
  {
2783
2794
  "type": "describe",
2784
2795
  "name": "given the [Testing/React/Popups/Popup, TooltipReturnFocus] example is rendered",
@@ -2779,6 +2779,17 @@ module.exports = {specifications: [
2779
2779
  }
2780
2780
  ]
2781
2781
  },
2782
+ {
2783
+ "type": "describe",
2784
+ "name": "given the [Testing/React/Popups/Popup, CloseOnTargetHiddenTest] story is rendered",
2785
+ "children": [
2786
+ {
2787
+ "type": "describe",
2788
+ "name": "when the \"Open Popup\" is clicked",
2789
+ "children": []
2790
+ }
2791
+ ]
2792
+ },
2782
2793
  {
2783
2794
  "type": "describe",
2784
2795
  "name": "given the [Testing/React/Popups/Popup, TooltipReturnFocus] example is rendered",
@@ -74,7 +74,19 @@ above will no longer run in IE11 and will fail to bootstrap with an error and/or
74
74
 
75
75
  ### React 18 Upgrade
76
76
 
77
- > Coming Soon (https://github.com/Workday/canvas-kit/discussions/1545)
77
+ We've upgraded Canvas Kit to [React 18](https://reactjs.org/blog/2022/03/29/react-v18.html). This
78
+ change will not impact users who are already on v7 and are looking to upgrade to v8 as v8 will
79
+ support the same React versions as v7 (React 16.14 and 17.X) while still giving them the ability to
80
+ upgrade to React 18 as needed. Although we didn't use any new features from React 18 in v8, _future_
81
+ updates to Canvas Kit may require upgrading to React 18 to support them.
82
+
83
+ React 18 introduces several new features, but the most impactful change is the new
84
+ [concurrent render API](https://reactjs.org/blog/2022/03/29/react-v18.html#what-is-concurrent-react).
85
+ The new `createRoot` method replaces `render` and gives you access to the improvements in React 18
86
+ including the concurrent features. Without it, React behaves as it did in previous versions.
87
+
88
+ See our [React 18 discussion](https://github.com/Workday/canvas-kit/discussions/1545) for more
89
+ information.
78
90
 
79
91
  ---
80
92
 
@@ -426,6 +426,20 @@ useCloseOnFullscreenExit(model: PopupModel): {}
426
426
  Closes the popup when fullscreen is exited. Entering/exiting fullscreen changes the context of the
427
427
  entire screen. This should be added to popup types that are very context sensitive like Tooltips.
428
428
 
429
+ ### useCloseOnTargetHidden
430
+
431
+ ```ts
432
+ useCloseOnTargetHidden(model: PopupModel): {}
433
+ ```
434
+
435
+ Sets up an
436
+ [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
437
+ for the target element. When the target is detected as being less than 50% visible, the popup will
438
+ close. Most likely, this will happen if the user scrolls an overflowed content area of the page and
439
+ the target is no longer visible.
440
+
441
+ This should be used with popup elements that are transitory like Tooltips and dropdown menus.
442
+
429
443
  ### useDisableBodyScroll
430
444
 
431
445
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "8.0.0-alpha.230-next.1+e0da0524",
3
+ "version": "8.0.0-alpha.232-next.3+d847ebea",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -42,7 +42,7 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "@storybook/csf": "0.0.1",
45
- "@workday/canvas-kit-react": "^8.0.0-alpha.230-next.1+e0da0524"
45
+ "@workday/canvas-kit-react": "^8.0.0-alpha.232-next.3+d847ebea"
46
46
  },
47
47
  "devDependencies": {
48
48
  "fs-extra": "^10.0.0",
@@ -50,5 +50,5 @@
50
50
  "mkdirp": "^1.0.3",
51
51
  "typescript": "4.1"
52
52
  },
53
- "gitHead": "e0da05248437dc3b372d1e4f819676580775237e"
53
+ "gitHead": "d847ebea604bcd0a3983526c03ce86a74f7adc93"
54
54
  }