scb-wc 0.1.243 → 0.1.245

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 (90) hide show
  1. package/README.md +16 -19
  2. package/all.d.ts +0 -14
  3. package/all.js +0 -14
  4. package/index.js +85 -99
  5. package/mvc/components/all.js +0 -9
  6. package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
  7. package/mvc/components/scb-accordion/scb-accordion.js +1 -1
  8. package/mvc/components/scb-app-bar/scb-app-bar.js +1 -1
  9. package/mvc/components/scb-avatar/scb-avatar.js +20 -9
  10. package/mvc/components/scb-button/scb-button.js +3 -3
  11. package/mvc/components/scb-calendar/scb-calendar.js +1 -1
  12. package/mvc/components/scb-calendar-card/scb-calendar-card.js +2 -2
  13. package/mvc/components/scb-card/scb-card.js +2 -2
  14. package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +2 -2
  15. package/mvc/components/scb-dialog/scb-dialog.js +1 -1
  16. package/mvc/components/scb-drawer/scb-drawer.js +4 -4
  17. package/mvc/components/scb-drop-zone/scb-drop-zone.js +1 -1
  18. package/mvc/components/scb-dropdown/scb-dropdown.js +5 -5
  19. package/mvc/components/scb-fact-card/scb-fact-card.js +1 -1
  20. package/mvc/components/scb-header/scb-header.js +2 -2
  21. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
  22. package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
  23. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
  24. package/mvc/components/scb-link/scb-link.js +1 -1
  25. package/mvc/components/scb-link-button/scb-link-button.js +1 -1
  26. package/mvc/components/scb-list/scb-list-item.js +6 -6
  27. package/mvc/components/scb-menu/scb-menu-item.js +1 -1
  28. package/mvc/components/scb-nav/scb-nav.js +1 -1
  29. package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
  30. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  31. package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
  32. package/mvc/components/scb-options-menu/scb-options-sub-menu.js +1 -1
  33. package/mvc/components/scb-overlay/scb-overlay.js +3 -3
  34. package/mvc/components/scb-pagination/scb-pagination.js +1 -1
  35. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  36. package/mvc/components/scb-search/scb-search.js +3 -3
  37. package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
  38. package/mvc/components/scb-select/scb-select-option.js +1 -1
  39. package/mvc/components/scb-select/scb-select.js +1 -1
  40. package/mvc/components/scb-slider/scb-slider.js +1 -1
  41. package/mvc/components/scb-snackbar/scb-snackbar.js +1 -1
  42. package/mvc/components/scb-stepper/scb-step.js +1 -1
  43. package/mvc/components/scb-switch/scb-switch.js +2 -2
  44. package/mvc/components/scb-table/scb-table.js +1 -1
  45. package/mvc/components/scb-table-advanced/scb-table-advanced.js +1 -1
  46. package/mvc/components/scb-textfield/scb-textfield.js +176 -34
  47. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  48. package/mvc/components/scb-tooltip/scb-tooltip.js +2 -2
  49. package/mvc/{components/shared → vendor}/component-size-token.js +1 -1
  50. package/mvc/vendor/lazy-focus-ring.js +2 -0
  51. package/mvc/vendor/lazy-ripple.js +2 -0
  52. package/mvc/{components/shared → vendor}/manual-popover.js +1 -1
  53. package/mvc/{components/scb-chevron → vendor}/scb-chevron.js +1 -1
  54. package/mvc/vendor/scb-icon-svg.js +11 -0
  55. package/package.json +2 -12
  56. package/scb-avatar/scb-avatar.js +105 -28
  57. package/scb-button/scb-button.js +27 -27
  58. package/scb-components/scb-avatar/scb-avatar.d.ts +5 -0
  59. package/scb-components/scb-dropdown/scb-dropdown.d.ts +6 -1
  60. package/scb-drawer/scb-drawer.js +4 -2
  61. package/scb-dropdown/scb-dropdown.js +36 -12
  62. package/scb-icon-button/scb-icon-button.js +18 -18
  63. package/scb-slider/scb-slider.js +22 -22
  64. package/scb-switch/scb-switch.js +21 -21
  65. package/scb-viz/scb-viz-series-differentiation-registry.js +7 -10
  66. package/scb-viz/scb-viz.js +43 -43
  67. package/scb-wc.bundle.js +365 -440
  68. package/scb-wc.d.ts +0 -28
  69. package/shared/scb-icon-svg.js +2 -5
  70. package/mvc/components/scb-datepicker/scb-datepicker.js +0 -143
  71. package/mvc/components/scb-table-next/read-table.js +0 -1
  72. package/mvc/components/scb-table-next/scb-table-next.js +0 -6
  73. package/mvc/components/shared/lazy-focus-ring.js +0 -2
  74. package/mvc/components/shared/lazy-ripple.js +0 -2
  75. package/mvc/components/shared/scb-icon-svg.js +0 -11
  76. package/scb-components/index.d.ts +0 -108
  77. package/scb-components/scb-table-next/read-table.d.ts +0 -29
  78. package/scb-components/scb-table-next/scb-table-next.d.ts +0 -22
  79. package/scb-components/scb-viz/scb-viz-actions-runtime.d.ts +0 -26
  80. package/scb-components/scb-viz/scb-viz-print-runtime.d.ts +0 -36
  81. package/scb-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +0 -21
  82. package/scb-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +0 -42
  83. package/scb-components/scb-viz/scb-viz-table-runtime.d.ts +0 -31
  84. package/scb-components/shared/component-size-token.d.ts +0 -1
  85. package/scb-components/shared/lazy-focus-ring.d.ts +0 -4
  86. package/scb-components/shared/lazy-ripple.d.ts +0 -9
  87. package/scb-components/shared/manual-popover.d.ts +0 -7
  88. package/scb-components/shared/scb-icon-svg.d.ts +0 -3
  89. package/scb-table-next/read-table.js +0 -87
  90. package/scb-table-next/scb-table-next.js +0 -226
@@ -1,4 +1,4 @@
1
- import{g as v,h as f,m as y,p,v as b,y as x}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{addLazyFocusRingListeners as w}from"../shared/lazy-focus-ring.js";import{t as d}from"../../vendor/decorate.js";import"../scb-chevron/scb-chevron.js";import"../scb-divider/scb-divider.js";(function(){try{var u=typeof globalThis<"u"?globalThis:window;if(!u.__scb_ce_guard_installed__){u.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,i){try{customElements.get(e)||t(e,s,i)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var m,g,c=(m=class extends f{constructor(...t){super(...t),this.expanded=!1,this.label="",this.supportingText="",this.current=!1,this.itemHref="#",this.noDivider=!1,this._unique=g._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._trailingSlotHasContent=!1,this._onSlotChange=()=>{const e=this.renderRoot.querySelector("slot:not([name])"),s=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==s&&(this._slotHasContent=s,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;const e=!this.expanded;this.setExpanded(e)},this._onKeyDown=e=>{const s=this.closest("scb-toc"),i=Array.from(s?.querySelectorAll("scb-toc-item")||[]).map(n=>({host:n,label:n.renderRoot.querySelector(".toc-item-label")||null})).filter(n=>!!n.label),o=i.findIndex(n=>n.host===this);if(o<0)return;const a=e.currentTarget?.classList?.contains("toc-chevron-button")??!1;switch(e.key){case"Enter":case" ":if(!a)return;e.preventDefault(),this._toggleAccordion();break;case"ArrowDown":e.preventDefault(),o<i.length-1&&i[o+1].label.focus();break;case"ArrowUp":e.preventDefault(),o>0&&i[o-1].label.focus();break;case"Home":e.preventDefault(),i.length&&i[0].label.focus();break;case"End":e.preventDefault(),i.length&&i[i.length-1].label.focus();break}}}setExpanded(t){this.expanded!==t&&(this.expanded=t)}static _uid(){return globalThis.crypto?.randomUUID?.()??`${g._uidPrefix}-${++g._uidSeq}`}firstUpdated(){this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded()}updated(t){t.has("expanded")&&(this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded(),this.dispatchEvent(new CustomEvent("expanded-changed",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("expandedchanged",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=w(this,this.renderRoot),this._slotHasContent=Array.from(this.children).some(t=>{const e=t.getAttribute("slot");return e===null||e===""}),this._trailingSlotHasContent=Array.from(this.children).some(t=>t.getAttribute("slot")==="trailing"),!this._slotHasContent&&this.expanded&&(this.expanded=!1)}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,super.disconnectedCallback(),this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null)}_applyInertByExpanded(){const t=this.renderRoot.querySelector(".scb-toc-item-bottom");t&&(this.expanded?(t.removeAttribute("inert"),t.setAttribute("aria-hidden","false"),this._restoreTabIndexesIfNeeded()):(t.setAttribute("inert",""),t.setAttribute("aria-hidden","true"),this._removeTabIndexesIfNeeded()))}_syncOverflowVisibilityByExpanded(){if(this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null),this.removeAttribute("data-expanded-settled"),!this.expanded)return;const t=this.renderRoot.querySelector(".scb-toc-item-bottom");if(!t){this.setAttribute("data-expanded-settled","");return}const e=this._getTransitionMs(t);if(e<=0){this.setAttribute("data-expanded-settled","");return}this._overflowVisibleTimer=window.setTimeout(()=>{this._overflowVisibleTimer=null,this.expanded&&this.setAttribute("data-expanded-settled","")},e)}_getTransitionMs(t){const e=getComputedStyle(t),s=e.transitionDuration.split(",").map(r=>r.trim()),i=e.transitionDelay.split(",").map(r=>r.trim()),o=r=>{const l=parseFloat(r);return Number.isFinite(l)?r.endsWith("ms")?l:r.endsWith("s")?l*1e3:l:0},a=Math.max(s.length,i.length);let n=0;for(let r=0;r<a;r+=1){const l=o(s[r]??s[s.length-1]??"0s"),h=o(i[r]??i[i.length-1]??"0s");n=Math.max(n,l+h)}return Math.ceil(n)}_supportsInert(){return"inert"in HTMLElement.prototype}_collectFocusableFromSlot(){const t=this.renderRoot.querySelector("slot:not([name])");if(!t)return[];const e=t.assignedElements({flatten:!0}),s=[],i=o=>{o instanceof HTMLElement&&o.matches("a,button,input,select,textarea,[tabindex]")&&s.push(o)};return e.forEach(o=>{i(o),o.querySelectorAll?.("a,button,input,select,textarea,[tabindex]").forEach(a=>i(a))}),s}_removeTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("tabindex");e!==null&&t.setAttribute("data-scb-prev-tabindex",e),t.setAttribute("tabindex","-1")})}_restoreTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("data-scb-prev-tabindex");e!==null?(t.setAttribute("tabindex",e),t.removeAttribute("data-scb-prev-tabindex")):t.removeAttribute("tabindex")})}render(){const t=`bottom-${this._unique}`,e=`toc-label-${this._unique}`,s=`toc-chevron-${this._unique}`,i=this.supportingText.trim().length>0;return b`
1
+ import{g as v,h as f,m as y,p,v as b,y as x}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{t as w}from"../../vendor/lazy-focus-ring.js";import{t as d}from"../../vendor/decorate.js";import"../../vendor/scb-chevron.js";import"../scb-divider/scb-divider.js";(function(){try{var u=typeof globalThis<"u"?globalThis:window;if(!u.__scb_ce_guard_installed__){u.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,i){try{customElements.get(e)||t(e,s,i)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var m,g,c=(m=class extends f{constructor(...t){super(...t),this.expanded=!1,this.label="",this.supportingText="",this.current=!1,this.itemHref="#",this.noDivider=!1,this._unique=g._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._trailingSlotHasContent=!1,this._onSlotChange=()=>{const e=this.renderRoot.querySelector("slot:not([name])"),s=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==s&&(this._slotHasContent=s,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;const e=!this.expanded;this.setExpanded(e)},this._onKeyDown=e=>{const s=this.closest("scb-toc"),i=Array.from(s?.querySelectorAll("scb-toc-item")||[]).map(n=>({host:n,label:n.renderRoot.querySelector(".toc-item-label")||null})).filter(n=>!!n.label),o=i.findIndex(n=>n.host===this);if(o<0)return;const a=e.currentTarget?.classList?.contains("toc-chevron-button")??!1;switch(e.key){case"Enter":case" ":if(!a)return;e.preventDefault(),this._toggleAccordion();break;case"ArrowDown":e.preventDefault(),o<i.length-1&&i[o+1].label.focus();break;case"ArrowUp":e.preventDefault(),o>0&&i[o-1].label.focus();break;case"Home":e.preventDefault(),i.length&&i[0].label.focus();break;case"End":e.preventDefault(),i.length&&i[i.length-1].label.focus();break}}}setExpanded(t){this.expanded!==t&&(this.expanded=t)}static _uid(){return globalThis.crypto?.randomUUID?.()??`${g._uidPrefix}-${++g._uidSeq}`}firstUpdated(){this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded()}updated(t){t.has("expanded")&&(this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded(),this.dispatchEvent(new CustomEvent("expanded-changed",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("expandedchanged",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=w(this,this.renderRoot),this._slotHasContent=Array.from(this.children).some(t=>{const e=t.getAttribute("slot");return e===null||e===""}),this._trailingSlotHasContent=Array.from(this.children).some(t=>t.getAttribute("slot")==="trailing"),!this._slotHasContent&&this.expanded&&(this.expanded=!1)}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,super.disconnectedCallback(),this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null)}_applyInertByExpanded(){const t=this.renderRoot.querySelector(".scb-toc-item-bottom");t&&(this.expanded?(t.removeAttribute("inert"),t.setAttribute("aria-hidden","false"),this._restoreTabIndexesIfNeeded()):(t.setAttribute("inert",""),t.setAttribute("aria-hidden","true"),this._removeTabIndexesIfNeeded()))}_syncOverflowVisibilityByExpanded(){if(this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null),this.removeAttribute("data-expanded-settled"),!this.expanded)return;const t=this.renderRoot.querySelector(".scb-toc-item-bottom");if(!t){this.setAttribute("data-expanded-settled","");return}const e=this._getTransitionMs(t);if(e<=0){this.setAttribute("data-expanded-settled","");return}this._overflowVisibleTimer=window.setTimeout(()=>{this._overflowVisibleTimer=null,this.expanded&&this.setAttribute("data-expanded-settled","")},e)}_getTransitionMs(t){const e=getComputedStyle(t),s=e.transitionDuration.split(",").map(r=>r.trim()),i=e.transitionDelay.split(",").map(r=>r.trim()),o=r=>{const l=parseFloat(r);return Number.isFinite(l)?r.endsWith("ms")?l:r.endsWith("s")?l*1e3:l:0},a=Math.max(s.length,i.length);let n=0;for(let r=0;r<a;r+=1){const l=o(s[r]??s[s.length-1]??"0s"),h=o(i[r]??i[i.length-1]??"0s");n=Math.max(n,l+h)}return Math.ceil(n)}_supportsInert(){return"inert"in HTMLElement.prototype}_collectFocusableFromSlot(){const t=this.renderRoot.querySelector("slot:not([name])");if(!t)return[];const e=t.assignedElements({flatten:!0}),s=[],i=o=>{o instanceof HTMLElement&&o.matches("a,button,input,select,textarea,[tabindex]")&&s.push(o)};return e.forEach(o=>{i(o),o.querySelectorAll?.("a,button,input,select,textarea,[tabindex]").forEach(a=>i(a))}),s}_removeTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("tabindex");e!==null&&t.setAttribute("data-scb-prev-tabindex",e),t.setAttribute("tabindex","-1")})}_restoreTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("data-scb-prev-tabindex");e!==null?(t.setAttribute("tabindex",e),t.removeAttribute("data-scb-prev-tabindex")):t.removeAttribute("tabindex")})}render(){const t=`bottom-${this._unique}`,e=`toc-label-${this._unique}`,s=`toc-chevron-${this._unique}`,i=this.supportingText.trim().length>0;return b`
2
2
  <div class="scb-toc-item">
3
3
  <div class=${`scb-toc-item-top${i?"":" no-supporting-text"}`}>
4
4
  <div>
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../scb-button/scb-button.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/preload-helper.js","../../vendor/component-defaults.js","../../vendor/decorate.js","../../vendor/assertClassBrand.js","../../vendor/classPrivateMethodInitSpec.js","../../vendor/aria-references.internal.js"])))=>i.map(i=>d[i]);
2
- import{g as C,h as q,m as H,p as c,v as d,y as N}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{t as I}from"../../vendor/preload-helper.js";import{componentSizeToken as K}from"../shared/component-size-token.js";import{t as p}from"../../vendor/decorate.js";import{closeManualPopover as m,openManualPopover as j}from"../shared/manual-popover.js";(function(){try{var f=typeof globalThis<"u"?globalThis:window;if(!f.__scb_ce_guard_installed__){f.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,e,o){try{customElements.get(i)||t(i,e,o)}catch(h){var n=String(h||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var T,V=0,x="data-scb-tooltip-managed-action-size",l=(T=class extends q{constructor(...t){super(...t),this.variant="plain",this.arrow=null,this.supportingtext="",this.label="",this.trigger="hover",this.position="top",this.open=!1,this.delay=.25,this.offset=0,this.maxWidth="300px",this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition="top",this._tooltipId=`scb-tooltip-${++V}`,this._buttonDepsLoaded=!1,this._listeningForPositionChanges=!1,this._listeningForDismiss=!1,this._onWindowReposition=()=>{if(!this.open)return;const i=this._getTooltipElement(),e=this._triggerEl;!i||!e||this._positionTooltip(i,e)},this._onDocumentKeyDown=i=>{i.key!=="Escape"||!this.open||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1))},this._onDocumentPointerDown=i=>{this.open&&(i.composedPath().includes(this)||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1)))},this._ensureButtonDepsIfNeeded=()=>{this._syncRichActionButtonSizes(),!this._buttonDepsLoaded&&this.querySelector('[slot="scb-tooltip-button"]')&&(this._buttonDepsLoaded=!0,I(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url))},this._onTriggerMouseEnter=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerFocus=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerKeyDown=i=>{i.key==="Tab"&&(this._hoverActive=!1,this._clickActive=!1,this._setOpenState(!1),m(this._getTooltipElement()))},this._onTooltipMouseEnter=()=>{this._hasTooltipContent()&&(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTooltipMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!1,this._clickActive||this._setOpenState(!1))},this._onTriggerClick=()=>{this._hasTooltipContent()&&(this._clickActive=!this._clickActive,this._clickActive?this._setOpenState(!0):this._hoverActive||this._setOpenState(!1))}}_syncRichActionButtonSizes(){const t=K(this,"--scb-tooltip-design-rich-action-button-size-medium",["small","medium","large"],"medium"),i=this.querySelectorAll(':scope > scb-button[slot="scb-tooltip-button"]');for(const e of i){const o=e.getAttribute(x);if(o!==null&&e.getAttribute("size")!==o){e.removeAttribute(x);continue}(!e.hasAttribute("size")||o!==null)&&(e.setAttribute("size",t),e.setAttribute(x,t))}}firstUpdated(){this._originalPosition=this.position,this._updateDelayCss(),this._updateMaxWidthCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this._ensureButtonDepsIfNeeded(),this.open&&this._syncOpenState()}updated(t){if(this._syncRichActionButtonSizes(),t.has("trigger")&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),t.has("delay")&&this._updateDelayCss(),t.has("maxWidth")&&this._updateMaxWidthCss(),(t.has("supportingtext")||t.has("label")||t.has("variant"))&&(this._hasTooltipContent()||(this._hoverActive=!1,this._clickActive=!1,this.open=!1),this._updateTriggerElement(),this._updateTooltipHoverListeners()),t.has("open")){if(this.open&&!this._hasTooltipContent()){this.open=!1;return}this._syncOpenState(),this._dispatchOpenChanged()}}connectedCallback(){super.connectedCallback(),this.hasUpdated&&(this._updateTriggerElement(),this._updateTooltipHoverListeners(),this.open&&this._syncOpenState())}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners(),this._triggerEl&&this._removeTriggerDescription(this._triggerEl);const t=this._getTooltipElement();t&&(t.removeEventListener("mouseenter",this._onTooltipMouseEnter),t.removeEventListener("mouseleave",this._onTooltipMouseLeave),m(t)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null),this._detachPositionListeners(),this._detachDismissListeners()}_getTooltipElement(){return this.renderRoot.querySelector(".scb-tooltip")}_syncOpenState(){const t=this._getTooltipElement();t&&(this.open?this._showTooltip(t):this._hideTooltip(t))}_setOpenState(t){if(this.open===t){t&&this._syncOpenState();return}this.open=t}_getSupportingText(){return(this.supportingtext??"").replace(/<br\s*\/?>/gi,`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../scb-button/scb-button.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/preload-helper.js","../../vendor/component-defaults.js","../../vendor/aria-references.internal.js","../../vendor/decorate.js","../../vendor/assertClassBrand.js","../../vendor/classPrivateMethodInitSpec.js"])))=>i.map(i=>d[i]);
2
+ import{g as C,h as q,m as H,p as c,v as d,y as N}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{t as I}from"../../vendor/preload-helper.js";import{t as K}from"../../vendor/component-size-token.js";import{t as p}from"../../vendor/decorate.js";import{a as j,t as m}from"../../vendor/manual-popover.js";(function(){try{var f=typeof globalThis<"u"?globalThis:window;if(!f.__scb_ce_guard_installed__){f.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,e,o){try{customElements.get(i)||t(i,e,o)}catch(h){var n=String(h||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var T,V=0,x="data-scb-tooltip-managed-action-size",l=(T=class extends q{constructor(...t){super(...t),this.variant="plain",this.arrow=null,this.supportingtext="",this.label="",this.trigger="hover",this.position="top",this.open=!1,this.delay=.25,this.offset=0,this.maxWidth="300px",this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition="top",this._tooltipId=`scb-tooltip-${++V}`,this._buttonDepsLoaded=!1,this._listeningForPositionChanges=!1,this._listeningForDismiss=!1,this._onWindowReposition=()=>{if(!this.open)return;const i=this._getTooltipElement(),e=this._triggerEl;!i||!e||this._positionTooltip(i,e)},this._onDocumentKeyDown=i=>{i.key!=="Escape"||!this.open||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1))},this._onDocumentPointerDown=i=>{this.open&&(i.composedPath().includes(this)||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1)))},this._ensureButtonDepsIfNeeded=()=>{this._syncRichActionButtonSizes(),!this._buttonDepsLoaded&&this.querySelector('[slot="scb-tooltip-button"]')&&(this._buttonDepsLoaded=!0,I(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url))},this._onTriggerMouseEnter=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerFocus=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerKeyDown=i=>{i.key==="Tab"&&(this._hoverActive=!1,this._clickActive=!1,this._setOpenState(!1),m(this._getTooltipElement()))},this._onTooltipMouseEnter=()=>{this._hasTooltipContent()&&(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTooltipMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!1,this._clickActive||this._setOpenState(!1))},this._onTriggerClick=()=>{this._hasTooltipContent()&&(this._clickActive=!this._clickActive,this._clickActive?this._setOpenState(!0):this._hoverActive||this._setOpenState(!1))}}_syncRichActionButtonSizes(){const t=K(this,"--scb-tooltip-design-rich-action-button-size-medium",["small","medium","large"],"medium"),i=this.querySelectorAll(':scope > scb-button[slot="scb-tooltip-button"]');for(const e of i){const o=e.getAttribute(x);if(o!==null&&e.getAttribute("size")!==o){e.removeAttribute(x);continue}(!e.hasAttribute("size")||o!==null)&&(e.setAttribute("size",t),e.setAttribute(x,t))}}firstUpdated(){this._originalPosition=this.position,this._updateDelayCss(),this._updateMaxWidthCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this._ensureButtonDepsIfNeeded(),this.open&&this._syncOpenState()}updated(t){if(this._syncRichActionButtonSizes(),t.has("trigger")&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),t.has("delay")&&this._updateDelayCss(),t.has("maxWidth")&&this._updateMaxWidthCss(),(t.has("supportingtext")||t.has("label")||t.has("variant"))&&(this._hasTooltipContent()||(this._hoverActive=!1,this._clickActive=!1,this.open=!1),this._updateTriggerElement(),this._updateTooltipHoverListeners()),t.has("open")){if(this.open&&!this._hasTooltipContent()){this.open=!1;return}this._syncOpenState(),this._dispatchOpenChanged()}}connectedCallback(){super.connectedCallback(),this.hasUpdated&&(this._updateTriggerElement(),this._updateTooltipHoverListeners(),this.open&&this._syncOpenState())}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners(),this._triggerEl&&this._removeTriggerDescription(this._triggerEl);const t=this._getTooltipElement();t&&(t.removeEventListener("mouseenter",this._onTooltipMouseEnter),t.removeEventListener("mouseleave",this._onTooltipMouseLeave),m(t)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null),this._detachPositionListeners(),this._detachDismissListeners()}_getTooltipElement(){return this.renderRoot.querySelector(".scb-tooltip")}_syncOpenState(){const t=this._getTooltipElement();t&&(this.open?this._showTooltip(t):this._hideTooltip(t))}_setOpenState(t){if(this.open===t){t&&this._syncOpenState();return}this.open=t}_getSupportingText(){return(this.supportingtext??"").replace(/<br\s*\/?>/gi,`
3
3
  `)}_hasTooltipContent(){const t=this._getSupportingText().trim();return this.variant==="rich"?!!((this.label||"").trim()||t):!!t}_updateDelayCss(){const t=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty("--delay",`${t}s`)}_updateMaxWidthCss(){const t=(this.maxWidth||"").trim(),i=t.toLowerCase()==="none",e=i?"none":t||"300px";this.style.setProperty("--max-width",e),this.style.setProperty("--wrap",i?"nowrap":"normal")}_dispatchOpenChanged(){const t={open:this.open};this.dispatchEvent(new CustomEvent("open-changed",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("openchanged",{detail:t,bubbles:!0,composed:!0}))}_findTriggerElement(){const t=this.querySelector("[scb-tooltip-anchor]:not([slot])");return t||(Array.from(this.children).find(i=>i!==this._triggerDescription)??null)}_updateTriggerElement(){const t=this._triggerEl;t&&(this._detachTriggerListeners(),this._removeTriggerDescription(t));const i=this._findTriggerElement();this._triggerEl=i,i&&this._hasTooltipContent()&&(this._setTriggerDescription(i),i.addEventListener("keydown",this._onTriggerKeyDown),(this.trigger==="click"||this.trigger==="hover-click")&&i.addEventListener("click",this._onTriggerClick),(this.trigger==="hover"||this.trigger==="hover-click")&&(i.addEventListener("mouseenter",this._onTriggerMouseEnter),i.addEventListener("mouseleave",this._onTriggerMouseLeave),i.addEventListener("focus",this._onTriggerFocus),i.addEventListener("blur",this._onTriggerBlur)))}_setTriggerDescription(t){if(!this._triggerDescription){const o=this.ownerDocument.createElement("span");o.id=`${this._tooltipId}-description`,o.hidden=!0,this._triggerDescription=o}const i=this._triggerDescription;i.textContent=[this.variant==="rich"?this.label:"",this._getSupportingText()].join(" ").replace(/\s+/g," ").trim(),i.parentNode!==this&&this.append(i);const e=t.getAttribute("aria-describedby")?.match(/\S+/g)??[];t.setAttribute("aria-describedby",[...new Set([...e,i.id])].join(" "))}_removeTriggerDescription(t){const i=this._triggerDescription;if(!i)return;const e=t.getAttribute("aria-describedby")?.match(/\S+/g)??[];if(!e.includes(i.id))return;const o=e.filter(n=>n!==i.id);o.length?t.setAttribute("aria-describedby",o.join(" ")):t.removeAttribute("aria-describedby")}_updateTooltipHoverListeners(){const t=this._getTooltipElement();t&&(t.removeEventListener("mouseenter",this._onTooltipMouseEnter),t.removeEventListener("mouseleave",this._onTooltipMouseLeave),(this.trigger==="hover"||this.trigger==="hover-click")&&(t.addEventListener("mouseenter",this._onTooltipMouseEnter),t.addEventListener("mouseleave",this._onTooltipMouseLeave)))}_detachTriggerListeners(){const t=this._triggerEl;t&&(t.removeEventListener("click",this._onTriggerClick),t.removeEventListener("keydown",this._onTriggerKeyDown),t.removeEventListener("mouseenter",this._onTriggerMouseEnter),t.removeEventListener("mouseleave",this._onTriggerMouseLeave),t.removeEventListener("focus",this._onTriggerFocus),t.removeEventListener("blur",this._onTriggerBlur))}_showTooltip(t){if(!this._hasTooltipContent()){this.open=!1;return}this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);const i=this._triggerEl;this._resetPosition(),t.classList.remove("hidden"),t.setAttribute("aria-hidden","false"),j(t,i),this._attachPositionListeners(),this._attachDismissListeners(),requestAnimationFrame(()=>{i&&this._positionTooltip(t,i),t.setAttribute("open","")})}_hideTooltip(t){t.removeAttribute("open"),t.setAttribute("aria-hidden","true"),this._detachPositionListeners(),this._detachDismissListeners(),this._scheduleHidden(t)}_attachPositionListeners(){this._listeningForPositionChanges||(this._listeningForPositionChanges=!0,window.addEventListener("resize",this._onWindowReposition,{passive:!0}),window.addEventListener("scroll",this._onWindowReposition,{passive:!0,capture:!0}))}_detachPositionListeners(){this._listeningForPositionChanges&&(this._listeningForPositionChanges=!1,window.removeEventListener("resize",this._onWindowReposition),window.removeEventListener("scroll",this._onWindowReposition,!0))}_attachDismissListeners(){this._listeningForDismiss||(this._listeningForDismiss=!0,document.addEventListener("keydown",this._onDocumentKeyDown),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0))}_detachDismissListeners(){this._listeningForDismiss&&(this._listeningForDismiss=!1,document.removeEventListener("keydown",this._onDocumentKeyDown),document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0))}_scheduleHidden(t){const i=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(i<=0){t.classList.add("hidden"),m(t);return}this._hideTimeout=window.setTimeout(()=>{t.classList.add("hidden"),m(t),this._hideTimeout=null},i)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(t,i){const e=i.getBoundingClientRect(),o=t.getBoundingClientRect(),n=(this.offset??0)+8,h=8,g=h,_=window.innerHeight-h,y=h,w=window.innerWidth-h,z=s=>s>=g&&s+o.height<=_,O=s=>s>=y&&s+o.width<=w,k=(s,r,a,b)=>{let u=0;s<a&&(u+=a-s);const A=s+r;return A>b&&(u+=A-b),u},P=s=>{let r=0,a=0;switch(s){case"top":r=e.top-o.height-n,a=e.left-(o.width-e.width)/2;break;case"bottom":r=e.bottom+n,a=e.left-(o.width-e.width)/2;break;case"left":a=e.left-o.width-n,r=e.top-(o.height-e.height)/2;break;case"right":a=e.right+n,r=e.top-(o.height-e.height)/2;break}const b=k(r,o.height,g,_),u=k(a,o.width,y,w);return{pos:s,top:r,left:a,fitsV:z(r),fitsH:O(a),totalOverflow:b+u}},E=this.position==="top"||this.position==="bottom",L=this.position,S=[L,this._getOppositePosition(L),E?"left":"top",E?"right":"bottom"].map(P);let v=S.find(s=>s.fitsV&&s.fitsH)??S.reduce((s,r)=>r.totalOverflow<s.totalOverflow?r:s);const D=(s,r,a)=>Math.min(Math.max(s,r),a),M=g,$=_-o.height,B=y,F=w-o.width,W=D(v.top,M,$),R=D(v.left,B,F);t.style.top=`${W}px`,t.style.left=`${R}px`,this.position!==v.pos&&(this.position=v.pos)}_getOppositePosition(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}_onDefaultSlotChange(){this._updateTriggerElement(),this.open&&this._syncOpenState()}render(){const t=this._hasTooltipContent(),i=this.arrow?d`<svg
4
4
  class="scb-tooltip-arrow"
5
5
  xmlns="http://www.w3.org/2000/svg"
@@ -1 +1 @@
1
- (function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(e,i,n){try{customElements.get(e)||o(e,i,n)}catch(c){var r=String(c||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();function u(t,o,e,i){const n=getComputedStyle(t).getPropertyValue(o).trim();return e.includes(n)?n:i}export{u as componentSizeToken};
1
+ (function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(e,i,n){try{customElements.get(e)||o(e,i,n)}catch(c){var r=String(c||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();function u(t,o,e,i){const n=getComputedStyle(t).getPropertyValue(o).trim();return e.includes(n)?n:i}export{u as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./md-focus-ring.js","./rolldown-runtime.js","./vendor.js","./vendor-lit.js","./attachable-controller.js"])))=>i.map(i=>d[i]);
2
+ import{t as f}from"./rolldown-runtime.js";import{t as _}from"./preload-helper.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var n=customElements.define.bind(customElements);customElements.define=function(s,t,d){try{customElements.get(s)||n(s,t,d)}catch(i){var r=String(i||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var v=f({addLazyFocusRingListeners:()=>l,ensureFocusRingOnFocusVisible:()=>c,ensureFocusRingOnTab:()=>u,ensureFocusRingReady:()=>o}),a,o=()=>{customElements.get("md-focus-ring")||(a??(a=_(()=>import("./md-focus-ring.js").then(e=>e.t).then(()=>{}),__vite__mapDeps([0,1,2,3,4]),import.meta.url)))},c=e=>{const n=e.composedPath()[0];n instanceof HTMLElement&&n.matches(":focus-visible")&&o()},u=e=>{e.key==="Tab"&&o()},l=(...e)=>{const n=c,s=u;for(const t of e)t.addEventListener("focusin",n),t.addEventListener("keydown",s);return()=>{for(const t of e)t.removeEventListener("focusin",n),t.removeEventListener("keydown",s)}};export{v as i,c as n,o as r,l as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ripple.js","./rolldown-runtime.js","./vendor.js","./vendor-lit.js","./attachable-controller.js"])))=>i.map(i=>d[i]);
2
+ import{t as s}from"./preload-helper.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(t,n,d){try{customElements.get(t)||r(t,n,d)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var i,l=()=>(i??(i=s(()=>import("./ripple.js").then(e=>e.t).then(()=>{}),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),i),f=async(e,r,t,n=!1)=>{!e||!r||(e.control=r,r.matches(":hover")&&(e.hovered=!0),t?.type==="pointerenter"?e.handlePointerenter?.(t):t?.type==="pointerdown"&&await e.handlePointerdown?.(t),n&&e.handleClick?.())};export{l as ensureRippleReady,f as syncRippleToControl};
@@ -1 +1 @@
1
- (function(){try{var o=typeof globalThis<"u"?globalThis:window;if(!o.__scb_ce_guard_installed__){o.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,e,s){try{customElements.get(r)||t(r,e,s)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var c=new WeakMap;function p(o){const t=(c.get(o)??0)+1;return c.set(o,t),t}function d(o){const t=getComputedStyle(o),r=n=>n.endsWith("ms")?Number.parseFloat(n):Number.parseFloat(n)*1e3,e=t.transitionDuration.split(",").map(n=>r(n.trim())),s=t.transitionDelay.split(",").map(n=>r(n.trim()));return e.reduce((n,i,a)=>{const f=s[a%s.length]??0;return Math.max(n,i+f)},0)}var l=["scb-datepicker","scb-dialog","scb-drawer","scb-dropdown","scb-options-menu","scb-options-sub-menu","scb-overlay","scb-search","scb-select","scb-tooltip"].join(",");function v(o,t,r="manual"){if(!o)return!1;p(o);const e=o;if(typeof e.showPopover!="function")return!1;if(o.setAttribute("popover",r),!o.matches(":popover-open"))try{e.showPopover(t?{source:t}:void 0)}catch{return!1}return o.matches(":popover-open")}function u(o){if(!o)return;p(o);const t=o;if(typeof t.hidePopover=="function"&&o.matches(":popover-open"))try{t.hidePopover()}catch{}o.removeAttribute("popover")}function m(o,t,r){if(!o)return;const e=p(o);requestAnimationFrame(async()=>{const s=r??o,n=d(s),i=s.getAnimations().filter(a=>a.playState!=="finished");i.length>0?await Promise.allSettled(i.map(a=>a.finished)):n>0&&await new Promise(a=>setTimeout(a,n)),c.get(o)===e&&(u(o),t?.())})}function h(o){return!!o?.matches(":popover-open")}function b(o){const t=r=>{for(const e of r.querySelectorAll("*"))e.shadowRoot&&t(e.shadowRoot),e.matches("[popover]")&&h(e)&&u(e),e.matches(l)&&"open"in e&&e.open&&(e.open=!1)};t(o)}export{u as closeManualPopover,m as closeManualPopoverAfterAnimations,b as closeNestedPopupSurfaces,h as isManualPopoverOpen,v as openManualPopover};
1
+ (function(){try{var o=typeof globalThis<"u"?globalThis:window;if(!o.__scb_ce_guard_installed__){o.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,e,s){try{customElements.get(r)||t(r,e,s)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var c=new WeakMap;function p(o){const t=(c.get(o)??0)+1;return c.set(o,t),t}function d(o){const t=getComputedStyle(o),r=n=>n.endsWith("ms")?Number.parseFloat(n):Number.parseFloat(n)*1e3,e=t.transitionDuration.split(",").map(n=>r(n.trim())),s=t.transitionDelay.split(",").map(n=>r(n.trim()));return e.reduce((n,i,a)=>{const f=s[a%s.length]??0;return Math.max(n,i+f)},0)}var l=["scb-datepicker","scb-dialog","scb-drawer","scb-dropdown","scb-options-menu","scb-options-sub-menu","scb-overlay","scb-search","scb-select","scb-tooltip"].join(",");function v(o,t,r="manual"){if(!o)return!1;p(o);const e=o;if(typeof e.showPopover!="function")return!1;if(o.setAttribute("popover",r),!o.matches(":popover-open"))try{e.showPopover(t?{source:t}:void 0)}catch{return!1}return o.matches(":popover-open")}function u(o){if(!o)return;p(o);const t=o;if(typeof t.hidePopover=="function"&&o.matches(":popover-open"))try{t.hidePopover()}catch{}o.removeAttribute("popover")}function m(o,t,r){if(!o)return;const e=p(o);requestAnimationFrame(async()=>{const s=r??o,n=d(s),i=s.getAnimations().filter(a=>a.playState!=="finished");i.length>0?await Promise.allSettled(i.map(a=>a.finished)):n>0&&await new Promise(a=>setTimeout(a,n)),c.get(o)===e&&(u(o),t?.())})}function h(o){return!!o?.matches(":popover-open")}function b(o){const t=r=>{for(const e of r.querySelectorAll("*"))e.shadowRoot&&t(e.shadowRoot),e.matches("[popover]")&&h(e)&&u(e),e.matches(l)&&"open"in e&&e.open&&(e.open=!1)};t(o)}export{v as a,h as i,m as n,b as r,u as t};
@@ -1,4 +1,4 @@
1
- import{h,m as v,p as d,v as p,y as f}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as c}from"../../vendor/decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return p`
1
+ import{h,m as v,p as d,v as p,y as f}from"./vendor.js";import"./vendor-lit.js";import{t as c}from"./decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return p`
2
2
  <svg
3
3
  class="chevron-icon"
4
4
  viewBox="0 0 24 24"
@@ -0,0 +1,11 @@
1
+ import{_ as l,g as o}from"./vendor.js";import"./vendor-lit.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var h=customElements.define.bind(customElements);customElements.define=function(e,t,v){try{customElements.get(e)||h(e,t,v)}catch(r){var n=String(r||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var c=new Map([["arrow_forward","M12 4l-1.41 1.41L15.17 10H4v2h11.17l-4.58 4.59L12 18l8-8-8-8Z"],["chevron_left","M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59Z"],["chevron_right","M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12l-4.58 4.59Z"],["close","M18.3 5.71 16.89 4.3 12 9.17 7.11 4.3 5.7 5.71 10.59 10.6 5.7 15.49 7.11 16.9 12 12.01l4.89 4.89 1.41-1.41-4.89-4.89 4.89-4.89Z"],["menu","M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z"],["open_in_new","M14 3h7v7h-2V6.41l-9.83 9.83-1.41-1.41L17.59 5H14V3ZM5 5h6v2H7v10h10v-4h2v6H5V5Z"],["payments","M3 6h18v12H3V6Zm2 2v8h14V8H5Zm7 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM7 9h2v2H7V9Zm8 4h2v2h-2v-2Z"],["person_4","M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 8c0-3.31 3.58-6 8-6s8 2.69 8 6v1H4v-1Z"],["price_change","M12 2 3 6v6c0 5 3.84 9.74 9 10 5.16-.26 9-5 9-10V6l-9-4Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Zm-7 6.5V15h2v2.6a9.1 9.1 0 0 1-2-3.1Zm12-1.9V15h2a9.1 9.1 0 0 1-2 3.1Z"],["search","M9.5 3a6.5 6.5 0 0 1 5.17 10.44l5.45 5.44-1.42 1.42-5.44-5.45A6.5 6.5 0 1 1 9.5 3Zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"],["trending_up","M16 6h5v5h-2V9.41l-6.17 6.17-4-4L3.41 17 2 15.59l6.83-6.83 4 4L17.59 8H16V6Z"],["volume_up","M3 9v6h4l5 5V4L7 9H3Zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.06A4.5 4.5 0 0 0 16.5 12Zm-2.5-8.7v2.06A7 7 0 0 1 18 12a7 7 0 0 1-4 6.64v2.06A9 9 0 0 0 20 12a9 9 0 0 0-6-8.7Z"],["work","M10 4h4a2 2 0 0 1 2 2v2h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h4V6a2 2 0 0 1 2-2Zm0 4h4V6h-4v2Zm-6 2v8h16v-8H4Zm6 3h4v2h-4v-2Z"]]);function m(a,h="material-icon",e){const t=(a||"").trim(),v=c.get(t);return v?l`
2
+ <svg
3
+ class=${`${h} scb-svg-icon`}
4
+ part=${e||o}
5
+ aria-hidden="true"
6
+ viewBox="0 0 24 24"
7
+ focusable="false"
8
+ >
9
+ <path d=${v}></path>
10
+ </svg>
11
+ `:o}export{m as t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc",
3
- "version": "0.1.243",
3
+ "version": "0.1.245",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -506,16 +506,6 @@
506
506
  "import": "./scb-table-advanced/scb-table-advanced.js",
507
507
  "require": "./scb-table-advanced/scb-table-advanced.js"
508
508
  },
509
- "./scb-table-next": {
510
- "types": "./scb-components/scb-table-next/scb-table-next.d.ts",
511
- "import": "./scb-table-next/scb-table-next.js",
512
- "require": "./scb-table-next/scb-table-next.js"
513
- },
514
- "./scb-table-next/read-table": {
515
- "types": "./scb-components/scb-table-next/read-table.d.ts",
516
- "import": "./scb-table-next/read-table.js",
517
- "require": "./scb-table-next/read-table.js"
518
- },
519
509
  "./scb-tabs": {
520
510
  "types": "./scb-components/scb-tabs/scb-tabs.d.ts",
521
511
  "import": "./scb-tabs/scb-tabs.js",
@@ -559,5 +549,5 @@
559
549
  "./scb-viz/*": null,
560
550
  "./mvc/*": "./mvc/*"
561
551
  },
562
- "buildHash": "5C71B8C4583A3B9A5FC4ABE17F6A1AE9A012B7810A51C1B3E911D6F7E5B8D19A"
552
+ "buildHash": "8D77066396BDE55AE41FC64F74FB9BFDE909C7F57095685A5631F008DB81F603"
563
553
  }
@@ -1,11 +1,20 @@
1
1
  import { componentDefaults as e } from "../component-defaults.js";
2
- import t from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
3
- import { LitElement as n, css as r, html as i, nothing as a } from "lit";
4
- import { customElement as o, property as s, state as c } from "lit/decorators.js";
2
+ import { forwardAriaReferences as t } from "../shared/aria-references.internal.js";
3
+ import n from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
4
+ import { LitElement as r, css as i, html as a, nothing as o } from "lit";
5
+ import { customElement as s, property as c, state as l } from "lit/decorators.js";
5
6
  //#region src/scb-components/scb-avatar/scb-avatar.ts
6
- var l = class extends n {
7
+ var u = [
8
+ "aria-label",
9
+ "aria-labelledby",
10
+ "aria-describedby",
11
+ "aria-controls",
12
+ "aria-expanded",
13
+ "aria-haspopup",
14
+ "aria-disabled"
15
+ ], d = class extends r {
7
16
  constructor(...t) {
8
- super(...t), this.src = "", this.alt = "", this.label = "", this.size = e["scb-avatar"].size, this.shape = "circular", this.iconName = "", this.variant = "image", this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this._imgError = !1, this._hasIconSlot = !1, this._onImgLoad = () => {
17
+ super(...t), this.src = "", this.alt = "", this.label = "", this.size = e["scb-avatar"].size, this.shape = "circular", this.iconName = "", this.variant = "image", this.interactive = !1, this.disabled = !1, this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this._imgError = !1, this._hasIconSlot = !1, this._onImgLoad = () => {
9
18
  this._imgError = !1, this.dispatchEvent(new CustomEvent("image-load", {
10
19
  bubbles: !0,
11
20
  composed: !0
@@ -21,7 +30,7 @@ var l = class extends n {
21
30
  };
22
31
  }
23
32
  static {
24
- this.styles = r`
33
+ this.styles = i`
25
34
  :host {
26
35
  display: inline-block;
27
36
  vertical-align: middle;
@@ -108,6 +117,40 @@ var l = class extends n {
108
117
  place-items: center;
109
118
  }
110
119
 
120
+ button.container {
121
+ appearance: none;
122
+ padding: 0;
123
+ font: inherit;
124
+ color: var(--_fg);
125
+ background: none;
126
+ cursor: pointer;
127
+ touch-action: manipulation;
128
+ }
129
+
130
+ button.container::after {
131
+ content: '';
132
+ position: absolute;
133
+ inset: 0;
134
+ border-radius: inherit;
135
+ background: currentColor;
136
+ opacity: 0;
137
+ pointer-events: none;
138
+ transition: opacity var(--motion-duration-short, 150ms) var(--motion-easing-standard, ease);
139
+ }
140
+
141
+ button.container:not(:disabled):hover::after {
142
+ opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
143
+ }
144
+
145
+ button.container:not(:disabled):active::after {
146
+ opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.12);
147
+ }
148
+
149
+ button.container:disabled {
150
+ cursor: default;
151
+ opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
152
+ }
153
+
111
154
  :host([variant="image"]) .container { background: none; }
112
155
  :host([variant="image"]) img.photo {
113
156
  width: 100%;
@@ -160,7 +203,8 @@ var l = class extends n {
160
203
  line-height: 1;
161
204
  }
162
205
 
163
- :host(:focus-visible) .container {
206
+ :host(:focus-visible) .container,
207
+ button.container:focus-visible {
164
208
  outline: var(--md-focus-ring-width, 2px) solid var(--md-focus-ring-color, var(--p-40));
165
209
  outline-offset: 2px;
166
210
  border-radius: var(--_radius);
@@ -247,8 +291,24 @@ var l = class extends n {
247
291
  async firstUpdated() {
248
292
  this.variant === "icon" && await import("@material/web/icon/icon.js"), this.#e();
249
293
  }
294
+ static get observedAttributes() {
295
+ return [...super.observedAttributes, ...u];
296
+ }
297
+ attributeChangedCallback(e, t, n) {
298
+ super.attributeChangedCallback(e, t, n), u.includes(e) && this.requestUpdate();
299
+ }
300
+ focus(e) {
301
+ if (!this.interactive) {
302
+ super.focus(e);
303
+ return;
304
+ }
305
+ let t = this.renderRoot.querySelector("button");
306
+ t ? t.focus(e) : this.updateComplete.then(() => this.renderRoot.querySelector("button")?.focus(e));
307
+ }
250
308
  updated(e) {
251
- super.updated(e), e.has("variant") && this.variant === "icon" && import("@material/web/icon/icon.js"), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.#e();
309
+ super.updated(e);
310
+ let n = this.renderRoot.querySelector("button");
311
+ n && (t(this, n), n.ariaLabelledByElements = this.ariaLabelledByElements), e.has("variant") && this.variant === "icon" && import("@material/web/icon/icon.js"), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.#e();
252
312
  }
253
313
  _initials() {
254
314
  let e = (this.label || this.alt || "").trim();
@@ -269,59 +329,76 @@ var l = class extends n {
269
329
  t ? this.style.setProperty("--scb-avatar-spacing-block-start", t) : this.style.removeProperty("--scb-avatar-spacing-block-start"), n ? this.style.setProperty("--scb-avatar-spacing-block-end", n) : this.style.removeProperty("--scb-avatar-spacing-block-end"), r ? this.style.setProperty("--scb-avatar-spacing-inline-start", r) : this.style.removeProperty("--scb-avatar-spacing-inline-start"), i ? this.style.setProperty("--scb-avatar-spacing-inline-end", i) : this.style.removeProperty("--scb-avatar-spacing-inline-end");
270
330
  }
271
331
  render() {
272
- let e = this._ariaLabel(), t = this.variant === "image" && !!this.src && !this._imgError, n = i`${a}
332
+ let e = this._ariaLabel(), t = this.variant === "image" && !!this.src && !this._imgError, n = a`${o}
273
333
  <slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
274
- ${this._hasIconSlot ? a : this.iconName ? i`<md-icon aria-hidden="true">${this.iconName}</md-icon>` : i`<div class="fallback" part="fallback">${this._initials()}</div>`}
275
- `, r = t ? i`<img
334
+ ${this._hasIconSlot ? o : this.iconName ? a`<md-icon aria-hidden="true">${this.iconName}</md-icon>` : a`<div class="fallback" part="fallback">${this._initials()}</div>`}
335
+ `, r = t ? a`<img
276
336
  class="photo"
277
337
  part="image"
278
338
  src=${this.src}
279
339
  alt=${this.alt}
280
340
  @load=${this._onImgLoad}
281
341
  @error=${this._onImgError}
282
- />` : i`
342
+ />` : a`
283
343
  <slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
284
- ${this._hasIconSlot ? a : this.iconName ? i`<md-icon aria-hidden="true">${this.iconName}</md-icon>` : i`<div class="fallback" part="fallback">${this._initials()}</div>`}
285
- `;
286
- return i`
287
- <div class="container" part="container" role="img" aria-label=${e ?? a}>
288
- ${this.variant === "icon" ? n : r}
344
+ ${this._hasIconSlot ? o : this.iconName ? a`<md-icon aria-hidden="true">${this.iconName}</md-icon>` : a`<div class="fallback" part="fallback">${this._initials()}</div>`}
345
+ `, i = this.variant === "icon" ? n : r;
346
+ return this.interactive ? a`
347
+ <button
348
+ class="container"
349
+ part="container"
350
+ type="button"
351
+ ?disabled=${this.disabled || this.getAttribute("aria-disabled") === "true"}
352
+ aria-label=${this.getAttribute("aria-label") || e || o}
353
+ aria-expanded=${this.getAttribute("aria-expanded") ?? o}
354
+ aria-haspopup=${this.getAttribute("aria-haspopup") ?? o}
355
+ aria-disabled=${this.getAttribute("aria-disabled") ?? o}
356
+ >${i}</button>
357
+ ` : a`
358
+ <div class="container" part="container" role="img" aria-label=${e ?? o}>
359
+ ${i}
289
360
  </div>
290
361
  `;
291
362
  }
292
363
  };
293
- t([s({ type: String })], l.prototype, "src", void 0), t([s({ type: String })], l.prototype, "alt", void 0), t([s({ type: String })], l.prototype, "label", void 0), t([s({
364
+ n([c({ type: String })], d.prototype, "src", void 0), n([c({ type: String })], d.prototype, "alt", void 0), n([c({ type: String })], d.prototype, "label", void 0), n([c({
294
365
  type: String,
295
366
  reflect: !0
296
- })], l.prototype, "size", void 0), t([s({
367
+ })], d.prototype, "size", void 0), n([c({
297
368
  type: String,
298
369
  reflect: !0
299
- })], l.prototype, "shape", void 0), t([s({
370
+ })], d.prototype, "shape", void 0), n([c({
300
371
  type: String,
301
372
  attribute: "icon-name",
302
373
  reflect: !0
303
- })], l.prototype, "iconName", void 0), t([s({
374
+ })], d.prototype, "iconName", void 0), n([c({
304
375
  type: String,
305
376
  reflect: !0
306
- })], l.prototype, "variant", void 0), t([s({
377
+ })], d.prototype, "variant", void 0), n([c({
378
+ type: Boolean,
379
+ reflect: !0
380
+ })], d.prototype, "interactive", void 0), n([c({
381
+ type: Boolean,
382
+ reflect: !0
383
+ })], d.prototype, "disabled", void 0), n([c({
307
384
  type: String,
308
385
  reflect: !0
309
- })], l.prototype, "spacing", void 0), t([s({
386
+ })], d.prototype, "spacing", void 0), n([c({
310
387
  type: String,
311
388
  attribute: "spacing-top",
312
389
  reflect: !0
313
- })], l.prototype, "spacingTop", void 0), t([s({
390
+ })], d.prototype, "spacingTop", void 0), n([c({
314
391
  type: String,
315
392
  attribute: "spacing-bottom",
316
393
  reflect: !0
317
- })], l.prototype, "spacingBottom", void 0), t([s({
394
+ })], d.prototype, "spacingBottom", void 0), n([c({
318
395
  type: String,
319
396
  attribute: "spacing-left",
320
397
  reflect: !0
321
- })], l.prototype, "spacingLeft", void 0), t([s({
398
+ })], d.prototype, "spacingLeft", void 0), n([c({
322
399
  type: String,
323
400
  attribute: "spacing-right",
324
401
  reflect: !0
325
- })], l.prototype, "spacingRight", void 0), t([c()], l.prototype, "_imgError", void 0), t([c()], l.prototype, "_hasIconSlot", void 0), l = t([o("scb-avatar")], l);
402
+ })], d.prototype, "spacingRight", void 0), n([l()], d.prototype, "_imgError", void 0), n([l()], d.prototype, "_hasIconSlot", void 0), d = n([s("scb-avatar")], d);
326
403
  //#endregion
327
- export { l as ScbAvatar };
404
+ export { d as ScbAvatar };
@@ -1,6 +1,6 @@
1
1
  import { componentDefaults as e } from "../component-defaults.js";
2
- import t from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
3
- import { forwardAriaReferences as n } from "../shared/aria-references.internal.js";
2
+ import { forwardAriaReferences as t } from "../shared/aria-references.internal.js";
3
+ import n from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
4
4
  import { LitElement as r, css as i, html as a, nothing as o } from "lit";
5
5
  import { customElement as s, property as c } from "lit/decorators.js";
6
6
  //#region src/scb-components/scb-button/scb-button.ts
@@ -54,20 +54,20 @@ var p = class extends r {
54
54
  e && this.__syncAriaToControl(e);
55
55
  }
56
56
  __syncAriaToControl(e) {
57
- let t = (this.getAttribute("aria-label") || "").trim(), r = this.label.trim() === "" && !this.__hasDefaultSlotContent ? (this.icon || "").trim() : "", i = t || r;
58
- i ? e.setAttribute("aria-label", i) : e.removeAttribute("aria-label"), n(this, e);
57
+ let n = (this.getAttribute("aria-label") || "").trim(), r = this.label.trim() === "" && !this.__hasDefaultSlotContent ? (this.icon || "").trim() : "", i = n || r;
58
+ i ? e.setAttribute("aria-label", i) : e.removeAttribute("aria-label"), t(this, e);
59
59
  let a = this.getAttribute("aria-haspopup");
60
60
  a === null ? e.removeAttribute("aria-haspopup") : e.setAttribute("aria-haspopup", a);
61
61
  let o = this.getAttribute("aria-expanded");
62
62
  o === null ? e.removeAttribute("aria-expanded") : e.setAttribute("aria-expanded", o), this.__ariaObserver?.disconnect(), this.__ariaObserver = new MutationObserver((e) => {
63
- let t = this.__getNativeControl();
64
- if (t) for (let r of e) {
63
+ let n = this.__getNativeControl();
64
+ if (n) for (let r of e) {
65
65
  if (r.type !== "attributes" || !r.attributeName) continue;
66
66
  let e = r.attributeName, i = this.getAttribute(e);
67
67
  if (e === "aria-label") {
68
68
  let e = (i || (this.label.trim() === "" && !this.__hasDefaultSlotContent ? (this.icon || "").trim() : "")).trim();
69
- e ? t.setAttribute("aria-label", e) : t.removeAttribute("aria-label");
70
- } else e === "aria-controls" || e === "aria-describedby" ? n(this, t) : (e === "aria-expanded" || e === "aria-haspopup") && (i === null ? t.removeAttribute(e) : t.setAttribute(e, i));
69
+ e ? n.setAttribute("aria-label", e) : n.removeAttribute("aria-label");
70
+ } else e === "aria-controls" || e === "aria-describedby" ? t(this, n) : (e === "aria-expanded" || e === "aria-haspopup") && (i === null ? n.removeAttribute(e) : n.setAttribute(e, i));
71
71
  }
72
72
  }), this.__ariaObserver.observe(this, {
73
73
  attributes: !0,
@@ -560,66 +560,66 @@ var p = class extends r {
560
560
  `;
561
561
  }
562
562
  };
563
- t([c({
563
+ n([c({
564
564
  type: String,
565
565
  reflect: !0
566
- })], p.prototype, "variant", void 0), t([c({
566
+ })], p.prototype, "variant", void 0), n([c({
567
567
  type: String,
568
568
  reflect: !0
569
- })], p.prototype, "size", void 0), t([c({
569
+ })], p.prototype, "size", void 0), n([c({
570
570
  type: String,
571
571
  reflect: !0
572
- })], p.prototype, "type", void 0), t([c({ type: String })], p.prototype, "name", void 0), t([c({ type: String })], p.prototype, "value", void 0), t([c({
572
+ })], p.prototype, "type", void 0), n([c({ type: String })], p.prototype, "name", void 0), n([c({ type: String })], p.prototype, "value", void 0), n([c({
573
573
  type: String,
574
574
  attribute: "form"
575
- })], p.prototype, "formId", void 0), t([c({
575
+ })], p.prototype, "formId", void 0), n([c({
576
576
  type: String,
577
577
  attribute: "formaction"
578
- })], p.prototype, "formAction", void 0), t([c({
578
+ })], p.prototype, "formAction", void 0), n([c({
579
579
  type: String,
580
580
  attribute: "formenctype"
581
- })], p.prototype, "formEnctype", void 0), t([c({
581
+ })], p.prototype, "formEnctype", void 0), n([c({
582
582
  type: String,
583
583
  attribute: "formmethod"
584
- })], p.prototype, "formMethod", void 0), t([c({
584
+ })], p.prototype, "formMethod", void 0), n([c({
585
585
  type: Boolean,
586
586
  attribute: "formnovalidate"
587
- })], p.prototype, "formNoValidate", void 0), t([c({
587
+ })], p.prototype, "formNoValidate", void 0), n([c({
588
588
  type: String,
589
589
  attribute: "formtarget"
590
- })], p.prototype, "formTarget", void 0), t([c({ type: String })], p.prototype, "label", void 0), t([c({
590
+ })], p.prototype, "formTarget", void 0), n([c({ type: String })], p.prototype, "label", void 0), n([c({
591
591
  type: Boolean,
592
592
  attribute: "trailing-icon"
593
- })], p.prototype, "trailingIcon", void 0), t([c({ type: String })], p.prototype, "icon", void 0), t([c({
593
+ })], p.prototype, "trailingIcon", void 0), n([c({ type: String })], p.prototype, "icon", void 0), n([c({
594
594
  type: Boolean,
595
595
  attribute: "icon-filled",
596
596
  reflect: !0
597
- })], p.prototype, "iconFilled", void 0), t([c({
597
+ })], p.prototype, "iconFilled", void 0), n([c({
598
598
  type: Boolean,
599
599
  reflect: !0
600
- })], p.prototype, "disabled", void 0), t([c({
600
+ })], p.prototype, "disabled", void 0), n([c({
601
601
  type: Boolean,
602
602
  attribute: "full-width",
603
603
  reflect: !0
604
- })], p.prototype, "fullWidth", void 0), t([c({ type: String })], p.prototype, "href", void 0), t([c({ type: String })], p.prototype, "target", void 0), t([c({ type: String })], p.prototype, "rel", void 0), t([c({
604
+ })], p.prototype, "fullWidth", void 0), n([c({ type: String })], p.prototype, "href", void 0), n([c({ type: String })], p.prototype, "target", void 0), n([c({ type: String })], p.prototype, "rel", void 0), n([c({
605
605
  type: String,
606
606
  reflect: !0
607
- })], p.prototype, "spacing", void 0), t([c({
607
+ })], p.prototype, "spacing", void 0), n([c({
608
608
  type: String,
609
609
  attribute: "spacing-top",
610
610
  reflect: !0
611
- })], p.prototype, "spacingTop", void 0), t([c({
611
+ })], p.prototype, "spacingTop", void 0), n([c({
612
612
  type: String,
613
613
  attribute: "spacing-bottom",
614
614
  reflect: !0
615
- })], p.prototype, "spacingBottom", void 0), t([c({
615
+ })], p.prototype, "spacingBottom", void 0), n([c({
616
616
  type: String,
617
617
  attribute: "spacing-left",
618
618
  reflect: !0
619
- })], p.prototype, "spacingLeft", void 0), t([c({
619
+ })], p.prototype, "spacingLeft", void 0), n([c({
620
620
  type: String,
621
621
  attribute: "spacing-right",
622
622
  reflect: !0
623
- })], p.prototype, "spacingRight", void 0), p = t([s("scb-button")], p);
623
+ })], p.prototype, "spacingRight", void 0), p = n([s("scb-button")], p);
624
624
  //#endregion
625
625
  export { p as ScbButton };
@@ -11,6 +11,8 @@ export declare class ScbAvatar extends LitElement {
11
11
  shape: AvatarShape;
12
12
  iconName: string;
13
13
  variant: AvatarVariant;
14
+ interactive: boolean;
15
+ disabled: boolean;
14
16
  spacing: undefined;
15
17
  spacingTop: undefined;
16
18
  spacingBottom: undefined;
@@ -23,6 +25,9 @@ export declare class ScbAvatar extends LitElement {
23
25
  private _onImgError;
24
26
  private _onIconSlotChange;
25
27
  protected firstUpdated(): Promise<void>;
28
+ static get observedAttributes(): string[];
29
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
30
+ focus(options?: FocusOptions): void;
26
31
  protected updated(changed: Map<string, unknown>): void;
27
32
  private _initials;
28
33
  private _ariaLabel;
@@ -29,7 +29,10 @@ export declare class ScbDropdown extends LitElement {
29
29
  private _panelSurfaceEl;
30
30
  private _panelInnerEl;
31
31
  private _slottedMenuEl;
32
- private _slottedTrigger;
32
+ private _slottedTriggers;
33
+ private _triggerControlEl?;
34
+ private _triggerObserver;
35
+ private _pendingTriggerDefinitions;
33
36
  private _openSettledTimer;
34
37
  private _menuCloseTimer;
35
38
  private _panelResizeObserver;
@@ -70,6 +73,8 @@ export declare class ScbDropdown extends LitElement {
70
73
  private _closeAllSubMenus;
71
74
  private _getSlottedTrigger;
72
75
  private get _triggerEl();
76
+ private _findTriggerControl;
77
+ private _restoreSlottedTrigger;
73
78
  private _syncSlottedTrigger;
74
79
  private _onTriggerSlotChange;
75
80
  focus(options?: FocusOptions): void;
@@ -293,7 +293,7 @@ var f, p = { fromAttribute(e) {
293
293
  async __focusFirstControl() {
294
294
  await this.updateComplete;
295
295
  for (let e = 0; e < 4; e += 1) {
296
- await new Promise((e) => requestAnimationFrame(() => e()));
296
+ if (await new Promise((e) => requestAnimationFrame(() => e())), !this.open || !this.isConnected) return;
297
297
  let e = this.__getFocusable()[0];
298
298
  if (e?.focus?.({ preventScroll: !0 }), e && this.__isFocused(e)) return;
299
299
  }
@@ -332,7 +332,9 @@ var f, p = { fromAttribute(e) {
332
332
  this.__syncLastTriggerExpanded(!1), this.floating && this.overlay && f.__hideOverlay(this), document.removeEventListener("keydown", this.__onDocumentKeydown, !0);
333
333
  let e = this.__lastTriggerEl;
334
334
  requestAnimationFrame(() => {
335
- this.open || e?.focus?.({ preventScroll: !0 });
335
+ if (this.open || !this.isConnected) return;
336
+ let t = this.getRootNode(), n = t instanceof ShadowRoot ? t.activeElement : this.ownerDocument.activeElement;
337
+ (!n || n === this.ownerDocument.body || n === e || this.contains(n)) && e?.focus?.({ preventScroll: !0 });
336
338
  }), this.dispatchEvent(new CustomEvent("scb-drawer-closed", {
337
339
  bubbles: !0,
338
340
  composed: !0