@aquera/nile-elements 0.0.6-7 → 0.0.6-8

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.
Files changed (36) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js +3 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js +3 -0
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +3 -0
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +9 -22
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  10. package/dist/index.iife.js +34 -25
  11. package/dist/nile-input/nile-input.cjs.js +1 -1
  12. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  13. package/dist/nile-input/nile-input.esm.js +7 -5
  14. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  15. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  16. package/dist/nile-radio-group/nile-radio-group.esm.js +9 -7
  17. package/dist/nile-select/nile-select.cjs.js +1 -1
  18. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  19. package/dist/nile-select/nile-select.esm.js +10 -8
  20. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  21. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  22. package/dist/nile-switcher/nile-switcher.esm.js +8 -5
  23. package/dist/src/nile-input/nile-input.js +3 -0
  24. package/dist/src/nile-input/nile-input.js.map +1 -1
  25. package/dist/src/nile-radio-group/nile-radio-group.js +3 -0
  26. package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  27. package/dist/src/nile-select/nile-select.js +3 -0
  28. package/dist/src/nile-select/nile-select.js.map +1 -1
  29. package/dist/src/nile-switcher/nile-switcher.js +9 -22
  30. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +1 -1
  33. package/src/nile-input/nile-input.ts +3 -0
  34. package/src/nile-radio-group/nile-radio-group.ts +3 -0
  35. package/src/nile-select/nile-select.ts +3 -0
  36. package/src/nile-switcher/nile-switcher.ts +10 -21
@@ -992,10 +992,10 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
992
992
  * @license
993
993
  * Copyright 2020 Google LLC
994
994
  * SPDX-License-Identifier: BSD-3-Clause
995
- */})(M),N}});M.NileInput=class extends GM{constructor(){super(...arguments),this.formControlController=new QM(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new hM(this,"help-text","label"),this.hasFocus=!1,this.title="",this.type="text",this.name="",this.value="",this.defaultValue="",this.size="medium",this.filled=!1,this.warning=!1,this.error=!1,this.success=!1,this.pill=!1,this.label="",this.helpText="",this.errorMessage="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.spellcheck=!0}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}get valueAsDate(){const M=document.createElement("input");return M.type="date",M.value=this.value,M.valueAsDate}set valueAsDate(M){const N=document.createElement("input");N.type="date",N.valueAsDate=M,this.value=N.value}get valueAsNumber(){const M=document.createElement("input");return M.type="number",M.value=this.value,M.valueAsNumber}set valueAsNumber(M){const N=document.createElement("input");N.type="number",N.valueAsNumber=M,this.value=N.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.emit("nile-change",{value:this.value})}handleClearClick(M){this.value="",this.emit("nile-clear",{value:this.value}),this.emit("nile-input",{value:this.value}),this.emit("nile-change",{value:this.value}),this.input.focus(),M.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value})}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("nile-input",{value:this.value})}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}handleKeyDown(M){const N=M.metaKey||M.ctrlKey||M.shiftKey||M.altKey;"Enter"!==M.key||N||setTimeout((()=>{M.defaultPrevented||M.isComposing||this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(M){this.input.focus(M)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(M,N,D="none"){this.input.setSelectionRange(M,N,D)}setRangeText(M,N,D,i){this.input.setRangeText(M,N,D,i),this.value!==this.input.value&&(this.value=this.input.value)}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(M){this.input.setCustomValidity(M),this.formControlController.updateValidity()}render(){const M=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const N=!!this.label||!!M,D=!!this.helpText,i=!!this.errorMessage,j=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return V`
995
+ */})(M),N}});M.NileInput=class extends GM{constructor(){super(...arguments),this.formControlController=new QM(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new hM(this,"help-text","label"),this.hasFocus=!1,this.title="",this.type="text",this.name="",this.value="",this.defaultValue="",this.size="medium",this.filled=!1,this.warning=!1,this.error=!1,this.success=!1,this.pill=!1,this.label="",this.helpText="",this.errorMessage="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.spellcheck=!0}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}get valueAsDate(){const M=document.createElement("input");return M.type="date",M.value=this.value,M.valueAsDate}set valueAsDate(M){const N=document.createElement("input");N.type="date",N.valueAsDate=M,this.value=N.value}get valueAsNumber(){const M=document.createElement("input");return M.type="number",M.value=this.value,M.valueAsNumber}set valueAsNumber(M){const N=document.createElement("input");N.type="number",N.valueAsNumber=M,this.value=N.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.emit("nile-change",{value:this.value})}handleClearClick(M){this.value="",this.emit("nile-clear",{value:this.value}),this.emit("nile-input",{value:this.value}),this.emit("nile-change",{value:this.value}),this.input.focus(),M.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value})}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("nile-input",{value:this.value})}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}handleKeyDown(M){const N=M.metaKey||M.ctrlKey||M.shiftKey||M.altKey;"Enter"!==M.key||N||setTimeout((()=>{M.defaultPrevented||M.isComposing||this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(M){this.input.focus(M)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(M,N,D="none"){this.input.setSelectionRange(M,N,D)}setRangeText(M,N,D,i){this.input.setRangeText(M,N,D,i),this.value!==this.input.value&&(this.value=this.input.value)}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(M){this.input.setCustomValidity(M),this.formControlController.updateValidity()}render(){const M=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const N=!!this.label||!!M,D=this.hasSlotController.test("label-suffix"),i=!!this.helpText,j=!!this.errorMessage,I=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return V`
996
996
  <div
997
997
  part="form-control"
998
- class=${EM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":N,"form-control--has-help-text":D})}
998
+ class=${EM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":N,"form-control--has-help-text":i})}
999
999
  >
1000
1000
  <label
1001
1001
  part="form-control-label"
@@ -1006,6 +1006,8 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
1006
1006
  <slot name="label">${this.label}</slot>
1007
1007
  </label>
1008
1008
 
1009
+ ${D?V` <slot name="label-suffix"></slot> `:""}
1010
+
1009
1011
  <div part="form-control-input" class="form-control-input">
1010
1012
  <div
1011
1013
  part="base"
@@ -1046,7 +1048,7 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
1046
1048
  @blur=${this.handleBlur}
1047
1049
  />
1048
1050
 
1049
- ${j?V`
1051
+ ${I?V`
1050
1052
  <button
1051
1053
  part="clear-button"
1052
1054
  class="input__clear"
@@ -1091,11 +1093,11 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
1091
1093
  </div>
1092
1094
  </div>
1093
1095
 
1094
- ${D?V`
1096
+ ${i?V`
1095
1097
  <nile-form-help-text>${this.helpText}</nile-form-help-text>
1096
1098
  `:""}
1097
1099
 
1098
- ${i?V`
1100
+ ${j?V`
1099
1101
  <nile-form-error-message
1100
1102
  >${this.errorMessage}</nile-form-error-message
1101
1103
  >
@@ -1826,7 +1828,7 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
1826
1828
  white-space: nowrap;
1827
1829
  border: 0;
1828
1830
  }
1829
- `;M.NileRadioGroup=class extends GM{constructor(){super(...arguments),this.hasSlotController=new hM(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.label="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1,this.helpText="",this.errorMessage=""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getAllRadios(){return[...this.querySelectorAll("nile-radio")]}handleRadioClick(M){const N=M.target.closest("nile-radio"),D=this.getAllRadios(),i=this.value;N.disabled||this.disabled||(this.value=N.value,D.forEach((M=>M.checked=M===N)),this.value!==i&&(this.emit("change",{value:this.value}),this.emit("input")))}handleDisabledChange(){this.getAllRadios().forEach((M=>{M.disabled=this.disabled}))}handleInitialDisabledState(){this.getAllRadios().forEach((M=>{M.disabled=M.hasAttribute("disabled")?M.disabled:this.disabled}))}handleKeyDown(M){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(M.key))return;const N=this.getAllRadios().filter((M=>!M.disabled)),D=N.find((M=>M.checked))??N[0],i=" "===M.key?0:["ArrowUp","ArrowLeft"].includes(M.key)?-1:1,j=this.value;let I=N.indexOf(D)+i;I<0&&(I=N.length-1),I>N.length-1&&(I=0),this.getAllRadios().forEach((M=>{M.checked=!1,this.hasButtonGroup||(M.tabIndex=-1)})),this.value=N[I].value,N[I].checked=!0,this.hasButtonGroup?N[I].shadowRoot.querySelector("button").focus():(N[I].tabIndex=0,N[I].focus()),this.value!==j&&(this.emit("change"),this.emit("input")),M.preventDefault()}handleLabelClick(){const M=this.getAllRadios(),N=M.find((M=>M.checked)),D=N||M[0];D&&D.focus()}handleSlotChange(){const M=this.getAllRadios();if(M.forEach((M=>M.checked=M.value===this.value)),this.hasButtonGroup=M.some((M=>"nile-radio-button"===M.tagName.toLowerCase())),!M.some((M=>M.checked)))if(this.hasButtonGroup){M[0].shadowRoot.querySelector("button").tabIndex=0}else M[0].tabIndex=0;this.hasButtonGroup&&this.shadowRoot?.querySelector("nile-button-group")}updateCheckedRadio(){this.getAllRadios().forEach((M=>M.checked=M.value===this.value))}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}render(){const M=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const N=!!this.label||!!M,D=!!this.helpText,i=!!this.errorMessage,j=V`
1831
+ `;M.NileRadioGroup=class extends GM{constructor(){super(...arguments),this.hasSlotController=new hM(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.label="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1,this.helpText="",this.errorMessage=""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getAllRadios(){return[...this.querySelectorAll("nile-radio")]}handleRadioClick(M){const N=M.target.closest("nile-radio"),D=this.getAllRadios(),i=this.value;N.disabled||this.disabled||(this.value=N.value,D.forEach((M=>M.checked=M===N)),this.value!==i&&(this.emit("change",{value:this.value}),this.emit("input")))}handleDisabledChange(){this.getAllRadios().forEach((M=>{M.disabled=this.disabled}))}handleInitialDisabledState(){this.getAllRadios().forEach((M=>{M.disabled=M.hasAttribute("disabled")?M.disabled:this.disabled}))}handleKeyDown(M){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(M.key))return;const N=this.getAllRadios().filter((M=>!M.disabled)),D=N.find((M=>M.checked))??N[0],i=" "===M.key?0:["ArrowUp","ArrowLeft"].includes(M.key)?-1:1,j=this.value;let I=N.indexOf(D)+i;I<0&&(I=N.length-1),I>N.length-1&&(I=0),this.getAllRadios().forEach((M=>{M.checked=!1,this.hasButtonGroup||(M.tabIndex=-1)})),this.value=N[I].value,N[I].checked=!0,this.hasButtonGroup?N[I].shadowRoot.querySelector("button").focus():(N[I].tabIndex=0,N[I].focus()),this.value!==j&&(this.emit("change"),this.emit("input")),M.preventDefault()}handleLabelClick(){const M=this.getAllRadios(),N=M.find((M=>M.checked)),D=N||M[0];D&&D.focus()}handleSlotChange(){const M=this.getAllRadios();if(M.forEach((M=>M.checked=M.value===this.value)),this.hasButtonGroup=M.some((M=>"nile-radio-button"===M.tagName.toLowerCase())),!M.some((M=>M.checked)))if(this.hasButtonGroup){M[0].shadowRoot.querySelector("button").tabIndex=0}else M[0].tabIndex=0;this.hasButtonGroup&&this.shadowRoot?.querySelector("nile-button-group")}updateCheckedRadio(){this.getAllRadios().forEach((M=>M.checked=M.value===this.value))}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}render(){const M=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const N=this.hasSlotController.test("label-suffix"),D=!!this.label||!!M,i=!!this.helpText,j=!!this.errorMessage,I=V`
1830
1832
  <slot
1831
1833
  @click=${this.handleRadioClick}
1832
1834
  @keydown=${this.handleKeyDown}
@@ -1836,7 +1838,7 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
1836
1838
  `;return V`
1837
1839
  <fieldset
1838
1840
  part="form-control"
1839
- class=${EM({"form-control":!0,"form-control--medium":!0,"form-control--radio-group":!0,"form-control--has-label":N,"form-control--has-help-text":D})}
1841
+ class=${EM({"form-control":!0,"form-control--medium":!0,"form-control--radio-group":!0,"form-control--has-label":D,"form-control--has-help-text":i})}
1840
1842
  role="radiogroup"
1841
1843
  aria-labelledby="label"
1842
1844
  aria-describedby="help-text"
@@ -1846,12 +1848,14 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
1846
1848
  part="form-control-label"
1847
1849
  id="label"
1848
1850
  class="form-control__label"
1849
- aria-hidden=${N?"false":"true"}
1851
+ aria-hidden=${D?"false":"true"}
1850
1852
  @click=${this.handleLabelClick}
1851
1853
  >
1852
1854
  <slot name="label">${this.label}</slot>
1853
1855
  </label>
1854
1856
 
1857
+ ${N?V` <slot name="label-suffix"></slot> `:""}
1858
+
1855
1859
  <div part="form-control-input" class="form-control-input">
1856
1860
  <div class="visually-hidden">
1857
1861
  <label class="radio-group__validation">
@@ -1866,16 +1870,16 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
1866
1870
  </div>
1867
1871
 
1868
1872
  ${this.hasButtonGroup?V`
1869
- ${j}
1873
+ ${I}
1870
1874
  `:V`
1871
- <div class="${this.labelInline?"form-control--inline-radio":""}"> ${j}</div> `}
1875
+ <div class="${this.labelInline?"form-control--inline-radio":""}"> ${I}</div> `}
1872
1876
  </div>
1873
1877
 
1874
- ${D?V`
1878
+ ${i?V`
1875
1879
  <nile-form-help-text>${this.helpText}</nile-form-help-text>
1876
1880
  `:""}
1877
1881
 
1878
- ${i?V`
1882
+ ${j?V`
1879
1883
  <nile-form-error-message
1880
1884
  >${this.errorMessage}</nile-form-error-message
1881
1885
  >
@@ -2829,24 +2833,26 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
2829
2833
  ></nile-icon-button>
2830
2834
  `:""}
2831
2835
  </span>
2832
- `}},M.NileTag.styles=wD,N([zM({reflect:!0})],M.NileTag.prototype,"variant",void 0),N([zM({reflect:!0})],M.NileTag.prototype,"size",void 0),N([zM({type:Boolean,reflect:!0})],M.NileTag.prototype,"pill",void 0),N([zM({type:Boolean})],M.NileTag.prototype,"removable",void 0),M.NileTag=N([uM("nile-tag")],M.NileTag),M.NileSelect=class extends GM{constructor(){super(...arguments),this.formControlController=new QM(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new hM(this,"help-text","label"),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.searchValue="",this.searchEnabled=!1,this.optionsLoading=!1,this.multiple=!1,this.helpText="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showSelected=!1,this.noResultsMessage="No results found"}get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}connectedCallback(){super.connectedCallback(),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1,this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleFooterClick(M){M.stopPropagation(),M.preventDefault()}toggleShowSelected(M){if(M.stopPropagation(),M.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((M=>{M.selected=!1,M.hidden=!1})),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name})}handleDocumentKeyDown(M){const N=M.target,D=null!==N.closest(".select__clear"),i=null!==N.closest("nile-icon-button");if(!D&&!i){if("Escape"===M.key&&this.open&&(M.preventDefault(),M.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===M.key||" "===M.key&&""===this.typeToSelectString)return M.preventDefault(),M.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(M.key)){const N=this.getAllOptions(),D=N.indexOf(this.currentOption);let i=Math.max(0,D);if(M.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===M.key?(i=D+1,i>N.length-1&&(i=0)):"ArrowUp"===M.key?(i=D-1,i<0&&(i=N.length-1)):"Home"===M.key?i=0:"End"===M.key&&(i=N.length-1),this.setCurrentOption(N[i])}if(1===M.key.length||"Backspace"===M.key){const N=this.getAllOptions();if(M.metaKey||M.ctrlKey||M.altKey)return;if(!this.open){if("Backspace"===M.key)return;this.show()}M.stopPropagation(),M.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===M.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=M.key.toLowerCase();for(const M of N){if(M.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(M);break}}}}}handleDocumentMouseDown(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(M){const N=M.composedPath().some((M=>M instanceof Element&&"nile-icon-button"===M.tagName.toLowerCase()));this.disabled||N||(M.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(M){M.stopPropagation(),this.handleDocumentKeyDown(M)}handleClearClick(M){M.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then((()=>{this.emit("nile-clear",{value:this.value,name:this.name}),this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})))}handleClearMouseDown(M){M.stopPropagation(),M.preventDefault()}handleOptionClick(M){const N=M.target.closest("nile-option"),D=this.value;if(N&&!N.disabled&&(this.multiple?this.toggleOptionSelection(N):this.setSelectedOptions(N),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==D&&this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))),this.showSelected){this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}}handleDefaultSlotChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value],D=[];customElements.get("nile-option")?(M.forEach((M=>D.push(M.value))),this.setSelectedOptions(M.filter((M=>N.includes(M.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(M,N){M.stopPropagation(),this.disabled||(this.toggleOptionSelection(N,!1),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})))}getAllOptions(){return[...this.querySelectorAll("nile-option")]}getOptionPrefix(M){const N=M.shadowRoot?.querySelector('slot[name="prefix"]');if(!N)return"";const D=N.assignedNodes(),i=[];return D.forEach((M=>{M instanceof HTMLElement?i.push(M.outerHTML):M.nodeType===Node.TEXT_NODE&&i.push(M.textContent||"")})),i.join("")}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(M){this.getAllOptions().forEach((M=>{M.current=!1,M.tabIndex=-1})),M&&(this.currentOption=M,M.current=!0,M.tabIndex=0,M.focus())}setSelectedOptions(M){const N=this.getAllOptions(),D=Array.isArray(M)?M:[M];N.forEach((M=>M.selected=!1)),D.length&&D.forEach((M=>M.selected=!0)),this.selectionChanged()}toggleOptionSelection(M,N){M.selected=!0===N||!1===N?N:!M.selected,this.selectionChanged()}selectionChanged(){this.selectedOptions=this.getAllOptions().filter((M=>M.selected)),this.multiple?(this.value=this.selectedOptions.map((M=>M.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected"):(this.value=this.selectedOptions[0]?.value??"",this.displayLabel=this.selectedOptions[0]?.getTextLabel()??""),this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(M){this.searchValue=M.detail.value,0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}filterOptions(M){const N=this.getAllOptions(),D=M.toLowerCase();let i=[];return N.forEach((M=>{const N=M.getTextLabel().toLowerCase(),j=(M.value||"").toLowerCase();N.includes(D)||j.includes(D)?(M.hidden=!1,i.push(M)):M.hidden=!0})),i}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(M.filter((M=>N.includes(M.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.addOpenListeners(),await uD(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:M,options:N}=tD(this,"select.show",{dir:"ltr"});await jD(this.popup.popup,M,N),this.currentOption&&ED(this.currentOption,this.listbox,"vertical","auto"),this.emit("nile-after-show",{value:this.value,name:this.name})}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.removeOpenListeners(),await uD(this);const{keyframes:M,options:N}=tD(this,"select.hide",{dir:"ltr"});await jD(this.popup.popup,M,N),this.listbox.hidden=!0,this.popup.active=!1,this.emit("nile-after-hide",{value:this.value,name:this.name})}}async show(){if(!this.open&&!this.disabled)return this.open=!0,yD(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,yD(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(M){this.valueInput.setCustomValidity(M),this.formControlController.updateValidity()}focus(M){this.displayInput.focus(M)}blur(){this.displayInput.blur()}onInputChange(M){M.stopPropagation()}render(){const M=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const N=!!this.label||!!M,D=this.clearable&&!this.disabled&&this.value.length>0,i=this.placeholder&&0===this.value.length,j=this.searchValue||"",I=!!this.helpText,g=!!this.errorMessage;return V`
2836
+ `}},M.NileTag.styles=wD,N([zM({reflect:!0})],M.NileTag.prototype,"variant",void 0),N([zM({reflect:!0})],M.NileTag.prototype,"size",void 0),N([zM({type:Boolean,reflect:!0})],M.NileTag.prototype,"pill",void 0),N([zM({type:Boolean})],M.NileTag.prototype,"removable",void 0),M.NileTag=N([uM("nile-tag")],M.NileTag),M.NileSelect=class extends GM{constructor(){super(...arguments),this.formControlController=new QM(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new hM(this,"help-text","label"),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.searchValue="",this.searchEnabled=!1,this.optionsLoading=!1,this.multiple=!1,this.helpText="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showSelected=!1,this.noResultsMessage="No results found"}get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}connectedCallback(){super.connectedCallback(),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1,this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleFooterClick(M){M.stopPropagation(),M.preventDefault()}toggleShowSelected(M){if(M.stopPropagation(),M.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((M=>{M.selected=!1,M.hidden=!1})),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name})}handleDocumentKeyDown(M){const N=M.target,D=null!==N.closest(".select__clear"),i=null!==N.closest("nile-icon-button");if(!D&&!i){if("Escape"===M.key&&this.open&&(M.preventDefault(),M.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===M.key||" "===M.key&&""===this.typeToSelectString)return M.preventDefault(),M.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(M.key)){const N=this.getAllOptions(),D=N.indexOf(this.currentOption);let i=Math.max(0,D);if(M.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===M.key?(i=D+1,i>N.length-1&&(i=0)):"ArrowUp"===M.key?(i=D-1,i<0&&(i=N.length-1)):"Home"===M.key?i=0:"End"===M.key&&(i=N.length-1),this.setCurrentOption(N[i])}if(1===M.key.length||"Backspace"===M.key){const N=this.getAllOptions();if(M.metaKey||M.ctrlKey||M.altKey)return;if(!this.open){if("Backspace"===M.key)return;this.show()}M.stopPropagation(),M.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===M.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=M.key.toLowerCase();for(const M of N){if(M.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(M);break}}}}}handleDocumentMouseDown(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(M){const N=M.composedPath().some((M=>M instanceof Element&&"nile-icon-button"===M.tagName.toLowerCase()));this.disabled||N||(M.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(M){M.stopPropagation(),this.handleDocumentKeyDown(M)}handleClearClick(M){M.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then((()=>{this.emit("nile-clear",{value:this.value,name:this.name}),this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})))}handleClearMouseDown(M){M.stopPropagation(),M.preventDefault()}handleOptionClick(M){const N=M.target.closest("nile-option"),D=this.value;if(N&&!N.disabled&&(this.multiple?this.toggleOptionSelection(N):this.setSelectedOptions(N),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==D&&this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))),this.showSelected){this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}}handleDefaultSlotChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value],D=[];customElements.get("nile-option")?(M.forEach((M=>D.push(M.value))),this.setSelectedOptions(M.filter((M=>N.includes(M.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(M,N){M.stopPropagation(),this.disabled||(this.toggleOptionSelection(N,!1),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})))}getAllOptions(){return[...this.querySelectorAll("nile-option")]}getOptionPrefix(M){const N=M.shadowRoot?.querySelector('slot[name="prefix"]');if(!N)return"";const D=N.assignedNodes(),i=[];return D.forEach((M=>{M instanceof HTMLElement?i.push(M.outerHTML):M.nodeType===Node.TEXT_NODE&&i.push(M.textContent||"")})),i.join("")}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(M){this.getAllOptions().forEach((M=>{M.current=!1,M.tabIndex=-1})),M&&(this.currentOption=M,M.current=!0,M.tabIndex=0,M.focus())}setSelectedOptions(M){const N=this.getAllOptions(),D=Array.isArray(M)?M:[M];N.forEach((M=>M.selected=!1)),D.length&&D.forEach((M=>M.selected=!0)),this.selectionChanged()}toggleOptionSelection(M,N){M.selected=!0===N||!1===N?N:!M.selected,this.selectionChanged()}selectionChanged(){this.selectedOptions=this.getAllOptions().filter((M=>M.selected)),this.multiple?(this.value=this.selectedOptions.map((M=>M.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected"):(this.value=this.selectedOptions[0]?.value??"",this.displayLabel=this.selectedOptions[0]?.getTextLabel()??""),this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(M){this.searchValue=M.detail.value,0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}filterOptions(M){const N=this.getAllOptions(),D=M.toLowerCase();let i=[];return N.forEach((M=>{const N=M.getTextLabel().toLowerCase(),j=(M.value||"").toLowerCase();N.includes(D)||j.includes(D)?(M.hidden=!1,i.push(M)):M.hidden=!0})),i}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(M.filter((M=>N.includes(M.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.addOpenListeners(),await uD(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:M,options:N}=tD(this,"select.show",{dir:"ltr"});await jD(this.popup.popup,M,N),this.currentOption&&ED(this.currentOption,this.listbox,"vertical","auto"),this.emit("nile-after-show",{value:this.value,name:this.name})}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.removeOpenListeners(),await uD(this);const{keyframes:M,options:N}=tD(this,"select.hide",{dir:"ltr"});await jD(this.popup.popup,M,N),this.listbox.hidden=!0,this.popup.active=!1,this.emit("nile-after-hide",{value:this.value,name:this.name})}}async show(){if(!this.open&&!this.disabled)return this.open=!0,yD(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,yD(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(M){this.valueInput.setCustomValidity(M),this.formControlController.updateValidity()}focus(M){this.displayInput.focus(M)}blur(){this.displayInput.blur()}onInputChange(M){M.stopPropagation()}render(){const M=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const N=this.hasSlotController.test("label-suffix"),D=!!this.label||!!M,i=this.clearable&&!this.disabled&&this.value.length>0,j=this.placeholder&&0===this.value.length,I=this.searchValue||"",g=!!this.helpText,u=!!this.errorMessage;return V`
2833
2837
  <div
2834
2838
  part="form-control"
2835
- class=${EM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":N,"form-control--has-help-text":I})}
2839
+ class=${EM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":D,"form-control--has-help-text":g})}
2836
2840
  >
2837
2841
  <label
2838
2842
  id="label"
2839
2843
  part="form-control-label"
2840
2844
  class="form-control__label"
2841
- aria-hidden=${N?"false":"true"}
2845
+ aria-hidden=${D?"false":"true"}
2842
2846
  @click=${this.handleLabelClick}
2843
2847
  >
2844
2848
  <slot name="label">${this.label}</slot>
2845
2849
  </label>
2846
2850
 
2851
+ ${N?V` <slot name="label-suffix"></slot> `:""}
2852
+
2847
2853
  <div part="form-control-input" class="form-control-input">
2848
2854
  <nile-popup
2849
- class=${EM({select:!0,"select--warning":this.warning,"select--error":this.error,"select--success":this.success,"select--standard":!0,"select--filled":this.filled,"select--pill":this.pill,"select--open":this.open,"select--disabled":this.disabled,"select--multiple":this.multiple,"select--focused":this.hasFocus,"select--placeholder-visible":i,"select--top":"top"===this.placement,"select--bottom":"bottom"===this.placement,"select--small":"small"===this.size,"select--medium":"medium"===this.size,"select--large":"large"===this.size})}
2855
+ class=${EM({select:!0,"select--warning":this.warning,"select--error":this.error,"select--success":this.success,"select--standard":!0,"select--filled":this.filled,"select--pill":this.pill,"select--open":this.open,"select--disabled":this.disabled,"select--multiple":this.multiple,"select--focused":this.hasFocus,"select--placeholder-visible":j,"select--top":"top"===this.placement,"select--bottom":"bottom"===this.placement,"select--small":"small"===this.size,"select--medium":"medium"===this.size,"select--large":"large"===this.size})}
2850
2856
  placement=${this.placement}
2851
2857
  strategy=${this.hoist?"fixed":"absolute"}
2852
2858
  flip
@@ -2932,7 +2938,7 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
2932
2938
  @invalid=${this.handleInvalid}
2933
2939
  />
2934
2940
 
2935
- ${D?V`
2941
+ ${i?V`
2936
2942
  <button
2937
2943
  part="clear-button"
2938
2944
  class="select__clear"
@@ -2981,7 +2987,7 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
2981
2987
  <nile-input
2982
2988
  size="small"
2983
2989
  clearable
2984
- .value=${j}
2990
+ .value=${I}
2985
2991
  placeholder="Search..."
2986
2992
  @nile-input=${this.handleSearchChange}
2987
2993
  @nile-focus=${this.handleSearchFocus}
@@ -3025,8 +3031,8 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
3025
3031
  </nile-popup>
3026
3032
  </div>
3027
3033
 
3028
- ${I?V` <nile-form-help-text>${this.helpText}</nile-form-help-text> `:""}
3029
- ${g?V`
3034
+ ${g?V` <nile-form-help-text>${this.helpText}</nile-form-help-text> `:""}
3035
+ ${u?V`
3030
3036
  <nile-form-error-message
3031
3037
  >${this.errorMessage}</nile-form-error-message
3032
3038
  >
@@ -4341,17 +4347,19 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
4341
4347
  * @license
4342
4348
  * Copyright 2021 Google LLC
4343
4349
  * SPDX-License-Identifier: BSD-3-Clause
4344
- */,pD=(M,N,D)=>{for(const D of N)if(D[0]===M)return(0,D[1])();return null==D?void 0:D()};var WD;!function(M){M.DEFAULT="defaultInput",M.SWITCH="switchInput"}(WD||(WD={})),M.NileSwitcher=class extends GM{constructor(){super(...arguments),this.nileSwitchConfig={toggleSwitch:!1,defaultInput:{inputType:"radio",value:"True",options:["True","False"]},switchInput:{inputType:"text-area",value:"test"}}}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}renderNileText(M,N){const{value:D,label:i,placeholder:j,disabled:I}=M;return V`<nile-input
4350
+ */,pD=(M,N,D)=>{for(const D of N)if(D[0]===M)return(0,D[1])();return null==D?void 0:D()};var WD;!function(M){M.DEFAULT="defaultInput",M.SWITCH="switchInput"}(WD||(WD={})),M.NileSwitcher=class extends GM{connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}renderNileText(M,N){const{value:D,label:i,placeholder:j,disabled:I}=M;return V`<nile-input
4345
4351
  .value=${D}
4346
4352
  .label=${i}
4347
4353
  .disabled=${I}
4348
4354
  .placeholder=${j}
4349
4355
  @nile-input=${M=>{this.handleChange(M,N)}}
4350
- ></nile-input>`}renderDropdown(M,N){const{options:D,multiple:i,placeholder:j}=M;return V`<nile-select
4356
+ ></nile-input>`}renderDropdown(M,N){const{options:D,multiple:i,placeholder:j,disabled:I}=M;return V`<nile-select
4351
4357
  .placeholder=${j}
4358
+ .disabled="${I}"
4352
4359
  .multiple="${i}"
4353
4360
  @nile-change=${M=>{this.handleChange(M,N)}}
4354
- ${D&&D.map((M=>V`<nile-option .value="${M}">${M} </nile-option>`))}
4361
+ >
4362
+ ${D?.map((M=>V`<nile-option .value="${M}">${M} </nile-option>`))}
4355
4363
  </nile-select>`}renderNileTextArea(M,N){const{value:D,disabled:i}=M;return V`<nile-textarea
4356
4364
  .value=${D}
4357
4365
  .disabled=${i}
@@ -4361,12 +4369,13 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
4361
4369
  .label=${i}
4362
4370
  .disabled=${j}
4363
4371
  @valueChange=${M=>{this.handleChangeCheckbox(M,N)}}
4364
- ></nile-checkbox>`}renderNileRadio(M,N){const{options:D,value:i}=M;return V`<nile-radio-group
4372
+ ></nile-checkbox>`}renderNileRadio(M,N){const{options:D,value:i,disabled:j}=M;return V`<nile-radio-group
4365
4373
  .value=${i}
4374
+ .disabled=${j}
4366
4375
  @change=${M=>{this.handleChange(M,N)}}
4367
4376
  >
4368
4377
  ${D&&D.map((M=>V`<nile-radio .value="${M}">${M} </nile-radio>`))}
4369
- </nile-radio-group>`}handleChange(M,N){N===WD.DEFAULT?this.nileSwitchConfig.defaultInput.value=M.detail.value:this.nileSwitchConfig.switchInput.value=M.detail.value,console.log(this.nileSwitchConfig),this.emit("nile-change",{config:this.nileSwitchConfig})}handleChangeCheckbox(M,N){N===WD.DEFAULT?this.nileSwitchConfig.defaultInput.value=M.detail.checked:this.nileSwitchConfig.switchInput.value=M.detail.checked,this.emit("nile-change",{config:this.nileSwitchConfig})}renderIcon(){const M=this.nileSwitchConfig.toggleSwitch?"stringinput":"header-functions";return V`<nile-icon
4378
+ </nile-radio-group>`}handleChange(M,N){N===WD.DEFAULT?this.nileSwitchConfig.defaultInput.value=M.detail.value:this.nileSwitchConfig.switchInput.value=M.detail.value,M.stopPropagation(),this.emit("nile-change",{config:this.nileSwitchConfig})}handleChangeCheckbox(M,N){N===WD.DEFAULT?this.nileSwitchConfig.defaultInput.value=M.detail.checked:this.nileSwitchConfig.switchInput.value=M.detail.checked,this.emit("nile-change",{config:this.nileSwitchConfig})}renderIcon(){const M=this.nileSwitchConfig.toggleSwitch?"stringinput":"header-functions";return V`<nile-icon
4370
4379
  size="14"
4371
4380
  class=${EM({"pointer-cursor":!0,"flex-start":"stringinput"===M})}
4372
4381
  .name=${M}