@aurodesignsystem-dev/auro-popover 0.0.0-pr136.0 → 0.0.0-pr141.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.
package/demo/api.min.js CHANGED
@@ -1998,7 +1998,10 @@ class Popover {
1998
1998
  return;
1999
1999
  }
2000
2000
  const reference = state.elements.reference;
2001
- if (!reference || typeof reference.getBoundingClientRect !== "function") {
2001
+ if (
2002
+ !reference ||
2003
+ typeof reference.getBoundingClientRect !== "function"
2004
+ ) {
2002
2005
  return;
2003
2006
  }
2004
2007
  const r = reference.getBoundingClientRect();
@@ -2052,7 +2055,7 @@ class Popover {
2052
2055
  var colorCss = i$3`::slotted(*):not([onDark]),::slotted(*):not([appearance=inverse]){color:var(--ds-auro-popover-text-color)}.popover{background-color:var(--ds-auro-popover-container-color);box-shadow:var(--ds-auro-popover-boxshadow-color)}.arrow:before{background-color:var(--ds-auro-popover-container-color);box-shadow:2px 2px 1px 0 var(--ds-auro-popover-boxshadow-color)}
2053
2056
  `;
2054
2057
 
2055
- var styleCss = i$3`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, .875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, .75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, .875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, .625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host(:not([data-show])) .popover,:host([disabled]) .popover,:host([addSpace]) :host(:not([data-show])) .popover{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}::slotted(*){white-space:normal}::slotted(*:hover){cursor:pointer}[data-trigger-placement]::slotted(*:hover){position:relative}[data-trigger-placement]::slotted(*:hover):before{position:absolute;left:0;display:block;width:100%;height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem));content:""}[data-trigger-placement^=top]::slotted(*:hover):before{top:calc(-1 * (var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem)))}[data-trigger-placement^=bottom]::slotted(*:hover):before{bottom:calc(-1 * (var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem)))}:host([data-show]) .popover{z-index:var(--ds-depth-tooltip, 400)}:host([removeSpace]) .popover{margin:calc(-1 * (var(--ds-size-50, .25rem) + 1px)) 0!important}:host([addSpace]) .popover{margin:var(--ds-size-200, 1rem) 0!important}:host([addSpace]) [data-trigger-placement]::slotted(*:hover):before{height:var(--ds-size-500, 2.5rem)}:host([addSpace]) [data-trigger-placement^=top]::slotted(*:hover):before{top:calc(-1 * var(--ds-size-500, 2.5rem))}:host([addSpace]) [data-trigger-placement^=bottom]::slotted(*:hover):before{bottom:calc(-1 * var(--ds-size-500, 2.5rem))}.popover{display:inline-block;max-width:calc(100% - var(--ds-size-400, 2rem));border:0;overflow:visible;border-radius:var(--ds-border-radius, .375rem)}@media screen and (min-width:576px){.popover{max-width:50%}}@media screen and (min-width:768px){.popover{max-width:40%}}@media screen and (min-width:1024px){.popover{max-width:27rem}}[data-popper-placement^=top]>.arrow{bottom:calc(-1 * (var(--ds-size-100, .5rem) + var(--ds-size-25, .125rem)))}[data-popper-placement^=top]>.arrow:before{top:calc(-1 * var(--ds-size-200, 1rem));left:calc(-1 * var(--ds-size-75, .375rem));transform:rotate(45deg)}[data-popper-placement^=bottom]>.arrow{top:calc(-1 * (var(--ds-size-100, .5rem) + var(--ds-size-25, .125rem)))}[data-popper-placement^=bottom]>.arrow:before{top:var(--ds-size-50, .25rem);right:calc(-1 * var(--ds-size-200, 1rem));transform:rotate(-135deg)}.arrow{position:relative;margin-top:-var(--ds-size-100,.5rem)}.arrow:before{position:absolute;width:var(--ds-size-150, .75rem);height:var(--ds-size-150, .75rem);content:""}
2058
+ var styleCss = i$3`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-default-font-size, 1rem);font-variant-ligatures:none;font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-variant-ligatures:none;font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-lg-font-size, 1.125rem);font-variant-ligatures:none;font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-variant-ligatures:none;font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-sm-font-size, .875rem);font-variant-ligatures:none;font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-sm-emphasized-font-size, .875rem);font-variant-ligatures:none;font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-xs-font-size, .75rem);font-variant-ligatures:none;font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-xs-emphasized-font-size, .75rem);font-variant-ligatures:none;font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-variant-ligatures:none;font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, .875rem)}.body-2xs,.body-2xs-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-emphasized-font-size, .625rem);font-variant-ligatures:none;font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-variant-ligatures:none;font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-variant-ligatures:none;font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-variant-ligatures:none;font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-variant-ligatures:none;font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-variant-ligatures:none;font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-variant-ligatures:none;font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host(:not([data-show])) .popover,:host([disabled]) .popover,:host([addspace]) :host(:not([data-show])) .popover{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}::slotted(*){white-space:normal}::slotted(*:hover){cursor:pointer}[data-trigger-placement]::slotted(*:hover){position:relative}[data-trigger-placement]::slotted(*:hover):before{position:absolute;left:0;display:block;width:100%;height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem));content:""}[data-trigger-placement^=top]::slotted(*:hover):before{top:calc(-1 * (var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem)))}[data-trigger-placement^=bottom]::slotted(*:hover):before{bottom:calc(-1 * (var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem)))}:host([data-show]) .popover{z-index:var(--ds-depth-tooltip, 400)}:host([removespace]) .popover{margin:calc(-1 * (var(--ds-size-50, .25rem) + 1px)) 0!important}:host([addspace]) .popover{margin:var(--ds-size-200, 1rem) 0!important}:host([addspace]) [data-trigger-placement]::slotted(*:hover):before{height:var(--ds-size-500, 2.5rem)}:host([addspace]) [data-trigger-placement^=top]::slotted(*:hover):before{top:calc(-1 * var(--ds-size-500, 2.5rem))}:host([addspace]) [data-trigger-placement^=bottom]::slotted(*:hover):before{bottom:calc(-1 * var(--ds-size-500, 2.5rem))}.popover{display:inline-block;max-width:calc(100% - var(--ds-size-400, 2rem));border:0;overflow:visible;border-radius:var(--ds-border-radius, .375rem)}@media screen and (min-width:576px){.popover{max-width:50%}}@media screen and (min-width:768px){.popover{max-width:40%}}@media screen and (min-width:1024px){.popover{max-width:27rem}}[data-popper-placement^=top]>.arrow{bottom:calc(-1 * (var(--ds-size-100, .5rem) + var(--ds-size-25, .125rem)))}[data-popper-placement^=top]>.arrow:before{top:calc(-1 * var(--ds-size-200, 1rem));left:calc(-1 * var(--ds-size-75, .375rem));transform:rotate(45deg)}[data-popper-placement^=bottom]>.arrow{top:calc(-1 * (var(--ds-size-100, .5rem) + var(--ds-size-25, .125rem)))}[data-popper-placement^=bottom]>.arrow:before{top:var(--ds-size-50, .25rem);right:calc(-1 * var(--ds-size-200, 1rem));transform:rotate(-135deg)}.arrow{position:relative;margin-top:-var(--ds-size-100,.5rem)}.arrow:before{position:absolute;width:var(--ds-size-150, .75rem);height:var(--ds-size-150, .75rem);content:""}
2056
2059
  `;
2057
2060
 
2058
2061
  var tokensCss = i$3`:host{--ds-auro-popover-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, .15));--ds-auro-popover-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-popover-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
@@ -2063,11 +2066,34 @@ var tokensCss = i$3`:host{--ds-auro-popover-boxshadow-color: var(--ds-elevation-
2063
2066
 
2064
2067
 
2065
2068
  /**
2066
- * The `auro-popover` element attaches to another element and displays on hover.
2069
+ * Shows short supporting content next to a trigger when someone hovers over, focuses, or taps it.
2070
+ *
2071
+ * **Key capabilities**
2072
+ *
2073
+ * - **Keyboard and screen reader support**: A trigger that can't take focus is made reachable with the keyboard, and screen readers announce the popover text as the trigger's description.
2074
+ * - **Placement**: The popover appears above the trigger by default, or below it with `placement="bottom"`.
2075
+ * - **Turn off**: The `disabled` attribute stops the popover from showing.
2076
+ * - **Restyling**: The `popover`, `arrow`, and `trigger` CSS parts let you restyle the bubble, its arrow, and the trigger wrapper.
2077
+ *
2078
+ * @example
2079
+ * <auro-popover>
2080
+ * Top popover content!
2081
+ * <auro-button slot="trigger">Popover test</auro-button>
2082
+ * </auro-popover>
2083
+ *
2084
+ * @summary A hover and focus popover that attaches to any trigger, with keyboard and screen reader support.
2067
2085
  * @customElement auro-popover
2068
2086
  *
2069
- * @slot - Default unnamed slot for the use of popover content
2087
+ * @slot - The content shown in the popover. Screen readers announce its text as the trigger's description, so use plain text.
2070
2088
  * @slot trigger - The element in this slot triggers hiding and showing the popover.
2089
+ *
2090
+ * @csspart popover - The popover bubble that holds the content.
2091
+ * @csspart arrow - The positioning anchor for the popover's arrow. The visible arrow shape is its `::before` pseudo-element, so target `::part(arrow)::before` to change color, shadow, or size. Popper sets the arrow's position, so don't override it through this part.
2092
+ * @csspart trigger - The wrapper around the `trigger` slot, useful for correcting alignment between the trigger and the popover. Empty when the `for` attribute is used, because the trigger then lives outside the component.
2093
+ *
2094
+ * @cssprop --ds-auro-popover-boxshadow-color - Color of the shadow around the popover.
2095
+ * @cssprop --ds-auro-popover-container-color - Background color of the popover.
2096
+ * @cssprop --ds-auro-popover-text-color - Color of the popover text.
2071
2097
  */
2072
2098
  class AuroPopover extends i {
2073
2099
  constructor() {
@@ -2102,63 +2128,65 @@ class AuroPopover extends i {
2102
2128
  static get properties() {
2103
2129
  return {
2104
2130
  /**
2105
- * Adds additional top and bottom space around the appearance of the popover in relation to the trigger.
2131
+ * Adds more space between the popover and its trigger. When `removeSpace` is also set, `addSpace` takes effect.
2106
2132
  */
2107
2133
  addSpace: {
2108
2134
  type: Boolean,
2109
- reflect: true
2135
+ reflect: true,
2136
+ attribute: "addspace",
2110
2137
  },
2111
2138
 
2112
2139
  /**
2113
- * The element to use as the boundary for the popover. Can be a query selector or an HTML element.
2140
+ * Sets the element that keeps the popover from overflowing, such as a selector string or an HTML element.
2114
2141
  * @type {string | object}
2115
2142
  */
2116
2143
  boundary: { type: String },
2117
2144
 
2118
2145
  /**
2119
- * Disables the popover from showing on hover and focus.
2146
+ * Turns the popover off. A disabled popover doesn't show on hover, focus, touch, or keyboard activation.
2120
2147
  */
2121
2148
  disabled: {
2122
2149
  type: Boolean,
2123
- reflect: true
2150
+ reflect: true,
2124
2151
  },
2125
2152
 
2126
2153
  /**
2127
- * Directly associates the popover with a trigger element with the given ID. In most cases, this should not be necessary and set `slot="trigger"` on the element instead.
2154
+ * Sets the ID of the trigger element, for when the trigger can't use the `trigger` slot. In most cases, set `slot="trigger"` on the element instead.
2128
2155
  */
2129
2156
  for: {
2130
2157
  type: String,
2131
- reflect: true
2158
+ reflect: true,
2132
2159
  },
2133
2160
 
2134
2161
  /**
2135
- * Position for popover in relation to the element {'top' | 'bottom'}.
2162
+ * Sets where the popover appears in relation to its trigger. Use `top` (the default) or `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover.
2136
2163
  * @type {'top' | 'bottom'}
2137
2164
  * @default 'top'
2138
2165
  */
2139
2166
  placement: { type: String },
2140
2167
 
2141
2168
  /**
2142
- * Removes top and bottom space around the appearance of the popover in relation to the trigger.
2169
+ * Reduces the space between the popover and its trigger, so the popover sits closer to it. Has no effect when `addSpace` is also set.
2143
2170
  */
2144
2171
  removeSpace: {
2145
2172
  type: Boolean,
2146
- reflect: true
2173
+ reflect: true,
2174
+ attribute: "removespace",
2147
2175
  },
2148
2176
 
2149
2177
  /**
2150
2178
  * Whether the popover is currently visible. Reflected as the `data-show`
2151
- * attribute so host-level CSS selectors (e.g. `:host([data-show])`) work.
2179
+ * attribute so host-level CSS selectors, such as `:host([data-show])`, work.
2152
2180
  * Also drives `aria-hidden` on the popover div in the template.
2153
2181
  * @private
2154
2182
  */
2155
2183
  isPopoverVisible: {
2156
2184
  type: Boolean,
2157
2185
  reflect: true,
2158
- attribute: 'data-show',
2186
+ attribute: "data-show",
2159
2187
  converter: {
2160
2188
  fromAttribute: (value) => value !== null,
2161
- toAttribute: (value) => (value ? 'true' : null),
2189
+ toAttribute: (value) => (value ? "true" : null),
2162
2190
  },
2163
2191
  },
2164
2192
  };
@@ -2169,12 +2197,11 @@ class AuroPopover extends i {
2169
2197
  }
2170
2198
 
2171
2199
  /**
2172
- * This will register this element with the browser.
2173
- * @param {string} [name="auro-popover"] - The name of the element that you want to register.
2200
+ * Registers the element with the browser under a tag name.
2201
+ * @param {string} [name="auro-popover"] - The tag name to register the element under.
2174
2202
  *
2175
2203
  * @example
2176
- * AuroPopover.register("custom-popover") // this will register this element to <custom-popover/>
2177
- *
2204
+ * AuroPopover.register("custom-popover"); // Registers the element as `<custom-popover>`.
2178
2205
  */
2179
2206
  static register(name = "auro-popover") {
2180
2207
  AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroPopover);
@@ -2209,10 +2236,16 @@ class AuroPopover extends i {
2209
2236
  if (this.trigger) {
2210
2237
  // Remove listeners attached to the trigger element.
2211
2238
  if (this._onTriggerMouseEnter) {
2212
- this._eventTarget.removeEventListener("mouseenter", this._onTriggerMouseEnter);
2239
+ this._eventTarget.removeEventListener(
2240
+ "mouseenter",
2241
+ this._onTriggerMouseEnter,
2242
+ );
2213
2243
  }
2214
2244
  if (this._onTriggerMouseLeave) {
2215
- this._eventTarget.removeEventListener("mouseleave", this._onTriggerMouseLeave);
2245
+ this._eventTarget.removeEventListener(
2246
+ "mouseleave",
2247
+ this._onTriggerMouseLeave,
2248
+ );
2216
2249
  }
2217
2250
  if (this._onTriggerFocus) {
2218
2251
  this.trigger.removeEventListener("focusin", this._onTriggerFocus);
@@ -2227,18 +2260,23 @@ class AuroPopover extends i {
2227
2260
  // Clean up aria-description and its sync listener set in firstUpdated.
2228
2261
  // Prevents stale descriptions if the trigger is reused after disconnect.
2229
2262
  if (this._onSlotChange) {
2230
- this.shadowRoot?.querySelector("slot:not([name])")?.removeEventListener("slotchange", this._onSlotChange);
2263
+ this.shadowRoot
2264
+ ?.querySelector("slot:not([name])")
2265
+ ?.removeEventListener("slotchange", this._onSlotChange);
2231
2266
  }
2232
2267
  // Remove aria-description from every element that received it in
2233
2268
  // firstUpdated (focusable descendants or the trigger itself).
2234
- for (const target of (this._ariaDescriptionTargets || [this.trigger])) {
2269
+ for (const target of this._ariaDescriptionTargets || [this.trigger]) {
2235
2270
  target.removeAttribute("aria-description");
2236
2271
  }
2237
2272
 
2238
2273
  // Remove tabindex only if the component added it and the current value
2239
2274
  // still matches the value managed by the component. This avoids removing
2240
2275
  // an author-updated tabindex that was set after connection.
2241
- if (this._addedTabIndex && this.trigger.getAttribute("tabindex") === "0") {
2276
+ if (
2277
+ this._addedTabIndex &&
2278
+ this.trigger.getAttribute("tabindex") === "0"
2279
+ ) {
2242
2280
  this.trigger.removeAttribute("tabindex");
2243
2281
  }
2244
2282
  }
@@ -2253,7 +2291,10 @@ class AuroPopover extends i {
2253
2291
  }
2254
2292
 
2255
2293
  // Destroy the Popper.js instance to release its internal references.
2256
- if (this.popper?.popper && typeof this.popper.popper.destroy === "function") {
2294
+ if (
2295
+ this.popper?.popper &&
2296
+ typeof this.popper.popper.destroy === "function"
2297
+ ) {
2257
2298
  this.popper.popper.destroy();
2258
2299
  this.popper.popper = null;
2259
2300
  }
@@ -2324,9 +2365,15 @@ class AuroPopover extends i {
2324
2365
  );
2325
2366
 
2326
2367
  this._onBodyMouseover = (evt) => this.handleMouseoverEvent(evt);
2327
- this._onTriggerMouseEnter = () => { this.toggleShow(); };
2328
- this._onTriggerMouseLeave = () => { this.toggleHide(); };
2329
- this._onTriggerFocus = () => { this.toggleShow(); };
2368
+ this._onTriggerMouseEnter = () => {
2369
+ this.toggleShow();
2370
+ };
2371
+ this._onTriggerMouseLeave = () => {
2372
+ this.toggleHide();
2373
+ };
2374
+ this._onTriggerFocus = () => {
2375
+ this.toggleShow();
2376
+ };
2330
2377
  this._onTriggerBlur = (event) => {
2331
2378
  // Only hide if focus leaves the trigger and popover entirely, not
2332
2379
  // when moving between focusable children within the trigger or into
@@ -2377,7 +2424,9 @@ class AuroPopover extends i {
2377
2424
  this.toggle();
2378
2425
  }
2379
2426
  };
2380
- this._onHidePopover = () => { this.toggleHide(); };
2427
+ this._onHidePopover = () => {
2428
+ this.toggleHide();
2429
+ };
2381
2430
 
2382
2431
  // mouseenter/mouseleave attach to the host when the trigger is a direct
2383
2432
  // child of auro-popover (slotted), otherwise they attach to the trigger itself.
@@ -2405,13 +2454,13 @@ class AuroPopover extends i {
2405
2454
  * Sets up auto-tabindex and aria-description on the trigger element.
2406
2455
  *
2407
2456
  * Auto-tabindex: ensures non-focusable triggers are keyboard accessible.
2408
- * Covers native elements (e.g. <abbr>, <span>) and custom elements whose
2409
- * shadow DOM contains no focusable descendant (e.g. auro-icon).
2457
+ * Covers native elements, such as `<abbr>` and `<span>`, and custom elements whose
2458
+ * shadow DOM contains no focusable descendant, such as `auro-icon`.
2410
2459
  *
2411
2460
  * We skip elements that are already accessible via the tab order:
2412
- * - Natively focusable elements (tabIndex >= 0): <button>, <a href>, <input>, etc.
2413
- * - Custom elements whose shadow DOM contains a focusable descendant (e.g. auro-button
2414
- * has an inner <button>) — adding tabindex to the host would create a double tab stop.
2461
+ * - Natively focusable elements (tabIndex >= 0): `<button>`, `<a href>`, `<input>`, and so on.
2462
+ * - Custom elements whose shadow DOM contains a focusable descendant (for example, `auro-button`
2463
+ * has an inner `<button>`): adding tabindex to the host would create a double tab stop.
2415
2464
  * - Elements where the author has explicitly set tabindex — their intent is respected.
2416
2465
  *
2417
2466
  * Known limitation: custom elements with a closed shadow root (mode: 'closed') cannot
@@ -2420,9 +2469,9 @@ class AuroPopover extends i {
2420
2469
  * creating a double tab stop. Elements using delegatesFocus avoid this because the
2421
2470
  * browser reflects a non-negative tabIndex on the host.
2422
2471
  *
2423
- * aria-description (ARIA 1.3): embeds the popover content string directly on
2472
+ * `aria-description` (ARIA 1.3): embeds the popover content string directly on
2424
2473
  * the trigger so screen readers announce it on focus. Preferred over
2425
- * aria-describedby (cross-shadow ID lookup fails) and aria-live (display:none
2474
+ * `aria-describedby` (cross-shadow ID lookup fails) and `aria-live` (`display:none`
2426
2475
  * removes the region from the accessibility tree).
2427
2476
  *
2428
2477
  * @private
@@ -2442,7 +2491,7 @@ class AuroPopover extends i {
2442
2491
  if (el.tabIndex < 0) return false;
2443
2492
  let node = el;
2444
2493
  while (node) {
2445
- if (node.closest('[hidden], [inert]')) return false;
2494
+ if (node.closest("[hidden], [inert]")) return false;
2446
2495
  const root = node.getRootNode();
2447
2496
  node = root instanceof ShadowRoot ? root.host : null;
2448
2497
  }
@@ -2450,18 +2499,26 @@ class AuroPopover extends i {
2450
2499
  };
2451
2500
 
2452
2501
  // Check light DOM children for focusable elements.
2453
- let hasInternalFocus = [...this.trigger.querySelectorAll(focusableSelector)].some(isReachable);
2502
+ let hasInternalFocus = [
2503
+ ...this.trigger.querySelectorAll(focusableSelector),
2504
+ ].some(isReachable);
2454
2505
 
2455
2506
  // Also check light DOM custom element descendants whose shadow DOM
2456
2507
  // contains focusable content. querySelector cannot reach into shadow
2457
2508
  // roots, so custom elements like auro-button inside a wrapper trigger
2458
2509
  // would otherwise be missed (e.g. <div><auro-button></auro-button></div>).
2459
2510
  if (!hasInternalFocus) {
2460
- const descendants = this.trigger.querySelectorAll('*');
2511
+ const descendants = this.trigger.querySelectorAll("*");
2461
2512
 
2462
2513
  for (const child of descendants) {
2463
- if (child.localName.includes('-') && (child.tabIndex >= 0 ||
2464
- (child.shadowRoot && [...child.shadowRoot.querySelectorAll(focusableSelector)].some(isReachable)))) {
2514
+ if (
2515
+ child.localName.includes("-") &&
2516
+ (child.tabIndex >= 0 ||
2517
+ (child.shadowRoot &&
2518
+ [...child.shadowRoot.querySelectorAll(focusableSelector)].some(
2519
+ isReachable,
2520
+ )))
2521
+ ) {
2465
2522
  hasInternalFocus = true;
2466
2523
  break;
2467
2524
  }
@@ -2473,11 +2530,21 @@ class AuroPopover extends i {
2473
2530
  // If the shadow root is inaccessible (closed mode or not yet upgraded),
2474
2531
  // we cannot inspect it — the element will receive tabindex if it is not
2475
2532
  // otherwise focusable. This is a known limitation documented above.
2476
- if (!hasInternalFocus && this.trigger.localName.includes('-') && this.trigger.shadowRoot) {
2477
- hasInternalFocus = [...this.trigger.shadowRoot.querySelectorAll(focusableSelector)].some(isReachable);
2533
+ if (
2534
+ !hasInternalFocus &&
2535
+ this.trigger.localName.includes("-") &&
2536
+ this.trigger.shadowRoot
2537
+ ) {
2538
+ hasInternalFocus = [
2539
+ ...this.trigger.shadowRoot.querySelectorAll(focusableSelector),
2540
+ ].some(isReachable);
2478
2541
  }
2479
2542
 
2480
- if (!isNativelyFocusable && !hasInternalFocus && !this.trigger.hasAttribute("tabindex")) {
2543
+ if (
2544
+ !isNativelyFocusable &&
2545
+ !hasInternalFocus &&
2546
+ !this.trigger.hasAttribute("tabindex")
2547
+ ) {
2481
2548
  this.trigger.setAttribute("tabindex", "0");
2482
2549
  this._addedTabIndex = true;
2483
2550
  }
@@ -2487,11 +2554,13 @@ class AuroPopover extends i {
2487
2554
  // in modern browsers and screen readers (Chrome 92+, Firefox 92+, Safari 15.4+)
2488
2555
  // but may be unfamiliar — do not replace with aria-describedby.
2489
2556
  const slot = this.shadowRoot.querySelector("slot:not([name])");
2490
- const getSlotText = () => slot.assignedNodes({ flatten: true })
2491
- .map((n) => n.textContent ?? "")
2492
- .join(" ")
2493
- .replace(/\s+/g, " ")
2494
- .trim();
2557
+ const getSlotText = () =>
2558
+ slot
2559
+ .assignedNodes({ flatten: true })
2560
+ .map((n) => n.textContent ?? "")
2561
+ .join(" ")
2562
+ .replace(/\s+/g, " ")
2563
+ .trim();
2495
2564
 
2496
2565
  // Determine which elements should receive aria-description.
2497
2566
  // When the trigger is a non-focusable wrapper around focusable content
@@ -2501,15 +2570,17 @@ class AuroPopover extends i {
2501
2570
 
2502
2571
  if (!isNativelyFocusable && hasInternalFocus) {
2503
2572
  // Gather all keyboard-reachable light DOM descendants.
2504
- const nativeMatches = [...this.trigger.querySelectorAll(focusableSelector)].filter(isReachable);
2573
+ const nativeMatches = [
2574
+ ...this.trigger.querySelectorAll(focusableSelector),
2575
+ ].filter(isReachable);
2505
2576
 
2506
2577
  this._ariaDescriptionTargets.push(...nativeMatches);
2507
2578
 
2508
2579
  // Check custom element descendants whose shadow DOM is focusable.
2509
- const allDescendants = this.trigger.querySelectorAll('*');
2580
+ const allDescendants = this.trigger.querySelectorAll("*");
2510
2581
 
2511
2582
  for (const child of allDescendants) {
2512
- if (!child.localName.includes('-')) continue;
2583
+ if (!child.localName.includes("-")) continue;
2513
2584
  // Skip if already matched by the native selector (e.g. has tabindex attribute).
2514
2585
  if (nativeMatches.includes(child)) continue;
2515
2586
 
@@ -2519,7 +2590,9 @@ class AuroPopover extends i {
2519
2590
  } else if (child.shadowRoot) {
2520
2591
  // Host is not keyboard-reachable; focus goes to internal elements.
2521
2592
  // Set description directly on the shadow DOM focusable controls.
2522
- const shadowFocusable = [...child.shadowRoot.querySelectorAll(focusableSelector)].filter(isReachable);
2593
+ const shadowFocusable = [
2594
+ ...child.shadowRoot.querySelectorAll(focusableSelector),
2595
+ ].filter(isReachable);
2523
2596
 
2524
2597
  for (const el of shadowFocusable) {
2525
2598
  this._ariaDescriptionTargets.push(el);
@@ -2532,8 +2605,10 @@ class AuroPopover extends i {
2532
2605
  // (e.g. mock-focusable, auro-button used directly as trigger).
2533
2606
  // Light DOM searches found nothing; add the shadow focusable controls
2534
2607
  // so the description is announced when focus lands inside the shadow root.
2535
- if (this.trigger.localName.includes('-') && this.trigger.shadowRoot) {
2536
- const shadowFocusable = [...this.trigger.shadowRoot.querySelectorAll(focusableSelector)].filter(isReachable);
2608
+ if (this.trigger.localName.includes("-") && this.trigger.shadowRoot) {
2609
+ const shadowFocusable = [
2610
+ ...this.trigger.shadowRoot.querySelectorAll(focusableSelector),
2611
+ ].filter(isReachable);
2537
2612
 
2538
2613
  this._ariaDescriptionTargets.push(...shadowFocusable);
2539
2614
  }
@@ -2603,7 +2678,7 @@ class AuroPopover extends i {
2603
2678
  }
2604
2679
 
2605
2680
  /**
2606
- * Hides the popover when hovering outside of the popover or it's trigger.
2681
+ * Hides the popover when hovering outside of the popover or its trigger.
2607
2682
  * @private
2608
2683
  * @param {Event} evt - The event object.
2609
2684
  * @returns {void}
@@ -2649,7 +2724,11 @@ class AuroPopover extends i {
2649
2724
  // If disabled becomes true while the popover is visible, force-hide so
2650
2725
  // aria-hidden, the body mouseover listener, and Popper stay in sync with
2651
2726
  // the CSS that hides the popover via :host([disabled]).
2652
- if (changedProperties.has("disabled") && this.disabled && this.isPopoverVisible) {
2727
+ if (
2728
+ changedProperties.has("disabled") &&
2729
+ this.disabled &&
2730
+ this.isPopoverVisible
2731
+ ) {
2653
2732
  this.isPopoverVisible = false;
2654
2733
  }
2655
2734
  }
@@ -2663,12 +2742,12 @@ class AuroPopover extends i {
2663
2742
  popover="manual"
2664
2743
  part="popover"
2665
2744
  role="tooltip"
2666
- aria-hidden="${this.isPopoverVisible ? 'false' : 'true'}">
2667
- <div id="arrow" class="arrow" data-popper-arrow></div>
2745
+ aria-hidden="${this.isPopoverVisible ? "false" : "true"}">
2746
+ <div id="arrow" class="arrow" data-popper-arrow part="arrow"></div>
2668
2747
  <slot></slot>
2669
2748
  </div>
2670
2749
 
2671
- <span role="presentation">
2750
+ <span role="presentation" part="trigger">
2672
2751
  <slot name="trigger" data-trigger-placement="${this.placement}"></slot>
2673
2752
  </span>
2674
2753
  `;
package/demo/index.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!--
2
2
  THIS PAGE'S CONTENT SHOULD BE KEPT MINIMAL.
3
- ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE — THE BASIC EXAMPLE IS USUALLY ENOUGH.
3
+ ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE. THE BASIC EXAMPLE IS USUALLY ENOUGH.
4
4
  ALL OTHER EXAMPLES SHOULD GO IN THE API DOCUMENTATION.
5
5
  -->
6
6
 
@@ -8,10 +8,10 @@
8
8
 
9
9
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/description.md) -->
10
10
  <!-- The below content is automatically added from ./../docs/partials/description.md -->
11
- The `<auro-popover>` element attaches to another element and displays on hover. It uses the [Popper.js](https://popper.js.org/) library to position itself relative to the trigger element and supports placement options such as `top` and `bottom`.
11
+ Shows short supporting content next to a trigger when someone hovers over, focuses, or taps it. It uses the [Popper.js](https://popper.js.org/) library to position itself relative to the trigger and supports placements such as `top` and `bottom`.
12
12
  <!-- AURO-GENERATED-CONTENT:END -->
13
13
 
14
- ## Use Cases
14
+ ## Use cases
15
15
 
16
16
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/useCases.md) -->
17
17
  <!-- The below content is automatically added from ./../docs/partials/useCases.md -->
@@ -24,10 +24,10 @@ The `auro-popover` element should be used in situations where users may:
24
24
 
25
25
  ## Developer Notes
26
26
 
27
- The default trigger for a popover is a `hover` event. Mobile devices do not support `hover` events directly, so the `hover` event is replaced with a `touchstart` event to produce the popover. This is to ensure reliability of the action versus a dependency on a secondary interruption of the `hover` event on mobile devices.
27
+ The popover shows when someone hovers over or focuses the trigger. Hover isn't reliable on touch devices, so a tap, detected with `touchstart`, also toggles the popover.
28
+
29
+ ## Examples
28
30
 
29
- ## Example(s)
30
-
31
31
  ### Basic
32
32
 
33
33
  <div class="exampleWrapper">
@@ -35,7 +35,7 @@ The default trigger for a popover is a `hover` event. Mobile devices do not supp
35
35
  <!-- The below content is automatically added from ./../apiExamples/basic.html -->
36
36
  <auro-popover>
37
37
  Top popover content!
38
- <auro-button slot="trigger">Popover Test</auro-button>
38
+ <auro-button slot="trigger">Popover test</auro-button>
39
39
  </auro-popover>
40
40
  <!-- AURO-GENERATED-CONTENT:END -->
41
41
  </div>
@@ -46,7 +46,7 @@ The default trigger for a popover is a `hover` event. Mobile devices do not supp
46
46
 
47
47
  <pre class="language-html"><code class="language-html">&lt;auro-popover&gt;
48
48
  Top popover content!
49
- &lt;auro-button slot="trigger"&gt;Popover Test&lt;/auro-button&gt;
50
- &lt;/auro-popover&gt;</code></pre>
49
+ &lt;auro-button slot="trigger"&gt;Popover test&lt;/auro-button&gt;
50
+ &lt;/auro-popover&gt;</code></pre>
51
51
  <!-- AURO-GENERATED-CONTENT:END -->
52
52
  </auro-accordion>