@workday/canvas-kit-docs 8.0.0-alpha.229-next.11 → 8.0.0-alpha.231-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.
@@ -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",
@@ -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.229-next.11+d6a34633",
3
+ "version": "8.0.0-alpha.231-next.2+70fa2acc",
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.229-next.11+d6a34633"
45
+ "@workday/canvas-kit-react": "^8.0.0-alpha.231-next.2+70fa2acc"
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": "d6a34633dc59aead1f124b17d80c086d9b09b5fc"
53
+ "gitHead": "70fa2accf9253bf24c1dd7edb2abe4e99d1a8435"
54
54
  }