@maggioli-design-system/mds-dropdown
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -8,3 +8,3 @@ 'use strict'; | ||
/* | ||
Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com | ||
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com | ||
*/ | ||
@@ -11,0 +11,0 @@ const patchEsm = () => { |
@@ -8,3 +8,3 @@ 'use strict'; | ||
/* | ||
Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com | ||
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com | ||
*/ | ||
@@ -11,0 +11,0 @@ const patchBrowser = () => { |
@@ -7,3 +7,3 @@ { | ||
"name": "@stencil/core", | ||
"version": "2.22.2", | ||
"version": "2.22.3", | ||
"typescriptVersion": "4.9.4" | ||
@@ -10,0 +10,0 @@ }, |
@@ -9,7 +9,9 @@ const hash = (s) => { | ||
const unslugName = (name) => { | ||
return name.split('/').slice(-1).pop().replace(/-/g, ' '); | ||
var _a, _b, _c; | ||
return (_c = (_b = (_a = name.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()) === null || _b === void 0 ? void 0 : _b.replace(/-/g, ' ')) !== null && _c !== void 0 ? _c : name; | ||
}; | ||
const setAttributeIfEmpty = (element, attribute, value) => { | ||
var _a; | ||
if (element.hasAttribute(attribute)) { | ||
return element.getAttribute(attribute); | ||
return (_a = element.getAttribute(attribute)) !== null && _a !== void 0 ? _a : ''; | ||
} | ||
@@ -16,0 +18,0 @@ element.setAttribute(attribute, value); |
@@ -34,3 +34,3 @@ export class KeyboardManager { | ||
this.detachEscapeBehavior = () => { | ||
this.escapeCallback = null; | ||
this.escapeCallback = () => { return; }; | ||
if (typeof window !== undefined) { | ||
@@ -37,0 +37,0 @@ window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this)); |
@@ -13,3 +13,3 @@ import arrowSvg from './assets/arrow.svg'; | ||
this.km = new KeyboardManager(); | ||
this.handleCloseDropdown = (e = null) => { | ||
this.handleCloseDropdown = (e) => { | ||
if (!this.visible) { | ||
@@ -22,26 +22,14 @@ return; | ||
}; | ||
this.handleVisibility = (visibility = null) => { | ||
if (visibility !== null) { | ||
this.visible = visibility; | ||
this.changedEvent.emit({ caller: this.caller, visible: this.visible }); | ||
if (this.visible) { | ||
this.visibleEvent.emit({ caller: this.caller, visible: true }); | ||
return; | ||
} | ||
this.hiddenEvent.emit({ caller: this.caller, visible: false }); | ||
return; | ||
} | ||
this.handleVisibility = (visibility) => { | ||
this.visible = visibility; | ||
this.changedEvent.emit({ caller: this.caller, visible: this.visible }); | ||
if (this.visible) { | ||
this.visible = false; | ||
this.changedEvent.emit({ caller: this.caller, visible: this.visible }); | ||
this.hiddenEvent.emit({ caller: this.caller, visible: false }); | ||
this.visibleEvent.emit({ caller: this.caller, visible: true }); | ||
return; | ||
} | ||
this.visible = true; | ||
this.changedEvent.emit({ caller: this.caller, visible: this.visible }); | ||
this.visibleEvent.emit({ caller: this.caller, visible: true }); | ||
this.hiddenEvent.emit({ caller: this.caller, visible: false }); | ||
this.updatePosition(); | ||
}; | ||
this.callerOnClick = () => { | ||
this.handleVisibility(); | ||
this.handleVisibility(!this.visible); | ||
}; | ||
@@ -69,3 +57,3 @@ this.arrowInset = (middleware, arrowPosition) => { | ||
inset.left = arrow.x !== null ? `${arrow.x}px` : ''; | ||
inset.top = null; | ||
inset.top = ''; | ||
break; | ||
@@ -114,3 +102,3 @@ default: | ||
return; | ||
const middleware = []; | ||
const middleware = new Array(); | ||
const config = {}; | ||
@@ -154,6 +142,8 @@ if (this.shiftPadding) { | ||
}[placement.split('-')[0]]; | ||
Object.assign(arrowStyle, this.arrowTransform(arrowPosition)); | ||
Object.assign(arrowStyle, this.arrowInset(middlewareData, arrowPosition)); | ||
Object.assign(arrowStyle, this.arrowTransformOrigin(arrowPosition)); | ||
Object.assign(this.arrowEl.style, arrowStyle); | ||
if (arrowPosition) { | ||
Object.assign(arrowStyle, this.arrowTransform(arrowPosition)); | ||
Object.assign(arrowStyle, this.arrowInset(middlewareData, arrowPosition)); | ||
Object.assign(arrowStyle, this.arrowTransformOrigin(arrowPosition)); | ||
Object.assign(this.arrowEl.style, arrowStyle); | ||
} | ||
}); | ||
@@ -186,4 +176,4 @@ }; | ||
this.backdropEl.style.zIndex = (this.zIndex - 1).toString(); | ||
document.body.appendChild(this.backdropEl); | ||
} | ||
document.body.appendChild(this.backdropEl); | ||
clearTimeout(this.backdropTimer); | ||
@@ -202,3 +192,2 @@ this.backdropTimer = setTimeout(() => { | ||
this.backdropEl.remove(); | ||
this.backdropEl = null; | ||
}, this.backdropDuration); | ||
@@ -271,9 +260,11 @@ } | ||
componentDidLoad() { | ||
var _a; | ||
document.addEventListener('click', this.handleCloseDropdown); | ||
this.arrowEl = this.host.shadowRoot.querySelector('.arrow'); | ||
this.caller = document.getElementById(this.target); | ||
this.setAriaAttributes(); | ||
if (!this.caller) { | ||
this.arrowEl = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.arrow'); | ||
const caller = document.getElementById(this.target); | ||
if (!caller) { | ||
return; | ||
} | ||
this.caller = caller; | ||
this.setAriaAttributes(); | ||
this.caller.addEventListener('click', this.callerOnClick.bind(this)); | ||
@@ -290,3 +281,3 @@ this.km.addElement(this.host); | ||
this.km.detachEscapeBehavior(); | ||
this.cleanupAutoUpdate = null; | ||
this.cleanupAutoUpdate = () => { return; }; | ||
} | ||
@@ -319,3 +310,3 @@ render() { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -338,3 +329,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -357,3 +348,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -376,3 +367,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -395,3 +386,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -431,3 +422,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -455,3 +446,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -474,3 +465,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -493,3 +484,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -512,3 +503,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -536,3 +527,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -555,3 +546,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -574,3 +565,3 @@ "tags": [], | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"docs": { | ||
@@ -577,0 +568,0 @@ "tags": [], |
@@ -77,3 +77,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | ||
export const NoTarget = () => h("div", null, h("mds-button", { id: "dropdown-trigger" }, "Trigger"), h("mds-dropdown", null, h("mds-text", null, "Ciao"))); | ||
export const NoTarget = () => h("div", null, h("mds-button", { id: "dropdown-trigger" }, "Trigger"), h("mds-dropdown", { target: '' }, h("mds-text", null, "Ciao"))); | ||
export const Default = Template.bind({}); | ||
@@ -80,0 +80,0 @@ Default.args = { |
@@ -1,1 +0,1 @@ | ||
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?r(t.value):i(t.value).then(a,s)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __rest=this&&this.__rest||function(t,e){var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)r[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++){if(e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i]))r[n[i]]=t[n[i]]}return r};var __spreadArray=this&&this.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++){if(o||!(n in e)){if(!o)o=Array.prototype.slice.call(e,0,n);o[n]=e[n]}}return t.concat(o||Array.prototype.slice.call(e))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-56f3ad03.js";var arrowSvg='<svg width="30" height="16" viewBox="0 0 30 16" xmlns="http://www.w3.org/2000/svg">\n <path d="M10.2 2.4C12.6 -0.800001 17.4 -0.800001 19.8 2.4L30 16H0L10.2 2.4Z"/>\n</svg>\n';var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(e){if(e.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(e,r){if(r===void 0){r="element"}t.elements[r]=e};this.attachClickBehavior=function(e){if(e===void 0){e="element"}if(t.elements[e]){t.elements[e].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(e){if(e===void 0){e="element"}if(t.elements[e]){t.elements[e].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(e){t.escapeCallback=e;if(typeof window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=null;if(typeof window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();function getSide(t){return t.split("-")[0]}function getAlignment(t){return t.split("-")[1]}function getMainAxisFromPlacement(t){return["top","bottom"].includes(getSide(t))?"x":"y"}function getLengthFromAxis(t){return t==="y"?"height":"width"}function computeCoordsFromPlacement(t,e,r){var n=t.reference,i=t.floating;var o=n.x+n.width/2-i.width/2;var a=n.y+n.height/2-i.height/2;var s=getMainAxisFromPlacement(e);var l=getLengthFromAxis(s);var c=n[l]/2-i[l]/2;var d=getSide(e);var f=s==="x";var u;switch(d){case"top":u={x:o,y:n.y-i.height};break;case"bottom":u={x:o,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:a};break;case"left":u={x:n.x-i.width,y:a};break;default:u={x:n.x,y:n.y}}switch(getAlignment(e)){case"start":u[s]-=c*(r&&f?-1:1);break;case"end":u[s]+=c*(r&&f?-1:1);break}return u}var computePosition$1=function(t,e,r){return __awaiter(void 0,void 0,void 0,(function(){var n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,b,w,y,x,k,E,_,C,P,A;var O,R;return __generator(this,(function(T){switch(T.label){case 0:n=r.placement,i=n===void 0?"bottom":n,o=r.strategy,a=o===void 0?"absolute":o,s=r.middleware,l=s===void 0?[]:s,c=r.platform;return[4,c.isRTL==null?void 0:c.isRTL(e)];case 1:d=T.sent();return[4,c.getElementRects({reference:t,floating:e,strategy:a})];case 2:f=T.sent();u=computeCoordsFromPlacement(f,i,d),p=u.x,g=u.y;m=i;h={};v=0;b=0;T.label=3;case 3:if(!(b<l.length))return[3,11];w=l[b],y=w.name,x=w.fn;return[4,x({x:p,y:g,initialPlacement:i,placement:m,strategy:a,middlewareData:h,rects:f,platform:c,elements:{reference:t,floating:e}})];case 4:k=T.sent(),E=k.x,_=k.y,C=k.data,P=k.reset;p=E!=null?E:p;g=_!=null?_:g;h=__assign(__assign({},h),(O={},O[y]=__assign(__assign({},h[y]),C),O));if(!(P&&v<=50))return[3,10];v++;if(!(typeof P==="object"))return[3,9];if(P.placement){m=P.placement}if(!P.rects)return[3,8];if(!(P.rects===true))return[3,6];return[4,c.getElementRects({reference:t,floating:e,strategy:a})];case 5:A=T.sent();return[3,7];case 6:A=P.rects;T.label=7;case 7:f=A;T.label=8;case 8:R=computeCoordsFromPlacement(f,m,d),p=R.x,g=R.y;T.label=9;case 9:b=-1;return[3,10];case 10:b++;return[3,3];case 11:return[2,{x:p,y:g,placement:m,strategy:a,middlewareData:h}]}}))}))};function expandPaddingObject(t){return __assign({top:0,right:0,bottom:0,left:0},t)}function getSideObjectFromPadding(t){return typeof t!=="number"?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){return __assign(__assign({},t),{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function detectOverflow(t,e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,b,w,y,x,k,E,_,C,P,A,O,R,T,L,S;var B,D;return __generator(this,(function(N){switch(N.label){case 0:if(e===void 0){e={}}n=t.x,i=t.y,o=t.platform,a=t.rects,s=t.elements,l=t.strategy;c=e.boundary,d=c===void 0?"clippingAncestors":c,f=e.rootBoundary,u=f===void 0?"viewport":f,p=e.elementContext,g=p===void 0?"floating":p,m=e.altBoundary,h=m===void 0?false:m,v=e.padding,b=v===void 0?0:v;w=getSideObjectFromPadding(b);y=g==="floating"?"reference":"floating";x=s[h?y:g];E=rectToClientRect;C=(_=o).getClippingRect;B={};return[4,o.isElement==null?void 0:o.isElement(x)];case 1:if(!((r=N.sent())!=null?r:true))return[3,2];P=x;return[3,5];case 2:A=x.contextElement;if(A)return[3,4];return[4,o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)];case 3:A=N.sent();N.label=4;case 4:P=A;N.label=5;case 5:return[4,C.apply(_,[(B.element=P,B.boundary=d,B.rootBoundary=u,B.strategy=l,B)])];case 6:k=E.apply(void 0,[N.sent()]);R=rectToClientRect;if(!o.convertOffsetParentRelativeRectToViewportRelativeRect)return[3,9];S=(L=o).convertOffsetParentRelativeRectToViewportRelativeRect;D={rect:g==="floating"?__assign(__assign({},a.floating),{x:n,y:i}):a.reference};return[4,o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)];case 7:return[4,S.apply(L,[(D.offsetParent=N.sent(),D.strategy=l,D)])];case 8:T=N.sent();return[3,10];case 9:T=a[g];N.label=10;case 10:O=R.apply(void 0,[T]);return[2,{top:k.top-O.top+w.top,bottom:O.bottom-k.bottom+w.bottom,left:k.left-O.left+w.left,right:O.right-k.right+w.right}]}}))}))}var min$1=Math.min;var max$1=Math.max;function within(t,e,r){return max$1(t,min$1(e,r))}var arrow=function(t){return{name:"arrow",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,b,w,y,x,k,E,_,C,P,A,O,R,T;var L,S;return __generator(this,(function(B){switch(B.label){case 0:r=t!=null?t:{},n=r.element,i=r.padding,o=i===void 0?0:i;a=e.x,s=e.y,l=e.placement,c=e.rects,d=e.platform;if(n==null){return[2,{}]}f=getSideObjectFromPadding(o);u={x:a,y:s};p=getMainAxisFromPlacement(l);g=getAlignment(l);m=getLengthFromAxis(p);return[4,d.getDimensions(n)];case 1:h=B.sent();v=p==="y"?"top":"left";b=p==="y"?"bottom":"right";w=c.reference[m]+c.reference[p]-u[p]-c.floating[m];y=u[p]-c.reference[p];return[4,d.getOffsetParent==null?void 0:d.getOffsetParent(n)];case 2:x=B.sent();k=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0;if(k===0){k=c.floating[m]}E=w/2-y/2;_=f[v];C=k-h[m]-f[b];P=k/2-h[m]/2+E;A=within(_,P,C);O=g==="start"?f[v]:f[b];R=O>0&&P!==A&&c.reference[m]<=c.floating[m];T=R?P<_?_-P:C-P:0;return[2,(L={},L[p]=u[p]-T,L.data=(S={},S[p]=A,S.centerOffset=P-A,S),L)]}}))}))}}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,(function(t){return hash$1[t]}))}function getAlignmentSides(t,e,r){if(r===void 0){r=false}var n=getAlignment(t);var i=getMainAxisFromPlacement(t);var o=getLengthFromAxis(i);var a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";if(e.reference[o]>e.floating[o]){a=getOppositePlacement(a)}return{main:a,cross:getOppositePlacement(a)}}var hash$2={start:"end",end:"start"};function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,(function(t){return hash$2[t]}))}var sides=["top","right","bottom","left"];var allPlacements=sides.reduce((function(t,e){return t.concat(e,e+"-start",e+"-end")}),[]);function getPlacementList(t,e,r){var n=t?__spreadArray(__spreadArray([],r.filter((function(e){return getAlignment(e)===t})),true),r.filter((function(e){return getAlignment(e)!==t})),true):r.filter((function(t){return getSide(t)===t}));return n.filter((function(r){if(t){return getAlignment(r)===t||(e?getOppositeAlignmentPlacement(r)!==r:false)}return true}))}var autoPlacement=function(t){if(t===void 0){t={}}return{name:"autoPlacement",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,b,w,y,x,k,E,_,C,P,A,O,R,T,L,S,B,D,N;return __generator(this,(function(H){switch(H.label){case 0:s=e.x,l=e.y,c=e.rects,d=e.middlewareData,f=e.placement,u=e.platform,p=e.elements;g=t.alignment,m=g===void 0?null:g,h=t.allowedPlacements,v=h===void 0?allPlacements:h,b=t.autoAlignment,w=b===void 0?true:b,y=__rest(t,["alignment","allowedPlacements","autoAlignment"]);x=getPlacementList(m,w,v);return[4,detectOverflow(e,y)];case 1:k=H.sent();E=(r=(n=d.autoPlacement)==null?void 0:n.index)!=null?r:0;_=x[E];if(_==null){return[2,{}]}O=getAlignmentSides;R=[_,c];return[4,u.isRTL==null?void 0:u.isRTL(p.floating)];case 2:C=O.apply(void 0,R.concat([H.sent()])),P=C.main,A=C.cross;if(f!==_){return[2,{x:s,y:l,reset:{placement:x[0]}}]}T=[k[getSide(_)],k[P],k[A]];L=__spreadArray(__spreadArray([],(i=(o=d.autoPlacement)==null?void 0:o.overflows)!=null?i:[],true),[{placement:_,overflows:T}],false);S=x[E+1];if(S){return[2,{data:{index:E+1,overflows:L},reset:{placement:S}}]}B=L.slice().sort((function(t,e){return t.overflows[0]-e.overflows[0]}));D=(a=B.find((function(t){var e=t.overflows;return e.every((function(t){return t<=0}))})))==null?void 0:a.placement;N=D!=null?D:B[0].placement;if(N!==f){return[2,{data:{index:E+1,overflows:L},reset:{placement:N}}]}return[2,{}]}}))}))}}};function getExpandedPlacements(t){var e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}var flip=function(t){if(t===void 0){t={}}return{name:"flip",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,b,w,y,x,k,E,_,C,P,A,O,R,T,L,S,B,D,N,H,M;return __generator(this,(function(W){switch(W.label){case 0:n=e.placement,i=e.middlewareData,o=e.rects,a=e.initialPlacement,s=e.platform,l=e.elements;c=t.mainAxis,d=c===void 0?true:c,f=t.crossAxis,u=f===void 0?true:f,p=t.fallbackPlacements,g=t.fallbackStrategy,m=g===void 0?"bestFit":g,h=t.flipAlignment,v=h===void 0?true:h,b=__rest(t,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]);w=getSide(n);y=w===a;x=p||(y||!v?[getOppositePlacement(a)]:getExpandedPlacements(a));k=__spreadArray([a],x,true);return[4,detectOverflow(e,b)];case 1:E=W.sent();_=[];C=((r=i.flip)==null?void 0:r.overflows)||[];if(d){_.push(E[w])}if(!u)return[3,3];R=getAlignmentSides;T=[n,o];return[4,s.isRTL==null?void 0:s.isRTL(l.floating)];case 2:P=R.apply(void 0,T.concat([W.sent()])),A=P.main,O=P.cross;_.push(E[A],E[O]);W.label=3;case 3:C=__spreadArray(__spreadArray([],C,true),[{placement:n,overflows:_}],false);if(!_.every((function(t){return t<=0}))){B=((L=(S=i.flip)==null?void 0:S.index)!=null?L:0)+1;D=k[B];if(D){return[2,{data:{index:B,overflows:C},reset:{placement:D}}]}N="bottom";switch(m){case"bestFit":{M=(H=C.map((function(t){return[t,t.overflows.filter((function(t){return t>0})).reduce((function(t,e){return t+e}),0)]})).sort((function(t,e){return t[1]-e[1]}))[0])==null?void 0:H[0].placement;if(M){N=M}break}case"initialPlacement":N=a;break}if(n!==N){return[2,{reset:{placement:N}}]}}return[2,{}]}}))}))}}};function convertValueToCoords(t,e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m;return __generator(this,(function(h){switch(h.label){case 0:r=t.placement,n=t.platform,i=t.elements;return[4,n.isRTL==null?void 0:n.isRTL(i.floating)];case 1:o=h.sent();a=getSide(r);s=getAlignment(r);l=getMainAxisFromPlacement(r)==="x";c=["left","top"].includes(a)?-1:1;d=o&&l?-1:1;f=typeof e==="function"?e(t):e;u=typeof f==="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:__assign({mainAxis:0,crossAxis:0,alignmentAxis:null},f),p=u.mainAxis,g=u.crossAxis,m=u.alignmentAxis;if(s&&typeof m==="number"){g=s==="end"?m*-1:m}return[2,l?{x:g*d,y:p*c}:{x:p*c,y:g*d}]}}))}))}var offset=function(t){if(t===void 0){t=0}return{name:"offset",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i;return __generator(this,(function(o){switch(o.label){case 0:r=e.x,n=e.y;return[4,convertValueToCoords(e,t)];case 1:i=o.sent();return[2,{x:r+i.x,y:n+i.y,data:i}]}}))}))}}};function getCrossAxis(t){return t==="x"?"y":"x"}var shift=function(t){if(t===void 0){t={}}return{name:"shift",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,b,w,y,x,b,w,k,E,_;var C;return __generator(this,(function(P){switch(P.label){case 0:r=e.x,n=e.y,i=e.placement;o=t.mainAxis,a=o===void 0?true:o,s=t.crossAxis,l=s===void 0?false:s,c=t.limiter,d=c===void 0?{fn:function(t){var e=t.x,r=t.y;return{x:e,y:r}}}:c,f=__rest(t,["mainAxis","crossAxis","limiter"]);u={x:r,y:n};return[4,detectOverflow(e,f)];case 1:p=P.sent();g=getMainAxisFromPlacement(getSide(i));m=getCrossAxis(g);h=u[g];v=u[m];if(a){b=g==="y"?"top":"left";w=g==="y"?"bottom":"right";y=h+p[b];x=h-p[w];h=within(y,h,x)}if(l){b=m==="y"?"top":"left";w=m==="y"?"bottom":"right";k=v+p[b];E=v-p[w];v=within(k,v,E)}_=d.fn(__assign(__assign({},e),(C={},C[g]=h,C[m]=v,C)));return[2,__assign(__assign({},_),{data:{x:_.x-r,y:_.y-n}})]}}))}))}}};function isWindow(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function getWindow(t){if(t==null){return window}if(!isWindow(t)){var e=t.ownerDocument;return e?e.defaultView||window:window}return t}function getComputedStyle(t){return getWindow(t).getComputedStyle(t)}function getNodeName(t){return isWindow(t)?"":t?(t.nodeName||"").toLowerCase():""}function getUAString(){var t=navigator.userAgentData;if(t!=null&&t.brands){return t.brands.map((function(t){return t.brand+"/"+t.version})).join(" ")}return navigator.userAgent}function isHTMLElement(t){return t instanceof getWindow(t).HTMLElement}function isElement(t){return t instanceof getWindow(t).Element}function isNode(t){return t instanceof getWindow(t).Node}function isShadowRoot(t){if(typeof ShadowRoot==="undefined"){return false}var e=getWindow(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function isOverflowElement(t){var e=getComputedStyle(t),r=e.overflow,n=e.overflowX,i=e.overflowY,o=e.display;return/auto|scroll|overlay|hidden/.test(r+i+n)&&!["inline","contents"].includes(o)}function isTableElement(t){return["table","td","th"].includes(getNodeName(t))}function isContainingBlock(t){var e=/firefox/i.test(getUAString());var r=getComputedStyle(t);return r.transform!=="none"||r.perspective!=="none"||e&&r.willChange==="filter"||e&&(r.filter?r.filter!=="none":false)||["transform","perspective"].some((function(t){return r.willChange.includes(t)}))||["paint","layout","strict","content"].some((function(t){var e=r.contain;return e!=null?e.includes(t):false}))}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function isLastTraversableNode(t){return["html","body","#document"].includes(getNodeName(t))}var min=Math.min;var max=Math.max;var round=Math.round;function getBoundingClientRect(t,e,r){var n,i,o,a;if(e===void 0){e=false}if(r===void 0){r=false}var s=t.getBoundingClientRect();var l=1;var c=1;if(e&&isHTMLElement(t)){l=t.offsetWidth>0?round(s.width)/t.offsetWidth||1:1;c=t.offsetHeight>0?round(s.height)/t.offsetHeight||1:1}var d=isElement(t)?getWindow(t):window;var f=!isLayoutViewport()&&r;var u=(s.left+(f?(n=(i=d.visualViewport)==null?void 0:i.offsetLeft)!=null?n:0:0))/l;var p=(s.top+(f?(o=(a=d.visualViewport)==null?void 0:a.offsetTop)!=null?o:0:0))/c;var g=s.width/l;var m=s.height/c;return{width:g,height:m,top:p,right:u+g,bottom:p+m,left:u,x:u,y:p}}function getDocumentElement(t){return((isNode(t)?t.ownerDocument:t.document)||window.document).documentElement}function getNodeScroll(t){if(isElement(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(t){return getBoundingClientRect(getDocumentElement(t)).left+getNodeScroll(t).scrollLeft}function isScaled(t){var e=getBoundingClientRect(t);return round(e.width)!==t.offsetWidth||round(e.height)!==t.offsetHeight}function getRectRelativeToOffsetParent(t,e,r){var n=isHTMLElement(e);var i=getDocumentElement(e);var o=getBoundingClientRect(t,n&&isScaled(e),r==="fixed");var a={scrollLeft:0,scrollTop:0};var s={x:0,y:0};if(n||!n&&r!=="fixed"){if(getNodeName(e)!=="body"||isOverflowElement(i)){a=getNodeScroll(e)}if(isHTMLElement(e)){var l=getBoundingClientRect(e,true);s.x=l.x+e.clientLeft;s.y=l.y+e.clientTop}else if(i){s.x=getWindowScrollBarX(i)}}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function getParentNode(t){if(getNodeName(t)==="html"){return t}return t.assignedSlot||t.parentNode||(isShadowRoot(t)?t.host:null)||getDocumentElement(t)}function getTrueOffsetParent(t){if(!isHTMLElement(t)||getComputedStyle(t).position==="fixed"){return null}return t.offsetParent}function getContainingBlock(t){var e=getParentNode(t);if(isShadowRoot(e)){e=e.host}while(isHTMLElement(e)&&!isLastTraversableNode(e)){if(isContainingBlock(e)){return e}else{var r=e.parentNode;e=isShadowRoot(r)?r.host:r}}return null}function getOffsetParent(t){var e=getWindow(t);var r=getTrueOffsetParent(t);while(r&&isTableElement(r)&&getComputedStyle(r).position==="static"){r=getTrueOffsetParent(r)}if(r&&(getNodeName(r)==="html"||getNodeName(r)==="body"&&getComputedStyle(r).position==="static"&&!isContainingBlock(r))){return e}return r||getContainingBlock(t)||e}function getDimensions(t){if(isHTMLElement(t)){return{width:t.offsetWidth,height:t.offsetHeight}}var e=getBoundingClientRect(t);return{width:e.width,height:e.height}}function convertOffsetParentRelativeRectToViewportRelativeRect(t){var e=t.rect,r=t.offsetParent,n=t.strategy;var i=isHTMLElement(r);var o=getDocumentElement(r);if(r===o){return e}var a={scrollLeft:0,scrollTop:0};var s={x:0,y:0};if(i||!i&&n!=="fixed"){if(getNodeName(r)!=="body"||isOverflowElement(o)){a=getNodeScroll(r)}if(isHTMLElement(r)){var l=getBoundingClientRect(r,true);s.x=l.x+r.clientLeft;s.y=l.y+r.clientTop}}return __assign(__assign({},e),{x:e.x-a.scrollLeft+s.x,y:e.y-a.scrollTop+s.y})}function getViewportRect(t,e){var r=getWindow(t);var n=getDocumentElement(t);var i=r.visualViewport;var o=n.clientWidth;var a=n.clientHeight;var s=0;var l=0;if(i){o=i.width;a=i.height;var c=isLayoutViewport();if(c||!c&&e==="fixed"){s=i.offsetLeft;l=i.offsetTop}}return{width:o,height:a,x:s,y:l}}function getDocumentRect(t){var e;var r=getDocumentElement(t);var n=getNodeScroll(t);var i=(e=t.ownerDocument)==null?void 0:e.body;var o=max(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0);var a=max(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);var s=-n.scrollLeft+getWindowScrollBarX(t);var l=-n.scrollTop;if(getComputedStyle(i||r).direction==="rtl"){s+=max(r.clientWidth,i?i.clientWidth:0)-o}return{width:o,height:a,x:s,y:l}}function getNearestOverflowAncestor(t){var e=getParentNode(t);if(isLastTraversableNode(e)){return t.ownerDocument.body}if(isHTMLElement(e)&&isOverflowElement(e)){return e}return getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e){var r;if(e===void 0){e=[]}var n=getNearestOverflowAncestor(t);var i=n===((r=t.ownerDocument)==null?void 0:r.body);var o=getWindow(n);var a=i?[o].concat(o.visualViewport||[],isOverflowElement(n)?n:[]):n;var s=e.concat(a);return i?s:s.concat(getOverflowAncestors(a))}function contains(t,e){var r=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e)){return true}else if(r&&isShadowRoot(r)){var n=e;do{if(n&&t===n){return true}n=n.parentNode||n.host}while(n)}return false}function getNearestParentCapableOfEscapingClipping(t,e){var r=t;while(r&&!isLastTraversableNode(r)&&!e.includes(r)){if(isElement(r)&&["absolute","fixed"].includes(getComputedStyle(r).position)){break}var n=getParentNode(r);r=isShadowRoot(n)?n.host:n}return r}function getInnerBoundingClientRect(t,e){var r=getBoundingClientRect(t,false,e==="fixed");var n=r.top+t.clientTop;var i=r.left+t.clientLeft;return{top:n,left:i,x:i,y:n,right:i+t.clientWidth,bottom:n+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}function getClientRectFromClippingAncestor(t,e,r){if(e==="viewport"){return rectToClientRect(getViewportRect(t,r))}if(isElement(e)){return getInnerBoundingClientRect(e,r)}return rectToClientRect(getDocumentRect(getDocumentElement(t)))}function getClippingAncestors(t){var e=getOverflowAncestors(t);var r=getNearestParentCapableOfEscapingClipping(t,e);var n=null;if(r&&isHTMLElement(r)){var i=getOffsetParent(r);if(isOverflowElement(r)){n=r}else if(isHTMLElement(i)){n=i}}if(!isElement(n)){return[]}return e.filter((function(t){return n&&isElement(t)&&contains(t,n)&&getNodeName(t)!=="body"}))}function getClippingRect(t){var e=t.element,r=t.boundary,n=t.rootBoundary,i=t.strategy;var o=r==="clippingAncestors"?getClippingAncestors(e):[].concat(r);var a=__spreadArray(__spreadArray([],o,true),[n],false);var s=a[0];var l=a.reduce((function(t,r){var n=getClientRectFromClippingAncestor(e,r,i);t.top=max(n.top,t.top);t.right=min(n.right,t.right);t.bottom=min(n.bottom,t.bottom);t.left=max(n.left,t.left);return t}),getClientRectFromClippingAncestor(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}var platform={getClippingRect:getClippingRect,convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,isElement:isElement,getDimensions:getDimensions,getOffsetParent:getOffsetParent,getDocumentElement:getDocumentElement,getElementRects:function(t){var e=t.reference,r=t.floating,n=t.strategy;return{reference:getRectRelativeToOffsetParent(e,getOffsetParent(r),n),floating:__assign(__assign({},getDimensions(r)),{x:0,y:0})}},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return getComputedStyle(t).direction==="rtl"}};function autoUpdate(t,e,r,n){if(n===void 0){n={}}var i=n.ancestorScroll,o=i===void 0?true:i,a=n.ancestorResize,s=a===void 0?true:a,l=n.elementResize,c=l===void 0?true:l,d=n.animationFrame,f=d===void 0?false:d;var u=o&&!f;var p=u||s?__spreadArray(__spreadArray([],isElement(t)?getOverflowAncestors(t):t.contextElement?getOverflowAncestors(t.contextElement):[],true),getOverflowAncestors(e),true):[];p.forEach((function(t){u&&t.addEventListener("scroll",r,{passive:true});s&&t.addEventListener("resize",r)}));var g=null;if(c){var m=true;g=new ResizeObserver((function(){if(!m){r()}m=false}));isElement(t)&&!f&&g.observe(t);if(!isElement(t)&&t.contextElement&&!f){g.observe(t.contextElement)}g.observe(e)}var h;var v=f?getBoundingClientRect(t):null;if(f){b()}function b(){var e=getBoundingClientRect(t);if(v&&(e.x!==v.x||e.y!==v.y||e.width!==v.width||e.height!==v.height)){r()}v=e;h=requestAnimationFrame(b)}r();return function(){var t;p.forEach((function(t){u&&t.removeEventListener("scroll",r);s&&t.removeEventListener("resize",r)}));(t=g)==null?void 0:t.disconnect();g=null;if(f){cancelAnimationFrame(h)}}}var computePosition=function(t,e,r){return computePosition$1(t,e,__assign({platform:platform},r))};var hash=function(t){var e,r;for(e=0,r=0;e<t.length;e++){r=Math.imul(31,r)+t.charCodeAt(e)|0}return r.toString()};var setAttributeIfEmpty=function(t,e,r){if(t.hasAttribute(e)){return t.getAttribute(e)}t.setAttribute(e,r);return r};var hashValue=function(t){return"".concat(t,"-").concat(hash(t))};var mdsDropdownCss=".visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.mt-\\[25vh\\]{margin-top:25vh}.flex{display:-ms-flexbox;display:flex}.hidden{display:none}.h-\\[2px\\]{height:2px}.h-\\[150vh\\]{height:150vh}.h-\\[100vh\\]{height:100vh}.w-20{width:5rem}.w-full{width:100%}.max-w-\\[350px\\]{max-width:350px}.transform{-webkit-transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{-ms-flex-align:center;align-items:center}.justify-start{-ms-flex-pack:start;justify-content:flex-start}.justify-end{-ms-flex-pack:end;justify-content:flex-end}.justify-center{-ms-flex-pack:center;justify-content:center}.border{border-width:1px}.bg-brand-maggioli-06{--tw-bg-opacity:1;background-color:rgba(var(--brand-maggioli-06), var(--tw-bg-opacity))}.bg-tone-neutral-08{--tw-bg-opacity:1;background-color:rgba(var(--tone-neutral-08), var(--tw-bg-opacity))}.px-0{padding-left:0px;padding-right:0px}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.transition{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;-webkit-transition-property:color, background-color, border-color, fill, stroke, opacity, -webkit-text-decoration-color, -webkit-box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, fill, stroke, opacity, -webkit-text-decoration-color, -webkit-box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}.ease-out{-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}:host{--mds-dropdown-arrow-background:var(--mds-dropdown-background);--mds-dropdown-background:rgb(var(--tone-neutral));--mds-dropdown-drop-shadow:drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));--mds-dropdown-duration:0.5s;--mds-dropdown-ease:cubic-bezier(0.19, 1, 0.22, 1);--mds-dropdown-transform-from:scale(0.9) translateY(-3%);--mds-dropdown-transform-to:scale(1) translate(0, 0);--mds-dropdown-z-index:var(--magma-dropdown-z-index, 3000);pointer-events:none;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;gap:1rem;border-radius:0.5rem;padding:1.5rem;opacity:0;background-color:var(--mds-dropdown-background);-webkit-filter:var(--mds-dropdown-drop-shadow);filter:var(--mds-dropdown-drop-shadow);-webkit-transform:var(--mds-dropdown-transform-from);transform:var(--mds-dropdown-transform-from);-webkit-transition-duration:var(--mds-dropdown-duration);transition-duration:var(--mds-dropdown-duration);-webkit-transition-property:opacity, -webkit-transform, -webkit-transform-origin;transition-property:opacity, -webkit-transform, -webkit-transform-origin;transition-property:opacity, transform, transform-origin;transition-property:opacity, transform, transform-origin, -webkit-transform, -webkit-transform-origin;-webkit-transition-timing-function:var(--mds-dropdown-ease);transition-timing-function:var(--mds-dropdown-ease);z-index:var(--mds-dropdown-z-index)}:host([visible]:not([visible=false])){pointer-events:auto;opacity:1;-webkit-transform:var(--mds-dropdown-transform-to);transform:var(--mds-dropdown-transform-to)}:host([smooth]:not([smooth=false])){-webkit-transition-property:bottom, left, opacity, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, opacity, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, opacity, right, top, transform, transform-origin;transition-property:bottom, left, opacity, right, top, transform, transform-origin, -webkit-transform, -webkit-transform-origin}.arrow{pointer-events:none;position:fixed;top:-1rem;display:-ms-flexbox;display:flex;fill:var(--mds-dropdown-arrow-background);-webkit-transition-duration:var(--mds-dropdown-duration);transition-duration:var(--mds-dropdown-duration);-webkit-transition-property:bottom, left, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, right, top, transform, transform-origin;transition-property:bottom, left, right, top, transform, transform-origin, -webkit-transform, -webkit-transform-origin}:host([arrow]:not([arrow=false])[visible]:not([visible=false])) .arrow{-webkit-transition-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1);transition-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}:host([arrow]:not([arrow=false]):not([visible]):not([visible=true])) .arrow{-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1)}::slotted(*){position:relative;z-index:10}";var MdsDropdown=function(){function t(t){var e=this;registerInstance(this,t);this.visibleEvent=createEvent(this,"mdsDropdownVisible",7);this.hiddenEvent=createEvent(this,"mdsDropdownHide",7);this.changedEvent=createEvent(this,"mdsDropdownChange",7);this.backdropBackgroundVisible="rgba(var(--magma-backdrop-color, 0 0 0) / var(--magma-backdrop-opacity, 0.1))";this.backdropBackgroundHidden="rgba(var(--magma-backdrop-color, 0 0 0) / 0)";this.backdropDuration=2e3;this.backdropId="mds-dropdown-backdrop";this.km=new KeyboardManager;this.handleCloseDropdown=function(t){if(t===void 0){t=null}if(!e.visible){return}if(!e.host.contains(t.target)&&t.target!==e.caller){e.handleVisibility(false)}};this.handleVisibility=function(t){if(t===void 0){t=null}if(t!==null){e.visible=t;e.changedEvent.emit({caller:e.caller,visible:e.visible});if(e.visible){e.visibleEvent.emit({caller:e.caller,visible:true});return}e.hiddenEvent.emit({caller:e.caller,visible:false});return}if(e.visible){e.visible=false;e.changedEvent.emit({caller:e.caller,visible:e.visible});e.hiddenEvent.emit({caller:e.caller,visible:false});return}e.visible=true;e.changedEvent.emit({caller:e.caller,visible:e.visible});e.visibleEvent.emit({caller:e.caller,visible:true});e.updatePosition()};this.callerOnClick=function(){e.handleVisibility()};this.arrowInset=function(t,e){var r=t.arrow;var n={bottom:"",left:"",right:"",top:""};if(r===undefined){return{}}switch(e){case"bottom":n.left=r.x!==null?"".concat(r.x,"px"):"";n.top="100%";break;case"left":n.right="100%";n.top=r.y!==null?"".concat(r.y,"px"):"";break;case"right":n.left="100%";n.top=r.y!==null?"".concat(r.y,"px"):"";break;case"top":n.left=r.x!==null?"".concat(r.x,"px"):"";n.top=null;break}return n};this.arrowTransform=function(t){var r=e.arrow&&e.visible?"scale(1)":"scale(0)";switch(t){case"bottom":r="rotate(180deg) ".concat(r," translate(0, -100%)");break;case"left":r="rotate(-90deg) ".concat(r," translate(50%, -50%)");break;case"right":r="rotate(90deg) ".concat(r," translate(-50%, -50%)");break;case"top":r="rotate(0deg) ".concat(r," translate(0, 0)");break}return{transform:r}};this.arrowTransformOrigin=function(t){switch(t){case"bottom":return{transformOrigin:"center top"};case"left":return{transformOrigin:"right center"};case"right":return{transformOrigin:"left center"};case"top":return{transformOrigin:"center bottom"};default:return{transformOrigin:"center top"}}};this.updatePosition=function(){if(!e.caller)return;var t=[];var r={};if(e.shiftPadding){r.padding=e.shiftPadding}if(e.autoPlacement){t.push(autoPlacement())}if(e.offset){t.push(offset(e.offset))}if(!e.autoPlacement&&e.flip){t.push(flip(r))}if(e.shift){t.push(shift(r))}if(e.arrow){t.push(arrow({element:e.arrowEl,padding:e.arrowPadding}))}computePosition(e.caller,e.host,{middleware:t,placement:e.placement,strategy:e.strategy}).then((function(t){var r=t.x,n=t.y,i=t.placement,o=t.middlewareData;Object.assign(e.host.style,{left:"".concat(r,"px"),top:"".concat(n,"px")});var a={};var s={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(a,e.arrowTransform(s));Object.assign(a,e.arrowInset(o,s));Object.assign(a,e.arrowTransformOrigin(s));Object.assign(e.arrowEl.style,a)}))};this.arrow=true;this.arrowPadding=24;this.autoPlacement=false;this.backdrop=false;this.flip=false;this.target=undefined;this.offset=24;this.placement="bottom";this.shift=true;this.shiftPadding=24;this.smooth=true;this.strategy="fixed";this.visible=false;this.zIndex=1e3}t.prototype.attachBackdrop=function(){var t=this;if(!this.backdropEl){this.backdropEl=document.createElement("div");this.backdropEl.style.backgroundColor=this.backdropBackgroundHidden;this.backdropEl.className=this.backdropId;this.backdropEl.style.inset="0";this.backdropEl.style.pointerEvents="none";this.backdropEl.style.position="fixed";this.backdropEl.style.transition="background-color ".concat(this.backdropDuration/1e4,"s ease-out");this.backdropEl.style.zIndex=(this.zIndex-1).toString();document.body.appendChild(this.backdropEl)}clearTimeout(this.backdropTimer);this.backdropTimer=setTimeout((function(){t.backdropEl.style.backgroundColor=t.backdropBackgroundVisible}),1)};t.prototype.detachBackdrop=function(){var t=this;if(!this.backdropEl){return}this.backdropEl.style.backgroundColor="transparent";clearTimeout(this.backdropTimer);this.backdropTimer=setTimeout((function(){t.backdropEl.remove();t.backdropEl=null}),this.backdropDuration)};t.prototype.arrowChanged=function(){this.updatePosition()};t.prototype.arrowPaddingChanged=function(){this.updatePosition()};t.prototype.autoPlacementChanged=function(){this.updatePosition()};t.prototype.backdropChanged=function(t){if(!this.visible){return}if(t){this.attachBackdrop();return}this.detachBackdrop()};t.prototype.flipChanged=function(){this.updatePosition()};t.prototype.offsetChanged=function(){this.updatePosition()};t.prototype.placementChanged=function(){this.updatePosition()};t.prototype.shiftChanged=function(){this.updatePosition()};t.prototype.shiftPaddingChanged=function(){this.updatePosition()};t.prototype.strategyChanged=function(){this.updatePosition()};t.prototype.visibleChanged=function(t){this.updatePosition();if(!this.backdrop){return}if(t){this.attachBackdrop();return}this.detachBackdrop()};t.prototype.zIndexChanged=function(t){this.host.style.setProperty("z-index",t.toString())};t.prototype.componentWillLoad=function(){Array.from(document.getElementsByClassName(this.backdropId)).forEach((function(t){t.remove()}));this.zIndexChanged(this.zIndex)};t.prototype.setAriaAttributes=function(){var t=setAttributeIfEmpty(this.host,"id",hashValue(this.target));setAttributeIfEmpty(this.caller,"aria-haspopup","true");setAttributeIfEmpty(this.caller,"aria-controls",t);setAttributeIfEmpty(this.host,"role","menu");setAttributeIfEmpty(this.host,"aria-labelledby",this.target)};t.prototype.componentDidLoad=function(){var t=this;document.addEventListener("click",this.handleCloseDropdown);this.arrowEl=this.host.shadowRoot.querySelector(".arrow");this.caller=document.getElementById(this.target);this.setAriaAttributes();if(!this.caller){return}this.caller.addEventListener("click",this.callerOnClick.bind(this));this.km.addElement(this.host);this.km.attachEscapeBehavior((function(){return t.handleVisibility(false)}));this.backdropChanged(this.backdrop);this.updatePosition();if(!this.cleanupAutoUpdate){this.cleanupAutoUpdate=autoUpdate(this.caller,this.host,this.updatePosition)}};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.cleanupAutoUpdate=null};t.prototype.render=function(){return h(Host,null,h("div",{class:"arrow",innerHTML:arrowSvg}),h("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{arrow:["arrowChanged"],arrowPadding:["arrowPaddingChanged"],autoPlacement:["autoPlacementChanged"],backdrop:["backdropChanged"],flip:["flipChanged"],offset:["offsetChanged"],placement:["placementChanged"],shift:["shiftChanged"],shiftPadding:["shiftPaddingChanged"],strategy:["strategyChanged"],visible:["visibleChanged"],zIndex:["zIndexChanged"]}},enumerable:false,configurable:true});return t}();MdsDropdown.style=mdsDropdownCss;export{MdsDropdown as mds_dropdown}; | ||
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?r(t.value):i(t.value).then(a,s)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __rest=this&&this.__rest||function(t,e){var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)r[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++){if(e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i]))r[n[i]]=t[n[i]]}return r};var __spreadArray=this&&this.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++){if(o||!(n in e)){if(!o)o=Array.prototype.slice.call(e,0,n);o[n]=e[n]}}return t.concat(o||Array.prototype.slice.call(e))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-56f3ad03.js";var arrowSvg='<svg width="30" height="16" viewBox="0 0 30 16" xmlns="http://www.w3.org/2000/svg">\n <path d="M10.2 2.4C12.6 -0.800001 17.4 -0.800001 19.8 2.4L30 16H0L10.2 2.4Z"/>\n</svg>\n';var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(e){if(e.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(e,r){if(r===void 0){r="element"}t.elements[r]=e};this.attachClickBehavior=function(e){if(e===void 0){e="element"}if(t.elements[e]){t.elements[e].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(e){if(e===void 0){e="element"}if(t.elements[e]){t.elements[e].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(e){t.escapeCallback=e;if(typeof window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(typeof window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();function getAlignment(t){return t.split("-")[1]}function getLengthFromAxis(t){return t==="y"?"height":"width"}function getSide(t){return t.split("-")[0]}function getMainAxisFromPlacement(t){return["top","bottom"].includes(getSide(t))?"x":"y"}function computeCoordsFromPlacement(t,e,r){var n=t.reference,i=t.floating;var o=n.x+n.width/2-i.width/2;var a=n.y+n.height/2-i.height/2;var s=getMainAxisFromPlacement(e);var l=getLengthFromAxis(s);var c=n[l]/2-i[l]/2;var d=getSide(e);var f=s==="x";var u;switch(d){case"top":u={x:o,y:n.y-i.height};break;case"bottom":u={x:o,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:a};break;case"left":u={x:n.x-i.width,y:a};break;default:u={x:n.x,y:n.y}}switch(getAlignment(e)){case"start":u[s]-=c*(r&&f?-1:1);break;case"end":u[s]+=c*(r&&f?-1:1);break}return u}var computePosition$1=function(t,e,r){return __awaiter(void 0,void 0,void 0,(function(){var n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,w,b,y,x,k,E,_,A,C,P,O;var S,R;return __generator(this,(function(L){switch(L.label){case 0:n=r.placement,i=n===void 0?"bottom":n,o=r.strategy,a=o===void 0?"absolute":o,s=r.middleware,l=s===void 0?[]:s,c=r.platform;d=l.filter(Boolean);return[4,c.isRTL==null?void 0:c.isRTL(e)];case 1:f=L.sent();return[4,c.getElementRects({reference:t,floating:e,strategy:a})];case 2:u=L.sent();p=computeCoordsFromPlacement(u,i,f),g=p.x,m=p.y;h=i;v={};w=0;b=0;L.label=3;case 3:if(!(b<d.length))return[3,11];y=d[b],x=y.name,k=y.fn;return[4,k({x:g,y:m,initialPlacement:i,placement:h,strategy:a,middlewareData:v,rects:u,platform:c,elements:{reference:t,floating:e}})];case 4:E=L.sent(),_=E.x,A=E.y,C=E.data,P=E.reset;g=_!=null?_:g;m=A!=null?A:m;v=__assign(__assign({},v),(S={},S[x]=__assign(__assign({},v[x]),C),S));if(!(P&&w<=50))return[3,10];w++;if(!(typeof P==="object"))return[3,9];if(P.placement){h=P.placement}if(!P.rects)return[3,8];if(!(P.rects===true))return[3,6];return[4,c.getElementRects({reference:t,floating:e,strategy:a})];case 5:O=L.sent();return[3,7];case 6:O=P.rects;L.label=7;case 7:u=O;L.label=8;case 8:R=computeCoordsFromPlacement(u,h,f),g=R.x,m=R.y;L.label=9;case 9:b=-1;return[3,10];case 10:b++;return[3,3];case 11:return[2,{x:g,y:m,placement:h,strategy:a,middlewareData:v}]}}))}))};function expandPaddingObject(t){return __assign({top:0,right:0,bottom:0,left:0},t)}function getSideObjectFromPadding(t){return typeof t!=="number"?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){return __assign(__assign({},t),{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function detectOverflow(t,e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,w,b,y,x,k,E,_,A,C,P,O,S,R,L,T,B,D;var N;return __generator(this,(function(M){switch(M.label){case 0:if(e===void 0){e={}}n=t.x,i=t.y,o=t.platform,a=t.rects,s=t.elements,l=t.strategy;c=e.boundary,d=c===void 0?"clippingAncestors":c,f=e.rootBoundary,u=f===void 0?"viewport":f,p=e.elementContext,g=p===void 0?"floating":p,m=e.altBoundary,h=m===void 0?false:m,v=e.padding,w=v===void 0?0:v;b=getSideObjectFromPadding(w);y=g==="floating"?"reference":"floating";x=s[h?y:g];E=rectToClientRect;A=(_=o).getClippingRect;N={};return[4,o.isElement==null?void 0:o.isElement(x)];case 1:if(!((r=M.sent())!=null?r:true))return[3,2];C=x;return[3,5];case 2:P=x.contextElement;if(P)return[3,4];return[4,o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)];case 3:P=M.sent();M.label=4;case 4:C=P;M.label=5;case 5:return[4,A.apply(_,[(N.element=C,N.boundary=d,N.rootBoundary=u,N.strategy=l,N)])];case 6:k=E.apply(void 0,[M.sent()]);O=g==="floating"?__assign(__assign({},a.floating),{x:n,y:i}):a.reference;return[4,o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)];case 7:S=M.sent();return[4,o.isElement==null?void 0:o.isElement(S)];case 8:if(!M.sent())return[3,10];return[4,o.getScale==null?void 0:o.getScale(S)];case 9:L=M.sent()||{x:1,y:1};return[3,11];case 10:L={x:1,y:1};M.label=11;case 11:R=L;B=rectToClientRect;if(!o.convertOffsetParentRelativeRectToViewportRelativeRect)return[3,13];return[4,o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:O,offsetParent:S,strategy:l})];case 12:D=M.sent();return[3,14];case 13:D=O;M.label=14;case 14:T=B.apply(void 0,[D]);return[2,{top:(k.top-T.top+b.top)/R.y,bottom:(T.bottom-k.bottom+b.bottom)/R.y,left:(k.left-T.left+b.left)/R.x,right:(T.right-k.right+b.right)/R.x}]}}))}))}var min$1=Math.min;var max$1=Math.max;function within(t,e,r){return max$1(t,min$1(e,r))}var arrow=function(t){return{name:"arrow",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,w,b,y,x,k,E,_,A,C,P,O,S,R,L,T;var B,D;return __generator(this,(function(N){switch(N.label){case 0:r=t||{},n=r.element,i=r.padding,o=i===void 0?0:i;a=e.x,s=e.y,l=e.placement,c=e.rects,d=e.platform,f=e.elements;if(n==null){return[2,{}]}u=getSideObjectFromPadding(o);p={x:a,y:s};g=getMainAxisFromPlacement(l);m=getLengthFromAxis(g);return[4,d.getDimensions(n)];case 1:h=N.sent();v=g==="y";w=v?"top":"left";b=v?"bottom":"right";y=v?"clientHeight":"clientWidth";x=c.reference[m]+c.reference[g]-p[g]-c.floating[m];k=p[g]-c.reference[g];return[4,d.getOffsetParent==null?void 0:d.getOffsetParent(n)];case 2:E=N.sent();_=E?E[y]:0;A=!_;if(A)return[3,4];return[4,d.isElement==null?void 0:d.isElement(E)];case 3:A=!N.sent();N.label=4;case 4:if(A){_=f.floating[y]||c.floating[m]}C=x/2-k/2;P=u[w];O=_-h[m]-u[b];S=_/2-h[m]/2+C;R=within(P,S,O);L=getAlignment(l)!=null&&S!=R&&c.reference[m]/2-(S<P?u[w]:u[b])-h[m]/2<0;T=L?S<P?P-S:O-S:0;return[2,(B={},B[g]=p[g]-T,B.data=(D={},D[g]=R,D.centerOffset=S-R,D),B)]}}))}))}}};var sides=["top","right","bottom","left"];var allPlacements=sides.reduce((function(t,e){return t.concat(e,e+"-start",e+"-end")}),[]);var oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,(function(t){return oppositeSideMap[t]}))}function getAlignmentSides(t,e,r){if(r===void 0){r=false}var n=getAlignment(t);var i=getMainAxisFromPlacement(t);var o=getLengthFromAxis(i);var a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";if(e.reference[o]>e.floating[o]){a=getOppositePlacement(a)}return{main:a,cross:getOppositePlacement(a)}}var oppositeAlignmentMap={start:"end",end:"start"};function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,(function(t){return oppositeAlignmentMap[t]}))}function getPlacementList(t,e,r){var n=t?__spreadArray(__spreadArray([],r.filter((function(e){return getAlignment(e)===t})),true),r.filter((function(e){return getAlignment(e)!==t})),true):r.filter((function(t){return getSide(t)===t}));return n.filter((function(r){if(t){return getAlignment(r)===t||(e?getOppositeAlignmentPlacement(r)!==r:false)}return true}))}var autoPlacement=function(t){if(t===void 0){t={}}return{name:"autoPlacement",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,w,b,y,x,k,E,_,A,C,P,O,S,R,L,T;return __generator(this,(function(B){switch(B.label){case 0:o=e.rects,a=e.middlewareData,s=e.placement,l=e.platform,c=e.elements;d=t.crossAxis,f=d===void 0?false:d,u=t.alignment,p=t.allowedPlacements,g=p===void 0?allPlacements:p,m=t.autoAlignment,h=m===void 0?true:m,v=__rest(t,["crossAxis","alignment","allowedPlacements","autoAlignment"]);w=u!==undefined||g===allPlacements?getPlacementList(u||null,h,g):g;return[4,detectOverflow(e,v)];case 1:b=B.sent();y=((r=a.autoPlacement)==null?void 0:r.index)||0;x=w[y];if(x==null){return[2,{}]}A=getAlignmentSides;C=[x,o];return[4,l.isRTL==null?void 0:l.isRTL(c.floating)];case 2:k=A.apply(void 0,C.concat([B.sent()])),E=k.main,_=k.cross;if(s!==x){return[2,{reset:{placement:w[0]}}]}P=[b[getSide(x)],b[E],b[_]];O=__spreadArray(__spreadArray([],((n=a.autoPlacement)==null?void 0:n.overflows)||[],true),[{placement:x,overflows:P}],false);S=w[y+1];if(S){return[2,{data:{index:y+1,overflows:O},reset:{placement:S}}]}R=O.map((function(t){var e=getAlignment(t.placement);return[t.placement,e&&f?t.overflows.slice(0,2).reduce((function(t,e){return t+e}),0):t.overflows[0],t.overflows]})).sort((function(t,e){return t[1]-e[1]}));L=R.filter((function(t){return t[2].slice(0,getAlignment(t[0])?2:3).every((function(t){return t<=0}))}));T=((i=L[0])==null?void 0:i[0])||R[0][0];if(T!==s){return[2,{data:{index:y+1,overflows:O},reset:{placement:T}}]}return[2,{}]}}))}))}}};function getExpandedPlacements(t){var e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}function getSideList(t,e,r){var n=["left","right"];var i=["right","left"];var o=["top","bottom"];var a=["bottom","top"];switch(t){case"top":case"bottom":if(r)return e?i:n;return e?n:i;case"left":case"right":return e?o:a;default:return[]}}function getOppositeAxisPlacements(t,e,r,n){var i=getAlignment(t);var o=getSideList(getSide(t),r==="start",n);if(i){o=o.map((function(t){return t+"-"+i}));if(e){o=o.concat(o.map(getOppositeAlignmentPlacement))}}return o}var flip=function(t){if(t===void 0){t={}}return{name:"flip",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,w,b,y,x,k,E,_,A,C,P,O,S,R,L,T,B,D,N,M,F,V;return __generator(this,(function(z){switch(z.label){case 0:n=e.placement,i=e.middlewareData,o=e.rects,a=e.initialPlacement,s=e.platform,l=e.elements;c=t.mainAxis,d=c===void 0?true:c,f=t.crossAxis,u=f===void 0?true:f,p=t.fallbackPlacements,g=t.fallbackStrategy,m=g===void 0?"bestFit":g,h=t.fallbackAxisSideDirection,v=h===void 0?"none":h,w=t.flipAlignment,b=w===void 0?true:w,y=__rest(t,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);x=getSide(n);k=getSide(a)===a;return[4,s.isRTL==null?void 0:s.isRTL(l.floating)];case 1:E=z.sent();_=p||(k||!b?[getOppositePlacement(a)]:getExpandedPlacements(a));if(!p&&v!=="none"){_.push.apply(_,getOppositeAxisPlacements(a,b,v,E))}A=__spreadArray([a],_,true);return[4,detectOverflow(e,y)];case 2:C=z.sent();P=[];O=((r=i.flip)==null?void 0:r.overflows)||[];if(d){P.push(C[x])}if(u){S=getAlignmentSides(n,o,E),R=S.main,L=S.cross;P.push(C[R],C[L])}O=__spreadArray(__spreadArray([],O,true),[{placement:n,overflows:P}],false);if(!P.every((function(t){return t<=0}))){D=(((T=i.flip)==null?void 0:T.index)||0)+1;N=A[D];if(N){return[2,{data:{index:D,overflows:O},reset:{placement:N}}]}M=(B=O.filter((function(t){return t.overflows[0]<=0})).sort((function(t,e){return t.overflows[1]-e.overflows[1]}))[0])==null?void 0:B.placement;if(!M){switch(m){case"bestFit":{V=(F=O.map((function(t){return[t.placement,t.overflows.filter((function(t){return t>0})).reduce((function(t,e){return t+e}),0)]})).sort((function(t,e){return t[1]-e[1]}))[0])==null?void 0:F[0];if(V){M=V}break}case"initialPlacement":M=a;break}}if(n!==M){return[2,{reset:{placement:M}}]}}return[2,{}]}}))}))}}};function convertValueToCoords(t,e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m;return __generator(this,(function(h){switch(h.label){case 0:r=t.placement,n=t.platform,i=t.elements;return[4,n.isRTL==null?void 0:n.isRTL(i.floating)];case 1:o=h.sent();a=getSide(r);s=getAlignment(r);l=getMainAxisFromPlacement(r)==="x";c=["left","top"].includes(a)?-1:1;d=o&&l?-1:1;f=typeof e==="function"?e(t):e;u=typeof f==="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:__assign({mainAxis:0,crossAxis:0,alignmentAxis:null},f),p=u.mainAxis,g=u.crossAxis,m=u.alignmentAxis;if(s&&typeof m==="number"){g=s==="end"?m*-1:m}return[2,l?{x:g*d,y:p*c}:{x:p*c,y:g*d}]}}))}))}var offset=function(t){if(t===void 0){t=0}return{name:"offset",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i;return __generator(this,(function(o){switch(o.label){case 0:r=e.x,n=e.y;return[4,convertValueToCoords(e,t)];case 1:i=o.sent();return[2,{x:r+i.x,y:n+i.y,data:i}]}}))}))}}};function getCrossAxis(t){return t==="x"?"y":"x"}var shift=function(t){if(t===void 0){t={}}return{name:"shift",options:t,fn:function(e){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,l,c,d,f,u,p,g,m,h,v,w,b,y,x,w,b,k,E,_;var A;return __generator(this,(function(C){switch(C.label){case 0:r=e.x,n=e.y,i=e.placement;o=t.mainAxis,a=o===void 0?true:o,s=t.crossAxis,l=s===void 0?false:s,c=t.limiter,d=c===void 0?{fn:function(t){var e=t.x,r=t.y;return{x:e,y:r}}}:c,f=__rest(t,["mainAxis","crossAxis","limiter"]);u={x:r,y:n};return[4,detectOverflow(e,f)];case 1:p=C.sent();g=getMainAxisFromPlacement(getSide(i));m=getCrossAxis(g);h=u[g];v=u[m];if(a){w=g==="y"?"top":"left";b=g==="y"?"bottom":"right";y=h+p[w];x=h-p[b];h=within(y,h,x)}if(l){w=m==="y"?"top":"left";b=m==="y"?"bottom":"right";k=v+p[w];E=v-p[b];v=within(k,v,E)}_=d.fn(__assign(__assign({},e),(A={},A[g]=h,A[m]=v,A)));return[2,__assign(__assign({},_),{data:{x:_.x-r,y:_.y-n}})]}}))}))}}};function getWindow(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function getComputedStyle$1(t){return getWindow(t).getComputedStyle(t)}function isNode(t){return t instanceof getWindow(t).Node}function getNodeName(t){return isNode(t)?(t.nodeName||"").toLowerCase():""}var uaString;function getUAString(){if(uaString){return uaString}var t=navigator.userAgentData;if(t&&Array.isArray(t.brands)){uaString=t.brands.map((function(t){return t.brand+"/"+t.version})).join(" ");return uaString}return navigator.userAgent}function isHTMLElement(t){return t instanceof getWindow(t).HTMLElement}function isElement(t){return t instanceof getWindow(t).Element}function isShadowRoot(t){if(typeof ShadowRoot==="undefined"){return false}var e=getWindow(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function isOverflowElement(t){var e=getComputedStyle$1(t),r=e.overflow,n=e.overflowX,i=e.overflowY,o=e.display;return/auto|scroll|overlay|hidden|clip/.test(r+i+n)&&!["inline","contents"].includes(o)}function isTableElement(t){return["table","td","th"].includes(getNodeName(t))}function isContainingBlock(t){var e=/firefox/i.test(getUAString());var r=getComputedStyle$1(t);var n=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||(n?n!=="none":false)||e&&r.willChange==="filter"||e&&(r.filter?r.filter!=="none":false)||["transform","perspective"].some((function(t){return r.willChange.includes(t)}))||["paint","layout","strict","content"].some((function(t){var e=r.contain;return e!=null?e.includes(t):false}))}function isClientRectVisualViewportBased(){return/^((?!chrome|android).)*safari/i.test(getUAString())}function isLastTraversableNode(t){return["html","body","#document"].includes(getNodeName(t))}var min=Math.min;var max=Math.max;var round=Math.round;function getCssDimensions(t){var e=getComputedStyle$1(t);var r=parseFloat(e.width);var n=parseFloat(e.height);var i=isHTMLElement(t);var o=i?t.offsetWidth:r;var a=i?t.offsetHeight:n;var s=round(r)!==o||round(n)!==a;if(s){r=o;n=a}return{width:r,height:n,fallback:s}}function unwrapElement(t){return!isElement(t)?t.contextElement:t}var FALLBACK_SCALE={x:1,y:1};function getScale(t){var e=unwrapElement(t);if(!isHTMLElement(e)){return FALLBACK_SCALE}var r=e.getBoundingClientRect();var n=getCssDimensions(e),i=n.width,o=n.height,a=n.fallback;var s=(a?round(r.width):r.width)/i;var l=(a?round(r.height):r.height)/o;if(!s||!Number.isFinite(s)){s=1}if(!l||!Number.isFinite(l)){l=1}return{x:s,y:l}}function getBoundingClientRect(t,e,r,n){var i,o;if(e===void 0){e=false}if(r===void 0){r=false}var a=t.getBoundingClientRect();var s=unwrapElement(t);var l=FALLBACK_SCALE;if(e){if(n){if(isElement(n)){l=getScale(n)}}else{l=getScale(t)}}var c=s?getWindow(s):window;var d=isClientRectVisualViewportBased()&&r;var f=(a.left+(d?((i=c.visualViewport)==null?void 0:i.offsetLeft)||0:0))/l.x;var u=(a.top+(d?((o=c.visualViewport)==null?void 0:o.offsetTop)||0:0))/l.y;var p=a.width/l.x;var g=a.height/l.y;if(s){var m=getWindow(s);var h=n&&isElement(n)?getWindow(n):n;var v=m.frameElement;while(v&&n&&h!==m){var w=getScale(v);var b=v.getBoundingClientRect();var y=getComputedStyle(v);b.x+=(v.clientLeft+parseFloat(y.paddingLeft))*w.x;b.y+=(v.clientTop+parseFloat(y.paddingTop))*w.y;f*=w.x;u*=w.y;p*=w.x;g*=w.y;f+=b.x;u+=b.y;v=getWindow(v).frameElement}}return rectToClientRect({width:p,height:g,x:f,y:u})}function getDocumentElement(t){return((isNode(t)?t.ownerDocument:t.document)||window.document).documentElement}function getNodeScroll(t){if(isElement(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function convertOffsetParentRelativeRectToViewportRelativeRect(t){var e=t.rect,r=t.offsetParent,n=t.strategy;var i=isHTMLElement(r);var o=getDocumentElement(r);if(r===o){return e}var a={scrollLeft:0,scrollTop:0};var s={x:1,y:1};var l={x:0,y:0};if(i||!i&&n!=="fixed"){if(getNodeName(r)!=="body"||isOverflowElement(o)){a=getNodeScroll(r)}if(isHTMLElement(r)){var c=getBoundingClientRect(r);s=getScale(r);l.x=c.x+r.clientLeft;l.y=c.y+r.clientTop}}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}}function getWindowScrollBarX(t){return getBoundingClientRect(getDocumentElement(t)).left+getNodeScroll(t).scrollLeft}function getDocumentRect(t){var e=getDocumentElement(t);var r=getNodeScroll(t);var n=t.ownerDocument.body;var i=max(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth);var o=max(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);var a=-r.scrollLeft+getWindowScrollBarX(t);var s=-r.scrollTop;if(getComputedStyle$1(n).direction==="rtl"){a+=max(e.clientWidth,n.clientWidth)-i}return{width:i,height:o,x:a,y:s}}function getParentNode(t){if(getNodeName(t)==="html"){return t}var e=t.assignedSlot||t.parentNode||isShadowRoot(t)&&t.host||getDocumentElement(t);return isShadowRoot(e)?e.host:e}function getNearestOverflowAncestor(t){var e=getParentNode(t);if(isLastTraversableNode(e)){return e.ownerDocument.body}if(isHTMLElement(e)&&isOverflowElement(e)){return e}return getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e){var r;if(e===void 0){e=[]}var n=getNearestOverflowAncestor(t);var i=n===((r=t.ownerDocument)==null?void 0:r.body);var o=getWindow(n);if(i){return e.concat(o,o.visualViewport||[],isOverflowElement(n)?n:[])}return e.concat(n,getOverflowAncestors(n))}function getViewportRect(t,e){var r=getWindow(t);var n=getDocumentElement(t);var i=r.visualViewport;var o=n.clientWidth;var a=n.clientHeight;var s=0;var l=0;if(i){o=i.width;a=i.height;var c=isClientRectVisualViewportBased();if(!c||c&&e==="fixed"){s=i.offsetLeft;l=i.offsetTop}}return{width:o,height:a,x:s,y:l}}function getInnerBoundingClientRect(t,e){var r=getBoundingClientRect(t,true,e==="fixed");var n=r.top+t.clientTop;var i=r.left+t.clientLeft;var o=isHTMLElement(t)?getScale(t):{x:1,y:1};var a=t.clientWidth*o.x;var s=t.clientHeight*o.y;var l=i*o.x;var c=n*o.y;return{width:a,height:s,x:l,y:c}}function getClientRectFromClippingAncestor(t,e,r){var n;if(e==="viewport"){n=getViewportRect(t,r)}else if(e==="document"){n=getDocumentRect(getDocumentElement(t))}else if(isElement(e)){n=getInnerBoundingClientRect(e,r)}else{var i=__assign({},e);if(isClientRectVisualViewportBased()){var o,a;var s=getWindow(t);i.x-=((o=s.visualViewport)==null?void 0:o.offsetLeft)||0;i.y-=((a=s.visualViewport)==null?void 0:a.offsetTop)||0}n=i}return rectToClientRect(n)}function getClippingElementAncestors(t,e){var r=e.get(t);if(r){return r}var n=getOverflowAncestors(t).filter((function(t){return isElement(t)&&getNodeName(t)!=="body"}));var i=null;var o=getComputedStyle$1(t).position==="fixed";var a=o?getParentNode(t):t;while(isElement(a)&&!isLastTraversableNode(a)){var s=getComputedStyle$1(a);var l=isContainingBlock(a);if(s.position==="fixed"){i=null}var c=o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position);if(c){n=n.filter((function(t){return t!==a}))}else{i=s}a=getParentNode(a)}e.set(t,n);return n}function getClippingRect(t){var e=t.element,r=t.boundary,n=t.rootBoundary,i=t.strategy;var o=r==="clippingAncestors"?getClippingElementAncestors(e,this._c):[].concat(r);var a=__spreadArray(__spreadArray([],o,true),[n],false);var s=a[0];var l=a.reduce((function(t,r){var n=getClientRectFromClippingAncestor(e,r,i);t.top=max(n.top,t.top);t.right=min(n.right,t.right);t.bottom=min(n.bottom,t.bottom);t.left=max(n.left,t.left);return t}),getClientRectFromClippingAncestor(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function getDimensions(t){return getCssDimensions(t)}function getTrueOffsetParent(t,e){if(!isHTMLElement(t)||getComputedStyle$1(t).position==="fixed"){return null}if(e){return e(t)}return t.offsetParent}function getContainingBlock(t){var e=getParentNode(t);while(isHTMLElement(e)&&!isLastTraversableNode(e)){if(isContainingBlock(e)){return e}else{e=getParentNode(e)}}return null}function getOffsetParent(t,e){var r=getWindow(t);if(!isHTMLElement(t)){return r}var n=getTrueOffsetParent(t,e);while(n&&isTableElement(n)&&getComputedStyle$1(n).position==="static"){n=getTrueOffsetParent(n,e)}if(n&&(getNodeName(n)==="html"||getNodeName(n)==="body"&&getComputedStyle$1(n).position==="static"&&!isContainingBlock(n))){return r}return n||getContainingBlock(t)||r}function getRectRelativeToOffsetParent(t,e,r){var n=isHTMLElement(e);var i=getDocumentElement(e);var o=getBoundingClientRect(t,true,r==="fixed",e);var a={scrollLeft:0,scrollTop:0};var s={x:0,y:0};if(n||!n&&r!=="fixed"){if(getNodeName(e)!=="body"||isOverflowElement(i)){a=getNodeScroll(e)}if(isHTMLElement(e)){var l=getBoundingClientRect(e,true);s.x=l.x+e.clientLeft;s.y=l.y+e.clientTop}else if(i){s.x=getWindowScrollBarX(i)}}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}var platform={getClippingRect:getClippingRect,convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,isElement:isElement,getDimensions:getDimensions,getOffsetParent:getOffsetParent,getDocumentElement:getDocumentElement,getScale:getScale,getElementRects:function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,n,i,o,a,s,l;var c;return __generator(this,(function(d){switch(d.label){case 0:e=t.reference,r=t.floating,n=t.strategy;i=this.getOffsetParent||getOffsetParent;o=this.getDimensions;c={};a=getRectRelativeToOffsetParent;s=[e];return[4,i(r)];case 1:c.reference=a.apply(void 0,s.concat([d.sent(),n]));l=[{x:0,y:0}];return[4,o(r)];case 2:return[2,(c.floating=__assign.apply(void 0,l.concat([d.sent()])),c)]}}))}))},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return getComputedStyle$1(t).direction==="rtl"}};function autoUpdate(t,e,r,n){if(n===void 0){n={}}var i=n.ancestorScroll,o=i===void 0?true:i,a=n.ancestorResize,s=a===void 0?true:a,l=n.elementResize,c=l===void 0?true:l,d=n.animationFrame,f=d===void 0?false:d;var u=o&&!f;var p=u||s?__spreadArray(__spreadArray([],isElement(t)?getOverflowAncestors(t):t.contextElement?getOverflowAncestors(t.contextElement):[],true),getOverflowAncestors(e),true):[];p.forEach((function(t){u&&t.addEventListener("scroll",r,{passive:true});s&&t.addEventListener("resize",r)}));var g=null;if(c){g=new ResizeObserver((function(){r()}));isElement(t)&&!f&&g.observe(t);if(!isElement(t)&&t.contextElement&&!f){g.observe(t.contextElement)}g.observe(e)}var m;var h=f?getBoundingClientRect(t):null;if(f){v()}function v(){var e=getBoundingClientRect(t);if(h&&(e.x!==h.x||e.y!==h.y||e.width!==h.width||e.height!==h.height)){r()}h=e;m=requestAnimationFrame(v)}r();return function(){var t;p.forEach((function(t){u&&t.removeEventListener("scroll",r);s&&t.removeEventListener("resize",r)}));(t=g)==null?void 0:t.disconnect();g=null;if(f){cancelAnimationFrame(m)}}}var computePosition=function(t,e,r){var n=new Map;var i=__assign({platform:platform},r);var o=__assign(__assign({},i.platform),{_c:n});return computePosition$1(t,e,__assign(__assign({},i),{platform:o}))};var hash=function(t){var e,r;for(e=0,r=0;e<t.length;e++){r=Math.imul(31,r)+t.charCodeAt(e)|0}return r.toString()};var setAttributeIfEmpty=function(t,e,r){var n;if(t.hasAttribute(e)){return(n=t.getAttribute(e))!==null&&n!==void 0?n:""}t.setAttribute(e,r);return r};var hashValue=function(t){return"".concat(t,"-").concat(hash(t))};var mdsDropdownCss='.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.mt-\\[25vh\\]{margin-top:25vh}.flex{display:-ms-flexbox;display:flex}.hidden{display:none}.h-\\[100vh\\]{height:100vh}.h-\\[150vh\\]{height:150vh}.h-\\[2px\\]{height:2px}.w-20{width:5rem}.w-full{width:100%}.max-w-\\[350px\\]{max-width:350px}.transform{-webkit-transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{-ms-flex-align:center;align-items:center}.justify-start{-ms-flex-pack:start;justify-content:flex-start}.justify-end{-ms-flex-pack:end;justify-content:flex-end}.justify-center{-ms-flex-pack:center;justify-content:center}.border{border-width:1px}.bg-brand-maggioli-06{--tw-bg-opacity:1;background-color:rgba(var(--brand-maggioli-06), var(--tw-bg-opacity))}.bg-tone-neutral-08{--tw-bg-opacity:1;background-color:rgba(var(--tone-neutral-08), var(--tw-bg-opacity))}.px-0{padding-left:0px;padding-right:0px}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.transition{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;-webkit-transition-property:color, background-color, border-color, fill, stroke, opacity, -webkit-text-decoration-color, -webkit-box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, fill, stroke, opacity, -webkit-text-decoration-color, -webkit-box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}.ease-out{-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}:host{--mds-dropdown-arrow-background:var(--mds-dropdown-background);--mds-dropdown-background:rgb(var(--tone-neutral));--mds-dropdown-drop-shadow:drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1)) drop-shadow(0 0 1px rgb(0 0 0 / 0.1));--mds-dropdown-duration:0.5s;--mds-dropdown-ease:cubic-bezier(0.19, 1, 0.22, 1);--mds-dropdown-transform-from:scale(0.9) translateY(-3%);--mds-dropdown-transform-to:scale(1) translate(0, 0);--mds-dropdown-z-index:var(--magma-dropdown-z-index, 3000);pointer-events:none;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;gap:1rem;border-radius:0.5rem;padding:1.5rem;opacity:0;background-color:var(--mds-dropdown-background);-webkit-filter:var(--mds-dropdown-drop-shadow);filter:var(--mds-dropdown-drop-shadow);-webkit-transform:var(--mds-dropdown-transform-from);transform:var(--mds-dropdown-transform-from);-webkit-transition-duration:var(--mds-dropdown-duration);transition-duration:var(--mds-dropdown-duration);-webkit-transition-property:opacity, -webkit-transform, -webkit-transform-origin;transition-property:opacity, -webkit-transform, -webkit-transform-origin;transition-property:opacity, transform, transform-origin;transition-property:opacity, transform, transform-origin, -webkit-transform, -webkit-transform-origin;-webkit-transition-timing-function:var(--mds-dropdown-ease);transition-timing-function:var(--mds-dropdown-ease);z-index:var(--mds-dropdown-z-index)}:host([visible]:not([visible="false"])){pointer-events:auto;opacity:1;-webkit-transform:var(--mds-dropdown-transform-to);transform:var(--mds-dropdown-transform-to)}:host([smooth]:not([smooth="false"])){-webkit-transition-property:bottom, left, opacity, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, opacity, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, opacity, right, top, transform, transform-origin;transition-property:bottom, left, opacity, right, top, transform, transform-origin, -webkit-transform, -webkit-transform-origin}.arrow{pointer-events:none;position:fixed;top:-1rem;display:-ms-flexbox;display:flex;fill:var(--mds-dropdown-arrow-background);-webkit-transition-duration:var(--mds-dropdown-duration);transition-duration:var(--mds-dropdown-duration);-webkit-transition-property:bottom, left, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, right, top, -webkit-transform, -webkit-transform-origin;transition-property:bottom, left, right, top, transform, transform-origin;transition-property:bottom, left, right, top, transform, transform-origin, -webkit-transform, -webkit-transform-origin}:host([arrow]:not([arrow="false"])[visible]:not([visible="false"])) .arrow{-webkit-transition-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1);transition-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}:host([arrow]:not([arrow="false"],[visible],[visible="true"])) .arrow{-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1)}::slotted(*){position:relative;z-index:10}';var MdsDropdown=function(){function t(t){var e=this;registerInstance(this,t);this.visibleEvent=createEvent(this,"mdsDropdownVisible",7);this.hiddenEvent=createEvent(this,"mdsDropdownHide",7);this.changedEvent=createEvent(this,"mdsDropdownChange",7);this.backdropBackgroundVisible="rgba(var(--magma-backdrop-color, 0 0 0) / var(--magma-backdrop-opacity, 0.1))";this.backdropBackgroundHidden="rgba(var(--magma-backdrop-color, 0 0 0) / 0)";this.backdropDuration=2e3;this.backdropId="mds-dropdown-backdrop";this.km=new KeyboardManager;this.handleCloseDropdown=function(t){if(!e.visible){return}if(!e.host.contains(t.target)&&t.target!==e.caller){e.handleVisibility(false)}};this.handleVisibility=function(t){e.visible=t;e.changedEvent.emit({caller:e.caller,visible:e.visible});if(e.visible){e.visibleEvent.emit({caller:e.caller,visible:true});return}e.hiddenEvent.emit({caller:e.caller,visible:false});e.updatePosition()};this.callerOnClick=function(){e.handleVisibility(!e.visible)};this.arrowInset=function(t,e){var r=t.arrow;var n={bottom:"",left:"",right:"",top:""};if(r===undefined){return{}}switch(e){case"bottom":n.left=r.x!==null?"".concat(r.x,"px"):"";n.top="100%";break;case"left":n.right="100%";n.top=r.y!==null?"".concat(r.y,"px"):"";break;case"right":n.left="100%";n.top=r.y!==null?"".concat(r.y,"px"):"";break;case"top":n.left=r.x!==null?"".concat(r.x,"px"):"";n.top="";break}return n};this.arrowTransform=function(t){var r=e.arrow&&e.visible?"scale(1)":"scale(0)";switch(t){case"bottom":r="rotate(180deg) ".concat(r," translate(0, -100%)");break;case"left":r="rotate(-90deg) ".concat(r," translate(50%, -50%)");break;case"right":r="rotate(90deg) ".concat(r," translate(-50%, -50%)");break;case"top":r="rotate(0deg) ".concat(r," translate(0, 0)");break}return{transform:r}};this.arrowTransformOrigin=function(t){switch(t){case"bottom":return{transformOrigin:"center top"};case"left":return{transformOrigin:"right center"};case"right":return{transformOrigin:"left center"};case"top":return{transformOrigin:"center bottom"};default:return{transformOrigin:"center top"}}};this.updatePosition=function(){if(!e.caller)return;var t=new Array;var r={};if(e.shiftPadding){r.padding=e.shiftPadding}if(e.autoPlacement){t.push(autoPlacement())}if(e.offset){t.push(offset(e.offset))}if(!e.autoPlacement&&e.flip){t.push(flip(r))}if(e.shift){t.push(shift(r))}if(e.arrow){t.push(arrow({element:e.arrowEl,padding:e.arrowPadding}))}computePosition(e.caller,e.host,{middleware:t,placement:e.placement,strategy:e.strategy}).then((function(t){var r=t.x,n=t.y,i=t.placement,o=t.middlewareData;Object.assign(e.host.style,{left:"".concat(r,"px"),top:"".concat(n,"px")});var a={};var s={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(s){Object.assign(a,e.arrowTransform(s));Object.assign(a,e.arrowInset(o,s));Object.assign(a,e.arrowTransformOrigin(s));Object.assign(e.arrowEl.style,a)}}))};this.arrow=true;this.arrowPadding=24;this.autoPlacement=false;this.backdrop=false;this.flip=false;this.target=undefined;this.offset=24;this.placement="bottom";this.shift=true;this.shiftPadding=24;this.smooth=true;this.strategy="fixed";this.visible=false;this.zIndex=1e3}t.prototype.attachBackdrop=function(){var t=this;if(!this.backdropEl){this.backdropEl=document.createElement("div");this.backdropEl.style.backgroundColor=this.backdropBackgroundHidden;this.backdropEl.className=this.backdropId;this.backdropEl.style.inset="0";this.backdropEl.style.pointerEvents="none";this.backdropEl.style.position="fixed";this.backdropEl.style.transition="background-color ".concat(this.backdropDuration/1e4,"s ease-out");this.backdropEl.style.zIndex=(this.zIndex-1).toString()}document.body.appendChild(this.backdropEl);clearTimeout(this.backdropTimer);this.backdropTimer=setTimeout((function(){t.backdropEl.style.backgroundColor=t.backdropBackgroundVisible}),1)};t.prototype.detachBackdrop=function(){var t=this;if(!this.backdropEl){return}this.backdropEl.style.backgroundColor="transparent";clearTimeout(this.backdropTimer);this.backdropTimer=setTimeout((function(){t.backdropEl.remove()}),this.backdropDuration)};t.prototype.arrowChanged=function(){this.updatePosition()};t.prototype.arrowPaddingChanged=function(){this.updatePosition()};t.prototype.autoPlacementChanged=function(){this.updatePosition()};t.prototype.backdropChanged=function(t){if(!this.visible){return}if(t){this.attachBackdrop();return}this.detachBackdrop()};t.prototype.flipChanged=function(){this.updatePosition()};t.prototype.offsetChanged=function(){this.updatePosition()};t.prototype.placementChanged=function(){this.updatePosition()};t.prototype.shiftChanged=function(){this.updatePosition()};t.prototype.shiftPaddingChanged=function(){this.updatePosition()};t.prototype.strategyChanged=function(){this.updatePosition()};t.prototype.visibleChanged=function(t){this.updatePosition();if(!this.backdrop){return}if(t){this.attachBackdrop();return}this.detachBackdrop()};t.prototype.zIndexChanged=function(t){this.host.style.setProperty("z-index",t.toString())};t.prototype.componentWillLoad=function(){Array.from(document.getElementsByClassName(this.backdropId)).forEach((function(t){t.remove()}));this.zIndexChanged(this.zIndex)};t.prototype.setAriaAttributes=function(){var t=setAttributeIfEmpty(this.host,"id",hashValue(this.target));setAttributeIfEmpty(this.caller,"aria-haspopup","true");setAttributeIfEmpty(this.caller,"aria-controls",t);setAttributeIfEmpty(this.host,"role","menu");setAttributeIfEmpty(this.host,"aria-labelledby",this.target)};t.prototype.componentDidLoad=function(){var t=this;var e;document.addEventListener("click",this.handleCloseDropdown);this.arrowEl=(e=this.host.shadowRoot)===null||e===void 0?void 0:e.querySelector(".arrow");var r=document.getElementById(this.target);if(!r){return}this.caller=r;this.setAriaAttributes();this.caller.addEventListener("click",this.callerOnClick.bind(this));this.km.addElement(this.host);this.km.attachEscapeBehavior((function(){return t.handleVisibility(false)}));this.backdropChanged(this.backdrop);this.updatePosition();if(!this.cleanupAutoUpdate){this.cleanupAutoUpdate=autoUpdate(this.caller,this.host,this.updatePosition)}};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.cleanupAutoUpdate=function(){return}};t.prototype.render=function(){return h(Host,null,h("div",{class:"arrow",innerHTML:arrowSvg}),h("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{arrow:["arrowChanged"],arrowPadding:["arrowPaddingChanged"],autoPlacement:["autoPlacementChanged"],backdrop:["backdropChanged"],flip:["flipChanged"],offset:["offsetChanged"],placement:["placementChanged"],shift:["shiftChanged"],shiftPadding:["shiftPaddingChanged"],strategy:["strategyChanged"],visible:["visibleChanged"],zIndex:["zIndexChanged"]}},enumerable:false,configurable:true});return t}();MdsDropdown.style=mdsDropdownCss;export{MdsDropdown as mds_dropdown}; |
@@ -5,3 +5,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-56f3ad03.js'; | ||
/* | ||
Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com | ||
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com | ||
*/ | ||
@@ -8,0 +8,0 @@ const patchEsm = () => { |
@@ -5,3 +5,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-56f3ad03.js'; | ||
/* | ||
Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com | ||
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com | ||
*/ | ||
@@ -8,0 +8,0 @@ const patchBrowser = () => { |
@@ -1,1 +0,1 @@ | ||
import{p as t,b as e}from"./p-664e0918.js";export{s as setNonce}from"./p-664e0918.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),t(a)})().then((t=>e([["p-63461555",[[1,"mds-dropdown",{arrow:[4],arrowPadding:[2,"arrow-padding"],autoPlacement:[4,"auto-placement"],backdrop:[4],flip:[4],target:[1],offset:[2],placement:[1],shift:[4],shiftPadding:[2,"shift-padding"],smooth:[4],strategy:[1],visible:[1540],zIndex:[2,"z-index"]}]]]],t))); | ||
import{p as e,b as t}from"./p-664e0918.js";export{s as setNonce}from"./p-664e0918.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-dec3d1b6",[[1,"mds-dropdown",{arrow:[4],arrowPadding:[2,"arrow-padding"],autoPlacement:[4,"auto-placement"],backdrop:[4],flip:[4],target:[1],offset:[2],placement:[1],shift:[4],shiftPadding:[2,"shift-padding"],smooth:[4],strategy:[1],visible:[1540],zIndex:[2,"z-index"]}]]]],e))); |
{ | ||
"timestamp": "2023-03-14T14:55:59", | ||
"timestamp": "2023-04-14T10:15:54", | ||
"compiler": { | ||
@@ -79,17 +79,17 @@ "name": "node", | ||
"./dist/mds-dropdown/mds-dropdown.js", | ||
"./dist/mds-dropdown/p-149cc6c8.system.entry.js", | ||
"./dist/mds-dropdown/p-50ea2036.system.js", | ||
"./dist/mds-dropdown/p-63461555.entry.js", | ||
"./dist/mds-dropdown/p-664e0918.js", | ||
"./dist/mds-dropdown/p-798416f2.system.js", | ||
"./dist/mds-dropdown/p-9d3d2d66.system.js", | ||
"./dist/mds-dropdown/p-c7c2fb13.system.js", | ||
"./dist/mds-dropdown/p-d3156b5a.system.entry.js", | ||
"./dist/mds-dropdown/p-dec3d1b6.entry.js", | ||
"./www/build/index.esm.js", | ||
"./www/build/mds-dropdown.esm.js", | ||
"./www/build/mds-dropdown.js", | ||
"./www/build/p-149cc6c8.system.entry.js", | ||
"./www/build/p-50ea2036.system.js", | ||
"./www/build/p-63461555.entry.js", | ||
"./www/build/p-664e0918.js", | ||
"./www/build/p-798416f2.system.js", | ||
"./www/build/p-9d3d2d66.system.js", | ||
"./www/build/p-c7c2fb13.system.js", | ||
"./www/build/p-d3156b5a.system.entry.js" | ||
"./www/build/p-dec3d1b6.entry.js" | ||
] | ||
@@ -127,8 +127,8 @@ }, | ||
], | ||
"bundleId": "p-63461555", | ||
"fileName": "p-63461555.entry.js", | ||
"bundleId": "p-dec3d1b6", | ||
"fileName": "p-dec3d1b6.entry.js", | ||
"imports": [ | ||
"p-664e0918.js" | ||
], | ||
"originalByteSize": 59436 | ||
"originalByteSize": 64374 | ||
} | ||
@@ -147,3 +147,3 @@ ], | ||
], | ||
"originalByteSize": 59440 | ||
"originalByteSize": 64378 | ||
} | ||
@@ -162,3 +162,3 @@ ], | ||
], | ||
"originalByteSize": 59440 | ||
"originalByteSize": 64378 | ||
} | ||
@@ -172,8 +172,8 @@ ], | ||
], | ||
"bundleId": "p-d3156b5a.system", | ||
"fileName": "p-d3156b5a.system.entry.js", | ||
"bundleId": "p-149cc6c8.system", | ||
"fileName": "p-149cc6c8.system.entry.js", | ||
"imports": [ | ||
"p-c7c2fb13.system.js" | ||
], | ||
"originalByteSize": 68956 | ||
"originalByteSize": 74830 | ||
} | ||
@@ -192,3 +192,3 @@ ], | ||
], | ||
"originalByteSize": 59505 | ||
"originalByteSize": 64443 | ||
} | ||
@@ -297,3 +297,3 @@ ] | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "true", | ||
@@ -318,3 +318,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "24", | ||
@@ -339,3 +339,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -360,3 +360,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -381,3 +381,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -421,3 +421,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "24", | ||
@@ -442,3 +442,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "'bottom'", | ||
@@ -468,3 +468,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "true", | ||
@@ -489,3 +489,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "24", | ||
@@ -510,3 +510,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "true", | ||
@@ -531,3 +531,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "'fixed'", | ||
@@ -557,3 +557,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -578,3 +578,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "1000", | ||
@@ -616,3 +616,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "true", | ||
@@ -637,3 +637,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "24", | ||
@@ -658,3 +658,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -679,3 +679,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -700,3 +700,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -740,3 +740,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "24", | ||
@@ -761,3 +761,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "'bottom'", | ||
@@ -787,3 +787,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "true", | ||
@@ -808,3 +808,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "24", | ||
@@ -829,3 +829,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "true", | ||
@@ -850,3 +850,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "'fixed'", | ||
@@ -876,3 +876,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "false", | ||
@@ -897,3 +897,3 @@ "complexType": { | ||
"required": false, | ||
"optional": true, | ||
"optional": false, | ||
"defaultValue": "1000", | ||
@@ -900,0 +900,0 @@ "complexType": { |
@@ -15,43 +15,43 @@ /* eslint-disable */ | ||
*/ | ||
"arrow"?: boolean; | ||
"arrow": boolean; | ||
/** | ||
* Sets the distance between arrow and dropdown margins. | ||
*/ | ||
"arrowPadding"?: number; | ||
"arrowPadding": number; | ||
/** | ||
* If set, the component will be placed automatically near it's caller. | ||
*/ | ||
"autoPlacement"?: boolean; | ||
"autoPlacement": boolean; | ||
/** | ||
* Specifies if the component has a backdrop background | ||
*/ | ||
"backdrop"?: boolean; | ||
"backdrop": boolean; | ||
/** | ||
* Specifies the placement of the component if no space is available where it is placed. | ||
*/ | ||
"flip"?: boolean; | ||
"flip": boolean; | ||
/** | ||
* Sets distance between the dropdown and the caller. | ||
*/ | ||
"offset"?: number; | ||
"offset": number; | ||
/** | ||
* Specifies where the component should be placed relative to the caller. | ||
*/ | ||
"placement"?: FloatingUIPlacement; | ||
"placement": FloatingUIPlacement; | ||
/** | ||
* If set, the component will be kept inside the viewport. | ||
*/ | ||
"shift"?: boolean; | ||
"shift": boolean; | ||
/** | ||
* Sets a safe area distance between the dropdown and the viewport. | ||
*/ | ||
"shiftPadding"?: number; | ||
"shiftPadding": number; | ||
/** | ||
* If set, the component will follow the caller smoothly, visible when the page scrolls. | ||
*/ | ||
"smooth"?: boolean; | ||
"smooth": boolean; | ||
/** | ||
* Sets the CSS position strategy of the component. | ||
*/ | ||
"strategy"?: FloatingUIStrategy; | ||
"strategy": FloatingUIStrategy; | ||
/** | ||
@@ -64,7 +64,7 @@ * Specifies the id of the caller element. | ||
*/ | ||
"visible"?: boolean; | ||
"visible": boolean; | ||
/** | ||
* Specifies the visibility of the component. | ||
*/ | ||
"zIndex"?: number; | ||
"zIndex": number; | ||
} | ||
@@ -71,0 +71,0 @@ } |
@@ -19,19 +19,19 @@ import { EventEmitter } from '../../stencil-public-runtime'; | ||
*/ | ||
readonly arrow?: boolean; | ||
readonly arrow: boolean; | ||
/** | ||
* Sets the distance between arrow and dropdown margins. | ||
*/ | ||
readonly arrowPadding?: number; | ||
readonly arrowPadding: number; | ||
/** | ||
* If set, the component will be placed automatically near it's caller. | ||
*/ | ||
readonly autoPlacement?: boolean; | ||
readonly autoPlacement: boolean; | ||
/** | ||
* Specifies if the component has a backdrop background | ||
*/ | ||
readonly backdrop?: boolean; | ||
readonly backdrop: boolean; | ||
/** | ||
* Specifies the placement of the component if no space is available where it is placed. | ||
*/ | ||
readonly flip?: boolean; | ||
readonly flip: boolean; | ||
/** | ||
@@ -44,31 +44,31 @@ * Specifies the id of the caller element. | ||
*/ | ||
readonly offset?: number; | ||
readonly offset: number; | ||
/** | ||
* Specifies where the component should be placed relative to the caller. | ||
*/ | ||
readonly placement?: FloatingUIPlacement; | ||
readonly placement: FloatingUIPlacement; | ||
/** | ||
* If set, the component will be kept inside the viewport. | ||
*/ | ||
readonly shift?: boolean; | ||
readonly shift: boolean; | ||
/** | ||
* Sets a safe area distance between the dropdown and the viewport. | ||
*/ | ||
readonly shiftPadding?: number; | ||
readonly shiftPadding: number; | ||
/** | ||
* If set, the component will follow the caller smoothly, visible when the page scrolls. | ||
*/ | ||
readonly smooth?: boolean; | ||
readonly smooth: boolean; | ||
/** | ||
* Sets the CSS position strategy of the component. | ||
*/ | ||
readonly strategy?: FloatingUIStrategy; | ||
readonly strategy: FloatingUIStrategy; | ||
/** | ||
* Specifies the visibility of the component. | ||
*/ | ||
visible?: boolean; | ||
visible: boolean; | ||
/** | ||
* Specifies the visibility of the component. | ||
*/ | ||
readonly zIndex?: number; | ||
readonly zIndex: number; | ||
/** | ||
@@ -75,0 +75,0 @@ * Emits when a modal is visible |
@@ -1,4 +0,4 @@ | ||
import { InputValueType } from '../types/input-value-type'; | ||
import { InputValueType } from '@type/input-value-type'; | ||
export interface InputValue { | ||
value: InputValueType; | ||
} |
{ | ||
"name": "@maggioli-design-system/mds-dropdown", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "mds-dropdown is a web-component from Maggioli Design System Magma, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.", | ||
@@ -15,2 +15,3 @@ "main": "dist/index.cjs.js", | ||
"dist/", | ||
"documentation.json", | ||
"loader/", | ||
@@ -26,5 +27,5 @@ "readme.md", | ||
"dependencies": { | ||
"@floating-ui/dom": "^1.2.3", | ||
"@maggioli-design-system/styles": "^11.2.1", | ||
"@stencil/core": "^2.22.2" | ||
"@floating-ui/dom": "^1.2.6", | ||
"@maggioli-design-system/styles": "^11.4.0", | ||
"@stencil/core": "^2.22.3" | ||
}, | ||
@@ -44,7 +45,12 @@ "license": "MIT", | ||
{ | ||
"name": "Nicola Tamburini", | ||
"email": "nicola.tamburini@maggioli.it", | ||
"role": "Software Engineer" | ||
}, | ||
{ | ||
"name": "Vittorio Vittori", | ||
"email": "vittorio.vittori@maggioli.it", | ||
"role": "UX UI Designer" | ||
"role": "Product Designer" | ||
} | ||
] | ||
} |
@@ -10,3 +10,3 @@ const hash = (s: string): string => { | ||
const unslugName = (name: string): string => { | ||
return name.split('/').slice(-1).pop().replace(/-/g, ' ') | ||
return name.split('/')?.slice(-1).pop()?.replace(/-/g, ' ') ?? name | ||
} | ||
@@ -16,3 +16,3 @@ | ||
if (element.hasAttribute(attribute)) { | ||
return element.getAttribute(attribute) | ||
return element.getAttribute(attribute) ?? '' | ||
} | ||
@@ -19,0 +19,0 @@ element.setAttribute(attribute, value) |
@@ -41,3 +41,3 @@ export class KeyboardManager { | ||
detachEscapeBehavior = (): void => { | ||
this.escapeCallback = null | ||
this.escapeCallback = () => {return} | ||
if (typeof window !== undefined) { | ||
@@ -44,0 +44,0 @@ window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this)) |
@@ -15,43 +15,43 @@ /* eslint-disable */ | ||
*/ | ||
"arrow"?: boolean; | ||
"arrow": boolean; | ||
/** | ||
* Sets the distance between arrow and dropdown margins. | ||
*/ | ||
"arrowPadding"?: number; | ||
"arrowPadding": number; | ||
/** | ||
* If set, the component will be placed automatically near it's caller. | ||
*/ | ||
"autoPlacement"?: boolean; | ||
"autoPlacement": boolean; | ||
/** | ||
* Specifies if the component has a backdrop background | ||
*/ | ||
"backdrop"?: boolean; | ||
"backdrop": boolean; | ||
/** | ||
* Specifies the placement of the component if no space is available where it is placed. | ||
*/ | ||
"flip"?: boolean; | ||
"flip": boolean; | ||
/** | ||
* Sets distance between the dropdown and the caller. | ||
*/ | ||
"offset"?: number; | ||
"offset": number; | ||
/** | ||
* Specifies where the component should be placed relative to the caller. | ||
*/ | ||
"placement"?: FloatingUIPlacement; | ||
"placement": FloatingUIPlacement; | ||
/** | ||
* If set, the component will be kept inside the viewport. | ||
*/ | ||
"shift"?: boolean; | ||
"shift": boolean; | ||
/** | ||
* Sets a safe area distance between the dropdown and the viewport. | ||
*/ | ||
"shiftPadding"?: number; | ||
"shiftPadding": number; | ||
/** | ||
* If set, the component will follow the caller smoothly, visible when the page scrolls. | ||
*/ | ||
"smooth"?: boolean; | ||
"smooth": boolean; | ||
/** | ||
* Sets the CSS position strategy of the component. | ||
*/ | ||
"strategy"?: FloatingUIStrategy; | ||
"strategy": FloatingUIStrategy; | ||
/** | ||
@@ -64,7 +64,7 @@ * Specifies the id of the caller element. | ||
*/ | ||
"visible"?: boolean; | ||
"visible": boolean; | ||
/** | ||
* Specifies the visibility of the component. | ||
*/ | ||
"zIndex"?: number; | ||
"zIndex": number; | ||
} | ||
@@ -71,0 +71,0 @@ } |
@@ -224,2 +224,3 @@ [ | ||
"mi/baseline/person", | ||
"mi/baseline/pets", | ||
"mi/baseline/radio-button-checked", | ||
@@ -226,0 +227,0 @@ "mi/baseline/radio-button-unchecked", |
@@ -1,2 +0,2 @@ | ||
import { InputValueType } from '../types/input-value-type' | ||
import { InputValueType } from '@type/input-value-type' | ||
@@ -3,0 +3,0 @@ export interface InputValue { |
@@ -1,1 +0,1 @@ | ||
import{p as t,b as e}from"./p-664e0918.js";export{s as setNonce}from"./p-664e0918.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),t(a)})().then((t=>e([["p-63461555",[[1,"mds-dropdown",{arrow:[4],arrowPadding:[2,"arrow-padding"],autoPlacement:[4,"auto-placement"],backdrop:[4],flip:[4],target:[1],offset:[2],placement:[1],shift:[4],shiftPadding:[2,"shift-padding"],smooth:[4],strategy:[1],visible:[1540],zIndex:[2,"z-index"]}]]]],t))); | ||
import{p as e,b as t}from"./p-664e0918.js";export{s as setNonce}from"./p-664e0918.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-dec3d1b6",[[1,"mds-dropdown",{arrow:[4],arrowPadding:[2,"arrow-padding"],autoPlacement:[4,"auto-placement"],backdrop:[4],flip:[4],target:[1],offset:[2],placement:[1],shift:[4],shiftPadding:[2,"shift-padding"],smooth:[4],strategy:[1],visible:[1540],zIndex:[2,"z-index"]}]]]],e))); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1175601
146
17624
Updated@floating-ui/dom@^1.2.6
Updated@stencil/core@^2.22.3