scb-wc 0.1.263 → 0.1.264

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 (88) hide show
  1. package/README.md +19 -16
  2. package/all.d.ts +16 -0
  3. package/all.js +16 -0
  4. package/index.js +101 -85
  5. package/mvc/components/all.js +11 -0
  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 +1 -1
  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/{vendor → components/scb-chevron}/scb-chevron.js +1 -1
  15. package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +1 -1
  16. package/mvc/components/scb-datepicker/scb-datepicker.js +143 -0
  17. package/mvc/components/scb-dialog/scb-dialog.js +1 -1
  18. package/mvc/components/scb-drawer/scb-drawer.js +3 -3
  19. package/mvc/components/scb-drop-zone/scb-drop-zone.js +1 -1
  20. package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
  21. package/mvc/components/scb-fact-card/scb-fact-card.js +1 -1
  22. package/mvc/components/scb-header/scb-header.js +2 -2
  23. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
  24. package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
  25. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
  26. package/mvc/components/scb-link/scb-link.js +1 -1
  27. package/mvc/components/scb-link-button/scb-link-button.js +1 -1
  28. package/mvc/components/scb-list/scb-list-item.js +6 -6
  29. package/mvc/components/scb-menu/scb-menu-item.js +1 -1
  30. package/mvc/components/scb-nav/scb-nav.js +1 -1
  31. package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
  32. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  33. package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
  34. package/mvc/components/scb-options-menu/scb-options-sub-menu.js +1 -1
  35. package/mvc/components/scb-overlay/scb-overlay.js +3 -3
  36. package/mvc/components/scb-pagination/scb-pagination.js +1 -1
  37. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  38. package/mvc/components/scb-search/scb-search.js +3 -3
  39. package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
  40. package/mvc/components/scb-select/scb-select-option.js +1 -1
  41. package/mvc/components/scb-select/scb-select.js +1 -1
  42. package/mvc/components/scb-snackbar/scb-snackbar.js +1 -1
  43. package/mvc/components/scb-stepper/scb-step.js +1 -1
  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-table-next/read-table.js +1 -0
  47. package/mvc/components/scb-table-next/scb-table-next.js +6 -0
  48. package/mvc/components/scb-textfield/scb-textfield.js +34 -176
  49. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  50. package/mvc/components/scb-tooltip/scb-tooltip.js +2 -2
  51. package/mvc/components/scb-tour/scb-tour-step.js +1 -0
  52. package/mvc/components/scb-tour/scb-tour.js +33 -0
  53. package/mvc/{vendor → components/shared}/component-size-token.js +1 -1
  54. package/mvc/components/shared/lazy-focus-ring.js +2 -0
  55. package/mvc/components/shared/lazy-ripple.js +2 -0
  56. package/mvc/{vendor → components/shared}/manual-popover.js +1 -1
  57. package/mvc/components/shared/scb-icon-svg.js +11 -0
  58. package/mvc/vendor/scb-card-variants.internal.js +5 -5
  59. package/package.json +22 -2
  60. package/scb-card/scb-card-variants.internal.js +37 -40
  61. package/scb-components/index.d.ts +110 -0
  62. package/scb-components/scb-table-next/read-table.d.ts +29 -0
  63. package/scb-components/scb-table-next/scb-table-next.d.ts +22 -0
  64. package/scb-components/scb-tour/scb-tour-step.d.ts +13 -0
  65. package/scb-components/scb-tour/scb-tour.d.ts +57 -0
  66. package/scb-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
  67. package/scb-components/scb-viz/scb-viz-print-runtime.d.ts +36 -0
  68. package/scb-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
  69. package/scb-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
  70. package/scb-components/scb-viz/scb-viz-table-runtime.d.ts +31 -0
  71. package/scb-components/shared/component-size-token.d.ts +1 -0
  72. package/scb-components/shared/lazy-focus-ring.d.ts +4 -0
  73. package/scb-components/shared/lazy-ripple.d.ts +9 -0
  74. package/scb-components/shared/manual-popover.d.ts +7 -0
  75. package/scb-components/shared/scb-icon-svg.d.ts +3 -0
  76. package/scb-table-next/read-table.js +87 -0
  77. package/scb-table-next/scb-table-next.js +226 -0
  78. package/scb-tooltip/scb-tooltip.js +7 -1
  79. package/scb-tour/scb-tour-step.js +27 -0
  80. package/scb-tour/scb-tour.js +368 -0
  81. package/scb-viz/scb-viz-series-differentiation-registry.js +10 -7
  82. package/scb-viz/scb-viz.js +43 -43
  83. package/scb-wc.bundle.js +588 -291
  84. package/scb-wc.d.ts +32 -0
  85. package/shared/scb-icon-svg.js +5 -2
  86. package/mvc/vendor/lazy-focus-ring.js +0 -2
  87. package/mvc/vendor/lazy-ripple.js +0 -2
  88. package/mvc/vendor/scb-icon-svg.js +0 -11
@@ -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{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`
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`
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
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,`
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 x,V=0,T="data-scb-tooltip-managed-action-size",l=(x=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(T);if(o!==null&&e.getAttribute("size")!==o){e.removeAttribute(T);continue}(!e.hasAttribute("size")||o!==null)&&(e.setAttribute("size",t),e.setAttribute(T,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"
@@ -43,4 +43,4 @@ import{g as C,h as q,m as H,p as c,v as d,y as N}from"../../vendor/vendor.js";im
43
43
  ${i}
44
44
  </div>
45
45
  <slot @slotchange=${this._onDefaultSlotChange}></slot>
46
- `}},T.styles=N`:host{position:relative;display:inline-block;--delay:0.25s;--max-width:300px;--wrap:normal}.scb-tooltip{position:fixed;min-width:120px;max-width:var(--max-width);width:max-content;opacity:0;z-index:var(--scb-tooltip-z-index, var(--scb-layer-tooltip, 1000));transition:opacity var(--delay) ease-in-out,visibility var(--delay) ease-in-out}.scb-tooltip[popover]{box-sizing:border-box;margin:0;border:0;padding:0;inset:auto;overflow:visible;background:0 0}.scb-tooltip[open]{opacity:1;visibility:visible}.hidden,.scb-tooltip{visibility:hidden}.scb-tooltip-supporting-text{font-family:var(--scb-tooltip-supporting-font, var(--scb-tooltip-design-supporting-medium-font));font-size:var(--scb-tooltip-supporting-size, var(--scb-tooltip-design-supporting-medium-size));font-style:normal;line-height:var(--scb-tooltip-supporting-line-height, var(--scb-tooltip-design-supporting-medium-line-height));font-weight:var(--scb-tooltip-supporting-weight, var(--scb-tooltip-design-supporting-medium-weight));letter-spacing:var(--scb-tooltip-supporting-tracking, var(--scb-tooltip-design-supporting-medium-tracking));white-space:var(--wrap)}:host([variant='plain']) .scb-tooltip{max-width:var(--max-width)}:host([variant='plain']) .scb-tooltip-container{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;background:var(--scb-tooltip-plain-surface-color, var(--md-sys-color-inverse-surface));border-radius:var(--scb-tooltip-design-plain-radius-medium);min-height:14px;width:100%}:host([variant='plain']) .scb-tooltip-supporting-text{padding:var(--scb-tooltip-design-plain-padding-block-medium) var(--scb-tooltip-design-plain-padding-inline-medium);color:var(--scb-tooltip-plain-content-color, var(--md-sys-color-inverse-on-surface))}.scb-tooltip-arrow{width:12px;height:6px;position:absolute}:host([position='top']) .scb-tooltip-arrow{left:50%;bottom:-6px;transform:translateX(-50%) rotate(0deg)}:host([position='right']) .scb-tooltip-arrow{left:-9px;top:50%;transform:translateY(-50%) rotate(90deg)}:host([position='bottom']) .scb-tooltip-arrow{left:50%;top:-6px;transform:translateX(-50%) rotate(180deg)}:host([position='left']) .scb-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%) translateX(-3px) rotate(270deg)}:host([variant='plain'][arrow='false']) .scb-tooltip-arrow{display:none}:host([variant='rich']){align-items:flex-start;gap:var(--spacing-2)}:host([variant='rich']) .scb-tooltip{background:var(--scb-tooltip-rich-surface-color, var(--md-sys-color-surface-container, var(--p-95)));box-shadow:var(--scb-tooltip-shadow, var(--scb-shadow-tooltip));display:inline-flex;padding-bottom:var(--scb-tooltip-design-rich-padding-bottom-medium);flex-direction:column;align-items:flex-start;gap:var(--scb-tooltip-design-rich-gap-medium);border-radius:var(--scb-tooltip-design-rich-radius-medium);min-width:200px;max-width:var(--max-width)}:host([variant='rich']) .scb-tooltip-text-container{display:flex;min-width:220px;padding:var(--scb-tooltip-design-rich-padding-block-medium) var(--scb-tooltip-design-rich-padding-inline-medium) var(--spacing-2) var(--scb-tooltip-design-rich-padding-inline-medium);align-items:flex-start;gap:var(--spacing-2);flex-direction:column}:host([variant='rich']) .scb-tooltip-label{color:var(--scb-tooltip-rich-heading-color, var(--md-sys-color-on-surface));font-family:var(--scb-tooltip-label-font, var(--scb-tooltip-design-title-medium-font));font-size:var(--scb-tooltip-label-size, var(--scb-tooltip-design-title-medium-size));font-style:normal;font-weight:var(--scb-tooltip-label-weight, var(--scb-tooltip-design-title-medium-weight));line-height:var(--scb-tooltip-label-line-height, var(--scb-tooltip-design-title-medium-line-height));letter-spacing:var(--scb-tooltip-label-tracking, var(--scb-tooltip-design-title-medium-tracking))}:host([variant='rich']) .scb-tooltip-supporting-text{color:var(--scb-tooltip-rich-supporting-color, var(--md-sys-color-on-surface-variant, var(--scb-color-compat-tooltip-on-surface-variant)))}:host([variant='rich']) .scb-tooltip-button-container{display:flex;padding:0 var(--spacing-3);align-items:center;gap:var(--scb-tooltip-design-rich-action-gap-medium);align-self:stretch}:host{--scb-tooltip-design-plain-padding-block-medium:var(--scb-tooltip-plain-padding-block, var(--spacing-2, 4px));--scb-tooltip-design-plain-padding-inline-medium:var(--scb-tooltip-plain-padding-inline, var(--spacing-3, 8px));--scb-tooltip-design-plain-radius-medium:var(--scb-tooltip-plain-radius, var(--radius-extra-small, 4px));--scb-tooltip-design-rich-padding-block-medium:var(--scb-tooltip-rich-padding-block, var(--spacing-4, 12px));--scb-tooltip-design-rich-padding-inline-medium:var(--scb-tooltip-rich-padding-inline, var(--spacing-5, 16px));--scb-tooltip-design-rich-padding-bottom-medium:var(--scb-tooltip-rich-padding-bottom, var(--spacing-3, 8px));--scb-tooltip-design-rich-gap-medium:var(--scb-tooltip-rich-gap, var(--spacing-3, 8px));--scb-tooltip-design-rich-action-gap-medium:var(--scb-tooltip-rich-action-gap, var(--spacing-3, 8px));--scb-tooltip-design-rich-action-button-size-medium:var(--scb-tooltip-rich-action-button-size, medium);--scb-tooltip-design-rich-radius-medium:var(--scb-tooltip-rich-radius, var(--radius-medium, 12px));--scb-tooltip-design-title-medium-font:var(--scb-ui-tooltip-label-font, var(--scb-form-question-font, var(--scb-typography-label-large-font, var(--md-sys-typescale-label-large-font, var(--brand)))));--scb-tooltip-design-title-medium-size:var(--scb-ui-tooltip-label-size, var(--scb-form-question-size, var(--scb-typography-label-large-size, var(--md-sys-typescale-label-large-size, 18px))));--scb-tooltip-design-title-medium-line-height:var(--scb-ui-tooltip-label-line-height, var(--scb-form-question-line-height, var(--scb-typography-label-large-line-height, var(--md-sys-typescale-label-large-line-height, 26px))));--scb-tooltip-design-title-medium-tracking:var(--scb-ui-tooltip-label-tracking, var(--scb-form-question-letter-spacing, var(--scb-typography-label-large-tracking, var(--md-sys-typescale-label-large-tracking, var(--tracking-05, -0.3px)))));--scb-tooltip-design-title-medium-weight:var(--scb-ui-tooltip-label-weight, var(--scb-form-question-font-weight, var(--scb-typography-label-large-weight, var(--md-sys-typescale-label-large-weight, var(--weight-semibold, 600)))));--scb-tooltip-design-title-medium-letter-spacing:var(--scb-ui-tooltip-label-letter-spacing, var(--scb-ui-tooltip-label-tracking, var(--scb-form-question-letter-spacing, var(--scb-typography-label-large-tracking, var(--md-sys-typescale-label-large-tracking, var(--tracking-05, -0.3px))))));--scb-tooltip-design-title-medium-font-weight:var(--scb-ui-tooltip-label-font-weight, var(--scb-ui-tooltip-label-weight, var(--scb-form-question-font-weight, var(--scb-typography-label-large-weight, var(--md-sys-typescale-label-large-weight, var(--weight-semibold, 600))))));--scb-tooltip-design-supporting-medium-font:var(--scb-ui-tooltip-supporting-font, var(--scb-choices-supporting-font, var(--scb-form-answer-font, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font, var(--brand))))));--scb-tooltip-design-supporting-medium-size:var(--scb-ui-tooltip-supporting-size, var(--scb-choices-supporting-size, var(--scb-form-answer-size, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size, 18px)))));--scb-tooltip-design-supporting-medium-line-height:var(--scb-ui-tooltip-supporting-line-height, var(--scb-choices-supporting-line-height, var(--scb-form-answer-line-height, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height, 26px)))));--scb-tooltip-design-supporting-medium-tracking:var(--scb-ui-tooltip-supporting-tracking, var(--scb-choices-supporting-letter-spacing, var(--scb-form-answer-letter-spacing, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px))))));--scb-tooltip-design-supporting-medium-weight:var(--scb-ui-tooltip-supporting-weight, var(--scb-choices-supporting-font-weight, var(--scb-form-answer-font-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400))))));--scb-tooltip-design-supporting-medium-letter-spacing:var(--scb-ui-tooltip-supporting-letter-spacing, var(--scb-ui-tooltip-supporting-tracking, var(--scb-choices-supporting-letter-spacing, var(--scb-form-answer-letter-spacing, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px)))))));--scb-tooltip-design-supporting-medium-font-weight:var(--scb-ui-tooltip-supporting-font-weight, var(--scb-ui-tooltip-supporting-weight, var(--scb-choices-supporting-font-weight, var(--scb-form-answer-font-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400)))))))}`,T);p([c({type:String,reflect:!0})],l.prototype,"variant",void 0);p([c({type:Boolean,reflect:!0})],l.prototype,"arrow",void 0);p([c({type:String,attribute:"supporting-text"})],l.prototype,"supportingtext",void 0);p([c({type:String})],l.prototype,"label",void 0);p([c({type:String,reflect:!0})],l.prototype,"trigger",void 0);p([c({type:String,reflect:!0})],l.prototype,"position",void 0);p([c({type:Boolean,reflect:!0})],l.prototype,"open",void 0);p([c({type:Number,reflect:!0})],l.prototype,"delay",void 0);p([c({type:Number,reflect:!0})],l.prototype,"offset",void 0);p([c({type:String,reflect:!0,attribute:"max-width"})],l.prototype,"maxWidth",void 0);l=p([H("scb-tooltip")],l);export{l as ScbTooltip};
46
+ `}},x.styles=N`:host{position:relative;display:inline-block;--delay:0.25s;--max-width:300px;--wrap:normal}.scb-tooltip{position:fixed;min-width:120px;max-width:var(--max-width);width:max-content;opacity:0;z-index:var(--scb-tooltip-z-index, var(--scb-layer-tooltip, 1000));transition:opacity var(--delay) ease-in-out,visibility var(--delay) ease-in-out}.scb-tooltip[popover]{box-sizing:border-box;margin:0;border:0;padding:0;inset:auto;overflow:visible;background:0 0}.scb-tooltip[open]{opacity:1;visibility:visible}.hidden,.scb-tooltip{visibility:hidden}.scb-tooltip-supporting-text{box-sizing:border-box;min-width:0;max-width:100%;overflow-wrap:anywhere;font-family:var(--scb-tooltip-supporting-font, var(--scb-tooltip-design-supporting-medium-font));font-size:var(--scb-tooltip-supporting-size, var(--scb-tooltip-design-supporting-medium-size));font-style:normal;line-height:var(--scb-tooltip-supporting-line-height, var(--scb-tooltip-design-supporting-medium-line-height));font-weight:var(--scb-tooltip-supporting-weight, var(--scb-tooltip-design-supporting-medium-weight));letter-spacing:var(--scb-tooltip-supporting-tracking, var(--scb-tooltip-design-supporting-medium-tracking));white-space:var(--wrap)}:host([variant='plain']) .scb-tooltip{max-width:var(--max-width)}:host([variant='plain']) .scb-tooltip-container{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;background:var(--scb-tooltip-plain-surface-color, var(--md-sys-color-inverse-surface));border-radius:var(--scb-tooltip-design-plain-radius-medium);min-height:14px;width:100%}:host([variant='plain']) .scb-tooltip-supporting-text{padding:var(--scb-tooltip-design-plain-padding-block-medium) var(--scb-tooltip-design-plain-padding-inline-medium);color:var(--scb-tooltip-plain-content-color, var(--md-sys-color-inverse-on-surface))}.scb-tooltip-arrow{width:12px;height:6px;position:absolute}:host([position='top']) .scb-tooltip-arrow{left:50%;bottom:-6px;transform:translateX(-50%) rotate(0deg)}:host([position='right']) .scb-tooltip-arrow{left:-9px;top:50%;transform:translateY(-50%) rotate(90deg)}:host([position='bottom']) .scb-tooltip-arrow{left:50%;top:-6px;transform:translateX(-50%) rotate(180deg)}:host([position='left']) .scb-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%) translateX(-3px) rotate(270deg)}:host([variant='plain'][arrow='false']) .scb-tooltip-arrow{display:none}:host([variant='rich']){align-items:flex-start;gap:var(--spacing-2)}:host([variant='rich']) .scb-tooltip{background:var(--scb-tooltip-rich-surface-color, var(--md-sys-color-surface-container, var(--p-95)));box-shadow:var(--scb-tooltip-shadow, var(--scb-shadow-tooltip));display:inline-flex;padding-bottom:var(--scb-tooltip-design-rich-padding-bottom-medium);flex-direction:column;align-items:flex-start;gap:var(--scb-tooltip-design-rich-gap-medium);border-radius:var(--scb-tooltip-design-rich-radius-medium);min-width:200px;max-width:var(--max-width)}:host([variant='rich']) .scb-tooltip-text-container{box-sizing:border-box;display:flex;min-width:0;max-width:100%;padding:var(--scb-tooltip-design-rich-padding-block-medium) var(--scb-tooltip-design-rich-padding-inline-medium) var(--spacing-2) var(--scb-tooltip-design-rich-padding-inline-medium);align-items:flex-start;gap:var(--spacing-2);flex-direction:column}:host([variant='rich']) .scb-tooltip-label{color:var(--scb-tooltip-rich-heading-color, var(--md-sys-color-on-surface));font-family:var(--scb-tooltip-label-font, var(--scb-tooltip-design-title-medium-font));font-size:var(--scb-tooltip-label-size, var(--scb-tooltip-design-title-medium-size));font-style:normal;font-weight:var(--scb-tooltip-label-weight, var(--scb-tooltip-design-title-medium-weight));line-height:var(--scb-tooltip-label-line-height, var(--scb-tooltip-design-title-medium-line-height));letter-spacing:var(--scb-tooltip-label-tracking, var(--scb-tooltip-design-title-medium-tracking))}:host([variant='rich']) .scb-tooltip-supporting-text{color:var(--scb-tooltip-rich-supporting-color, var(--md-sys-color-on-surface-variant, var(--scb-color-compat-tooltip-on-surface-variant)))}:host([variant='rich']) .scb-tooltip-button-container{display:flex;padding:0 var(--spacing-3);align-items:center;gap:var(--scb-tooltip-design-rich-action-gap-medium);align-self:stretch}:host{--scb-tooltip-design-plain-padding-block-medium:var(--scb-tooltip-plain-padding-block, var(--spacing-2, 4px));--scb-tooltip-design-plain-padding-inline-medium:var(--scb-tooltip-plain-padding-inline, var(--spacing-3, 8px));--scb-tooltip-design-plain-radius-medium:var(--scb-tooltip-plain-radius, var(--radius-extra-small, 4px));--scb-tooltip-design-rich-padding-block-medium:var(--scb-tooltip-rich-padding-block, var(--spacing-4, 12px));--scb-tooltip-design-rich-padding-inline-medium:var(--scb-tooltip-rich-padding-inline, var(--spacing-5, 16px));--scb-tooltip-design-rich-padding-bottom-medium:var(--scb-tooltip-rich-padding-bottom, var(--spacing-3, 8px));--scb-tooltip-design-rich-gap-medium:var(--scb-tooltip-rich-gap, var(--spacing-3, 8px));--scb-tooltip-design-rich-action-gap-medium:var(--scb-tooltip-rich-action-gap, var(--spacing-3, 8px));--scb-tooltip-design-rich-action-button-size-medium:var(--scb-tooltip-rich-action-button-size, medium);--scb-tooltip-design-rich-radius-medium:var(--scb-tooltip-rich-radius, var(--radius-medium, 12px));--scb-tooltip-design-title-medium-font:var(--scb-ui-tooltip-label-font, var(--scb-form-question-font, var(--scb-typography-label-large-font, var(--md-sys-typescale-label-large-font, var(--brand)))));--scb-tooltip-design-title-medium-size:var(--scb-ui-tooltip-label-size, var(--scb-form-question-size, var(--scb-typography-label-large-size, var(--md-sys-typescale-label-large-size, 18px))));--scb-tooltip-design-title-medium-line-height:var(--scb-ui-tooltip-label-line-height, var(--scb-form-question-line-height, var(--scb-typography-label-large-line-height, var(--md-sys-typescale-label-large-line-height, 26px))));--scb-tooltip-design-title-medium-tracking:var(--scb-ui-tooltip-label-tracking, var(--scb-form-question-letter-spacing, var(--scb-typography-label-large-tracking, var(--md-sys-typescale-label-large-tracking, var(--tracking-05, -0.3px)))));--scb-tooltip-design-title-medium-weight:var(--scb-ui-tooltip-label-weight, var(--scb-form-question-font-weight, var(--scb-typography-label-large-weight, var(--md-sys-typescale-label-large-weight, var(--weight-semibold, 600)))));--scb-tooltip-design-title-medium-letter-spacing:var(--scb-ui-tooltip-label-letter-spacing, var(--scb-ui-tooltip-label-tracking, var(--scb-form-question-letter-spacing, var(--scb-typography-label-large-tracking, var(--md-sys-typescale-label-large-tracking, var(--tracking-05, -0.3px))))));--scb-tooltip-design-title-medium-font-weight:var(--scb-ui-tooltip-label-font-weight, var(--scb-ui-tooltip-label-weight, var(--scb-form-question-font-weight, var(--scb-typography-label-large-weight, var(--md-sys-typescale-label-large-weight, var(--weight-semibold, 600))))));--scb-tooltip-design-supporting-medium-font:var(--scb-ui-tooltip-supporting-font, var(--scb-choices-supporting-font, var(--scb-form-answer-font, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font, var(--brand))))));--scb-tooltip-design-supporting-medium-size:var(--scb-ui-tooltip-supporting-size, var(--scb-choices-supporting-size, var(--scb-form-answer-size, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size, 18px)))));--scb-tooltip-design-supporting-medium-line-height:var(--scb-ui-tooltip-supporting-line-height, var(--scb-choices-supporting-line-height, var(--scb-form-answer-line-height, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height, 26px)))));--scb-tooltip-design-supporting-medium-tracking:var(--scb-ui-tooltip-supporting-tracking, var(--scb-choices-supporting-letter-spacing, var(--scb-form-answer-letter-spacing, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px))))));--scb-tooltip-design-supporting-medium-weight:var(--scb-ui-tooltip-supporting-weight, var(--scb-choices-supporting-font-weight, var(--scb-form-answer-font-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400))))));--scb-tooltip-design-supporting-medium-letter-spacing:var(--scb-ui-tooltip-supporting-letter-spacing, var(--scb-ui-tooltip-supporting-tracking, var(--scb-choices-supporting-letter-spacing, var(--scb-form-answer-letter-spacing, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking, var(--tracking-05, -0.3px)))))));--scb-tooltip-design-supporting-medium-font-weight:var(--scb-ui-tooltip-supporting-font-weight, var(--scb-ui-tooltip-supporting-weight, var(--scb-choices-supporting-font-weight, var(--scb-form-answer-font-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight, var(--weight-regular, 400)))))))}`,x);p([c({type:String,reflect:!0})],l.prototype,"variant",void 0);p([c({type:Boolean,reflect:!0})],l.prototype,"arrow",void 0);p([c({type:String,attribute:"supporting-text"})],l.prototype,"supportingtext",void 0);p([c({type:String})],l.prototype,"label",void 0);p([c({type:String,reflect:!0})],l.prototype,"trigger",void 0);p([c({type:String,reflect:!0})],l.prototype,"position",void 0);p([c({type:Boolean,reflect:!0})],l.prototype,"open",void 0);p([c({type:Number,reflect:!0})],l.prototype,"delay",void 0);p([c({type:Number,reflect:!0})],l.prototype,"offset",void 0);p([c({type:String,reflect:!0,attribute:"max-width"})],l.prototype,"maxWidth",void 0);l=p([H("scb-tooltip")],l);export{l as ScbTooltip};
@@ -0,0 +1 @@
1
+ import{h as u,m as p,p as c,v as _,y as m}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as s}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(n,d,l){try{customElements.get(n)||r(n,d,l)}catch(a){var i=String(a||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var o,t=(o=class extends u{constructor(...r){super(...r),this.target="",this.heading=""}connectedCallback(){super.connectedCallback(),this.setAttribute("hidden",""),this.setAttribute("aria-hidden","true")}render(){return _`<slot></slot>`}},o.styles=m`:host{display:none!important}`,o);s([c({type:String,reflect:!0})],t.prototype,"target",void 0);s([c({type:String,reflect:!0})],t.prototype,"heading",void 0);t=s([p("scb-tour-step")],t);export{t as ScbTourStepElement};
@@ -0,0 +1,33 @@
1
+ import{f,h as _,m as w,p as n,v as x,y as k}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as a}from"../../vendor/decorate.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import{closeManualPopover as S,openManualPopover as z}from"../shared/manual-popover.js";import{ScbTourStepElement as R}from"./scb-tour-step.js";(function(){try{var l=typeof globalThis<"u"?globalThis:window;if(!l.__scb_ce_guard_installed__){l.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,o,s){try{customElements.get(e)||t(e,o,s)}catch(i){var d=String(i||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var m,b,v={fromAttribute:l=>l!==null&&l!=="false",toAttribute:l=>l?"":null},r=(m=class extends _{constructor(...t){super(...t),this.variant="standard",this.spotlight=!1,this.open=!1,this.autoStart=!1,this.storageKey="",this.step=0,this.closeLabel="Stäng guiden",this.previousLabel="Föregående",this.nextLabel="Nästa",this.doneLabel="Klart",this.stepLabel="{current} av {total}",this._steps=[],this._stepObserver=new MutationObserver(()=>this._readSteps()),this._autoStartAttempted=!1,this._startRequest=0,this._shownStorageKey="",this._spotlightId=`scb-tour-spotlight-${b._nextId++}`,this._operation=0,this._frame=0,this._scrollRoots=[],this._resizeObserver=new ResizeObserver(()=>this._schedulePosition()),this._startOnLoad=async()=>{if(!this.isConnected||document.readyState!=="complete"||!this.autoStart||this.open||this._autoStartAttempted)return;this._autoStartAttempted=!0;const e=this._startRequest,o=this.storageKey;try{if(o&&localStorage.getItem(o)==="seen")return}catch{}await this.updateComplete;const s=this._findTarget(this._steps[0]?.target);s?.localName.includes("-")&&(await customElements.whenDefined(s.localName),await s.updateComplete),this.isConnected&&this.autoStart&&!this.open&&e===this._startRequest&&o===this.storageKey&&this.start()},this._schedulePosition=e=>{e&&this.shadowRoot?.querySelector(".layer")?.removeAttribute("data-moving"),cancelAnimationFrame(this._frame),this._frame=requestAnimationFrame(()=>this._position())},this._onResize=e=>{this._target?.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),this._schedulePosition(e)},this._next=()=>{this.step>=this._steps.length-1?this._close("complete"):this.step++},this._onKeydown=e=>{e.key!=="Escape"||!this.open||e.defaultPrevented||(e.preventDefault(),e.stopPropagation(),this.close())}}connectedCallback(){super.connectedCallback(),this._readSteps(),this._stepObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["target","heading"]}),document.readyState!=="complete"&&window.addEventListener("load",this._startOnLoad,{once:!0})}disconnectedCallback(){this._startRequest++,this._stepObserver.disconnect(),window.removeEventListener("load",this._startOnLoad),this._hide(),super.disconnectedCallback()}updated(t){this.open&&t.has("open")&&(this._autoStartAttempted=!0,this._startRequest++),this.open?t.has("open")||t.has("step")||t.has("_steps")?this._showStep():t.has("spotlight")&&this._position():this._hide(),this._startOnLoad()}_readSteps(){this._steps=Array.from(this.children).filter(t=>t instanceof R).map(t=>({target:t.target,heading:t.heading,content:(t.textContent??"").replace(/\s+/g," ").trim()}))}_findTarget(t){if(!t)return null;try{const e=this.querySelector(t)??this.getRootNode().querySelector(t);return e instanceof HTMLElement?e:null}catch{return null}}start(){this._autoStartAttempted=!0,this._startRequest++,this.step=0,this.open=!0}close(){this._autoStartAttempted=!0,this._startRequest++,this._close("dismiss")}_close(t){if(this.open){if(this._shownStorageKey&&t!=="target-unavailable")try{localStorage.setItem(this._shownStorageKey,"seen")}catch{}this.open=!1,this._hide(),this.dispatchEvent(new CustomEvent("close",{detail:{reason:t,step:this.step},bubbles:!0,composed:!0}))}}_hide(){this._operation++,cancelAnimationFrame(this._frame),this._resizeObserver.disconnect(),window.removeEventListener("resize",this._onResize),window.removeEventListener("keydown",this._onKeydown),window.removeEventListener("scroll",this._schedulePosition,!0),this._scrollRoots.forEach(o=>o.removeEventListener("scroll",this._schedulePosition,!0)),this._scrollRoots=[];const t=this.shadowRoot?.querySelector(".surface")?.contains(this.shadowRoot?.activeElement??null),e=this.shadowRoot?.querySelector(".layer");S(e),e?.removeAttribute("data-moving"),t&&this._returnFocus?.isConnected&&this._returnFocus.focus({preventScroll:!0}),this._returnFocus=void 0,this._target=void 0,this._spotlightTarget=void 0,this._shownStorageKey=""}async _showStep(){const t=++this._operation;if(await this.updateComplete,!this.open||t!==this._operation)return;const e=Math.max(0,Math.min(this._steps.length-1,Math.trunc(this.step)||0));if(this.step!==e){this.step=e;return}const o=this._steps[e],s=this._findTarget(o?.target);if(!s||!this._isVisible(s)){this._close("target-unavailable");return}const d=this.shadowRoot.querySelector(".surface"),i=this.shadowRoot.querySelector(".layer");if(!i.matches(":popover-open")){this._shownStorageKey=this.storageKey;let c=document.activeElement;for(;c?.shadowRoot?.activeElement;)c=c.shadowRoot.activeElement;c instanceof HTMLElement&&(this._returnFocus=c)}this._target=s;const h=s.getBoundingClientRect();if((h.top<0||h.bottom>innerHeight||h.left<0||h.right>innerWidth)&&s.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),!z(i,s)){this._close("target-unavailable");return}this._resizeObserver.disconnect(),this._resizeObserver.observe(s),this._resizeObserver.observe(d),window.addEventListener("resize",this._onResize),window.addEventListener("scroll",this._schedulePosition,!0),this._scrollRoots.forEach(c=>c.removeEventListener("scroll",this._schedulePosition,!0)),this._scrollRoots=[];let p=s.getRootNode();for(;p instanceof ShadowRoot;)p.addEventListener("scroll",this._schedulePosition,!0),this._scrollRoots.push(p),p=p.host.getRootNode();this._position(),d.focus({preventScroll:!0}),this.dispatchEvent(new CustomEvent("stepchange",{detail:{step:e,total:this._steps.length},bubbles:!0,composed:!0}))}_isVisible(t){const e=getComputedStyle(t),o=t.getBoundingClientRect();return t.isConnected&&e.visibility!=="hidden"&&o.width>0&&o.height>0}_position(){const t=this._target,e=this.shadowRoot?.querySelector(".surface");if(!this.open||!e||!t)return;if(!this._isVisible(t)){this._close("target-unavailable");return}const o=getComputedStyle(this),s=Number.parseFloat(o.getPropertyValue("--spacing-4"))||12,d=Number.parseFloat(o.getPropertyValue("--scb-tour-design-anchor-gap-medium"))||12,i=t.getBoundingClientRect();if(this.spotlight){window.addEventListener("keydown",this._onKeydown);const u=this.shadowRoot.querySelector(".layer");this._spotlightTarget!==t&&(u.toggleAttribute("data-moving",!!this._spotlightTarget),this._spotlightTarget=t),u.style.setProperty("--_spotlight-left",`${i.left}px`),u.style.setProperty("--_spotlight-top",`${i.top}px`),u.style.setProperty("--_spotlight-width",`${i.width}px`),u.style.setProperty("--_spotlight-height",`${i.height}px`)}else window.removeEventListener("keydown",this._onKeydown),this._spotlightTarget=void 0;const h=e.getBoundingClientRect(),p=innerHeight-i.bottom-d,c=i.top-d,g=p>=h.height+s||p>=c?"bottom":"top";e.style.setProperty("--available-height",`calc(${Math.max(0,(g==="bottom"?innerHeight-i.bottom:i.top)-s)}px - var(--scb-tour-design-anchor-gap-medium))`);const y=Math.max(s,Math.min(i.left+i.width/2-h.width/2,innerWidth-h.width-s));e.style.left=`${y}px`,e.style.top=g==="bottom"?`calc(${i.bottom}px + var(--scb-tour-design-anchor-gap-medium))`:`calc(${i.top}px - var(--scb-tour-design-anchor-gap-medium))`,e.dataset.side=g,e.style.setProperty("--anchor-x",`${i.left+i.width/2-y}px`)}render(){const t=this._steps[this.step],e=this.stepLabel.replace("{current}",String(this.step+1)).replace("{total}",String(this._steps.length));return x`
2
+ <slot name="trigger" @click=${o=>{o.defaultPrevented||this.start()}}></slot>
3
+ <slot></slot>
4
+ <div class="layer" popover="manual">
5
+ <svg class="spotlight" aria-hidden="true" focusable="false">
6
+ <defs>
7
+ <mask id=${this._spotlightId} maskUnits="userSpaceOnUse" x="0" y="0" width="100%" height="100%">
8
+ <rect width="100%" height="100%" fill="white"></rect>
9
+ <rect class="spotlight-hole" fill="black"></rect>
10
+ </mask>
11
+ </defs>
12
+ <rect class="spotlight-scrim" width="100%" height="100%" mask=${`url(#${this._spotlightId})`}></rect>
13
+ </svg>
14
+ <section class="surface" part="surface" role="dialog" tabindex="-1"
15
+ aria-labelledby="heading" aria-describedby="content counter" @keydown=${this._onKeydown}>
16
+ <span class="arrow" part="arrow" aria-hidden="true"></span>
17
+ <div class="body">
18
+ <div class="header">
19
+ <h2 id="heading">${t?.heading}</h2>
20
+ <scb-icon-button size="small" icon="close" aria-label=${this.closeLabel} @click=${this.close}></scb-icon-button>
21
+ </div>
22
+ <p id="content">${t?.content}</p>
23
+ <div class="footer">
24
+ <span id="counter" class="counter">${e}</span>
25
+ <div class="actions">
26
+ <scb-button variant="text" size="small" .label=${this.previousLabel} ?disabled=${this.step<=0} @click=${()=>this.step--}></scb-button>
27
+ <scb-button size="small" .label=${this.step===this._steps.length-1?this.doneLabel:this.nextLabel} @click=${this._next}></scb-button>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </section>
32
+ </div>
33
+ `}},b=m,m._nextId=0,m.styles=k`@keyframes scb-kf-fade-in{0%{opacity:0}to{opacity:1}}:host{display:block}.layer{display:none;position:fixed;inset:0;margin:0;padding:0;border:0;inline-size:100%;block-size:100%;max-inline-size:none;max-block-size:none;overflow:visible;background:0 0;pointer-events:none}.layer:popover-open{display:block}.layer::backdrop{background:0 0;pointer-events:none}:host([spotlight]) .layer:popover-open{animation:scb-kf-fade-in var(--scb-motion-duration-short, 200ms) var(--scb-motion-easing-standard, ease)}.spotlight{display:none;position:fixed;inset:0;inline-size:100%;block-size:100%}:host([spotlight]) .spotlight{display:block}.spotlight-hole{x:calc(var(--_spotlight-left) - var(--spacing-3, 8px));y:calc(var(--_spotlight-top) - var(--spacing-3, 8px));width:calc(var(--_spotlight-width) + 2*var(--spacing-3, 8px));height:calc(var(--_spotlight-height) + 2*var(--spacing-3, 8px));rx:var(--radius-medium, 12px)}.layer[data-moving] .spotlight-hole{transition-property:x,y,width,height;transition-duration:var(--scb-motion-duration-short, 200ms);transition-timing-function:var(--scb-motion-easing-standard, ease)}.spotlight-scrim{fill:var(--scb-tour-spotlight-color, color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent))}@media (prefers-reduced-motion:reduce){:host([spotlight]) .layer:popover-open{animation:none}.layer[data-moving] .spotlight-hole{transition:none}}.surface{position:fixed;pointer-events:auto;box-sizing:border-box;margin:0;inset:auto;border:0;inline-size:min(360px,calc(100vw - 2*var(--spacing-4, 12px)));max-block-size:min(var(--available-height, 100vh),calc(100vh - 2*var(--spacing-4, 12px)));padding:var(--scb-tour-design-padding-medium);border-radius:var(--scb-tour-design-radius-medium);background:var(--scb-tour-surface-color, var(--md-sys-color-surface-container));color:var(--scb-tour-content-color, var(--md-sys-color-on-surface));box-shadow:var(--scb-tour-design-shadow-medium);overflow:visible;outline:0;font-family:var(--scb-tour-design-supporting-medium-font);font-size:var(--scb-tour-design-supporting-medium-size);line-height:var(--scb-tour-design-supporting-medium-line-height);font-weight:var(--scb-tour-design-supporting-medium-weight);letter-spacing:var(--scb-tour-design-supporting-medium-tracking)}:host([variant='inverse']) .surface{background:var(--scb-tour-surface-color, var(--md-sys-color-on-info-container));color:var(--scb-tour-content-color, var(--md-sys-color-info-container));--scb-button-low-emphasis-content-color:var(--scb-tour-content-color, var(--md-sys-color-info-container));--scb-button-filled-container-color:var(--scb-tour-content-color, var(--md-sys-color-info-container));--scb-button-filled-content-color:var(--scb-tour-surface-color, var(--md-sys-color-on-info-container));--scb-button-disabled-content-color:color-mix(in srgb, var(--scb-tour-content-color, var(--md-sys-color-info-container)) calc(100% * var(--md-sys-state-disabled-state-layer-opacity, 0.38)), transparent);--md-icon-button-icon-color:var(--scb-tour-content-color, var(--md-sys-color-info-container));--md-focus-ring-color:var(--scb-tour-content-color, var(--md-sys-color-info-container))}.body,.footer,.header{gap:var(--scb-tour-design-gap-medium)}.body{display:grid;max-block-size:calc(min(var(--available-height, 100vh),100vh - 2*var(--spacing-4, 12px)) - 2*var(--scb-tour-design-padding-medium));overflow:auto;overflow-wrap:anywhere}.footer,.header{display:flex;align-items:start}h2{flex:1;font-family:var(--scb-tour-design-title-medium-font);font-size:var(--scb-tour-design-title-medium-size);line-height:var(--scb-tour-design-title-medium-line-height);font-weight:var(--scb-tour-design-title-medium-weight);letter-spacing:var(--scb-tour-design-title-medium-tracking)}h2,p{margin:0}.footer{align-items:center;flex-wrap:wrap}.counter{margin-inline-end:auto}.actions{display:flex;flex-wrap:wrap;gap:var(--scb-tour-design-gap-medium)}.arrow{position:absolute;left:clamp(var(--scb-tour-design-arrow-size-medium),calc(var(--anchor-x) - var(--scb-tour-design-arrow-size-medium)),calc(100% - 3*var(--scb-tour-design-arrow-size-medium)));top:calc(-1*var(--scb-tour-design-arrow-size-medium));inline-size:calc(2*var(--scb-tour-design-arrow-size-medium));block-size:var(--scb-tour-design-arrow-size-medium);background:inherit;clip-path:polygon(50%0,100% 100%,0 100%);pointer-events:none}.surface[data-side=top]{translate:0-100%}.surface[data-side=top] .arrow{top:100%;transform:rotate(180deg)}:host{--scb-tour-design-padding-medium:var(--spacing-5, 16px);--scb-tour-design-gap-medium:var(--spacing-4, 12px);--scb-tour-design-radius-medium:var(--radius-medium, 12px);--scb-tour-design-anchor-gap-medium:var(--spacing-4, 12px);--scb-tour-design-arrow-size-medium:var(--spacing-3, 8px);--scb-tour-design-title-medium-font:var(--scb-typography-title-medium-font, var(--md-sys-typescale-title-medium-font, var(--brand)));--scb-tour-design-title-medium-size:var(--scb-typography-title-medium-size, var(--md-sys-typescale-title-medium-size, 18px));--scb-tour-design-title-medium-line-height:var(--scb-typography-title-medium-line-height, var(--md-sys-typescale-title-medium-line-height, 26px));--scb-tour-design-title-medium-tracking:var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, var(--tracking-05, -0.3px)));--scb-tour-design-title-medium-weight:var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600)));--scb-tour-design-title-medium-letter-spacing:var(--scb-typography-title-medium-letter-spacing, var(--scb-typography-title-medium-tracking, var(--md-sys-typescale-title-medium-tracking, var(--tracking-05, -0.3px))));--scb-tour-design-title-medium-font-weight:var(--scb-typography-title-medium-font-weight, var(--scb-typography-title-medium-weight, var(--md-sys-typescale-title-medium-weight, var(--weight-semibold, 600))));--scb-tour-design-supporting-medium-font:var(--scb-typography-body-medium-font, var(--md-sys-typescale-body-medium-font, var(--brand)));--scb-tour-design-supporting-medium-size:var(--scb-typography-body-medium-size, var(--md-sys-typescale-body-medium-size, 16px));--scb-tour-design-supporting-medium-line-height:var(--scb-typography-body-medium-line-height, var(--md-sys-typescale-body-medium-line-height, 24px));--scb-tour-design-supporting-medium-tracking:var(--scb-typography-body-medium-tracking, var(--md-sys-typescale-body-medium-tracking, var(--tracking-03, -0.15px)));--scb-tour-design-supporting-medium-weight:var(--scb-typography-body-medium-weight, var(--md-sys-typescale-body-medium-weight, var(--weight-regular, 400)));--scb-tour-design-supporting-medium-letter-spacing:var(--scb-typography-body-medium-letter-spacing, var(--scb-typography-body-medium-tracking, var(--md-sys-typescale-body-medium-tracking, var(--tracking-03, -0.15px))));--scb-tour-design-supporting-medium-font-weight:var(--scb-typography-body-medium-font-weight, var(--scb-typography-body-medium-weight, var(--md-sys-typescale-body-medium-weight, var(--weight-regular, 400))))}`,m);a([n({type:String,reflect:!0})],r.prototype,"variant",void 0);a([n({type:Boolean,reflect:!0,converter:v})],r.prototype,"spotlight",void 0);a([n({type:Boolean,reflect:!0,converter:v})],r.prototype,"open",void 0);a([n({type:Boolean,attribute:"auto-start",converter:v})],r.prototype,"autoStart",void 0);a([n({type:String,attribute:"storage-key"})],r.prototype,"storageKey",void 0);a([n({type:Number,reflect:!0})],r.prototype,"step",void 0);a([n({attribute:"close-label"})],r.prototype,"closeLabel",void 0);a([n({attribute:"previous-label"})],r.prototype,"previousLabel",void 0);a([n({attribute:"next-label"})],r.prototype,"nextLabel",void 0);a([n({attribute:"done-label"})],r.prototype,"doneLabel",void 0);a([n({attribute:"step-label"})],r.prototype,"stepLabel",void 0);a([f()],r.prototype,"_steps",void 0);r=b=a([w("scb-tour")],r);
@@ -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 t};
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};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/md-focus-ring.js","../../vendor/rolldown-runtime.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/attachable-controller.js"])))=>i.map(i=>d[i]);
2
+ import{t as u}from"../../vendor/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 t=customElements.define.bind(customElements);customElements.define=function(o,n,a){try{customElements.get(o)||t(o,n,a)}catch(s){var r=String(s||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw s}}}}catch{}})();var i,c=()=>{customElements.get("md-focus-ring")||(i??(i=u(()=>import("../../vendor/md-focus-ring.js").then(e=>e.t).then(()=>{}),__vite__mapDeps([0,1,2,3,4]),import.meta.url)))},d=e=>{const t=e.composedPath()[0];t instanceof HTMLElement&&t.matches(":focus-visible")&&c()},f=e=>{e.key==="Tab"&&c()},m=(...e)=>{const t=d,o=f;for(const n of e)n.addEventListener("focusin",t),n.addEventListener("keydown",o);return()=>{for(const n of e)n.removeEventListener("focusin",t),n.removeEventListener("keydown",o)}};export{m as addLazyFocusRingListeners,d as ensureFocusRingOnFocusVisible,f as ensureFocusRingOnTab,c as ensureFocusRingReady};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/ripple.js","../../vendor/rolldown-runtime.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/attachable-controller.js"])))=>i.map(i=>d[i]);
2
+ import{t as s}from"../../vendor/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("../../vendor/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","scb-tour"].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
+ (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","scb-tour"].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};
@@ -0,0 +1,11 @@
1
+ import{_ as l,g as o}from"../../vendor/vendor.js";import"../../vendor/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,n,v){try{customElements.get(e)||h(e,n,v)}catch(t){var r=String(t||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw t}}}}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 s(a,h="material-icon",e){const n=(a||"").trim(),v=c.get(n);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{s as renderScbIcon};
@@ -200,7 +200,7 @@ import{g as n,v as e}from"./vendor.js";import"./vendor-lit.js";(function(){try{v
200
200
  .scb-card.filled-alternative .content.list ::slotted(scb-list) {
201
201
  --scb-list-bg: var(--md-sys-color-surface-container, var(--p-95));
202
202
  }
203
- `;function T(t){if(!(t instanceof ShadowRoot)||t.querySelector("style[data-scb-card-variants]"))return;const i=document.createElement("style");i.dataset.scbCardVariants="",i.textContent=f,t.appendChild(i)}function h(t){return String(t??"").replace(/ /g," ").replace(/-/g,"‑")}function z(t){const i=document.createElement("textarea");return i.innerHTML=t,i.value}function k(t){let i=String(t??"");for(let s=0;s<5;s+=1){const c=z(i);if(c===i)break;i=c}return i.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi," ").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()}function l(t,i){const s=t.renderRoot?.querySelector(".scb-card");s&&(i?s.classList.add("no-hover"):s.classList.remove("no-hover"))}function p(t,i,s){t.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0,detail:s})),t.dispatchEvent(new CustomEvent(i.replace("-",""),{bubbles:!0,composed:!0,detail:s}))}function x(t,i,s){t.dispatchEvent(new CustomEvent(`social-${i}`,{bubbles:!0,composed:!0,detail:{action:i,originalEvent:s}}))}function L(t,i,s){switch(i){case"list":return e`
203
+ `;function y(t){if(!(t instanceof ShadowRoot)||t.querySelector("style[data-scb-card-variants]"))return;const i=document.createElement("style");i.dataset.scbCardVariants="",i.textContent=f,t.appendChild(i)}function h(t){const i=document.createElement("textarea");return i.innerHTML=t,i.value}function z(t){let i=String(t??"");for(let s=0;s<5;s+=1){const c=h(i);if(c===i)break;i=c}return i.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi," ").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()}function l(t,i){const s=t.renderRoot?.querySelector(".scb-card");s&&(i?s.classList.add("no-hover"):s.classList.remove("no-hover"))}function p(t,i,s){t.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0,detail:s})),t.dispatchEvent(new CustomEvent(i.replace("-",""),{bubbles:!0,composed:!0,detail:s}))}function k(t,i,s){t.dispatchEvent(new CustomEvent(`social-${i}`,{bubbles:!0,composed:!0,detail:{action:i,originalEvent:s}}))}function L(t,i,s){switch(i){case"list":return e`
204
204
  <div class="full-content">
205
205
  ${s.hasListTopContent?s.topContentTpl(!1):n}
206
206
  <div class="content list ${s.hasListTopContent?"has-top-content":""}">
@@ -208,7 +208,7 @@ import{g as n,v as e}from"./vendor.js";import"./vendor-lit.js";(function(){try{v
208
208
  </div>
209
209
  ${s.footerTpl()}
210
210
  </div>
211
- `;case"social":return $(t,s);case"link":return e`
211
+ `;case"social":return x(t,s);case"link":return e`
212
212
  <div class="full-content">
213
213
  ${s.topContentTpl(!1)}
214
214
  <div class="content links">
@@ -241,7 +241,7 @@ import{g as n,v as e}from"./vendor.js";import"./vendor-lit.js";(function(){try{v
241
241
  ${s.topContentTpl(!!s.effectiveHref)}
242
242
  ${s.footerTpl()}
243
243
  </div>
244
- `}}function $(t,i){const s=t.commentsHref,c=k(t.supportingText),r=a=>{a.stopPropagation()},o=t.commentsText?`${t.commentsText}: `:"",d=t.likesText?`${t.likesText}: `:"",m=t.likeLabel||t.likesText||"Gilla",u=()=>{t.likesInteractive&&p(t,"like-hover",{hasLiked:t.hasLiked,likes:t.likes??0})},b=a=>v=>{v.stopPropagation(),x(t,a,v)},g=t.likesDisabled?n:e`
244
+ `}}function x(t,i){const s=t.commentsHref,c=z(t.supportingText),r=a=>{a.stopPropagation()},o=t.commentsText?`${t.commentsText}: `:"",d=t.likesText?`${t.likesText}: `:"",m=t.likeLabel||t.likesText||"Gilla",u=()=>{t.likesInteractive&&p(t,"like-hover",{hasLiked:t.hasLiked,likes:t.likes??0})},b=a=>v=>{v.stopPropagation(),k(t,a,v)},g=t.likesDisabled?n:e`
245
245
  <span
246
246
  class="likes"
247
247
  @mouseenter=${()=>{l(t,!0),u()}}
@@ -303,7 +303,7 @@ import{g as n,v as e}from"./vendor.js";import"./vendor-lit.js";(function(){try{v
303
303
  <scb-tooltip
304
304
  variant="rich"
305
305
  for="like-button"
306
- supporting-text=${h(t.likesHoverContent)}
306
+ supporting-text=${t.likesHoverContent}
307
307
  trigger="hover"
308
308
  position="right"
309
309
  >
@@ -350,4 +350,4 @@ import{g as n,v as e}from"./vendor.js";import"./vendor-lit.js";(function(){try{v
350
350
  </div>
351
351
  ${i.footerTpl()}
352
352
  </div>
353
- `}export{T as ensureScbCardVariantStyles,L as renderScbCardVariant};
353
+ `}export{y as ensureScbCardVariantStyles,L as renderScbCardVariant};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc",
3
- "version": "0.1.263",
3
+ "version": "0.1.264",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -506,6 +506,16 @@
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
+ },
509
519
  "./scb-tabs": {
510
520
  "types": "./scb-components/scb-tabs/scb-tabs.d.ts",
511
521
  "import": "./scb-tabs/scb-tabs.js",
@@ -541,6 +551,16 @@
541
551
  "import": "./scb-tooltip/scb-tooltip.js",
542
552
  "require": "./scb-tooltip/scb-tooltip.js"
543
553
  },
554
+ "./scb-tour": {
555
+ "types": "./scb-components/scb-tour/scb-tour.d.ts",
556
+ "import": "./scb-tour/scb-tour.js",
557
+ "require": "./scb-tour/scb-tour.js"
558
+ },
559
+ "./scb-tour/scb-tour-step": {
560
+ "types": "./scb-components/scb-tour/scb-tour-step.d.ts",
561
+ "import": "./scb-tour/scb-tour-step.js",
562
+ "require": "./scb-tour/scb-tour-step.js"
563
+ },
544
564
  "./scb-viz": {
545
565
  "types": "./scb-components/scb-viz/scb-viz.d.ts",
546
566
  "import": "./scb-viz/scb-viz.js",
@@ -549,5 +569,5 @@
549
569
  "./scb-viz/*": null,
550
570
  "./mvc/*": "./mvc/*"
551
571
  },
552
- "buildHash": "9E59A49FFD125D34FCDC35889738D35C978A0ED5835F3FC8EF0AF21B88FB1C58"
572
+ "buildHash": "7CDF67E4D39E9C443429152F6DABE8BA0AD84B5411268DF42F6699D53128B0BF"
553
573
  }
@@ -7,26 +7,23 @@ function r(e) {
7
7
  t.dataset.scbCardVariants = "", t.textContent = n, e.appendChild(t);
8
8
  }
9
9
  function i(e) {
10
- return String(e ?? "").replace(/ /g, "\xA0").replace(/-/g, "‑");
11
- }
12
- function a(e) {
13
10
  let t = document.createElement("textarea");
14
11
  return t.innerHTML = e, t.value;
15
12
  }
16
- function o(e) {
13
+ function a(e) {
17
14
  let t = String(e ?? "");
18
15
  for (let e = 0; e < 5; e += 1) {
19
- let e = a(t);
16
+ let e = i(t);
20
17
  if (e === t) break;
21
18
  t = e;
22
19
  }
23
20
  return t.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi, " ").replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
24
21
  }
25
- function s(e, t) {
22
+ function o(e, t) {
26
23
  let n = e.renderRoot?.querySelector(".scb-card");
27
24
  n && (t ? n.classList.add("no-hover") : n.classList.remove("no-hover"));
28
25
  }
29
- function c(e, t, n) {
26
+ function s(e, t, n) {
30
27
  e.dispatchEvent(new CustomEvent(t, {
31
28
  bubbles: !0,
32
29
  composed: !0,
@@ -37,7 +34,7 @@ function c(e, t, n) {
37
34
  detail: n
38
35
  }));
39
36
  }
40
- function l(e, t, n) {
37
+ function c(e, t, n) {
41
38
  e.dispatchEvent(new CustomEvent(`social-${t}`, {
42
39
  bubbles: !0,
43
40
  composed: !0,
@@ -47,7 +44,7 @@ function l(e, t, n) {
47
44
  }
48
45
  }));
49
46
  }
50
- function u(n, r, i) {
47
+ function l(n, r, i) {
51
48
  switch (r) {
52
49
  case "list": return e`
53
50
  <div class="full-content">
@@ -58,7 +55,7 @@ function u(n, r, i) {
58
55
  ${i.footerTpl()}
59
56
  </div>
60
57
  `;
61
- case "social": return d(n, i);
58
+ case "social": return u(n, i);
62
59
  case "link": return e`
63
60
  <div class="full-content">
64
61
  ${i.topContentTpl(!1)}
@@ -98,23 +95,23 @@ function u(n, r, i) {
98
95
  `;
99
96
  }
100
97
  }
101
- function d(n, r) {
102
- let a = n.commentsHref, u = o(n.supportingText), d = (e) => {
98
+ function u(n, r) {
99
+ let i = n.commentsHref, l = a(n.supportingText), u = (e) => {
103
100
  e.stopPropagation();
104
- }, f = n.commentsText ? `${n.commentsText}: ` : "", p = n.likesText ? `${n.likesText}: ` : "", m = n.likeLabel || n.likesText || "Gilla", h = () => {
105
- n.likesInteractive && c(n, "like-hover", {
101
+ }, d = n.commentsText ? `${n.commentsText}: ` : "", f = n.likesText ? `${n.likesText}: ` : "", p = n.likeLabel || n.likesText || "Gilla", m = () => {
102
+ n.likesInteractive && s(n, "like-hover", {
106
103
  hasLiked: n.hasLiked,
107
104
  likes: n.likes ?? 0
108
105
  });
109
- }, g = (e) => (t) => {
110
- t.stopPropagation(), l(n, e, t);
111
- }, _ = n.likesDisabled ? t : e`
106
+ }, h = (e) => (t) => {
107
+ t.stopPropagation(), c(n, e, t);
108
+ }, g = n.likesDisabled ? t : e`
112
109
  <span
113
110
  class="likes"
114
111
  @mouseenter=${() => {
115
- s(n, !0), h();
112
+ o(n, !0), m();
116
113
  }}
117
- @mouseleave=${() => s(n, !1)}
114
+ @mouseleave=${() => o(n, !1)}
118
115
  >
119
116
  ${n.likesInteractive ? e`
120
117
  <scb-icon-button
@@ -123,27 +120,27 @@ function d(n, r) {
123
120
  variant="standard"
124
121
  icon="thumb_up"
125
122
  ?icon-filled=${n.hasLiked}
126
- aria-label=${m}
123
+ aria-label=${p}
127
124
  @click=${(e) => {
128
- e.stopPropagation(), n.hasLiked = !n.hasLiked, c(n, "like-click", {
125
+ e.stopPropagation(), n.hasLiked = !n.hasLiked, s(n, "like-click", {
129
126
  hasLiked: n.hasLiked,
130
127
  likes: n.likes ?? 0
131
128
  });
132
129
  }}
133
130
  @keydown=${(e) => {
134
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), n.hasLiked = !n.hasLiked, c(n, "like-click", {
131
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), n.hasLiked = !n.hasLiked, s(n, "like-click", {
135
132
  hasLiked: n.hasLiked,
136
133
  likes: n.likes ?? 0
137
134
  }));
138
135
  }}
139
136
  ></scb-icon-button>
140
137
  ` : e`<span class="card-icon" aria-hidden="true">thumb_up</span>`}
141
- <span class="social-text">${p}${n.likes ?? 0}</span>
138
+ <span class="social-text">${f}${n.likes ?? 0}</span>
142
139
  </span>
143
140
  `;
144
141
  return e`
145
142
  <div class="full-content">
146
- ${r.topContentTpl(!!r.effectiveHref, !0, !0, u)}
143
+ ${r.topContentTpl(!!r.effectiveHref, !0, !0, l)}
147
144
  <div class="content">
148
145
  <div class="social-metrics">
149
146
  ${n.author ? e`
@@ -151,45 +148,45 @@ function d(n, r) {
151
148
  class="author social-text"
152
149
  href="${n.authorHref || "#"}"
153
150
  tabindex="0"
154
- @click=${d}
155
- @mouseenter=${() => s(n, !0)}
156
- @mouseleave=${() => s(n, !1)}
151
+ @click=${u}
152
+ @mouseenter=${() => o(n, !0)}
153
+ @mouseleave=${() => o(n, !1)}
157
154
  >${n.authorText}</a
158
155
  >
159
156
  ` : t}
160
157
  ${n.commentsDisabled ? t : e`
161
158
  <span
162
159
  class="comments"
163
- @mouseenter=${() => s(n, !0)}
164
- @mouseleave=${() => s(n, !1)}
160
+ @mouseenter=${() => o(n, !0)}
161
+ @mouseleave=${() => o(n, !1)}
165
162
  >
166
- ${a === "" ? e`
163
+ ${i === "" ? e`
167
164
  <span class="card-icon" aria-hidden="true">comment</span>
168
165
  ` : e`
169
166
  <scb-icon-button
170
167
  size=${n.__socialIconButtonSize()}
171
- href="${a}"
168
+ href="${i}"
172
169
  tabindex="0"
173
- @click=${d}
170
+ @click=${u}
174
171
  variant="standard"
175
172
  icon="comment"
176
173
  aria-label=${n.commentsLinkLabel}
177
174
  ></scb-icon-button>
178
175
  `}
179
- <span class="social-text">${f}${n.comments ?? 0}</span>
176
+ <span class="social-text">${d}${n.comments ?? 0}</span>
180
177
  </span>
181
178
  `}
182
179
  ${n.likesHoverContent ? e`
183
180
  <scb-tooltip
184
181
  variant="rich"
185
182
  for="like-button"
186
- supporting-text=${i(n.likesHoverContent)}
183
+ supporting-text=${n.likesHoverContent}
187
184
  trigger="hover"
188
185
  position="right"
189
186
  >
190
- ${_}
187
+ ${g}
191
188
  </scb-tooltip>
192
- ` : _}
189
+ ` : g}
193
190
  ${n.replyEnabled ? e`
194
191
  <span class="social-action">
195
192
  <scb-icon-button
@@ -197,7 +194,7 @@ function d(n, r) {
197
194
  variant="standard"
198
195
  icon="reply"
199
196
  aria-label=${n.replyLabel}
200
- @click=${g("reply")}
197
+ @click=${h("reply")}
201
198
  ></scb-icon-button>
202
199
  <span class="social-text">${n.replyLabel}</span>
203
200
  </span>
@@ -209,7 +206,7 @@ function d(n, r) {
209
206
  variant="standard"
210
207
  icon="edit"
211
208
  aria-label=${n.editLabel}
212
- @click=${g("edit")}
209
+ @click=${h("edit")}
213
210
  ></scb-icon-button>
214
211
  <span class="social-text">${n.editLabel}</span>
215
212
  </span>
@@ -221,7 +218,7 @@ function d(n, r) {
221
218
  variant="standard"
222
219
  icon="delete"
223
220
  aria-label=${n.deleteLabel}
224
- @click=${g("delete")}
221
+ @click=${h("delete")}
225
222
  ></scb-icon-button>
226
223
  <span class="social-text">${n.deleteLabel}</span>
227
224
  </span>
@@ -233,4 +230,4 @@ function d(n, r) {
233
230
  `;
234
231
  }
235
232
  //#endregion
236
- export { r as ensureScbCardVariantStyles, u as renderScbCardVariant };
233
+ export { r as ensureScbCardVariantStyles, l as renderScbCardVariant };