@ds-mo/ui 2.10.1 → 2.10.2
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/dist/.build-stamp +1 -1
- package/dist/components/ds-app-shell.js +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-unfilled-icon.js +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-fade.js +1 -1
- package/dist/components/ds-fade.js.map +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-field.js.map +1 -1
- package/dist/components/ds-header.js +1 -1
- package/dist/components/ds-header.js.map +1 -1
- package/dist/components/ds-icon.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-radio-group.js +1 -1
- package/dist/components/ds-scrollbar.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-surface.js +1 -1
- package/dist/components/ds-tab-group-nav.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-toast-provider.js +1 -1
- package/dist/components/ds-toggle.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/{p-BqOChY2z.js → p-B46PyZkE.js} +2 -2
- package/dist/components/{p-Dul5eGGE.js → p-BOLhoDYO.js} +2 -2
- package/dist/components/{p-DSTK6-QR.js → p-BUKwjW6E.js} +2 -2
- package/dist/components/{p-CJubWt1F.js → p-BVg6jstc.js} +2 -2
- package/dist/components/{p-j_GdU4Aa.js → p-ChDonLAn.js} +2 -2
- package/dist/components/p-CkFkSpa6.js +2 -0
- package/dist/components/p-CkFkSpa6.js.map +1 -0
- package/dist/components/{p-evjnuLjj.js → p-CpfTDXDO.js} +2 -2
- package/dist/components/{p-Cynjsv-P.js → p-D3Jehaex.js} +2 -2
- package/dist/components/{p-w2Wrf0jC.js → p-DnaPMGPJ.js} +2 -2
- package/dist/components/p-EK1hOP19.js +2 -0
- package/dist/components/p-EK1hOP19.js.map +1 -0
- package/dist/lib/utils/index.d.ts +2 -2
- package/dist/lib/utils/index.js +62 -3
- package/dist/lib/utils/index.js.map +2 -2
- package/dist/lib/utils/scroll-edge-fade.d.ts +24 -4
- package/dist/types/components/Fade/Fade.d.ts +13 -15
- package/dist/types/components/Fade/index.d.ts +1 -1
- package/dist/types/components/PanelNav/PanelNav.d.ts +0 -3
- package/dist/types/components.d.ts +6 -28
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/scroll-edge-fade.d.ts +24 -4
- package/package.json +1 -1
- package/src/angular/proxies.ts +2 -2
- package/src/wc/components/Fade/Fade.tsx +40 -94
- package/src/wc/components/Fade/index.ts +1 -1
- package/src/wc/components/PanelNav/PanelNav.tsx +2 -20
- package/src/wc/components.d.ts +6 -28
- package/src/wc/utils/index.ts +10 -1
- package/src/wc/utils/scroll-edge-fade.css +6 -4
- package/src/wc/utils/scroll-edge-fade.ts +115 -5
- package/dist/components/p-BFPfyJ8Z.js +0 -2
- package/dist/components/p-BFPfyJ8Z.js.map +0 -1
- package/dist/components/p-BOpHKDOG.js +0 -2
- package/dist/components/p-BOpHKDOG.js.map +0 -1
- /package/dist/components/{p-BqOChY2z.js.map → p-B46PyZkE.js.map} +0 -0
- /package/dist/components/{p-Dul5eGGE.js.map → p-BOLhoDYO.js.map} +0 -0
- /package/dist/components/{p-DSTK6-QR.js.map → p-BUKwjW6E.js.map} +0 -0
- /package/dist/components/{p-CJubWt1F.js.map → p-BVg6jstc.js.map} +0 -0
- /package/dist/components/{p-j_GdU4Aa.js.map → p-ChDonLAn.js.map} +0 -0
- /package/dist/components/{p-evjnuLjj.js.map → p-CpfTDXDO.js.map} +0 -0
- /package/dist/components/{p-Cynjsv-P.js.map → p-D3Jehaex.js.map} +0 -0
- /package/dist/components/{p-w2Wrf0jC.js.map → p-DnaPMGPJ.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as o,c as n,h as l,a as i,t as d}from"./index.js";import{d as e}from"./p-Cynjsv-P.js";const r=()=>`.sc-ds-button-filled-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-button-filled:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-button-filled{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-button-filled:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-button-filled:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-button-filled{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-button-filled::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.sc-ds-button-filled-h{display:inline-flex;flex:0 0 auto;width:var(--dimension-size-400);height:var(--dimension-size-400);min-width:var(--dimension-size-400);min-height:var(--dimension-size-400);outline:none;--ds-button-filled-bg:var(--color-background-bold-brand);--ds-button-filled-fg:var(--color-foreground-faint-brand)}.button-filled.sc-ds-button-filled{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--dimension-space-075);border:none;border-radius:var(--dimension-radius-025);background-color:var(--ds-button-filled-bg);color:var(--ds-button-filled-fg);cursor:pointer;box-sizing:border-box;-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;transition:background-color var(--effect-motion-short-2), color var(--effect-motion-short-2), transform var(--effect-motion-short-2)}.button-filled.sc-ds-button-filled::before,.button-filled.sc-ds-button-filled::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;transition:none}.button-filled.sc-ds-button-filled::before{z-index:1}.button-filled.sc-ds-button-filled::after{z-index:2}.button-filled.sc-ds-button-filled:hover:not(.button-filled--inactive)::before{background:color-mix(in oklch, var(--ds-button-filled-bg) 85%, var(--ds-button-filled-fg))}.button-filled.sc-ds-button-filled:active:not(.button-filled--inactive){transform:scale(var(--dimension-scale-subtle))}.button-filled.sc-ds-button-filled:active:not(.button-filled--inactive)::before{background:color-mix(in oklch, var(--ds-button-filled-bg) 80%, var(--ds-button-filled-fg))}.button-filled--inactive.sc-ds-button-filled{opacity:0.5;cursor:not-allowed;pointer-events:none}.button-filled__icon-wrap.sc-ds-button-filled{position:relative;width:var(--dimension-iconography-md);height:var(--dimension-iconography-md);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;z-index:2}.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-neutral);--ds-button-filled-fg:var(--color-foreground-faint-neutral)}.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-brand);--ds-button-filled-fg:var(--color-foreground-faint-brand)}.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-ai);--ds-button-filled-fg:var(--color-foreground-faint-ai)}.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-negative);--ds-button-filled-fg:var(--color-foreground-faint-negative)}.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-warning);--ds-button-filled-fg:var(--color-foreground-faint-warning)}.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-caution);--ds-button-filled-fg:var(--color-foreground-faint-caution)}.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-positive);--ds-button-filled-fg:var(--color-foreground-faint-positive)}.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-guide);--ds-button-filled-fg:var(--color-foreground-faint-guide)}.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-walkthrough);--ds-button-filled-fg:var(--color-foreground-faint-walkthrough)}.button-filled--contrast-strong.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-neutral);--ds-button-filled-fg:var(--color-foreground-medium-neutral)}.button-filled--contrast-strong.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-brand);--ds-button-filled-fg:var(--color-foreground-medium-brand)}.button-filled--contrast-strong.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-ai);--ds-button-filled-fg:var(--color-foreground-medium-ai)}.button-filled--contrast-strong.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-negative);--ds-button-filled-fg:var(--color-foreground-medium-negative)}.button-filled--contrast-strong.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-warning);--ds-button-filled-fg:var(--color-foreground-medium-warning)}.button-filled--contrast-strong.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-caution);--ds-button-filled-fg:var(--color-foreground-medium-caution)}.button-filled--contrast-strong.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-positive);--ds-button-filled-fg:var(--color-foreground-medium-positive)}.button-filled--contrast-strong.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-guide);--ds-button-filled-fg:var(--color-foreground-medium-guide)}.button-filled--contrast-strong.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-walkthrough);--ds-button-filled-fg:var(--color-foreground-medium-walkthrough)}.button-filled--contrast-medium.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-neutral);--ds-button-filled-fg:var(--color-foreground-strong-neutral)}.button-filled--contrast-medium.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-brand);--ds-button-filled-fg:var(--color-foreground-strong-brand)}.button-filled--contrast-medium.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-ai);--ds-button-filled-fg:var(--color-foreground-strong-ai)}.button-filled--contrast-medium.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-negative);--ds-button-filled-fg:var(--color-foreground-strong-negative)}.button-filled--contrast-medium.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-warning);--ds-button-filled-fg:var(--color-foreground-strong-warning)}.button-filled--contrast-medium.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-caution);--ds-button-filled-fg:var(--color-foreground-strong-caution)}.button-filled--contrast-medium.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-positive);--ds-button-filled-fg:var(--color-foreground-strong-positive)}.button-filled--contrast-medium.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-guide);--ds-button-filled-fg:var(--color-foreground-strong-guide)}.button-filled--contrast-medium.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-walkthrough);--ds-button-filled-fg:var(--color-foreground-strong-walkthrough)}.button-filled--contrast-faint.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-neutral);--ds-button-filled-fg:var(--color-foreground-bold-neutral)}.button-filled--contrast-faint.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-brand);--ds-button-filled-fg:var(--color-foreground-bold-brand)}.button-filled--contrast-faint.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-ai);--ds-button-filled-fg:var(--color-foreground-bold-ai)}.button-filled--contrast-faint.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-negative);--ds-button-filled-fg:var(--color-foreground-bold-negative)}.button-filled--contrast-faint.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-warning);--ds-button-filled-fg:var(--color-foreground-bold-warning)}.button-filled--contrast-faint.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-caution);--ds-button-filled-fg:var(--color-foreground-bold-caution)}.button-filled--contrast-faint.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-positive);--ds-button-filled-fg:var(--color-foreground-bold-positive)}.button-filled--contrast-faint.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-guide);--ds-button-filled-fg:var(--color-foreground-bold-guide)}.button-filled--contrast-faint.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-walkthrough);--ds-button-filled-fg:var(--color-foreground-bold-walkthrough)}`;const s=t(class t extends o{constructor(t){super();if(t!==false){this.__registerHost()}this.dsClick=n(this,"dsClick");this.icon="";this.intent="brand";this.contrast="bold";this.inactive=false;this.type="button";this.ariaLabel="action";this.buttonEl=null;this.handleClick=t=>{if(this.inactive)return;this.dsClick.emit(t)}}async setFocus(){this.buttonEl?.focus()}render(){const t={"button-filled":true,"ds-focus-ring-inset":true,"button-filled--inactive":this.inactive,[`button-filled--intent-${this.intent}`]:true,[`button-filled--contrast-${this.contrast}`]:this.contrast!=="bold"};return l(i,{key:"aec4966e1b9991fd889db25ae02f7fdcc52f553b",tabIndex:-1},l("button",{key:"fb98aafd42093830d8760bff073ad3c99e78e02b",ref:t=>{this.buttonEl=t??null},type:this.type,class:t,disabled:this.inactive,"aria-label":this.ariaLabel,onClick:this.handleClick},l("span",{key:"4122a00b653c487af06589b6d424b5ddf53f6dd1",class:"button-filled__icon-wrap"},l("ds-icon",{key:"e67d2d10871bac70bbb6e7dbe8f8603d817c8af3",name:this.icon,size:"md",color:"inherit"}))))}get el(){return this}static get style(){return r()}},[2,"ds-button-filled",{icon:[1],intent:[1],contrast:[1],inactive:[4],type:[1],ariaLabel:[1,"aria-label"],setFocus:[64]}]);function u(){if(typeof customElements==="undefined"){return}const t=["ds-button-filled","ds-icon"];t.forEach((t=>{switch(t){case"ds-button-filled":if(!customElements.get(d(t))){customElements.define(d(t),s)}break;case"ds-icon":if(!customElements.get(d(t))){e()}break}}))}u();export{s as B,u as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as t,H as o,c as n,h as l,a as i,t as d}from"./index.js";import{d as e}from"./p-D3Jehaex.js";const r=()=>`.sc-ds-button-filled-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-button-filled:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-button-filled{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-button-filled:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-button-filled:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-button-filled{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-button-filled::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.sc-ds-button-filled-h{display:inline-flex;flex:0 0 auto;width:var(--dimension-size-400);height:var(--dimension-size-400);min-width:var(--dimension-size-400);min-height:var(--dimension-size-400);outline:none;--ds-button-filled-bg:var(--color-background-bold-brand);--ds-button-filled-fg:var(--color-foreground-faint-brand)}.button-filled.sc-ds-button-filled{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--dimension-space-075);border:none;border-radius:var(--dimension-radius-025);background-color:var(--ds-button-filled-bg);color:var(--ds-button-filled-fg);cursor:pointer;box-sizing:border-box;-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;transition:background-color var(--effect-motion-short-2), color var(--effect-motion-short-2), transform var(--effect-motion-short-2)}.button-filled.sc-ds-button-filled::before,.button-filled.sc-ds-button-filled::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;transition:none}.button-filled.sc-ds-button-filled::before{z-index:1}.button-filled.sc-ds-button-filled::after{z-index:2}.button-filled.sc-ds-button-filled:hover:not(.button-filled--inactive)::before{background:color-mix(in oklch, var(--ds-button-filled-bg) 85%, var(--ds-button-filled-fg))}.button-filled.sc-ds-button-filled:active:not(.button-filled--inactive){transform:scale(var(--dimension-scale-subtle))}.button-filled.sc-ds-button-filled:active:not(.button-filled--inactive)::before{background:color-mix(in oklch, var(--ds-button-filled-bg) 80%, var(--ds-button-filled-fg))}.button-filled--inactive.sc-ds-button-filled{opacity:0.5;cursor:not-allowed;pointer-events:none}.button-filled__icon-wrap.sc-ds-button-filled{position:relative;width:var(--dimension-iconography-md);height:var(--dimension-iconography-md);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;z-index:2}.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-neutral);--ds-button-filled-fg:var(--color-foreground-faint-neutral)}.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-brand);--ds-button-filled-fg:var(--color-foreground-faint-brand)}.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-ai);--ds-button-filled-fg:var(--color-foreground-faint-ai)}.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-negative);--ds-button-filled-fg:var(--color-foreground-faint-negative)}.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-warning);--ds-button-filled-fg:var(--color-foreground-faint-warning)}.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-caution);--ds-button-filled-fg:var(--color-foreground-faint-caution)}.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-positive);--ds-button-filled-fg:var(--color-foreground-faint-positive)}.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-guide);--ds-button-filled-fg:var(--color-foreground-faint-guide)}.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-bold-walkthrough);--ds-button-filled-fg:var(--color-foreground-faint-walkthrough)}.button-filled--contrast-strong.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-neutral);--ds-button-filled-fg:var(--color-foreground-medium-neutral)}.button-filled--contrast-strong.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-brand);--ds-button-filled-fg:var(--color-foreground-medium-brand)}.button-filled--contrast-strong.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-ai);--ds-button-filled-fg:var(--color-foreground-medium-ai)}.button-filled--contrast-strong.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-negative);--ds-button-filled-fg:var(--color-foreground-medium-negative)}.button-filled--contrast-strong.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-warning);--ds-button-filled-fg:var(--color-foreground-medium-warning)}.button-filled--contrast-strong.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-caution);--ds-button-filled-fg:var(--color-foreground-medium-caution)}.button-filled--contrast-strong.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-positive);--ds-button-filled-fg:var(--color-foreground-medium-positive)}.button-filled--contrast-strong.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-guide);--ds-button-filled-fg:var(--color-foreground-medium-guide)}.button-filled--contrast-strong.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-strong-walkthrough);--ds-button-filled-fg:var(--color-foreground-medium-walkthrough)}.button-filled--contrast-medium.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-neutral);--ds-button-filled-fg:var(--color-foreground-strong-neutral)}.button-filled--contrast-medium.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-brand);--ds-button-filled-fg:var(--color-foreground-strong-brand)}.button-filled--contrast-medium.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-ai);--ds-button-filled-fg:var(--color-foreground-strong-ai)}.button-filled--contrast-medium.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-negative);--ds-button-filled-fg:var(--color-foreground-strong-negative)}.button-filled--contrast-medium.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-warning);--ds-button-filled-fg:var(--color-foreground-strong-warning)}.button-filled--contrast-medium.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-caution);--ds-button-filled-fg:var(--color-foreground-strong-caution)}.button-filled--contrast-medium.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-positive);--ds-button-filled-fg:var(--color-foreground-strong-positive)}.button-filled--contrast-medium.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-guide);--ds-button-filled-fg:var(--color-foreground-strong-guide)}.button-filled--contrast-medium.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-medium-walkthrough);--ds-button-filled-fg:var(--color-foreground-strong-walkthrough)}.button-filled--contrast-faint.button-filled--intent-neutral.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-neutral);--ds-button-filled-fg:var(--color-foreground-bold-neutral)}.button-filled--contrast-faint.button-filled--intent-brand.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-brand);--ds-button-filled-fg:var(--color-foreground-bold-brand)}.button-filled--contrast-faint.button-filled--intent-ai.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-ai);--ds-button-filled-fg:var(--color-foreground-bold-ai)}.button-filled--contrast-faint.button-filled--intent-negative.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-negative);--ds-button-filled-fg:var(--color-foreground-bold-negative)}.button-filled--contrast-faint.button-filled--intent-warning.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-warning);--ds-button-filled-fg:var(--color-foreground-bold-warning)}.button-filled--contrast-faint.button-filled--intent-caution.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-caution);--ds-button-filled-fg:var(--color-foreground-bold-caution)}.button-filled--contrast-faint.button-filled--intent-positive.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-positive);--ds-button-filled-fg:var(--color-foreground-bold-positive)}.button-filled--contrast-faint.button-filled--intent-guide.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-guide);--ds-button-filled-fg:var(--color-foreground-bold-guide)}.button-filled--contrast-faint.button-filled--intent-walkthrough.sc-ds-button-filled{--ds-button-filled-bg:var(--color-background-faint-walkthrough);--ds-button-filled-fg:var(--color-foreground-bold-walkthrough)}`;const s=t(class t extends o{constructor(t){super();if(t!==false){this.__registerHost()}this.dsClick=n(this,"dsClick");this.icon="";this.intent="brand";this.contrast="bold";this.inactive=false;this.type="button";this.ariaLabel="action";this.buttonEl=null;this.handleClick=t=>{if(this.inactive)return;this.dsClick.emit(t)}}async setFocus(){this.buttonEl?.focus()}render(){const t={"button-filled":true,"ds-focus-ring-inset":true,"button-filled--inactive":this.inactive,[`button-filled--intent-${this.intent}`]:true,[`button-filled--contrast-${this.contrast}`]:this.contrast!=="bold"};return l(i,{key:"aec4966e1b9991fd889db25ae02f7fdcc52f553b",tabIndex:-1},l("button",{key:"fb98aafd42093830d8760bff073ad3c99e78e02b",ref:t=>{this.buttonEl=t??null},type:this.type,class:t,disabled:this.inactive,"aria-label":this.ariaLabel,onClick:this.handleClick},l("span",{key:"4122a00b653c487af06589b6d424b5ddf53f6dd1",class:"button-filled__icon-wrap"},l("ds-icon",{key:"e67d2d10871bac70bbb6e7dbe8f8603d817c8af3",name:this.icon,size:"md",color:"inherit"}))))}get el(){return this}static get style(){return r()}},[2,"ds-button-filled",{icon:[1],intent:[1],contrast:[1],inactive:[4],type:[1],ariaLabel:[1,"aria-label"],setFocus:[64]}]);function u(){if(typeof customElements==="undefined"){return}const t=["ds-button-filled","ds-icon"];t.forEach((t=>{switch(t){case"ds-button-filled":if(!customElements.get(d(t))){customElements.define(d(t),s)}break;case"ds-icon":if(!customElements.get(d(t))){e()}break}}))}u();export{s as B,u as d};
|
|
2
|
+
//# sourceMappingURL=p-DnaPMGPJ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as e,H as a,h as n,a as i,t as r}from"./index.js";const d="--_badge-gradient-position";function t(e){const a=e.closest("ds-app-shell");return a?.hasAttribute("gradient")===true}const s=()=>`.sc-ds-badge-h{display:inline-flex;align-items:center;justify-content:center;pointer-events:none;vertical-align:middle;--_badge-bg:var(--color-background-bold-brand);--_badge-fg:var(--color-foreground-on-bold-background-primary);--_badge-ring:var(--color-background-secondary);--_badge-ring-width:var(--dimension-stroke-width-018)}.badge__mark.sc-ds-badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;color:var(--_badge-fg);background:var(--_badge-bg);box-shadow:0 0 0 var(--_badge-ring-width) var(--_badge-ring);white-space:nowrap}.badge--dot.sc-ds-badge-h .badge__mark.sc-ds-badge{width:var(--dimension-size-075);height:var(--dimension-size-075);border-radius:var(--dimension-radius-half)}.badge--counter.sc-ds-badge-h .badge__mark.sc-ds-badge{width:var(--dimension-size-150);height:var(--dimension-size-150);padding:0;border-radius:var(--dimension-radius-half);font-size:var(--typography-fontsize-xs);line-height:1}.badge--selected.sc-ds-badge-h{--_badge-bg:var(--color-foreground-primary)}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge{position:relative;z-index:0;box-shadow:none;isolation:isolate}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::before,.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::after{content:'';position:absolute;inset:calc(-1 * var(--_badge-ring-width));border-radius:inherit;box-sizing:border-box;padding:var(--_badge-ring-width);pointer-events:none;-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::before{z-index:-2;background-color:var(--_badge-ring)}.badge--on-gradient-background.sc-ds-badge-h .badge__mark.sc-ds-badge::after{z-index:-1;background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-position:0 0;background-repeat:no-repeat;background-attachment:fixed;opacity:var(--ds-shell-gradient-opacity, 1)}`;const o={default:"var(--color-background-secondary)",primary:"var(--color-background-primary)",secondary:"var(--color-background-secondary)",medium:"var(--color-background-medium-neutral)",bold:"var(--color-background-bold-neutral)",strong:"var(--color-background-strong-neutral)",navigation:"var(--color-navigation-background)","always-dark":"var(--color-always-dark-background)"};const g=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.variant="counter";this.count=0;this.max=9;this.surface="default";this.gradientBackground=false;this.isSelected=false;this.gradientLayoutVersion=0;this.gradientObserver=null;this.gradientWindowListener=null}componentDidLoad(){this.enableShellGradientRingIfNeeded()}disconnectedCallback(){this.unbindGradientRingSync()}gradientBackgroundChanged(){this.bindGradientRingSync()}enableShellGradientRingIfNeeded(){if(!this.gradientBackground&&t(this.el)){this.gradientBackground=true}if(this.gradientBackground){this.bindGradientRingSync()}}bindGradientRingSync(){this.unbindGradientRingSync();if(!this.gradientBackground)return;const e=()=>{this.gradientLayoutVersion+=1};e();this.gradientWindowListener=e;window.addEventListener("resize",e);if(typeof ResizeObserver!=="undefined"){this.gradientObserver=new ResizeObserver(e);this.gradientObserver.observe(this.el);const a=this.el.closest("ds-app-shell");if(a)this.gradientObserver.observe(a);const n=this.el.closest("ds-bar-nav");if(n)this.gradientObserver.observe(n);const i=this.el.closest("ds-panel-nav");if(i)this.gradientObserver.observe(i)}}unbindGradientRingSync(){if(this.gradientWindowListener){window.removeEventListener("resize",this.gradientWindowListener);this.gradientWindowListener=null}this.gradientObserver?.disconnect();this.gradientObserver=null}ringHostStyle(e){const a={"--_badge-ring":e};if(!this.gradientBackground||!t(this.el))return a;a[d]="0 0";return a}render(){const e=this.variant==="dot";if(!e&&this.count===0)return n(i,{style:{display:"none"}});const a=this.count>this.max?"+":String(this.count);const r=this.label??(e?"Notification":String(this.count));const d=this.background??o[this.surface];return n(i,{class:{badge:true,"badge--counter":!e,"badge--dot":e,"badge--selected":this.isSelected,"badge--on-gradient-background":this.gradientBackground},"aria-label":r,style:this.ringHostStyle(d)},n("span",{class:{badge__mark:true,"text-caption-emphasis":!e},"aria-hidden":"true"},!e&&a))}get el(){return this}static get watchers(){return{gradientBackground:[{gradientBackgroundChanged:0}]}}static get style(){return s()}},[2,"ds-badge",{variant:[1],count:[2],max:[2],surface:[1],background:[1],gradientBackground:[516,"gradient-background"],isSelected:[4,"is-selected"],label:[1],gradientLayoutVersion:[32]},undefined,{gradientBackground:[{gradientBackgroundChanged:0}]}]);function c(){if(typeof customElements==="undefined"){return}const e=["ds-badge"];e.forEach((e=>{switch(e){case"ds-badge":if(!customElements.get(r(e))){customElements.define(r(e),g)}break}}))}c();export{g as B,c as d};
|
|
2
|
+
//# sourceMappingURL=p-EK1hOP19.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BADGE_GRADIENT_POSITION_VAR","isShellGradientActive","from","shell","closest","hasAttribute","badgeCss","SURFACE_RING","default","primary","secondary","medium","bold","strong","navigation","Badge","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","variant","count","max","surface","gradientBackground","isSelected","gradientLayoutVersion","gradientObserver","gradientWindowListener","componentDidLoad","enableShellGradientRingIfNeeded","disconnectedCallback","unbindGradientRingSync","gradientBackgroundChanged","bindGradientRingSync","el","update","window","addEventListener","ResizeObserver","observe","bar","panel","removeEventListener","disconnect","ringHostStyle","ring","style","render","isDot","h","Host","display","String","ariaLabel","label","background","class","badge","badge__mark"],"sources":["src/wc/nav/badge-gradient-ring.ts","src/wc/components/Badge/Badge.css?tag=ds-badge&encapsulation=scoped","src/wc/components/Badge/Badge.tsx"],"sourcesContent":["import {\n SHELL_GRADIENT_POSITION_BAR_VAR,\n SHELL_GRADIENT_POSITION_PANEL_VAR,\n} from './shell-gradient';\n\n/** Per-badge background-position for shell gradient ring sampling. */\nexport const BADGE_GRADIENT_POSITION_VAR = '--_badge-gradient-position';\n\nexport interface GradientSurface {\n element: HTMLElement;\n chromeHost: HTMLElement;\n positionVar: string;\n}\n\n/** Whether the badge sits under `ds-app-shell[gradient]`. */\nexport function isShellGradientActive(from: HTMLElement): boolean {\n // Explicit <HTMLElement>: the inferred HTMLDsAppShellElement type only\n // resolves where @stencil/core types are installed — consumers importing\n // `@ds-mo/ui/nav` (raw TS) compile this without them.\n const shell = from.closest<HTMLElement>('ds-app-shell');\n return shell?.hasAttribute('gradient') === true;\n}\n\n/** Bar or panel chrome surface that owns the shell gradient stack. */\nexport function findGradientSurface(from: HTMLElement): GradientSurface | null {\n const barHost = from.closest('ds-bar-nav') as HTMLElement | null;\n if (barHost) {\n const root = barHost.shadowRoot ?? barHost;\n const element = root.querySelector('.bar-nav');\n if (element) {\n return {\n element: element as HTMLElement,\n chromeHost: barHost,\n positionVar: SHELL_GRADIENT_POSITION_BAR_VAR,\n };\n }\n }\n\n const panelHost = from.closest('ds-panel-nav') as HTMLElement | null;\n if (panelHost) {\n const root = panelHost.shadowRoot ?? panelHost;\n const element = root.querySelector('.panel-nav');\n if (element) {\n return {\n element: element as HTMLElement,\n chromeHost: panelHost,\n positionVar: SHELL_GRADIENT_POSITION_PANEL_VAR,\n };\n }\n }\n\n return null;\n}\n\ninterface ParsedPosition {\n x: number;\n y: number;\n}\n\n/** Parse a two-value CSS background-position (e.g. `-200px 0`). */\nexport function parseCssBackgroundPosition(value: string): ParsedPosition {\n const trimmed = value.trim();\n if (!trimmed) return { x: 0, y: 0 };\n\n const parts = trimmed.split(/\\s+/);\n const x = parseLength(parts[0] ?? '0');\n const y = parseLength(parts[1] ?? '0');\n return { x, y };\n}\n\nfunction parseLength(token: string): number {\n const px = token.match(/^(-?[\\d.]+)px$/);\n if (px) return Number(px[1]);\n return 0;\n}\n\n/**\n * Background position for a badge ring so the shell gradient aligns with nav chrome.\n * Uses badge center relative to the painted chrome surface.\n */\nexport function badgeGradientPosition(\n badgeHost: HTMLElement,\n surface: GradientSurface,\n shellPosition: string,\n): string {\n const badgeRect = badgeHost.getBoundingClientRect();\n const surfaceRect = surface.element.getBoundingClientRect();\n const anchorX = badgeRect.left + badgeRect.width / 2 - surfaceRect.left;\n const anchorY = badgeRect.top + badgeRect.height / 2 - surfaceRect.top;\n const { x, y } = parseCssBackgroundPosition(shellPosition);\n\n return `${Math.round(x - anchorX)}px ${Math.round(y - anchorY)}px`;\n}\n\n/** Resolve shell gradient position from chrome host custom properties. */\nexport function readShellGradientPosition(surface: GradientSurface): string {\n const styles = getComputedStyle(surface.chromeHost);\n return styles.getPropertyValue(surface.positionVar).trim() || '0 0';\n}\n\n/** Stamp `--_badge-gradient-position` on the badge host (fixed viewport chrome). */\nexport function syncBadgeGradientPosition(badgeHost: HTMLElement): void {\n if (!isShellGradientActive(badgeHost)) {\n badgeHost.style.removeProperty(BADGE_GRADIENT_POSITION_VAR);\n return;\n }\n\n badgeHost.style.setProperty(BADGE_GRADIENT_POSITION_VAR, '0 0');\n}\n",":host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n vertical-align: middle;\n\n --_badge-bg: var(--color-background-bold-brand);\n --_badge-fg: var(--color-foreground-on-bold-background-primary);\n --_badge-ring: var(--color-background-secondary);\n --_badge-ring-width: var(--dimension-stroke-width-018);\n}\n\n.badge__mark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n color: var(--_badge-fg);\n background: var(--_badge-bg);\n box-shadow: 0 0 0 var(--_badge-ring-width) var(--_badge-ring);\n white-space: nowrap;\n}\n\n:host(.badge--dot) .badge__mark {\n width: var(--dimension-size-075);\n height: var(--dimension-size-075);\n border-radius: var(--dimension-radius-half);\n}\n\n:host(.badge--counter) .badge__mark {\n width: var(--dimension-size-150);\n height: var(--dimension-size-150);\n padding: 0;\n border-radius: var(--dimension-radius-half);\n font-size: var(--typography-fontsize-xs);\n line-height: 1;\n}\n\n:host(.badge--selected) {\n --_badge-bg: var(--color-foreground-primary);\n}\n\n/* Shell gradient ring — base fill + wash donut (option 3). */\n:host(.badge--on-gradient-background) .badge__mark {\n position: relative;\n z-index: 0;\n box-shadow: none;\n isolation: isolate;\n}\n\n:host(.badge--on-gradient-background) .badge__mark::before,\n:host(.badge--on-gradient-background) .badge__mark::after {\n content: '';\n position: absolute;\n inset: calc(-1 * var(--_badge-ring-width));\n border-radius: inherit;\n box-sizing: border-box;\n padding: var(--_badge-ring-width);\n pointer-events: none;\n -webkit-mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n mask-composite: exclude;\n}\n\n:host(.badge--on-gradient-background) .badge__mark::before {\n z-index: -2;\n background-color: var(--_badge-ring);\n}\n\n:host(.badge--on-gradient-background) .badge__mark::after {\n z-index: -1;\n background-image: var(--ds-shell-gradient-image, none);\n background-size: var(--ds-shell-gradient-size, auto);\n background-position: 0 0;\n background-repeat: no-repeat;\n background-attachment: fixed;\n opacity: var(--ds-shell-gradient-opacity, 1);\n}\n","import { Component, Prop, Element, State, Watch, h, Host } from '@stencil/core';\nimport {\n BADGE_GRADIENT_POSITION_VAR,\n isShellGradientActive,\n} from '../../nav/badge-gradient-ring';\n\nexport type BadgeVariant = 'counter' | 'dot';\nexport type BadgeSurface =\n | 'default'\n | 'primary'\n | 'secondary'\n | 'medium'\n | 'bold'\n | 'strong'\n | 'navigation'\n | 'always-dark';\n\nconst SURFACE_RING: Record<BadgeSurface, string> = {\n default: 'var(--color-background-secondary)',\n primary: 'var(--color-background-primary)',\n secondary: 'var(--color-background-secondary)',\n medium: 'var(--color-background-medium-neutral)',\n bold: 'var(--color-background-bold-neutral)',\n strong: 'var(--color-background-strong-neutral)',\n navigation: 'var(--color-navigation-background)',\n 'always-dark': 'var(--color-always-dark-background)',\n};\n\n@Component({\n tag: 'ds-badge',\n styleUrl: 'Badge.css',\n scoped: true,\n})\nexport class Badge {\n @Element() el!: HTMLElement;\n\n /** Render as a compact counter or notification dot. */\n @Prop() variant: BadgeVariant = 'counter';\n\n /** Count shown for counter badges. Count 0 hides the badge. */\n @Prop() count: number = 0;\n\n /** Highest count shown before compacting to \"+\". */\n @Prop() max: number = 9;\n\n /** Surface context for the ring around dots. */\n @Prop() surface: BadgeSurface = 'default';\n\n /** Direct ring background override for component-local surfaces. */\n @Prop() background: string | undefined;\n\n /**\n * Ring samples the shell gradient stack (base fill + wash) instead of a flat\n * `box-shadow`. Auto-enabled in `componentDidLoad` under `ds-app-shell[gradient]`;\n * set `gradient-background` to opt in/out explicitly.\n *\n * The attribute must NOT start with `on` — Stencil's setAccessor routes any\n * unknown `on*` member down the event-listener path during attribute\n * reflection, calling addEventListener with a non-listener and throwing.\n */\n @Prop({ attribute: 'gradient-background', reflect: true }) gradientBackground: boolean = false;\n\n /** Deprecated alias for selected counter styling. Prefer context-specific color in the parent. */\n @Prop() isSelected: boolean = false;\n\n /** Accessible label. Defaults to the count as a string. */\n @Prop() label: string | undefined;\n\n /** Bumps on resize/layout so render recomputes gradient ring position. */\n @State() private gradientLayoutVersion = 0;\n\n private gradientObserver: ResizeObserver | null = null;\n private gradientWindowListener: (() => void) | null = null;\n\n componentDidLoad() {\n this.enableShellGradientRingIfNeeded();\n }\n\n disconnectedCallback() {\n this.unbindGradientRingSync();\n }\n\n @Watch('gradientBackground')\n gradientBackgroundChanged() {\n this.bindGradientRingSync();\n }\n\n /** Imperative opt-in avoids Stencil aborting parent render for nested badges. */\n private enableShellGradientRingIfNeeded() {\n if (!this.gradientBackground && isShellGradientActive(this.el)) {\n this.gradientBackground = true;\n }\n\n if (this.gradientBackground) {\n this.bindGradientRingSync();\n }\n }\n\n private bindGradientRingSync() {\n this.unbindGradientRingSync();\n\n if (!this.gradientBackground) return;\n\n const update = () => {\n this.gradientLayoutVersion += 1;\n };\n update();\n\n this.gradientWindowListener = update;\n window.addEventListener('resize', update);\n\n if (typeof ResizeObserver !== 'undefined') {\n this.gradientObserver = new ResizeObserver(update);\n this.gradientObserver.observe(this.el);\n\n const shell = this.el.closest('ds-app-shell');\n if (shell) this.gradientObserver.observe(shell);\n\n const bar = this.el.closest('ds-bar-nav');\n if (bar) this.gradientObserver.observe(bar);\n\n const panel = this.el.closest('ds-panel-nav');\n if (panel) this.gradientObserver.observe(panel);\n }\n }\n\n private unbindGradientRingSync() {\n if (this.gradientWindowListener) {\n window.removeEventListener('resize', this.gradientWindowListener);\n this.gradientWindowListener = null;\n }\n\n this.gradientObserver?.disconnect();\n this.gradientObserver = null;\n }\n\n private ringHostStyle(ring: string): Record<string, string> {\n void this.gradientLayoutVersion;\n\n const style: Record<string, string> = { '--_badge-ring': ring };\n if (!this.gradientBackground || !isShellGradientActive(this.el)) return style;\n\n /* Shell chrome wash uses background-attachment: fixed at viewport origin. */\n style[BADGE_GRADIENT_POSITION_VAR] = '0 0';\n return style;\n }\n\n render() {\n const isDot = this.variant === 'dot';\n\n if (!isDot && this.count === 0) return <Host style={{ display: 'none' }} />;\n\n const display = this.count > this.max ? '+' : String(this.count);\n const ariaLabel = this.label ?? (isDot ? 'Notification' : String(this.count));\n const ring = this.background ?? SURFACE_RING[this.surface];\n\n return (\n <Host\n class={{\n badge: true,\n 'badge--counter': !isDot,\n 'badge--dot': isDot,\n 'badge--selected': this.isSelected,\n 'badge--on-gradient-background': this.gradientBackground,\n }}\n aria-label={ariaLabel}\n style={this.ringHostStyle(ring)}\n >\n <span\n class={{\n 'badge__mark': true,\n 'text-caption-emphasis': !isDot,\n }}\n aria-hidden=\"true\"\n >\n {!isDot && display}\n </span>\n </Host>\n );\n }\n}\n"],"mappings":"2DAMO,MAAMA,EAA8B,6BASrC,SAAUC,EAAsBC,GAIpC,MAAMC,EAAQD,EAAKE,QAAqB,gBACxC,OAAOD,GAAOE,aAAa,cAAgB,IAC7C,CCrBA,MAAMC,EAAW,IAAM,ymECiBvB,MAAMC,EAA6C,CACjDC,QAAS,oCACTC,QAAS,kCACTC,UAAW,oCACXC,OAAQ,yCACRC,KAAM,uCACNC,OAAQ,yCACRC,WAAY,qCACZ,cAAe,uC,MAQJC,EAAKC,EAAA,MAAAD,UAAAE,EALlB,WAAAC,CAAAC,G,4CASUC,KAAAC,QAAwB,UAGxBD,KAAAE,MAAgB,EAGhBF,KAAAG,IAAc,EAGdH,KAAAI,QAAwB,UAc2BJ,KAAAK,mBAA8B,MAGjFL,KAAAM,WAAsB,MAMbN,KAAAO,sBAAwB,EAEjCP,KAAAQ,iBAA0C,KAC1CR,KAAAS,uBAA8C,IA4GvD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,QAAU,EAAG,OAAO6B,EAACC,EAAI,CAACJ,MAAO,CAAEK,QAAS,UAE/D,MAAMA,EAAUjC,KAAKE,MAAQF,KAAKG,IAAM,IAAM+B,OAAOlC,KAAKE,OAC1D,MAAMiC,EAAYnC,KAAKoC,QAAUN,EAAQ,eAAiBI,OAAOlC,KAAKE,QACtE,MAAMyB,EAAO3B,KAAKqC,YAAclD,EAAaa,KAAKI,SAElD,OACE2B,EAACC,EAAI,CACHM,MAAO,CACLC,MAAO,KACP,kBAAmBT,EACnB,aAAcA,EACd,kBAAmB9B,KAAKM,WACxB,gCAAiCN,KAAKK,oBACvC,aACW8B,EACZP,MAAO5B,KAAK0B,cAAcC,IAE1BI,EAAA,QACEO,MAAO,CACLE,YAAe,KACf,yBAA0BV,GAC3B,cACW,SAEVA,GAASG,G","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { registerIcons } from '../components/Icon/icon-cache';
|
|
2
2
|
export { clearCssLengthPxCache, resolveCssLengthPx } from './resolve-css-length-px';
|
|
3
3
|
export { parseCssTimeMs, resolveCssTimeMs } from './resolve-css-time-ms';
|
|
4
|
-
export { SCROLL_EDGE_FADE_DEFAULT_SIZE, SCROLL_EDGE_FADE_SIZE_VAR, scrollEdgeFadeMaskImage, scrollEdgeFadeMaskStyle, } from './scroll-edge-fade';
|
|
5
|
-
export type { ScrollEdgeFadeEdge } from './scroll-edge-fade';
|
|
4
|
+
export { SCROLL_EDGE_FADE_DEFAULT_SIZE, SCROLL_EDGE_FADE_SIZE_VAR, isScrollAtEdge, resolveScrollEdgeFadeSize, scrollEdgeFadeClassMap, scrollEdgeFadeMaskImage, scrollEdgeFadeMaskStyle, scrollEdgeFadeSizeStyle, } from './scroll-edge-fade';
|
|
5
|
+
export type { ScrollEdgeFadeEdge, ScrollEdgeFadeOptions, ScrollEdgeFadeSize, ScrollEdgeFadeSizeToken, } from './scroll-edge-fade';
|
|
6
6
|
export { TOKEN_DEFAULTS, TOKEN_CSS_LENGTHS } from './token-defaults';
|
|
7
7
|
export type { TokenDefaultKey } from './token-defaults';
|
package/dist/lib/utils/index.js
CHANGED
|
@@ -96,7 +96,30 @@ function resolveCssTimeMs(value, fallbackToken) {
|
|
|
96
96
|
// src/wc/utils/scroll-edge-fade.ts
|
|
97
97
|
var SCROLL_EDGE_FADE_SIZE_VAR = "--ds-scroll-edge-fade-size";
|
|
98
98
|
var SCROLL_EDGE_FADE_DEFAULT_SIZE = "var(--dimension-size-600)";
|
|
99
|
+
var SIZE_VALUE = {
|
|
100
|
+
"size-000": "var(--dimension-size-000)",
|
|
101
|
+
"size-050": "var(--dimension-size-050)",
|
|
102
|
+
"size-075": "var(--dimension-size-075)",
|
|
103
|
+
"size-100": "var(--dimension-size-100)",
|
|
104
|
+
"size-150": "var(--dimension-size-150)",
|
|
105
|
+
"size-200": "var(--dimension-size-200)",
|
|
106
|
+
"size-250": "var(--dimension-size-250)",
|
|
107
|
+
"size-300": "var(--dimension-size-300)",
|
|
108
|
+
"size-400": "var(--dimension-size-400)",
|
|
109
|
+
"size-500": "var(--dimension-size-500)",
|
|
110
|
+
"size-600": "var(--dimension-size-600)",
|
|
111
|
+
"size-800": "var(--dimension-size-800)"
|
|
112
|
+
};
|
|
99
113
|
var SIZE_REF = `var(${SCROLL_EDGE_FADE_SIZE_VAR}, ${SCROLL_EDGE_FADE_DEFAULT_SIZE})`;
|
|
114
|
+
function resolveScrollEdgeFadeSize(size = "size-600", height) {
|
|
115
|
+
if (height) return height;
|
|
116
|
+
return Object.prototype.hasOwnProperty.call(SIZE_VALUE, size) ? SIZE_VALUE[size] : size;
|
|
117
|
+
}
|
|
118
|
+
function scrollEdgeFadeSizeStyle(size = "size-600", height) {
|
|
119
|
+
return {
|
|
120
|
+
[SCROLL_EDGE_FADE_SIZE_VAR]: resolveScrollEdgeFadeSize(size, height)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
100
123
|
function scrollEdgeFadeMaskImage(edge) {
|
|
101
124
|
switch (edge) {
|
|
102
125
|
case "top":
|
|
@@ -109,16 +132,48 @@ function scrollEdgeFadeMaskImage(edge) {
|
|
|
109
132
|
return `linear-gradient(to left, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;
|
|
110
133
|
}
|
|
111
134
|
}
|
|
112
|
-
function scrollEdgeFadeMaskStyle(edge) {
|
|
135
|
+
function scrollEdgeFadeMaskStyle(edge, size = "size-600", height) {
|
|
113
136
|
const mask = scrollEdgeFadeMaskImage(edge);
|
|
114
137
|
return {
|
|
115
|
-
|
|
138
|
+
...scrollEdgeFadeSizeStyle(size, height),
|
|
116
139
|
WebkitMaskImage: mask,
|
|
117
140
|
maskImage: mask,
|
|
118
141
|
WebkitMaskSize: "100% 100%",
|
|
119
142
|
maskSize: "100% 100%"
|
|
120
143
|
};
|
|
121
144
|
}
|
|
145
|
+
function scrollEdgeFadeClassMap(opts) {
|
|
146
|
+
const edges = Array.isArray(opts.edges) ? opts.edges : [opts.edges];
|
|
147
|
+
const classes = {
|
|
148
|
+
"scroll-edge-fade": true,
|
|
149
|
+
"scroll-edge-fade--hidden": opts.hidden === true
|
|
150
|
+
};
|
|
151
|
+
for (const edge of edges) {
|
|
152
|
+
classes[`scroll-edge-fade--${edge}`] = true;
|
|
153
|
+
}
|
|
154
|
+
const { atEnd } = opts;
|
|
155
|
+
if (atEnd === true) {
|
|
156
|
+
classes["scroll-edge-fade--at-end"] = true;
|
|
157
|
+
} else if (atEnd && typeof atEnd === "object") {
|
|
158
|
+
const allAtEnd = edges.every((edge) => atEnd[edge]);
|
|
159
|
+
if (allAtEnd) {
|
|
160
|
+
classes["scroll-edge-fade--at-end"] = true;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return classes;
|
|
164
|
+
}
|
|
165
|
+
function isScrollAtEdge(el, edge, threshold = 2) {
|
|
166
|
+
switch (edge) {
|
|
167
|
+
case "top":
|
|
168
|
+
return el.scrollTop <= threshold;
|
|
169
|
+
case "bottom":
|
|
170
|
+
return el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;
|
|
171
|
+
case "left":
|
|
172
|
+
return el.scrollLeft <= threshold;
|
|
173
|
+
case "right":
|
|
174
|
+
return el.scrollWidth - el.scrollLeft - el.clientWidth <= threshold;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
122
177
|
|
|
123
178
|
// src/wc/utils/token-defaults.ts
|
|
124
179
|
import {
|
|
@@ -178,11 +233,15 @@ export {
|
|
|
178
233
|
TOKEN_CSS_LENGTHS,
|
|
179
234
|
TOKEN_DEFAULTS,
|
|
180
235
|
clearCssLengthPxCache,
|
|
236
|
+
isScrollAtEdge,
|
|
181
237
|
parseCssTimeMs,
|
|
182
238
|
registerIcons,
|
|
183
239
|
resolveCssLengthPx,
|
|
184
240
|
resolveCssTimeMs,
|
|
241
|
+
resolveScrollEdgeFadeSize,
|
|
242
|
+
scrollEdgeFadeClassMap,
|
|
185
243
|
scrollEdgeFadeMaskImage,
|
|
186
|
-
scrollEdgeFadeMaskStyle
|
|
244
|
+
scrollEdgeFadeMaskStyle,
|
|
245
|
+
scrollEdgeFadeSizeStyle
|
|
187
246
|
};
|
|
188
247
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/wc/components/Icon/icon-cache.ts", "../../../src/wc/utils/resolve-css-length-px.ts", "../../../src/wc/utils/resolve-css-time-ms.ts", "../../../src/wc/utils/scroll-edge-fade.ts", "../../../src/wc/utils/token-defaults.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Shared SVG glyph cache for ds-icon.\n *\n * Keyed on a global symbol so every module instance (the compiled Stencil chunk\n * inside dist/components and any direct source import, e.g. via `@ds-mo/ui/utils`)\n * reads and writes the same cache. Without this, `registerIcons` called from an\n * app would fill a different Map than the one ds-icon resolves from.\n */\nconst CACHE_KEY = Symbol.for('ds-mo.icon-svg-cache');\n\ntype IconCacheMap = Map<string, string>;\n\ntype GlobalWithIconCache = { [CACHE_KEY]?: IconCacheMap };\n\nexport function iconCacheKey(name: string, flag: boolean): string {\n return flag ? `flag:${name}` : `system:${name}`;\n}\n\nexport function iconCache(): IconCacheMap {\n const g = globalThis as GlobalWithIconCache;\n return (g[CACHE_KEY] ??= new Map());\n}\n\n/**\n * Pre-register glyphs so ds-icon renders them synchronously \u2014 no lazy-chunk\n * fetch, no first-paint pop-in. Import the SVG strings from `@ds-mo/icons`\n * in the app (statically, so they ship in the app's own bundle):\n *\n * ```ts\n * import { Bell } from '@ds-mo/icons/svg/Bell';\n * import { US } from '@ds-mo/icons/svg/flags/US';\n * import { registerIcons } from '@ds-mo/ui/utils';\n *\n * registerIcons({ Bell });\n * registerIcons({ US }, { flag: true });\n * ```\n *\n * Icons that are not registered still work \u2014 they lazy-load on first render\n * and stay cached afterwards.\n */\nexport function registerIcons(icons: Record<string, string>, options?: { flag?: boolean }): void {\n const cache = iconCache();\n const flag = options?.flag === true;\n for (const [name, svg] of Object.entries(icons)) {\n cache.set(iconCacheKey(name, flag), svg);\n }\n}\n", "const lengthPxCache = new Map<string, number>();\n\nlet probeEl: HTMLElement | null = null;\n\nfunction getProbeElement(): HTMLElement | null {\n if (typeof document === 'undefined') return null;\n\n if (!probeEl) {\n probeEl = document.createElement('div');\n probeEl.setAttribute('aria-hidden', 'true');\n probeEl.style.cssText =\n 'position:absolute;visibility:hidden;pointer-events:none;top:0;left:0;width:0;height:0;overflow:hidden;';\n document.documentElement.appendChild(probeEl);\n }\n\n return probeEl;\n}\n\n/** Clear session cache (tests only). */\nexport function clearCssLengthPxCache(): void {\n lengthPxCache.clear();\n}\n\n/**\n * Resolve a CSS length to pixels for layout math.\n * Numbers pass through; `var(--dimension-*)`, `calc(...)`, and `16px` resolve via a hidden probe.\n */\nexport function resolveCssLengthPx(\n value: number | string | undefined,\n fallback: number | string,\n): number {\n const resolved = value === undefined || value === null || value === '' ? fallback : value;\n if (typeof resolved === 'number') return resolved;\n\n const trimmed = resolved.trim();\n if (!trimmed) return resolveCssLengthPx(fallback, 0);\n\n const cached = lengthPxCache.get(trimmed);\n if (cached !== undefined) return cached;\n\n if (/^-?\\d+(\\.\\d+)?$/.test(trimmed)) {\n const n = Number(trimmed);\n lengthPxCache.set(trimmed, n);\n return n;\n }\n\n const pxMatch = trimmed.match(/^(-?\\d+(\\.\\d+)?)px$/);\n if (pxMatch) {\n const px = parseFloat(pxMatch[1]);\n lengthPxCache.set(trimmed, px);\n return px;\n }\n\n const cssLength = /^--[\\w-]+$/.test(trimmed) ? `var(${trimmed})` : trimmed;\n\n const probe = getProbeElement();\n if (!probe) {\n return typeof fallback === 'number' ? fallback : 0;\n }\n\n probe.style.width = cssLength;\n const px = probe.getBoundingClientRect().width;\n probe.style.width = '';\n lengthPxCache.set(trimmed, px);\n return px;\n}\n", "/** Parse a CSS <time> value (or motion shorthand's first token) to milliseconds. */\nexport function parseCssTimeMs(value: string, fallback: number): number {\n const firstToken = value.trim().split(/\\s+/)[0] ?? '';\n const num = parseFloat(firstToken);\n if (Number.isNaN(num)) return fallback;\n if (/ms\\s*$/.test(firstToken)) return num;\n if (/s\\s*$/.test(firstToken)) return num * 1000;\n return num;\n}\n\nfunction extractCssCustomProp(ref: string): string | null {\n const varMatch = ref.match(/^var\\(\\s*(--[^),]+)/);\n if (varMatch) return varMatch[1].trim();\n if (ref.startsWith('--')) return ref.trim();\n return null;\n}\n\nfunction readTokenTimeMs(token: string, fallback: number): number {\n if (typeof document === 'undefined') return fallback;\n\n const prop = extractCssCustomProp(token);\n if (!prop) return parseCssTimeMs(token, fallback);\n\n const raw = getComputedStyle(document.documentElement).getPropertyValue(prop).trim();\n return parseCssTimeMs(raw, fallback);\n}\n\n/**\n * Resolve a duration to milliseconds for JS timers aligned with CSS motion tokens.\n * Accepts numbers (ms), raw times (`200ms`, `0.75s`), or `var(--effect-*)` references.\n */\nexport function resolveCssTimeMs(\n value: number | string | undefined,\n fallbackToken: string,\n): number {\n if (typeof value === 'number') return value;\n\n const token = typeof value === 'string' && value.trim() ? value.trim() : fallbackToken;\n const prop = extractCssCustomProp(token);\n\n if (prop) {\n return readTokenTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n }\n\n return parseCssTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n}\n", "/** CSS custom property for scroll-edge fade depth (dimension token or length). */\nexport const SCROLL_EDGE_FADE_SIZE_VAR = '--ds-scroll-edge-fade-size';\n\nexport const SCROLL_EDGE_FADE_DEFAULT_SIZE = 'var(--dimension-size-600)';\n\nexport type ScrollEdgeFadeEdge = 'top' | 'bottom' | 'left' | 'right';\n\nconst SIZE_REF = `var(${SCROLL_EDGE_FADE_SIZE_VAR}, ${SCROLL_EDGE_FADE_DEFAULT_SIZE})`;\n\n/**\n * Alpha mask for a scroll container edge \u2014 content fades to transparent so\n * textured backgrounds (gradients, images) show through. Prefer over painted\n * `ds-fade` overlays on non-flat surfaces.\n */\nexport function scrollEdgeFadeMaskImage(edge: ScrollEdgeFadeEdge): string {\n switch (edge) {\n case 'top':\n return `linear-gradient(to bottom, #000 0, #000 50%, transparent 100%)`;\n case 'bottom':\n return `linear-gradient(to bottom, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'left':\n return `linear-gradient(to right, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'right':\n return `linear-gradient(to left, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n }\n}\n\n/** Inline style map for a masked scroll region. */\nexport function scrollEdgeFadeMaskStyle(edge: ScrollEdgeFadeEdge): Record<string, string> {\n const mask = scrollEdgeFadeMaskImage(edge);\n return {\n [SCROLL_EDGE_FADE_SIZE_VAR]: SCROLL_EDGE_FADE_DEFAULT_SIZE,\n WebkitMaskImage: mask,\n maskImage: mask,\n WebkitMaskSize: '100% 100%',\n maskSize: '100% 100%',\n };\n}\n", "import {\n dimensionIconographyMd,\n dimensionIconographySm,\n dimensionIconographyXs,\n dimensionMenuWidthXs,\n dimensionPanelWidth2xs,\n dimensionPanelWidthLg,\n dimensionPanelWidthMd,\n dimensionSize300,\n dimensionSize600,\n dimensionSize800,\n dimensionSpace050,\n dimensionSpace200,\n effectAnimationDelayLong2,\n effectAnimationDelayMedium1,\n effectAnimationDelayShort2,\n effectAnimationDurationMedium1,\n effectAnimationDurationShort3,\n effectMotionShort2,\n effectMotionShort3,\n} from '@ds-mo/tokens/ts';\n\n/** TokoMo CSS custom-property names for shared component defaults (runtime resolution). */\nexport const TOKEN_DEFAULTS = {\n space050: dimensionSpace050,\n space200: dimensionSpace200,\n size300: dimensionSize300,\n size600: dimensionSize600,\n size800: dimensionSize800,\n iconographyMd: dimensionIconographyMd,\n iconographySm: dimensionIconographySm,\n iconographyXs: dimensionIconographyXs,\n panelWidth2xs: dimensionPanelWidth2xs,\n panelWidthMd: dimensionPanelWidthMd,\n panelWidthLg: dimensionPanelWidthLg,\n menuWidthXs: dimensionMenuWidthXs,\n motionShort2: effectMotionShort2,\n motionShort3: effectMotionShort3,\n animationDurationShort3: effectAnimationDurationShort3,\n animationDurationMedium1: effectAnimationDurationMedium1,\n animationDelayMedium1: effectAnimationDelayMedium1,\n animationDelayShort2: effectAnimationDelayShort2,\n animationDelayLong2: effectAnimationDelayLong2,\n /** Unmeasured menu height fallback: 20\u00D7 base (160px at default scale). */\n menuFallbackHeight: 'calc(var(--dimension-size-base) * 20)',\n /** Unmeasured tooltip width fallback: size-800 + size-200 (80px). */\n tooltipFallbackWidth: 'calc(var(--dimension-size-800) + var(--dimension-size-200))',\n} as const;\n\nexport type TokenDefaultKey = keyof typeof TOKEN_DEFAULTS;\n\n/** Valid CSS length strings for overlay offset props \u2014 bind on `sideOffset` / `alignOffset` in hosts. */\nexport const TOKEN_CSS_LENGTHS = {\n space050: `var(${dimensionSpace050})`,\n space200: `var(${dimensionSpace200})`,\n menuWidthXs: `var(${dimensionMenuWidthXs})`,\n} as const;\n"],
|
|
5
|
-
"mappings": ";AAQA,IAAM,YAAY,uBAAO,IAAI,s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QAAM,OAAO,qBAAqB,KAAK;AAEvC,MAAI,MAAM;AACR,WAAO,gBAAgB,OAAO,gBAAgB,eAAe,GAAG,CAAC;AAAA,EACnE;AAEA,SAAO,eAAe,OAAO,gBAAgB,eAAe,GAAG,CAAC;AAClE;;;AC5CO,IAAM,4BAA4B;AAElC,IAAM,gCAAgC;
|
|
4
|
+
"sourcesContent": ["/**\n * Shared SVG glyph cache for ds-icon.\n *\n * Keyed on a global symbol so every module instance (the compiled Stencil chunk\n * inside dist/components and any direct source import, e.g. via `@ds-mo/ui/utils`)\n * reads and writes the same cache. Without this, `registerIcons` called from an\n * app would fill a different Map than the one ds-icon resolves from.\n */\nconst CACHE_KEY = Symbol.for('ds-mo.icon-svg-cache');\n\ntype IconCacheMap = Map<string, string>;\n\ntype GlobalWithIconCache = { [CACHE_KEY]?: IconCacheMap };\n\nexport function iconCacheKey(name: string, flag: boolean): string {\n return flag ? `flag:${name}` : `system:${name}`;\n}\n\nexport function iconCache(): IconCacheMap {\n const g = globalThis as GlobalWithIconCache;\n return (g[CACHE_KEY] ??= new Map());\n}\n\n/**\n * Pre-register glyphs so ds-icon renders them synchronously \u2014 no lazy-chunk\n * fetch, no first-paint pop-in. Import the SVG strings from `@ds-mo/icons`\n * in the app (statically, so they ship in the app's own bundle):\n *\n * ```ts\n * import { Bell } from '@ds-mo/icons/svg/Bell';\n * import { US } from '@ds-mo/icons/svg/flags/US';\n * import { registerIcons } from '@ds-mo/ui/utils';\n *\n * registerIcons({ Bell });\n * registerIcons({ US }, { flag: true });\n * ```\n *\n * Icons that are not registered still work \u2014 they lazy-load on first render\n * and stay cached afterwards.\n */\nexport function registerIcons(icons: Record<string, string>, options?: { flag?: boolean }): void {\n const cache = iconCache();\n const flag = options?.flag === true;\n for (const [name, svg] of Object.entries(icons)) {\n cache.set(iconCacheKey(name, flag), svg);\n }\n}\n", "const lengthPxCache = new Map<string, number>();\n\nlet probeEl: HTMLElement | null = null;\n\nfunction getProbeElement(): HTMLElement | null {\n if (typeof document === 'undefined') return null;\n\n if (!probeEl) {\n probeEl = document.createElement('div');\n probeEl.setAttribute('aria-hidden', 'true');\n probeEl.style.cssText =\n 'position:absolute;visibility:hidden;pointer-events:none;top:0;left:0;width:0;height:0;overflow:hidden;';\n document.documentElement.appendChild(probeEl);\n }\n\n return probeEl;\n}\n\n/** Clear session cache (tests only). */\nexport function clearCssLengthPxCache(): void {\n lengthPxCache.clear();\n}\n\n/**\n * Resolve a CSS length to pixels for layout math.\n * Numbers pass through; `var(--dimension-*)`, `calc(...)`, and `16px` resolve via a hidden probe.\n */\nexport function resolveCssLengthPx(\n value: number | string | undefined,\n fallback: number | string,\n): number {\n const resolved = value === undefined || value === null || value === '' ? fallback : value;\n if (typeof resolved === 'number') return resolved;\n\n const trimmed = resolved.trim();\n if (!trimmed) return resolveCssLengthPx(fallback, 0);\n\n const cached = lengthPxCache.get(trimmed);\n if (cached !== undefined) return cached;\n\n if (/^-?\\d+(\\.\\d+)?$/.test(trimmed)) {\n const n = Number(trimmed);\n lengthPxCache.set(trimmed, n);\n return n;\n }\n\n const pxMatch = trimmed.match(/^(-?\\d+(\\.\\d+)?)px$/);\n if (pxMatch) {\n const px = parseFloat(pxMatch[1]);\n lengthPxCache.set(trimmed, px);\n return px;\n }\n\n const cssLength = /^--[\\w-]+$/.test(trimmed) ? `var(${trimmed})` : trimmed;\n\n const probe = getProbeElement();\n if (!probe) {\n return typeof fallback === 'number' ? fallback : 0;\n }\n\n probe.style.width = cssLength;\n const px = probe.getBoundingClientRect().width;\n probe.style.width = '';\n lengthPxCache.set(trimmed, px);\n return px;\n}\n", "/** Parse a CSS <time> value (or motion shorthand's first token) to milliseconds. */\nexport function parseCssTimeMs(value: string, fallback: number): number {\n const firstToken = value.trim().split(/\\s+/)[0] ?? '';\n const num = parseFloat(firstToken);\n if (Number.isNaN(num)) return fallback;\n if (/ms\\s*$/.test(firstToken)) return num;\n if (/s\\s*$/.test(firstToken)) return num * 1000;\n return num;\n}\n\nfunction extractCssCustomProp(ref: string): string | null {\n const varMatch = ref.match(/^var\\(\\s*(--[^),]+)/);\n if (varMatch) return varMatch[1].trim();\n if (ref.startsWith('--')) return ref.trim();\n return null;\n}\n\nfunction readTokenTimeMs(token: string, fallback: number): number {\n if (typeof document === 'undefined') return fallback;\n\n const prop = extractCssCustomProp(token);\n if (!prop) return parseCssTimeMs(token, fallback);\n\n const raw = getComputedStyle(document.documentElement).getPropertyValue(prop).trim();\n return parseCssTimeMs(raw, fallback);\n}\n\n/**\n * Resolve a duration to milliseconds for JS timers aligned with CSS motion tokens.\n * Accepts numbers (ms), raw times (`200ms`, `0.75s`), or `var(--effect-*)` references.\n */\nexport function resolveCssTimeMs(\n value: number | string | undefined,\n fallbackToken: string,\n): number {\n if (typeof value === 'number') return value;\n\n const token = typeof value === 'string' && value.trim() ? value.trim() : fallbackToken;\n const prop = extractCssCustomProp(token);\n\n if (prop) {\n return readTokenTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n }\n\n return parseCssTimeMs(token, readTokenTimeMs(fallbackToken, 200));\n}\n", "/** CSS custom property for scroll-edge fade depth (dimension token or length). */\nexport const SCROLL_EDGE_FADE_SIZE_VAR = '--ds-scroll-edge-fade-size';\n\nexport const SCROLL_EDGE_FADE_DEFAULT_SIZE = 'var(--dimension-size-600)';\n\nexport type ScrollEdgeFadeEdge = 'top' | 'bottom' | 'left' | 'right';\n\nexport type ScrollEdgeFadeSizeToken =\n | 'size-000'\n | 'size-050'\n | 'size-075'\n | 'size-100'\n | 'size-150'\n | 'size-200'\n | 'size-250'\n | 'size-300'\n | 'size-400'\n | 'size-500'\n | 'size-600'\n | 'size-800';\n\nexport type ScrollEdgeFadeSize = ScrollEdgeFadeSizeToken | (string & {});\n\nconst SIZE_VALUE: Record<ScrollEdgeFadeSizeToken, string> = {\n 'size-000': 'var(--dimension-size-000)',\n 'size-050': 'var(--dimension-size-050)',\n 'size-075': 'var(--dimension-size-075)',\n 'size-100': 'var(--dimension-size-100)',\n 'size-150': 'var(--dimension-size-150)',\n 'size-200': 'var(--dimension-size-200)',\n 'size-250': 'var(--dimension-size-250)',\n 'size-300': 'var(--dimension-size-300)',\n 'size-400': 'var(--dimension-size-400)',\n 'size-500': 'var(--dimension-size-500)',\n 'size-600': 'var(--dimension-size-600)',\n 'size-800': 'var(--dimension-size-800)',\n};\n\nconst SIZE_REF = `var(${SCROLL_EDGE_FADE_SIZE_VAR}, ${SCROLL_EDGE_FADE_DEFAULT_SIZE})`;\n\nexport interface ScrollEdgeFadeOptions {\n /** One or more edges to fade. */\n edges: ScrollEdgeFadeEdge | ScrollEdgeFadeEdge[];\n /**\n * When true, or when every listed edge is at its scroll limit, removes the mask.\n * Pass a per-edge map to hide only the edges that are flush (panel-nav bottom fade).\n */\n atEnd?: boolean | Partial<Record<ScrollEdgeFadeEdge, boolean>>;\n /** Force the mask off regardless of scroll position (`ds-fade` `visible={false}`). */\n hidden?: boolean;\n}\n\n/** Resolve a dimension size token name or raw CSS length for `--ds-scroll-edge-fade-size`. */\nexport function resolveScrollEdgeFadeSize(\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): string {\n if (height) return height;\n return Object.prototype.hasOwnProperty.call(SIZE_VALUE, size)\n ? SIZE_VALUE[size as ScrollEdgeFadeSizeToken]\n : size;\n}\n\n/** Inline style map setting fade depth on a scroll container. */\nexport function scrollEdgeFadeSizeStyle(\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): Record<string, string> {\n return {\n [SCROLL_EDGE_FADE_SIZE_VAR]: resolveScrollEdgeFadeSize(size, height),\n };\n}\n\n/**\n * Alpha mask for a scroll container edge \u2014 content fades to transparent so\n * textured backgrounds (shell gradients, images) show through.\n */\nexport function scrollEdgeFadeMaskImage(edge: ScrollEdgeFadeEdge): string {\n switch (edge) {\n case 'top':\n return `linear-gradient(to bottom, #000 0, #000 50%, transparent 100%)`;\n case 'bottom':\n return `linear-gradient(to bottom, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'left':\n return `linear-gradient(to right, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n case 'right':\n return `linear-gradient(to left, #000 0, #000 calc(100% - ${SIZE_REF}), transparent 100%)`;\n }\n}\n\n/** Inline style map for a masked scroll region (single edge). */\nexport function scrollEdgeFadeMaskStyle(\n edge: ScrollEdgeFadeEdge,\n size: ScrollEdgeFadeSize = 'size-600',\n height?: string,\n): Record<string, string> {\n const mask = scrollEdgeFadeMaskImage(edge);\n return {\n ...scrollEdgeFadeSizeStyle(size, height),\n WebkitMaskImage: mask,\n maskImage: mask,\n WebkitMaskSize: '100% 100%',\n maskSize: '100% 100%',\n };\n}\n\n/** Class map for `scroll-edge-fade` modifiers \u2014 pair with `scroll-edge-fade.css`. */\nexport function scrollEdgeFadeClassMap(opts: ScrollEdgeFadeOptions): Record<string, boolean> {\n const edges = Array.isArray(opts.edges) ? opts.edges : [opts.edges];\n const classes: Record<string, boolean> = {\n 'scroll-edge-fade': true,\n 'scroll-edge-fade--hidden': opts.hidden === true,\n };\n\n for (const edge of edges) {\n classes[`scroll-edge-fade--${edge}`] = true;\n }\n\n const { atEnd } = opts;\n if (atEnd === true) {\n classes['scroll-edge-fade--at-end'] = true;\n } else if (atEnd && typeof atEnd === 'object') {\n const allAtEnd = edges.every(edge => atEnd[edge]);\n if (allAtEnd) {\n classes['scroll-edge-fade--at-end'] = true;\n }\n }\n\n return classes;\n}\n\n/** Whether a scroll container is flush with the given edge (within `threshold` px). */\nexport function isScrollAtEdge(\n el: HTMLElement,\n edge: ScrollEdgeFadeEdge,\n threshold = 2,\n): boolean {\n switch (edge) {\n case 'top':\n return el.scrollTop <= threshold;\n case 'bottom':\n return el.scrollHeight - el.scrollTop - el.clientHeight <= threshold;\n case 'left':\n return el.scrollLeft <= threshold;\n case 'right':\n return el.scrollWidth - el.scrollLeft - el.clientWidth <= threshold;\n }\n}\n", "import {\n dimensionIconographyMd,\n dimensionIconographySm,\n dimensionIconographyXs,\n dimensionMenuWidthXs,\n dimensionPanelWidth2xs,\n dimensionPanelWidthLg,\n dimensionPanelWidthMd,\n dimensionSize300,\n dimensionSize600,\n dimensionSize800,\n dimensionSpace050,\n dimensionSpace200,\n effectAnimationDelayLong2,\n effectAnimationDelayMedium1,\n effectAnimationDelayShort2,\n effectAnimationDurationMedium1,\n effectAnimationDurationShort3,\n effectMotionShort2,\n effectMotionShort3,\n} from '@ds-mo/tokens/ts';\n\n/** TokoMo CSS custom-property names for shared component defaults (runtime resolution). */\nexport const TOKEN_DEFAULTS = {\n space050: dimensionSpace050,\n space200: dimensionSpace200,\n size300: dimensionSize300,\n size600: dimensionSize600,\n size800: dimensionSize800,\n iconographyMd: dimensionIconographyMd,\n iconographySm: dimensionIconographySm,\n iconographyXs: dimensionIconographyXs,\n panelWidth2xs: dimensionPanelWidth2xs,\n panelWidthMd: dimensionPanelWidthMd,\n panelWidthLg: dimensionPanelWidthLg,\n menuWidthXs: dimensionMenuWidthXs,\n motionShort2: effectMotionShort2,\n motionShort3: effectMotionShort3,\n animationDurationShort3: effectAnimationDurationShort3,\n animationDurationMedium1: effectAnimationDurationMedium1,\n animationDelayMedium1: effectAnimationDelayMedium1,\n animationDelayShort2: effectAnimationDelayShort2,\n animationDelayLong2: effectAnimationDelayLong2,\n /** Unmeasured menu height fallback: 20\u00D7 base (160px at default scale). */\n menuFallbackHeight: 'calc(var(--dimension-size-base) * 20)',\n /** Unmeasured tooltip width fallback: size-800 + size-200 (80px). */\n tooltipFallbackWidth: 'calc(var(--dimension-size-800) + var(--dimension-size-200))',\n} as const;\n\nexport type TokenDefaultKey = keyof typeof TOKEN_DEFAULTS;\n\n/** Valid CSS length strings for overlay offset props \u2014 bind on `sideOffset` / `alignOffset` in hosts. */\nexport const TOKEN_CSS_LENGTHS = {\n space050: `var(${dimensionSpace050})`,\n space200: `var(${dimensionSpace200})`,\n menuWidthXs: `var(${dimensionMenuWidthXs})`,\n} as const;\n"],
|
|
5
|
+
"mappings": ";AAQA,IAAM,YAAY,u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c;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,yBAAyB;AAAA,EACzB,0BAA0B;AAAA,EAC1B,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,EAEpB,sBAAsB;AACxB;AAKO,IAAM,oBAAoB;AAAA,EAC/B,UAAU,OAAO,iBAAiB;AAAA,EAClC,UAAU,OAAO,iBAAiB;AAAA,EAClC,aAAa,OAAO,oBAAoB;AAC1C;",
|
|
6
6
|
"names": ["px"]
|
|
7
7
|
}
|
|
@@ -2,11 +2,31 @@
|
|
|
2
2
|
export declare const SCROLL_EDGE_FADE_SIZE_VAR = "--ds-scroll-edge-fade-size";
|
|
3
3
|
export declare const SCROLL_EDGE_FADE_DEFAULT_SIZE = "var(--dimension-size-600)";
|
|
4
4
|
export type ScrollEdgeFadeEdge = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
export type ScrollEdgeFadeSizeToken = 'size-000' | 'size-050' | 'size-075' | 'size-100' | 'size-150' | 'size-200' | 'size-250' | 'size-300' | 'size-400' | 'size-500' | 'size-600' | 'size-800';
|
|
6
|
+
export type ScrollEdgeFadeSize = ScrollEdgeFadeSizeToken | (string & {});
|
|
7
|
+
export interface ScrollEdgeFadeOptions {
|
|
8
|
+
/** One or more edges to fade. */
|
|
9
|
+
edges: ScrollEdgeFadeEdge | ScrollEdgeFadeEdge[];
|
|
10
|
+
/**
|
|
11
|
+
* When true, or when every listed edge is at its scroll limit, removes the mask.
|
|
12
|
+
* Pass a per-edge map to hide only the edges that are flush (panel-nav bottom fade).
|
|
13
|
+
*/
|
|
14
|
+
atEnd?: boolean | Partial<Record<ScrollEdgeFadeEdge, boolean>>;
|
|
15
|
+
/** Force the mask off regardless of scroll position (`ds-fade` `visible={false}`). */
|
|
16
|
+
hidden?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Resolve a dimension size token name or raw CSS length for `--ds-scroll-edge-fade-size`. */
|
|
19
|
+
export declare function resolveScrollEdgeFadeSize(size?: ScrollEdgeFadeSize, height?: string): string;
|
|
20
|
+
/** Inline style map setting fade depth on a scroll container. */
|
|
21
|
+
export declare function scrollEdgeFadeSizeStyle(size?: ScrollEdgeFadeSize, height?: string): Record<string, string>;
|
|
5
22
|
/**
|
|
6
23
|
* Alpha mask for a scroll container edge — content fades to transparent so
|
|
7
|
-
* textured backgrounds (gradients, images) show through.
|
|
8
|
-
* `ds-fade` overlays on non-flat surfaces.
|
|
24
|
+
* textured backgrounds (shell gradients, images) show through.
|
|
9
25
|
*/
|
|
10
26
|
export declare function scrollEdgeFadeMaskImage(edge: ScrollEdgeFadeEdge): string;
|
|
11
|
-
/** Inline style map for a masked scroll region. */
|
|
12
|
-
export declare function scrollEdgeFadeMaskStyle(edge: ScrollEdgeFadeEdge): Record<string, string>;
|
|
27
|
+
/** Inline style map for a masked scroll region (single edge). */
|
|
28
|
+
export declare function scrollEdgeFadeMaskStyle(edge: ScrollEdgeFadeEdge, size?: ScrollEdgeFadeSize, height?: string): Record<string, string>;
|
|
29
|
+
/** Class map for `scroll-edge-fade` modifiers — pair with `scroll-edge-fade.css`. */
|
|
30
|
+
export declare function scrollEdgeFadeClassMap(opts: ScrollEdgeFadeOptions): Record<string, boolean>;
|
|
31
|
+
/** Whether a scroll container is flush with the given edge (within `threshold` px). */
|
|
32
|
+
export declare function isScrollAtEdge(el: HTMLElement, edge: ScrollEdgeFadeEdge, threshold?: number): boolean;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
|
|
1
|
+
import { type ScrollEdgeFadeEdge, type ScrollEdgeFadeSize, type ScrollEdgeFadeSizeToken } from '../../utils/scroll-edge-fade';
|
|
2
|
+
/** @deprecated Use `ScrollEdgeFadeEdge` from `@ds-mo/ui/utils`. */
|
|
3
|
+
export type FadeSide = ScrollEdgeFadeEdge;
|
|
4
|
+
/** @deprecated Use `ScrollEdgeFadeSizeToken` from `@ds-mo/ui/utils`. */
|
|
5
|
+
export type FadeSizeToken = ScrollEdgeFadeSizeToken;
|
|
6
|
+
/** @deprecated Use `ScrollEdgeFadeSize` from `@ds-mo/ui/utils`. */
|
|
7
|
+
export type FadeSize = ScrollEdgeFadeSize;
|
|
5
8
|
export declare class Fade {
|
|
6
9
|
el: HTMLElement;
|
|
7
|
-
/**
|
|
8
|
-
private shellGradientChrome;
|
|
9
|
-
/** Edge where the fade is anchored. */
|
|
10
|
+
/** Edge where content fades as it approaches the scroll boundary. */
|
|
10
11
|
side: FadeSide;
|
|
11
12
|
/** Fade depth along the fade axis. Accepts dimension size token names or any CSS length. */
|
|
12
13
|
size: FadeSize;
|
|
@@ -15,16 +16,13 @@ export declare class Fade {
|
|
|
15
16
|
* Prefer `size`.
|
|
16
17
|
*/
|
|
17
18
|
height: string | undefined;
|
|
18
|
-
/**
|
|
19
|
-
surface: FadeSurface;
|
|
20
|
-
/** Direct background override for contexts that already expose a resolved surface var. */
|
|
21
|
-
background: string;
|
|
22
|
-
/** Controls visibility without removing the element from layout/positioning. */
|
|
19
|
+
/** Controls the mask without removing the scroll container from layout. */
|
|
23
20
|
visible: boolean;
|
|
21
|
+
private atEnd;
|
|
22
|
+
protected onFadeConfigChange(): void;
|
|
24
23
|
componentDidLoad(): void;
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
private resolveBackground;
|
|
24
|
+
private syncAtEnd;
|
|
25
|
+
private handleScroll;
|
|
28
26
|
render(): any;
|
|
29
27
|
}
|
|
30
28
|
//# sourceMappingURL=Fade.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { FadeSide, FadeSize, FadeSizeToken
|
|
1
|
+
export type { FadeSide, FadeSize, FadeSizeToken } from './Fade';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -46,7 +46,6 @@ export declare class PanelNav {
|
|
|
46
46
|
el: HTMLElement;
|
|
47
47
|
private renderedStyle;
|
|
48
48
|
private parsedGroups;
|
|
49
|
-
private atBottom;
|
|
50
49
|
private isAnimating;
|
|
51
50
|
private rovingIndex;
|
|
52
51
|
private viewportNarrow;
|
|
@@ -96,8 +95,6 @@ export declare class PanelNav {
|
|
|
96
95
|
private focusRovingAt;
|
|
97
96
|
private activateRovingIndex;
|
|
98
97
|
private handleRovingKeyDown;
|
|
99
|
-
private checkScroll;
|
|
100
|
-
private handleBodyScroll;
|
|
101
98
|
private handleItemClick;
|
|
102
99
|
private handleToggle;
|
|
103
100
|
/** Toggle expanded/collapsed panel nav — used by shell keyboard shortcuts. */
|
|
@@ -19,7 +19,7 @@ import { CardSettingWidth } from "./components/CardSetting/CardSetting";
|
|
|
19
19
|
import { ChipBackground, ChipContrast, ChipElevation, ChipIntent, ChipSize } from "./components/Chip/Chip";
|
|
20
20
|
import { DividerInset, DividerLength, DividerOrientation, DividerSurface } from "./components/Divider/Divider";
|
|
21
21
|
import { EmptyStateType } from "./components/EmptyState/EmptyState";
|
|
22
|
-
import { FadeSide, FadeSize
|
|
22
|
+
import { FadeSide, FadeSize } from "./components/Fade/Fade";
|
|
23
23
|
import { HeaderBackground } from "./components/Header/Header";
|
|
24
24
|
import { IconColor, IconSize } from "./components/Icon/Icon";
|
|
25
25
|
import { InputType } from "./components/Input/Input";
|
|
@@ -57,7 +57,7 @@ export { CardSettingWidth } from "./components/CardSetting/CardSetting";
|
|
|
57
57
|
export { ChipBackground, ChipContrast, ChipElevation, ChipIntent, ChipSize } from "./components/Chip/Chip";
|
|
58
58
|
export { DividerInset, DividerLength, DividerOrientation, DividerSurface } from "./components/Divider/Divider";
|
|
59
59
|
export { EmptyStateType } from "./components/EmptyState/EmptyState";
|
|
60
|
-
export { FadeSide, FadeSize
|
|
60
|
+
export { FadeSide, FadeSize } from "./components/Fade/Fade";
|
|
61
61
|
export { HeaderBackground } from "./components/Header/Header";
|
|
62
62
|
export { IconColor, IconSize } from "./components/Icon/Icon";
|
|
63
63
|
export { InputType } from "./components/Input/Input";
|
|
@@ -445,17 +445,12 @@ export namespace Components {
|
|
|
445
445
|
"type": EmptyStateType;
|
|
446
446
|
}
|
|
447
447
|
interface DsFade {
|
|
448
|
-
/**
|
|
449
|
-
* Direct background override for contexts that already expose a resolved surface var.
|
|
450
|
-
* @default 'var(--color-background-secondary)'
|
|
451
|
-
*/
|
|
452
|
-
"background": string;
|
|
453
448
|
/**
|
|
454
449
|
* Deprecated alias for size. Kept for existing consumers that pass a raw CSS length. Prefer `size`.
|
|
455
450
|
*/
|
|
456
451
|
"height": string | undefined;
|
|
457
452
|
/**
|
|
458
|
-
* Edge where the
|
|
453
|
+
* Edge where content fades as it approaches the scroll boundary.
|
|
459
454
|
* @default 'bottom'
|
|
460
455
|
*/
|
|
461
456
|
"side": FadeSide;
|
|
@@ -465,12 +460,7 @@ export namespace Components {
|
|
|
465
460
|
*/
|
|
466
461
|
"size": FadeSize;
|
|
467
462
|
/**
|
|
468
|
-
*
|
|
469
|
-
* @default 'default'
|
|
470
|
-
*/
|
|
471
|
-
"surface": FadeSurface;
|
|
472
|
-
/**
|
|
473
|
-
* Controls visibility without removing the element from layout/positioning.
|
|
463
|
+
* Controls the mask without removing the scroll container from layout.
|
|
474
464
|
* @default true
|
|
475
465
|
*/
|
|
476
466
|
"visible": boolean;
|
|
@@ -2134,17 +2124,12 @@ declare namespace LocalJSX {
|
|
|
2134
2124
|
"type"?: EmptyStateType;
|
|
2135
2125
|
}
|
|
2136
2126
|
interface DsFade {
|
|
2137
|
-
/**
|
|
2138
|
-
* Direct background override for contexts that already expose a resolved surface var.
|
|
2139
|
-
* @default 'var(--color-background-secondary)'
|
|
2140
|
-
*/
|
|
2141
|
-
"background"?: string;
|
|
2142
2127
|
/**
|
|
2143
2128
|
* Deprecated alias for size. Kept for existing consumers that pass a raw CSS length. Prefer `size`.
|
|
2144
2129
|
*/
|
|
2145
2130
|
"height"?: string | undefined;
|
|
2146
2131
|
/**
|
|
2147
|
-
* Edge where the
|
|
2132
|
+
* Edge where content fades as it approaches the scroll boundary.
|
|
2148
2133
|
* @default 'bottom'
|
|
2149
2134
|
*/
|
|
2150
2135
|
"side"?: FadeSide;
|
|
@@ -2154,12 +2139,7 @@ declare namespace LocalJSX {
|
|
|
2154
2139
|
*/
|
|
2155
2140
|
"size"?: FadeSize;
|
|
2156
2141
|
/**
|
|
2157
|
-
*
|
|
2158
|
-
* @default 'default'
|
|
2159
|
-
*/
|
|
2160
|
-
"surface"?: FadeSurface;
|
|
2161
|
-
/**
|
|
2162
|
-
* Controls visibility without removing the element from layout/positioning.
|
|
2142
|
+
* Controls the mask without removing the scroll container from layout.
|
|
2163
2143
|
* @default true
|
|
2164
2144
|
*/
|
|
2165
2145
|
"visible"?: boolean;
|
|
@@ -2916,8 +2896,6 @@ declare namespace LocalJSX {
|
|
|
2916
2896
|
"side": FadeSide;
|
|
2917
2897
|
"size": FadeSize;
|
|
2918
2898
|
"height": string | undefined;
|
|
2919
|
-
"surface": FadeSurface;
|
|
2920
|
-
"background": string;
|
|
2921
2899
|
"visible": boolean;
|
|
2922
2900
|
}
|
|
2923
2901
|
interface DsFieldAttributes {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { registerIcons } from '../components/Icon/icon-cache';
|
|
2
2
|
export { clearCssLengthPxCache, resolveCssLengthPx } from './resolve-css-length-px';
|
|
3
3
|
export { parseCssTimeMs, resolveCssTimeMs } from './resolve-css-time-ms';
|
|
4
|
-
export { SCROLL_EDGE_FADE_DEFAULT_SIZE, SCROLL_EDGE_FADE_SIZE_VAR, scrollEdgeFadeMaskImage, scrollEdgeFadeMaskStyle, } from './scroll-edge-fade';
|
|
5
|
-
export type { ScrollEdgeFadeEdge } from './scroll-edge-fade';
|
|
4
|
+
export { SCROLL_EDGE_FADE_DEFAULT_SIZE, SCROLL_EDGE_FADE_SIZE_VAR, isScrollAtEdge, resolveScrollEdgeFadeSize, scrollEdgeFadeClassMap, scrollEdgeFadeMaskImage, scrollEdgeFadeMaskStyle, scrollEdgeFadeSizeStyle, } from './scroll-edge-fade';
|
|
5
|
+
export type { ScrollEdgeFadeEdge, ScrollEdgeFadeOptions, ScrollEdgeFadeSize, ScrollEdgeFadeSizeToken, } from './scroll-edge-fade';
|
|
6
6
|
export { TOKEN_DEFAULTS, TOKEN_CSS_LENGTHS } from './token-defaults';
|
|
7
7
|
export type { TokenDefaultKey } from './token-defaults';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,12 +2,32 @@
|
|
|
2
2
|
export declare const SCROLL_EDGE_FADE_SIZE_VAR = "--ds-scroll-edge-fade-size";
|
|
3
3
|
export declare const SCROLL_EDGE_FADE_DEFAULT_SIZE = "var(--dimension-size-600)";
|
|
4
4
|
export type ScrollEdgeFadeEdge = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
export type ScrollEdgeFadeSizeToken = 'size-000' | 'size-050' | 'size-075' | 'size-100' | 'size-150' | 'size-200' | 'size-250' | 'size-300' | 'size-400' | 'size-500' | 'size-600' | 'size-800';
|
|
6
|
+
export type ScrollEdgeFadeSize = ScrollEdgeFadeSizeToken | (string & {});
|
|
7
|
+
export interface ScrollEdgeFadeOptions {
|
|
8
|
+
/** One or more edges to fade. */
|
|
9
|
+
edges: ScrollEdgeFadeEdge | ScrollEdgeFadeEdge[];
|
|
10
|
+
/**
|
|
11
|
+
* When true, or when every listed edge is at its scroll limit, removes the mask.
|
|
12
|
+
* Pass a per-edge map to hide only the edges that are flush (panel-nav bottom fade).
|
|
13
|
+
*/
|
|
14
|
+
atEnd?: boolean | Partial<Record<ScrollEdgeFadeEdge, boolean>>;
|
|
15
|
+
/** Force the mask off regardless of scroll position (`ds-fade` `visible={false}`). */
|
|
16
|
+
hidden?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Resolve a dimension size token name or raw CSS length for `--ds-scroll-edge-fade-size`. */
|
|
19
|
+
export declare function resolveScrollEdgeFadeSize(size?: ScrollEdgeFadeSize, height?: string): string;
|
|
20
|
+
/** Inline style map setting fade depth on a scroll container. */
|
|
21
|
+
export declare function scrollEdgeFadeSizeStyle(size?: ScrollEdgeFadeSize, height?: string): Record<string, string>;
|
|
5
22
|
/**
|
|
6
23
|
* Alpha mask for a scroll container edge — content fades to transparent so
|
|
7
|
-
* textured backgrounds (gradients, images) show through.
|
|
8
|
-
* `ds-fade` overlays on non-flat surfaces.
|
|
24
|
+
* textured backgrounds (shell gradients, images) show through.
|
|
9
25
|
*/
|
|
10
26
|
export declare function scrollEdgeFadeMaskImage(edge: ScrollEdgeFadeEdge): string;
|
|
11
|
-
/** Inline style map for a masked scroll region. */
|
|
12
|
-
export declare function scrollEdgeFadeMaskStyle(edge: ScrollEdgeFadeEdge): Record<string, string>;
|
|
27
|
+
/** Inline style map for a masked scroll region (single edge). */
|
|
28
|
+
export declare function scrollEdgeFadeMaskStyle(edge: ScrollEdgeFadeEdge, size?: ScrollEdgeFadeSize, height?: string): Record<string, string>;
|
|
29
|
+
/** Class map for `scroll-edge-fade` modifiers — pair with `scroll-edge-fade.css`. */
|
|
30
|
+
export declare function scrollEdgeFadeClassMap(opts: ScrollEdgeFadeOptions): Record<string, boolean>;
|
|
31
|
+
/** Whether a scroll container is flush with the given edge (within `threshold` px). */
|
|
32
|
+
export declare function isScrollAtEdge(el: HTMLElement, edge: ScrollEdgeFadeEdge, threshold?: number): boolean;
|
|
13
33
|
//# sourceMappingURL=scroll-edge-fade.d.ts.map
|
package/package.json
CHANGED
package/src/angular/proxies.ts
CHANGED
|
@@ -398,14 +398,14 @@ export declare interface DsEmptyState extends Components.DsEmptyState {}
|
|
|
398
398
|
|
|
399
399
|
|
|
400
400
|
@ProxyCmp({
|
|
401
|
-
inputs: ['
|
|
401
|
+
inputs: ['height', 'side', 'size', 'visible']
|
|
402
402
|
})
|
|
403
403
|
@Component({
|
|
404
404
|
selector: 'ds-fade',
|
|
405
405
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
406
406
|
template: '<ng-content></ng-content>',
|
|
407
407
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
408
|
-
inputs: ['
|
|
408
|
+
inputs: ['height', 'side', 'size', 'visible'],
|
|
409
409
|
standalone: false
|
|
410
410
|
})
|
|
411
411
|
export class DsFade {
|