@aquera/nile-elements 0.0.5-3 → 0.0.5-5

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 (38) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js +6 -2
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.d.ts +3 -0
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.js +20 -2
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-option/nile-option.css.js +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-option/nile-option.css.js.map +1 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +9 -0
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  11. package/dist/index.iife.js +9 -4
  12. package/dist/nile-link/nile-link.cjs.js +1 -1
  13. package/dist/nile-link/nile-link.cjs.js.map +1 -1
  14. package/dist/nile-link/nile-link.css.cjs.js +1 -1
  15. package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
  16. package/dist/nile-link/nile-link.css.esm.js +6 -2
  17. package/dist/nile-link/nile-link.esm.js +2 -2
  18. package/dist/nile-option/nile-option.css.cjs.js +1 -1
  19. package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
  20. package/dist/nile-option/nile-option.css.esm.js +3 -2
  21. package/dist/nile-select/nile-select.cjs.js +1 -1
  22. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  23. package/dist/nile-select/nile-select.esm.js +1 -1
  24. package/dist/src/nile-link/nile-link.css.js +6 -2
  25. package/dist/src/nile-link/nile-link.css.js.map +1 -1
  26. package/dist/src/nile-link/nile-link.d.ts +3 -0
  27. package/dist/src/nile-link/nile-link.js +20 -2
  28. package/dist/src/nile-link/nile-link.js.map +1 -1
  29. package/dist/src/nile-option/nile-option.css.js +1 -0
  30. package/dist/src/nile-option/nile-option.css.js.map +1 -1
  31. package/dist/src/nile-select/nile-select.js +9 -0
  32. package/dist/src/nile-select/nile-select.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +1 -1
  35. package/src/nile-link/nile-link.css.ts +6 -2
  36. package/src/nile-link/nile-link.ts +43 -18
  37. package/src/nile-option/nile-option.css.ts +1 -0
  38. package/src/nile-select/nile-select.ts +12 -0
@@ -2814,7 +2814,7 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
2814
2814
  ></nile-icon-button>
2815
2815
  `:""}
2816
2816
  </span>
2817
- `}},M.NileTag.styles=eD,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 kM(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}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;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})))}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 ID(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:M,options:N}=zD(this,"select.show",{dir:"ltr"});await DD(this.popup.popup,M,N),this.currentOption&&wD(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 ID(this);const{keyframes:M,options:N}=zD(this,"select.hide",{dir:"ltr"});await DD(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,AD(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,AD(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()}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`
2817
+ `}},M.NileTag.styles=eD,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 kM(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}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 ID(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:M,options:N}=zD(this,"select.show",{dir:"ltr"});await DD(this.popup.popup,M,N),this.currentOption&&wD(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 ID(this);const{keyframes:M,options:N}=zD(this,"select.hide",{dir:"ltr"});await DD(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,AD(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,AD(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()}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`
2818
2818
  <div
2819
2819
  part="form-control"
2820
2820
  class=${aM({"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})}
@@ -3100,6 +3100,7 @@ const YM=Symbol.for(""),bM=M=>{if((null==M?void 0:M.r)===YM)return null==M?void
3100
3100
  pointer-events: none;
3101
3101
  margin-left: 12px;
3102
3102
  margin-right: 12px;
3103
+ width:auto;
3103
3104
  }
3104
3105
 
3105
3106
  @media (forced-colors: active) {
@@ -4396,7 +4397,7 @@ font-weight: 500;
4396
4397
  gap: 8px;
4397
4398
  height: 38px;
4398
4399
  box-sizing: border-box;
4399
- cursor: pointer
4400
+ cursor: pointer;
4400
4401
  }
4401
4402
 
4402
4403
  .link__label {
@@ -4414,7 +4415,7 @@ font-weight: 500;
4414
4415
  color: rgba(0, 94, 166, 0.5);
4415
4416
  cursor: not-allowed;
4416
4417
  opacity: 0.6;
4417
- pointer-events:none;
4418
+ pointer-events: none;
4418
4419
  }
4419
4420
 
4420
4421
  :host(.link--disabled) {
@@ -4442,7 +4443,11 @@ font-weight: 500;
4442
4443
  border-radius: 4px;
4443
4444
  background: rgba(0, 94, 166, 0.1);
4444
4445
  }
4445
- `;class bD{constructor(M,...N){this.slotNames=[],(this.host=M).addController(this),this.slotNames=N,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some((M=>{if(M.nodeType===M.TEXT_NODE&&""!==M.textContent.trim())return!0;if(M.nodeType===M.ELEMENT_NODE){const N=M;if("nile-visually-hidden"===N.tagName.toLowerCase())return!1;if(!N.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(M){return null!==this.host.querySelector(`:scope > [slot="${M}"]`)}test(M){return"[default]"===M?this.hasDefaultSlot():this.hasNamedSlot(M)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(M){const N=M.target;(this.slotNames.includes("[default]")&&!N.name||N.name&&this.slotNames.includes(N.name))&&this.host.requestUpdate()}}M.NileLink=class extends GM{constructor(){super(...arguments),this.hasSlotController=new bD(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.disabled=!1,this.button=!1}static get styles(){return[YD]}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}render(){return V`
4446
+
4447
+ :host([disabled]) {
4448
+ pointer-events: none;
4449
+ }
4450
+ `;class bD{constructor(M,...N){this.slotNames=[],(this.host=M).addController(this),this.slotNames=N,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some((M=>{if(M.nodeType===M.TEXT_NODE&&""!==M.textContent.trim())return!0;if(M.nodeType===M.ELEMENT_NODE){const N=M;if("nile-visually-hidden"===N.tagName.toLowerCase())return!1;if(!N.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(M){return null!==this.host.querySelector(`:scope > [slot="${M}"]`)}test(M){return"[default]"===M?this.hasDefaultSlot():this.hasNamedSlot(M)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(M){const N=M.target;(this.slotNames.includes("[default]")&&!N.name||N.name&&this.slotNames.includes(N.name))&&this.host.requestUpdate()}}M.NileLink=class extends GM{constructor(){super(...arguments),this.hasSlotController=new bD(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.disabled=!1,this.button=!1}static get styles(){return[YD]}connectedCallback(){super.connectedCallback(),this.handleHostClick=this.handleHostClick.bind(this),this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick)}handleHostClick(M){this.disabled&&(M.preventDefault(),M.stopImmediatePropagation(),M.stopPropagation())}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}render(){return V`
4446
4451
  <div
4447
4452
  part="base"
4448
4453
  class=${aM({link:!0,"link--disabled":this.disabled,link__button:this.button})}
@@ -1,2 +1,2 @@
1
- System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-link.css.cjs.js","../slot.cjs.js","lit/directives/if-defined.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var s,i,t,e,l,r,o,a,n,f,_templateObject,d;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){s=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){t=_litDecoratorsJs.state;e=_litDecoratorsJs.customElement;},function(_nileLinkCssCjsJs){l=_nileLinkCssCjsJs.s;},function(_slotCjsJs){r=_slotCjsJs.H;},function(_litDirectivesIfDefinedJs){o=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesClassMapJs){a=_litDirectivesClassMapJs.classMap;},function(_internalNileElementCjsJs){n=_internalNileElementCjsJs.N;},function(_property002CjsJs){f=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",d=/*#__PURE__*/function(_n){_inherits(d,_n);var _super=_createSuper(d);function d(){var _this;_classCallCheck(this,d);_this=_super.apply(this,arguments),_this.hasSlotController=new r(_assertThisInitialized(_this),"[default]","prefix","suffix"),_this.hasFocus=!1,_this.disabled=!1,_this.button=!1;return _this;}_createClass(d,[{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("nile-blur");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("nile-focus");}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n ?disabled=","\n title=","\n aria-disabled=","\n tabindex=","\n @blur=","\n @focus=","\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"link__prefix\"></slot>\n <slot part=\"label\" class=\"link__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"link__suffix\"></slot>\n </div>\n "])),a({link:!0,"link--disabled":this.disabled,link__button:this.button}),o(this.disabled),this.title,this.disabled?"true":"false",this.disabled?"-1":"0",this.handleBlur,this.handleFocus);}}],[{key:"styles",get:function get(){return[l];}}]);return d;}(n));s([t()],d.prototype,"hasFocus",void 0),s([f({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),s([f({type:Boolean})],d.prototype,"button",void 0),_export("N",d=s([e("nile-link")],d));}};});
1
+ System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-link.css.cjs.js","../slot.cjs.js","lit/directives/if-defined.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var s,i,t,e,l,r,o,a,n,c,_templateObject,d;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){s=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){t=_litDecoratorsJs.state;e=_litDecoratorsJs.customElement;},function(_nileLinkCssCjsJs){l=_nileLinkCssCjsJs.s;},function(_slotCjsJs){r=_slotCjsJs.H;},function(_litDirectivesIfDefinedJs){o=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesClassMapJs){a=_litDirectivesClassMapJs.classMap;},function(_internalNileElementCjsJs){n=_internalNileElementCjsJs.N;},function(_property002CjsJs){c=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",d=/*#__PURE__*/function(_n){_inherits(d,_n);var _super=_createSuper(d);function d(){var _this;_classCallCheck(this,d);_this=_super.apply(this,arguments),_this.hasSlotController=new r(_assertThisInitialized(_this),"[default]","prefix","suffix"),_this.hasFocus=!1,_this.disabled=!1,_this.button=!1;return _this;}_createClass(d,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(d.prototype),"connectedCallback",this).call(this),this.handleHostClick=this.handleHostClick.bind(this),this.addEventListener("click",this.handleHostClick);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(d.prototype),"disconnectedCallback",this).call(this),this.removeEventListener("click",this.handleHostClick);}},{key:"handleHostClick",value:function handleHostClick(s){this.disabled&&(s.preventDefault(),s.stopImmediatePropagation(),s.stopPropagation());}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("nile-blur");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("nile-focus");}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n ?disabled=","\n title=","\n aria-disabled=","\n tabindex=","\n @blur=","\n @focus=","\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"link__prefix\"></slot>\n <slot part=\"label\" class=\"link__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"link__suffix\"></slot>\n </div>\n "])),a({link:!0,"link--disabled":this.disabled,link__button:this.button}),o(this.disabled),this.title,this.disabled?"true":"false",this.disabled?"-1":"0",this.handleBlur,this.handleFocus);}}],[{key:"styles",get:function get(){return[l];}}]);return d;}(n));s([t()],d.prototype,"hasFocus",void 0),s([c({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),s([c({type:Boolean})],d.prototype,"button",void 0),_export("N",d=s([e("nile-link")],d));}};});
2
2
  //# sourceMappingURL=nile-link.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-link.cjs.js","sources":["../../../src/nile-link/nile-link.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, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport {styles} from './nile-link.css';\nimport { HasSlotController } from '../slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\n\n/**\n * Nile icon component.\n *\n * @tag nile-link\n *\n */\n@customElement('nile-link')\nexport class NileLink extends NileElement {\n\n\t/**\n\t * The styles for Link\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 private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');\n\n @state() private hasFocus = false;\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: Boolean }) button = false;\n\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n link: true,\n 'link--disabled': this.disabled,\n 'link__button': this.button\n })}\n ?disabled=${ifDefined(this.disabled)}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"link__prefix\"></slot>\n <slot part=\"label\" class=\"link__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"link__suffix\"></slot>\n </div>\n `;\n }\n\n\n\t/* #endregion */\n}\n\nexport default NileLink;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-link': NileLink;\n }\n }\n"],"names":["NileLink","d","this","hasSlotController","HasSlotController","hasFocus","disabled","button","_this","_createClass","key","value","handleBlur","emit","handleFocus","render","html","_templateObject","_taggedTemplateLiteral","classMap","link","link__button","ifDefined","title","get","styles","NileElement","__decorate","state","prototype","property","type","Boolean","reflect","customElement"],"mappings":"gjIAuBaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,EAAN,SAAAC,EAAA,qEAUYC,EAAAA,KAAAA,CAAAC,kBAAoB,GAAIC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA,KAAAA,EAAwB,WAAA,CAAa,SAAU,QAEvEF,CAAAA,CAAAA,KAAAA,CAAQG,QAAG,CAAA,CAAA,CAAA,CAGgBH,KAAAA,CAAQI,QAAAA,CAAAA,CAAG,CAE1BJ,CAAAA,KAAAA,CAAMK,QAAG,CA0CvC,QAAAC,KAAA,EArDOC,YAAA,CAAAR,CAAA,GAAAS,GAAA,cAAAC,KAAA,CAcE,SAAAC,WAAA,EACNV,IAAKG,CAAAA,QAAAA,CAAAA,CAAW,CAChBH,CAAAA,IAAAA,CAAKW,IAAK,CAAA,WAAA,CACX,EAEO,GAAAH,GAAA,eAAAC,KAAA,UAAAG,YAAA,EACNZ,IAAKG,CAAAA,QAAAA,CAAAA,CAAW,CAChBH,CAAAA,IAAAA,CAAKW,KAAK,YACX,CAAA,EAMK,GAAAH,GAAA,UAAAC,KAAA,UAAAI,OAAA,CAAAA,CACJ,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,qbAGCC,CAAAA,CAAS,CACfC,IAAM,CAAA,CAAA,CAAA,CACN,iBAAkBlB,IAAKI,CAAAA,QAAAA,CACvBe,aAAgBnB,IAAKK,CAAAA,MAAAA,CAAAA,CAAAA,CAEXe,CAAAA,CAAUpB,IAAKI,CAAAA,QAAAA,CAAAA,CACnBJ,IAAKqB,CAAAA,KAAAA,CACGrB,IAAAA,CAAKI,SAAW,MAAS,CAAA,OAAA,CAC9BJ,IAAAA,CAAKI,SAAW,IAAO,CAAA,GAAA,CAC1BJ,IAAKU,CAAAA,UAAAA,CACJV,IAAKY,CAAAA,WAAAA,EAOnB,CAAA,KAAAJ,GAAA,UAAAc,GAAA,CAjDK,SAAAA,IAAA,CAAWC,CACjB,MAAO,CAACA,CAAAA,CACR,EAYQ,WAAAxB,CAAA,GApBoByB,CAAAA,GAYnBC,CAAA,CAAA,CAARC,CAAiC5B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6B,UAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAGUF,CAAA,CAAA,CAA3CG,EAAS,CAAEC,IAAAA,CAAMC,OAASC,CAAAA,OAAAA,CAAAA,CAAS,KAAyBjC,CAAA6B,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAEhCF,CAAA,CAAA,CAA5BG,CAAS,CAAA,CAAEC,KAAMC,OAA0BhC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6B,SAAA,CAAA,QAAA,CAAA,IAAA,gBAjBjC7B,CAAQ2B,CAAAA,CAAAA,CAAA,CADpBO,CAAAA,CAAc,cACFlC"}
1
+ {"version":3,"file":"nile-link.cjs.js","sources":["../../../src/nile-link/nile-link.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, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport {styles} from './nile-link.css';\nimport { HasSlotController } from '../slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\n\n/**\n * Nile icon component.\n *\n * @tag nile-link\n *\n */\n@customElement('nile-link')\nexport class NileLink extends NileElement {\n /**\n * The styles for Link\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n '[default]',\n 'prefix',\n 'suffix'\n );\n\n @state() private hasFocus = false;\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: Boolean }) button = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleHostClick = this.handleHostClick.bind(this);\n this.addEventListener('click', this.handleHostClick);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('click', this.handleHostClick);\n }\n\n private handleHostClick(event: MouseEvent) {\n // Prevent the click event from being emitted when the button is disabled\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n link: true,\n 'link--disabled': this.disabled,\n link__button: this.button,\n })}\n ?disabled=${ifDefined(this.disabled)}\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"link__prefix\"></slot>\n <slot part=\"label\" class=\"link__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"link__suffix\"></slot>\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileLink;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-link': NileLink;\n }\n }\n"],"names":["NileLink","_n","_inherits","d","_super","_createSuper","this","hasSlotController","HasSlotController","hasFocus","disabled","button","_this","_createClass","key","value","connectedCallback","super","handleHostClick","bind","addEventListener","disconnectedCallback","removeEventListener","event","preventDefault","stopImmediatePropagation","stopPropagation","handleBlur","emit","handleFocus","render","html","_templateObject","_taggedTemplateLiteral","classMap","link","link__button","ifDefined","title","get","styles","NileElement","__decorate","state","prototype","property","type","Boolean","reflect","customElement"],"mappings":"slJAuBaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,uEASYG,KAAAA,CAAAC,iBAAAA,CAAoB,GAAIC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA,KAAAA,EAEvC,WAAA,CACA,SACA,QAGeF,CAAAA,CAAAA,KAAAA,CAAQG,QAAG,CAAA,CAAA,CAAA,CAGgBH,KAAAA,CAAQI,QAAAA,CAAAA,CAAG,EAE1BJ,KAAAA,CAAMK,MAAAA,CAAAA,CAAG,CA+DvC,QAAAC,KAAA,EA/EQC,YAAA,CAAAV,CAAA,GAAAW,GAAA,qBAAAC,KAAA,CAkBP,SAAAC,kBAAA,CAAAA,CACEC,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4BAAAA,IAAAA,OACAX,KAAKY,eAAkBZ,CAAAA,IAAAA,CAAKY,eAAgBC,CAAAA,IAAAA,CAAKb,IACjDA,CAAAA,CAAAA,IAAAA,CAAKc,iBAAiB,OAASd,CAAAA,IAAAA,CAAKY,eACrC,CAAA,EAED,GAAAJ,GAAA,wBAAAC,KAAA,UAAAM,qBAAA,CAAAA,CACEJ,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,+BAAAA,IAAAA,OACAX,IAAAA,CAAKgB,mBAAoB,CAAA,OAAA,CAAShB,IAAKY,CAAAA,eAAAA,CACxC,EAEO,GAAAJ,GAAA,mBAAAC,KAAA,UAAAG,gBAAgBK,CAElBjB,CAAAA,CAAAA,IAAAA,CAAKI,QACPa,GAAAA,CAAAA,CAAMC,iBACND,CAAME,CAAAA,wBAAAA,CAAAA,CAAAA,CACNF,CAAMG,CAAAA,eAAAA,CAAAA,CAAAA,CAET,EAEO,GAAAZ,GAAA,cAAAC,KAAA,UAAAY,WAAA,EACNrB,IAAKG,CAAAA,QAAAA,CAAAA,CAAW,CAChBH,CAAAA,IAAAA,CAAKsB,IAAK,CAAA,WAAA,CACX,EAEO,GAAAd,GAAA,eAAAC,KAAA,UAAAc,YAAA,CAAAA,CACNvB,IAAKG,CAAAA,QAAAA,CAAAA,CAAW,CAChBH,CAAAA,IAAAA,CAAKsB,IAAK,CAAA,YAAA,CACX,EAMM,GAAAd,GAAA,UAAAC,KAAA,UAAAe,OAAA,CACL,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,qbAGCC,CAAAA,CAAS,CACfC,IAAM,CAAA,CAAA,CAAA,CACN,iBAAkB7B,IAAKI,CAAAA,QAAAA,CACvB0B,aAAc9B,IAAKK,CAAAA,MAAAA,CAAAA,CAAAA,CAET0B,CAAAA,CAAU/B,IAAKI,CAAAA,QAAAA,CAAAA,CAEzBJ,IACGgC,CAAAA,KAAAA,CAEWhC,IAAAA,CAAKI,SAAW,MAAS,CAAA,OAAA,CAC9BJ,IAAAA,CAAKI,SAAW,IAAO,CAAA,GAAA,CAC1BJ,IAAKqB,CAAAA,UAAAA,CACJrB,IAAKuB,CAAAA,WAAAA,EAOnB,CAAA,KAAAf,GAAA,UAAAyB,GAAA,CA5EM,SAAAA,IAAA,CAAWC,CAChB,MAAO,CAACA,CACT,CAAA,EAgBD,WAAArC,CAAA,GAvB4BsC,CAAvB,GAgBIC,CAAA,CAAA,CAARC,CAAiC3C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4C,UAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAGUF,CAAA,CAAA,CAA3CG,EAAS,CAAEC,IAAAA,CAAMC,OAASC,CAAAA,OAAAA,CAAAA,CAAS,KAAyBhD,CAAA4C,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAEhCF,CAAA,CAAA,CAA5BG,CAAS,CAAA,CAAEC,KAAMC,OAA0B/C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4C,SAAA,CAAA,QAAA,CAAA,IAAA,gBArBjC5C,CAAQ0C,CAAAA,CAAAA,CAAA,CADpBO,CAAAA,CAAc,cACFjD"}
@@ -1,2 +1,2 @@
1
- System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var n,_templateObject,e;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){n=_index001CjsJs.i;}],execute:function(){_export("s",e=n(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n height: 38px;\n box-sizing: border-box;\n cursor: pointer\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n pointer-events:none;\n }\n\n :host(.link--disabled) {\n pointer-events: none;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n"]))));}};});
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,n;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function(){_export("s",n=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n height: 38px;\n box-sizing: border-box;\n cursor: pointer;\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n pointer-events: none;\n }\n\n :host(.link--disabled) {\n pointer-events: none;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n\n :host([disabled]) {\n pointer-events: none;\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-link.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-link.css.cjs.js","sources":["../../../src/nile-link/nile-link.css.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 { css } from 'lit-element';\n\n/**\n * Link CSS\n */\nexport const styles = css`\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n height: 38px;\n box-sizing: border-box;\n cursor: pointer\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n pointer-events:none;\n }\n\n :host(.link--disabled) {\n pointer-events: none;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-link.css.cjs.js","sources":["../../../src/nile-link/nile-link.css.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 { css } from 'lit-element';\n\n/**\n * Link CSS\n */\nexport const styles = css`\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n height: 38px;\n box-sizing: border-box;\n cursor: pointer;\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n pointer-events: none;\n }\n\n :host(.link--disabled) {\n pointer-events: none;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n\n :host([disabled]) {\n pointer-events: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -13,7 +13,7 @@ import{i as e}from"../index-cd2f9c12.esm.js";const n=e`
13
13
  gap: 8px;
14
14
  height: 38px;
15
15
  box-sizing: border-box;
16
- cursor: pointer
16
+ cursor: pointer;
17
17
  }
18
18
 
19
19
  .link__label {
@@ -31,7 +31,7 @@ import{i as e}from"../index-cd2f9c12.esm.js";const n=e`
31
31
  color: rgba(0, 94, 166, 0.5);
32
32
  cursor: not-allowed;
33
33
  opacity: 0.6;
34
- pointer-events:none;
34
+ pointer-events: none;
35
35
  }
36
36
 
37
37
  :host(.link--disabled) {
@@ -59,4 +59,8 @@ import{i as e}from"../index-cd2f9c12.esm.js";const n=e`
59
59
  border-radius: 4px;
60
60
  background: rgba(0, 94, 166, 0.1);
61
61
  }
62
+
63
+ :host([disabled]) {
64
+ pointer-events: none;
65
+ }
62
66
  `;export{n as s};
@@ -1,4 +1,4 @@
1
- import{__decorate as s}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";import{state as t,customElement as e}from"lit/decorators.js";import{s as l}from"./nile-link.css.esm.js";import{H as r}from"../slot.esm.js";import{ifDefined as o}from"lit/directives/if-defined.js";import{classMap as a}from"lit/directives/class-map.js";import{N as n}from"../internal/nile-element.esm.js";import{n as f}from"../property-09139d3c.esm.js";import"lit";let m=class extends n{constructor(){super(...arguments),this.hasSlotController=new r(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.disabled=!1,this.button=!1}static get styles(){return[l]}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}render(){return i`
1
+ import{__decorate as s}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";import{state as t,customElement as e}from"lit/decorators.js";import{s as l}from"./nile-link.css.esm.js";import{H as r}from"../slot.esm.js";import{ifDefined as o}from"lit/directives/if-defined.js";import{classMap as a}from"lit/directives/class-map.js";import{N as n}from"../internal/nile-element.esm.js";import{n as c}from"../property-09139d3c.esm.js";import"lit";let d=class extends n{constructor(){super(...arguments),this.hasSlotController=new r(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.disabled=!1,this.button=!1}static get styles(){return[l]}connectedCallback(){super.connectedCallback(),this.handleHostClick=this.handleHostClick.bind(this),this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick)}handleHostClick(s){this.disabled&&(s.preventDefault(),s.stopImmediatePropagation(),s.stopPropagation())}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}render(){return i`
2
2
  <div
3
3
  part="base"
4
4
  class=${a({link:!0,"link--disabled":this.disabled,link__button:this.button})}
@@ -13,4 +13,4 @@ import{__decorate as s}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";
13
13
  <slot part="label" class="link__label"></slot>
14
14
  <slot name="suffix" part="suffix" class="link__suffix"></slot>
15
15
  </div>
16
- `}};s([t()],m.prototype,"hasFocus",void 0),s([f({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),s([f({type:Boolean})],m.prototype,"button",void 0),m=s([e("nile-link")],m);export{m as N};
16
+ `}};s([t()],d.prototype,"hasFocus",void 0),s([c({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),s([c({type:Boolean})],d.prototype,"button",void 0),d=s([e("nile-link")],d);export{d as N};
@@ -1,2 +1,2 @@
1
- System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,i;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",i=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 9px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: #005ea6;\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n"]))));}};});
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,i;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",i=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 9px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: #005ea6;\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n width:auto;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-option.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-option.css.cjs.js","sources":["../../../src/nile-option/nile-option.css.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 { css } from 'lit-element';\n\n/**\n * Option_2 CSS\n */\nexport const styles = css`\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 9px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: #005ea6;\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-option.css.cjs.js","sources":["../../../src/nile-option/nile-option.css.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 { css } from 'lit-element';\n\n/**\n * Option_2 CSS\n */\nexport const styles = css`\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 9px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: #005ea6;\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n width:auto;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{i as o}from"../index-cd2f9c12.esm.js";const e=o`
1
+ import{i as o}from"../index-cd2f9c12.esm.js";const i=o`
2
2
  :host {
3
3
  display: block;
4
4
  user-select: none;
@@ -82,6 +82,7 @@ import{i as o}from"../index-cd2f9c12.esm.js";const e=o`
82
82
  pointer-events: none;
83
83
  margin-left: 12px;
84
84
  margin-right: 12px;
85
+ width:auto;
85
86
  }
86
87
 
87
88
  @media (forced-colors: active) {
@@ -90,4 +91,4 @@ import{i as o}from"../index-cd2f9c12.esm.js";const e=o`
90
91
  outline-offset: -1px;
91
92
  }
92
93
  }
93
- `;export{e as s};
94
+ `;export{i as s};