From e0198265a087af092c6a5926fe8d9d8ca7473ab9 Mon Sep 17 00:00:00 2001 From: pavelklibani Date: Wed, 4 Oct 2023 19:39:48 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20lmc-eu/s?= =?UTF-8?q?pirit-design-system@ffe1835fcc692f18db89f87d7e741d89cc7bc218=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...c193b4.js => spirit-web-chunk.81664e39.js} | 2 +- ...8faee5.js => spirit-web-entry.bac055be.js} | 2 +- ...25e4a6.js => spirit-web-entry.f55a4183.js} | 2 +- docs/index.html | 2 +- docs/src/icons/index.html | 2 +- docs/src/scss/components/Accordion/index.html | 2 +- docs/src/scss/components/Alert/index.html | 2 +- .../scss/components/Breadcrumbs/index.html | 2 +- docs/src/scss/components/Button/index.html | 2 +- docs/src/scss/components/Checkbox/index.html | 2 +- docs/src/scss/components/Collapse/index.html | 2 +- docs/src/scss/components/Container/index.html | 2 +- docs/src/scss/components/Dropdown/index.html | 2 +- .../src/scss/components/FieldGroup/index.html | 2 +- .../scss/components/FileUploader/index.html | 4 +- docs/src/scss/components/Grid/index.html | 2 +- docs/src/scss/components/Header/index.html | 2 +- docs/src/scss/components/Item/index.html | 2 +- docs/src/scss/components/Modal/index.html | 76 ++++++++++++++++++- .../src/scss/components/Pagination/index.html | 2 +- docs/src/scss/components/Pill/index.html | 2 +- docs/src/scss/components/Radio/index.html | 2 +- .../src/scss/components/ScrollView/index.html | 2 +- docs/src/scss/components/Select/index.html | 2 +- docs/src/scss/components/Spinner/index.html | 2 +- docs/src/scss/components/Stack/index.html | 2 +- docs/src/scss/components/Tabs/index.html | 2 +- docs/src/scss/components/Tag/index.html | 2 +- docs/src/scss/components/TextArea/index.html | 2 +- docs/src/scss/components/TextField/index.html | 2 +- docs/src/scss/components/Tooltip/index.html | 4 +- .../src/scss/helpers/accessibility/index.html | 2 +- docs/src/scss/helpers/animations/index.html | 2 +- docs/src/scss/helpers/breakout/index.html | 2 +- docs/src/scss/helpers/images/index.html | 2 +- docs/src/scss/helpers/index.html | 2 +- docs/src/scss/helpers/links/index.html | 2 +- docs/src/scss/helpers/lists/index.html | 2 +- .../scss/helpers/scroll-control/index.html | 2 +- docs/src/scss/helpers/text/index.html | 2 +- docs/src/scss/helpers/typography/index.html | 2 +- 41 files changed, 117 insertions(+), 43 deletions(-) rename docs/assets/{spirit-web-chunk.e4c193b4.js => spirit-web-chunk.81664e39.js} (64%) rename docs/assets/{spirit-web-entry.f58faee5.js => spirit-web-entry.bac055be.js} (92%) rename docs/assets/{spirit-web-entry.3b25e4a6.js => spirit-web-entry.f55a4183.js} (94%) diff --git a/docs/assets/spirit-web-chunk.e4c193b4.js b/docs/assets/spirit-web-chunk.81664e39.js similarity index 64% rename from docs/assets/spirit-web-chunk.e4c193b4.js rename to docs/assets/spirit-web-chunk.81664e39.js index 2360b31c24..940cde80d4 100644 --- a/docs/assets/spirit-web-chunk.e4c193b4.js +++ b/docs/assets/spirit-web-chunk.81664e39.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function e(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=e(s);fetch(s.href,o)}})();const Dt=(r,t,e)=>{r&&r.addEventListener(t,e,{passive:!1})},Ot=(r,t,e)=>r.removeEventListener(t,e),n={on(r,t,e){Dt(r,t,e)},off(r,t,e){Ot(r,t,e)},trigger(r,t,e){if(typeof t!="string"||!r)return null;const i=!0,s=new Event(t,{bubbles:i,cancelable:!0});if(typeof e<"u")for(const o of Object.keys(e))Object.defineProperty(s,o,{get(){return e[o]}});return r.dispatchEvent(s),s}},h={findAll(r,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,r))},findOne(r,t=document.documentElement){return Element.prototype.querySelector.call(t,r)}},bt=r=>!r||typeof r!="object"?!1:typeof r.nodeType<"u",O=r=>bt(r)?r:typeof r=="string"&&r.length>0?document.querySelector(r):null,Ct=(r,t="target")=>{var s;const e=r,i=(s=e==null?void 0:e.dataset)!=null&&s.spiritTarget?O(r.dataset.spiritTarget):null;return t==="target"?i:e},$t=r=>r==null?void 0:r.getAttribute("data-spirit-target"),y=r=>{const t=$t(r);return t?document.querySelector(t):null},gt="data-spirit-toggle",It="data-spirit-dismiss",pt=(r,t,e,i,s="target")=>{n.on(r,"click",function(){const a=Ct(O(this),s);t.getOrCreateInstance(a)[e](a,i)})},vt=(r,t)=>{t.getOrCreateInstance(r)},Y=(r,t,e,i="toggle",s="target")=>{const o=t.NAME;n.on(window,"DOMContentLoaded",a=>{h.findAll(`[${r}="${o}"]`).forEach(l=>{e(l,t,i,a,s)})})},N=(r,t="toggle",e="target")=>{Y(gt,r,pt,t,e)},ft=(r,t="dismiss",e="target")=>{Y(It,r,pt,t,e)},b=(r,t="toggle")=>{Y(gt,r,vt,t)},Mt=(r,t)=>!t.composedPath().includes(r),G=(r,t)=>{let e,i=!1;return s=>{i||(i=!0,e&&clearTimeout(e),e=setTimeout(()=>{r(s),i=!1},t))}},m=new Map,R={set(r,t,e){m.has(r)||m.set(r,new Map);const i=m.get(r);if(!i.has(t)&&i.size!==0){console.error(`Spirit do not allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`);return}i.set(t,e)},get(r,t){return m.has(r)&&m.get(r).get(t)||null},remove(r,t){if(!m.has(r))return;const e=m.get(r);e.delete(t),e.size===0&&m.delete(r)}},yt=r=>{n.trigger(r,"transitionend")},Rt=r=>{if(!r)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(r);const i=Number.parseFloat(t),s=Number.parseFloat(e);return!i&&!s?0:([t]=t.split(","),[e]=e.split(","),(Number.parseFloat(t)+Number.parseFloat(e))*1e3)},Z=(r,t=[],e=r)=>typeof r=="function"?r(...t):e,D=(r,t,e=!0)=>{if(!e){Z(t);return}const i=5,s=Rt(r)+i;let o=!1;const a=l=>{l.target===r&&(o=!0,r.removeEventListener("transitionend",a),Z(t))};r.addEventListener("transitionend",a),setTimeout(()=>{o||yt(r)},s)},xt="dialog[open]",x="is-scrolling-disabled";class mt{constructor(t,e,i){this.target=t,this.element=e||document.body,this.selector=i||xt,this.offsetY=0}disableScroll(){if(this.element.classList.contains(x))return;const e=(this.element.tagName==="BODY"?window.innerWidth:this.element.offsetWidth)-this.element.clientWidth;this.offsetY=window.scrollY,this.element.style.paddingRight=`${e}px`,this.element.style.top=`-${this.offsetY}px`,this.element.classList.add(x)}enableScroll(){const t=h.findAll(this.selector);this.target&&t.length===0&&D(this.target,()=>{this.element.style.paddingRight="",this.element.style.top="",this.element.classList.remove(x),window.scrollTo(0,this.offsetY)})}}const Ft=(r,t,e)=>{const i=new FileReader;i.onload=s=>{const o=new Image;o.onload=()=>{const a=document.createElement("canvas"),l=a.getContext("2d");a.width=t,a.height=o.height/o.width*t,l==null||l.drawImage(o,0,0,a.width,a.height);const c=a.toDataURL("image/jpeg",.8);e(c)},s.target&&s.target.result&&(o.src=s.target.result.toString())},i.readAsDataURL(r)};class g{constructor(t){this.element=O(t),this.NAME="",R.set(this.element,this.constructor.INSTANCE_KEY,this)}dispose(){R.remove(this.element,this.constructor.INSTANCE_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}static get NAME(){return""}static getInstance(t){return R.get(O(t),this.INSTANCE_KEY)}static getOrCreateInstance(t){return this.getInstance(t)||this.createInstance(t)}static createInstance(t){return new this(t)}static get INSTANCE_KEY(){return`spirit.${this.NAME}`}static get DATA_KEY(){return`${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Pt="autoResize",Vt="resize",F=400;class Ht extends g{constructor(t){super(t),this.adjustHeight=()=>{const e=parseFloat(getComputedStyle(this.input).getPropertyValue("border-top-width"))||0,i=parseFloat(getComputedStyle(this.input).getPropertyValue("border-bottom-width"))||0,s=e+i;this.input.style.height="auto",this.input.style.overflow="auto";const o=this.input.scrollHeight+s;this.input.style.height=`${o{s.setAttribute(Qt,this.meta.id),s.setAttribute(P,String(t)),this.meta.hideOnCollapse&&t&&(s.remove(),this.appendNodeToParent(),this.onDestroy())};this.state.open=t,e.length===1?i(this.element):e.map(s=>i(s))}updateCollapsibleElement(t=this.state.open){var e;this.target&&(t||this.adjustCollapsibleChildrenHeight(),this.adjustCollapsibleElementHeight(t),this.state.init&&((e=this.target)==null||e.classList.add(j)),D(this.target,()=>{var i,s,o,a;(i=this.target)==null||i.classList.remove(j),(s=this.target)==null||s.classList.toggle(Bt,t),t?(o=this.target)==null||o.setAttribute("style","height: 100%"):(a=this.target)==null||a.style.removeProperty("height")}))}show(){this.hideParentSiblings(this.element),n.trigger(this.target,Wt),this.updateTriggerElement(!0),this.updateCollapsibleElement(!0),this.target&&D(this.target,()=>{n.trigger(this.target,tt)})}hide(){n.trigger(this.target,Yt),this.updateTriggerElement(!1),this.updateCollapsibleElement(!1),this.target&&D(this.target,()=>{n.trigger(this.target,J)})}toggle(){this.state.open?this.hide():this.show()}initEvents(){const t=h.findAll(`[${V}="${this.meta.id}"]`);t.length===1?n.on(this.element,"click",()=>this.toggle()):t.forEach(e=>n.on(e,"click",()=>this.toggle()))}destroyEvents(){const t=h.findAll(`[${V}="${this.meta.id}"]`);t.length===1?n.off(this.element,"click",()=>this.toggle()):t.forEach(e=>n.off(e,"click",()=>this.toggle()))}onDestroy(){this.destroyEvents()}init(){this.updateTriggerElement(),this.updateCollapsibleElement(),this.initEvents(),this.state.init=!0}}b(W);const At="dropdown",kt=`${At}`,$=`.${kt}`,Kt=`hide${$}`,qt=`hidden${$}`,Gt=`show${$}`,Zt=`shown${$}`,jt="aria-expanded",Xt="aria-controls",Jt="DropdownWrapper",te="is-expanded",ee="is-open";class ie extends g{constructor(t){super(t),this.autoCloseHandler=e=>{const i=this.target&&Mt(this.target,e);e.target&&i&&this.hide()},this.target=h.findOne(`${this.element.dataset.spiritTarget}`),this.reference=this.findReferenceElement(),this.state={open:!1},this.options={autoClose:!0}}static get NAME(){return At}getOptions(){var s;const t={...this.options},e=(s=this.element)==null?void 0:s.dataset,i=e==null?void 0:e.spiritAutoclose;return i&&(t.autoClose=!i),t}findReferenceElement(){let t=this.element;const{reference:e}=this.element.dataset;return e&&(e==="parent"&&this.element.parentElement&&this.element.parentElement.classList.contains(Jt)?t=this.element.parentElement:e.match(/(#)/g)&&(t=h.findOne(e))),t}updateTriggerElement(t=this.state.open){this.element.classList.toggle(te,t),this.element.setAttribute(jt,t),this.element.setAttribute(Xt,this.element.dataset.spiritTarget)}updateTargetElement(t=this.state.open){var e;(e=this.target)==null||e.classList.toggle(ee,t)}show(){this.state.open=!0,this.target&&n.trigger(this.target,Gt),this.updateTriggerElement(),this.updateTargetElement(),setTimeout(()=>{this.target&&n.trigger(this.target,Zt),this.getOptions().autoClose&&n.on(document,"click",this.autoCloseHandler)},0)}hide(){this.state.open=!1,this.target&&n.trigger(this.target,Kt),this.updateTriggerElement(),this.updateTargetElement(),n.off(document,"click",this.autoCloseHandler),setTimeout(()=>{this.target&&n.trigger(this.target,qt)},0)}toggle(){this.state.open?this.hide():this.show()}}N(ie,"toggle","trigger");const Tt="fileUploader",L=`.${Tt}`,se=`queueFile${L}`,re=`queuedFile${L}`,ne=`unqueueFile${L}`,oe=`unqueuedFile${L}`,H=`error${L}`,ae="has-drag-and-drop",et="is-dragging",le="d-none",he="is-disabled",it="has-danger",ce='[data-spirit-element="wrapper"]',de='[data-spirit-element="input"]',ue='[data-spirit-element="list"]',Ee='[data-spirit-element="dropZone"]',ge='[data-spirit-snippet="item"]',T="data-spirit-populate-field",st="data-spirit-dismiss",St="validation_text",rt=`[data-spirit-element="${St}"]`,pe=1e7,fe=10,w={errorMaxFileSize:"The file size limit has been exceeded",errorFileDuplicity:"This file already exists in the queue",errorMaxUploadedFiles:"You have exceeded the number of files allowed in the queue",errorFileNotSupported:"is not a supported file. Please ensure you are uploading a supported file format."};class S extends g{constructor(t){var e,i,s,o,a,l,c,p,f,u;super(t),this.wrapper=h.findOne(ce,t),this.inputElement=h.findOne(de,t),this.listElement=h.findOne(ue,t),this.dropZone=h.findOne(Ee,t),this.isDragAndDropSupported="draggable"in document.createElement("span"),this.fileSizeLimit=(e=this.wrapper)!=null&&e.dataset.spiritMaxFileSize?Number((i=this.wrapper)==null?void 0:i.dataset.spiritMaxFileSize):pe,this.fileQueueLimit=(s=this.wrapper)!=null&&s.dataset.spiritFileQueueLimit?Number((o=this.wrapper)==null?void 0:o.dataset.spiritFileQueueLimit):fe,this.queueLimitBehavior=(a=this.wrapper)!=null&&a.dataset.spiritQueueLimitBehavior?(l=this.wrapper)==null?void 0:l.dataset.spiritQueueLimitBehavior:"none",this.errors={},this.errors.errorMaxFileSize=this.element.dataset.spiritMessageMaxfilesize??w.errorMaxFileSize,this.errors.errorFileDuplicity=this.element.dataset.spiritMessageDuplicity??w.errorFileDuplicity,this.errors.errorMaxUploadedFiles=this.element.dataset.spiritMessageMaxuploadedfiles??w.errorMaxUploadedFiles,this.errors.errorFileNotSupported=this.element.dataset.spiritMessageUnsupported??w.errorFileNotSupported,this.inputName=((c=this.inputElement)==null?void 0:c.name)||"attachment",this.isMultiple=(p=this.inputElement)==null?void 0:p.multiple,this.accept=(f=this.inputElement)==null?void 0:f.accept,this.isDragging=!1,this.fileQueue=new Map,this.instanceUid=S.getUid(),this.isDisabled=((u=this.inputElement)==null?void 0:u.disabled)||!1,this.init()}static get NAME(){return Tt}get getFileQueue(){return this.fileQueue}clearFileQueue(){var t;for(this.fileQueue.clear();(t=this.listElement)!=null&&t.firstChild;)this.listElement.removeChild(this.listElement.firstChild)}static getUid(){return Math.random().toString(36).slice(-6)}getUpdatedFileName(t){return`file_${this.instanceUid}_${t.replace(/[^a-zA-Z0-9]/g,"")}`}dragReset(){var t;this.isDragging=!1,(t=this.wrapper)==null||t.classList.remove(et)}checkAllowedFileSize(t){if(t.size>this.fileSizeLimit)throw new Error(`${t.name}: ${this.errors.errorMaxFileSize}`)}checkFileQueueDuplicity(t){if(this.fileQueue.has(this.getUpdatedFileName(t.name)))throw new Error(`${t.name}: ${this.errors.errorFileDuplicity}`)}checkQueueLimit(){if(this.fileQueue.size>=this.fileQueueLimit)throw new Error(this.errors.errorMaxUploadedFiles)}checkAllowedFileType(t){var a,l;const e=(a=t.name.split(".").pop())==null?void 0:a.toLowerCase(),i=t.type;let s;if(!!(this.accept===""||this.accept==="*"||this.accept==="*/*"))s=!0;else{const c=(l=this.accept)==null?void 0:l.replace(/ /g,"").split(","),p=c==null?void 0:c.filter(u=>u.match(/\./g)),f=c==null?void 0:c.filter(u=>u.match(/\//g));p==null||p.forEach(u=>{const E=u.replace(".","").replace("*","");e.match(E)&&(s=!0)}),f==null||f.forEach(u=>{const E=u.replace("*","");i.match(E)&&(s=!0)})}if(!s)throw new Error(`"${t.name}": ${this.errors.errorFileNotSupported}`)}updateNameAttribute(){var t,e;this.fileQueue.size>0?(t=this.inputElement)==null||t.removeAttribute("name"):(e=this.inputElement)==null||e.setAttribute("name",this.inputName)}updateDropZoneVisibility(){if(this.queueLimitBehavior==="none")return;const t=this.queueLimitBehavior==="hide"?le:he;setTimeout(()=>{var e;(e=this.wrapper)==null||e.classList.toggle(t,this.fileQueue.size===this.fileQueueLimit),this.inputElement.disabled=this.fileQueue.size===this.fileQueueLimit},0)}createAttachmentElement(){const t=document.createElement("input");return t.setAttribute("type","file"),t.setAttribute("name",`${this.inputName}[]`),t.setAttribute("hidden",""),t}static createValidationTextElement(){const t=document.createElement("ul");return t.dataset.spiritElement=St,t}static isValidationTextInElement(t,e){const i=e.getElementsByTagName("li");return!!Array.from(i).filter(o=>{var a;return(a=o.textContent)==null?void 0:a.includes(t)}).length}getValidationTextElement(t){const e=document.createElement("li");e.appendChild(document.createTextNode(t));let i=h.findOne(rt,this.wrapper);return i||(i=S.createValidationTextElement()),!S.isValidationTextInElement(t,i)&&i.appendChild(e),i}getAttachmentElement(t,e){var k,K;const i=h.findOne(ge,this.element),s=i==null?void 0:i.content.cloneNode(!0);if(!s)return null;const o=new DataTransfer;o.items.add(t);const a=this.createAttachmentElement();a.files=o.files;const l=s.querySelector(`[${T}="item"]`),c=s.querySelector(`[${T}="name"]`),p=s.querySelector(`[${T}="button"]`),f=!!((k=l==null?void 0:l.dataset)!=null&&k.spiritImagepreview),u=l==null?void 0:l.querySelector("svg"),E=s.querySelector(".FileUploaderAttachment__image"),wt=t.type.includes("image");return f&&wt?(u==null||u.remove(),(K=E==null?void 0:E.querySelector("img"))==null||K.setAttribute("alt",t.name),Ft(t,100,_t=>{var q;return(q=E==null?void 0:E.querySelector("img"))==null?void 0:q.setAttribute("src",_t)})):E==null||E.remove(),l.appendChild(a),l.setAttribute("id",e),c.appendChild(document.createTextNode(t.name)),p.setAttribute(st,e),l.removeAttribute(T),c.removeAttribute(T),p.removeAttribute(T),s.children.item(0)}createAttachmentEvents(t){const e=h.findOne(`[${st}="${t}"]`);e&&n.on(e,"click",i=>{var o,a;i.preventDefault();const s=(a=(o=i.target)==null?void 0:o.dataset)==null?void 0:a.spiritDismiss;s&&this.removeFromQueue(s)})}appendToList(t){if(!this.listElement)return;this.isMultiple||this.clearFileQueue();const e=this.getUpdatedFileName(t.name),i=this.getAttachmentElement(t,e);i&&(this.fileQueue.set(e,t),this.listElement.appendChild(i),this.createAttachmentEvents(e),this.dragReset())}addToQueue(t){try{n.trigger(this.wrapper,se,{fileQueue:this.fileQueue,currentFile:t}),this.checkAllowedFileType(t),this.checkAllowedFileSize(t),this.checkFileQueueDuplicity(t),this.checkQueueLimit(),this.appendToList(t),this.updateDropZoneVisibility(),this.updateNameAttribute(),n.trigger(this.wrapper,re,{fileQueue:this.fileQueue,currentFile:t})}catch(e){n.trigger(this.wrapper,H,{validationText:e.message})}}removeFromQueue(t){if(this.fileQueue.has(t)){n.trigger(this.wrapper,ne,{fileQueue:this.fileQueue,currentFile:t});const e=h.findOne(`#${t}`);this.fileQueue.delete(t),e==null||e.remove(),this.updateDropZoneVisibility(),this.updateNameAttribute(),this.removeValidationWError(),n.trigger(this.wrapper,oe,{fileQueue:this.fileQueue,currentFile:t})}}getFileFromQueue(t){return this.fileQueue.get(t)}onChange(t){const{target:e}=t,i=e.files?[...e.files]:[];let s=0,o;s+=this.fileQueue.size,i.forEach(a=>{s{e.value="",e.blur()},0)}static onDragOver(t){t.preventDefault()}onDragEnter(){var t;this.isDragging=!0,(t=this.wrapper)==null||t.classList.add(et)}onDragLeave(){this.dragReset()}onDrop(t){var s,o,a;if(t.preventDefault(),this.isDisabled)return;const e=Array.from(((s=t==null?void 0:t.dataTransfer)==null?void 0:s.items)||[]),i=Array.from(((o=t==null?void 0:t.dataTransfer)==null?void 0:o.files)||[]);!this.isMultiple&&(e.length>1||i.length>1),(a=t==null?void 0:t.dataTransfer)!=null&&a.items?e.forEach(l=>{if(l.kind==="file"){const c=l.getAsFile();c&&this.addToQueue(c)}}):i.forEach(l=>{this.addToQueue(l)})}removeValidationWError(){var t;(t=h.findOne(rt,this.wrapper))==null||t.remove(),this.wrapper.classList.remove(it)}onClick(){this.removeValidationWError()}onValidationError(t){this.wrapper.classList.add(it),this.wrapper.append(this.getValidationTextElement(t.validationText))}addEventListeners(){n.on(this.inputElement,"click",this.onClick.bind(this)),n.on(this.inputElement,"change",this.onChange.bind(this)),n.on(this.wrapper,H,this.onValidationError.bind(this)),this.isDragAndDropSupported&&this.dropZone&&(n.on(this.dropZone,"dragover",S.onDragOver.bind(this)),n.on(this.dropZone,"dragenter",this.onDragEnter.bind(this)),n.on(this.dropZone,"dragleave",this.onDragLeave.bind(this)),n.on(this.dropZone,"drop",this.onDrop.bind(this)))}init(){var t;this.addEventListeners(),this.isDragAndDropSupported&&((t=this.wrapper)==null||t.classList.add(ae))}}b(S);const me="modal",nt='[data-spirit-toggle="modal"]';class Ae extends g{constructor(t){super(t),this.isShown=!1,this.isTouchDevice="ontouchstart"in window||navigator.maxTouchPoints>0,this.scrollControl=new mt(t)}static get NAME(){return me}onClick(t){(t.target===this.element||t.target.dataset.spiritDismiss)&&(t.preventDefault(),t.stopPropagation(),this.hide(t))}onDialogClose(t){t.defaultPrevented||(this.hide(t),t.preventDefault())}addEventListeners(){n.on(this.element,"close",t=>this.onDialogClose(t)),this.isTouchDevice?n.on(window,"touchstart",t=>this.onClick(t)):n.on(window,"click",t=>this.onClick(t))}removeEventListeners(){n.off(this.element,"close",t=>this.onDialogClose(t)),this.isTouchDevice?n.off(window,"touchstart",t=>this.onClick(t)):n.off(window,"click",t=>this.onClick(t))}show(){var e;if(this.isShown)return;const t=h.findOne(nt,this.element);t==null||t.setAttribute("aria-expanded","true"),(e=this.element)==null||e.showModal(),this.addEventListeners(),this.isShown=!0,this.scrollControl.disableScroll()}hide(t){var s;let e;(s=t==null?void 0:t.target)!=null&&s.dataset?t.target.dataset.spiritTarget?e=h.findOne(t.target.dataset.spiritTarget):e=t.target:e=this.element;const i=h.findOne(nt,this.element);typeof e.close=="function"&&e.close(),i==null||i.setAttribute("aria-expanded","false"),this.removeEventListeners(),this.isShown=!1,this.scrollControl.enableScroll()}toggle(t,e){if(!t){console.warn('👻 Boo…! Target modal pane does not exist. Maybe you forgot to prefix the "data-spirit-target" selector with "#"? ');return}this.isShown?this.hide(e):this.show()}}N(Ae);const Te="offcanvas",Se="offcanvas",I=`.${Se}`,Ne=`show${I}`,Le=`shown${I}`,we=`hide${I}`,_e=`hidden${I}`,De=1280,ot="is-open";class Nt extends g{constructor(t){const e=t;super(e),this.isShown=!1,this.scrollControl=new mt(t)}static get NAME(){return Te}onClick(t){(t.target===this.element||t.target.dataset.spiritDismiss)&&(t.preventDefault(),t.stopPropagation(),this.hide())}onWindowResize(t){t.target.innerWidth>=De&&this.hide()}onDialogClose(t){t.defaultPrevented||(this.hide(),t.preventDefault())}addEventListeners(){n.on(this.element,"close",t=>this.onDialogClose(t)),n.on(window,"resize",t=>this.onWindowResize(t)),n.on(window,"click",t=>this.onClick(t))}removeEventListeners(){n.off(this.element,"close",t=>this.onDialogClose(t)),n.off(window,"resize",t=>this.onWindowResize(t)),n.off(window,"click",t=>this.onClick(t))}show(t){if(this.isShown)return;const e=n.trigger(this.element,Ne,{relatedTarget:t});e!=null&&e.defaultPrevented||(this.element.classList.add(ot),this.element.showModal(),t.setAttribute("aria-expanded","true"),this.element.setAttribute("aria-modal","true"),this.element.setAttribute("role","dialog"),this.addEventListeners(),this.isShown=!0,n.trigger(this.element,Le,{relatedTarget:t}),this.scrollControl.disableScroll())}hide(){if(!this.isShown)return;const t=n.trigger(this.element,we);t!=null&&t.defaultPrevented||(this.element.classList.remove(ot),this.element.close(),this.element.removeAttribute("aria-modal"),this.element.removeAttribute("role"),this.removeEventListeners(),this.isShown=!1,n.trigger(this.element,_e),this.scrollControl.enableScroll())}toggle(t){if(!t){console.warn('👻 Boo…! Target dialog does not exist. Maybe you forgot to prefix the "data-spirit-target" selector with "#"? ');return}this.isShown?this.hide():this.show(t)}}N(Nt);ft(Nt,"hide");const Oe="password",at="aria-pressed",lt="aria-label",ht="input";class be extends g{constructor(t){super(t),this.isShown=!1}static get NAME(){return Oe}show(t){var e;t.setAttribute(at,"true"),t.setAttribute(lt,"Hide password"),(e=h.findOne(ht,t.parentElement))==null||e.setAttribute("type","text"),this.isShown=!0}hide(t){var e;t.setAttribute(at,"false"),t.setAttribute(lt,"Show password"),(e=h.findOne(ht,t.parentElement))==null||e.setAttribute("type","password"),this.isShown=!1}toggle(t){this.isShown?this.hide(t):this.show(t)}}N(be,"toggle","trigger");const _={LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom"},z={HORIZONTAL:"horizontal",VERTICAL:"vertical"},Ce="scrollView",ct=50,$e=z.VERTICAL,Ie='[data-spirit-element="viewport"]',ve='[data-spirit-element="content"]',dt="is-scrolled-at-start",ut="is-scrolled-at-end",Me="resize",ye="scroll",Et=1;class Re extends g{constructor(t){var e;super(t),this.getElementsPositionDifference=()=>{const i=this.content.getBoundingClientRect(),s=this.viewport.getBoundingClientRect();return{bottom:i.bottom-s.bottom,left:i.left-s.left,right:i.right-s.right,top:i.top-s.top}},this.handleScrollViewState=()=>{this.currentPosition=this.getElementsPositionDifference();const i=this.currentPosition[this.scrollPositionStart]<=-1*Et,s=this.currentPosition[this.scrollPositionEnd]>=Et;i!==this.isScrolledAtStart&&(this.isScrolledAtStart=i),s!==this.isScrolledAtEnd&&(this.isScrolledAtEnd=s),i?this.element.classList.add(dt):this.element.classList.remove(dt),s?this.element.classList.add(ut):this.element.classList.remove(ut)},this.currentPosition={bottom:0,left:0,right:0,top:0},this.direction=(e=this.element.dataset)!=null&&e.spiritDirection?String(this.element.dataset.spiritDirection):$e,this.content=h.findOne(ve,this.element),this.viewport=h.findOne(Ie,this.element),this.scrollPositionStart=this.direction===z.HORIZONTAL?_.LEFT:_.TOP,this.scrollPositionEnd=this.direction===z.HORIZONTAL?_.RIGHT:_.BOTTOM,this.isScrolledAtStart=!1,this.isScrolledAtEnd=!1,this.init()}static get NAME(){return Ce}static get DATA_KEY(){return`${this.NAME}`}addEventListeners(){n.on(this.viewport,ye,G(this.handleScrollViewState,ct)),n.on(window,Me,G(this.handleScrollViewState,ct))}init(){this.addEventListeners(),this.handleScrollViewState()}}b(Re);const Lt="tabs",xe="tabs",v=`.${xe}`,Fe=`hide${v}`,Pe=`hidden${v}`,Ve=`show${v}`,He=`shown${v}`,Q="is-selected",Qe='[role="tablist"]',Ue='[role="presentation"]',Be='[role="tab"]',ze=`[data-spirit-toggle="${Lt}"]`,U=`${Be}, ${ze}`;class d extends g{constructor(t){super(t),this.parent=this.element.closest(Qe),this.parent&&d.setInitialAttributes(this.parent,this.getChildren())}static get NAME(){return Lt}show(){const t=this.element;if(d.isElementActive(t))return;const e=this.getActiveElem(),i=e?n.trigger(e,Fe,{relatedTarget:t}):null;n.trigger(t,Ve,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this.deactivate(e,t),this.activate(t,e))}activate(t,e){t&&(t.classList.add(Q),this.activate(y(t)),t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true"),n.trigger(t,He,{relatedTarget:e}))}deactivate(t,e){t&&(t.classList.remove(Q),this.deactivate(y(t)),t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1"),n.trigger(t,Pe,{relatedTarget:e}))}getChildren(){return h.findAll(U,this.parent)}getActiveElem(){return this.getChildren().find(t=>d.isElementActive(t))||null}static setInitialAttributes(t,e){d.setAttributeIfNotExists(t,"role","tablist");for(const i of e)d.setInitialAttributesOnChild(i)}static setInitialAttributesOnChild(t){const e=d.getInnerElement(t),i=d.isElementActive(e),s=d.getOuterElement(e);e==null||e.setAttribute("aria-selected",i.toString()),s!==e&&d.setAttributeIfNotExists(s,"role","presentation"),e&&!i&&e.setAttribute("tabindex","-1"),d.setAttributeIfNotExists(e,"role","tab"),d.setInitialAttributesOnTargetPanel(e)}static setInitialAttributesOnTargetPanel(t){const e=y(t);e&&(d.setAttributeIfNotExists(e,"role","tabpanel"),t!=null&&t.id&&d.setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}static setAttributeIfNotExists(t,e,i){t&&!t.hasAttribute(e)&&t.setAttribute(e,i)}static isElementActive(t){return t!==null&&t.classList.contains(Q)}static getInnerElement(t){return t!=null&&t.matches(U)?t:h.findOne(U,t)}static getOuterElement(t){return(t==null?void 0:t.closest(Ue))||t}}N(d,"show","trigger");const Ye="tooltip",We="tooltip",M=`.${We}`,ke=`hide${M}`,Ke=`hidden${M}`,qe=`show${M}`,Ge=`shown${M}`,Ze="is-visible",B="is-hidden";class A extends g{constructor(t){super(t),this.tip=this.getTipElement()}static get NAME(){return Ye}toggle(){this.isShown()?this.hide():this.show()}show(){var e,i;if(((i=(e=this.element)==null?void 0:e.style)==null?void 0:i.display)==="none")throw new Error("Please use show on elements without `display: none`");if(!n.trigger(this.element,A.eventName(qe)).defaultPrevented){if(this.element.setAttribute("aria-describedby",this.tip.getAttribute("id")),this.tip.classList.remove(B),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))n.on(s,"mouseover",null);n.trigger(this.element,A.eventName(Ge))}}hide(){if(!(!this.isShown()||n.trigger(this.element,A.eventName(ke)).defaultPrevented)){if(this.tip.classList.add(B),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))n.off(e,"mouseover",null);this.element.removeAttribute("aria-describedby"),n.trigger(this.element,A.eventName(Ke))}}isShown(){var t,e;return this.tip&&(((t=this.tip.classList)==null?void 0:t.contains(Ze))||!((e=this.tip.classList)!=null&&e.contains(B)))}getTipElement(){var t,e,i;return this.tip||(this.tip=h.findOne((e=(t=this.element)==null?void 0:t.dataset)==null?void 0:e.spiritTarget)||this.element||((i=this.element)==null?void 0:i.parentElement)),this.tip}}N(A,"toggle");ft(A,"hide");export{S as F,Ae as M,A as T}; +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function e(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=e(s);fetch(s.href,o)}})();const Dt=(r,t,e)=>{r&&r.addEventListener(t,e,{passive:!1})},Ot=(r,t,e)=>r.removeEventListener(t,e),n={on(r,t,e){Dt(r,t,e)},off(r,t,e){Ot(r,t,e)},trigger(r,t,e){if(typeof t!="string"||!r)return null;const i=!0,s=new Event(t,{bubbles:i,cancelable:!0});if(typeof e<"u")for(const o of Object.keys(e))Object.defineProperty(s,o,{get(){return e[o]}});return r.dispatchEvent(s),s}},h={findAll(r,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,r))},findOne(r,t=document.documentElement){return Element.prototype.querySelector.call(t,r)}},Ct=r=>!r||typeof r!="object"?!1:typeof r.nodeType<"u",O=r=>Ct(r)?r:typeof r=="string"&&r.length>0?document.querySelector(r):null,bt=(r,t="target")=>{var s;const e=r,i=(s=e==null?void 0:e.dataset)!=null&&s.spiritTarget?O(r.dataset.spiritTarget):null;return t==="target"?i:e},$t=r=>r==null?void 0:r.getAttribute("data-spirit-target"),y=r=>{const t=$t(r);return t?document.querySelector(t):null},gt="data-spirit-toggle",It="data-spirit-dismiss",pt=(r,t,e,i,s="target")=>{n.on(r,"click",function(){const a=bt(O(this),s);t.getOrCreateInstance(a)[e](a,i)})},Mt=(r,t)=>{t.getOrCreateInstance(r)},z=(r,t,e,i="toggle",s="target")=>{const o=t.NAME;n.on(window,"DOMContentLoaded",a=>{h.findAll(`[${r}="${o}"]`).forEach(l=>{e(l,t,i,a,s)})})},N=(r,t="toggle",e="target")=>{z(gt,r,pt,t,e)},ft=(r,t="dismiss",e="target")=>{z(It,r,pt,t,e)},C=(r,t="toggle")=>{z(gt,r,Mt,t)},vt=(r,t)=>!t.composedPath().includes(r),G=(r,t)=>{let e,i=!1;return s=>{i||(i=!0,e&&clearTimeout(e),e=setTimeout(()=>{r(s),i=!1},t))}},m=new Map,R={set(r,t,e){m.has(r)||m.set(r,new Map);const i=m.get(r);if(!i.has(t)&&i.size!==0){console.error(`Spirit do not allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`);return}i.set(t,e)},get(r,t){return m.has(r)&&m.get(r).get(t)||null},remove(r,t){if(!m.has(r))return;const e=m.get(r);e.delete(t),e.size===0&&m.delete(r)}},yt=r=>{n.trigger(r,"transitionend")},Rt=r=>{if(!r)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(r);const i=Number.parseFloat(t),s=Number.parseFloat(e);return!i&&!s?0:([t]=t.split(","),[e]=e.split(","),(Number.parseFloat(t)+Number.parseFloat(e))*1e3)},Z=(r,t=[],e=r)=>typeof r=="function"?r(...t):e,D=(r,t,e=!0)=>{if(!e){Z(t);return}const i=5,s=Rt(r)+i;let o=!1;const a=l=>{l.target===r&&(o=!0,r.removeEventListener("transitionend",a),Z(t))};r.addEventListener("transitionend",a),setTimeout(()=>{o||yt(r)},s)},xt="dialog[open]",x="is-scrolling-disabled";class mt{constructor(t,e,i){this.target=t,this.element=e||document.body,this.selector=i||xt,this.offsetY=0}disableScroll(){if(this.element.classList.contains(x))return;const e=(this.element.tagName==="BODY"?window.innerWidth:this.element.offsetWidth)-this.element.clientWidth;this.offsetY=window.scrollY,this.element.style.paddingRight=`${e}px`,this.element.style.top=`-${this.offsetY}px`,this.element.classList.add(x)}enableScroll(){const t=h.findAll(this.selector);this.target&&t.length===0&&D(this.target,()=>{this.element.style.paddingRight="",this.element.style.top="",this.element.classList.remove(x),window.scrollTo(0,this.offsetY)})}}const Ft=(r,t,e)=>{const i=new FileReader;i.onload=s=>{const o=new Image;o.onload=()=>{const a=document.createElement("canvas"),l=a.getContext("2d");a.width=t,a.height=o.height/o.width*t,l==null||l.drawImage(o,0,0,a.width,a.height);const c=a.toDataURL("image/jpeg",.8);e(c)},s.target&&s.target.result&&(o.src=s.target.result.toString())},i.readAsDataURL(r)};class g{constructor(t){this.element=O(t),this.NAME="",R.set(this.element,this.constructor.INSTANCE_KEY,this)}dispose(){R.remove(this.element,this.constructor.INSTANCE_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}static get NAME(){return""}static getInstance(t){return R.get(O(t),this.INSTANCE_KEY)}static getOrCreateInstance(t){return this.getInstance(t)||this.createInstance(t)}static createInstance(t){return new this(t)}static get INSTANCE_KEY(){return`spirit.${this.NAME}`}static get DATA_KEY(){return`${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Pt="autoResize",Vt="resize",F=400;class Ht extends g{constructor(t){super(t),this.adjustHeight=()=>{const e=parseFloat(getComputedStyle(this.input).getPropertyValue("border-top-width"))||0,i=parseFloat(getComputedStyle(this.input).getPropertyValue("border-bottom-width"))||0,s=e+i;this.input.style.height="auto",this.input.style.overflow="auto";const o=this.input.scrollHeight+s;this.input.style.height=`${o{s.setAttribute(Qt,this.meta.id),s.setAttribute(P,String(t)),this.meta.hideOnCollapse&&t&&(s.remove(),this.appendNodeToParent(),this.onDestroy())};this.state.open=t,e.length===1?i(this.element):e.map(s=>i(s))}updateCollapsibleElement(t=this.state.open){var e;this.target&&(t||this.adjustCollapsibleChildrenHeight(),this.adjustCollapsibleElementHeight(t),this.state.init&&((e=this.target)==null||e.classList.add(j)),D(this.target,()=>{var i,s,o,a;(i=this.target)==null||i.classList.remove(j),(s=this.target)==null||s.classList.toggle(Bt,t),t?(o=this.target)==null||o.setAttribute("style","height: 100%"):(a=this.target)==null||a.style.removeProperty("height")}))}show(){this.hideParentSiblings(this.element),n.trigger(this.target,Yt),this.updateTriggerElement(!0),this.updateCollapsibleElement(!0),this.target&&D(this.target,()=>{n.trigger(this.target,tt)})}hide(){n.trigger(this.target,zt),this.updateTriggerElement(!1),this.updateCollapsibleElement(!1),this.target&&D(this.target,()=>{n.trigger(this.target,J)})}toggle(){this.state.open?this.hide():this.show()}initEvents(){const t=h.findAll(`[${V}="${this.meta.id}"]`);t.length===1?n.on(this.element,"click",()=>this.toggle()):t.forEach(e=>n.on(e,"click",()=>this.toggle()))}destroyEvents(){const t=h.findAll(`[${V}="${this.meta.id}"]`);t.length===1?n.off(this.element,"click",()=>this.toggle()):t.forEach(e=>n.off(e,"click",()=>this.toggle()))}onDestroy(){this.destroyEvents()}init(){this.updateTriggerElement(),this.updateCollapsibleElement(),this.initEvents(),this.state.init=!0}}C(Y);const At="dropdown",Wt=`${At}`,$=`.${Wt}`,Kt=`hide${$}`,qt=`hidden${$}`,Gt=`show${$}`,Zt=`shown${$}`,jt="aria-expanded",Xt="aria-controls",Jt="DropdownWrapper",te="is-expanded",ee="is-open";class ie extends g{constructor(t){super(t),this.autoCloseHandler=e=>{const i=this.target&&vt(this.target,e);e.target&&i&&this.hide()},this.target=h.findOne(`${this.element.dataset.spiritTarget}`),this.reference=this.findReferenceElement(),this.state={open:!1},this.options={autoClose:!0}}static get NAME(){return At}getOptions(){var s;const t={...this.options},e=(s=this.element)==null?void 0:s.dataset,i=e==null?void 0:e.spiritAutoclose;return i&&(t.autoClose=!i),t}findReferenceElement(){let t=this.element;const{reference:e}=this.element.dataset;return e&&(e==="parent"&&this.element.parentElement&&this.element.parentElement.classList.contains(Jt)?t=this.element.parentElement:e.match(/(#)/g)&&(t=h.findOne(e))),t}updateTriggerElement(t=this.state.open){this.element.classList.toggle(te,t),this.element.setAttribute(jt,t),this.element.setAttribute(Xt,this.element.dataset.spiritTarget)}updateTargetElement(t=this.state.open){var e;(e=this.target)==null||e.classList.toggle(ee,t)}show(){this.state.open=!0,this.target&&n.trigger(this.target,Gt),this.updateTriggerElement(),this.updateTargetElement(),setTimeout(()=>{this.target&&n.trigger(this.target,Zt),this.getOptions().autoClose&&n.on(document,"click",this.autoCloseHandler)},0)}hide(){this.state.open=!1,this.target&&n.trigger(this.target,Kt),this.updateTriggerElement(),this.updateTargetElement(),n.off(document,"click",this.autoCloseHandler),setTimeout(()=>{this.target&&n.trigger(this.target,qt)},0)}toggle(){this.state.open?this.hide():this.show()}}N(ie,"toggle","trigger");const Tt="fileUploader",L=`.${Tt}`,se=`queueFile${L}`,re=`queuedFile${L}`,ne=`unqueueFile${L}`,oe=`unqueuedFile${L}`,H=`error${L}`,ae="has-drag-and-drop",et="is-dragging",le="d-none",he="is-disabled",it="has-danger",ce='[data-spirit-element="wrapper"]',de='[data-spirit-element="input"]',ue='[data-spirit-element="list"]',Ee='[data-spirit-element="dropZone"]',ge='[data-spirit-snippet="item"]',T="data-spirit-populate-field",st="data-spirit-dismiss",St="validation_text",rt=`[data-spirit-element="${St}"]`,pe=1e7,fe=10,w={errorMaxFileSize:"The file size limit has been exceeded",errorFileDuplicity:"This file already exists in the queue",errorMaxUploadedFiles:"You have exceeded the number of files allowed in the queue",errorFileNotSupported:"is not a supported file. Please ensure you are uploading a supported file format."};class S extends g{constructor(t){var e,i,s,o,a,l,c,p,f,u;super(t),this.wrapper=h.findOne(ce,t),this.inputElement=h.findOne(de,t),this.listElement=h.findOne(ue,t),this.dropZone=h.findOne(Ee,t),this.isDragAndDropSupported="draggable"in document.createElement("span"),this.fileSizeLimit=(e=this.wrapper)!=null&&e.dataset.spiritMaxFileSize?Number((i=this.wrapper)==null?void 0:i.dataset.spiritMaxFileSize):pe,this.fileQueueLimit=(s=this.wrapper)!=null&&s.dataset.spiritFileQueueLimit?Number((o=this.wrapper)==null?void 0:o.dataset.spiritFileQueueLimit):fe,this.queueLimitBehavior=(a=this.wrapper)!=null&&a.dataset.spiritQueueLimitBehavior?(l=this.wrapper)==null?void 0:l.dataset.spiritQueueLimitBehavior:"none",this.errors={},this.errors.errorMaxFileSize=this.element.dataset.spiritMessageMaxfilesize??w.errorMaxFileSize,this.errors.errorFileDuplicity=this.element.dataset.spiritMessageDuplicity??w.errorFileDuplicity,this.errors.errorMaxUploadedFiles=this.element.dataset.spiritMessageMaxuploadedfiles??w.errorMaxUploadedFiles,this.errors.errorFileNotSupported=this.element.dataset.spiritMessageUnsupported??w.errorFileNotSupported,this.inputName=((c=this.inputElement)==null?void 0:c.name)||"attachment",this.isMultiple=(p=this.inputElement)==null?void 0:p.multiple,this.accept=(f=this.inputElement)==null?void 0:f.accept,this.isDragging=!1,this.fileQueue=new Map,this.instanceUid=S.getUid(),this.isDisabled=((u=this.inputElement)==null?void 0:u.disabled)||!1,this.init()}static get NAME(){return Tt}get getFileQueue(){return this.fileQueue}clearFileQueue(){var t;for(this.fileQueue.clear();(t=this.listElement)!=null&&t.firstChild;)this.listElement.removeChild(this.listElement.firstChild)}static getUid(){return Math.random().toString(36).slice(-6)}getUpdatedFileName(t){return`file_${this.instanceUid}_${t.replace(/[^a-zA-Z0-9]/g,"")}`}dragReset(){var t;this.isDragging=!1,(t=this.wrapper)==null||t.classList.remove(et)}checkAllowedFileSize(t){if(t.size>this.fileSizeLimit)throw new Error(`${t.name}: ${this.errors.errorMaxFileSize}`)}checkFileQueueDuplicity(t){if(this.fileQueue.has(this.getUpdatedFileName(t.name)))throw new Error(`${t.name}: ${this.errors.errorFileDuplicity}`)}checkQueueLimit(){if(this.fileQueue.size>=this.fileQueueLimit)throw new Error(this.errors.errorMaxUploadedFiles)}checkAllowedFileType(t){var a,l;const e=(a=t.name.split(".").pop())==null?void 0:a.toLowerCase(),i=t.type;let s;if(!!(this.accept===""||this.accept==="*"||this.accept==="*/*"))s=!0;else{const c=(l=this.accept)==null?void 0:l.replace(/ /g,"").split(","),p=c==null?void 0:c.filter(u=>u.match(/\./g)),f=c==null?void 0:c.filter(u=>u.match(/\//g));p==null||p.forEach(u=>{const E=u.replace(".","").replace("*","");e.match(E)&&(s=!0)}),f==null||f.forEach(u=>{const E=u.replace("*","");i.match(E)&&(s=!0)})}if(!s)throw new Error(`"${t.name}": ${this.errors.errorFileNotSupported}`)}updateNameAttribute(){var t,e;this.fileQueue.size>0?(t=this.inputElement)==null||t.removeAttribute("name"):(e=this.inputElement)==null||e.setAttribute("name",this.inputName)}updateDropZoneVisibility(){if(this.queueLimitBehavior==="none")return;const t=this.queueLimitBehavior==="hide"?le:he;setTimeout(()=>{var e;(e=this.wrapper)==null||e.classList.toggle(t,this.fileQueue.size===this.fileQueueLimit),this.inputElement.disabled=this.fileQueue.size===this.fileQueueLimit},0)}createAttachmentElement(){const t=document.createElement("input");return t.setAttribute("type","file"),t.setAttribute("name",`${this.inputName}[]`),t.setAttribute("hidden",""),t}static createValidationTextElement(){const t=document.createElement("ul");return t.dataset.spiritElement=St,t}static isValidationTextInElement(t,e){const i=e.getElementsByTagName("li");return!!Array.from(i).filter(o=>{var a;return(a=o.textContent)==null?void 0:a.includes(t)}).length}getValidationTextElement(t){const e=document.createElement("li");e.appendChild(document.createTextNode(t));let i=h.findOne(rt,this.wrapper);return i||(i=S.createValidationTextElement()),!S.isValidationTextInElement(t,i)&&i.appendChild(e),i}getAttachmentElement(t,e){var W,K;const i=h.findOne(ge,this.element),s=i==null?void 0:i.content.cloneNode(!0);if(!s)return null;const o=new DataTransfer;o.items.add(t);const a=this.createAttachmentElement();a.files=o.files;const l=s.querySelector(`[${T}="item"]`),c=s.querySelector(`[${T}="name"]`),p=s.querySelector(`[${T}="button"]`),f=!!((W=l==null?void 0:l.dataset)!=null&&W.spiritImagepreview),u=l==null?void 0:l.querySelector("svg"),E=s.querySelector(".FileUploaderAttachment__image"),wt=t.type.includes("image");return f&&wt?(u==null||u.remove(),(K=E==null?void 0:E.querySelector("img"))==null||K.setAttribute("alt",t.name),Ft(t,100,_t=>{var q;return(q=E==null?void 0:E.querySelector("img"))==null?void 0:q.setAttribute("src",_t)})):E==null||E.remove(),l.appendChild(a),l.setAttribute("id",e),c.appendChild(document.createTextNode(t.name)),p.setAttribute(st,e),l.removeAttribute(T),c.removeAttribute(T),p.removeAttribute(T),s.children.item(0)}createAttachmentEvents(t){const e=h.findOne(`[${st}="${t}"]`);e&&n.on(e,"click",i=>{var o,a;i.preventDefault();const s=(a=(o=i.target)==null?void 0:o.dataset)==null?void 0:a.spiritDismiss;s&&this.removeFromQueue(s)})}appendToList(t){if(!this.listElement)return;this.isMultiple||this.clearFileQueue();const e=this.getUpdatedFileName(t.name),i=this.getAttachmentElement(t,e);i&&(this.fileQueue.set(e,t),this.listElement.appendChild(i),this.createAttachmentEvents(e),this.dragReset())}addToQueue(t){try{n.trigger(this.wrapper,se,{fileQueue:this.fileQueue,currentFile:t}),this.checkAllowedFileType(t),this.checkAllowedFileSize(t),this.checkFileQueueDuplicity(t),this.checkQueueLimit(),this.appendToList(t),this.updateDropZoneVisibility(),this.updateNameAttribute(),n.trigger(this.wrapper,re,{fileQueue:this.fileQueue,currentFile:t})}catch(e){n.trigger(this.wrapper,H,{validationText:e.message})}}removeFromQueue(t){if(this.fileQueue.has(t)){n.trigger(this.wrapper,ne,{fileQueue:this.fileQueue,currentFile:t});const e=h.findOne(`#${t}`);this.fileQueue.delete(t),e==null||e.remove(),this.updateDropZoneVisibility(),this.updateNameAttribute(),this.removeValidationWError(),n.trigger(this.wrapper,oe,{fileQueue:this.fileQueue,currentFile:t})}}getFileFromQueue(t){return this.fileQueue.get(t)}onChange(t){const{target:e}=t,i=e.files?[...e.files]:[];let s=0,o;s+=this.fileQueue.size,i.forEach(a=>{s{e.value="",e.blur()},0)}static onDragOver(t){t.preventDefault()}onDragEnter(){var t;this.isDragging=!0,(t=this.wrapper)==null||t.classList.add(et)}onDragLeave(){this.dragReset()}onDrop(t){var s,o,a;if(t.preventDefault(),this.isDisabled)return;const e=Array.from(((s=t==null?void 0:t.dataTransfer)==null?void 0:s.items)||[]),i=Array.from(((o=t==null?void 0:t.dataTransfer)==null?void 0:o.files)||[]);!this.isMultiple&&(e.length>1||i.length>1),(a=t==null?void 0:t.dataTransfer)!=null&&a.items?e.forEach(l=>{if(l.kind==="file"){const c=l.getAsFile();c&&this.addToQueue(c)}}):i.forEach(l=>{this.addToQueue(l)})}removeValidationWError(){var t;(t=h.findOne(rt,this.wrapper))==null||t.remove(),this.wrapper.classList.remove(it)}onClick(){this.removeValidationWError()}onValidationError(t){this.wrapper.classList.add(it),this.wrapper.append(this.getValidationTextElement(t.validationText))}addEventListeners(){n.on(this.inputElement,"click",this.onClick.bind(this)),n.on(this.inputElement,"change",this.onChange.bind(this)),n.on(this.wrapper,H,this.onValidationError.bind(this)),this.isDragAndDropSupported&&this.dropZone&&(n.on(this.dropZone,"dragover",S.onDragOver.bind(this)),n.on(this.dropZone,"dragenter",this.onDragEnter.bind(this)),n.on(this.dropZone,"dragleave",this.onDragLeave.bind(this)),n.on(this.dropZone,"drop",this.onDrop.bind(this)))}init(){var t;this.addEventListeners(),this.isDragAndDropSupported&&((t=this.wrapper)==null||t.classList.add(ae))}}C(S);const me="modal",nt='[data-spirit-toggle="modal"]';class Ae extends g{constructor(t){super(t),this.isShown=!1,this.isTouchDevice="ontouchstart"in window||navigator.maxTouchPoints>0,this.scrollControl=new mt(t)}static get NAME(){return me}onClick(t){(t.target===this.element||t.target.dataset.spiritDismiss)&&(t.preventDefault(),t.stopPropagation(),(!t.target.dataset.spiritCloseOnBackdropClick||t.target.dataset.spiritCloseOnBackdropClick==="true")&&this.hide(t))}onDialogClose(t){t.defaultPrevented||(this.hide(t),t.preventDefault())}addEventListeners(){n.on(this.element,"close",t=>this.onDialogClose(t)),this.isTouchDevice?n.on(window,"touchstart",t=>this.onClick(t)):n.on(window,"click",t=>this.onClick(t))}removeEventListeners(){n.off(this.element,"close",t=>this.onDialogClose(t)),this.isTouchDevice?n.off(window,"touchstart",t=>this.onClick(t)):n.off(window,"click",t=>this.onClick(t))}show(){var e;if(this.isShown)return;const t=h.findOne(nt,this.element);t==null||t.setAttribute("aria-expanded","true"),(e=this.element)==null||e.showModal(),this.addEventListeners(),this.isShown=!0,this.scrollControl.disableScroll()}hide(t){var s;let e;(s=t==null?void 0:t.target)!=null&&s.dataset?t.target.dataset.spiritTarget?e=h.findOne(t.target.dataset.spiritTarget):e=t.target:e=this.element;const i=h.findOne(nt,this.element);typeof e.close=="function"&&e.close(),i==null||i.setAttribute("aria-expanded","false"),this.removeEventListeners(),this.isShown=!1,this.scrollControl.enableScroll()}toggle(t,e){if(!t){console.warn('👻 Boo…! Target modal pane does not exist. Maybe you forgot to prefix the "data-spirit-target" selector with "#"? ');return}this.isShown?this.hide(e):this.show()}}N(Ae);const Te="offcanvas",Se="offcanvas",I=`.${Se}`,Ne=`show${I}`,Le=`shown${I}`,we=`hide${I}`,_e=`hidden${I}`,De=1280,ot="is-open";class Nt extends g{constructor(t){const e=t;super(e),this.isShown=!1,this.scrollControl=new mt(t)}static get NAME(){return Te}onClick(t){(t.target===this.element||t.target.dataset.spiritDismiss)&&(t.preventDefault(),t.stopPropagation(),this.hide())}onWindowResize(t){t.target.innerWidth>=De&&this.hide()}onDialogClose(t){t.defaultPrevented||(this.hide(),t.preventDefault())}addEventListeners(){n.on(this.element,"close",t=>this.onDialogClose(t)),n.on(window,"resize",t=>this.onWindowResize(t)),n.on(window,"click",t=>this.onClick(t))}removeEventListeners(){n.off(this.element,"close",t=>this.onDialogClose(t)),n.off(window,"resize",t=>this.onWindowResize(t)),n.off(window,"click",t=>this.onClick(t))}show(t){if(this.isShown)return;const e=n.trigger(this.element,Ne,{relatedTarget:t});e!=null&&e.defaultPrevented||(this.element.classList.add(ot),this.element.showModal(),t.setAttribute("aria-expanded","true"),this.element.setAttribute("aria-modal","true"),this.element.setAttribute("role","dialog"),this.addEventListeners(),this.isShown=!0,n.trigger(this.element,Le,{relatedTarget:t}),this.scrollControl.disableScroll())}hide(){if(!this.isShown)return;const t=n.trigger(this.element,we);t!=null&&t.defaultPrevented||(this.element.classList.remove(ot),this.element.close(),this.element.removeAttribute("aria-modal"),this.element.removeAttribute("role"),this.removeEventListeners(),this.isShown=!1,n.trigger(this.element,_e),this.scrollControl.enableScroll())}toggle(t){if(!t){console.warn('👻 Boo…! Target dialog does not exist. Maybe you forgot to prefix the "data-spirit-target" selector with "#"? ');return}this.isShown?this.hide():this.show(t)}}N(Nt);ft(Nt,"hide");const Oe="password",at="aria-pressed",lt="aria-label",ht="input";class Ce extends g{constructor(t){super(t),this.isShown=!1}static get NAME(){return Oe}show(t){var e;t.setAttribute(at,"true"),t.setAttribute(lt,"Hide password"),(e=h.findOne(ht,t.parentElement))==null||e.setAttribute("type","text"),this.isShown=!0}hide(t){var e;t.setAttribute(at,"false"),t.setAttribute(lt,"Show password"),(e=h.findOne(ht,t.parentElement))==null||e.setAttribute("type","password"),this.isShown=!1}toggle(t){this.isShown?this.hide(t):this.show(t)}}N(Ce,"toggle","trigger");const _={LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom"},k={HORIZONTAL:"horizontal",VERTICAL:"vertical"},be="scrollView",ct=50,$e=k.VERTICAL,Ie='[data-spirit-element="viewport"]',Me='[data-spirit-element="content"]',dt="is-scrolled-at-start",ut="is-scrolled-at-end",ve="resize",ye="scroll",Et=1;class Re extends g{constructor(t){var e;super(t),this.getElementsPositionDifference=()=>{const i=this.content.getBoundingClientRect(),s=this.viewport.getBoundingClientRect();return{bottom:i.bottom-s.bottom,left:i.left-s.left,right:i.right-s.right,top:i.top-s.top}},this.handleScrollViewState=()=>{this.currentPosition=this.getElementsPositionDifference();const i=this.currentPosition[this.scrollPositionStart]<=-1*Et,s=this.currentPosition[this.scrollPositionEnd]>=Et;i!==this.isScrolledAtStart&&(this.isScrolledAtStart=i),s!==this.isScrolledAtEnd&&(this.isScrolledAtEnd=s),i?this.element.classList.add(dt):this.element.classList.remove(dt),s?this.element.classList.add(ut):this.element.classList.remove(ut)},this.currentPosition={bottom:0,left:0,right:0,top:0},this.direction=(e=this.element.dataset)!=null&&e.spiritDirection?String(this.element.dataset.spiritDirection):$e,this.content=h.findOne(Me,this.element),this.viewport=h.findOne(Ie,this.element),this.scrollPositionStart=this.direction===k.HORIZONTAL?_.LEFT:_.TOP,this.scrollPositionEnd=this.direction===k.HORIZONTAL?_.RIGHT:_.BOTTOM,this.isScrolledAtStart=!1,this.isScrolledAtEnd=!1,this.init()}static get NAME(){return be}static get DATA_KEY(){return`${this.NAME}`}addEventListeners(){n.on(this.viewport,ye,G(this.handleScrollViewState,ct)),n.on(window,ve,G(this.handleScrollViewState,ct))}init(){this.addEventListeners(),this.handleScrollViewState()}}C(Re);const Lt="tabs",xe="tabs",M=`.${xe}`,Fe=`hide${M}`,Pe=`hidden${M}`,Ve=`show${M}`,He=`shown${M}`,Q="is-selected",Qe='[role="tablist"]',Ue='[role="presentation"]',Be='[role="tab"]',ke=`[data-spirit-toggle="${Lt}"]`,U=`${Be}, ${ke}`;class d extends g{constructor(t){super(t),this.parent=this.element.closest(Qe),this.parent&&d.setInitialAttributes(this.parent,this.getChildren())}static get NAME(){return Lt}show(){const t=this.element;if(d.isElementActive(t))return;const e=this.getActiveElem(),i=e?n.trigger(e,Fe,{relatedTarget:t}):null;n.trigger(t,Ve,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this.deactivate(e,t),this.activate(t,e))}activate(t,e){t&&(t.classList.add(Q),this.activate(y(t)),t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true"),n.trigger(t,He,{relatedTarget:e}))}deactivate(t,e){t&&(t.classList.remove(Q),this.deactivate(y(t)),t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1"),n.trigger(t,Pe,{relatedTarget:e}))}getChildren(){return h.findAll(U,this.parent)}getActiveElem(){return this.getChildren().find(t=>d.isElementActive(t))||null}static setInitialAttributes(t,e){d.setAttributeIfNotExists(t,"role","tablist");for(const i of e)d.setInitialAttributesOnChild(i)}static setInitialAttributesOnChild(t){const e=d.getInnerElement(t),i=d.isElementActive(e),s=d.getOuterElement(e);e==null||e.setAttribute("aria-selected",i.toString()),s!==e&&d.setAttributeIfNotExists(s,"role","presentation"),e&&!i&&e.setAttribute("tabindex","-1"),d.setAttributeIfNotExists(e,"role","tab"),d.setInitialAttributesOnTargetPanel(e)}static setInitialAttributesOnTargetPanel(t){const e=y(t);e&&(d.setAttributeIfNotExists(e,"role","tabpanel"),t!=null&&t.id&&d.setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}static setAttributeIfNotExists(t,e,i){t&&!t.hasAttribute(e)&&t.setAttribute(e,i)}static isElementActive(t){return t!==null&&t.classList.contains(Q)}static getInnerElement(t){return t!=null&&t.matches(U)?t:h.findOne(U,t)}static getOuterElement(t){return(t==null?void 0:t.closest(Ue))||t}}N(d,"show","trigger");const ze="tooltip",Ye="tooltip",v=`.${Ye}`,We=`hide${v}`,Ke=`hidden${v}`,qe=`show${v}`,Ge=`shown${v}`,Ze="is-visible",B="is-hidden";class A extends g{constructor(t){super(t),this.tip=this.getTipElement()}static get NAME(){return ze}toggle(){this.isShown()?this.hide():this.show()}show(){var e,i;if(((i=(e=this.element)==null?void 0:e.style)==null?void 0:i.display)==="none")throw new Error("Please use show on elements without `display: none`");if(!n.trigger(this.element,A.eventName(qe)).defaultPrevented){if(this.element.setAttribute("aria-describedby",this.tip.getAttribute("id")),this.tip.classList.remove(B),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))n.on(s,"mouseover",null);n.trigger(this.element,A.eventName(Ge))}}hide(){if(!(!this.isShown()||n.trigger(this.element,A.eventName(We)).defaultPrevented)){if(this.tip.classList.add(B),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))n.off(e,"mouseover",null);this.element.removeAttribute("aria-describedby"),n.trigger(this.element,A.eventName(Ke))}}isShown(){var t,e;return this.tip&&(((t=this.tip.classList)==null?void 0:t.contains(Ze))||!((e=this.tip.classList)!=null&&e.contains(B)))}getTipElement(){var t,e,i;return this.tip||(this.tip=h.findOne((e=(t=this.element)==null?void 0:t.dataset)==null?void 0:e.spiritTarget)||this.element||((i=this.element)==null?void 0:i.parentElement)),this.tip}}N(A,"toggle");ft(A,"hide");export{S as F,Ae as M,A as T}; diff --git a/docs/assets/spirit-web-entry.f58faee5.js b/docs/assets/spirit-web-entry.bac055be.js similarity index 92% rename from docs/assets/spirit-web-entry.f58faee5.js rename to docs/assets/spirit-web-entry.bac055be.js index 899baf4c40..562af32516 100644 --- a/docs/assets/spirit-web-entry.f58faee5.js +++ b/docs/assets/spirit-web-entry.bac055be.js @@ -1 +1 @@ -import{T as n}from"./spirit-web-chunk.e4c193b4.js";import{autoUpdate as d,computePosition as s,flip as c}from"https://cdn.skypack.dev/@floating-ui/dom@1.5.3";const p=document.getElementById("my-dismissible-tooltip2"),e=new n(p);window.localStorage.getItem("my-tooltip")||e.show();document.getElementById("my-dismissible-button").addEventListener("click",()=>{e.show(),window.localStorage.removeItem("my-tooltip")});document.getElementById("my-dismissible-tooltip2-button").addEventListener("click",()=>{e.hide(),window.localStorage.setItem("my-tooltip",!0)});const o=document.getElementById("my-button"),t=document.getElementById("my-advanced-tooltip");d(o,t,()=>{s(o,t,{placement:"top",middleware:[c()]}).then(({x:i,y:m,placement:l})=>{Object.assign(t.style,{top:`${m}px`,left:`${i}px`}),t.dataset.spiritPlacement=l})}); +import{T as n}from"./spirit-web-chunk.81664e39.js";import{autoUpdate as d,computePosition as s,flip as c}from"https://cdn.skypack.dev/@floating-ui/dom@1.5.3";const p=document.getElementById("my-dismissible-tooltip2"),e=new n(p);window.localStorage.getItem("my-tooltip")||e.show();document.getElementById("my-dismissible-button").addEventListener("click",()=>{e.show(),window.localStorage.removeItem("my-tooltip")});document.getElementById("my-dismissible-tooltip2-button").addEventListener("click",()=>{e.hide(),window.localStorage.setItem("my-tooltip",!0)});const o=document.getElementById("my-button"),t=document.getElementById("my-advanced-tooltip");d(o,t,()=>{s(o,t,{placement:"top",middleware:[c()]}).then(({x:i,y:m,placement:l})=>{Object.assign(t.style,{top:`${m}px`,left:`${i}px`}),t.dataset.spiritPlacement=l})}); diff --git a/docs/assets/spirit-web-entry.3b25e4a6.js b/docs/assets/spirit-web-entry.f55a4183.js similarity index 94% rename from docs/assets/spirit-web-entry.3b25e4a6.js rename to docs/assets/spirit-web-entry.f55a4183.js index b2b5ab1e12..0db42f9fe5 100644 --- a/docs/assets/spirit-web-entry.3b25e4a6.js +++ b/docs/assets/spirit-web-entry.f55a4183.js @@ -1 +1 @@ -import{M as w,F as m}from"./spirit-web-chunk.e4c193b4.js";window.addEventListener("DOMContentLoaded",()=>{let t;const o=document.getElementById("example_image_preview"),r=new w(o),c=o.querySelector("[data-example-content]"),u=o.querySelector('[data-element="cancel"]'),s=document.getElementById("example_customImagePreview"),d=m.getInstance(s),p=e=>e.type.split("/")[0]==="image",g=e=>{if(p(e)){const n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{const i=n.result;localStorage.setItem("image",i),c.innerHTML=`${e.name}`,r.show()}}},F=()=>{d.removeFromQueue(d.getUpdatedFileName(t.name)),f()},f=()=>{r.hide(),c.innerHTML="",t=void 0};u.addEventListener("click",F),s.addEventListener("queuedFile.fileUploader",e=>{t=e.currentFile,g(t)})});const a=document.querySelector("#form-example"),v=document.querySelector("#example-composition"),l=m.createInstance(v);a.addEventListener("submit",t=>{t.preventDefault();const o=new FormData(a);console.log("form element",a),console.log("form data",o),console.log("file queue",l.getFileQueue),setTimeout(()=>{l.clearFileQueue(),console.log("file queue after submit",l.getFileQueue)},250)}); +import{M as w,F as m}from"./spirit-web-chunk.81664e39.js";window.addEventListener("DOMContentLoaded",()=>{let t;const o=document.getElementById("example_image_preview"),r=new w(o),c=o.querySelector("[data-example-content]"),u=o.querySelector('[data-element="cancel"]'),s=document.getElementById("example_customImagePreview"),d=m.getInstance(s),p=e=>e.type.split("/")[0]==="image",g=e=>{if(p(e)){const n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{const i=n.result;localStorage.setItem("image",i),c.innerHTML=`${e.name}`,r.show()}}},F=()=>{d.removeFromQueue(d.getUpdatedFileName(t.name)),f()},f=()=>{r.hide(),c.innerHTML="",t=void 0};u.addEventListener("click",F),s.addEventListener("queuedFile.fileUploader",e=>{t=e.currentFile,g(t)})});const a=document.querySelector("#form-example"),v=document.querySelector("#example-composition"),l=m.createInstance(v);a.addEventListener("submit",t=>{t.preventDefault();const o=new FormData(a);console.log("form element",a),console.log("form data",o),console.log("file queue",l.getFileQueue),setTimeout(()=>{l.clearFileQueue(),console.log("file queue after submit",l.getFileQueue)},250)}); diff --git a/docs/index.html b/docs/index.html index a55f370509..3a41d2075d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/icons/index.html b/docs/src/icons/index.html index 773ae5d860..c37ec85550 100644 --- a/docs/src/icons/index.html +++ b/docs/src/icons/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Accordion/index.html b/docs/src/scss/components/Accordion/index.html index 6c20bd3345..d86108c4df 100644 --- a/docs/src/scss/components/Accordion/index.html +++ b/docs/src/scss/components/Accordion/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Alert/index.html b/docs/src/scss/components/Alert/index.html index 29df811edc..cda60b84c6 100644 --- a/docs/src/scss/components/Alert/index.html +++ b/docs/src/scss/components/Alert/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Breadcrumbs/index.html b/docs/src/scss/components/Breadcrumbs/index.html index 4bc8311349..7a79da56b4 100644 --- a/docs/src/scss/components/Breadcrumbs/index.html +++ b/docs/src/scss/components/Breadcrumbs/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Button/index.html b/docs/src/scss/components/Button/index.html index 6b9cef37a6..0798d89af8 100644 --- a/docs/src/scss/components/Button/index.html +++ b/docs/src/scss/components/Button/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Checkbox/index.html b/docs/src/scss/components/Checkbox/index.html index 89caeeef78..b7b7b68f9b 100644 --- a/docs/src/scss/components/Checkbox/index.html +++ b/docs/src/scss/components/Checkbox/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Collapse/index.html b/docs/src/scss/components/Collapse/index.html index 4c77ba5d84..f6f21216b8 100644 --- a/docs/src/scss/components/Collapse/index.html +++ b/docs/src/scss/components/Collapse/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Container/index.html b/docs/src/scss/components/Container/index.html index c60b9fd324..3b8556c168 100644 --- a/docs/src/scss/components/Container/index.html +++ b/docs/src/scss/components/Container/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Dropdown/index.html b/docs/src/scss/components/Dropdown/index.html index 817339d2c2..fadba28dee 100644 --- a/docs/src/scss/components/Dropdown/index.html +++ b/docs/src/scss/components/Dropdown/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/FieldGroup/index.html b/docs/src/scss/components/FieldGroup/index.html index 6016e8f7de..e2bf9ae1f4 100644 --- a/docs/src/scss/components/FieldGroup/index.html +++ b/docs/src/scss/components/FieldGroup/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/FileUploader/index.html b/docs/src/scss/components/FileUploader/index.html index 50995fa6e9..0e36e715fc 100644 --- a/docs/src/scss/components/FileUploader/index.html +++ b/docs/src/scss/components/FileUploader/index.html @@ -18,8 +18,8 @@ - - + + diff --git a/docs/src/scss/components/Grid/index.html b/docs/src/scss/components/Grid/index.html index abf22e85f7..941df927fe 100644 --- a/docs/src/scss/components/Grid/index.html +++ b/docs/src/scss/components/Grid/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Header/index.html b/docs/src/scss/components/Header/index.html index 4b4f9910f8..8f8cd8e67e 100644 --- a/docs/src/scss/components/Header/index.html +++ b/docs/src/scss/components/Header/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Item/index.html b/docs/src/scss/components/Item/index.html index 2cd5487ba4..5d56cedcdd 100644 --- a/docs/src/scss/components/Item/index.html +++ b/docs/src/scss/components/Item/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Modal/index.html b/docs/src/scss/components/Modal/index.html index 2b3be169c5..bba55eb346 100644 --- a/docs/src/scss/components/Modal/index.html +++ b/docs/src/scss/components/Modal/index.html @@ -18,7 +18,7 @@ - + @@ -715,6 +715,80 @@

Stacked Modal +
+

Disabled Backdrop Click

+ +
+ + + + + +
+ +
+

Modal Title

+ +
+ +
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam at excepturi laudantium magnam mollitia + perferendis reprehenderit, voluptate. Cum delectus dicta ducimus eligendi excepturi natus perferendis + provident unde. Eveniet, iste, molestiae? +

+
+ +
+
+ + +
+
+ +
+ +
+ +
+ +
+ diff --git a/docs/src/scss/components/Pagination/index.html b/docs/src/scss/components/Pagination/index.html index 81bffa9701..6827c0673d 100644 --- a/docs/src/scss/components/Pagination/index.html +++ b/docs/src/scss/components/Pagination/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Pill/index.html b/docs/src/scss/components/Pill/index.html index d33f2b6689..2406632f67 100644 --- a/docs/src/scss/components/Pill/index.html +++ b/docs/src/scss/components/Pill/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Radio/index.html b/docs/src/scss/components/Radio/index.html index a901fcecca..497a1aff55 100644 --- a/docs/src/scss/components/Radio/index.html +++ b/docs/src/scss/components/Radio/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/ScrollView/index.html b/docs/src/scss/components/ScrollView/index.html index 85712cfeed..88609ca8ec 100644 --- a/docs/src/scss/components/ScrollView/index.html +++ b/docs/src/scss/components/ScrollView/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Select/index.html b/docs/src/scss/components/Select/index.html index 6c30449884..1643c3ffad 100644 --- a/docs/src/scss/components/Select/index.html +++ b/docs/src/scss/components/Select/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Spinner/index.html b/docs/src/scss/components/Spinner/index.html index 0c91f47a60..9f256964c9 100644 --- a/docs/src/scss/components/Spinner/index.html +++ b/docs/src/scss/components/Spinner/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Stack/index.html b/docs/src/scss/components/Stack/index.html index 8422e8a5ce..31aa451dd1 100644 --- a/docs/src/scss/components/Stack/index.html +++ b/docs/src/scss/components/Stack/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Tabs/index.html b/docs/src/scss/components/Tabs/index.html index 99ffe5b8bf..6635ab580e 100644 --- a/docs/src/scss/components/Tabs/index.html +++ b/docs/src/scss/components/Tabs/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Tag/index.html b/docs/src/scss/components/Tag/index.html index 5156dd6add..2cbbeb722d 100644 --- a/docs/src/scss/components/Tag/index.html +++ b/docs/src/scss/components/Tag/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/TextArea/index.html b/docs/src/scss/components/TextArea/index.html index 595acf9c59..72382a1d82 100644 --- a/docs/src/scss/components/TextArea/index.html +++ b/docs/src/scss/components/TextArea/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/TextField/index.html b/docs/src/scss/components/TextField/index.html index 8ad9c2b4e7..6e7a6669f9 100644 --- a/docs/src/scss/components/TextField/index.html +++ b/docs/src/scss/components/TextField/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/components/Tooltip/index.html b/docs/src/scss/components/Tooltip/index.html index 62dcb4c1aa..2a3e506691 100644 --- a/docs/src/scss/components/Tooltip/index.html +++ b/docs/src/scss/components/Tooltip/index.html @@ -18,8 +18,8 @@ - - + + diff --git a/docs/src/scss/helpers/accessibility/index.html b/docs/src/scss/helpers/accessibility/index.html index db11f7dd0f..3a11d11e7a 100644 --- a/docs/src/scss/helpers/accessibility/index.html +++ b/docs/src/scss/helpers/accessibility/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/animations/index.html b/docs/src/scss/helpers/animations/index.html index 46998e6550..cb8f152f47 100644 --- a/docs/src/scss/helpers/animations/index.html +++ b/docs/src/scss/helpers/animations/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/breakout/index.html b/docs/src/scss/helpers/breakout/index.html index 628819a7ce..4c1d2f26b1 100644 --- a/docs/src/scss/helpers/breakout/index.html +++ b/docs/src/scss/helpers/breakout/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/images/index.html b/docs/src/scss/helpers/images/index.html index cdfc9bee85..d3f1120f25 100644 --- a/docs/src/scss/helpers/images/index.html +++ b/docs/src/scss/helpers/images/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/index.html b/docs/src/scss/helpers/index.html index a88baad704..182c412484 100644 --- a/docs/src/scss/helpers/index.html +++ b/docs/src/scss/helpers/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/links/index.html b/docs/src/scss/helpers/links/index.html index a91b8f4f4b..4d4cf63521 100644 --- a/docs/src/scss/helpers/links/index.html +++ b/docs/src/scss/helpers/links/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/lists/index.html b/docs/src/scss/helpers/lists/index.html index ba4666d3b8..9d9374cc98 100644 --- a/docs/src/scss/helpers/lists/index.html +++ b/docs/src/scss/helpers/lists/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/scroll-control/index.html b/docs/src/scss/helpers/scroll-control/index.html index 9952a2c8b8..32a974d012 100644 --- a/docs/src/scss/helpers/scroll-control/index.html +++ b/docs/src/scss/helpers/scroll-control/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/text/index.html b/docs/src/scss/helpers/text/index.html index b567c91e7a..dc877ae069 100644 --- a/docs/src/scss/helpers/text/index.html +++ b/docs/src/scss/helpers/text/index.html @@ -18,7 +18,7 @@ - + diff --git a/docs/src/scss/helpers/typography/index.html b/docs/src/scss/helpers/typography/index.html index 4d76573524..cb670acec4 100644 --- a/docs/src/scss/helpers/typography/index.html +++ b/docs/src/scss/helpers/typography/index.html @@ -18,7 +18,7 @@ - +