@spectrum-web-components/overlay 0.31.1-react.3 → 0.32.1-overlay.33

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 (152) hide show
  1. package/README.md +120 -156
  2. package/custom-elements.json +1401 -530
  3. package/package.json +47 -22
  4. package/sp-overlay.d.ts +6 -0
  5. package/sp-overlay.dev.js +5 -0
  6. package/{active-overlay.dev.js.map → sp-overlay.dev.js.map} +3 -3
  7. package/sp-overlay.js +2 -0
  8. package/{active-overlay.js.map → sp-overlay.js.map} +4 -4
  9. package/src/Overlay.d.ts +28 -0
  10. package/src/Overlay.dev.js +88 -0
  11. package/src/Overlay.dev.js.map +7 -0
  12. package/src/Overlay.js +2 -0
  13. package/src/Overlay.js.map +7 -0
  14. package/src/OverlayBase.d.ts +124 -0
  15. package/src/OverlayBase.dev.js +719 -0
  16. package/src/OverlayBase.dev.js.map +7 -0
  17. package/src/OverlayBase.js +31 -0
  18. package/src/OverlayBase.js.map +7 -0
  19. package/src/OverlayDialog.d.ts +8 -0
  20. package/src/OverlayDialog.dev.js +160 -0
  21. package/src/OverlayDialog.dev.js.map +7 -0
  22. package/src/OverlayDialog.js +2 -0
  23. package/src/OverlayDialog.js.map +7 -0
  24. package/src/OverlayNoPopover.d.ts +8 -0
  25. package/src/OverlayNoPopover.dev.js +149 -0
  26. package/src/OverlayNoPopover.dev.js.map +7 -0
  27. package/src/OverlayNoPopover.js +2 -0
  28. package/src/OverlayNoPopover.js.map +7 -0
  29. package/src/OverlayPopover.d.ts +8 -0
  30. package/src/OverlayPopover.dev.js +199 -0
  31. package/src/OverlayPopover.dev.js.map +7 -0
  32. package/src/OverlayPopover.js +2 -0
  33. package/src/OverlayPopover.js.map +7 -0
  34. package/src/OverlayStack.d.ts +29 -0
  35. package/src/OverlayStack.dev.js +122 -0
  36. package/src/OverlayStack.dev.js.map +7 -0
  37. package/src/OverlayStack.js +2 -0
  38. package/src/OverlayStack.js.map +7 -0
  39. package/src/OverlayTrigger.d.ts +23 -31
  40. package/src/OverlayTrigger.dev.js +135 -245
  41. package/src/OverlayTrigger.dev.js.map +3 -3
  42. package/src/OverlayTrigger.js +52 -22
  43. package/src/OverlayTrigger.js.map +3 -3
  44. package/src/PlacementController.d.ts +36 -0
  45. package/src/PlacementController.dev.js +193 -0
  46. package/src/PlacementController.dev.js.map +7 -0
  47. package/src/PlacementController.js +2 -0
  48. package/src/PlacementController.js.map +7 -0
  49. package/src/VirtualTrigger.dev.js +0 -2
  50. package/src/VirtualTrigger.dev.js.map +2 -2
  51. package/src/VirtualTrigger.js +1 -1
  52. package/src/VirtualTrigger.js.map +3 -3
  53. package/src/fullSizePlugin.d.ts +12 -0
  54. package/src/fullSizePlugin.dev.js +39 -0
  55. package/src/fullSizePlugin.dev.js.map +7 -0
  56. package/src/fullSizePlugin.js +2 -0
  57. package/src/fullSizePlugin.js.map +7 -0
  58. package/src/index.d.ts +2 -3
  59. package/src/index.dev.js +2 -3
  60. package/src/index.dev.js.map +2 -2
  61. package/src/index.js +1 -1
  62. package/src/index.js.map +2 -2
  63. package/src/loader.d.ts +2 -2
  64. package/src/loader.dev.js +2 -19
  65. package/src/loader.dev.js.map +2 -2
  66. package/src/loader.js +1 -1
  67. package/src/loader.js.map +3 -3
  68. package/src/overlay-base.css.dev.js +9 -0
  69. package/src/overlay-base.css.dev.js.map +7 -0
  70. package/src/overlay-base.css.js +6 -0
  71. package/src/overlay-base.css.js.map +7 -0
  72. package/src/overlay-trigger.css.dev.js +1 -1
  73. package/src/overlay-trigger.css.dev.js.map +1 -1
  74. package/src/overlay-trigger.css.js +1 -1
  75. package/src/overlay-trigger.css.js.map +1 -1
  76. package/src/overlay-types.d.ts +6 -4
  77. package/src/overlay-types.dev.js +1 -0
  78. package/src/overlay-types.dev.js.map +3 -3
  79. package/src/overlay-types.js +1 -1
  80. package/src/overlay-types.js.map +3 -3
  81. package/src/topLayerOverTransforms.d.ts +23 -0
  82. package/src/topLayerOverTransforms.dev.js +170 -0
  83. package/src/topLayerOverTransforms.dev.js.map +7 -0
  84. package/src/topLayerOverTransforms.js +2 -0
  85. package/src/topLayerOverTransforms.js.map +7 -0
  86. package/stories/overlay-element.stories.js +247 -0
  87. package/stories/overlay-element.stories.js.map +7 -0
  88. package/stories/overlay-story-components.js +27 -23
  89. package/stories/overlay-story-components.js.map +2 -2
  90. package/stories/overlay.stories.js +731 -676
  91. package/stories/overlay.stories.js.map +2 -2
  92. package/sync/overlay-trigger.d.ts +4 -0
  93. package/sync/overlay-trigger.dev.js +1 -4
  94. package/sync/overlay-trigger.dev.js.map +2 -2
  95. package/sync/overlay-trigger.js +1 -1
  96. package/sync/overlay-trigger.js.map +3 -3
  97. package/test/benchmark/basic-test.js +1 -1
  98. package/test/benchmark/basic-test.js.map +1 -1
  99. package/test/index.js +460 -415
  100. package/test/index.js.map +3 -3
  101. package/test/overlay-element.test-vrt.js +5 -0
  102. package/test/overlay-element.test-vrt.js.map +7 -0
  103. package/test/overlay-element.test.js +664 -0
  104. package/test/overlay-element.test.js.map +7 -0
  105. package/test/overlay-lifecycle.test.js +34 -106
  106. package/test/overlay-lifecycle.test.js.map +2 -2
  107. package/test/overlay-trigger-click.test.js +11 -5
  108. package/test/overlay-trigger-click.test.js.map +2 -2
  109. package/test/overlay-trigger-extended.test.js +4 -8
  110. package/test/overlay-trigger-extended.test.js.map +2 -2
  111. package/test/overlay-trigger-hover-click.test.js +23 -23
  112. package/test/overlay-trigger-hover-click.test.js.map +2 -2
  113. package/test/overlay-trigger-hover.test.js +40 -34
  114. package/test/overlay-trigger-hover.test.js.map +2 -2
  115. package/test/overlay-trigger-longpress.test.js +98 -80
  116. package/test/overlay-trigger-longpress.test.js.map +2 -2
  117. package/test/overlay-trigger-sync.test.js +1 -1
  118. package/test/overlay-trigger-sync.test.js.map +2 -2
  119. package/test/overlay-trigger.test.js +1 -1
  120. package/test/overlay-trigger.test.js.map +2 -2
  121. package/test/overlay-update.test.js +4 -4
  122. package/test/overlay-update.test.js.map +2 -2
  123. package/test/overlay.test.js +247 -244
  124. package/test/overlay.test.js.map +3 -3
  125. package/active-overlay.d.ts +0 -6
  126. package/active-overlay.dev.js +0 -5
  127. package/active-overlay.js +0 -2
  128. package/src/ActiveOverlay.d.ts +0 -84
  129. package/src/ActiveOverlay.dev.js +0 -517
  130. package/src/ActiveOverlay.dev.js.map +0 -7
  131. package/src/ActiveOverlay.js +0 -16
  132. package/src/ActiveOverlay.js.map +0 -7
  133. package/src/active-overlay.css.dev.js +0 -13
  134. package/src/active-overlay.css.dev.js.map +0 -7
  135. package/src/active-overlay.css.js +0 -10
  136. package/src/active-overlay.css.js.map +0 -7
  137. package/src/overlay-stack.d.ts +0 -50
  138. package/src/overlay-stack.dev.js +0 -514
  139. package/src/overlay-stack.dev.js.map +0 -7
  140. package/src/overlay-stack.js +0 -33
  141. package/src/overlay-stack.js.map +0 -7
  142. package/src/overlay-utils.d.ts +0 -3
  143. package/src/overlay-utils.dev.js +0 -31
  144. package/src/overlay-utils.dev.js.map +0 -7
  145. package/src/overlay-utils.js +0 -2
  146. package/src/overlay-utils.js.map +0 -7
  147. package/src/overlay.d.ts +0 -59
  148. package/src/overlay.dev.js +0 -127
  149. package/src/overlay.dev.js.map +0 -7
  150. package/src/overlay.js +0 -2
  151. package/src/overlay.js.map +0 -7
  152. /package/src/{active-overlay.css.d.ts → overlay-base.css.d.ts} +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Description
2
2
 
3
- Overlays in Spectrum Web Components are created via the `Overlay` class system, which prepares an "overlay stack" that can manage the deployment of one or more overlays onto a page. Whether it's needed for transient content like a tooltip, for extended interactions like selecting a value from a picker, or for blocking content like a modal, the imperative APIs outlined below or the declarative APIs delivered by `<overlay-trigger>` should cover your overlay delivery needs.
3
+ An `<sp-overlay>` element is used to decorate content that you would like to present to your visitors as "overlaid" on the rest of the application. This includes dialogs (modal and not), pickers, tooltips, context menus, et al.
4
4
 
5
5
  ### Usage
6
6
 
@@ -11,190 +11,154 @@ Overlays in Spectrum Web Components are created via the `Overlay` class system,
11
11
  yarn add @spectrum-web-components/overlay
12
12
  ```
13
13
 
14
- Import the `Overlay` class to leverage its capabilities within your application or custom element:
14
+ Import the side effectful registration of `<sp-overlay>` as follows:
15
15
 
16
- ```js
17
- import { Overlay } from '@spectrum-web-components/overlay';
16
+ ```
17
+ import '@spectrum-web-components/overlay/sp-overlay.js';
18
18
  ```
19
19
 
20
- Primarily, this class gives you access to the `open` method that will allow you to open an overlay:
20
+ When looking to leverage the `Overlay` base class as a type and/or for extension purposes, do so via:
21
21
 
22
- ```js
23
- Overlay.open(
24
- (owner: HTMLElement), // the element to open the overlay in reference to, "trigger"
25
- (interaction: TriggerInteractions), // the type of interaction type that opened the overlay
26
- (overlayElement: HTMLElement), // the element that will be projected into the overlay, "content"
27
- (options: OverlayOptions) // options to customize the overlay
28
- );
29
22
  ```
30
-
31
- `Overlay.open()` is an asynchronous method that returns a function for closing the overlay, so it is common to leverage this functionality like the following:
32
-
33
- ```js
34
- (async () => {
35
- const trigger = document.querySelector('#trigger');
36
- const interaction = 'click';
37
- const content = document.querySelector('#content');
38
- const options = {
39
- offset: 0,
40
- placement: 'bottom',
41
- };
42
- const closeOverlay = await Overlay.open(
43
- trigger,
44
- interaction,
45
- content,
46
- options
47
- );
48
- })();
23
+ import {
24
+ Overlay
25
+ } from '@spectrum-web-components/overlay';
49
26
  ```
50
27
 
51
- ## Types
52
-
53
- ### TriggerInteractions
54
-
55
- This outlines the user experience that is to be delivered through the process of opening and closing an overlay.
28
+ ## Example
56
29
 
30
+ ```html
31
+ <sp-button id="trigger">Overlay Trigger</sp-button>
32
+ <sp-overlay trigger="trigger@click">
33
+ <sp-popover>
34
+ <sp-dialog>
35
+ <h2 slot="heading">Clicking opens this popover...</h2>
36
+ <p>But, it really could be anything. Really.</p>
37
+ </sp-dialog>
38
+ </sp-popover>
39
+ </sp-overlay>
57
40
  ```
58
- type TriggerInteractions =
59
- | 'click'
60
- | 'custom',
61
- | 'hover'
62
- | 'inline'
63
- | 'modal'
64
- | 'replace';
65
- ```
66
-
67
- `click` will open an overlay that will close immediately on the next click that is not on an element within the overlay.
68
41
 
69
- `custom` is less opinionated and allows for some customization of the process from the outside.
42
+ ## API
70
43
 
71
- `hover` will close the overlay as soon as the pointer leaves the trigger to which the overlay is connected.
44
+ ```html
45
+ open delayed offset="Number | [Number, Number]" placement=${placement}
46
+ received-focus=${‘true’ | ‘false’ | ‘auto’ (default)} trigger=${idOfTrigger AND
47
+ ${string}@${string}} .triggerElement(s)=${trigger Element by reference} // match
48
+ naming to aria element reference spec .triggerInteraction=${ ‘click’ |
49
+ ‘longpress’ | ‘hover’ } type=${type}
50
+ ```
72
51
 
73
- `inline` places the overlay after the trigger but before the next element in the logical tab order. This means the `shift + tab` keyboard stroke will return to the trigger.
52
+ ## Fallback support
74
53
 
75
- `modal` manages the overlay like a modal and will trap the tab order within its contents only.
54
+ While the [`<dialog>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) is widely supported by browsers, the [`popover` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/popover) is still quite new. When leveraged in browsers that do not yet support the `popover` attribute, there may be additional intervention required to ensure your content is delivered to your visitors as expected.
76
55
 
77
- `replace` will position the overlay directly in the position of the trigger in the logical tab order. This means the `shift + tab` keyboard stroke will return the focusable element immediately prior to the trigger.
56
+ ### Complex layered
78
57
 
79
- ### OverlayOptions
58
+ When an overlay is places within a page with complex layering, it is possible for the content therein to fall behind other content in the `z-index` stack. The following example is somewhat contrived, but image a toolbar next to properties panel. If the toolbar has a lower `z-index` and the properties panel, any overlaid content (tooltips, etc.) within that toolbar will display underneath any content in the properties panel with which it may share pixels.
80
59
 
60
+ ```html
61
+ <div class="complex-layered-demo">
62
+ <div class="complex-layered-holder">
63
+ <sp-action-button id="complex-layered">Trigger</sp-action-button>
64
+ <sp-overlay trigger="complex-layered@hover" placement="bottom-start">
65
+ <sp-tooltip>
66
+ I can be partially blocked when [popover] is not available
67
+ </sp-tooltip>
68
+ </sp-overlay>
69
+ </div>
70
+ <div class="complex-layered-blocker"></div>
71
+ </div>
72
+ <style>
73
+ .complex-layered-demo {
74
+ position: relative;
75
+ }
76
+ .complex-layered-holder {
77
+ z-index: 1;
78
+ position: relative;
79
+ }
80
+ .complex-layered-blocker {
81
+ position: relative;
82
+ z-index: 10;
83
+ background: white;
84
+ width: 100%;
85
+ height: 40px;
86
+ }
87
+ </style>
81
88
  ```
82
- type OverlayOptions = {
83
- delayed?: boolean;
84
- placement?: Placement;
85
- offset?: number;
86
- receivesFocus?: 'auto';
87
- notImmediatelyClosable?: boolean;
88
- }
89
- ```
90
-
91
- `delayed` allows for the overlay to open the overlay with warmup/cooldown behaviors as described at https://spectrum.adobe.com/page/tooltip/#Immediate-or-delayed-appearance
92
-
93
- `placement` outlines where the overlay system should attempt to position the overlay in relation to the trigger. When the layout of the page and/or current scroll positioning prevents the successful placement of the content in this way, the `placement` will be automatically applied as the value best suited for those conditions. Placements available include: `"auto" | "auto-start" | "auto-end" | "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | "none"`.
94
89
 
95
- `offset` defines the distance of the overlay content from the trigger, measured in pixels.
90
+ Properly managed `z-index` values will support working around this issue while browsers work to adopt the `popover` attribute. In this demo, you can easily achieve the same output but sharing one `z-index` between the various pieces of content, removing `z-index` values all together, or raising the `.complex-layered-holder` element to a higher `z-index` than the `.complex-layered-blocker` element.
96
91
 
97
- `receivesFocus` tells the overlay stack to throw focus into the overlay after it has opened.
92
+ ### Contained
98
93
 
99
- `notImmediatelyClosable` prevents immediate clicks from closing the overlay. If you find that a trigger event is immediately overridden with a subsequent click (for instance, a `focus` trigger that should be closed on `click`), set `notImmediatelyClosable: true` to disregard clicks that coincide with the opening trigger.
94
+ [CSS Containment](https://developer.mozilla.org/en-US/docs/Web/CSS/contain) allows a developer direct control on how the internals of one element effect the paint and layout of the internals of other elements on the same page. While leveraging some of its values can offer performance gains, they can interupt the delivery of your overlaid content.
100
95
 
101
- ### Events
96
+ ```html
97
+ <div class="contained-demo">
98
+ <sp-action-button id="contained">Trigger</sp-action-button>
99
+ <sp-overlay trigger="contained@hover" placement="bottom-start">
100
+ <sp-tooltip>
101
+ I can be blocked when [popover] is not available
102
+ </sp-tooltip>
103
+ </sp-overlay>
104
+ </div>
105
+ <style>
106
+ .contained-demo {
107
+ contain: content;
108
+ }
109
+ </style>
110
+ ```
102
111
 
103
- The work to both open and close an overlay is asynchronous. This asynchrony is surfaced into the application via DOM events dispatched from the `trigger` element of your overlay. An `sp-opened` event will be dispatched once the overlay has finished opening, and an `sp-closed` event will be dispatched once the overlay has finished closing. In both cases, the dispatched event will include a `detail` property with an `interaction: TriggerInteractions` key to support associating the event/overlay with its originating `interaction`.
104
-
105
- ## Example
112
+ This situation is a little more complex to handle, if you are not OK with simply removing the `contain` value. In the case that you would like to continue to leverage `contain` is to place "contained" content separately from your overlaid content, like so:
106
113
 
107
114
  ```html
108
- <sp-button
109
- onclick="
110
- const trigger = this;
111
- const interaction = 'click';
112
- const content = this.nextElementSibling;
113
- if (!content) return;
114
- const options = {
115
- offset: 0,
116
- placement: 'right',
117
- };
118
- content.open = true;
119
- const closeOverlayPromise = Overlay.open(
120
- trigger,
121
- interaction,
122
- content,
123
- options
124
- );
125
- setTimeout(function () {
126
- closeOverlayPromise.then(function(close) {
127
- close();
128
- content.open = false;
129
- });
130
- }, 5000);
131
- "
132
- >
133
- Click me for a 5 second overlay!
134
- </sp-button>
135
- <sp-popover>
136
- <sp-dialog size="medium">
137
- <h2 slot="heading">Demo</h2>
138
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
139
- tempor incididunt ut labore et dolore magna aliqua. Auctor augue mauris
140
- augue neque gravida. Libero volutpat sed ornare arcu. Quisque egestas
141
- diam in arcu cursus euismod quis viverra. Posuere ac ut consequat semper
142
- viverra nam libero justo laoreet. Enim ut tellus elementum sagittis
143
- vitae et leo duis ut. Neque laoreet suspendisse interdum consectetur
144
- libero id faucibus nisl. Diam volutpat commodo sed egestas egestas.
145
- Dolor magna eget est lorem ipsum dolor. Vitae suscipit tellus mauris a
146
- diam maecenas sed. Turpis in eu mi bibendum neque egestas congue.
147
- Rhoncus est pellentesque elit ullamcorper dignissim cras lobortis.
148
- </sp-dialog>
149
- </sp-popover>
115
+ <div class="contained-demo">
116
+ <sp-action-button id="contained-working">Trigger</sp-action-button>
117
+ </div>
118
+ <sp-overlay trigger="contained-working@hover" placement="bottom-start">
119
+ <sp-tooltip>I can be blocked when [popover] is not available</sp-tooltip>
120
+ </sp-overlay>
121
+ <style>
122
+ .contained-demo {
123
+ contain: content;
124
+ }
125
+ </style>
150
126
  ```
151
127
 
152
- ## Styling
153
-
154
- When an overlay is opened from within a styled DOM scope as created by an `<sp-theme>` element, this scope will be resolved and recreated with in the `<active-overlay>` element that is created to host the overlaid content directly in the `<body>`. By default, the generated `<sp-theme>` element will be supplied with settings of the scope from which the overlay is triggered, including any "app" centric CSS Custom Properties that might be applied via `Theme.registerThemeFragment('app', 'app', themeFragment)` therein. In the case that you have set CSS Custom Properties for the scope created by an `<sp-theme>` element via other methods, you can specify that those values should also be applied to overlay content using the `theme` part on the `<active-overlay>` element via the `active-overlay::part(theme) { /* styles */ }` selector.
128
+ `<sp-overlay>` accepts an ID reference via the `trigger` attribute in order to relate it to interactions and positioning in the DOM. To fulfill this reference the two elements need to be in the same DOM tree. However, `<sp-overlay>` alternatively accepts a `triggerElement` _property_ that opens even more flexibility in addressing this situation.
155
129
 
156
- ## Advanced Usage
130
+ ### Clip pathed
157
131
 
158
- When working with the DOM-based APIs of custom elements, it is sometimes preferred to project content into an overlay from a different shadow root (eg projecting a single-slotted element into the overlay). To ensure that the content can be marshalled through any number of `<slot>` elements which are addressed into subsequent `<slot>` elements, be sure to use the `flatten: true` option when querying `slot.asignedNodes()`:
132
+ While not offering the same performance opportunities as `contain`, `clip-path` can also restrict how content in an element is surfaced at paint time. When overlaid content should display outside of the `clip-path`, without the `popover` attribute that content could be _clipped_.
159
133
 
160
- ```js
161
- const trigger = shadowRoot.querySelector('#trigger');
162
- const slot = shadowRoot.querySelector('slot');
163
- const interaction = 'click';
164
- const content = slot
165
- .assignedNodes({ flatten: true })
166
- .find((node) => node instanceof HTMLElement);
167
- const options = {
168
- offset: 0,
169
- placement: 'bottom',
170
- };
171
- const closeOverlay = await Overlay.open(trigger, interaction, content, options);
134
+ ```html
135
+ <div class="clip-pathed-demo">
136
+ <sp-action-button id="clip-pathed">Trigger</sp-action-button>
137
+ <sp-overlay trigger="clip-pathed@hover" placement="bottom-start">
138
+ <sp-tooltip>
139
+ I can be blocked when [popover] is not available
140
+ </sp-tooltip>
141
+ </sp-overlay>
142
+ </div>
143
+ <style>
144
+ .clip-pathed-demo {
145
+ clip-path: inset(0 0);
146
+ }
147
+ </style>
172
148
  ```
173
149
 
174
- Other times, you may want to compose content from multiple shadow roots into a single overlay. This is a pattern seen in the `<sp-dropdown>` element: its `<sp-menu>` light DOM child is wrapped by its `<sp-popover>` shadow DOM child before being projected into an overlay. What follows is a more trivial example, where content in the light DOM of an element is injected into an element in the shadow DOM of the same element and then projected into an overlay. Notice the added work here of setting a comment node into the light DOM as a placeholder for the "stolen" content, and then swapping that content back into the light DOM when the overlay is closed.
175
-
176
- ```js
177
- const trigger = this.shadowRoot.querySelector('#trigger');
178
- const outterContent = this.shadowRoot.querySelector('#outter-content');
179
- const innerContent = this.querySelector('#inner-content');
180
- const innerContentParent =
181
- innerContent.parentElement || innerContent.getRootNode();
182
- const placeholder = document.createComment('placeholder for inner content');
183
- innerContentParent.replaceChild(placeholder, innerContent);
184
- outterContent.append(innerContent);
185
- const interaction = 'click';
186
- const options = {
187
- offset: 0,
188
- placement: 'bottom',
189
- };
190
- const closeOverlayPromise = Overlay.open(
191
- trigger,
192
- interaction,
193
- outterContent,
194
- options
195
- );
196
- const closeOverlay = function () {
197
- closeOverlayPromise.then((close) => close());
198
- innerContentParent.replaceChild(placeholder, innerContent);
199
- };
150
+ Here, again, working with your content needs (whether you actually want to leverage `clip-path`) or DOM structure (not colocating clipped and non-clipped content) will allow you to avoid this issue:
151
+
152
+ ```html
153
+ <div class="clip-pathed-demo">
154
+ <sp-action-button id="clip-pathed-working">Trigger</sp-action-button>
155
+ </div>
156
+ <sp-overlay trigger="clip-pathed-working@hover" placement="bottom-start">
157
+ <sp-tooltip>I can be blocked when [popover] is not available</sp-tooltip>
158
+ </sp-overlay>
159
+ <style>
160
+ .clip-pathed-demo {
161
+ clip-path: inset(0 0);
162
+ }
163
+ </style>
200
164
  ```