@aquera/nile-elements 1.1.1-beta-1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,6 +79,10 @@ To run a local development server that serves the basic demo located in `demo/in
79
79
 
80
80
  In this section, you can find the updates for each release of `nile-elements`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
81
81
 
82
+ #### Version 1.1.1
83
+ - Nile Stepper: Added manual property for UIF-978
84
+ - Nile Code Editor: Style update for UIF-980
85
+
82
86
  #### Version 1.1.0
83
87
  - Nile Stepper, Checkbox, Input, Code Editor changes added
84
88
 
package/dist/index.js CHANGED
@@ -10467,7 +10467,7 @@ class wi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
10467
10467
  .stepper__content__subtitle--active{
10468
10468
  color:var(--nile-colors-primary-600, var(--ng-colors-text-brand-tertiary-600));
10469
10469
  }
10470
- `;let GL=class extends Pe{constructor(){super(...arguments),this.title="",this.subtitle="",this.contentBelow=!1,this.size="lg",this.icon="tick",this.isFirst=!1,this.isLast=!1,this.isComplete=!1,this.isCurrent=!1,this.haveFlex=!0}static get styles(){return[RL]}render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");const e=this.isCurrent,t=this.isComplete;let M=!1;(t&&!e||this.completedStepValue==this.value)&&(M=!0);let i=!1;return t&&(i=!0,this.calculatedCompletedStepValue==this.value&&(i=!1)),"sm"==this.size||this.size,R`
10470
+ `;let GL=class extends Pe{constructor(){super(...arguments),this.title="",this.subtitle="",this.completed=!1,this.current=!1,this.contentBelow=!1,this.size="lg",this.icon="tick",this.isFirst=!1,this.isLast=!1,this.isComplete=!1,this.isCurrent=!1,this.isManualMode=!1,this.haveFlex=!0}static get styles(){return[RL]}render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");const e=this.isManualMode?this.current:this.isCurrent,t=this.isManualMode?this.completed:this.isComplete;let M=!1;(t&&!e||this.completedStepValue==this.value)&&(M=!0);let i=!1;return t&&(i=!0,this.calculatedCompletedStepValue==this.value&&(i=!1)),"sm"==this.size||this.size,R`
10471
10471
  <div
10472
10472
  part="item"
10473
10473
  class="${Le({stepper__item:!0,"stepper__item--selected":e,"stepper__item--default":!e,"stepper__item--sm":"sm"==this.size,"stepper__item--lg":"lg"==this.size})}">
@@ -10488,7 +10488,7 @@ class wi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
10488
10488
  <svg width="${e}" height="${e}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
10489
10489
  <path fill-rule="evenodd" clip-rule="evenodd" d="M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z" fill="white"/>
10490
10490
  </svg>
10491
- `}};e([ue({attribute:!0,reflect:!0})],GL.prototype,"title",void 0),e([ue({attribute:!0,reflect:!0})],GL.prototype,"subtitle",void 0),e([ce()],GL.prototype,"contentBelow",void 0),e([ce()],GL.prototype,"size",void 0),e([ce()],GL.prototype,"icon",void 0),e([ce()],GL.prototype,"isFirst",void 0),e([ce()],GL.prototype,"isLast",void 0),e([ce()],GL.prototype,"isComplete",void 0),e([ce()],GL.prototype,"isCurrent",void 0),e([ce()],GL.prototype,"currentStepValue",void 0),e([ce()],GL.prototype,"completedStepValue",void 0),e([ce()],GL.prototype,"calculatedCompletedStepValue",void 0),e([ce()],GL.prototype,"value",void 0),e([ce()],GL.prototype,"haveFlex",void 0),GL=e([le("nile-vertical-stepper-item")],GL);const BL=r`
10491
+ `}};e([ue({attribute:!0,reflect:!0})],GL.prototype,"title",void 0),e([ue({attribute:!0,reflect:!0})],GL.prototype,"subtitle",void 0),e([ue({attribute:!0,reflect:!0})],GL.prototype,"completed",void 0),e([ue({attribute:!0,reflect:!0})],GL.prototype,"current",void 0),e([ce()],GL.prototype,"contentBelow",void 0),e([ce()],GL.prototype,"size",void 0),e([ce()],GL.prototype,"icon",void 0),e([ce()],GL.prototype,"isFirst",void 0),e([ce()],GL.prototype,"isLast",void 0),e([ce()],GL.prototype,"isComplete",void 0),e([ce()],GL.prototype,"isCurrent",void 0),e([ce()],GL.prototype,"isManualMode",void 0),e([ce()],GL.prototype,"currentStepValue",void 0),e([ce()],GL.prototype,"completedStepValue",void 0),e([ce()],GL.prototype,"calculatedCompletedStepValue",void 0),e([ce()],GL.prototype,"value",void 0),e([ce()],GL.prototype,"haveFlex",void 0),GL=e([le("nile-vertical-stepper-item")],GL);const BL=r`
10492
10492
  :host {
10493
10493
  -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
10494
10494
  -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
@@ -14227,7 +14227,7 @@ nile-rte-toolbar-item nile-button[data-active]::part(base):hover {
14227
14227
 
14228
14228
 
14229
14229
 
14230
- `,NS={bold:"format_bold",italic:"format_italic",underline:"format_underline",link:"link_2",left:"format_align_left",center:"format_align_middle",right:"format_align_right",justify:"format_align_justify",ul:"format_list_bulleted",ol:"format_list_numbered",clear:"format_clear"};let sS=class extends se{constructor(){super(...arguments),this.value="",this.singleLineEditor=!1,this.mentions={},this.content="",this.previewEl=null,this.toolbarEl=null,this.lastRange=null,this.buttonMap=new Map,this.headingSelect=null,this.fontSelect=null,this.colorInput=null,this.bgColorInput=null,this.colorSwatchEl=null,this.bgSwatchEl=null,this.containerEl=null,this.mentionsEl=null,this.onEditorKeydown=e=>{if(this.singleLineEditor&&"Enter"===e.key&&e.shiftKey)return void e.preventDefault();if(e.ctrlKey&&"i"===e.key.toLowerCase()&&(e.preventDefault(),Kp(this.editorEl,"em"),this.updateContent(),this.updateToolbarState()),this.singleLineEditor&&"Enter"===e.key)return void e.preventDefault();if("Tab"!==e.key)return;e.preventDefault(),this.focusAndRestore();const t=window.getSelection();if(!t||0===t.rangeCount)return;const M=t.getRangeAt(0);if(e.shiftKey){if(M.collapsed&&M.startContainer.nodeType===Node.TEXT_NODE){const e=M.startContainer,i=M.startOffset,n=e.data.slice(0,i),o=n.replace(/(\t|[ \u00a0]{2})$/,"");if(o.length!==n.length){e.data=o+e.data.slice(i);const M=document.createRange();M.setStart(e,o.length),M.collapse(!0),t.removeAllRanges(),t.addRange(M),this.updateContent(),this.updateToolbarState()}}return}M.deleteContents();const i=document.createTextNode("\t");M.insertNode(i);const n=document.createRange();n.setStartAfter(i),n.collapse(!0),t.removeAllRanges(),t.addRange(n),this.updateContent(),this.updateToolbarState()},this.onSelectionChange=()=>{if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);this.editorEl.contains(t.commonAncestorContainer)&&(this.lastRange=t.cloneRange(),this.updateToolbarState())}}createRenderRoot(){return this}injectCss(e){if(this.querySelector("style[data-rte-style]"))return;const t=document.createElement("style");t.setAttribute("data-rte-style","true"),t.textContent=e,this.insertBefore(t,this.firstChild)}connectedCallback(){super.connectedCallback(),this.injectCss(rS.cssText),this.ensureStructure(),this.value&&!this.editorEl.innerHTML.trim()&&(this.editorEl.innerHTML=this.value),this.content=this.editorEl.innerHTML,this.toolbarEl&&this.wireAuthoredToolbar(this.toolbarEl),this.mentionsEl=this.querySelector("nile-rte-mentions"),this.mentionsEl&&(this.mentionsEl.attach?.(this.editorEl,this),this.mentionsEl.setExternalConfig?.(this.mentions)),this.wireEditor(),document.addEventListener("selectionchange",this.onSelectionChange,{passive:!0}),this.updateToolbarState(),this.syncPreview()}ensureStructure(){this.toolbarEl=this.querySelector("nile-rte-toolbar"),this.previewEl=this.querySelector("nile-rte-preview"),this.containerEl=this.querySelector(".rte-container"),this.containerEl||(this.containerEl=document.createElement("div"),this.containerEl.className="rte-container",this.appendChild(this.containerEl)),this.ensureEditor(),this.toolbarEl&&this.toolbarEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.toolbarEl),this.editorEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.editorEl),this.previewEl&&(this.previewEl.parentElement!==this&&this.appendChild(this.previewEl),this.previewEl.previousElementSibling!==this.containerEl&&this.insertBefore(this.previewEl,this.containerEl.nextSibling))}updateContentWithMention(e){this.updateContent(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content,mention:e},bubbles:!0,composed:!0}))}disconnectedCallback(){document.removeEventListener("selectionchange",this.onSelectionChange),this.mentionsEl&&this.mentionsEl.detach&&this.mentionsEl.detach(),super.disconnectedCallback()}updated(e){e.has("value")&&this.editorEl&&this.value!==this.editorEl.innerHTML&&(this.editorEl.innerHTML=this.value||"<p><br></p>",this.content=this.editorEl.innerHTML,this.syncPreview()),e.has("singleLineEditor")&&(this.editorEl&&this.editorEl.classList.toggle("single-line",this.singleLineEditor),this.previewEl&&this.previewEl.classList.toggle("single-line",this.singleLineEditor))}ensureEditor(){if(this.editorEl=this.querySelector(".editor"),!this.editorEl){const e=document.createElement("article");e.className="editor",e.setAttribute("contenteditable","true"),this.editorEl=e}this.editorEl.innerHTML.trim()||(this.editorEl.innerHTML="<p><br></p>")}unwrapMention(e,t=!0){const M=e.parentNode;if(!M)return;const i=t?(e.textContent??"").replace(/\u200B/g,""):"",n=document.createTextNode(i);M.insertBefore(n,e),M.removeChild(e);const o=document.createRange();o.setStartAfter(n),o.collapse(!0);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}scrubBrokenMentions(){if(!this.editorEl)return;this.editorEl.querySelectorAll("span.mention").forEach((e=>{const t=e,M=t.getAttribute("data-mention-key"),i=t.getAttribute("data-mention-label"),n=t.getAttribute("data-mention-trigger")||"",o=(t.textContent??"").replace(/\u200B/g,"").trim(),r=!!M&&!!i&&o.length>0&&o.startsWith(n)&&o.includes(i);o&&r||this.unwrapMention(t,!0)}))}wireEditor(){this.editorEl.addEventListener("input",(()=>{this.ensureAtLeastOneParagraph(),this.scrubBrokenMentions(),this.updateContent(),this.updateToolbarState()})),this.editorEl.addEventListener("mouseup",(()=>{this.saveSelection(),this.updateToolbarState()})),this.editorEl.addEventListener("keyup",(e=>{this.saveSelection(),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)&&this.updateToolbarState()})),this.editorEl.addEventListener("keydown",this.onEditorKeydown)}wireAuthoredToolbar(e){this.buttonMap.clear(),this.headingSelect=null,this.fontSelect=null,this.colorInput=null,Array.from(e.children).forEach((e=>{const t=e.tagName.toLowerCase();if("nile-rte-select"!==t||"align"!==e.getAttribute("type")){if("nile-rte-link"===t)return e.editorEl=this.editorEl,void e.addEventListener("link-changed",(()=>{this.updateContent(),this.updateToolbarState()}));if("nile-rte-toolbar-item"===t){let t=e.querySelector(":scope > nile-button");const M=e.getAttribute("name")||"",i=e.getAttribute("label")||M,n=e.getAttribute("icon"),o=e.innerHTML.trim().length>0;if(t||(t=document.createElement("nile-button"),t.variant="tertiary",t.size="small"),n)t.innerHTML=`<nile-icon name="${n}" aria-label="${i}"></nile-icon>`,e.innerHTML="";else if(o)t.innerHTML=e.innerHTML,e.innerHTML="";else{const n=NS[M];n?t.innerHTML=`<nile-icon name="${n}" size="20" color="black" aria-label="${i}"></nile-icon>`:t.textContent=i||M,e.innerHTML=""}if(!t.isConnected){const M=document.createElement("nile-tooltip");M.setAttribute("content",i),M.appendChild(t),e.appendChild(M)}t.setAttribute("aria-label",i),t.addEventListener("mousedown",(e=>e.preventDefault())),t.addEventListener("click",(()=>this.onToolbarCommand(M)));const r=this.buttonMap.get(M)??[];return r.push(t),void this.buttonMap.set(M,r)}if("nile-rte-select"!==t)"nile-rte-color"!==t||e.addEventListener("change",(e=>{this.focusAndRestore();const{mode:t,value:M}=e.detail;"backColor"===t?MS(this.editorEl,"backgroundColor",M,"data-rte-bg"):function(e,t){MS(e,"color",t,"data-rte-color")}(this.editorEl,M),this.updateContent(),this.updateToolbarState()}));else{const t=e.getAttribute("type")||"";e.addEventListener("change",(e=>{this.focusAndRestore();const M=e.detail;"heading"===t?function(e,t){const M=document.getSelection();if(!M||0===M.rangeCount)return;const i=Jp(M.getRangeAt(0).startContainer,e);if(!i)return;if(i.tagName.toLowerCase()===t)return;const n=document.createElement(t);for(;i.firstChild;)n.appendChild(i.firstChild);i.replaceWith(n);const o=document.createRange();o.selectNodeContents(n),o.collapse(!0),M.removeAllRanges(),M.addRange(o)}(this.editorEl,M):"font"===t&&function(e,t){const M=document.getSelection();if(!M||0===M.rangeCount)return;const i=M.getRangeAt(0);if(i.collapsed){const e=document.createElement("span");e.style.fontFamily=t,e.appendChild(document.createTextNode("​")),i.insertNode(e);const n=document.createRange();return n.setStart(e.firstChild,1),n.collapse(!0),M.removeAllRanges(),void M.addRange(n)}$p(i,"span",{style:`font-family:${t}`})}(this.editorEl,M),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;eS(this.editorEl,t),this.updateContent(),this.updateToolbarState()}))}))}saveSelection(){const e=window.getSelection();e&&e.rangeCount&&(this.lastRange=e.getRangeAt(0).cloneRange())}restoreSelection(){if(!this.lastRange)return;const e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(this.lastRange))}focusAndRestore(){this.editorEl?.focus(),this.restoreSelection()}insertList(e){if(this.restoreSelection(),!this.lastRange)return;const t=document.createElement(e),M=this.lastRange.extractContents(),i=document.createElement("div");i.appendChild(M),Array.from(i.childNodes).forEach((e=>{if(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())return;const M=document.createElement("li");M.appendChild(e),t.appendChild(M)})),this.lastRange.insertNode(t),this.afterListEdit(t)}afterListEdit(e){const t=document.createRange();t.setStartAfter(e),t.collapse(!0);const M=window.getSelection();M?.removeAllRanges(),M?.addRange(t),this.saveSelection(),this.updateContent(),this.updateToolbarState()}ensureAtLeastOneParagraph(){const e=this.editorEl;if(!e)return;const t=""===(e.textContent??"").replace(/\u200B/g,"").trim();if(0===e.childNodes.length||t)return void(e.innerHTML="<p><br></p>");if(!e.querySelector("p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre")){const t=document.createElement("p");for(;e.firstChild;)t.appendChild(e.firstChild);return t.hasChildNodes()||t.appendChild(document.createElement("br")),void e.appendChild(t)}e.querySelectorAll("p").forEach((e=>{""===(e.textContent??"").replace(/\u200B/g,"")&&(e.innerHTML.toLowerCase().includes("<br")||(e.innerHTML="<br>"))}))}onToolbarCommand(e){switch(this.focusAndRestore(),e){case"bold":Kp(this.editorEl,"strong");break;case"italic":Kp(this.editorEl,"em");break;case"underline":Kp(this.editorEl,"u");break;case"left":eS(this.editorEl,"left");break;case"center":eS(this.editorEl,"center");break;case"right":eS(this.editorEl,"right");break;case"justify":eS(this.editorEl,"justify");break;case"ul":oS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":oS(this.editorEl,"ol"),this.updateContent(),this.updateToolbarState();break;case"link":break;case"clear":const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),t=[];for(;e.nextNode();){const M=e.currentNode;M.removeAttribute("style"),["B","STRONG","I","EM","U","SPAN","FONT"].includes(M.tagName)&&t.push(M)}for(const e of t){for(;e.firstChild;)e.parentNode?.insertBefore(e.firstChild,e);e.remove()}this.ensureAtLeastOneParagraph()}this.updateContent(),this.updateToolbarState()}setBtnActive(e,t){const M=this.buttonMap.get(e);if(M)for(const e of M)e.toggleAttribute("data-active",!!t)}updateToolbarState(){if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);if(!this.editorEl.contains(t.commonAncestorContainer))return;const M=function(e){for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e}(t.startContainer)||this.editorEl,i=getComputedStyle(M),n=Jp(t.startContainer,this.editorEl)||this.editorEl,o=(()=>{let e=M;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("strong"===t||"b"===t)return!0;const M=getComputedStyle(e).fontWeight;if(parseInt(M,10)>=600)return!0}e=e.parentNode}return!1})(),r=(()=>{let e=M;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("em"===t||"i"===t)return!0;if("italic"===getComputedStyle(e).fontStyle)return!0}e=e.parentNode}return!1})(),N=(()=>{let e=M;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=getComputedStyle(e).textDecorationLine;if(t&&t.includes("underline"))return!0;if("u"===e.tagName.toLowerCase())return!0}e=e.parentNode}return!1})(),s=!!M.closest("a"),a=n.style.textAlign||getComputedStyle(n).textAlign||"start",l="start"===a?"left":a,g=!!M.closest("li")&&M.closest("ul,ol")?.tagName.toLowerCase()||"";if(this.setBtnActive("bold",o),this.setBtnActive("italic",r),this.setBtnActive("underline",N),this.setBtnActive("link",s),this.setBtnActive("left","left"===l&&!["center","right","justify"].includes(l)),this.setBtnActive("center","center"===l),this.setBtnActive("right","right"===l),this.setBtnActive("justify","justify"===l),this.setBtnActive("ul","ul"===g),this.setBtnActive("ol","ol"===g),this.headingSelect){const e=n.tagName.toLowerCase(),t=["h1","h2","h3"].includes(e)?e:"p";this.headingSelect.value!==t&&(this.headingSelect.value=t)}if(this.fontSelect){const e=(i.fontFamily||"").replace(/["']/g,"").split(",")[0].trim().toLowerCase();if(e)for(const t of Array.from(this.fontSelect.options))if(t.value.toLowerCase()===e){this.fontSelect.value=t.value;break}}if(this.colorInput){const e=Hp(i.color);e&&this.colorInput.value.toLowerCase()!==e.toLowerCase()&&(this.colorInput.value=e),this.colorSwatchEl&&(this.colorSwatchEl.style.backgroundColor=this.colorInput.value)}if(this.bgColorInput){const e=getComputedStyle(M).backgroundColor;if(e&&!/transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e)){const t=Hp(e);t&&this.bgColorInput.value.toLowerCase()!==t.toLowerCase()&&(this.bgColorInput.value=t)}this.bgSwatchEl&&(this.bgSwatchEl.style.backgroundColor=this.bgColorInput.value)}}syncPreview(){this.updateContent()}updateContent(){if(!this.editorEl)return;this.ensureAtLeastOneParagraph();const e=this.editorEl.cloneNode(!0),t=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),M=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),i=["font-weight","font-style","text-decoration","color","background-color","font-size","font-family","text-align","line-height","letter-spacing","white-space","vertical-align","list-style-position","padding-inline-start"];for(;t.nextNode()&&M.nextNode();){const e=t.currentNode,n=M.currentNode,o=window.getComputedStyle(e),r=i.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}this.content=e.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([ue({type:String,attribute:!0,reflect:!0})],sS.prototype,"value",void 0),e([ue({type:Boolean,attribute:"singlelineeditor",reflect:!0})],sS.prototype,"singleLineEditor",void 0),e([ue({attribute:"mentions",reflect:!0,converter:{fromAttribute:e=>{try{const t=JSON.parse(e),M={};for(const e of Object.keys(t)){const i=t[e];Array.isArray(i)&&(M[e]=i.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}return M}catch{return{}}},toAttribute:e=>JSON.stringify(e)}})],sS.prototype,"mentions",void 0),e([ce()],sS.prototype,"content",void 0),sS=e([le("nile-rich-text-editor")],sS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.1.1-beta-1.0"',window.nileVersion="__NILE_VERSION__")
14230
+ `,NS={bold:"format_bold",italic:"format_italic",underline:"format_underline",link:"link_2",left:"format_align_left",center:"format_align_middle",right:"format_align_right",justify:"format_align_justify",ul:"format_list_bulleted",ol:"format_list_numbered",clear:"format_clear"};let sS=class extends se{constructor(){super(...arguments),this.value="",this.singleLineEditor=!1,this.mentions={},this.content="",this.previewEl=null,this.toolbarEl=null,this.lastRange=null,this.buttonMap=new Map,this.headingSelect=null,this.fontSelect=null,this.colorInput=null,this.bgColorInput=null,this.colorSwatchEl=null,this.bgSwatchEl=null,this.containerEl=null,this.mentionsEl=null,this.onEditorKeydown=e=>{if(this.singleLineEditor&&"Enter"===e.key&&e.shiftKey)return void e.preventDefault();if(e.ctrlKey&&"i"===e.key.toLowerCase()&&(e.preventDefault(),Kp(this.editorEl,"em"),this.updateContent(),this.updateToolbarState()),this.singleLineEditor&&"Enter"===e.key)return void e.preventDefault();if("Tab"!==e.key)return;e.preventDefault(),this.focusAndRestore();const t=window.getSelection();if(!t||0===t.rangeCount)return;const M=t.getRangeAt(0);if(e.shiftKey){if(M.collapsed&&M.startContainer.nodeType===Node.TEXT_NODE){const e=M.startContainer,i=M.startOffset,n=e.data.slice(0,i),o=n.replace(/(\t|[ \u00a0]{2})$/,"");if(o.length!==n.length){e.data=o+e.data.slice(i);const M=document.createRange();M.setStart(e,o.length),M.collapse(!0),t.removeAllRanges(),t.addRange(M),this.updateContent(),this.updateToolbarState()}}return}M.deleteContents();const i=document.createTextNode("\t");M.insertNode(i);const n=document.createRange();n.setStartAfter(i),n.collapse(!0),t.removeAllRanges(),t.addRange(n),this.updateContent(),this.updateToolbarState()},this.onSelectionChange=()=>{if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);this.editorEl.contains(t.commonAncestorContainer)&&(this.lastRange=t.cloneRange(),this.updateToolbarState())}}createRenderRoot(){return this}injectCss(e){if(this.querySelector("style[data-rte-style]"))return;const t=document.createElement("style");t.setAttribute("data-rte-style","true"),t.textContent=e,this.insertBefore(t,this.firstChild)}connectedCallback(){super.connectedCallback(),this.injectCss(rS.cssText),this.ensureStructure(),this.value&&!this.editorEl.innerHTML.trim()&&(this.editorEl.innerHTML=this.value),this.content=this.editorEl.innerHTML,this.toolbarEl&&this.wireAuthoredToolbar(this.toolbarEl),this.mentionsEl=this.querySelector("nile-rte-mentions"),this.mentionsEl&&(this.mentionsEl.attach?.(this.editorEl,this),this.mentionsEl.setExternalConfig?.(this.mentions)),this.wireEditor(),document.addEventListener("selectionchange",this.onSelectionChange,{passive:!0}),this.updateToolbarState(),this.syncPreview()}ensureStructure(){this.toolbarEl=this.querySelector("nile-rte-toolbar"),this.previewEl=this.querySelector("nile-rte-preview"),this.containerEl=this.querySelector(".rte-container"),this.containerEl||(this.containerEl=document.createElement("div"),this.containerEl.className="rte-container",this.appendChild(this.containerEl)),this.ensureEditor(),this.toolbarEl&&this.toolbarEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.toolbarEl),this.editorEl.parentElement!==this.containerEl&&this.containerEl.appendChild(this.editorEl),this.previewEl&&(this.previewEl.parentElement!==this&&this.appendChild(this.previewEl),this.previewEl.previousElementSibling!==this.containerEl&&this.insertBefore(this.previewEl,this.containerEl.nextSibling))}updateContentWithMention(e){this.updateContent(),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content,mention:e},bubbles:!0,composed:!0}))}disconnectedCallback(){document.removeEventListener("selectionchange",this.onSelectionChange),this.mentionsEl&&this.mentionsEl.detach&&this.mentionsEl.detach(),super.disconnectedCallback()}updated(e){e.has("value")&&this.editorEl&&this.value!==this.editorEl.innerHTML&&(this.editorEl.innerHTML=this.value||"<p><br></p>",this.content=this.editorEl.innerHTML,this.syncPreview()),e.has("singleLineEditor")&&(this.editorEl&&this.editorEl.classList.toggle("single-line",this.singleLineEditor),this.previewEl&&this.previewEl.classList.toggle("single-line",this.singleLineEditor))}ensureEditor(){if(this.editorEl=this.querySelector(".editor"),!this.editorEl){const e=document.createElement("article");e.className="editor",e.setAttribute("contenteditable","true"),this.editorEl=e}this.editorEl.innerHTML.trim()||(this.editorEl.innerHTML="<p><br></p>")}unwrapMention(e,t=!0){const M=e.parentNode;if(!M)return;const i=t?(e.textContent??"").replace(/\u200B/g,""):"",n=document.createTextNode(i);M.insertBefore(n,e),M.removeChild(e);const o=document.createRange();o.setStartAfter(n),o.collapse(!0);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}scrubBrokenMentions(){if(!this.editorEl)return;this.editorEl.querySelectorAll("span.mention").forEach((e=>{const t=e,M=t.getAttribute("data-mention-key"),i=t.getAttribute("data-mention-label"),n=t.getAttribute("data-mention-trigger")||"",o=(t.textContent??"").replace(/\u200B/g,"").trim(),r=!!M&&!!i&&o.length>0&&o.startsWith(n)&&o.includes(i);o&&r||this.unwrapMention(t,!0)}))}wireEditor(){this.editorEl.addEventListener("input",(()=>{this.ensureAtLeastOneParagraph(),this.scrubBrokenMentions(),this.updateContent(),this.updateToolbarState()})),this.editorEl.addEventListener("mouseup",(()=>{this.saveSelection(),this.updateToolbarState()})),this.editorEl.addEventListener("keyup",(e=>{this.saveSelection(),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)&&this.updateToolbarState()})),this.editorEl.addEventListener("keydown",this.onEditorKeydown)}wireAuthoredToolbar(e){this.buttonMap.clear(),this.headingSelect=null,this.fontSelect=null,this.colorInput=null,Array.from(e.children).forEach((e=>{const t=e.tagName.toLowerCase();if("nile-rte-select"!==t||"align"!==e.getAttribute("type")){if("nile-rte-link"===t)return e.editorEl=this.editorEl,void e.addEventListener("link-changed",(()=>{this.updateContent(),this.updateToolbarState()}));if("nile-rte-toolbar-item"===t){let t=e.querySelector(":scope > nile-button");const M=e.getAttribute("name")||"",i=e.getAttribute("label")||M,n=e.getAttribute("icon"),o=e.innerHTML.trim().length>0;if(t||(t=document.createElement("nile-button"),t.variant="tertiary",t.size="small"),n)t.innerHTML=`<nile-icon name="${n}" aria-label="${i}"></nile-icon>`,e.innerHTML="";else if(o)t.innerHTML=e.innerHTML,e.innerHTML="";else{const n=NS[M];n?t.innerHTML=`<nile-icon name="${n}" size="20" color="black" aria-label="${i}"></nile-icon>`:t.textContent=i||M,e.innerHTML=""}if(!t.isConnected){const M=document.createElement("nile-tooltip");M.setAttribute("content",i),M.appendChild(t),e.appendChild(M)}t.setAttribute("aria-label",i),t.addEventListener("mousedown",(e=>e.preventDefault())),t.addEventListener("click",(()=>this.onToolbarCommand(M)));const r=this.buttonMap.get(M)??[];return r.push(t),void this.buttonMap.set(M,r)}if("nile-rte-select"!==t)"nile-rte-color"!==t||e.addEventListener("change",(e=>{this.focusAndRestore();const{mode:t,value:M}=e.detail;"backColor"===t?MS(this.editorEl,"backgroundColor",M,"data-rte-bg"):function(e,t){MS(e,"color",t,"data-rte-color")}(this.editorEl,M),this.updateContent(),this.updateToolbarState()}));else{const t=e.getAttribute("type")||"";e.addEventListener("change",(e=>{this.focusAndRestore();const M=e.detail;"heading"===t?function(e,t){const M=document.getSelection();if(!M||0===M.rangeCount)return;const i=Jp(M.getRangeAt(0).startContainer,e);if(!i)return;if(i.tagName.toLowerCase()===t)return;const n=document.createElement(t);for(;i.firstChild;)n.appendChild(i.firstChild);i.replaceWith(n);const o=document.createRange();o.selectNodeContents(n),o.collapse(!0),M.removeAllRanges(),M.addRange(o)}(this.editorEl,M):"font"===t&&function(e,t){const M=document.getSelection();if(!M||0===M.rangeCount)return;const i=M.getRangeAt(0);if(i.collapsed){const e=document.createElement("span");e.style.fontFamily=t,e.appendChild(document.createTextNode("​")),i.insertNode(e);const n=document.createRange();return n.setStart(e.firstChild,1),n.collapse(!0),M.removeAllRanges(),void M.addRange(n)}$p(i,"span",{style:`font-family:${t}`})}(this.editorEl,M),this.updateContent(),this.updateToolbarState()}))}}else e.addEventListener("change",(e=>{this.focusAndRestore();const t=e.detail;eS(this.editorEl,t),this.updateContent(),this.updateToolbarState()}))}))}saveSelection(){const e=window.getSelection();e&&e.rangeCount&&(this.lastRange=e.getRangeAt(0).cloneRange())}restoreSelection(){if(!this.lastRange)return;const e=document.getSelection();e&&(e.removeAllRanges(),e.addRange(this.lastRange))}focusAndRestore(){this.editorEl?.focus(),this.restoreSelection()}insertList(e){if(this.restoreSelection(),!this.lastRange)return;const t=document.createElement(e),M=this.lastRange.extractContents(),i=document.createElement("div");i.appendChild(M),Array.from(i.childNodes).forEach((e=>{if(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())return;const M=document.createElement("li");M.appendChild(e),t.appendChild(M)})),this.lastRange.insertNode(t),this.afterListEdit(t)}afterListEdit(e){const t=document.createRange();t.setStartAfter(e),t.collapse(!0);const M=window.getSelection();M?.removeAllRanges(),M?.addRange(t),this.saveSelection(),this.updateContent(),this.updateToolbarState()}ensureAtLeastOneParagraph(){const e=this.editorEl;if(!e)return;const t=""===(e.textContent??"").replace(/\u200B/g,"").trim();if(0===e.childNodes.length||t)return void(e.innerHTML="<p><br></p>");if(!e.querySelector("p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre")){const t=document.createElement("p");for(;e.firstChild;)t.appendChild(e.firstChild);return t.hasChildNodes()||t.appendChild(document.createElement("br")),void e.appendChild(t)}e.querySelectorAll("p").forEach((e=>{""===(e.textContent??"").replace(/\u200B/g,"")&&(e.innerHTML.toLowerCase().includes("<br")||(e.innerHTML="<br>"))}))}onToolbarCommand(e){switch(this.focusAndRestore(),e){case"bold":Kp(this.editorEl,"strong");break;case"italic":Kp(this.editorEl,"em");break;case"underline":Kp(this.editorEl,"u");break;case"left":eS(this.editorEl,"left");break;case"center":eS(this.editorEl,"center");break;case"right":eS(this.editorEl,"right");break;case"justify":eS(this.editorEl,"justify");break;case"ul":oS(this.editorEl,"ul"),this.updateContent(),this.updateToolbarState();break;case"ol":oS(this.editorEl,"ol"),this.updateContent(),this.updateToolbarState();break;case"link":break;case"clear":const e=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),t=[];for(;e.nextNode();){const M=e.currentNode;M.removeAttribute("style"),["B","STRONG","I","EM","U","SPAN","FONT"].includes(M.tagName)&&t.push(M)}for(const e of t){for(;e.firstChild;)e.parentNode?.insertBefore(e.firstChild,e);e.remove()}this.ensureAtLeastOneParagraph()}this.updateContent(),this.updateToolbarState()}setBtnActive(e,t){const M=this.buttonMap.get(e);if(M)for(const e of M)e.toggleAttribute("data-active",!!t)}updateToolbarState(){if(!this.editorEl)return;const e=document.getSelection();if(!e||0===e.rangeCount)return;const t=e.getRangeAt(0);if(!this.editorEl.contains(t.commonAncestorContainer))return;const M=function(e){for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e}(t.startContainer)||this.editorEl,i=getComputedStyle(M),n=Jp(t.startContainer,this.editorEl)||this.editorEl,o=(()=>{let e=M;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("strong"===t||"b"===t)return!0;const M=getComputedStyle(e).fontWeight;if(parseInt(M,10)>=600)return!0}e=e.parentNode}return!1})(),r=(()=>{let e=M;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=e.tagName.toLowerCase();if("em"===t||"i"===t)return!0;if("italic"===getComputedStyle(e).fontStyle)return!0}e=e.parentNode}return!1})(),N=(()=>{let e=M;for(;e&&e!==this.editorEl;){if(e instanceof HTMLElement){const t=getComputedStyle(e).textDecorationLine;if(t&&t.includes("underline"))return!0;if("u"===e.tagName.toLowerCase())return!0}e=e.parentNode}return!1})(),s=!!M.closest("a"),a=n.style.textAlign||getComputedStyle(n).textAlign||"start",l="start"===a?"left":a,g=!!M.closest("li")&&M.closest("ul,ol")?.tagName.toLowerCase()||"";if(this.setBtnActive("bold",o),this.setBtnActive("italic",r),this.setBtnActive("underline",N),this.setBtnActive("link",s),this.setBtnActive("left","left"===l&&!["center","right","justify"].includes(l)),this.setBtnActive("center","center"===l),this.setBtnActive("right","right"===l),this.setBtnActive("justify","justify"===l),this.setBtnActive("ul","ul"===g),this.setBtnActive("ol","ol"===g),this.headingSelect){const e=n.tagName.toLowerCase(),t=["h1","h2","h3"].includes(e)?e:"p";this.headingSelect.value!==t&&(this.headingSelect.value=t)}if(this.fontSelect){const e=(i.fontFamily||"").replace(/["']/g,"").split(",")[0].trim().toLowerCase();if(e)for(const t of Array.from(this.fontSelect.options))if(t.value.toLowerCase()===e){this.fontSelect.value=t.value;break}}if(this.colorInput){const e=Hp(i.color);e&&this.colorInput.value.toLowerCase()!==e.toLowerCase()&&(this.colorInput.value=e),this.colorSwatchEl&&(this.colorSwatchEl.style.backgroundColor=this.colorInput.value)}if(this.bgColorInput){const e=getComputedStyle(M).backgroundColor;if(e&&!/transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e)){const t=Hp(e);t&&this.bgColorInput.value.toLowerCase()!==t.toLowerCase()&&(this.bgColorInput.value=t)}this.bgSwatchEl&&(this.bgSwatchEl.style.backgroundColor=this.bgColorInput.value)}}syncPreview(){this.updateContent()}updateContent(){if(!this.editorEl)return;this.ensureAtLeastOneParagraph();const e=this.editorEl.cloneNode(!0),t=document.createTreeWalker(this.editorEl,NodeFilter.SHOW_ELEMENT),M=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),i=["font-weight","font-style","text-decoration","color","background-color","font-size","font-family","text-align","line-height","letter-spacing","white-space","vertical-align","list-style-position","padding-inline-start"];for(;t.nextNode()&&M.nextNode();){const e=t.currentNode,n=M.currentNode,o=window.getComputedStyle(e),r=i.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");r.trim()&&n.setAttribute("style",r)}this.content=e.innerHTML,this.previewEl&&(this.previewEl.innerHTML=this.content),this.dispatchEvent(new CustomEvent("nile-change",{detail:{content:this.content},bubbles:!0,composed:!0}))}};e([ue({type:String,attribute:!0,reflect:!0})],sS.prototype,"value",void 0),e([ue({type:Boolean,attribute:"singlelineeditor",reflect:!0})],sS.prototype,"singleLineEditor",void 0),e([ue({attribute:"mentions",reflect:!0,converter:{fromAttribute:e=>{try{const t=JSON.parse(e),M={};for(const e of Object.keys(t)){const i=t[e];Array.isArray(i)&&(M[e]=i.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}return M}catch{return{}}},toAttribute:e=>JSON.stringify(e)}})],sS.prototype,"mentions",void 0),e([ce()],sS.prototype,"content",void 0),sS=e([le("nile-rich-text-editor")],sS);"undefined"!=typeof window&&(window.nileElementsVersion='"1.1.1"',window.nileVersion="__NILE_VERSION__")
14231
14231
  /**
14232
14232
  * @license
14233
14233
  * Copyright 2021 Google LLC
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-vertical-stepper-item.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,s,l,r,p,_,n,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;i=_lit.nothing;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;l=_litDecoratorsJs.state;r=_litDecoratorsJs.customElement;},function(_nileVerticalStepperItemCssCjsJs){p=_nileVerticalStepperItemCssCjsJs.s;},function(_internalNileElementCjsJs){_=_internalNileElementCjsJs.N;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_ref){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.title="",_this.subtitle="",_this.contentBelow=!1,_this.size="lg",_this.icon="tick",_this.isFirst=!1,_this.isLast=!1,_this.isComplete=!1,_this.isCurrent=!1,_this.haveFlex=!0;return _this;}_inherits(o,_ref);return _createClass(o,[{key:"render",value:function render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");var t=this.isCurrent,s=this.isComplete;var l=!1;(s&&!t||this.completedStepValue==this.value)&&(l=!0);var r=!1;return s&&(r=!0,this.calculatedCompletedStepValue==this.value&&(r=!1)),"sm"==this.size||this.size,e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<div \n\t\t\tpart=\"item\"\n\t\t\tclass=\"","\">\n\t\t\t\t<div part=\"connector\" class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div part=\"bulletin\" class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t\t<div part=\"line-container\" class=\"stepper__item__line__container\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div part=\"content\" class=\"stepper__item__content\">\n\t\t\t\t\t<div part=\"title\" class=\"","\">","</div>\n\t\t\t\t\t<div part=\"subtitle\" class=\"","\">","</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t"])),n({stepper__item:!0,"stepper__item--selected":t,"stepper__item--default":!t,"stepper__item--sm":"sm"==this.size,"stepper__item--lg":"lg"==this.size}),l?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div part=\"bulletin-icon\" class=\"","\">","</div>"])),n({"stepper__bulletin--icon":!0,"stepper__bulletin__icon--active":t}),this.getSvg()):e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<div part=\"bulletin-dot\" class=\"","\"></div>"])),n({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})),this.isLast?i:e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<div part=\"line\" class=\"","\"></div>"])),n({stepper__item__line:!0,"stepper__item__line--active":r})),n({stepper__content__title:!0,"stepper__content__title--alone":!this.subtitle,"stepper__content__title--active":t}),this.title,n({stepper__content__subtitle:!0,"stepper__content__subtitle--alone":!this.title,"stepper__content__subtitle--active":t}),this.subtitle);}},{key:"getSvg",value:function getSvg(){var t="sm"==this.size?20:"lg"==this.size?24:28;return e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n\t\t<svg width=\"","\" height=\"","\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t"])),t,t);}}],[{key:"styles",get:function get(){return[p];}}]);}(_));t([s({attribute:!0,reflect:!0})],o.prototype,"title",void 0),t([s({attribute:!0,reflect:!0})],o.prototype,"subtitle",void 0),t([l()],o.prototype,"contentBelow",void 0),t([l()],o.prototype,"size",void 0),t([l()],o.prototype,"icon",void 0),t([l()],o.prototype,"isFirst",void 0),t([l()],o.prototype,"isLast",void 0),t([l()],o.prototype,"isComplete",void 0),t([l()],o.prototype,"isCurrent",void 0),t([l()],o.prototype,"currentStepValue",void 0),t([l()],o.prototype,"completedStepValue",void 0),t([l()],o.prototype,"calculatedCompletedStepValue",void 0),t([l()],o.prototype,"value",void 0),t([l()],o.prototype,"haveFlex",void 0),_export("N",o=t([r("nile-vertical-stepper-item")],o));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-vertical-stepper-item.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,s,l,r,p,o,_,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,n;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;i=_lit.nothing;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;l=_litDecoratorsJs.state;r=_litDecoratorsJs.customElement;},function(_nileVerticalStepperItemCssCjsJs){p=_nileVerticalStepperItemCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_litDirectivesClassMapJs){_=_litDirectivesClassMapJs.classMap;}],execute:function execute(){_export("N",n=/*#__PURE__*/function(_o){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.title="",_this.subtitle="",_this.completed=!1,_this.current=!1,_this.contentBelow=!1,_this.size="lg",_this.icon="tick",_this.isFirst=!1,_this.isLast=!1,_this.isComplete=!1,_this.isCurrent=!1,_this.isManualMode=!1,_this.haveFlex=!0;return _this;}_inherits(n,_o);return _createClass(n,[{key:"render",value:function render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");var t=this.isManualMode?this.current:this.isCurrent,s=this.isManualMode?this.completed:this.isComplete;var l=!1;(s&&!t||this.completedStepValue==this.value)&&(l=!0);var r=!1;return s&&(r=!0,this.calculatedCompletedStepValue==this.value&&(r=!1)),"sm"==this.size||this.size,e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<div \n\t\t\tpart=\"item\"\n\t\t\tclass=\"","\">\n\t\t\t\t<div part=\"connector\" class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div part=\"bulletin\" class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t\t<div part=\"line-container\" class=\"stepper__item__line__container\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div part=\"content\" class=\"stepper__item__content\">\n\t\t\t\t\t<div part=\"title\" class=\"","\">","</div>\n\t\t\t\t\t<div part=\"subtitle\" class=\"","\">","</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t"])),_({stepper__item:!0,"stepper__item--selected":t,"stepper__item--default":!t,"stepper__item--sm":"sm"==this.size,"stepper__item--lg":"lg"==this.size}),l?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div part=\"bulletin-icon\" class=\"","\">","</div>"])),_({"stepper__bulletin--icon":!0,"stepper__bulletin__icon--active":t}),this.getSvg()):e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<div part=\"bulletin-dot\" class=\"","\"></div>"])),_({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})),this.isLast?i:e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<div part=\"line\" class=\"","\"></div>"])),_({stepper__item__line:!0,"stepper__item__line--active":r})),_({stepper__content__title:!0,"stepper__content__title--alone":!this.subtitle,"stepper__content__title--active":t}),this.title,_({stepper__content__subtitle:!0,"stepper__content__subtitle--alone":!this.title,"stepper__content__subtitle--active":t}),this.subtitle);}},{key:"getSvg",value:function getSvg(){var t="sm"==this.size?20:"lg"==this.size?24:28;return e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n\t\t<svg width=\"","\" height=\"","\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t"])),t,t);}}],[{key:"styles",get:function get(){return[p];}}]);}(o));t([s({attribute:!0,reflect:!0})],n.prototype,"title",void 0),t([s({attribute:!0,reflect:!0})],n.prototype,"subtitle",void 0),t([s({attribute:!0,reflect:!0})],n.prototype,"completed",void 0),t([s({attribute:!0,reflect:!0})],n.prototype,"current",void 0),t([l()],n.prototype,"contentBelow",void 0),t([l()],n.prototype,"size",void 0),t([l()],n.prototype,"icon",void 0),t([l()],n.prototype,"isFirst",void 0),t([l()],n.prototype,"isLast",void 0),t([l()],n.prototype,"isComplete",void 0),t([l()],n.prototype,"isCurrent",void 0),t([l()],n.prototype,"isManualMode",void 0),t([l()],n.prototype,"currentStepValue",void 0),t([l()],n.prototype,"completedStepValue",void 0),t([l()],n.prototype,"calculatedCompletedStepValue",void 0),t([l()],n.prototype,"value",void 0),t([l()],n.prototype,"haveFlex",void 0),_export("N",n=t([r("nile-vertical-stepper-item")],n));}};});
2
2
  //# sourceMappingURL=nile-vertical-stepper-item.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-vertical-stepper-item.cjs.js","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, nothing, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport {styles} from './nile-vertical-stepper-item.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile vertical-stepper-item component.\n *\n * @tag nile-vertical-stepper-item\n *\n */\n@customElement('nile-vertical-stepper-item')\nexport class NileVerticalStepperItem extends NileElement {\n\t/* Properties passed directly */\n\t@property({attribute: true, reflect: true}) title: string = '';\n\t@property({attribute: true, reflect: true}) subtitle: string = '';\n\n\n\t/* Properties passed to parent component: NileStepper */\n\t@state() private contentBelow = false;\n\t@state() private size : 'sm' | 'lg' = 'lg';\n\t@state() private icon = 'tick';\n\n\n\t/* Properties Computed at parent level component NileStepper */\n\t@state() private isFirst = false;\n\t@state() private isLast = false;\n\n\t@state() private isComplete = false;\n\t@state() private isCurrent = false;\n\t@state() private currentStepValue :Number;\n\t@state() private completedStepValue :Number;\n\t@state() private calculatedCompletedStepValue :Number;\n\n\t@state() private value :Number;\n\t@state() private haveFlex :Boolean=true;\n\n\t/**\n\t * The styles for nile-vertical-stepper-item\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\tif (this.isLast) this.style.setProperty('--vertical-stepper-flex-val', `0`);\n\t\tconst isCurrent = this.isCurrent;\n\t\tconst isComplete = this.isComplete;\n\n\t\tlet showCompletedIcon=false;\n\t\tif(isComplete && !isCurrent || this.completedStepValue==this.value) showCompletedIcon=true;\n\n\t\tlet suffixStepperLineActive = false;\n\t\tif (isComplete) {\n\t\t\tsuffixStepperLineActive = true;\n\t\t\tif (this.calculatedCompletedStepValue == this.value) suffixStepperLineActive = false;\n\t\t}\n\n\t\tlet iconSize = this.size == 'sm'?14:this.size == 'lg'?16:20;\n\t\treturn html`\n\t\t\t<div \n\t\t\tpart=\"item\"\n\t\t\tclass=\"${classMap({\n\t\t\t\t'stepper__item':true,\n\t\t\t\t'stepper__item--selected':isCurrent,\n\t\t\t\t'stepper__item--default':!isCurrent,\n\t\t\t\t'stepper__item--sm':this.size=='sm',\n\t\t\t\t'stepper__item--lg':this.size=='lg',\n\t\t\t})}\">\n\t\t\t\t<div part=\"connector\" class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div part=\"bulletin\" class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t${showCompletedIcon ? \n\t\t\t\t\t\t\thtml`<div part=\"bulletin-icon\" class=\"${classMap({ 'stepper__bulletin--icon':true, 'stepper__bulletin__icon--active':isCurrent })}\">${this.getSvg()}</div>`\n\t\t\t\t\t\t\t: html`<div part=\"bulletin-dot\" class=\"${classMap({ 'stepper__bulletin--dot':true, 'stepper__bulletin__dot--active':isCurrent })}\"></div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div part=\"line-container\" class=\"stepper__item__line__container\">\n\t\t\t\t\t\t${this.isLast?nothing : html`<div part=\"line\" class=\"${classMap({ 'stepper__item__line':true, 'stepper__item__line--active':suffixStepperLineActive })}\"></div>`}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div part=\"content\" class=\"stepper__item__content\">\n\t\t\t\t\t<div part=\"title\" class=\"${classMap({ 'stepper__content__title':true, \"stepper__content__title--alone\": !this.subtitle, 'stepper__content__title--active':isCurrent })}\">${this.title}</div>\n\t\t\t\t\t<div part=\"subtitle\" class=\"${classMap({ 'stepper__content__subtitle':true, \"stepper__content__subtitle--alone\": !this.title, 'stepper__content__subtitle--active':isCurrent })}\">${this.subtitle}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\tgetSvg():TemplateResult{\n\t\tlet iconSize = this.size == 'sm' ? 20 : this.size == 'lg' ? 24 : 28;\n\t\treturn html`\n\t\t<svg width=\"${iconSize}\" height=\"${iconSize}\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t`\n\t}\n\n\n\t/* #endregion */\n}\n\nexport default NileVerticalStepperItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-vertical-stepper-item': NileVerticalStepperItem;\n }\n}"],"names":["NileVerticalStepperItem","o","this","title","subtitle","contentBelow","size","icon","isFirst","isLast","isComplete","isCurrent","haveFlex","_this","_inherits","_ref","_createClass","key","value","render","style","setProperty","showCompletedIcon","completedStepValue","suffixStepperLineActive","calculatedCompletedStepValue","html","_templateObject","_taggedTemplateLiteral","classMap","stepper__item","_templateObject2","getSvg","_templateObject3","nothing","_templateObject4","stepper__item__line","stepper__content__title","stepper__content__subtitle","iconSize","_templateObject5","__decorate","get","styles","NileElement","property","attribute","reflect","prototype","state","customElement"],"mappings":"63GAqBaA,CAAAA,uBAAAA,IAAAA,EAAN,SAAAC,EAAA,qEAEsCC,EAAAA,KAAAA,CAAKC,KAAW,CAAA,EAAA,CAChBD,KAAAA,CAAQE,QAAW,CAAA,EAAA,CAI9CF,KAAAA,CAAYG,YAAG,CAAA,CAAA,CAAA,CACfH,KAAAA,CAAII,IAAiB,CAAA,IAAA,CACrBJ,KAAAA,CAAIK,IAAAA,CAAG,MAIPL,CAAAA,KAAAA,CAAOM,SAAG,CACVN,CAAAA,KAAAA,CAAMO,MAAG,CAAA,CAAA,CAAA,CAETP,KAAAA,CAAUQ,UAAAA,CAAAA,CAAG,EACbR,KAAAA,CAASS,SAAAA,CAAAA,CAAG,CAMZT,CAAAA,KAAAA,CAAQU,QAAU,CAAA,CAAA,CAyEnC,QAAAC,KAAA,EAnEOC,SAAA,CAAAb,CAAA,CAAAc,IAAA,SAAAC,YAAA,CAAAf,CAAA,GAAAgB,GAAA,UAAAC,KAAA,CAYA,SAAAC,MAAAA,CAAAA,CAAAA,CACFjB,IAAKO,CAAAA,MAAAA,EAAQP,IAAKkB,CAAAA,KAAAA,CAAMC,YAAY,6BAA+B,CA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,CAAAA,SAAAA,CAAA,8BAAA,CAAA,IAAA,EAAA,CAAA,CAErCP,CAAA,CAAA,CAAhBQ,CAA8BjD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAgD,SAAA,CAAA,OAAA,CAAA,IAAA,IACdP,CAAA,CAAA,CAAhBQ,CAAuCjD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAgD,SAAA,CAAA,UAAA,CAAA,IAAA,EAvB5BhD,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAuByC,CAAA,CAAA,CADnCS,CAAc,CAAA,4BAAA,CAAA,CAAA,CACFlD"}
1
+ {"version":3,"file":"nile-vertical-stepper-item.cjs.js","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, nothing, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport {styles} from './nile-vertical-stepper-item.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile vertical-stepper-item component.\n *\n * @tag nile-vertical-stepper-item\n *\n */\n@customElement('nile-vertical-stepper-item')\nexport class NileVerticalStepperItem extends NileElement {\n\t/* Properties passed directly */\n\t@property({attribute: true, reflect: true}) title: string = '';\n\t@property({attribute: true, reflect: true}) subtitle: string = '';\n\t@property({attribute: true, reflect: true}) completed: boolean = false;\n\t@property({attribute: true, reflect: true}) current: boolean = false;\n\n\n\t/* Properties passed to parent component: NileStepper */\n\t@state() private contentBelow = false;\n\t@state() private size : 'sm' | 'lg' = 'lg';\n\t@state() private icon = 'tick';\n\n\n\t/* Properties Computed at parent level component NileStepper */\n\t@state() private isFirst = false;\n\t@state() private isLast = false;\n\n\t@state() private isComplete = false;\n\t@state() private isCurrent = false;\n\t@state() private isManualMode = false;\n\t@state() private currentStepValue :Number;\n\t@state() private completedStepValue :Number;\n\t@state() private calculatedCompletedStepValue :Number;\n\n\t@state() private value :Number;\n\t@state() private haveFlex :Boolean=true;\n\n\t/**\n\t * The styles for nile-vertical-stepper-item\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\tif (this.isLast) this.style.setProperty('--vertical-stepper-flex-val', `0`);\n\t\tconst isCurrent = this.isManualMode ? this.current : this.isCurrent;\n\t\tconst isComplete = this.isManualMode ? this.completed : this.isComplete;\n\n\t\tlet showCompletedIcon=false;\n\t\tif(isComplete && !isCurrent || this.completedStepValue==this.value) showCompletedIcon=true;\n\n\t\tlet suffixStepperLineActive = false;\n\t\tif (isComplete) {\n\t\t\tsuffixStepperLineActive = true;\n\t\t\tif (this.calculatedCompletedStepValue == this.value) suffixStepperLineActive = false;\n\t\t}\n\n\t\tlet iconSize = this.size == 'sm'?14:this.size == 'lg'?16:20;\n\t\treturn html`\n\t\t\t<div \n\t\t\tpart=\"item\"\n\t\t\tclass=\"${classMap({\n\t\t\t\t'stepper__item':true,\n\t\t\t\t'stepper__item--selected':isCurrent,\n\t\t\t\t'stepper__item--default':!isCurrent,\n\t\t\t\t'stepper__item--sm':this.size=='sm',\n\t\t\t\t'stepper__item--lg':this.size=='lg',\n\t\t\t})}\">\n\t\t\t\t<div part=\"connector\" class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div part=\"bulletin\" class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t${showCompletedIcon ? \n\t\t\t\t\t\t\thtml`<div part=\"bulletin-icon\" class=\"${classMap({ 'stepper__bulletin--icon':true, 'stepper__bulletin__icon--active':isCurrent })}\">${this.getSvg()}</div>`\n\t\t\t\t\t\t\t: html`<div part=\"bulletin-dot\" class=\"${classMap({ 'stepper__bulletin--dot':true, 'stepper__bulletin__dot--active':isCurrent })}\"></div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div part=\"line-container\" class=\"stepper__item__line__container\">\n\t\t\t\t\t\t${this.isLast?nothing : html`<div part=\"line\" class=\"${classMap({ 'stepper__item__line':true, 'stepper__item__line--active':suffixStepperLineActive })}\"></div>`}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div part=\"content\" class=\"stepper__item__content\">\n\t\t\t\t\t<div part=\"title\" class=\"${classMap({ 'stepper__content__title':true, \"stepper__content__title--alone\": !this.subtitle, 'stepper__content__title--active':isCurrent })}\">${this.title}</div>\n\t\t\t\t\t<div part=\"subtitle\" class=\"${classMap({ 'stepper__content__subtitle':true, \"stepper__content__subtitle--alone\": !this.title, 'stepper__content__subtitle--active':isCurrent })}\">${this.subtitle}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\tgetSvg():TemplateResult{\n\t\tlet iconSize = this.size == 'sm' ? 20 : this.size == 'lg' ? 24 : 28;\n\t\treturn html`\n\t\t<svg width=\"${iconSize}\" height=\"${iconSize}\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t`\n\t}\n\n\n\t/* #endregion */\n}\n\nexport default NileVerticalStepperItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-vertical-stepper-item': NileVerticalStepperItem;\n }\n}\n"],"names":["NileVerticalStepperItem","_o","n","this","title","subtitle","completed","current","contentBelow","size","icon","isFirst","isLast","isComplete","isCurrent","isManualMode","haveFlex","_this","_inherits","_createClass","key","value","render","style","setProperty","showCompletedIcon","completedStepValue","suffixStepperLineActive","calculatedCompletedStepValue","html","_templateObject","_taggedTemplateLiteral","classMap","stepper__item","_templateObject2","getSvg","_templateObject3","nothing","_templateObject4","stepper__item__line","stepper__content__title","stepper__content__subtitle","iconSize","_templateObject5","get","styles","NileElement","__decorate","property","attribute","reflect","prototype","state","customElement"],"mappings":"63GAqBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEAEsCC,EAAAA,KAAAA,CAAKC,KAAW,CAAA,EAAA,CAChBD,KAAAA,CAAQE,QAAAA,CAAW,EACnBF,CAAAA,KAAAA,CAASG,WAAY,CACrBH,CAAAA,KAAAA,CAAOI,OAAY,CAAA,CAAA,CAAA,CAI9CJ,KAAAA,CAAYK,YAAAA,CAAAA,CAAG,CACfL,CAAAA,KAAAA,CAAIM,IAAiB,CAAA,IAAA,CACrBN,KAAAA,CAAIO,IAAAA,CAAG,MAIPP,CAAAA,KAAAA,CAAOQ,OAAG,CAAA,CAAA,CAAA,CACVR,KAAAA,CAAMS,MAAAA,CAAAA,CAAG,CAETT,CAAAA,KAAAA,CAAUU,UAAG,CAAA,CAAA,CAAA,CACbV,KAAAA,CAASW,SAAAA,CAAAA,CAAG,CACZX,CAAAA,KAAAA,CAAYY,YAAG,CAAA,CAAA,CAAA,CAMfZ,KAAAA,CAAQa,QAAAA,CAAAA,CAAU,CAyEnC,QAAAC,KAAA,EAnEOC,SAAA,CAAAhB,CAAA,CAAAD,EAAA,SAAAkB,YAAA,CAAAjB,CAAA,GAAAkB,GAAA,UAAAC,KAAA,CAYA,SAAAC,MAAAA,CAAAA,CACFnB,CAAAA,IAAAA,CAAKS,MAAQT,EAAAA,I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AAA,YAAA,CAAA,IAAA,EAAA,CAAA,CACnBJ,CAAA,CAAA,CAAhBK,CAAkCpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmD,SAAA,CAAA,WAAA,CAAA,IAAA,IAClBJ,CAAA,CAAA,CAAhBK,CAAqCpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmD,UAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CACrBJ,CAAA,CAAA,CAAhBK,KAAyCpD,CAAAmD,CAAAA,SAAAA,CAAA,kBAAA,CAAA,IAAA,EAAA,CAAA,CACzBJ,CAAA,CAAA,CAAhBK,CAA2CpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmD,UAAA,oBAAA,CAAA,IAAA,EAAA,CAAA,CAC3BJ,CAAA,CAAA,CAAhBK,CAAqDpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmD,SAAA,CAAA,8BAAA,CAAA,IAAA,IAErCJ,CAAA,CAAA,CAAhBK,CAA8BpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmD,SAAA,CAAA,OAAA,CAAA,IAAA,EACdJ,CAAAA,CAAAA,CAAAA,CAAA,CAAhBK,CAAuCpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmD,SAAA,CAAA,UAAA,CAAA,IAAA,gBA1B5BnD,CAAuB+C,CAAAA,CAAAA,CAAA,CADnCM,CAAAA,CAAc,+BACFrD"}
@@ -1,22 +1,22 @@
1
- import{__decorate as t}from"tslib";import{html as e,nothing as i}from"lit";import{property as s,state as l,customElement as r}from"lit/decorators.js";import{s as p}from"./nile-vertical-stepper-item.css.esm.js";import{N as _}from"../internal/nile-element.esm.js";import{classMap as n}from"lit/directives/class-map.js";let o=class extends _{constructor(){super(...arguments),this.title="",this.subtitle="",this.contentBelow=!1,this.size="lg",this.icon="tick",this.isFirst=!1,this.isLast=!1,this.isComplete=!1,this.isCurrent=!1,this.haveFlex=!0}static get styles(){return[p]}render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");const t=this.isCurrent,s=this.isComplete;let l=!1;(s&&!t||this.completedStepValue==this.value)&&(l=!0);let r=!1;return s&&(r=!0,this.calculatedCompletedStepValue==this.value&&(r=!1)),"sm"==this.size||this.size,e`
1
+ import{__decorate as t}from"tslib";import{html as e,nothing as i}from"lit";import{property as s,state as l,customElement as r}from"lit/decorators.js";import{s as p}from"./nile-vertical-stepper-item.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{classMap as _}from"lit/directives/class-map.js";let n=class extends o{constructor(){super(...arguments),this.title="",this.subtitle="",this.completed=!1,this.current=!1,this.contentBelow=!1,this.size="lg",this.icon="tick",this.isFirst=!1,this.isLast=!1,this.isComplete=!1,this.isCurrent=!1,this.isManualMode=!1,this.haveFlex=!0}static get styles(){return[p]}render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");const t=this.isManualMode?this.current:this.isCurrent,s=this.isManualMode?this.completed:this.isComplete;let l=!1;(s&&!t||this.completedStepValue==this.value)&&(l=!0);let r=!1;return s&&(r=!0,this.calculatedCompletedStepValue==this.value&&(r=!1)),"sm"==this.size||this.size,e`
2
2
  <div
3
3
  part="item"
4
- class="${n({stepper__item:!0,"stepper__item--selected":t,"stepper__item--default":!t,"stepper__item--sm":"sm"==this.size,"stepper__item--lg":"lg"==this.size})}">
4
+ class="${_({stepper__item:!0,"stepper__item--selected":t,"stepper__item--default":!t,"stepper__item--sm":"sm"==this.size,"stepper__item--lg":"lg"==this.size})}">
5
5
  <div part="connector" class="stepper-item__connector-content">
6
6
  <div part="bulletin" class="stepper__item__bulletin">
7
- ${l?e`<div part="bulletin-icon" class="${n({"stepper__bulletin--icon":!0,"stepper__bulletin__icon--active":t})}">${this.getSvg()}</div>`:e`<div part="bulletin-dot" class="${n({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})}"></div>`}
7
+ ${l?e`<div part="bulletin-icon" class="${_({"stepper__bulletin--icon":!0,"stepper__bulletin__icon--active":t})}">${this.getSvg()}</div>`:e`<div part="bulletin-dot" class="${_({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})}"></div>`}
8
8
  </div>
9
9
  <div part="line-container" class="stepper__item__line__container">
10
- ${this.isLast?i:e`<div part="line" class="${n({stepper__item__line:!0,"stepper__item__line--active":r})}"></div>`}
10
+ ${this.isLast?i:e`<div part="line" class="${_({stepper__item__line:!0,"stepper__item__line--active":r})}"></div>`}
11
11
  </div>
12
12
  </div>
13
13
  <div part="content" class="stepper__item__content">
14
- <div part="title" class="${n({stepper__content__title:!0,"stepper__content__title--alone":!this.subtitle,"stepper__content__title--active":t})}">${this.title}</div>
15
- <div part="subtitle" class="${n({stepper__content__subtitle:!0,"stepper__content__subtitle--alone":!this.title,"stepper__content__subtitle--active":t})}">${this.subtitle}</div>
14
+ <div part="title" class="${_({stepper__content__title:!0,"stepper__content__title--alone":!this.subtitle,"stepper__content__title--active":t})}">${this.title}</div>
15
+ <div part="subtitle" class="${_({stepper__content__subtitle:!0,"stepper__content__subtitle--alone":!this.title,"stepper__content__subtitle--active":t})}">${this.subtitle}</div>
16
16
  </div>
17
17
  </div>
18
18
  `}getSvg(){let t="sm"==this.size?20:"lg"==this.size?24:28;return e`
19
19
  <svg width="${t}" height="${t}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
20
20
  <path fill-rule="evenodd" clip-rule="evenodd" d="M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z" fill="white"/>
21
21
  </svg>
22
- `}};t([s({attribute:!0,reflect:!0})],o.prototype,"title",void 0),t([s({attribute:!0,reflect:!0})],o.prototype,"subtitle",void 0),t([l()],o.prototype,"contentBelow",void 0),t([l()],o.prototype,"size",void 0),t([l()],o.prototype,"icon",void 0),t([l()],o.prototype,"isFirst",void 0),t([l()],o.prototype,"isLast",void 0),t([l()],o.prototype,"isComplete",void 0),t([l()],o.prototype,"isCurrent",void 0),t([l()],o.prototype,"currentStepValue",void 0),t([l()],o.prototype,"completedStepValue",void 0),t([l()],o.prototype,"calculatedCompletedStepValue",void 0),t([l()],o.prototype,"value",void 0),t([l()],o.prototype,"haveFlex",void 0),o=t([r("nile-vertical-stepper-item")],o);export{o as N};
22
+ `}};t([s({attribute:!0,reflect:!0})],n.prototype,"title",void 0),t([s({attribute:!0,reflect:!0})],n.prototype,"subtitle",void 0),t([s({attribute:!0,reflect:!0})],n.prototype,"completed",void 0),t([s({attribute:!0,reflect:!0})],n.prototype,"current",void 0),t([l()],n.prototype,"contentBelow",void 0),t([l()],n.prototype,"size",void 0),t([l()],n.prototype,"icon",void 0),t([l()],n.prototype,"isFirst",void 0),t([l()],n.prototype,"isLast",void 0),t([l()],n.prototype,"isComplete",void 0),t([l()],n.prototype,"isCurrent",void 0),t([l()],n.prototype,"isManualMode",void 0),t([l()],n.prototype,"currentStepValue",void 0),t([l()],n.prototype,"completedStepValue",void 0),t([l()],n.prototype,"calculatedCompletedStepValue",void 0),t([l()],n.prototype,"value",void 0),t([l()],n.prototype,"haveFlex",void 0),n=t([r("nile-vertical-stepper-item")],n);export{n as N};
@@ -15,6 +15,8 @@ import NileElement from '../internal/nile-element';
15
15
  export declare class NileVerticalStepperItem extends NileElement {
16
16
  title: string;
17
17
  subtitle: string;
18
+ completed: boolean;
19
+ current: boolean;
18
20
  private contentBelow;
19
21
  private size;
20
22
  private icon;
@@ -22,6 +24,7 @@ export declare class NileVerticalStepperItem extends NileElement {
22
24
  private isLast;
23
25
  private isComplete;
24
26
  private isCurrent;
27
+ private isManualMode;
25
28
  private currentStepValue;
26
29
  private completedStepValue;
27
30
  private calculatedCompletedStepValue;
@@ -22,6 +22,8 @@ let NileVerticalStepperItem = class NileVerticalStepperItem extends NileElement
22
22
  /* Properties passed directly */
23
23
  this.title = '';
24
24
  this.subtitle = '';
25
+ this.completed = false;
26
+ this.current = false;
25
27
  /* Properties passed to parent component: NileStepper */
26
28
  this.contentBelow = false;
27
29
  this.size = 'lg';
@@ -31,6 +33,7 @@ let NileVerticalStepperItem = class NileVerticalStepperItem extends NileElement
31
33
  this.isLast = false;
32
34
  this.isComplete = false;
33
35
  this.isCurrent = false;
36
+ this.isManualMode = false;
34
37
  this.haveFlex = true;
35
38
  /* #endregion */
36
39
  }
@@ -50,8 +53,8 @@ let NileVerticalStepperItem = class NileVerticalStepperItem extends NileElement
50
53
  render() {
51
54
  if (this.isLast)
52
55
  this.style.setProperty('--vertical-stepper-flex-val', `0`);
53
- const isCurrent = this.isCurrent;
54
- const isComplete = this.isComplete;
56
+ const isCurrent = this.isManualMode ? this.current : this.isCurrent;
57
+ const isComplete = this.isManualMode ? this.completed : this.isComplete;
55
58
  let showCompletedIcon = false;
56
59
  if (isComplete && !isCurrent || this.completedStepValue == this.value)
57
60
  showCompletedIcon = true;
@@ -104,6 +107,12 @@ __decorate([
104
107
  __decorate([
105
108
  property({ attribute: true, reflect: true })
106
109
  ], NileVerticalStepperItem.prototype, "subtitle", void 0);
110
+ __decorate([
111
+ property({ attribute: true, reflect: true })
112
+ ], NileVerticalStepperItem.prototype, "completed", void 0);
113
+ __decorate([
114
+ property({ attribute: true, reflect: true })
115
+ ], NileVerticalStepperItem.prototype, "current", void 0);
107
116
  __decorate([
108
117
  state()
109
118
  ], NileVerticalStepperItem.prototype, "contentBelow", void 0);
@@ -125,6 +134,9 @@ __decorate([
125
134
  __decorate([
126
135
  state()
127
136
  ], NileVerticalStepperItem.prototype, "isCurrent", void 0);
137
+ __decorate([
138
+ state()
139
+ ], NileVerticalStepperItem.prototype, "isManualMode", void 0);
128
140
  __decorate([
129
141
  state()
130
142
  ], NileVerticalStepperItem.prototype, "currentStepValue", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-vertical-stepper-item.js","sourceRoot":"","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,OAAO,EAAE,IAAI,EAAiC,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AACxD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD;;;;;GAKG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,WAAW;IAAjD;;QACN,gCAAgC;QACY,UAAK,GAAW,EAAE,CAAC;QACnB,aAAQ,GAAW,EAAE,CAAC;QAGlE,wDAAwD;QACvC,iBAAY,GAAG,KAAK,CAAC;QACrB,SAAI,GAAiB,IAAI,CAAC;QAC1B,SAAI,GAAG,MAAM,CAAC;QAG/B,+DAA+D;QAC9C,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,KAAK,CAAC;QAEf,eAAU,GAAG,KAAK,CAAC;QACnB,cAAS,GAAG,KAAK,CAAC;QAMlB,aAAQ,GAAU,IAAI,CAAC;QAwExC,gBAAgB;IACjB,CAAC;IAvEA;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACZ,IAAI,IAAI,CAAC,MAAM;YAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;QAC5E,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,MAAM,UAAU,GAAG,IAAI,CA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ACd;IAAhB,KAAK,EAAE;yDAAgC;AAvB5B,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAgGnC;;AAED,eAAe,uBAAuB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, nothing, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport {styles} from './nile-vertical-stepper-item.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile vertical-stepper-item component.\n *\n * @tag nile-vertical-stepper-item\n *\n */\n@customElement('nile-vertical-stepper-item')\nexport class NileVerticalStepperItem extends NileElement {\n\t/* Properties passed directly */\n\t@property({attribute: true, reflect: true}) title: string = '';\n\t@property({attribute: true, reflect: true}) subtitle: string = '';\n\n\n\t/* Properties passed to parent component: NileStepper */\n\t@state() private contentBelow = false;\n\t@state() private size : 'sm' | 'lg' = 'lg';\n\t@state() private icon = 'tick';\n\n\n\t/* Properties Computed at parent level component NileStepper */\n\t@state() private isFirst = false;\n\t@state() private isLast = false;\n\n\t@state() private isComplete = false;\n\t@state() private isCurrent = false;\n\t@state() private currentStepValue :Number;\n\t@state() private completedStepValue :Number;\n\t@state() private calculatedCompletedStepValue :Number;\n\n\t@state() private value :Number;\n\t@state() private haveFlex :Boolean=true;\n\n\t/**\n\t * The styles for nile-vertical-stepper-item\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\tif (this.isLast) this.style.setProperty('--vertical-stepper-flex-val', `0`);\n\t\tconst isCurrent = this.isCurrent;\n\t\tconst isComplete = this.isComplete;\n\n\t\tlet showCompletedIcon=false;\n\t\tif(isComplete && !isCurrent || this.completedStepValue==this.value) showCompletedIcon=true;\n\n\t\tlet suffixStepperLineActive = false;\n\t\tif (isComplete) {\n\t\t\tsuffixStepperLineActive = true;\n\t\t\tif (this.calculatedCompletedStepValue == this.value) suffixStepperLineActive = false;\n\t\t}\n\n\t\tlet iconSize = this.size == 'sm'?14:this.size == 'lg'?16:20;\n\t\treturn html`\n\t\t\t<div \n\t\t\tpart=\"item\"\n\t\t\tclass=\"${classMap({\n\t\t\t\t'stepper__item':true,\n\t\t\t\t'stepper__item--selected':isCurrent,\n\t\t\t\t'stepper__item--default':!isCurrent,\n\t\t\t\t'stepper__item--sm':this.size=='sm',\n\t\t\t\t'stepper__item--lg':this.size=='lg',\n\t\t\t})}\">\n\t\t\t\t<div part=\"connector\" class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div part=\"bulletin\" class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t${showCompletedIcon ? \n\t\t\t\t\t\t\thtml`<div part=\"bulletin-icon\" class=\"${classMap({ 'stepper__bulletin--icon':true, 'stepper__bulletin__icon--active':isCurrent })}\">${this.getSvg()}</div>`\n\t\t\t\t\t\t\t: html`<div part=\"bulletin-dot\" class=\"${classMap({ 'stepper__bulletin--dot':true, 'stepper__bulletin__dot--active':isCurrent })}\"></div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div part=\"line-container\" class=\"stepper__item__line__container\">\n\t\t\t\t\t\t${this.isLast?nothing : html`<div part=\"line\" class=\"${classMap({ 'stepper__item__line':true, 'stepper__item__line--active':suffixStepperLineActive })}\"></div>`}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div part=\"content\" class=\"stepper__item__content\">\n\t\t\t\t\t<div part=\"title\" class=\"${classMap({ 'stepper__content__title':true, \"stepper__content__title--alone\": !this.subtitle, 'stepper__content__title--active':isCurrent })}\">${this.title}</div>\n\t\t\t\t\t<div part=\"subtitle\" class=\"${classMap({ 'stepper__content__subtitle':true, \"stepper__content__subtitle--alone\": !this.title, 'stepper__content__subtitle--active':isCurrent })}\">${this.subtitle}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\tgetSvg():TemplateResult{\n\t\tlet iconSize = this.size == 'sm' ? 20 : this.size == 'lg' ? 24 : 28;\n\t\treturn html`\n\t\t<svg width=\"${iconSize}\" height=\"${iconSize}\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t`\n\t}\n\n\n\t/* #endregion */\n}\n\nexport default NileVerticalStepperItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-vertical-stepper-item': NileVerticalStepperItem;\n }\n}"]}
1
+ {"version":3,"file":"nile-vertical-stepper-item.js","sourceRoot":"","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,OAAO,EAAE,IAAI,EAAiC,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AACxD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;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K,EAAE;sDAAuB;AACd;IAAhB,KAAK,EAAE;yDAAgC;AA1B5B,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAmGnC;;AAED,eAAe,uBAAuB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, nothing, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport {styles} from './nile-vertical-stepper-item.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile vertical-stepper-item component.\n *\n * @tag nile-vertical-stepper-item\n *\n */\n@customElement('nile-vertical-stepper-item')\nexport class NileVerticalStepperItem extends NileElement {\n\t/* Properties passed directly */\n\t@property({attribute: true, reflect: true}) title: string = '';\n\t@property({attribute: true, reflect: true}) subtitle: string = '';\n\t@property({attribute: true, reflect: true}) completed: boolean = false;\n\t@property({attribute: true, reflect: true}) current: boolean = false;\n\n\n\t/* Properties passed to parent component: NileStepper */\n\t@state() private contentBelow = false;\n\t@state() private size : 'sm' | 'lg' = 'lg';\n\t@state() private icon = 'tick';\n\n\n\t/* Properties Computed at parent level component NileStepper */\n\t@state() private isFirst = false;\n\t@state() private isLast = false;\n\n\t@state() private isComplete = false;\n\t@state() private isCurrent = false;\n\t@state() private isManualMode = false;\n\t@state() private currentStepValue :Number;\n\t@state() private completedStepValue :Number;\n\t@state() private calculatedCompletedStepValue :Number;\n\n\t@state() private value :Number;\n\t@state() private haveFlex :Boolean=true;\n\n\t/**\n\t * The styles for nile-vertical-stepper-item\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\tif (this.isLast) this.style.setProperty('--vertical-stepper-flex-val', `0`);\n\t\tconst isCurrent = this.isManualMode ? this.current : this.isCurrent;\n\t\tconst isComplete = this.isManualMode ? this.completed : this.isComplete;\n\n\t\tlet showCompletedIcon=false;\n\t\tif(isComplete && !isCurrent || this.completedStepValue==this.value) showCompletedIcon=true;\n\n\t\tlet suffixStepperLineActive = false;\n\t\tif (isComplete) {\n\t\t\tsuffixStepperLineActive = true;\n\t\t\tif (this.calculatedCompletedStepValue == this.value) suffixStepperLineActive = false;\n\t\t}\n\n\t\tlet iconSize = this.size == 'sm'?14:this.size == 'lg'?16:20;\n\t\treturn html`\n\t\t\t<div \n\t\t\tpart=\"item\"\n\t\t\tclass=\"${classMap({\n\t\t\t\t'stepper__item':true,\n\t\t\t\t'stepper__item--selected':isCurrent,\n\t\t\t\t'stepper__item--default':!isCurrent,\n\t\t\t\t'stepper__item--sm':this.size=='sm',\n\t\t\t\t'stepper__item--lg':this.size=='lg',\n\t\t\t})}\">\n\t\t\t\t<div part=\"connector\" class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div part=\"bulletin\" class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t${showCompletedIcon ? \n\t\t\t\t\t\t\thtml`<div part=\"bulletin-icon\" class=\"${classMap({ 'stepper__bulletin--icon':true, 'stepper__bulletin__icon--active':isCurrent })}\">${this.getSvg()}</div>`\n\t\t\t\t\t\t\t: html`<div part=\"bulletin-dot\" class=\"${classMap({ 'stepper__bulletin--dot':true, 'stepper__bulletin__dot--active':isCurrent })}\"></div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div part=\"line-container\" class=\"stepper__item__line__container\">\n\t\t\t\t\t\t${this.isLast?nothing : html`<div part=\"line\" class=\"${classMap({ 'stepper__item__line':true, 'stepper__item__line--active':suffixStepperLineActive })}\"></div>`}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div part=\"content\" class=\"stepper__item__content\">\n\t\t\t\t\t<div part=\"title\" class=\"${classMap({ 'stepper__content__title':true, \"stepper__content__title--alone\": !this.subtitle, 'stepper__content__title--active':isCurrent })}\">${this.title}</div>\n\t\t\t\t\t<div part=\"subtitle\" class=\"${classMap({ 'stepper__content__subtitle':true, \"stepper__content__subtitle--alone\": !this.title, 'stepper__content__subtitle--active':isCurrent })}\">${this.subtitle}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\tgetSvg():TemplateResult{\n\t\tlet iconSize = this.size == 'sm' ? 20 : this.size == 'lg' ? 24 : 28;\n\t\treturn html`\n\t\t<svg width=\"${iconSize}\" height=\"${iconSize}\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t`\n\t}\n\n\n\t/* #endregion */\n}\n\nexport default NileVerticalStepperItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-vertical-stepper-item': NileVerticalStepperItem;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Version utility - placeholders will be replaced during build
2
- export const NILE_ELEMENTS_VERSION = '1.1.1-beta-1.0';
2
+ export const NILE_ELEMENTS_VERSION = '1.1.1';
3
3
  export const NILE_VERSION = '1.0.4';
4
4
  // Set global versions for runtime access
5
5
  if (typeof window !== 'undefined') {
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE/C,yCAAyC;AACzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACjC,MAAc,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IAC3D,MAAc,CAAC,WAAW,GAAG,YAAY,CAAC;AAC7C,CAAC","sourcesContent":["// Version utility - placeholders will be replaced during build\nexport const NILE_ELEMENTS_VERSION = '1.1.1-beta-1.0';\nexport const NILE_VERSION = '1.0.4';\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n (window as any).nileVersion = NILE_VERSION;\n}\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE/C,yCAAyC;AACzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACjC,MAAc,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IAC3D,MAAc,CAAC,WAAW,GAAG,YAAY,CAAC;AAC7C,CAAC","sourcesContent":["// Version utility - placeholders will be replaced during build\nexport const NILE_ELEMENTS_VERSION = '1.1.1';\nexport const NILE_VERSION = '1.0.4';\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n (window as any).nileVersion = NILE_VERSION;\n}\n"]}