File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
packages/uui-popover-container/lib Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ import { defineElement } from '@umbraco-ui/uui-base/lib/registration' ;
2+ import { html , LitElement } from 'lit' ;
3+
4+ /**
5+ * @element uui-popover-container
6+ */
7+ @defineElement ( 'uui-popover-container-shadowdomtester' )
8+ export class UUIPopoverContainerShadowDomTesterElement extends LitElement {
9+ render ( ) {
10+ return html `< div
11+ style ="height: 500px; overflow: auto; outline: 1px solid black ">
12+ < div
13+ style ="width: 300px; height: 300px; outline: 1px solid black; overflow: auto; ">
14+ < div style ="height: 150px "> </ div >
15+ < uui-button
16+ id ="popover-button "
17+ popovertarget ="popover-container "
18+ look ="primary "
19+ label ="Open popover ">
20+ Open popover
21+ </ uui-button >
22+ < div style ="height: 150px "> </ div >
23+ < div style ="height: 150px "> </ div >
24+ </ div >
25+ < div style ="height: 400px "> </ div >
26+ </ div >
27+ < uui-popover-container id ="popover-container " popover >
28+ < div
29+ style ="width: 100%; background-color: var(--uui-color-surface); max-width: 200px; box-shadow: var(--uui-shadow-depth-4); padding: var(--uui-size-space-4); border-radius: var(--uui-border-radius); font-size: 0.9rem; ">
30+ < h3 > Scroll!</ h3 >
31+ Scrolling in any of the 2 boxes should trigger an update
32+ </ div >
33+ </ uui-popover-container > ` ;
34+ }
35+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import readme from '../README.md?raw';
33import { html } from 'lit' ;
44import type { Meta , StoryObj } from '@storybook/web-components' ;
55import { UUIPopoverContainerElement } from '.' ;
6+ import './uui-popover-container-shadowdomtester.element.js' ;
67
78const meta : Meta < UUIPopoverContainerElement > = {
89 id : 'uui-popover-container' ,
@@ -215,3 +216,27 @@ export const InsideScrollContainer: Story = {
215216 </ uui-popover-container >
216217 ` ,
217218} ;
219+
220+ export const InsideShadowDOMScrollContainer : Story = {
221+ args : {
222+ placement : 'bottom-start' ,
223+ margin : 0 ,
224+ } ,
225+ argTypes : {
226+ open : {
227+ control : false ,
228+ } ,
229+ } ,
230+ render : ( ) => html `
231+ < div style ="height: 500px; overflow: auto; outline: 1px solid black ">
232+ < div
233+ style ="width: 300px; height: 300px; outline: 1px solid black; overflow: auto; ">
234+ < div style ="height: 150px "> </ div >
235+ < uui-popover-container-shadowdomtester > </ uui-popover-container-shadowdomtester >
236+ < div style ="height: 150px "> </ div >
237+ < div style ="height: 150px "> </ div >
238+ </ div >
239+ < div style ="height: 400px "> </ div >
240+ </ div >
241+ ` ,
242+ } ;
You can’t perform that action at this time.
0 commit comments