@fluid-topics/ft-chip-choice 1.2.48 → 1.2.49

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.
@@ -495,7 +495,7 @@ Also for action icons.`,r.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
495
495
  <div class="ft-ripple--background"></div>
496
496
  <div class="ft-ripple--effect"></div>
497
497
  </div>
498
- `}contentAvailableCallback(o){super.contentAvailableCallback(o),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(o){var a,i;super.update(o),o.has("disabled")&&(this.disabled?(this.endRipple(),(a=this.target)===null||a===void 0||a.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var o,a;let i=(o=this.shadowRoot)===null||o===void 0?void 0:o.host.parentElement;i&&this.setupFor((a=this.target)!==null&&a!==void 0?a:i)}setupFor(o){if(this.setupDebouncer.cancel(),this.target===o)return;this.onDisconnect&&this.onDisconnect(),this.target=o,o.setAttribute("data-is-ft-ripple-target","true");let a=(...p)=>y=>{p.forEach(m=>window.addEventListener(m,this.endPress,{once:!0})),this.startPress(y)},i=a("mouseup","contextmenu"),c=a("touchend","touchcancel"),l=p=>{["Enter"," "].includes(p.key)&&a("keyup")(p)},s={passive:!0};o.addEventListener("mouseover",this.startHover,s),o.addEventListener("mousemove",this.moveRipple,s),o.addEventListener("mouseleave",this.endHover,s),o.addEventListener("mousedown",i,s),o.addEventListener("touchstart",c,s),o.addEventListener("touchmove",this.moveRipple,s),o.addEventListener("keydown",l,s),o.addEventListener("focus",this.startFocus,s),o.addEventListener("blur",this.endFocus,s),o.addEventListener("focusin",this.startFocus,s),o.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{o.removeAttribute("data-is-ft-ripple-target"),o.removeEventListener("mouseover",this.startHover,s),o.removeEventListener("mousemove",this.moveRipple,s),o.removeEventListener("mouseleave",this.endHover,s),o.removeEventListener("mousedown",i,s),o.removeEventListener("touchstart",c,s),o.removeEventListener("touchmove",this.moveRipple,s),o.removeEventListener("keydown",l,s),o.removeEventListener("focus",this.startFocus,s),o.removeEventListener("blur",this.endFocus,s),o.removeEventListener("focusin",this.startFocus,s),o.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(o){let a=o,i=o,c,l;return a.x!=null?{x:c,y:l}=a:i.touches!=null&&(c=i.touches[0].clientX,l=i.touches[0].clientY),{x:c,y:l}}isFocusVisible(o){return o instanceof HTMLElement?o.matches(":focus-visible"):!0}isIgnored(o){if(this.disabled)return!0;if(o!=null)for(let a of o.composedPath()){if(a===this.target)break;if("hasAttribute"in a&&a.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};$.elementDefinitions={};$.styles=Vo;et([(0,K.property)({type:Boolean})],$.prototype,"primary",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"secondary",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"unbounded",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"activated",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"selected",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"disabled",void 0);et([(0,K.state)()],$.prototype,"hovered",void 0);et([(0,K.state)()],$.prototype,"focused",void 0);et([(0,K.state)()],$.prototype,"pressed",void 0);et([(0,K.state)()],$.prototype,"rippling",void 0);et([(0,K.state)()],$.prototype,"originX",void 0);et([(0,K.state)()],$.prototype,"originY",void 0);et([(0,K.query)(".ft-ripple")],$.prototype,"ripple",void 0);et([(0,K.query)(".ft-ripple--effect")],$.prototype,"rippleEffect",void 0);(0,Mr.customElement)("ft-ripple")($);var Ta=b(R());var za=b(I()),G=b(ct()),Ne=b(R());var la=b(R());var ao=globalThis,We=ao.trustedTypes,Fr=We?We.createPolicy("lit-html",{createHTML:e=>e}):void 0,qr="$lit$",It=`lit$${Math.random().toFixed(9).slice(2)}$`,Qr="?"+It,mn=`<${Qr}>`,Dt=document,ke=()=>Dt.createComment(""),me=e=>e===null||typeof e!="object"&&typeof e!="function",no=Array.isArray,bn=e=>no(e)||typeof e?.[Symbol.iterator]=="function",Qe=`[
498
+ `}contentAvailableCallback(o){super.contentAvailableCallback(o),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(o){var a,i;super.update(o),o.has("disabled")&&(this.disabled?(this.endRipple(),(a=this.target)===null||a===void 0||a.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var o,a;let i=(o=this.shadowRoot)===null||o===void 0?void 0:o.host.parentElement;i&&this.setupFor((a=this.target)!==null&&a!==void 0?a:i)}forceFocusUpdate(){var o;!((o=this.target)===null||o===void 0)&&o.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(o){if(this.setupDebouncer.cancel(),this.target===o)return;this.onDisconnect&&this.onDisconnect(),this.target=o,o.setAttribute("data-is-ft-ripple-target","true");let a=(...p)=>y=>{p.forEach(m=>window.addEventListener(m,this.endPress,{once:!0})),this.startPress(y)},i=a("mouseup","contextmenu"),c=a("touchend","touchcancel"),l=p=>{["Enter"," "].includes(p.key)&&a("keyup")(p)},s={passive:!0};o.addEventListener("mouseover",this.startHover,s),o.addEventListener("mousemove",this.moveRipple,s),o.addEventListener("mouseleave",this.endHover,s),o.addEventListener("mousedown",i,s),o.addEventListener("touchstart",c,s),o.addEventListener("touchmove",this.moveRipple,s),o.addEventListener("keydown",l,s),o.addEventListener("focus",this.startFocus,s),o.addEventListener("blur",this.endFocus,s),o.addEventListener("focusin",this.startFocus,s),o.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{o.removeAttribute("data-is-ft-ripple-target"),o.removeEventListener("mouseover",this.startHover,s),o.removeEventListener("mousemove",this.moveRipple,s),o.removeEventListener("mouseleave",this.endHover,s),o.removeEventListener("mousedown",i,s),o.removeEventListener("touchstart",c,s),o.removeEventListener("touchmove",this.moveRipple,s),o.removeEventListener("keydown",l,s),o.removeEventListener("focus",this.startFocus,s),o.removeEventListener("blur",this.endFocus,s),o.removeEventListener("focusin",this.startFocus,s),o.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(o){let a=o,i=o,c,l;return a.x!=null?{x:c,y:l}=a:i.touches!=null&&(c=i.touches[0].clientX,l=i.touches[0].clientY),{x:c,y:l}}isFocusVisible(o){return o instanceof HTMLElement?o.matches(":focus-visible"):!0}isIgnored(o){if(this.disabled)return!0;if(o!=null)for(let a of o.composedPath()){if(a===this.target)break;if("hasAttribute"in a&&a.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};$.elementDefinitions={};$.styles=Vo;et([(0,K.property)({type:Boolean})],$.prototype,"primary",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"secondary",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"unbounded",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"activated",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"selected",void 0);et([(0,K.property)({type:Boolean})],$.prototype,"disabled",void 0);et([(0,K.state)()],$.prototype,"hovered",void 0);et([(0,K.state)()],$.prototype,"focused",void 0);et([(0,K.state)()],$.prototype,"pressed",void 0);et([(0,K.state)()],$.prototype,"rippling",void 0);et([(0,K.state)()],$.prototype,"originX",void 0);et([(0,K.state)()],$.prototype,"originY",void 0);et([(0,K.query)(".ft-ripple")],$.prototype,"ripple",void 0);et([(0,K.query)(".ft-ripple--effect")],$.prototype,"rippleEffect",void 0);(0,Mr.customElement)("ft-ripple")($);var Ta=b(R());var za=b(I()),G=b(ct()),Ne=b(R());var la=b(R());var ao=globalThis,We=ao.trustedTypes,Fr=We?We.createPolicy("lit-html",{createHTML:e=>e}):void 0,qr="$lit$",It=`lit$${Math.random().toFixed(9).slice(2)}$`,Qr="?"+It,mn=`<${Qr}>`,Dt=document,ke=()=>Dt.createComment(""),me=e=>e===null||typeof e!="object"&&typeof e!="function",no=Array.isArray,bn=e=>no(e)||typeof e?.[Symbol.iterator]=="function",Qe=`[
499
499
  \f\r]`,he=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Kr=/-->/g,Vr=/>/g,Ht=RegExp(`>|${Qe}(?:([^\\s"'>=/]+)(${Qe}*=${Qe}*(?:[^
500
500
  \f\r"'\`<>=]|("|')|))|$)`,"g"),jr=/'/g,Yr=/"/g,Jr=/^(?:script|style|textarea|title)$/i,io=e=>(o,...a)=>({_$litType$:e,strings:o,values:a}),ta=io(1),ea=io(2),oa=io(3),be=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),Xr=new WeakMap,_t=Dt.createTreeWalker(Dt,129);function ra(e,o){if(!no(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Fr!==void 0?Fr.createHTML(o):o}var xn=(e,o)=>{let a=e.length-1,i=[],c,l=o===2?"<svg>":o===3?"<math>":"",s=he;for(let p=0;p<a;p++){let y=e[p],m,C,x=-1,E=0;for(;E<y.length&&(s.lastIndex=E,C=s.exec(y),C!==null);)E=s.lastIndex,s===he?C[1]==="!--"?s=Kr:C[1]!==void 0?s=Vr:C[2]!==void 0?(Jr.test(C[2])&&(c=RegExp("</"+C[2],"g")),s=Ht):C[3]!==void 0&&(s=Ht):s===Ht?C[0]===">"?(s=c??he,x=-1):C[1]===void 0?x=-2:(x=s.lastIndex-C[2].length,m=C[1],s=C[3]===void 0?Ht:C[3]==='"'?Yr:jr):s===Yr||s===jr?s=Ht:s===Kr||s===Vr?s=he:(s=Ht,c=void 0);let N=s===Ht&&e[p+1].startsWith("/>")?" ":"";l+=s===he?y+mn:x>=0?(i.push(m),y.slice(0,x)+qr+y.slice(x)+It+N):y+It+(x===-2?p:N)}return[ra(e,l+(e[a]||"<?>")+(o===2?"</svg>":o===3?"</math>":"")),i]},xe=class e{constructor({strings:o,_$litType$:a},i){let c;this.parts=[];let l=0,s=0,p=o.length-1,y=this.parts,[m,C]=xn(o,a);if(this.el=e.createElement(m,i),_t.currentNode=this.el.content,a===2||a===3){let x=this.el.content.firstChild;x.replaceWith(...x.childNodes)}for(;(c=_t.nextNode())!==null&&y.length<p;){if(c.nodeType===1){if(c.hasAttributes())for(let x of c.getAttributeNames())if(x.endsWith(qr)){let E=C[s++],N=c.getAttribute(x).split(It),L=/([.?@])?(.*)/.exec(E);y.push({type:1,index:l,name:L[2],strings:N,ctor:L[1]==="."?to:L[1]==="?"?eo:L[1]==="@"?oo:oe}),c.removeAttribute(x)}else x.startsWith(It)&&(y.push({type:6,index:l}),c.removeAttribute(x));if(Jr.test(c.tagName)){let x=c.textContent.split(It),E=x.length-1;if(E>0){c.textContent=We?We.emptyScript:"";for(let N=0;N<E;N++)c.append(x[N],ke()),_t.nextNode(),y.push({type:2,index:++l});c.append(x[E],ke())}}}else if(c.nodeType===8)if(c.data===Qr)y.push({type:2,index:l});else{let x=-1;for(;(x=c.data.indexOf(It,x+1))!==-1;)y.push({type:7,index:l}),x+=It.length-1}l++}}static createElement(o,a){let i=Dt.createElement("template");return i.innerHTML=o,i}};function ee(e,o,a=e,i){if(o===be)return o;let c=i!==void 0?a._$Co?.[i]:a._$Cl,l=me(o)?void 0:o._$litDirective$;return c?.constructor!==l&&(c?._$AO?.(!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,a,i)),i!==void 0?(a._$Co??=[])[i]=c:a._$Cl=c),c!==void 0&&(o=ee(e,c._$AS(e,o.values),c,i)),o}var Je=class{constructor(o,a){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=a}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:a},parts:i}=this._$AD,c=(o?.creationScope??Dt).importNode(a,!0);_t.currentNode=c;let l=_t.nextNode(),s=0,p=0,y=i[0];for(;y!==void 0;){if(s===y.index){let m;y.type===2?m=new ze(l,l.nextSibling,this,o):y.type===1?m=new y.ctor(l,y.name,y.strings,this,o):y.type===6&&(m=new ro(l,this,o)),this._$AV.push(m),y=i[++p]}s!==y?.index&&(l=_t.nextNode(),s++)}return _t.currentNode=Dt,c}p(o){let a=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(o,i,a),a+=i.strings.length-2):i._$AI(o[a])),a++}},ze=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,a,i,c){this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=o,this._$AB=a,this._$AM=i,this.options=c,this._$Cv=c?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,a=this._$AM;return a!==void 0&&o?.nodeType===11&&(o=a.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,a=this){o=ee(this,o,a),me(o)?o===M||o==null||o===""?(this._$AH!==M&&this._$AR(),this._$AH=M):o!==this._$AH&&o!==be&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):bn(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==M&&me(this._$AH)?this._$AA.nextSibling.data=o:this.T(Dt.createTextNode(o)),this._$AH=o}$(o){let{values:a,_$litType$:i}=o,c=typeof i=="number"?this._$AC(o):(i.el===void 0&&(i.el=xe.createElement(ra(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===c)this._$AH.p(a);else{let l=new Je(c,this),s=l.u(this.options);l.p(a),this.T(s),this._$AH=l}}_$AC(o){let a=Xr.get(o.strings);return a===void 0&&Xr.set(o.strings,a=new xe(o)),a}k(o){no(this._$AH)||(this._$AH=[],this._$AR());let a=this._$AH,i,c=0;for(let l of o)c===a.length?a.push(i=new e(this.O(ke()),this.O(ke()),this,this.options)):i=a[c],i._$AI(l),c++;c<a.length&&(this._$AR(i&&i._$AB.nextSibling,c),a.length=c)}_$AR(o=this._$AA.nextSibling,a){for(this._$AP?.(!1,!0,a);o&&o!==this._$AB;){let i=o.nextSibling;o.remove(),o=i}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}},oe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,a,i,c,l){this.type=1,this._$AH=M,this._$AN=void 0,this.element=o,this.name=a,this._$AM=c,this.options=l,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=M}_$AI(o,a=this,i,c){let l=this.strings,s=!1;if(l===void 0)o=ee(this,o,a,0),s=!me(o)||o!==this._$AH&&o!==be,s&&(this._$AH=o);else{let p=o,y,m;for(o=l[0],y=0;y<l.length-1;y++)m=ee(this,p[i+y],a,y),m===be&&(m=this._$AH[y]),s||=!me(m)||m!==this._$AH[y],m===M?o=M:o!==M&&(o+=(m??"")+l[y+1]),this._$AH[y]=m}s&&!c&&this.j(o)}j(o){o===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}},to=class extends oe{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===M?void 0:o}},eo=class extends oe{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==M)}},oo=class extends oe{constructor(o,a,i,c,l){super(o,a,i,c,l),this.type=5}_$AI(o,a=this){if((o=ee(this,o,a,0)??M)===be)return;let i=this._$AH,c=o===M&&i!==M||o.capture!==i.capture||o.once!==i.once||o.passive!==i.passive,l=o!==M&&(i===M||c);c&&this.element.removeEventListener(this.name,this,i),l&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}},ro=class{constructor(o,a,i){this.element=o,this.type=6,this._$AN=void 0,this._$AM=a,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(o){ee(this,o)}};var Sn=ao.litHtmlPolyfillSupport;Sn?.(xe,ze),(ao.litHtmlVersions??=[]).push("3.3.0");var na=Symbol.for(""),Cn=e=>{if(e?.r===na)return e?._$litStatic$},co=e=>({_$litStatic$:e,r:na});var aa=new Map,lo=e=>(o,...a)=>{let i=a.length,c,l,s=[],p=[],y,m=0,C=!1;for(;m<i;){for(y=o[m];m<i&&(l=a[m],(c=Cn(l))!==void 0);)y+=c+o[++m],C=!0;m!==i&&p.push(l),s.push(y),m++}if(m===i&&s.push(o[i]),C){let x=s.join("$$lit$$");(o=aa.get(x))===void 0&&(s.raw=s,aa.set(x,o=s)),a=p}return e(o,...a)},so=lo(ta),Nd=lo(ea),wd=lo(oa);var po=b(ct()),ca=b(R());var dt;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button",e.display="display",e.title1="title-1",e.title2="title-2",e.title3="title-3",e.body1regular="body-1-regular",e.body1medium="body-1-medium",e.body1semibold="body-1-semibold",e.body2regular="body-2-regular",e.body2medium="body-2-medium",e.body2semibold="body-2-semibold",e.label1medium="label-1-medium",e.label1semibold="label-1-semibold",e.label1bold="label-1-bold",e.label2medium="label-2-medium",e.label2semibold="label-2-semibold",e.label2bold="label-2-bold",e.caption1medium="caption-1-medium",e.caption1semibold="caption-1-semibold",e.caption1bold="caption-1-bold",e.caption2medium="caption-2-medium",e.caption2semibold="caption-2-semibold",e.caption2bold="caption-2-bold"})(dt||(dt={}));var ia=function(e,o,a,i){var c=arguments.length,l=c<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,a):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,o,a,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(l=(c<3?s(l):c>3?s(o,a,l):s(o,a))||l);return c>3&&l&&Object.defineProperty(o,a,l),l},J=class extends ca.FtLitElement{constructor(){super(...arguments),this.variant=dt.body1}render(){return this.element?so`
501
501
  <${co(this.element)}