scb-wc 0.1.237 → 0.1.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -16
- package/all.d.ts +14 -0
- package/all.js +14 -0
- package/index.js +99 -85
- package/mvc/components/all.js +9 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
- package/mvc/components/scb-accordion/scb-accordion.js +1 -1
- package/mvc/components/scb-app-bar/scb-app-bar.js +1 -1
- package/mvc/components/scb-button/scb-button.js +3 -3
- package/mvc/components/scb-calendar/scb-calendar.js +1 -1
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
- package/mvc/components/scb-card/scb-card.js +2 -2
- package/mvc/{vendor → components/scb-chevron}/scb-chevron.js +1 -1
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +1 -1
- package/mvc/components/scb-datepicker/scb-datepicker.js +143 -0
- package/mvc/components/scb-dialog/scb-dialog.js +1 -1
- package/mvc/components/scb-drawer/scb-drawer.js +3 -3
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +1 -1
- package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
- package/mvc/components/scb-fact-card/scb-fact-card.js +1 -1
- package/mvc/components/scb-header/scb-header.js +2 -2
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
- package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/mvc/components/scb-link/scb-link.js +1 -1
- package/mvc/components/scb-link-button/scb-link-button.js +1 -1
- package/mvc/components/scb-list/scb-list-item.js +6 -6
- package/mvc/components/scb-menu/scb-menu-item.js +3 -3
- package/mvc/components/scb-menu/scb-menu.js +5 -5
- package/mvc/components/scb-nav/scb-nav.js +1 -1
- package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +1 -1
- package/mvc/components/scb-overlay/scb-overlay.js +3 -3
- package/mvc/components/scb-pagination/scb-pagination.js +1 -1
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
- package/mvc/components/scb-search/scb-search.js +3 -3
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
- package/mvc/components/scb-select/scb-select-option.js +1 -1
- package/mvc/components/scb-select/scb-select.js +1 -1
- package/mvc/components/scb-snackbar/scb-snackbar.js +1 -1
- package/mvc/components/scb-stepper/scb-step.js +1 -1
- package/mvc/components/scb-table/scb-table.js +1 -1
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +1 -1
- package/mvc/components/scb-table-next/read-table.js +1 -0
- package/mvc/components/scb-table-next/scb-table-next.js +6 -0
- package/mvc/components/scb-textfield/scb-textfield.js +34 -176
- package/mvc/components/scb-toc/scb-toc-item.js +1 -1
- package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
- package/mvc/{vendor → components/shared}/component-size-token.js +1 -1
- package/mvc/components/shared/lazy-focus-ring.js +2 -0
- package/mvc/components/shared/lazy-ripple.js +2 -0
- package/mvc/{vendor → components/shared}/manual-popover.js +1 -1
- package/mvc/components/shared/scb-icon-svg.js +11 -0
- package/package.json +12 -2
- package/scb-components/index.d.ts +108 -0
- package/scb-components/scb-table-next/read-table.d.ts +29 -0
- package/scb-components/scb-table-next/scb-table-next.d.ts +22 -0
- package/scb-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
- package/scb-components/scb-viz/scb-viz-print-runtime.d.ts +30 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
- package/scb-components/scb-viz/scb-viz-table-runtime.d.ts +28 -0
- package/scb-components/shared/component-size-token.d.ts +1 -0
- package/scb-components/shared/lazy-focus-ring.d.ts +4 -0
- package/scb-components/shared/lazy-ripple.d.ts +9 -0
- package/scb-components/shared/manual-popover.d.ts +7 -0
- package/scb-components/shared/scb-icon-svg.d.ts +3 -0
- package/scb-menu/scb-menu-item.js +7 -1
- package/scb-menu/scb-menu.js +3 -0
- package/scb-table-next/read-table.js +87 -0
- package/scb-table-next/scb-table-next.js +226 -0
- package/scb-viz/scb-viz-series-differentiation-registry.js +10 -7
- package/scb-viz/scb-viz.js +43 -43
- package/scb-wc.bundle.js +417 -287
- package/scb-wc.d.ts +28 -0
- package/shared/scb-icon-svg.js +5 -2
- package/mvc/vendor/lazy-focus-ring.js +0 -2
- package/mvc/vendor/lazy-ripple.js +0 -2
- 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{
|
|
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/decorate.js","../../vendor/assertClassBrand.js","../../vendor/classPrivateMethodInitSpec.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{g as R,h as q,m as N,p,v,y as H}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 l}from"../../vendor/decorate.js";import{a as V,t as b}from"../../vendor/manual-popover.js";(function(){try{var m=typeof globalThis<"u"?globalThis:window;if(!m.__scb_ce_guard_installed__){m.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,e,s){try{customElements.get(i)||t(i,e,s)}catch(h){var c=String(h||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var x,X=0,T="data-scb-tooltip-managed-action-size",a=(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-${++X}`,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]),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),b(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 s=e.getAttribute(T);if(s!==null&&e.getAttribute("size")!==s){e.removeAttribute(T);continue}(!e.hasAttribute("size")||s!==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()}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();const t=this._getTooltipElement();t&&(t.removeEventListener("mouseenter",this._onTooltipMouseEnter),t.removeEventListener("mouseleave",this._onTooltipMouseLeave),b(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}_hasTooltipContent(){const t=(this.supportingtext||"").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.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){const t=this._triggerEl;t&&(this._detachTriggerListeners(),t.removeAttribute("aria-describedby"));const i=this._findTriggerElement();this._triggerEl=i,i&&this._hasTooltipContent()&&(i.setAttribute("aria-describedby",this._tooltipId),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)))}_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"),V(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"),b(t);return}this._hideTimeout=window.setTimeout(()=>{t.classList.add("hidden"),b(t),this._hideTimeout=null},i)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(t,i){const e=i.getBoundingClientRect(),s=t.getBoundingClientRect(),c=(this.offset??0)+8,h=8,f=h,_=window.innerHeight-h,y=h,w=window.innerWidth-h,D=o=>o>=f&&o+s.height<=_,z=o=>o>=y&&o+s.width<=w,E=(o,r,n,u)=>{let d=0;o<n&&(d+=n-o);const C=o+r;return C>u&&(d+=C-u),d},O=o=>{let r=0,n=0;switch(o){case"top":r=e.top-s.height-c,n=e.left-(s.width-e.width)/2;break;case"bottom":r=e.bottom+c,n=e.left-(s.width-e.width)/2;break;case"left":n=e.left-s.width-c,r=e.top-(s.height-e.height)/2;break;case"right":n=e.right+c,r=e.top-(s.height-e.height)/2;break}const u=E(r,s.height,f,_),d=E(n,s.width,y,w);return{pos:o,top:r,left:n,fitsV:D(r),fitsH:z(n),totalOverflow:u+d}},k=this.position==="top"||this.position==="bottom",L=this.position,S=[L,this._getOppositePosition(L),k?"left":"top",k?"right":"bottom"].map(O);let g=S.find(o=>o.fitsV&&o.fitsH)??S.reduce((o,r)=>r.totalOverflow<o.totalOverflow?r:o);const A=(o,r,n)=>Math.min(Math.max(o,r),n),M=f,P=_-s.height,$=y,B=w-s.width,F=A(g.top,M,P),W=A(g.left,$,B);t.style.top=`${F}px`,t.style.left=`${W}px`,this.position!==g.pos&&(this.position=g.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?v`<svg
|
|
2
|
+
import{g as R,h as q,m as N,p,v,y as H}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 l}from"../../vendor/decorate.js";import{closeManualPopover as b,openManualPopover as V}from"../shared/manual-popover.js";(function(){try{var m=typeof globalThis<"u"?globalThis:window;if(!m.__scb_ce_guard_installed__){m.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,e,s){try{customElements.get(i)||t(i,e,s)}catch(h){var c=String(h||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var x,X=0,T="data-scb-tooltip-managed-action-size",a=(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-${++X}`,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]),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),b(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 s=e.getAttribute(T);if(s!==null&&e.getAttribute("size")!==s){e.removeAttribute(T);continue}(!e.hasAttribute("size")||s!==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()}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();const t=this._getTooltipElement();t&&(t.removeEventListener("mouseenter",this._onTooltipMouseEnter),t.removeEventListener("mouseleave",this._onTooltipMouseLeave),b(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}_hasTooltipContent(){const t=(this.supportingtext||"").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.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){const t=this._triggerEl;t&&(this._detachTriggerListeners(),t.removeAttribute("aria-describedby"));const i=this._findTriggerElement();this._triggerEl=i,i&&this._hasTooltipContent()&&(i.setAttribute("aria-describedby",this._tooltipId),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)))}_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"),V(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"),b(t);return}this._hideTimeout=window.setTimeout(()=>{t.classList.add("hidden"),b(t),this._hideTimeout=null},i)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(t,i){const e=i.getBoundingClientRect(),s=t.getBoundingClientRect(),c=(this.offset??0)+8,h=8,f=h,_=window.innerHeight-h,y=h,w=window.innerWidth-h,D=o=>o>=f&&o+s.height<=_,z=o=>o>=y&&o+s.width<=w,E=(o,r,n,u)=>{let d=0;o<n&&(d+=n-o);const C=o+r;return C>u&&(d+=C-u),d},O=o=>{let r=0,n=0;switch(o){case"top":r=e.top-s.height-c,n=e.left-(s.width-e.width)/2;break;case"bottom":r=e.bottom+c,n=e.left-(s.width-e.width)/2;break;case"left":n=e.left-s.width-c,r=e.top-(s.height-e.height)/2;break;case"right":n=e.right+c,r=e.top-(s.height-e.height)/2;break}const u=E(r,s.height,f,_),d=E(n,s.width,y,w);return{pos:o,top:r,left:n,fitsV:D(r),fitsH:z(n),totalOverflow:u+d}},k=this.position==="top"||this.position==="bottom",L=this.position,S=[L,this._getOppositePosition(L),k?"left":"top",k?"right":"bottom"].map(O);let g=S.find(o=>o.fitsV&&o.fitsH)??S.reduce((o,r)=>r.totalOverflow<o.totalOverflow?r:o);const A=(o,r,n)=>Math.min(Math.max(o,r),n),M=f,P=_-s.height,$=y,B=w-s.width,F=A(g.top,M,P),W=A(g.left,$,B);t.style.top=`${F}px`,t.style.left=`${W}px`,this.position!==g.pos&&(this.position=g.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?v`<svg
|
|
3
3
|
class="scb-tooltip-arrow"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
5
5
|
width="13"
|
|
@@ -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
|
|
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"].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{
|
|
1
|
+
(function(){try{var o=typeof globalThis<"u"?globalThis:window;if(!o.__scb_ce_guard_installed__){o.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,e,s){try{customElements.get(r)||t(r,e,s)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var c=new WeakMap;function p(o){const t=(c.get(o)??0)+1;return c.set(o,t),t}function d(o){const t=getComputedStyle(o),r=n=>n.endsWith("ms")?Number.parseFloat(n):Number.parseFloat(n)*1e3,e=t.transitionDuration.split(",").map(n=>r(n.trim())),s=t.transitionDelay.split(",").map(n=>r(n.trim()));return e.reduce((n,i,a)=>{const f=s[a%s.length]??0;return Math.max(n,i+f)},0)}var l=["scb-datepicker","scb-dialog","scb-drawer","scb-dropdown","scb-options-menu","scb-options-sub-menu","scb-overlay","scb-search","scb-select","scb-tooltip"].join(",");function v(o,t,r="manual"){if(!o)return!1;p(o);const e=o;if(typeof e.showPopover!="function")return!1;if(o.setAttribute("popover",r),!o.matches(":popover-open"))try{e.showPopover(t?{source:t}:void 0)}catch{return!1}return o.matches(":popover-open")}function u(o){if(!o)return;p(o);const t=o;if(typeof t.hidePopover=="function"&&o.matches(":popover-open"))try{t.hidePopover()}catch{}o.removeAttribute("popover")}function m(o,t,r){if(!o)return;const e=p(o);requestAnimationFrame(async()=>{const s=r??o,n=d(s),i=s.getAnimations().filter(a=>a.playState!=="finished");i.length>0?await Promise.allSettled(i.map(a=>a.finished)):n>0&&await new Promise(a=>setTimeout(a,n)),c.get(o)===e&&(u(o),t?.())})}function h(o){return!!o?.matches(":popover-open")}function b(o){const t=r=>{for(const e of r.querySelectorAll("*"))e.shadowRoot&&t(e.shadowRoot),e.matches("[popover]")&&h(e)&&u(e),e.matches(l)&&"open"in e&&e.open&&(e.open=!1)};t(o)}export{u as closeManualPopover,m as closeManualPopoverAfterAnimations,b as closeNestedPopupSurfaces,h as isManualPopoverOpen,v as openManualPopover};
|
|
@@ -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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.239",
|
|
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",
|
|
@@ -549,5 +559,5 @@
|
|
|
549
559
|
"./scb-viz/*": null,
|
|
550
560
|
"./mvc/*": "./mvc/*"
|
|
551
561
|
},
|
|
552
|
-
"buildHash": "
|
|
562
|
+
"buildHash": "0048BD20E9914A00E8BA9D8CE97A93E3ABEE22BB8999861DC5A76DC604DCB5C0"
|
|
553
563
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export * from './scb-accordion/scb-accordion-item';
|
|
2
|
+
export * from './scb-accordion/scb-accordion';
|
|
3
|
+
export * from './scb-action-card/scb-action-card';
|
|
4
|
+
export * from './scb-app-bar/scb-app-bar';
|
|
5
|
+
export * from './scb-avatar/scb-avatar';
|
|
6
|
+
export * from './scb-badge/scb-badge';
|
|
7
|
+
export * from './scb-breadcrumb/scb-breadcrumb-item';
|
|
8
|
+
export * from './scb-breadcrumb/scb-breadcrumb';
|
|
9
|
+
export * from './scb-button/scb-button';
|
|
10
|
+
export * from './scb-calendar/scb-calendar-event';
|
|
11
|
+
export * from './scb-calendar/scb-calendar';
|
|
12
|
+
export * from './scb-calendar-card/scb-calendar-card';
|
|
13
|
+
export * from './scb-card/scb-action-card';
|
|
14
|
+
export * from './scb-card/scb-card';
|
|
15
|
+
export * from './scb-card/scb-container-card';
|
|
16
|
+
export * from './scb-card/scb-link-card';
|
|
17
|
+
export * from './scb-card/scb-list-card';
|
|
18
|
+
export * from './scb-card/scb-social-card';
|
|
19
|
+
export * from './scb-checkbox/scb-checkbox-group';
|
|
20
|
+
export * from './scb-checkbox/scb-checkbox';
|
|
21
|
+
export * from './scb-chevron/scb-chevron';
|
|
22
|
+
export * from './scb-chip/scb-chip';
|
|
23
|
+
export * from './scb-collapse/scb-collapse';
|
|
24
|
+
export * from './scb-container-card/scb-container-card';
|
|
25
|
+
export * from './scb-cookies-consent/scb-cookies-consent';
|
|
26
|
+
export * from './scb-datepicker/scb-datepicker';
|
|
27
|
+
export * from './scb-dialog/scb-dialog';
|
|
28
|
+
export * from './scb-divider/scb-divider';
|
|
29
|
+
export * from './scb-drawer/scb-drawer';
|
|
30
|
+
export * from './scb-drop-zone/scb-drop-zone';
|
|
31
|
+
export * from './scb-dropdown/scb-dropdown';
|
|
32
|
+
export * from './scb-fact-card/scb-fact-card-content';
|
|
33
|
+
export * from './scb-fact-card/scb-fact-card';
|
|
34
|
+
export * from './scb-footer/scb-footer-section';
|
|
35
|
+
export * from './scb-footer/scb-footer';
|
|
36
|
+
export * from './scb-form-error-summary/scb-form-error-summary';
|
|
37
|
+
export * from './scb-gallery-grid/scb-gallery-grid';
|
|
38
|
+
export * from './scb-grid/scb-grid-item';
|
|
39
|
+
export * from './scb-grid/scb-grid';
|
|
40
|
+
export * from './scb-grid/scb-stack';
|
|
41
|
+
export * from './scb-header/scb-header-menu-group';
|
|
42
|
+
export * from './scb-header/scb-header-menu-item';
|
|
43
|
+
export * from './scb-header/scb-header-tab';
|
|
44
|
+
export * from './scb-header/scb-header-utility';
|
|
45
|
+
export * from './scb-header/scb-header';
|
|
46
|
+
export * from './scb-horizontal-scroller/scb-horizontal-scroller';
|
|
47
|
+
export * from './scb-icon/scb-icon';
|
|
48
|
+
export * from './scb-icon-button/scb-icon-button';
|
|
49
|
+
export * from './scb-keyfigure-card/scb-keyfigure-card';
|
|
50
|
+
export * from './scb-link/scb-link';
|
|
51
|
+
export * from './scb-link-button/scb-link-button';
|
|
52
|
+
export * from './scb-link-card/scb-link-card';
|
|
53
|
+
export * from './scb-list/scb-list-item';
|
|
54
|
+
export * from './scb-list/scb-list';
|
|
55
|
+
export * from './scb-list-card/scb-list-card';
|
|
56
|
+
export * from './scb-menu/scb-menu-item';
|
|
57
|
+
export * from './scb-menu/scb-menu-section';
|
|
58
|
+
export * from './scb-menu/scb-menu';
|
|
59
|
+
export * from './scb-menu/scb-sub-menu';
|
|
60
|
+
export * from './scb-nav/scb-nav-item';
|
|
61
|
+
export * from './scb-nav/scb-nav';
|
|
62
|
+
export * from './scb-notification-card/scb-notification-card';
|
|
63
|
+
export * from './scb-options-menu/scb-options-menu-item';
|
|
64
|
+
export * from './scb-options-menu/scb-options-menu';
|
|
65
|
+
export * from './scb-options-menu/scb-options-sub-menu';
|
|
66
|
+
export * from './scb-overlay/scb-overlay';
|
|
67
|
+
export * from './scb-pagination/scb-pagination';
|
|
68
|
+
export * from './scb-progress-indicator/scb-progress-indicator';
|
|
69
|
+
export * from './scb-progress-stepper/scb-progress-step';
|
|
70
|
+
export * from './scb-progress-stepper/scb-progress-stepper';
|
|
71
|
+
export * from './scb-radio-button/scb-radio-button';
|
|
72
|
+
export * from './scb-radio-button/scb-radio-group';
|
|
73
|
+
export * from './scb-scrollspy/scb-scrollspy';
|
|
74
|
+
export * from './scb-search/scb-search';
|
|
75
|
+
export * from './scb-segmented-button/scb-segmented-button';
|
|
76
|
+
export * from './scb-segmented-button/scb-segmented-item';
|
|
77
|
+
export * from './scb-select/scb-select-option';
|
|
78
|
+
export * from './scb-select/scb-select';
|
|
79
|
+
export * from './scb-skeleton/scb-skeleton';
|
|
80
|
+
export * from './scb-slider/scb-slider';
|
|
81
|
+
export * from './scb-snackbar/scb-snackbar';
|
|
82
|
+
export * from './scb-social-card/scb-social-card';
|
|
83
|
+
export * from './scb-status-pill/scb-status-pill';
|
|
84
|
+
export * from './scb-stepper/scb-step';
|
|
85
|
+
export * from './scb-stepper/scb-stepper';
|
|
86
|
+
export * from './scb-switch/scb-switch';
|
|
87
|
+
export * from './scb-table/scb-table';
|
|
88
|
+
export * from './scb-table-advanced/scb-table-advanced';
|
|
89
|
+
export * from './scb-table-next/read-table';
|
|
90
|
+
export * from './scb-table-next/scb-table-next';
|
|
91
|
+
export * from './scb-tabs/scb-primary-tab';
|
|
92
|
+
export * from './scb-tabs/scb-secondary-tab';
|
|
93
|
+
export * from './scb-tabs/scb-tabs';
|
|
94
|
+
export * from './scb-textfield/scb-textfield';
|
|
95
|
+
export * from './scb-toc/scb-toc-item';
|
|
96
|
+
export * from './scb-toc/scb-toc';
|
|
97
|
+
export * from './scb-tooltip/scb-tooltip';
|
|
98
|
+
export * from './scb-viz/scb-viz-actions-runtime';
|
|
99
|
+
export * from './scb-viz/scb-viz-print-runtime';
|
|
100
|
+
export * from './scb-viz/scb-viz-series-differentiation-registry';
|
|
101
|
+
export * from './scb-viz/scb-viz-series-differentiation-runtime';
|
|
102
|
+
export * from './scb-viz/scb-viz-table-runtime';
|
|
103
|
+
export * from './scb-viz/scb-viz';
|
|
104
|
+
export * from './shared/component-size-token';
|
|
105
|
+
export * from './shared/lazy-focus-ring';
|
|
106
|
+
export * from './shared/lazy-ripple';
|
|
107
|
+
export * from './shared/manual-popover';
|
|
108
|
+
export * from './shared/scb-icon-svg';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type Content = string | Inline[];
|
|
2
|
+
type Inline = string | {
|
|
3
|
+
tag: 'a' | 'sup';
|
|
4
|
+
children: Inline[];
|
|
5
|
+
href?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface Heading {
|
|
10
|
+
text: string;
|
|
11
|
+
content: Content;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
visuallyHidden: boolean;
|
|
14
|
+
column: number;
|
|
15
|
+
colSpan: number;
|
|
16
|
+
rowSpan: number;
|
|
17
|
+
}
|
|
18
|
+
export interface TableModel {
|
|
19
|
+
label: string;
|
|
20
|
+
headings: Heading[][];
|
|
21
|
+
columns: Heading[][];
|
|
22
|
+
stubCount: number;
|
|
23
|
+
rows: {
|
|
24
|
+
stubs: Content[];
|
|
25
|
+
values: Content[];
|
|
26
|
+
}[];
|
|
27
|
+
}
|
|
28
|
+
export declare function readTable(table: HTMLTableElement, rowLimit?: number): TableModel | undefined;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
export declare class ScbTableNext extends LitElement {
|
|
3
|
+
private _model?;
|
|
4
|
+
private _mobile;
|
|
5
|
+
private _resize?;
|
|
6
|
+
private _observer?;
|
|
7
|
+
private _frame?;
|
|
8
|
+
private _widthReady;
|
|
9
|
+
static styles: import("lit").CSSResult;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
private _queueRead;
|
|
13
|
+
private _read;
|
|
14
|
+
private _content;
|
|
15
|
+
private _mobileRows;
|
|
16
|
+
render(): TemplateResult<1>;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'scb-table-next': ScbTableNext;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type ScbVizExportFileExtension = 'png' | 'jpg' | 'csv';
|
|
2
|
+
export type ScbVizRasterFormat = 'png' | 'jpeg';
|
|
3
|
+
export interface ScbVizExportFileNameOptions {
|
|
4
|
+
lang: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ScbVizFullscreenDocument extends Document {
|
|
8
|
+
webkitFullscreenElement?: Element | null;
|
|
9
|
+
webkitExitFullscreen?: () => Promise<void> | void;
|
|
10
|
+
}
|
|
11
|
+
export declare function getScbVizExportBaseFileName({ lang, title }: ScbVizExportFileNameOptions): string;
|
|
12
|
+
export declare function buildScbVizExportFileName(options: ScbVizExportFileNameOptions, extension: ScbVizExportFileExtension): string;
|
|
13
|
+
export declare function getScbVizFullscreenDocument(doc?: Document): ScbVizFullscreenDocument;
|
|
14
|
+
export declare function getScbVizCurrentFullscreenElement(doc?: Document): Element | null;
|
|
15
|
+
export declare function isScbVizFullscreenSupported(target: HTMLElement & {
|
|
16
|
+
webkitRequestFullscreen?: () => Promise<void> | void;
|
|
17
|
+
}): boolean;
|
|
18
|
+
export declare function toggleScbVizFullscreen(target: HTMLElement & {
|
|
19
|
+
webkitRequestFullscreen?: () => Promise<void> | void;
|
|
20
|
+
}, doc?: Document): Promise<void>;
|
|
21
|
+
export declare function openScbVizPrintFrame(html: string, doc?: Document): Promise<void>;
|
|
22
|
+
export declare function runWithScbVizForcedPrintLightMode<T>(host: HTMLElement, callback: () => Promise<T>): Promise<T>;
|
|
23
|
+
export declare function createScbVizCsvBlob(rows: string[][], lang: string): Blob;
|
|
24
|
+
export declare function createScbVizRasterBlobFromElement(source: SVGSVGElement | HTMLCanvasElement | HTMLImageElement, target: HTMLElement, format: ScbVizRasterFormat): Promise<Blob | null>;
|
|
25
|
+
export declare function createScbVizRasterDataUrlFromElement(source: SVGSVGElement | HTMLCanvasElement | HTMLImageElement, target: HTMLElement, format: ScbVizRasterFormat): Promise<string | null>;
|
|
26
|
+
export declare function downloadScbVizBlob(blob: Blob, fileName: string, doc?: Document): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ScbVizResolvedTableView } from './scb-viz-table-runtime.js';
|
|
2
|
+
export interface ScbVizPrintableFooterOptions {
|
|
3
|
+
comment?: string;
|
|
4
|
+
commentLabel: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
descriptionLabel: string;
|
|
7
|
+
escapeHtml: (value: string) => string;
|
|
8
|
+
footnote?: string;
|
|
9
|
+
footnoteLabel: string;
|
|
10
|
+
moreAboutStatsLabel: string;
|
|
11
|
+
officialStatistics?: boolean;
|
|
12
|
+
renderRichTextHtml: (value: string) => string;
|
|
13
|
+
sosLogotypeSvg?: string;
|
|
14
|
+
source?: string;
|
|
15
|
+
sourceLabel: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ScbVizPrintDocumentOptions {
|
|
18
|
+
contentHtml: string;
|
|
19
|
+
escapeHtml: (value: string) => string;
|
|
20
|
+
footerHtml?: string;
|
|
21
|
+
lang?: string;
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ScbVizPrintableTableOptions {
|
|
26
|
+
getEmptyHeaderLabel?: (columnIndex: number) => string;
|
|
27
|
+
}
|
|
28
|
+
export declare function buildScbVizPrintableTableHtml(tableView: ScbVizResolvedTableView, escapeHtml: (value: string) => string, options?: ScbVizPrintableTableOptions): string;
|
|
29
|
+
export declare function buildScbVizPrintableFooterHtml(options: ScbVizPrintableFooterOptions): string;
|
|
30
|
+
export declare function buildScbVizPrintDocumentHtml(options: ScbVizPrintDocumentOptions): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ScbVizSeriesDifferentiationPatternDefinition {
|
|
2
|
+
kind: string;
|
|
3
|
+
appendMarks: (pattern: SVGPatternElement, namespace: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface ScbVizSeriesDifferentiationRegistry {
|
|
6
|
+
dashStyles: string[];
|
|
7
|
+
markerSymbols: string[];
|
|
8
|
+
patterns: ScbVizSeriesDifferentiationPatternDefinition[];
|
|
9
|
+
defaultPatternKind: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ScbVizSeriesDifferentiationVariant {
|
|
12
|
+
dashStyle: string;
|
|
13
|
+
markerSymbol: string;
|
|
14
|
+
patternKind: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const scbVizSeriesDifferentiationRegistry: ScbVizSeriesDifferentiationRegistry;
|
|
17
|
+
export declare function getScbVizSeriesDifferentiationRegistry(): ScbVizSeriesDifferentiationRegistry;
|
|
18
|
+
export declare function getScbVizSeriesDifferentiationPatternKinds(): string[];
|
|
19
|
+
export declare function getScbVizSeriesDifferentiationPatternDefinition(patternKind: string): ScbVizSeriesDifferentiationPatternDefinition;
|
|
20
|
+
export declare function appendScbVizSeriesDifferentiationPatternMarks(pattern: SVGPatternElement, namespace: string, patternKind: string): string;
|
|
21
|
+
export declare function getScbVizSeriesDifferentiationVariant(seriesIndex: number): ScbVizSeriesDifferentiationVariant;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ScbVizSeriesDifferentiationVariant } from './scb-viz-series-differentiation-registry.js';
|
|
2
|
+
export interface ScbVizGroupedSeriesDifferentiationStore {
|
|
3
|
+
indexByKey: Record<string, number>;
|
|
4
|
+
nextIndex: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ScbVizSeriesDifferentiationMetadata {
|
|
7
|
+
role: 'graph' | 'area' | 'fill' | 'legend-symbol' | 'legend-fill';
|
|
8
|
+
dashStyle?: string;
|
|
9
|
+
patternKind?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function getScbVizSeriesDifferentiationVariantByIndex(variantIndex: number): ScbVizSeriesDifferentiationVariant;
|
|
12
|
+
export declare function isScbVizGroupedSeriesDifferentiationChart(series: any, chart: any): any;
|
|
13
|
+
export declare function usesScbVizGroupedPointDifferentiation(series: any): any;
|
|
14
|
+
export declare function getScbVizSeriesDifferentiationColorIndex(target: any): number | null;
|
|
15
|
+
export declare function ensureScbVizGroupedSeriesDifferentiationStore(chart: any): ScbVizGroupedSeriesDifferentiationStore;
|
|
16
|
+
export declare function getScbVizGroupedSeriesDifferentiationKey(target: any, fallbackIndex: number): string;
|
|
17
|
+
export declare function getScbVizGroupedSeriesDifferentiationVariantIndex(target: any, chart: any, fallbackIndex: number): number;
|
|
18
|
+
export declare function getScbVizGroupedSeriesDifferentiationVariant(target: any, chart: any, fallbackIndex: number): {
|
|
19
|
+
dashStyle: string;
|
|
20
|
+
markerSymbol: string;
|
|
21
|
+
patternKind: string;
|
|
22
|
+
variantIndex: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function shouldShowScbVizSeriesDifferentiationAction(options: {
|
|
25
|
+
chart: any;
|
|
26
|
+
getCurrentPrintableView: () => 'diagram' | 'table' | 'image';
|
|
27
|
+
getSeriesDifferentiationGroup: (series: any, chart: any) => string | null;
|
|
28
|
+
isHighchartsStyledMode: (chart: any) => boolean;
|
|
29
|
+
}): any;
|
|
30
|
+
export declare function getScbVizHighchartsSvgElement(target: any): SVGElement | null;
|
|
31
|
+
export declare function isScbVizHighchartsStyledMode(chart: any): boolean;
|
|
32
|
+
export declare function getScbVizHighchartsSvgRoot(chart: any): SVGSVGElement | null;
|
|
33
|
+
export declare function getScbVizHighchartsColorClassName(target: any, fallbackIndex: number): string;
|
|
34
|
+
export declare function setScbVizSeriesDifferentiationMetadata(target: any, metadata: ScbVizSeriesDifferentiationMetadata): void;
|
|
35
|
+
export declare function clearScbVizSeriesDifferentiationMetadata(target: any): void;
|
|
36
|
+
export declare function setScbVizSeriesDifferentiationColorClass(target: any, colorClassName: string): void;
|
|
37
|
+
export declare function clearScbVizSeriesDifferentiationColorClass(target: any): void;
|
|
38
|
+
export declare function getScbVizLegendSeriesDifferentiationTargets(series: any): {
|
|
39
|
+
graphTargets: SVGElement[];
|
|
40
|
+
fillTargets: SVGElement[];
|
|
41
|
+
};
|
|
42
|
+
export declare function ensureScbVizStyledModeSeriesPattern(chart: any, colorClassName: string, patternKind: string): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ScbVizTableCellLike = string | number | null | undefined;
|
|
2
|
+
export interface ScbVizTableCellContentLike {
|
|
3
|
+
html: string;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export type ScbVizRenderableTableCellLike = ScbVizTableCellLike | ScbVizTableCellContentLike;
|
|
7
|
+
export interface ScbVizTableDataLike {
|
|
8
|
+
headers?: ScbVizRenderableTableCellLike[];
|
|
9
|
+
rows: ScbVizRenderableTableCellLike[][];
|
|
10
|
+
rowHeaderRows?: boolean[];
|
|
11
|
+
}
|
|
12
|
+
export type ScbVizTableAlignment = 'left' | 'right';
|
|
13
|
+
export interface ScbVizResolvedTableView {
|
|
14
|
+
alignments: ScbVizTableAlignment[];
|
|
15
|
+
colCount: number;
|
|
16
|
+
headers: ScbVizTableCellContentLike[];
|
|
17
|
+
rows: ScbVizTableCellContentLike[][];
|
|
18
|
+
rowHeaderRows: boolean[];
|
|
19
|
+
}
|
|
20
|
+
export declare function normalizeScbVizRenderableCell(cell: ScbVizRenderableTableCellLike): ScbVizTableCellContentLike;
|
|
21
|
+
export declare function readScbVizTableDataFromSlot(slot?: HTMLSlotElement | null): ScbVizTableDataLike | undefined;
|
|
22
|
+
export declare function inferScbVizTableAlignments(data: ScbVizTableDataLike, parseNumericValue: (value: ScbVizTableCellLike) => number | null): ScbVizTableAlignment[];
|
|
23
|
+
export declare function buildScbVizResolvedTableView(data: ScbVizTableDataLike, options: {
|
|
24
|
+
inferAlignments: (data: ScbVizTableDataLike) => ScbVizTableAlignment[];
|
|
25
|
+
normalizeCell?: (cell: ScbVizRenderableTableCellLike) => ScbVizTableCellContentLike;
|
|
26
|
+
formatCell?: (cell: ScbVizRenderableTableCellLike, columnIndex: number, alignments: ScbVizTableAlignment[]) => ScbVizTableCellContentLike;
|
|
27
|
+
}): ScbVizResolvedTableView;
|
|
28
|
+
export declare function createScbVizCsvRows(data: ScbVizTableDataLike, normalizeCell?: (cell: ScbVizRenderableTableCellLike) => ScbVizTableCellContentLike): string[][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function componentSizeToken(host: Element, token: string, allowedSizes: readonly string[], fallback: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const ensureFocusRingReady: () => void;
|
|
2
|
+
export declare const ensureFocusRingOnFocusVisible: (event: Event) => void;
|
|
3
|
+
export declare const ensureFocusRingOnTab: (event: KeyboardEvent) => void;
|
|
4
|
+
export declare const addLazyFocusRingListeners: (...targets: EventTarget[]) => (() => void);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type LazyRippleElement = HTMLElement & {
|
|
2
|
+
control?: HTMLElement | null;
|
|
3
|
+
hovered?: boolean;
|
|
4
|
+
handlePointerenter?: (event: PointerEvent) => void;
|
|
5
|
+
handlePointerdown?: (event: PointerEvent) => void | Promise<void>;
|
|
6
|
+
handleClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ensureRippleReady: () => Promise<void>;
|
|
9
|
+
export declare const syncRippleToControl: (ripple: LazyRippleElement | null | undefined, control: HTMLElement | null | undefined, event?: PointerEvent, click?: boolean) => Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function openManualPopover(element: HTMLElement | null | undefined, source?: HTMLElement | null, type?: 'manual' | 'hint'): boolean;
|
|
2
|
+
export declare function closeManualPopover(element: HTMLElement | null | undefined): void;
|
|
3
|
+
/** Behåller ytan i top layer tills dess egen stängningsanimation är klar. */
|
|
4
|
+
export declare function closeManualPopoverAfterAnimations(element: HTMLElement | null | undefined, afterClose?: () => void, animationSource?: HTMLElement): void;
|
|
5
|
+
export declare function isManualPopoverOpen(element: HTMLElement | null | undefined): boolean;
|
|
6
|
+
/** Stänger popupytor som annars kan ligga kvar i top layer när en förälder stängs. */
|
|
7
|
+
export declare function closeNestedPopupSurfaces(root: ParentNode): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { nothing } from 'lit';
|
|
2
|
+
export declare function hasScbSvgIcon(name: string | undefined | null): boolean;
|
|
3
|
+
export declare function renderScbIcon(name: string | undefined | null, className?: string, part?: string): typeof nothing | import("lit-html").TemplateResult<2>;
|
|
@@ -105,6 +105,8 @@ var c, l = {
|
|
|
105
105
|
--scb-menu-item-text-line-height: var(--scb-menu-item-design-text-medium-line-height);
|
|
106
106
|
--scb-menu-item-text-letter-spacing: var(--scb-menu-item-design-text-medium-letter-spacing);
|
|
107
107
|
--scb-menu-item-text-font-weight: var(--scb-menu-item-design-text-medium-font-weight);
|
|
108
|
+
display: block;
|
|
109
|
+
min-width: 0;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
:host([expanded]) {
|
|
@@ -118,10 +120,12 @@ var c, l = {
|
|
|
118
120
|
display: flex;
|
|
119
121
|
align-items: center;
|
|
120
122
|
position: relative;
|
|
123
|
+
min-width: 0;
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
.scb-menu-label-text {
|
|
124
|
-
|
|
127
|
+
flex: 1 1 0;
|
|
128
|
+
min-width: 0;
|
|
125
129
|
display: block;
|
|
126
130
|
background: transparent;
|
|
127
131
|
border: 0;
|
|
@@ -153,12 +157,14 @@ var c, l = {
|
|
|
153
157
|
.scb-menu-click {
|
|
154
158
|
display: flex;
|
|
155
159
|
align-items: center;
|
|
160
|
+
min-width: 0;
|
|
156
161
|
gap: var(--scb-menu-item-gap);
|
|
157
162
|
padding-block: var(--scb-menu-item-padding-y);
|
|
158
163
|
padding-inline: var(--scb-menu-item-padding-x);
|
|
159
164
|
border-radius: var(--scb-menu-item-radius);
|
|
160
165
|
position: relative;
|
|
161
166
|
overflow: hidden;
|
|
167
|
+
overflow-wrap: anywhere;
|
|
162
168
|
color: var(--scb-menu-panel-content-color, var(--md-sys-color-on-surface));
|
|
163
169
|
}
|
|
164
170
|
.scb-menu-click.has-icon {
|
package/scb-menu/scb-menu.js
CHANGED
|
@@ -26,6 +26,9 @@ var s = class extends t {
|
|
|
26
26
|
*/
|
|
27
27
|
:host {
|
|
28
28
|
display: block;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
box-sizing: border-box;
|
|
29
32
|
color: var(--scb-menu-panel-content-color, var(--md-sys-color-on-surface));
|
|
30
33
|
padding-block: var(--scb-menu-padding-block, var(--scb-menu-design-panel-padding-block-medium));
|
|
31
34
|
padding-inline: var(--scb-menu-padding-inline, var(--scb-menu-design-panel-padding-inline-medium));
|